/* ==========================================================
   STRAWBERRY MILK · design system
   Milk cream 60 · strawberry pink 30 · berry red 10, cocoa ink.
   Never hardcode colours / curves outside these tokens.
   ========================================================== */
:root {
  /* colour */
  --milk: #FFF7F4;        /* card body */
  --milk-2: #FCE6E9;      /* insets, tracks, avatar tiles */
  --milk-3: #F8D5DB;      /* pressed / empty dots */
  --edge: #EFC7CF;        /* contact shadow under cards */
  --pink: #F27D93;        /* swirl stripe A */
  --pink-lt: #F9B3C1;     /* swirl stripe B, carton roof */
  --berry: #E5485A;       /* accent 10%: kickers, numbers */
  --berry-dk: #C23348;
  --leaf: #8FC27A;        /* tiny accent: strawberry leaves */
  --seed: #FCE3A6;        /* tiny accent: seeds, coin */
  --gold: #F6C85A;
  --ink: #4A2B33;         /* cocoa text + outlines */
  --ink-2: #7A5560;
  --muted: #A0707C;
  --name: #D9506A;        /* chat usernames */

  /* type */
  --f-display: "Fredoka", "Nunito", sans-serif;
  --f-body: "Nunito", sans-serif;
  --t-hero: 58px;  --ls-hero: -.005em;
  --t-xl: 40px;    --ls-xl: 0;
  --t-l: 28px;     --ls-l: .005em;
  --t-m: 21px;     --ls-m: .01em;
  --t-s: 19px;
  --t-xs: 15px;    --ls-caps: .22em;
  --t-xxs: 13px;   --ls-caps-s: .24em;

  /* spacing (4/8 grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;

  /* shape */
  --r-card: 26px; --r-inset: 18px; --r-track: 15px; --r-pill: 999px;
  --outline: 2.4px;

  /* depth: contact edge + ambient + long soft */
  --shadow: 0 3px 0 var(--edge), 0 12px 26px rgba(74,43,51,.22), 0 26px 46px -22px rgba(74,43,51,.30);
  --shadow-s: 0 2px 0 var(--edge), 0 6px 14px rgba(74,43,51,.18);

  /* signature: the milk swirl stripe + seed dots */
  --swirl: repeating-linear-gradient(-45deg, var(--pink) 0 14px, var(--pink-lt) 14px 28px);
  --seeds: radial-gradient(circle, rgba(242,125,147,.16) 1.6px, transparent 2px) 0 0 / 14px 14px;

  /* motion */
  --e-boing: cubic-bezier(.34,1.8,.5,1);   /* squash-and-stretch arrival */
  --e-soft: cubic-bezier(.22,1,.36,1);     /* settles, no overshoot */
  --e-hop: cubic-bezier(.5,-0.4,.7,.4);    /* little anticipation, then away */
  --d-in: 600ms; --d-out: 380ms; --d-stagger: 70ms;
}

html, body { background: transparent; margin: 0; }
* { box-sizing: border-box; }
svg { display: block; overflow: visible; }

/* ---------- base pieces ---------- */
.sm-card { position: relative; background: var(--milk); border-radius: var(--r-card); box-shadow: var(--shadow); color: var(--ink); }
.sm-tile { display: grid; place-items: center; background: var(--milk-2); border-radius: var(--r-inset); flex: none; }
.sm-kicker { font: 800 var(--t-xs)/1 var(--f-body); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--berry); }
.sm-num { font-variant-numeric: tabular-nums; }

/* carton tab: the pink gable label that sits on a card's top edge */
.sm-tab { display: inline-flex; align-items: center; gap: 6px; background: var(--pink-lt); color: var(--ink);
  font: 800 var(--t-xxs)/1 var(--f-body); letter-spacing: var(--ls-caps-s); text-transform: uppercase;
  padding: 7px 14px 6px; border-radius: 12px 12px 4px 4px; box-shadow: inset 0 -2px 0 rgba(194,51,72,.18); }

/* seed-dot divider / indicator */
.sm-seeds { display: flex; gap: 6px; }
.sm-seeds i { width: 9px; height: 9px; border-radius: 50%; background: var(--milk-3); transition: background .3s var(--e-soft), transform .4s var(--e-boing); }
.sm-seeds i.on { background: var(--berry); transform: scale(1.15); }

/* swirl progress */
.sm-track { position: relative; height: 30px; border-radius: var(--r-track); background: var(--milk-2); box-shadow: inset 0 3px 0 rgba(74,43,51,.06); }
.sm-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-track); overflow: hidden;
  }
/* the swirl rides on its own layer so the bar never repaints while it scrolls */
.sm-fill::before { content: ''; position: absolute; top: 0; bottom: 0; left: -39.6px; right: 0;
  background: var(--swirl); background-size: 39.6px 39.6px; will-change: transform;
  animation: sm-pour 2.4s linear infinite; }
.sm-fill::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 -4px 0 rgba(194,51,72,.16), inset 0 3px 0 rgba(255,255,255,.35); }
@keyframes sm-pour { to { transform: translateX(39.6px) } }

/* motion helpers: resting state is always fully visible (lesson 2) */
.sm-in { animation: sm-boing var(--d-in) var(--e-boing) both; }
@keyframes sm-boing { 0% { transform: scale(.82, .9); opacity: .6 } 55% { transform: scale(1.04, .97); opacity: 1 } 100% { transform: none; opacity: 1 } }
.sm-out { animation: sm-hop var(--d-out) var(--e-hop) both; }
@keyframes sm-hop { 0% { transform: none; opacity: 1 } 35% { transform: translateY(4px) scale(1.02, .96) } 100% { transform: translateY(-14px) scale(.88); opacity: 0 } }
@keyframes sm-wiggle { 0%,100% { transform: rotate(-5deg) } 50% { transform: rotate(5deg) } }
@keyframes sm-bob { 0%,100% { transform: none } 50% { transform: translateY(-3px) } }
@keyframes sm-twinkle { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(.6) rotate(25deg); opacity: .55 } }
