/* Stride — design system calibrated to the Headspace bar */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FAF6F0;
  --card: #F3EDE2;
  --surface: #FFFFFF;             /* elevated card face — clearly lighter than --bg */
  --shadow-card: 0 1px 3px rgba(60, 50, 30, .05); /* tonal surface, not floating panel */
  --white: #FFFFFF;
  --ink: #2B2822;
  --ink2: #6E675C;
  --text-muted: #6E675C;
  --line: #E7DFD2;
  --blue: #0061EF;
  --blue-d: #004FC4;
  --header-bg: linear-gradient(180deg, #FFB21E 0%, #FFC93E 100%); /* warm amber → light: panel 3-0 called flat #FFC400 acidic vs the ref's tonal warmth */
  --orange: #F47C31;
  --yellow: #FFCE00;
  --green: #43B061; /* success accents (timeline dots, eaten check) */
  --r-card: 20px;
  --cta-gap: 24px;                /* min air between last option and the pinned CTA */
  --chip-h: 26px;                 /* one pill height for flag chips + overflow button */
  /* meal-tile tints: one warm hue ramp, hue AND lightness stepped so neighbours never twin */
  --mt-0: hsl(46, 82%, 86%);
  --mt-1: hsl(28, 84%, 78%);
  --mt-2: hsl(10, 80%, 86%);
  --mt-3: hsl(350, 72%, 78%);
  --shadow: 0 2px 10px rgba(60, 50, 30, .06);
  --pad: 24px;
  --font-display: 2.5rem;         /* wordmark / display moments */
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Figtree', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100dvh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }

#app { min-height: 100dvh; }
.screen { min-height: 100dvh; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- buttons ---------- */
.btn {
  display: block; width: 100%;
  padding: 16px 24px;
  border-radius: 999px;
  background: var(--blue); color: #fff;
  font-weight: 700; font-size: 17px; text-align: center;
  transition: transform .12s ease, background .15s ease;
}
.btn:hover { background: var(--blue-d); }
.btn:active { transform: scale(.97); }
.btn[disabled] { background: #C9C2B4; cursor: default; transform: none; }
.btn-ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: #FBF8F2; }
:where(button, a, input, summary):focus-visible { outline: 3px solid #7FB1FF; outline-offset: 2px; border-radius: 8px; }

/* ---------- onboarding ---------- */
.onb { --onb-hero-h: clamp(210px, 26dvh, 240px); /* narrow min-max band: panel winners' one note was sun drift between steps */ /* capped sky — the sheet, not the hero, absorbs viewport slack (onb-11) */ display: flex; flex-direction: column; height: 100dvh; } /* ponytail: fixed viewport, opts scroll on overflow; sub-600px heights would clip the title — revisit if real */
/* one warm sky across every question step (onb-10/11) — the hue rotation clashed with the constant orange orb + blue CTA */
.bg-yellow  { background: var(--header-bg); }
.bg-orange  { background: #F98C3B; }

.onb-top {
  position: relative; z-index: 1; overflow: hidden;
  /* sky grows into slack up to a bound, so sparse steps read as a tall scenic hero (onb-13), never a cavern below the list */
  flex: 1 0 var(--onb-hero-h);
  max-height: 272px; /* bounded growth: sparse steps stay scenic, sun position varies ≤~32px across steps */
}
.back, .progress { z-index: 3; }
.onb-top::before { /* soft light pooling around the sun so sun, sky and horizon harmonize */
  content: ''; position: absolute; left: 50%; bottom: -30px;
  width: 360px; height: 220px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255,241,187,.65), transparent);
  pointer-events: none;
}
.onb-top .orb {
  position: absolute; left: 50%; bottom: 6px; /* sun clear of the curve — dome apex overlaps ~6px, face reads as a complete circle (onb-10) */
  transform: translateX(-50%);
  animation: orbIn .5s ease both;
}
@keyframes orbIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translateX(-50%); }
}
.progress {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.progress i { width: 34px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.55); } /* black-alpha read as muddy mustard on amber */
.progress i.on { background: var(--ink); }
.back {
  position: absolute; top: 8px; left: 8px;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.back:hover { background: rgba(0,0,0,.06); }

.sheet {
  position: relative; z-index: 2;
  background: #FFFFFF; /* matches the hero image's baked white dome — no seam */
  border-radius: 0; /* the curve lives in the hero image now */
  margin-top: -1px;
  padding: 36px var(--pad) calc(24px + env(safe-area-inset-bottom, 0px)); /* fixed top anchors the title at the same y on every step (onb-11); CTA anchored 24px + safe-area off the bottom */
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0; /* the sheet — not the sky — absorbs viewport slack */
  animation: rise .4s ease both;
}
.sheet-inner { width: 100%; max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; flex: 1; min-height: 0;
  overflow-y: auto; scrollbar-width: none; } /* tall steps scroll as one — options must NEVER collapse away (friend-stuck bug) */
.sheet-inner::-webkit-scrollbar { display: none; }
.q-kicker { text-align: center; color: var(--ink2); font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.kicker-link { color: var(--blue); font-size: 13px; font-weight: 700; text-decoration: underline; padding: 2px 4px; }
/* title sits at a FIXED distance below the curve (sheet's 44px pad); ALL slack lands between list and CTA via the btn's auto margin (onb-11) */
.q-title { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; text-wrap: balance; padding: 0 12px; /* side air — titles never run margin-to-margin (onb-10) */ }
.q-sub { text-align: center; color: var(--ink2); font-size: 15px; min-height: 21px; margin-bottom: 14px; } /* slot always reserved — goal/conds/diet share one title→options rhythm */

.opts {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 14px; margin-bottom: var(--cta-gap); /* + q-sub's 14px = fixed 28px header→list gap on every step; the CTA's auto margin absorbs the slack (onb-11) */
  flex-shrink: 0; /* never collapses — the sheet-inner scrolls instead */
}
.opts::after { /* sheet-colored fade over the clipped edge — only while more options sit below */
  content: ''; display: none; position: sticky; bottom: 0;
  flex: 0 0 36px; margin-top: -48px; /* 36px fade + 12px gap = zero footprint */
  background: linear-gradient(180deg, transparent, #FFFFFF);
  pointer-events: none;
}
@container scroll-state(scrollable: bottom) { .opts::after { display: block; } }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px;
  background: var(--white); /* crisp hairline pill on the sheet (onb-11) — cream-on-cream melted */
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600; font-size: 16px; text-align: left;
  transition: box-shadow .15s ease, background .15s ease, transform .12s ease;
  animation: rise .4s ease both;
}
.opt:hover { background: #FBF8F2; }
.opt:active { transform: scale(.98); }
.opt .ring {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: transparent; box-shadow: inset 0 0 0 1.5px #EBD9CC; /* near-invisible warm ring — panel 3-0: filled discs read muddy; the blue check is the only loud element */
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, box-shadow .15s ease;
}
.opt .ring svg { opacity: 0; transform: scale(.5); transition: all .15s ease; }
.opt.sel { background: var(--white); box-shadow: var(--shadow); } /* hairline → soft drop shadow lift + blue check disc = selected (onb-11) */
.opt.sel .ring { background: var(--blue); box-shadow: none; }
.opt.sel .ring svg { opacity: 1; transform: scale(1); }

.field {
  width: 100%; padding: 16px 20px;
  border: 1.5px solid var(--line); border-radius: 16px;
  background: var(--white); font-size: 17px; font-weight: 600;
}
.field:focus { outline: none; border-color: var(--blue); }
.field::placeholder { color: #B4AC9E; font-weight: 500; }

.sheet .btn { flex: 0 0 auto; margin-top: auto; } /* the pinned CTA absorbs leftover space; the list's 24px bottom margin is the min gap */
.sheet .field { margin-top: 14px; margin-bottom: var(--cta-gap); } /* the name field top-aligns on the same rhythm as an option list */
.hint { text-align: center; color: var(--ink2); font-size: 13px; margin-top: 12px; }

/* ---------- welcome: flat yellow hero over white sheet ---------- */
.welcome { display: flex; flex-direction: column; min-height: 100dvh; background: var(--white); }
.welcome-hero {
  /* 56dvh put the sign-in link exactly on the fold at 390x844 — invisible without scrolling on the
     most common phone. 50dvh keeps the mascot composed and lifts the whole footer into view. */
  height: 50dvh; flex: 0 0 auto;
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #FFCE00, #FFB600); /* fallback while the hero image loads */
  display: flex; flex-direction: column; align-items: center;
}
.hero-img, .onb-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom; display: block;
}
.welcome:not(.ready) .welcome-hero { justify-content: flex-end; } /* orb seats on the horizon, no yellow slab under it */
.welcome-hero .orb {
  margin: auto; /* ready keeps the orb clear of its ringed dome */
  animation: breathe 4.5s ease-in-out infinite;
}
.welcome:not(.ready) .welcome-hero .orb {
  margin: auto auto -28px; position: relative; z-index: 1; /* sun cresting the dome (onb-10), not floating mid-field */
}
/* flat tone-on-tone shapes behind the orb — ready's SCENE grammar, so the sky isn't a lone circle */
.hero-shape { position: absolute; opacity: .8; }
.hs-cloud { left: 10%; top: 24%; }
.hs-spark { right: 12%; top: 18%; }
.welcome-curve { display: block; width: 100%; height: 64px; flex: 0 0 auto; }
.welcome-sheet {
  flex: 1;
  background: var(--white);
  margin-top: -1px; /* kill the antialias seam under the curve */
  padding: 10px var(--pad) max(24px, env(safe-area-inset-bottom, 0px));
  text-align: center;
  display: flex; flex-direction: column;
  animation: rise .4s ease both;
}
.welcome-sheet-inner { max-width: 480px; margin: 0 auto; width: 100%; flex: 1; display: flex; flex-direction: column; }
.welcome:not(.ready) .welcome-sheet-inner { justify-content: center; } /* wordmark/sub/CTA read as one composed cluster (onb-03) */
.welcome-footer {
  margin-top: 20px; /* + hero-sub's 36px = fixed 56px gap to the CTA, not flex slack */
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}
.welcome-sheet .btn { max-width: 340px; margin: 0 auto; }
.welcome-sheet .hint { color: var(--text-muted); margin-top: 14px; }

/* ---------- welcome / building ---------- */
.hero {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px var(--pad);
}
.hero .orb { animation: breathe 4.5s ease-in-out infinite; }
.wordmark { font-size: var(--font-display); font-weight: 800; letter-spacing: -0.02em; margin: 24px 0 12px; } /* 12-16px lock to the subhead — one cluster */
.hero-sub { font-size: 17px; color: var(--ink); opacity: .78; max-width: 300px; margin: 0 auto 36px; }
.hero .btn { max-width: 340px; }
.status-line { font-size: 17px; font-weight: 600; margin-top: 30px; min-height: 26px; opacity: .85; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.85); font-size: 13px; font-weight: 700;
}
/* ---------- ready: yellow hero over white ground plane ---------- */
.ready .welcome-hero { height: 40dvh; position: relative; } /* denser sheet content than welcome */
.ready-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.ready .welcome-hero .orb, .ready .welcome-curve { position: relative; z-index: 1; } /* orb + dome above the scene */
.ready .orb {
  border-radius: 50%;
  /* three rings, sized to end clear of the dome apex — alphas high enough to read on yellow */
  box-shadow: 0 0 0 20px rgba(255,255,255,.35), 0 0 0 40px rgba(255,255,255,.20), 0 0 0 60px rgba(255,255,255,.10);
}
.ready .q-kicker {
  margin-top: auto; /* with .plan-rows' bottom auto: spare space splits around the middle band */
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted); margin-bottom: 8px;
}
.plan-rows {
  width: 100%; max-width: 340px; margin: 0 auto auto;
  position: relative; /* anchors the timeline thread */
  display: flex; flex-direction: column; gap: 14px; text-align: left;
}
.plan-rows::before { /* onb-13 timeline thread through the 38px chip centers */
  content: ''; position: absolute; left: 18px; top: 19px; bottom: 19px; width: 2px;
  background: linear-gradient(180deg, var(--orange), rgba(244, 124, 49, .15));
}
.plan-row { display: flex; align-items: center; gap: 14px; }
.plan-ic {
  flex: 0 0 38px; height: 38px; border-radius: 50%;
  background: var(--orange); display: grid; place-items: center;
  position: relative; /* chips paint over the thread */
}
.plan-row strong { display: block; font-size: 15px; }
.plan-row small { display: block; font-size: 13px; color: var(--text-muted); line-height: 1.35; }
.ready .btn { margin-top: 24px; }
.ready .hint { max-width: 32ch; margin: 12px auto 0; text-wrap: balance; }

/* ---------- app shell / tabs ---------- */
.page {
  max-width: 560px; margin: 0 auto;
  padding: 28px var(--pad) 110px;
}
.greet { color: var(--ink2); font-size: 15px; font-weight: 600; }
.page-title { font-size: 27px; font-weight: 800; margin: 4px 0 20px; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #A39B8B; font-size: 11px; font-weight: 700;
  padding: 4px 14px; border-radius: 14px;
}
.tab svg { display: block; }
.tab.on { color: var(--ink); }
.tab:hover { color: var(--ink); }
.rail-profile, .rail-week { display: none; } /* desktop rail only */

/* ---------- timeline (Today) ---------- */
.tl { position: relative; display: flex; flex-direction: column; gap: 16px; }
.tl-row { display: flex; gap: 14px; animation: rise .45s ease both; }
.tl-rail { flex: 0 0 22px; position: relative; display: flex; justify-content: center; align-items: center; }
/* connector runs the full rail height plus the 16px row gap; opaque dots paint over it,
   so it reads as one continuous line whatever each card's height is */
.tl-rail::before {
  content: ''; position: absolute; left: 10px; top: 0; bottom: -16px;
  border-left: 2px solid var(--line);
}
.tl-row:first-child .tl-rail::before { top: 50%; }
.tl-row:last-child .tl-rail::before { bottom: 50%; }
.tl-dot {
  position: relative; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 2px #CFC8BA;
  display: flex; align-items: center; justify-content: center;
}
.tl-dot.now { background: var(--orange); box-shadow: none; }
.tl-dot.done { background: var(--green); box-shadow: none; }

.card {
  flex: 1; min-width: 0; /* lets the nowrap sub ellipsize instead of growing the card */
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border-radius: var(--r-card);
  padding: 16px; box-shadow: var(--shadow-card); border: 1px solid var(--line);
  text-align: left; transition: transform .15s ease;
}
.card:hover { transform: translateY(-2px); }
.card-body { flex: 1; min-width: 0; }
.card-title {
  font-size: 17px; font-weight: 800; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; /* 2 lines max, like the ref */
}
.card-meta {
  color: var(--ink2); font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* meta can never wrap */
}
.pill-start {
  display: inline-block; margin-top: 10px; padding: 10px 24px;
  border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 700;
}
.card:hover .pill-start { background: var(--blue-d); }
.tile {
  flex: 0 0 112px; height: 88px; border-radius: 16px;
  overflow: hidden; /* full-bleed scene art clips to the rounded corners */
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; /* meal tiles still center an emoji */
}
.tile svg { width: 100%; height: 100%; display: block; }
/* flat skies — the tile art (horizon + face motifs) supplies the depth, like the onb sun */
.t-yellow { background: #FFD34F; }
.t-orange { background: #F58236; }
.t-sky    { background: #6FC0E4; }
.t-green  { background: #6FBE86; }
.t-grape  { background: #9887E6; }
.t-cream  { background: #FBEAC2; }

/* ---------- meals ---------- */
.daypills { display: flex; justify-content: space-between; margin-bottom: 22px; }
.daypill { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px; }
.dp-l {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--ink2);
  background: #F0E9DC; /* subtle resting fill so unselected days read as targets */
  transition: background .15s ease;
}
.dp-d { font-size: 11px; font-weight: 600; color: var(--ink2); }
.daypill.on .dp-l { background: var(--ink); color: #fff; }
.daypill.today .dp-l { box-shadow: 0 0 0 2px var(--orange); } /* today = orange ring; filled .on stays the single strong selected signal */
.daypill:not(.on):hover .dp-l { background: #E7DECC; }

.slot-label {
  font-size: 20px; font-weight: 800;
  color: var(--ink); margin: 28px 0 12px 36px; /* indented into the card column so the thread runs past it */
}
.meal { margin-bottom: 12px; animation: rise .45s ease both; }
/* dashed thread stitches the whole day: -69px bridges 28px collapsed margin + 29px label + 12px label margin */
.meal .tl-rail::before { border-left: 2px dashed #CFC8BA; top: 50%; bottom: -69px; }
.tl-row.meal ~ .tl-row.meal .tl-rail::before { top: 0; }
.tl-row.meal:not(:has(~ .tl-row.meal)) .tl-rail::before { bottom: 50%; }
.meal .card { padding: 14px 0 14px 14px; } /* right edge open — the tile bleeds flush like the ref tiles */
.meal .tile {
  flex-basis: 96px; align-self: stretch; height: auto;
  border-radius: 0 16px 16px 0; /* art anchors the card's right edge */
}
.meal .flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.meal .more { /* contained hairline pill — a real control, like the ref's contained "..." */
  margin-left: auto;
  height: var(--chip-h); padding: 0 10px;
  box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--ink2); line-height: 1;
}
.meal .more svg { display: block; }
.meal .more:hover { color: var(--ink); }
/* logged/eaten check circle — the card's primary action */
.eat {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  align-self: center;
  background: var(--bg); /* opaque so the dashed thread passes behind, not through */
  box-shadow: inset 0 0 0 2px #CFC8BA;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, box-shadow .15s ease;
}
.eat svg { opacity: 0; transform: scale(.5); transition: all .15s ease; }
.eat.ck { background: var(--green); box-shadow: none; }
.eat.ck svg { opacity: 1; transform: scale(1); }
.meal.next .eat { box-shadow: inset 0 0 0 9px var(--orange); } /* "you are here" — done green / active orange / upcoming hollow */
.card.eaten .card-body { opacity: .55; }
/* meal tiles: --mt ramp tint + neighbouring-hue blob (--mt-b, read by the SVG) so art fills the frame */
.tile.mt { font-size: 44px; }
.mt-0 { background: var(--mt-0); --mt-b: var(--mt-1); }
.mt-1 { background: var(--mt-1); --mt-b: var(--mt-2); }
.mt-2 { background: var(--mt-2); --mt-b: var(--mt-3); }
.mt-3 { background: var(--mt-3); --mt-b: var(--mt-0); }
.flag {
  height: var(--chip-h); display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; padding: 0 10px; border-radius: 999px;
  background: #EBF4EC; color: #256B3B;
}
.flag.f-blue { background: #EDF3FF; color: #0B4DB2; }
.summary-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.summary-row:has(.stat-kcal) { grid-template-columns: 2fr 1fr; } /* meals: kcal-vs-target owns the row */
.stat .bar { height: 4px; border-radius: 2px; background: #E3DACA; margin-top: 8px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; border-radius: 2px; background: var(--orange); }
.today-stats { display: none; margin-bottom: 24px; } /* desktop-only density row on Today */
.stat {
  background: var(--card); border-radius: 16px; padding: 12px; /* recessed tint — white+shadow stays reserved for cards */
  box-shadow: inset 0 0 0 1px var(--line); /* hairline lifts the tile off the cream ground */
  font-size: 11px; font-weight: 700; color: var(--ink2);
  text-transform: uppercase; letter-spacing: .04em; /* kicker label over a big value */
}
.stat b {
  display: block; font-size: 20px; color: var(--ink); font-weight: 800;
  text-transform: none; letter-spacing: -0.01em; margin-top: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* one line, always — no wrap jitter */
}
.stat b small { font-size: 13px; font-weight: 600; color: var(--ink2); }

/* ---------- workouts ---------- */
.seg {
  display: flex; background: #EDE6D8; border-radius: 999px; padding: 4px; margin-bottom: 20px;
}
.seg button {
  flex: 1; padding: 9px 0; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink2);
  transition: all .15s ease;
}
.seg button.on { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }

.wday {
  background: var(--white); border-radius: var(--r-card); box-shadow: var(--shadow-card);
  flex: 1; min-width: 0; overflow: hidden;
}
.wday summary {
  list-style: none; display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; cursor: pointer;
}
.wday summary::-webkit-details-marker { display: none; }
.wday .chev { margin-left: auto; align-self: center; transition: transform .2s ease; color: var(--ink2); }
.wday[open] .chev { transform: rotate(180deg); }
.wtitle { font-size: 17px; font-weight: 700; }
.wbadge {
  flex: 0 0 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px;
}
/* warm tinted squares behind the day emoji — home-1 thumbnail treatment */
.wbadge.t-orange { background: #FFE4CB; }
.wbadge.t-sky    { background: #DCEFF8; }
.wbadge.t-green  { background: #DEF0E3; }
.wbadge.t-grape  { background: #EAE5FA; }
.wbadge.t-cream  { background: #F6EEDC; }
/* dot centers on the summary badge: 18px card padding + 23px half-badge − 10px half-dot */
.tl-row:has(.wday) .tl-rail { align-items: flex-start; padding-top: 31px; }
.tl-row:has(.wday):first-child .tl-rail::before { top: 41px; }
.tl-row:has(.wday):last-child .tl-rail::before { bottom: calc(100% - 41px); }
.wlist { padding: 0 16px 16px; }
.wnote {
  display: flex; gap: 8px; align-items: flex-start;
  background: #FFF6E8; border-radius: 12px; padding: 10px 12px;
  font-size: 13px; font-weight: 600; color: #8A5A16; margin-bottom: 16px;
}
.wnote svg { flex: 0 0 auto; margin-top: calc((1.45em - 16px) / 2); } /* centered on the first text line */
.wtoday { color: var(--orange); font-weight: 700; }
.wday .card-meta svg { vertical-align: -1.5px; margin-right: 3px; }
.wgroup {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink2); margin-top: 20px; margin-bottom: 2px;
}
.wgroup:first-child { margin-top: 2px; }
.wrow {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 0;
  font-size: 15px; font-weight: 600;
}
.wrow + .wrow { border-top: 1px solid var(--line); }
.wrow .sets { color: var(--ink2); font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wrow .sub { display: block; font-size: 12px; color: var(--ink2); font-weight: 600; }
.wrow.aux { font-size: 13px; color: var(--ink2); }
.wtip {
  display: flex; gap: 8px; align-items: flex-start;
  background: #FBF7EE; border-radius: 10px; padding: 8px 12px; margin-top: 12px;
  font-size: 12.5px; font-weight: 600; color: var(--ink2);
}
.wtip svg { flex: 0 0 auto; margin-top: calc((1.45em - 16px) / 2); }
.wlist .btn { margin: 0 0 2px; } /* CTA sits first in the list, right under the summary */

/* ---------- you ---------- */
.avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 8px auto 12px;
  background: linear-gradient(135deg, #FF9D5C, #F26E21);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: #fff;
}
.you-name { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.you-chips { justify-content: center; margin-bottom: 26px; }
.you-chips .chip { background: var(--card); }
.panel {
  background: var(--card); border-radius: var(--r-card); padding: 18px;
  font-size: 14px; color: var(--ink2); margin-bottom: 14px;
}
.panel b { color: var(--ink); }
.linkrow {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border-radius: 16px; padding: 16px 18px;
  font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--line); margin-bottom: 10px;
  width: 100%;
}
.linkrow:hover { background: #FBF8F2; }

/* ---------- onboarding: about/target/activity/safety ---------- */
.seg-mini { margin-bottom: 16px; }
.seg-mini button { font-size: 13px; padding: 8px 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields .fld:first-child { grid-column: 1 / -1; }
.fld { display: block; font-size: 13px; font-weight: 700; color: var(--ink2); }
.fld .field { margin-top: 6px; }
.fld-warn { font-size: 13px; font-weight: 600; color: #A65317; background: #FBEDD9; border-radius: 12px; padding: 10px 14px; margin-top: 10px; }
.opt-tall { border-radius: 24px; }
.opt-sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink2); margin-top: 2px; }

.fld-head { display: flex; justify-content: space-between; align-items: center; }
.unit-toggle { display: inline-flex; background: #EDE6D8; border-radius: 999px; padding: 2px; }
.unit-toggle button { font-size: 12px; font-weight: 700; color: var(--ink2); padding: 3px 10px; border-radius: 999px; }
.unit-toggle button.on { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.ftin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.unit-hint { display: block; font-size: 12px; color: var(--ink2); margin-top: 5px; font-weight: 600; }
.styles-label { font-size: 14px; font-weight: 700; margin: 18px 0 10px; text-align: center; }
.styles-label small { color: var(--ink2); font-weight: 600; }
.style-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: var(--cta-gap); }
.schip {
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--white); box-shadow: inset 0 0 0 1px var(--line);
  transition: all .15s ease;
}
.schip:hover { background: #FBF8F2; }
.schip.on { background: var(--ink); color: #fff; box-shadow: none; }

/* ---------- exercise detail rows ---------- */
.exck { flex: 0 0 22px; width: 22px; height: 22px; margin-right: 10px; position: static; }
.exrow summary { list-style: none; cursor: pointer; }
.exrow summary::-webkit-details-marker { display: none; }
.exrow .sets { display: inline-flex; align-items: center; gap: 4px; }
.exrow .chev { width: 14px; height: 14px; transition: transform .2s ease; }
.exrow[open] .chev { transform: rotate(180deg); }
.exinfo { padding: 2px 0 14px; border-bottom: 1px solid var(--line); }
.exrow:last-of-type .exinfo { border-bottom: 0; }
.exwhy { font-size: 13.5px; color: var(--ink2); line-height: 1.5; margin-bottom: 8px; }
.exsteps { margin: 0 0 10px 18px; font-size: 13.5px; color: var(--ink); }
.exsteps li { margin-bottom: 3px; }
.exswap-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #EDF3FF; color: #0B4DB2; font-weight: 700; font-size: 13.5px;
  padding: 9px 16px; border-radius: 999px; margin-bottom: 12px;
  transition: background .15s, transform .12s;
}
.exswap-btn:hover { background: #DCE9FF; }
.exswap-btn:active { transform: scale(.96); }
.exvid { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
.exvid:hover { text-decoration: underline; }
.vtag {
  display: inline-flex; align-items: center; gap: 3px; vertical-align: 2px;
  margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  background: #EDF3FF; color: #0B4DB2;
}
.ytlite {
  position: relative; display: block; width: 100%; max-width: 340px;
  aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; padding: 0;
}
.ytlite img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ytlite .ytplay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.ytlite .ytplay svg { background: rgba(0,0,0,.65); border-radius: 50%; padding: 14px; width: 22px; height: 22px; transition: transform .15s ease; }
.ytlite:hover .ytplay svg { transform: scale(1.08); background: var(--blue); }
.ytframe { width: 100%; max-width: 340px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.ytframe iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- weight tracker ---------- */
.wpanel { background: var(--white); box-shadow: var(--shadow); }
.wpanel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.wpanel-head b { color: var(--ink); font-size: 15px; }
.wtrendnum { font-size: 20px; font-weight: 800; color: var(--ink); text-align: right; }
.wtrendnum small { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); }
.wchart { width: 100%; height: 96px; display: block; margin-bottom: 8px; }
.wnoise { font-size: 12px; color: var(--ink2); line-height: 1.45; margin-bottom: 12px; }
.wlog { display: flex; gap: 10px; }
.wlog .field { flex: 1; padding: 12px 16px; }
.wbtn { width: auto; padding: 12px 22px; font-size: 15px; }

/* the STRIDE acronym moment — each letter is a real feature */
.acro-kicker {
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); margin: 26px 0 12px;
}
.acro { display: flex; justify-content: center; gap: 4px; max-width: 400px; margin: 0 auto; }
.acro-cell { flex: 1; animation: rise .45s ease both; }
.acro-cell b {
  display: block; font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.1;
}
.acro-cell small {
  display: block; font-size: 9px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink2); margin-top: 3px;
}
.btn-skip { display: block; width: 100%; margin-top: 10px; padding: 14px; font-weight: 700; font-size: 15px; color: var(--ink2); border-radius: 999px; }
.btn-skip:hover { background: #F5F0E8; color: var(--ink); }
/* ---------- meal preferences ---------- */
.mealprefs { margin-bottom: 16px; background: var(--card); border-radius: 16px; }
.mealprefs summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.mealprefs summary::-webkit-details-marker { display: none; }
.mealprefs .chev { margin-left: auto; }
.mealprefs[open] .chev { transform: rotate(180deg); }
.mp-body { padding: 4px 16px 16px; }
.mp-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); margin: 12px 0 8px; }

/* ---------- progress grid ---------- */
.pgrid { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.pweek-label { font-size: 12.5px; font-weight: 700; color: var(--ink2); margin-bottom: 6px; }
.pweek-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pcell {
  position: relative; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--ink2); background: var(--card);
}
.pcell.done { background: var(--green); color: #fff; }
.pcell.done svg path { stroke: #fff; }
.pcell.today { box-shadow: inset 0 0 0 2px var(--orange); background: var(--white); }
.pcell.missed { background: #EFE8DB; }
.pcell.rest { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.pcell.future { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); opacity: .45; }
.pmeals { position: absolute; left: 15%; bottom: 5px; height: 3px; border-radius: 2px; background: var(--orange); }
.pcell.done .pmeals { background: rgba(255,255,255,.75); }
.btn-done { background: var(--green); }
.btn-done:hover { background: #37955A; }

.acct { background: var(--white); box-shadow: var(--shadow); }
.acct b { color: var(--ink); font-size: 15px; }
.acct-line { font-size: 13.5px; color: var(--ink2); margin: 6px 0 12px; }
.acct-ok { font-size: 13.5px; font-weight: 700; color: #256B3B; background: #EBF4EC; border-radius: 12px; padding: 10px 14px; }

/* ---------- water + extras + subs ---------- */
.water { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; }
.water-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); margin-right: 4px; }
.glass { color: #E3D9C8; padding: 3px; transition: color .15s, transform .12s; }
.glass.full { color: #4AA8D8; }
.glass:active { transform: scale(1.2); }
.water-count { font-size: 12.5px; font-weight: 700; color: var(--ink2); margin-left: 4px; }
.extra-row { display: flex; justify-content: space-between; align-items: center; background: var(--white);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; font-weight: 600; font-size: 14.5px; }
.extra-row small { color: var(--ink2); font-weight: 600; margin-left: 6px; }
.extra-row button { color: var(--ink2); font-size: 13px; padding: 4px 8px; }
.extra-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; }
.extra-form .field { padding: 11px 12px; font-size: 14px; }
.extra-form .wbtn { padding: 11px 16px; font-size: 14px; }
@media (max-width: 480px) { .extra-form { grid-template-columns: 1fr 1fr; } .extra-form #exName { grid-column: 1 / -1; } }
.subs { display: flex; flex-direction: column; gap: 6px; }
.sub-row { font-size: 13px; color: var(--ink2); }
.sub-row b { color: var(--ink); }
.exlift { font-size: 13px; font-weight: 700; color: #0B4DB2; background: #EDF3FF; border-radius: 10px; padding: 7px 12px; margin-bottom: 8px; display: inline-block; }

/* ---------- workout player ---------- */
.player { background: #0E0D0C; color: #FAF6F0; min-height: 100dvh; display: flex; flex-direction: column; }
.player .pl-x { position: absolute; top: 14px; left: 14px; width: 44px; height: 44px; border-radius: 50%;
  color: rgba(250,246,240,.7); font-size: 18px; z-index: 2; }
.player .pl-x:hover { background: rgba(255,255,255,.08); }
.pl-dots { display: flex; gap: 6px; justify-content: center; padding: 26px 60px 0; }
.pl-dots i { width: 26px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); }
.pl-dots i.past { background: var(--green); }
.pl-dots i.now { background: #FFC93E; }
.pl-body { flex: 1; display: flex; flex-direction: column; padding: 30px 28px calc(28px + env(safe-area-inset-bottom, 0px));
  max-width: 460px; margin: 0 auto; width: 100%; }
.pl-center { align-items: center; justify-content: center; text-align: center; gap: 10px; }
.pl-kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #FFC93E; margin-bottom: 8px; }
.pl-name { font-size: clamp(26px, 7vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 6px; }
.pl-sets { font-size: 15px; font-weight: 700; color: rgba(250,246,240,.75); margin-bottom: 10px; }
.pl-timer { font-size: clamp(56px, 18vw, 84px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 6px 0 10px; }
.pl-rest .pl-timer { color: #8FCB9F; }
.pl-steps { margin: 0 0 16px 18px; font-size: 14px; color: rgba(250,246,240,.72); }
.pl-steps li { margin-bottom: 4px; }
.pl-controls { margin-top: auto; display: flex; gap: 12px; align-items: center; }
.pl-skip { flex: 0 0 auto; color: rgba(250,246,240,.75); font-weight: 700; font-size: 16px; padding: 14px 20px; border-radius: 999px; }
.pl-skip:hover { background: rgba(255,255,255,.08); }
.pl-done { flex: 1; }
.pl-ghost { background: transparent; color: rgba(250,246,240,.85); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); max-width: 220px; }
.pl-sub { font-size: 15px; color: rgba(250,246,240,.75); }
.pl-sub b { color: #FAF6F0; }

/* set logger — the number IS the screen (Pushr grammar) */
.pl-name-sm { font-size: clamp(20px, 5.5vw, 26px); margin-bottom: 14px; }
/* kg and reps sit side by side, one divider between (Jimmy's redesign ref 2026-08-10) */
.pl-nums { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 4px; }
.pl-numgrp { display: flex; align-items: center; gap: 8px; }
.pl-divider { width: 1px; height: 46px; flex-shrink: 0; margin: 0 2px; background: rgba(255,255,255,.16); }
.pl-num { text-align: center; min-width: 62px; }
.pl-num b { display: block; font-size: clamp(30px, 9vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pl-num small { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(250,246,240,.5); }
.pl-step { width: 44px; height: 44px; border-radius: 50%; font-size: 22px; font-weight: 700; flex-shrink: 0;
  background: rgba(255,255,255,.09); color: #FAF6F0; transition: background .15s, transform .12s; }
.pl-step:hover { background: rgba(255,255,255,.16); }
.pl-step:active { transform: scale(.92); }

/* countdown dial — arc drains on rest, sweeps a 60s lap while working */
.pl-ring { position: relative; width: min(58vw, 232px); aspect-ratio: 1; margin: 10px auto 6px; flex-shrink: 0; }
.pl-ringsvg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.pl-ringbg, .pl-ringfg { fill: none; stroke-width: 9; stroke-linecap: round; }
.pl-ringbg { stroke: rgba(255,255,255,.09); }
.pl-ringfg { stroke: #FFB21E; transition: stroke-dashoffset .95s linear; }
.pl-rest .pl-ringfg { stroke: #8FCB9F; } /* recovery reads green, as the old rest timer did */
.pl-ringin { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; }
.pl-ringin .pl-pausebtn { width: 38px; height: 38px; font-size: 12px; letter-spacing: 1px; background: transparent;
  color: #FFB21E; box-shadow: inset 0 0 0 1.5px rgba(255,178,30,.55); }
.pl-ringin .pl-pausebtn:hover { background: rgba(255,178,30,.12); }
.pl-plates { text-align: center; font-size: 13.5px; font-weight: 700; color: #FFC93E; margin: 8px 0 0; }
.pl-pills { display: flex; gap: 8px; justify-content: center; margin: 16px 0 12px; }
.pl-pill { background: rgba(255,255,255,.09); border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 700;
  color: rgba(250,246,240,.8); font-variant-numeric: tabular-nums; }
.pl-prband { background: #FFC93E; color: #2B2822; font-weight: 800; font-size: 15px; border-radius: 999px;
  padding: 10px 22px; margin-bottom: 14px; animation: rise .4s ease both; }
.pl-receipt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin: 10px 0 18px; }
.pl-receipt div { text-align: center; }
.pl-receipt b { display: block; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pl-receipt small { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(250,246,240,.55); }
/* ready countdown + pause + in-player video */
.pl-readyscr { cursor: pointer; }
.pl-ready-num { font-size: clamp(140px, 45vw, 220px); font-weight: 800; line-height: 1; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; animation: rise .3s ease both; }
.pl-session { font-size: clamp(46px, 15vw, 64px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-align: center; line-height: 1; }
.pl-session.paused, .pl-timer.paused { color: #FFC93E; font-size: 22px; letter-spacing: .1em; }
.pl-yt { margin: 4px auto 8px; max-width: 220px; }
.pl-cue { font-size: 13.5px; color: rgba(250,246,240,.72); margin: -6px 0 10px; line-height: 1.45; }
.pl-howlink { color: #FFC93E; font-weight: 700; font-size: 13px; text-decoration: underline; padding: 2px 4px; }
.pl-steps-inline { background: rgba(255,255,255,.06); border-radius: 14px; padding: 12px 12px 12px 30px; margin-bottom: 12px; }
/* circular demo — frames are opaque white art, so the disc is cream, not the ref's dark */
.pl-anim { display: block; width: min(46vw, 186px); aspect-ratio: 1; margin: 2px auto 4px; object-fit: contain;
  background: #FAF6F0; border-radius: 50%; padding: 6px; }
.pl-watchrow { text-align: center; margin: 0 0 10px; }
.pl-vidwide { max-width: none; margin: 0 0 14px; flex-shrink: 0; }
.pl-namerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pl-namerow .pl-name-sm { margin-bottom: 0; }
/* outlined on the near-black ground — the filled chip glared */
.pl-swapbtn { font-size: 12px; font-weight: 600; padding: 6px 13px; gap: 5px; margin: 0; flex-shrink: 0;
  background: transparent; color: #5C9DFF; box-shadow: inset 0 0 0 1.3px rgba(92,157,255,.5); }
.pl-swapbtn:hover { background: rgba(92,157,255,.12); }
.exinfo .exswap-btn { display: flex; width: fit-content; margin: 12px auto 4px; }
/* quick log: name first, numbers only once we have something to show */
.extra-form .field.xl { flex: 1 1 100%; }
.extra-nums { display: none; gap: 8px; margin-top: 8px; }
.extra-nums.open { display: flex; }
.extra-nums label { flex: 1; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink2); display: flex; flex-direction: column; gap: 4px; }
.extra-nums .field { width: 100%; }
.hint.ex-busy { color: var(--ink2); font-style: italic; }
.hint.ex-ok { color: #2F7D4A; }
.hint.ex-manual { color: #A8560F; }

.cond-row { margin-top: 10px; }
.cond-hint { text-align: left !important; margin-top: 6px; }

/* portion correction — hidden until the meal is ticked, so an untouched plan stays clean */
.portions { display: none; align-items: center; gap: 4px; margin-top: 9px; }
.card.eaten .portions { display: flex; }
.pz {
  flex: 1 1 0; min-width: 0; padding: 5px 2px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--bg); color: var(--ink2); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .12s, color .12s;
}
.pz:hover { background: #F1EADC; }
.pz.on { background: var(--ink); color: #FAF6F0; box-shadow: none; }

.spark-wrap { margin: 4px 0 12px; }
.spark { width: 100%; max-width: 240px; height: 44px; display: block; }
.spark-label { font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.spark-label b { color: var(--ink); }

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  :root { --font-display: 3.25rem; }
  .page { max-width: 640px; padding-top: 48px; }
  .greet { font-size: 16px; }
  .page-title { font-size: 36px; } /* title outranks the 20px stat numerals — desktop scale, not a centered phone */
  /* centre the column in the content area right of the 200px rail, not the viewport */
  .screen:has(.tabbar) { padding-left: 200px; }
  .today-stats { display: grid; }
  .tabbar {
    left: 0; right: auto; top: 0; bottom: 0; width: 200px;
    flex-direction: column; justify-content: flex-start; gap: 6px;
    border-top: 0; border-right: 1px solid var(--line);
    padding: 96px 16px 16px;
  }
  .tab { flex-direction: row; gap: 12px; font-size: 14px; padding: 12px 16px; width: 100%; justify-content: flex-start; }
  .tab.on { background: var(--card); box-shadow: inset 3px 0 0 var(--blue); }
  .tabbar::before {
    content: 'stride'; position: absolute; top: 32px; left: 32px;
    font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
  }
  /* compact week-progress block under the nav — the rail earns its column */
  .rail-week {
    display: block; margin: 20px 4px 0; padding: 14px;
    background: var(--card); border-radius: 14px;
  }
  .rail-week-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--ink2);
  }
  .rail-week-dots { display: flex; gap: 5px; margin: 10px 0 8px; }
  .rail-week-dots i { width: 12px; height: 12px; border-radius: 50%; background: #E3DACA; }
  .rail-week-dots i.done { background: var(--green); }
  .rail-week-dots i.now { background: var(--orange); }
  .rail-week-sub { font-size: 13px; font-weight: 700; color: var(--ink); }
  /* profile row anchors the rail's bottom — the void between links and floor gets a job */
  .rail-profile {
    display: flex; align-items: center; gap: 10px; margin-top: auto;
    width: 100%; padding: 10px 12px; border-radius: 14px;
    font-size: 14px; font-weight: 700; color: var(--ink); justify-content: flex-start;
    position: relative;
  }
  .rail-profile::before { /* hairline divider above the avatar row */
    content: ''; position: absolute; top: -8px; left: 4px; right: 4px;
    height: 1px; background: var(--line);
  }
  .rail-profile:hover { background: var(--card); }
  .rail-avatar {
    flex: 0 0 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #FF9D5C, #F26E21); color: #fff;
    display: grid; place-items: center; font-size: 14px; font-weight: 800;
  }
  /* onboarding composed like onb-10: taller horizon, bigger sun peeking over the curve,
     real floor under the CTA instead of it kissing the viewport edge */
  .sheet { border-radius: 0; padding: 56px var(--pad) 64px; }
  .onb { --onb-hero-h: clamp(220px, 28dvh, 270px); }
  .onb-top .orb { width: 148px; height: 148px; bottom: 8px; } /* same clear-of-the-curve crest at desktop scale */
  .q-title { font-size: 28px; }
  /* The hero art is portrait 900x1350 (sky, mascot, white dome). Full-bleed `cover` on a wide
     desktop box scales it to ~1600x2400 anchored bottom, so ONLY the white dome shows and the
     screen reads as a blank page. Constrain welcome to a centred column so the art keeps its
     composition, and shorten the hero so the sign-in link clears the fold. */
  .welcome { max-width: 560px; margin: 0 auto; }
  .welcome-hero { height: 40vh; }
  .welcome-hero .orb { width: 216px; height: 216px; }
  .ready .welcome-hero .orb { width: 140px; height: 140px; } /* orb + 60px rings stay above the dome apex */
  /* full-bleed dome: one continuous horizon edge to edge, no straight-side tangent kinks at 1440 */
  .welcome-curve { height: 180px; }
  .ready .welcome-curve { height: 150px; width: 880px; max-width: 100%; } /* ready's rings are sized against this arc */
  /* desktop onboarding: CTA sits under the content, not pushed to the viewport bottom */
  .sheet-inner { flex: 0 0 auto; justify-content: flex-start; }
  .welcome:not(.ready) .welcome-sheet-inner { flex: 0 0 auto; } /* ready keeps flex:1 for its middle band */
  .welcome-footer { margin-top: 44px; } /* subhead-to-CTA gap proportional to mobile, not a viewport-tall void */
  .ready .welcome-hero { height: 46vh; }
}

.meal .card-meta { white-space: normal; }

.meta-wrap { white-space: normal !important; }

/* ---------- ask for a session (AI session builder) ---------- */
.askp { padding: 16px 16px 18px; }
.askp-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.askp-head small { font-size: 12px; font-weight: 600; color: var(--ink2); line-height: 1.4; }
.askrow { display: flex; gap: 10px; }
.askrow .field { flex: 1; padding: 12px 14px; min-width: 0; }
.askbtn { width: auto; padding: 12px 20px; font-size: 15px; flex: 0 0 auto; }
.askbtn[disabled] { opacity: .55; }
.askchips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.askchip {
  border: 1px solid var(--line); background: transparent; color: var(--ink2);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.askchip:hover { border-color: var(--ink2); color: var(--ink); }
.askerr { font-size: 13px; color: #B3261E; margin-top: 10px; line-height: 1.45; }
.asksess { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.asksess-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.askmins { font-size: 12px; font-weight: 700; color: var(--ink2); flex: 0 0 auto; }
.asknote { font-size: 13px; color: var(--ink2); line-height: 1.5; margin-top: 5px; }
.asklist { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.asklist li { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.asklist li span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.askacts { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.askstart { width: auto; padding: 12px 22px; font-size: 15px; }

/* sign-in escape hatch on the name step — the landing CTA skips the welcome screen */
.onb-signin { margin-top: 6px; font-size: 14.5px; }
