/* REMANSO. One design system: every size, space, corner, colour, shadow and movement on any screen comes from
   the tokens below, so the app reads as one thing. The colours follow the member's day (look A, "Greek light"):
   light from when they get up, dark from the wind-down, with a sky at the top of every screen that drifts very
   slowly. Cards are soft and coloured by the hour; each screen still has one main thing. Progress is always a thin
   level line (still water), never a ring: rings are a wearable's look, and nothing here rates the member's day.
   Calm visuals (remanso.look) and Reduce Motion stop everything that drifts, breathes or bursts. */
/* The typefaces (NEXT-16, 1 and 10): the iPhone's own (SF Pro, through the system font stack) for everything people read
   and tap; Newsreader, carried in the app (D17), for titles, greetings and the numbers that matter. */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/f/newsreader.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 200 800; font-display: swap; src: url('/f/newsreader-italic.woff2') format('woff2'); }
:root {
  --font-display: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Type (NEXT-16, 1; docs/DESIGN-SYSTEM.md): the iPhone's own scale, at the standard text size.
     Text: footnote 13, subheadline 15 (second lines), body 17 (a headline is the body at 600).
     Display: title 3 22 (a thing's name), title 28 (a section or a sheet), large title 34 (every page), the one
     very large number a screen may have (a running clock), and a figure on a card (34, as a large title).
     All in rem, so the app's Text size setting scales every one of them. Nothing else is used. */
  --t-1: 0.8125rem; --t-2: 0.9375rem; --t-3: 1.0625rem;
  /* Round 2: 11, for the tab bar's labels, as iOS does (Alex, 26 Nov 2026); since Today, alive (28 Nov 2026), also the
     unit inside one of Today's arcs, as the lab draws it. Nothing else uses it. */
  --t-0: 0.6875rem;
  --d-1: 1.375rem; --d-2: 1.75rem; --d-3: 2.125rem; --d-4: clamp(4.5rem, 3rem + 10vw, 5.5rem);
  --d-5: 2.125rem;
  /* Today, alive (28 Nov 2026): 19, the lab's size for a long figure inside an arc (the night's "7 h 20") and the one
     plain line under This week. Nothing else uses it. */
  --d-0: 1.1875rem;

  /* Space: an 8-point grid, with 4-point half steps (4 and 12) for tight places. */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 48px; --s-10: 64px; --s-11: 96px;

  /* Corners: small parts; everything that can be tapped; cards; sheets; and fully round. */
  --r-1: 6px; --r-2: 12px; --r-3: 20px; --r-4: 28px; --r-pill: 999px;

  /* Sizes that fingers need: a control is 50 high, and nothing that can be tapped answers to less than 44. */
  --ctl: 50px; --tap: 44px;
  /* The side margin is 16, as in Apple's own apps. */
  --gutter: 16px; --tabs-h: 52px; --kb: 0px;

  /* Movement: one curve that settles like still water, and four lengths. Transform and opacity only. */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* A spring: screens and sheets arrive, go a touch past, and settle. Still transform and opacity only. */
  --spring: cubic-bezier(0.34, 1.32, 0.64, 1);
  /* Alex's iPhone check of the craft round (23 Nov 2026): sheets and screens stuttered on his iPhone. They now glide on
     the curve of an iPhone's own sheets, a plain curve every phone runs on its graphics chip; the drawn spring above
     (linear()) may be worked out frame by frame on an iPhone instead. The spring stays for small, short things. */
  --glide: cubic-bezier(0.32, 0.72, 0, 1);
  /* How long a spring takes to settle, and how long a fade takes when movement is turned off. */
  --m-spring: 0.32s; --m-fade: 0.16s; --m-open: 0.28s;
  /* Round 2 (docs/DESIGN-DIRECTION.md): everyday movement takes 200 to 350 ms; only the three signature moments are
     longer: opening the app and saving (--m-sign), and a personal best (--m-best). */
  --m-sign: 0.42s; --m-best: 0.6s;
  --m-press: 0.1s; --m-quick: 0.2s; --m-move: 0.3s; --m-draw: 0.35s;

  /* Colour: the colours of the hour (look A, "Greek light", Alex, 16 Nov 2026). One palette for each part of the
     member's own day: dawn, day and golden hour are light; the evening (from the wind-down to lights out) and night
     are dark. The app sets data-phase on the page from the member's own times (M.lookPhase, and their choice of
     Automatic, Light or Dark). With none set, the evening's warm ink.
     Round 2 (docs/DESIGN-DIRECTION.md, approved by Alex on his iPhone, 26 Nov 2026): ivory paper by day (#F3EEE4),
     warm ink at night (#121110). The ground and the cards never change with the hour; only the top light (sky-1)
     does. No gold, no navy, no blue accent: the one main action is the inverse button (ink on ivory, ivory on ink).
     tile: the colour of a card. cta: the one main button. fill: a level line. label: a card's small heading.
     chip: a chip that stands out. sky-1 to sky-3: the sky behind the top of a screen, from the top down.
     sun: the soft light in the sky's corner. glow: a finished moment's burst. shine: the shimmer while waiting.
     Every text colour is at least 4.5 to 1 against what it sits on, the sky included (a logic test checks). */
  --bg: #121110; --surface: #24211D; --tile: #1C1A17; --ink: #F3EEE4; --ink-2: #B8B1A4; --line: #3A3632;
  --hair: #322F2C; --accent: #F3EEE4; --on-accent: #121110; --notice: #1C1A17; --track: #322F2C; --field: #7A7469;
  --cta: #F3EEE4; --on-cta: #121110; --fill: #F3EEE4; --label: #958E82; --chip: #1C1A17; --on-chip: #F3EEE4;
  --chip-edge: #3A3632; --sky-1: #2A2622; --sky-2: #1A1816; --sky-3: #121110; --toast-bg: #F3EEE4; --toast-ink: #121110;
  --toast-accent: #121110; --scrim: rgba(0, 0, 0, 0.5); --bar: rgba(18, 17, 16, 0.92); --sun: rgba(243, 238, 228, 0.05);
  --glow: rgba(243, 238, 228, 0.15); --shine: rgba(243, 238, 228, 0.06); --edge: inset 0 0 0 1px #322F2C, inset 0 1px 0 rgba(243, 238, 228, 0.06);
  --lift: 0 0 0 0 rgba(0, 0, 0, 0); --lift-press: 0 0 0 0 rgba(0, 0, 0, 0); --float: 0 -8px 32px rgba(0, 0, 0, 0.25);
  --sky: radial-gradient(120% 70% at 50% 0%, var(--sky-1) 0%, rgba(18, 17, 16, 0) 72%);
  --tone: rgba(243, 238, 228, 0.07);
  --dot-gym: #FF9A80; --dot-food: #FFB25C; --dot-water: #74B6FF; --dot-tasks: #5CE0CF; --dot-off: #AE9BFF;
  color-scheme: dark;
}
:root[data-phase="dawn"] {
  --bg: #F3EEE4; --surface: #FFFDF8; --tile: #FBF8F1; --ink: #121110; --ink-2: #5C564D; --line: #DDD7CC;
  --hair: #E8E6DF; --accent: #121110; --on-accent: #F3EEE4; --notice: #FBF8F1; --track: #E6E0D5; --field: #8F887C;
  --cta: #121110; --on-cta: #F3EEE4; --fill: #121110; --label: #6B645A; --chip: #FBF8F1; --on-chip: #121110;
  --chip-edge: #DDD7CC; --sky-1: #FBF1EA; --sky-2: #F7F3EA; --sky-3: #F3EEE4; --toast-bg: #121110; --toast-ink: #F3EEE4;
  --toast-accent: #F3EEE4; --scrim: rgba(18, 17, 16, 0.28); --bar: rgba(243, 238, 228, 0.92); --sun: rgba(255, 253, 248, 0.6);
  --glow: rgba(18, 17, 16, 0.08); --shine: rgba(255, 255, 255, 0.55); --edge: inset 0 0 0 1px rgba(18, 17, 16, 0.03);
  --lift: 0 1px 2px rgba(18, 17, 16, 0.04), 0 8px 24px rgba(18, 17, 16, 0.06); --lift-press: 0 1px 2px rgba(18, 17, 16, 0.05), 0 4px 12px rgba(18, 17, 16, 0.06); --float: 0 -8px 32px rgba(0, 0, 0, 0.12);
  --sky: radial-gradient(120% 70% at 50% 0%, var(--sky-1) 0%, rgba(243, 238, 228, 0) 72%);
  --tone: rgba(18, 17, 16, 0.055);
  --dot-gym: #A84420; --dot-food: #A04A00; --dot-water: #1257D6; --dot-tasks: #07766B; --dot-off: #4D31E0;
  color-scheme: light;
}
:root[data-phase="day"] {
  --bg: #F3EEE4; --surface: #FFFDF8; --tile: #FBF8F1; --ink: #121110; --ink-2: #5C564D; --line: #DDD7CC;
  --hair: #E8E6DF; --accent: #121110; --on-accent: #F3EEE4; --notice: #FBF8F1; --track: #E6E0D5; --field: #8F887C;
  --cta: #121110; --on-cta: #F3EEE4; --fill: #121110; --label: #6B645A; --chip: #FBF8F1; --on-chip: #121110;
  --chip-edge: #DDD7CC; --sky-1: #FBF8F1; --sky-2: #F7F3EA; --sky-3: #F3EEE4; --toast-bg: #121110; --toast-ink: #F3EEE4;
  --toast-accent: #F3EEE4; --scrim: rgba(18, 17, 16, 0.28); --bar: rgba(243, 238, 228, 0.92); --sun: rgba(255, 253, 248, 0.6);
  --glow: rgba(18, 17, 16, 0.08); --shine: rgba(255, 255, 255, 0.55); --edge: inset 0 0 0 1px rgba(18, 17, 16, 0.03);
  --lift: 0 1px 2px rgba(18, 17, 16, 0.04), 0 8px 24px rgba(18, 17, 16, 0.06); --lift-press: 0 1px 2px rgba(18, 17, 16, 0.05), 0 4px 12px rgba(18, 17, 16, 0.06); --float: 0 -8px 32px rgba(0, 0, 0, 0.12);
  --sky: radial-gradient(120% 70% at 50% 0%, var(--sky-1) 0%, rgba(243, 238, 228, 0) 72%);
  --tone: rgba(18, 17, 16, 0.055);
  --dot-gym: #A84420; --dot-food: #A04A00; --dot-water: #1257D6; --dot-tasks: #07766B; --dot-off: #4D31E0;
  color-scheme: light;
}
:root[data-phase="golden"] {
  --bg: #F3EEE4; --surface: #FFFDF8; --tile: #FBF8F1; --ink: #121110; --ink-2: #5C564D; --line: #DDD7CC;
  --hair: #E8E6DF; --accent: #121110; --on-accent: #F3EEE4; --notice: #FBF8F1; --track: #E6E0D5; --field: #8F887C;
  --cta: #121110; --on-cta: #F3EEE4; --fill: #121110; --label: #6B645A; --chip: #FBF8F1; --on-chip: #121110;
  --chip-edge: #DDD7CC; --sky-1: #FBF3E2; --sky-2: #F7F3EA; --sky-3: #F3EEE4; --toast-bg: #121110; --toast-ink: #F3EEE4;
  --toast-accent: #F3EEE4; --scrim: rgba(18, 17, 16, 0.28); --bar: rgba(243, 238, 228, 0.92); --sun: rgba(255, 253, 248, 0.6);
  --glow: rgba(18, 17, 16, 0.08); --shine: rgba(255, 255, 255, 0.55); --edge: inset 0 0 0 1px rgba(18, 17, 16, 0.03);
  --lift: 0 1px 2px rgba(18, 17, 16, 0.04), 0 8px 24px rgba(18, 17, 16, 0.06); --lift-press: 0 1px 2px rgba(18, 17, 16, 0.05), 0 4px 12px rgba(18, 17, 16, 0.06); --float: 0 -8px 32px rgba(0, 0, 0, 0.12);
  --sky: radial-gradient(120% 70% at 50% 0%, var(--sky-1) 0%, rgba(243, 238, 228, 0) 72%);
  --tone: rgba(18, 17, 16, 0.055);
  --dot-gym: #A84420; --dot-food: #A04A00; --dot-water: #1257D6; --dot-tasks: #07766B; --dot-off: #4D31E0;
  color-scheme: light;
}
:root[data-phase="night"] {
  --bg: #121110; --surface: #24211D; --tile: #1C1A17; --ink: #F3EEE4; --ink-2: #B8B1A4; --line: #3A3632;
  --hair: #322F2C; --accent: #F3EEE4; --on-accent: #121110; --notice: #1C1A17; --track: #322F2C; --field: #7A7469;
  --cta: #F3EEE4; --on-cta: #121110; --fill: #F3EEE4; --label: #958E82; --chip: #1C1A17; --on-chip: #F3EEE4;
  --chip-edge: #3A3632; --sky-1: #1F1D1B; --sky-2: #161513; --sky-3: #121110; --toast-bg: #F3EEE4; --toast-ink: #121110;
  --toast-accent: #121110; --scrim: rgba(0, 0, 0, 0.5); --bar: rgba(18, 17, 16, 0.92); --sun: rgba(243, 238, 228, 0.05);
  --glow: rgba(243, 238, 228, 0.15); --shine: rgba(243, 238, 228, 0.06); --edge: inset 0 0 0 1px #322F2C, inset 0 1px 0 rgba(243, 238, 228, 0.06);
  --lift: 0 0 0 0 rgba(0, 0, 0, 0); --lift-press: 0 0 0 0 rgba(0, 0, 0, 0); --float: 0 -8px 32px rgba(0, 0, 0, 0.25);
  --sky: radial-gradient(120% 70% at 50% 0%, var(--sky-1) 0%, rgba(18, 17, 16, 0) 72%);
  --tone: rgba(243, 238, 228, 0.07);
  --dot-gym: #FF9A80; --dot-food: #FFB25C; --dot-water: #74B6FF; --dot-tasks: #5CE0CF; --dot-off: #AE9BFF;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 var(--t-3)/1.47 var(--font-text); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
/* A tap is a tap: no double-tap zoom, no text selected or menu opened by a long press on a control. */
button, a, input, select, textarea, label, summary { touch-action: manipulation; }
button, summary { cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { display: block; flex: none; }

/* ---------- frame ---------- */
.status-strip { position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 30; }
/* The sky: a soft gradient in the hour's colours behind the top of every screen, and a light in its corner. The
   layer is wider than the screen and slides very slowly from side to side (transform only); words over it are
   tested against its colours. */
.shell { position: relative; z-index: 0; }
.shell::before { content: ''; position: absolute; z-index: -1; top: 0; left: -8%; width: 116%; height: 240px; background: var(--sky); pointer-events: none; animation: sky-drift 40s ease-in-out infinite alternate; }
.shell::after { content: ''; position: absolute; z-index: -1; top: -60px; right: -40px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, var(--sun), transparent); pointer-events: none; animation: sun-breathe 7s ease-in-out infinite alternate; }
:root[data-view="today"] .shell::before, :root[data-view="gate"] .shell::before { height: 380px; }
@keyframes sky-drift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
@keyframes sun-breathe { from { opacity: 0.55; } to { opacity: 1; } }
.shell { max-width: 30rem; margin: 0 auto; padding: calc(var(--s-3) + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(var(--tabs-h) + var(--s-8) + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); overflow-x: clip; }
.shell-plain { padding-bottom: var(--s-9); }
.top { display: flex; align-items: center; justify-content: space-between; min-height: var(--tap); margin-bottom: var(--s-4); }
.wordmark { font-family: var(--font-display); font-size: var(--d-1); letter-spacing: 0.24em; color: var(--ink); text-decoration: none; }
.top-actions { display: flex; align-items: center; gap: var(--s-2); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); }
.icon-btn.round { border: 1px solid var(--line); color: var(--ink); }
.icon-btn.round-small { background: var(--bg); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.pill { position: relative; border: 1px solid var(--accent); border-radius: var(--r-pill); background: transparent; color: var(--accent); padding: var(--s-2) var(--s-3); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
/* You: a labelled button in the corner, so settings, goals, progress and backup are easy to find. */
.you-btn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-4) 0 var(--s-3); border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; color: var(--ink); font-size: var(--t-2); }
.you-btn .icon { color: var(--accent); }

.noteb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-2); background: var(--notice); font-size: var(--t-2); }
.noteb-text { flex: 1 1 100%; color: var(--ink-2); font-size: var(--t-2); }
/* Sixteen-point text in every field: anything smaller makes an iPhone zoom the page when the field is tapped. */
.noteb-select { flex: 1; min-width: 0; min-height: var(--tap); border: 1px solid var(--field); border-radius: var(--r-1); background: var(--bg); padding: var(--s-2) var(--s-2); font-size: var(--t-3); }
.noteb-reminder { justify-content: space-between; border: 1px solid var(--accent); }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 0 max(var(--s-2), env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(var(--s-2), env(safe-area-inset-left, 0px)); background: var(--bg); border-top: 1px solid var(--hair); }
/* The page shows faintly through the bar as it scrolls underneath, where the phone can do that cheaply. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tabs { background: var(--bar); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); }
  .sheet { background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(24px); backdrop-filter: saturate(1.6) blur(24px); }
  .toast { -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); }
}
.tab { flex: 1 1 0; max-width: 6rem; min-height: var(--tabs-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-1); padding: var(--s-2) 2px var(--s-2); border: 0; background: transparent; color: var(--ink-2); font-size: var(--t-1); letter-spacing: 0.02em; position: relative; }
.tab[aria-current="page"] { color: var(--accent); }
/* One marker that slides to the tab you are on. */
.tab-ink { position: absolute; top: -1px; left: 0; width: 22px; height: 2px; border-radius: 2px; background: var(--accent); opacity: 0; pointer-events: none; }
.tab-ink.is-placed { opacity: 1; transition: transform 0.32s var(--ease); }

/* ---------- type ---------- */
.display { font-family: var(--font-display); font-weight: 400; font-size: var(--d-3); line-height: 1.04; letter-spacing: -0.01em; margin: 2px 0 var(--s-3); text-wrap: balance; }
.date { color: var(--ink-2); font-size: var(--t-2); }
.lede { color: var(--ink-2); font-size: var(--t-3); font-weight: 300; line-height: 1.45; margin: 0 0 var(--s-5); max-width: 34ch; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-2); line-height: 1.45; }
.done { color: var(--accent); font-family: var(--font-display); font-size: var(--d-1); margin-top: var(--s-3); }
.notice { background: var(--notice); border-radius: var(--r-2); padding: var(--s-3) var(--s-4); font-size: var(--t-2); margin: 0 0 var(--s-4); }
.form-error { color: var(--ink); background: var(--notice); border-left: 2px solid var(--accent); border-radius: 0 var(--r-1) var(--r-1) 0; padding: var(--s-2) var(--s-3); font-size: var(--t-2); }

/* ---------- buttons, links, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--ctl); padding: var(--s-2) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-2); background: transparent; color: var(--ink); font-size: var(--t-3); font-weight: 500; text-align: center; }
.btn-primary { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.btn-quiet { border-color: transparent; color: var(--ink-2); }
.btn-wide { width: 100%; }
.btn-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); margin-top: var(--s-3); }
.btn-row .btn:only-child { grid-column: 1 / -1; }
.btn-small { min-height: var(--tap); padding: var(--s-2) var(--s-4); font-size: var(--t-2); }
.btn-danger { border-color: var(--ink); color: var(--ink); }
.btn.is-armed { border-color: var(--ink); color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: default; }
.link { position: relative; border: 0; background: none; padding: var(--s-2) 0; min-height: var(--tap); color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: var(--t-2); }
.link-quiet { color: var(--ink-2); display: block; }
.back { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--tap); margin: calc(var(--s-2) * -1) 0 var(--s-1) calc(var(--s-1) * -1); padding: 0 var(--s-2) 0 0; border: 0; background: none; color: var(--ink-2); font-size: var(--t-2); }
.stack { display: grid; gap: var(--s-3); margin: 0 0 var(--s-4); }
.chips { display: flex; gap: var(--s-2); overflow-x: auto; margin: 0 0 var(--s-1); padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips-wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; max-width: 100%; min-height: var(--tap); padding: var(--s-2) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; font-size: var(--t-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
.tag { flex: none; border: 1px solid var(--line); border-radius: var(--r-pill); padding: var(--s-1) var(--s-2); font-size: var(--t-1); color: var(--ink-2); white-space: nowrap; }
.confirm { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.confirm .btn { flex: 1 1 auto; }

/* ---------- first screen ---------- */
.gate { padding-top: 0; }
.mark { color: var(--accent); margin: 0 0 var(--s-3) calc(var(--s-2) * -1); }
.mark .water { stroke-dasharray: 60; stroke-dashoffset: 60; animation: settle 1.1s ease-out forwards; }
.mark .w2 { animation-delay: 0.18s; }
.mark .w3 { animation-delay: 0.36s; }
@keyframes settle { to { stroke-dashoffset: 0; } }
.tagline { font-family: var(--font-display); font-style: italic; font-size: var(--d-1); color: var(--ink-2); margin-bottom: var(--s-2); }
.gate-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); margin: var(--s-1) 0 var(--s-3); }

/* The first run: four slides side by side in a strip that snaps, so a finger can drag between them. */
.intro { display: flex; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); }
.intro::-webkit-scrollbar { display: none; }
.intro-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; padding: 0 var(--gutter) var(--s-6); }
.intro-step { color: var(--accent); font-size: var(--t-2); letter-spacing: 0.08em; text-transform: uppercase; margin: var(--s-2) 0 var(--s-2); }
.intro-slide .display:focus { outline: none; }
.intro-bed { margin-bottom: var(--s-5); }
.intro-anchors { margin-bottom: var(--s-4); }
.intro-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: grid; gap: var(--s-3); max-width: 30rem; margin: 0 auto; padding: var(--s-3) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(var(--s-4) + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); background: var(--bg); border-top: 1px solid var(--hair); }
.intro-dots { display: flex; justify-content: center; gap: var(--s-2); }
.intro-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: transform var(--m-quick) var(--ease), background-color 0.15s ease; }
.intro-dots i.is-on { background: var(--accent); transform: scale(1.5); }
.intro-acts { display: flex; gap: var(--s-3); }
.intro-acts .btn-primary { flex: 1 1 auto; }
.top-skip { padding: 0 var(--s-1); }
.follow .tick:checked + label .check-title { color: var(--ink); }

/* ---------- sections and cards ---------- */
.view { display: block; }
.view > .seg { margin: 0 0 var(--s-4); }
.block { margin: var(--s-8) 0 0; }
.block > .level { margin: 0 0 var(--s-4); }
.block > .btn-wide { margin-top: var(--s-3); }
.block > .grid2, .block > .field:first-of-type { margin-top: var(--s-3); }
.block > .muted.small { margin-top: var(--s-2); }
.block > .chips { margin-top: var(--s-3); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.section-title { font-family: var(--font-display); font-weight: 500; font-size: var(--d-2); line-height: 1.15; }
.section-aside { position: relative; color: var(--ink-2); font-size: var(--t-2); text-align: right; font-variant-numeric: tabular-nums; }
.card { padding: var(--s-4) var(--s-5); margin: var(--s-2) 0 var(--s-5); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.card-plain { background: transparent; box-shadow: none; padding: 0; margin-bottom: var(--s-6); }
.card-title { font-family: var(--font-display); font-weight: 500; font-size: var(--d-2); line-height: 1.15; margin-bottom: var(--s-3); }
.card-label { color: var(--ink-2); font-size: var(--t-2); margin-bottom: var(--s-1); }
.card .btn { margin-top: var(--s-4); }
.foot { margin-top: var(--s-8); padding-top: var(--s-4); border-top: 1px solid var(--hair); color: var(--ink-2); font-size: var(--t-2); }
.foot-line { display: flex; align-items: center; gap: var(--s-4); }
.foot .link { font-size: var(--t-2); }

/* You: a picture or a letter, the week as days, the goal and targets as plain facts, settings in groups. */
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; overflow: hidden; background: var(--surface); box-shadow: var(--edge); color: var(--accent); }
.avatar-l { width: 64px; height: 64px; }
.avatar-s { width: 26px; height: 26px; }
.avatar-letter { font-family: var(--font-display); font-size: var(--d-2); line-height: 1; }
.avatar-s .avatar-letter { font-family: var(--font-text); font-size: var(--t-2); font-weight: 500; }
.avatar .state-mark { margin: 0; }
.you-btn.has-avatar { padding-left: var(--s-2); }
.you-btn.has-avatar > .icon { display: none; }
.you-head { display: flex; align-items: center; gap: var(--s-4); margin: 0 0 var(--s-5); }
.you-who { flex: 1; min-width: 0; }
.you-who .display { overflow-wrap: anywhere; }
.you-photo { display: flex; align-items: center; gap: var(--s-4); margin: 0 0 var(--s-4); }
.you-photo-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.you-photo-acts .link { padding: 0; }
.card .section-head { margin-bottom: var(--s-2); }
.card .section-head .card-title { margin-bottom: 0; }
.card-link { padding: 0; min-height: 0; }
.glance { display: grid; gap: var(--s-2); margin: 0 0 var(--s-3); }
.glance-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 2.6rem; align-items: center; gap: var(--s-2); }
.glance-label { min-width: 0; font-size: var(--t-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glance-marks { display: grid; grid-template-columns: repeat(7, 12px); gap: var(--s-1); justify-items: center; align-items: center; }
.glance-day { color: var(--ink-2); font-size: var(--t-1); font-style: normal; }
.glance-day.is-today { color: var(--ink); font-weight: 500; }
.glance-count { color: var(--ink-2); font-size: var(--t-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) 0; }
.facts > div + div { border-top: 1px solid var(--hair); }
.facts dt { flex: none; color: var(--ink-2); font-size: var(--t-2); }
.facts dd { font-size: var(--t-2); text-align: right; }
.group .places { margin-bottom: 0; }
.group .places + .sheet-block, .group .places + .places { margin-top: var(--s-3); }
.group > .section-head + .sheet-block { border-top: 0; padding-top: 0; }

/* Nothing here yet, or something did not work: the mark at rest, a few words, and one way on. */
.state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-5); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); margin: 0 0 var(--s-4); }
.state-mark { color: var(--accent); margin-bottom: var(--s-1); }
.state-title { font-family: var(--font-display); font-weight: 500; font-size: var(--d-1); line-height: 1.2; }
.state-text { color: var(--ink-2); font-size: var(--t-2); max-width: 34ch; }
.state .btn { margin-top: var(--s-2); }
.state-error { border-top-color: var(--accent); }
.sheet-body .state { border-top: 0; padding-top: var(--s-2); }
.empty { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-2); font-size: var(--t-2); padding: var(--s-3) 0 var(--s-1); }
.empty .state-mark { flex: none; margin: 0; opacity: 0.7; }

/* Waiting: the three lines of water from the mark, drawing in turn, and under them the outline of what is
   on its way, so nothing jumps when it arrives. No spinners. */
.waiting { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--ink-2); }
.waters { flex: none; color: var(--accent); overflow: visible; }
.waters .wl { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 1.9s var(--ease) infinite; }
.waters .wl2 { animation-delay: 0.16s; }
.waters .wl3 { animation-delay: 0.32s; }
@keyframes draw { 0% { stroke-dashoffset: 40; opacity: 1; } 45%, 78% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.est-waiting { margin: var(--s-2) 0 var(--s-3); }
.msg-wait .waiting { color: inherit; }
.sk { position: relative; overflow: hidden; display: block; border-radius: var(--r-1); background: var(--track); }
.sk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--shine), transparent); transform: translateX(-100%); animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; border-radius: var(--r-1); }
.sk-title { height: 22px; width: 62%; border-radius: var(--r-1); }
.sk-num { height: 34px; width: 40%; }
.sk-chip { display: inline-block; width: 96px; height: var(--tap); border-radius: var(--r-pill); }
.sk-w30 { width: 30%; } .sk-w45 { width: 45%; } .sk-w60 { width: 60%; } .sk-w80 { width: 80%; } .sk-w100 { width: 100%; }
.sk-stack { display: grid; gap: var(--s-2); }
.sk-card { display: grid; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge); }
.sk-card + .sk-card { margin-top: var(--s-3); }

.sk-row { display: flex; gap: var(--s-2); }
/* Opening the app: the shape of Today while it loads. */
.loading { display: grid; gap: var(--s-3); }
.loading .sk-head { height: 34px; width: 56%; }
.loading .sk-box { height: 52px; border-radius: var(--r-pill); }
.loading .sk-board { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.loading .sk-tile { height: 104px; border-radius: var(--r-2); }
.loading.is-first > * { visibility: hidden; }

/* ---------- today ---------- */
.today-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: 0 0 var(--s-4); }
.today-head .display { margin-bottom: 0; }
/* Today moves a day with a sideways swipe; up and down still scroll, and two fingers still zoom. */
#view-today { touch-action: pan-y pinch-zoom; }
/* The entry box: a camera inside it, and your usual meals while it is in use. */
.tell { margin: 0 0 var(--s-2); }
.tell-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tell-row { position: relative; display: flex; align-items: center; gap: var(--s-2); }
.tell-row .input { border-radius: var(--r-pill); min-height: 52px; padding-left: var(--s-5); background: var(--tile); border-color: transparent; box-shadow: var(--edge), var(--lift); }
.tell-row .input:focus { border-color: var(--accent); outline: none; }
.tell-row .input::placeholder { text-overflow: ellipsis; }
.tell-row.has-cam .input { padding-right: calc(var(--tap) + var(--s-3)); text-overflow: ellipsis; }
.tell-send { width: 52px; height: 52px; }
.tell-cam { position: absolute; top: 4px; right: 64px; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.tell-usual { margin: var(--s-2) 0 0; }
.tell-library { margin: calc(var(--s-2) * -1) 0 var(--s-2); display: flex; flex-wrap: wrap; column-gap: var(--s-5); }
.tell-library .link-quiet { display: inline-block; }
.scan-figures { font-size: var(--t-3); margin: var(--s-3) 0 var(--s-4); }
.macros { margin: 0 0 var(--s-4); }
.macro-head { display: flex; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); font-size: var(--t-2); color: var(--ink-2); }
.macro-val { color: var(--ink); }
.macro-rest { margin: var(--s-3) 0 0; }
.row-btn { padding: 0; border: 0; background: none; text-align: left; color: inherit; min-height: var(--tap); justify-content: center; }
.recipe-totals { margin: var(--s-4) 0; }
.recipe-total { font-size: var(--t-2); margin: 0 0 var(--s-2); }
.recipe-edit { padding: var(--s-3) 0; }
.check-wrap { flex-wrap: wrap; }
.track-more { flex-basis: 100%; padding: 0 0 var(--s-2); }
.track-more .check-sub { margin: 0 0 var(--s-2); }
.careful-list { margin: 0 0 var(--s-4); padding-left: var(--s-5); }
.careful-list li { margin: 0 0 var(--s-1); }
.left { margin: var(--s-4) 0; }
.left-text { margin: 0 0 var(--s-3); }
.tell-out { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s-4); margin-top: var(--s-2); padding: var(--s-3) var(--s-4); border-radius: var(--r-2); background: var(--notice); font-size: var(--t-2); }
.tell-text { flex: 1 1 12rem; min-width: 0; }
.tell-acts { display: inline-flex; gap: var(--s-5); }
.tell-acts .link { padding: 0; min-height: 40px; }
.tell-ask { display: block; }
.tell-ask .chips { margin-top: var(--s-2); }

/* The note for this time of day: the one main thing on Today (and on Morning), with the one thing worth a tap
   under it. Words on the page, not in a box. */
.brief { margin: 0 0 var(--s-4); }
.brief-line { font-size: var(--t-3); line-height: 1.45; }
.brief-night { color: var(--ink-2); font-size: var(--t-2); }
.brief-act { margin-top: var(--s-3); }
.brief-page { margin: var(--s-4) 0 var(--s-6); padding: var(--s-4) var(--s-5); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.brief-page > p + p { margin-top: var(--s-1); }
.chip-again { background: var(--chip); border-color: var(--chip-edge); color: var(--on-chip); }
.chip-kept { border-color: var(--ink-2); }

/* The daily board: six figures, each a number, its target, a level line, and one tap to add. No boxes: a
   hairline above each, two columns, and the add sitting quietly at the right of its figure. */
.board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); margin: 0 0 var(--s-6); }
.tile { position: relative; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
/* Pressed, a card gives a little and its shadow draws in: the deeper shadow is a layer that fades (opacity only). */
.tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--lift-press); opacity: 0; pointer-events: none; transition: opacity var(--m-press) ease; }
.tile:active::after { opacity: 1; }
.tile { min-height: 132px; }
.tile-main { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); width: 100%; height: 100%; padding: var(--s-4) var(--s-4) var(--s-3); border: 0; border-radius: inherit; background: none; text-align: left; color: var(--ink); }
.tile-icon { display: inline-flex; color: var(--label); }
.tile-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 var(--s-1); margin-top: auto; }
.tile-unit { color: var(--ink-2); font-size: var(--t-2); }
.tile-big { position: relative; font-family: var(--font-display); font-size: var(--d-5); font-weight: 500; letter-spacing: -0.015em; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.tile-big.is-dim { color: var(--ink-2); }
.tile .level { width: 100%; margin-top: auto; }
.tile-main .level { margin-top: var(--s-1); }
.tile-add { position: absolute; top: var(--s-1); right: var(--s-1); min-width: var(--tap); height: var(--tap); padding: 0 var(--s-2); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: var(--t-2); font-weight: 500; }
/* With an odd number of tiles chosen, the last one takes the full width, so no gap is left. */
.board .tile:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 108px; }
.tile-add.has-text { padding: 0 var(--s-3); font-weight: 500; }
.day-open { margin-bottom: var(--s-4); }
.day-tools { display: flex; justify-content: flex-end; gap: var(--s-5); margin: calc(var(--s-2) * -1) 0 var(--s-2); }
.day-empty { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.nudge { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-5); padding: var(--s-2) 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); font-size: var(--t-2); }
.nudge-text { flex: 1; min-width: 0; }
.nudge .link { padding: 0 var(--s-2); }

/* The middle anchor has the longest label, so it gets the widest column. */
.anchors { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: var(--s-2); }
.anchor { display: flex; flex-direction: column; gap: 1px; padding-left: var(--s-2); border-left: 1px solid var(--line); }
.anchor-time { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.anchor-label { color: var(--ink-2); font-size: var(--t-1); line-height: 1.3; }
.anchor.is-past .anchor-time { color: var(--ink-2); }

.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: var(--s-2) var(--s-1); border: 1px solid var(--line); border-radius: var(--r-2); background: transparent; color: var(--ink); }
.quick-big { font-family: var(--font-display); font-size: var(--d-2); line-height: 1; font-variant-numeric: lining-nums; }
.quick-unit { color: var(--ink-2); font-size: var(--t-1); }

/* The level line. It fills by being stretched from its left edge, which a phone can do without laying the
   page out again. */
.level { display: block; height: 4px; margin-top: var(--s-2); border-radius: 4px; background: var(--track); overflow: hidden; }
.level-fill { display: block; width: 100%; height: 100%; border-radius: 4px; background: var(--fill); transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--m-draw) var(--ease); }
.level-big { height: 4px; margin: var(--s-1) 0 var(--s-4); }
.level-none { background: transparent; }

/* ---------- lists ---------- */
.rows > li + li { border-top: 1px solid var(--hair); }
.row { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-2) 0; border: 0; background: none; text-align: left; color: var(--ink); }
.row > .icon { flex: none; color: var(--ink-2); }
.row-card { padding: var(--s-3) 0; }
.row-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--ink-2); }
.row-photo { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--track); }
.row-photo.is-arriving { visibility: hidden; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-size: var(--t-3); overflow-wrap: anywhere; }
.row-sub { color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.places { display: grid; gap: 0; margin: 0 0 var(--s-5); padding: 0 var(--s-4); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.places > * + * { border-top: 1px solid var(--hair); }
.places .row-card { min-height: 60px; }
.show-all { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: var(--s-1); }
/* The day as a timeline: what was logged, a line for now, and what tonight still holds. */
.row-plan { color: var(--ink-2); }
.row-plan .row-title { color: var(--ink); font-size: var(--t-2); }
.row-icon-plan { color: var(--ink-2); }
.day-mark.is-past .row-title, .day-mark.is-done .row-title { color: var(--ink-2); }
.day-mark.is-past .row-icon-plan { opacity: 0.6; }
.day-mark.is-done .row-icon-plan { color: var(--accent); }
.rows > li.day-now { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; border-top: 0; color: var(--accent); font-size: var(--t-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.rows > li.day-now::after { content: ''; flex: 1; height: 1px; background: var(--accent); opacity: 0.5; }
.rows > li.day-now + li { border-top: 0; }
.search-day { margin: var(--s-4) 0 0; }
.morning-times { margin-top: var(--s-4); }

/* ---------- the night by the member's own taps, and the day's small facts ---------- */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.night-sum { font-family: var(--font-display); font-size: var(--d-1); margin: 0 0 var(--s-3); }
.night-line { font-size: var(--t-3); margin: 0 0 var(--s-1); }
.night { padding: var(--s-4) 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.night-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.night-big { font-family: var(--font-display); font-size: var(--d-2); line-height: 1.1; font-variant-numeric: lining-nums; }
.night .bed { border: 0; padding: 0 0 var(--s-2); }
.pattern-lines .letter-line + .letter-line { margin-top: var(--s-2); }
.sips { margin: 0 0 var(--s-3); }
.sips .chip { display: inline-flex; align-items: center; gap: var(--s-2); }
.felt { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--hair); }
.felt .field-label { margin-bottom: var(--s-2); }
.asleep { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-4) 0 0; }
.asleep-text { flex: 1; min-width: 0; }
.sleep-go { margin-top: var(--s-4); }
.stats-plain { margin-top: var(--s-2); padding-top: 0; border-top: 0; }
.good-times { margin: var(--s-3) 0; padding: var(--s-3) 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.good-times .brief-line + .brief-line { margin-top: var(--s-1); }
.brief-lines .brief-line + .brief-line { margin-top: var(--s-1); }
.note-source { margin-top: var(--s-2); }
.run-open { margin-top: var(--s-4); }
.run-walk { display: inline-flex; margin-top: var(--s-2); }
.bed-below { margin-top: var(--s-6); }
/* The Assistant's two tools that run on the device, and the plan while it is being looked at. */
.assist { margin: 0 0 var(--s-4); }
.assist-tools { margin-bottom: var(--s-3); }
.assist .card { margin-bottom: 0; }
.row-time { flex: none; min-width: 3.2rem; color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.plan-rows { margin: var(--s-2) 0 0; }
.news-lines { display: grid; gap: var(--s-2); margin: 0 0 var(--s-2); padding-left: 1.1rem; list-style: disc; font-size: var(--t-2); }
.sheet-body .news-lines { margin-bottom: var(--s-4); }
.list-name { margin-top: var(--s-4); }
.idea-list { padding: 0; }
.letter-aim { margin-top: var(--s-2); color: var(--accent); }
.letter .btn { margin-top: var(--s-3); }
.run-title { margin-top: 0; }
.run-clock { font-family: var(--font-display); font-size: var(--d-4); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; margin: var(--s-2) 0 var(--s-3); }
.again { margin: var(--s-4) 0 var(--s-2); }
.checks > .check + .check { border-top: 1px solid var(--hair); }
.check { display: flex; align-items: center; gap: var(--s-4); min-height: 54px; padding: var(--s-2) 0; }
.check label { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: var(--s-2) 0; cursor: pointer; }
.check-title { font-size: var(--t-3); overflow-wrap: anywhere; }
.check-sub { color: var(--ink-2); font-size: var(--t-2); }
.check-inline { align-items: flex-start; min-height: 0; gap: var(--s-3); }
.check-inline label { color: var(--ink-2); font-size: var(--t-2); padding: 2px 0; }
.tick { position: relative; appearance: none; -webkit-appearance: none; flex: none; width: 28px; height: 28px; margin: 0; border: 1.5px solid var(--ink-2); border-radius: 50%; background: transparent; cursor: pointer; display: inline-grid; place-content: center; }
.tick::after { content: ''; width: 12px; height: 7px; margin-top: calc(var(--s-1) * -1); border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg) scale(0); transition: transform var(--m-press) var(--glide); }
.tick:checked { background: var(--accent); border-color: var(--accent); }
.tick:checked::after { transform: rotate(-45deg) scale(1); }
.tick-small { width: 22px; height: 22px; border-radius: var(--r-1); }
.tick-small::after { width: 10px; height: 6px; }
.tick:checked + label .check-title, .tick:checked + label .step-title { color: var(--ink-2); }

/* ---------- forms ---------- */
.field { display: grid; gap: var(--s-2); min-width: 0; margin: 0 0 var(--s-4); }
.field-label { color: var(--ink-2); font-size: var(--t-2); }
.field-hint { color: var(--ink-2); font-size: var(--t-2); }
.input { width: 100%; min-width: 0; max-width: 100%; min-height: var(--ctl); padding: var(--s-3) var(--s-4); border: 1px solid var(--field); border-radius: var(--r-2); background: var(--bg); color: var(--ink); font-size: var(--t-3); appearance: none; -webkit-appearance: none; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: var(--s-8); }
textarea.input { resize: vertical; line-height: 1.45; }
.input::placeholder { color: var(--ink-2); opacity: 1; }
.input.is-bad { border-color: var(--ink); }
.code { font-family: var(--font-mono); margin-top: var(--s-3); }
div.code, p.code { font-size: var(--t-1); }
.code-big { font-family: var(--font-mono); font-size: var(--d-1); letter-spacing: 0.04em; text-align: center; padding: var(--s-4) var(--s-2); border-radius: var(--r-2); background: var(--bg); overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
/* Choosing a file: the browser's own control is kept for screen readers and the keyboard, drawn as one of ours. */
.file { width: 100%; margin: var(--s-1) 0 var(--s-3); font-size: var(--t-2); color: var(--ink-2); }
.file::file-selector-button { min-height: var(--tap); margin-right: var(--s-3); padding: var(--s-2) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-2); background: transparent; color: var(--ink); font: 500 var(--t-2) var(--font-text); cursor: pointer; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--s-3); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.seg-btn { min-height: 46px; padding: var(--s-2) var(--s-1); border: 0; border-left: 1px solid var(--line); background: transparent; font-size: var(--t-2); }
.seg-btn:first-child { border-left: 0; }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.stepper { display: flex; align-items: center; gap: var(--s-3); }
.stepper-value { min-width: 5.5ch; text-align: center; white-space: nowrap; font-family: var(--font-display); font-size: var(--d-2); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.feel { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-2); }
.feel-btn { min-height: 58px; padding: var(--s-2) 0; border: 1px solid var(--line); border-radius: var(--r-2); background: transparent; font-size: var(--t-2); }
.feel-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin: var(--s-3) 0 var(--s-4); }
.goal-btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 58px; padding: var(--s-2) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-2); background: transparent; text-align: left; }
.goal-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.goal-name { font-size: var(--t-2); font-weight: 500; line-height: 1.25; }
.goal-hint { color: var(--ink-2); font-size: var(--t-1); line-height: 1.3; }
.goal-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.goal-btn[aria-pressed="true"] .goal-hint { color: var(--on-accent); opacity: 0.85; }
.goal-line { margin: 0 0 var(--s-3); }
.goal-line .link { font-size: inherit; }

/* ---------- estimates ---------- */
.est { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s-3); margin: 0 0 var(--s-2); }
.est-kcal { grid-column: 1 / -1; }
.est-kcal .input { font-family: var(--font-display); font-size: var(--d-2); min-height: 58px; font-variant-numeric: lining-nums; }
.est-note { margin: 0 0 var(--s-3); }
.est-q { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.2; margin: var(--s-1) 0 var(--s-3); }
.est-answer { display: flex; gap: var(--s-2); align-items: center; margin: 0 0 var(--s-1); }
.est-check { margin: 0 0 var(--s-2); }
.est-check .link { padding: 0; min-height: 0; }

/* ---------- ritual ---------- */
.sessions > .session + .session { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
.session { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.session-main { display: flex; flex-direction: column; min-width: 0; }
.session-name { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.15; overflow-wrap: anywhere; }
.session-sub { color: var(--ink-2); font-size: var(--t-2); }
.bed { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 0 0 var(--s-1); }
.bed .card-label { margin: 0; color: var(--ink); font-size: var(--t-3); }
.steps { position: relative; }
.steps::before { content: ''; position: absolute; left: calc(3.4rem + 13px); top: 28px; bottom: 28px; width: 1px; background: var(--hair); }
.step { position: relative; display: grid; grid-template-columns: 3.4rem 28px 1fr; align-items: start; gap: 0 var(--s-3); padding: var(--s-3) 0; }
.step-time { padding-top: var(--s-1); color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.step .tick { background: var(--bg); }
.step .tick:checked { background: var(--accent); }
.step label { display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-height: var(--tap); }
.step-title { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.2; }
.step-note { color: var(--ink-2); font-size: var(--t-2); }
.step.is-due .step-time { color: var(--accent); font-weight: 500; }
.setup > div { padding: var(--s-3) 0; }
.setup > div + div { border-top: 1px solid var(--hair); }
.setup dt { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.2; font-variant-numeric: lining-nums; }
.setup dd { color: var(--ink-2); font-size: var(--t-2); margin-top: 2px; }

/* ---------- morning and charts ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--hair); }
.stats dt { color: var(--ink-2); font-size: var(--t-2); }
.stats dd { font-family: var(--font-display); font-size: var(--d-2); line-height: 1.15; font-variant-numeric: lining-nums; }
.chart { display: block; width: 100%; height: auto; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .goal-line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 4; }
/* A filled bar met the target (or followed a ritual night); a soft one was logged; an outline is another night. */
.chart .bar-ritual { fill: var(--accent); }
.chart .bar-other { fill: none; stroke: var(--ink-2); stroke-width: 1.2; }
.chart .bar-plain { fill: var(--accent); opacity: 0.6; }
.chart-label { fill: var(--ink-2); font: 400 10px var(--font-text); }
.chart-label.is-today { fill: var(--ink); font-weight: 500; }
.chart-week { margin-bottom: var(--s-1); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-2) 0; color: var(--ink-2); font-size: var(--t-2); }
.legend span { display: inline-flex; align-items: center; gap: var(--s-2); }
.key { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.key-ritual { background: var(--accent); }
.key-plain { background: var(--accent); opacity: 0.6; }
.key-other { border: 1.2px solid var(--ink-2); }

/* ---------- assistant ---------- */
.fold { margin: 0 0 var(--s-4); }
.fold summary { min-height: var(--tap); display: flex; align-items: center; color: var(--ink-2); font-size: var(--t-2); text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold[open] summary { margin-bottom: var(--s-1); }
.fold-block { margin-top: var(--s-6); }
.chat { display: flex; flex-direction: column; gap: var(--s-3); margin: var(--s-2) 0 var(--s-4); }
.chat-empty { display: grid; gap: var(--s-3); }
.msg { max-width: 88%; padding: var(--s-3) var(--s-4); border-radius: var(--r-2); }
.msg-you { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: var(--r-1); }
.msg-coach { align-self: flex-start; background: var(--surface); box-shadow: var(--edge); border-bottom-left-radius: var(--r-1); }
.msg-who { font-size: var(--t-1); opacity: 0.85; margin-bottom: 2px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-wait { width: 72%; }
.msg-wait .sk-stack { margin-top: var(--s-3); }
.composer { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--s-2); padding: var(--s-3) 0; background: var(--bg); border-top: 1px solid var(--hair); }
.composer-row { display: flex; align-items: flex-end; gap: var(--s-2); }
textarea.chat-input { min-height: var(--ctl); max-height: 140px; resize: none; border-radius: var(--r-2); }
.send { flex: none; width: var(--ctl); height: var(--ctl); border: 0; border-radius: 50%; background: var(--cta); color: var(--on-cta); display: inline-flex; align-items: center; justify-content: center; }
.send:disabled { opacity: 0.4; }

/* ---------- focus ---------- */
.timer { text-align: center; margin: var(--s-2) 0 var(--s-4); }
.timer .field, .timer .card-label { text-align: left; }
.timer-clock { font-family: var(--font-display); font-size: var(--d-4); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; margin: var(--s-2) 0 var(--s-3); }
.timer-lengths { display: grid; grid-template-columns: 1fr 5.5rem; gap: var(--s-2); margin: 0 0 var(--s-4); }
.timer-lengths .input { min-height: 48px; text-align: center; padding: var(--s-2); }
.timer .sheet-actions { justify-content: center; }

/* ---------- progress ---------- */
.pip { width: 11px; height: 11px; border-radius: 50%; border: 1.2px solid var(--line); display: inline-block; }
.pip.is-on { background: var(--accent); border-color: var(--accent); }
.table-wrap { overflow-x: auto; margin: var(--s-1) 0 var(--s-2); }
.table { border-collapse: collapse; font-size: var(--t-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: var(--s-2) var(--s-3) var(--s-2) 0; text-align: left; border-bottom: 1px solid var(--hair); font-weight: 400; }
.table thead th { color: var(--ink-2); }
.daynav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: 0 0 var(--s-2); }
.daynav-day { font-family: var(--font-display); font-size: var(--d-1); }
.letter-line { font-size: var(--t-3); line-height: 1.5; }

/* ---------- food ideas ---------- */
.ideas { min-height: 96px; margin-bottom: var(--s-4); }
.ideas-wait { padding: var(--s-2) 0 var(--s-4); }
.ideas-intro { margin-bottom: var(--s-3); font-size: var(--t-2); }
.idea { padding: var(--s-4); border-radius: var(--r-3); background: var(--bg); box-shadow: var(--edge); }
.idea + .idea { margin-top: var(--s-3); }
.idea-name { font-family: var(--font-display); font-size: var(--d-1); font-weight: 500; line-height: 1.2; }
.idea-portion { color: var(--ink-2); font-size: var(--t-2); margin-top: 2px; }
.idea-nums { margin-top: var(--s-2); font-variant-numeric: lining-nums tabular-nums; }
.idea-kcal { display: block; font-size: var(--t-3); font-weight: 500; }
.idea-macros { display: block; color: var(--ink-2); font-size: var(--t-2); }
.idea-macro { white-space: nowrap; }
.idea-why { color: var(--ink-2); font-size: var(--t-2); margin-top: 2px; }
.idea .btn { margin-top: var(--s-3); }
.idea-done { margin-top: var(--s-3); color: var(--accent); font-size: var(--t-2); font-weight: 500; }
.idea.is-logged { box-shadow: inset 0 0 0 1.5px var(--fill); }
.ideas-tail { color: var(--ink-2); font-size: var(--t-1); margin: var(--s-3) 0; }

/* ---------- a meal read from a photo ---------- */
.tell-out.photo { display: block; padding: var(--s-3); border-radius: var(--r-2); }
.photo-top { display: flex; align-items: flex-start; gap: var(--s-3); }
.photo-thumb { flex: none; width: 72px; height: 72px; border-radius: var(--r-2); object-fit: cover; background: var(--track); }
.photo-blank { display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.photo-main { flex: 1; min-width: 0; min-height: 72px; display: flex; flex-direction: column; justify-content: center; }
.photo-main .sk-row { margin-top: var(--s-2); }
.photo-lead { color: var(--ink-2); font-size: var(--t-2); margin-bottom: var(--s-2); }
.photo .photo-items { margin: 0; gap: var(--s-2); }
.photo-items .chip { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: var(--s-1) var(--s-4); border-radius: var(--r-2); background: var(--bg); white-space: normal; text-align: left; }
.chip-name { font-size: var(--t-2); line-height: 1.25; overflow-wrap: anywhere; }
.chip-sub { color: var(--ink-2); font-size: var(--t-1); line-height: 1.25; }
.photo-items .chip-add { align-items: center; width: var(--tap); padding: 0; color: var(--accent); }
.photo-other { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); margin-top: var(--s-3); }
.photo-other .chips { margin: 0; }
.photo-or { color: var(--ink-2); font-size: var(--t-2); }
.photo-est { margin-top: var(--s-3); }
.photo-est .sk-stack { margin-top: var(--s-2); }
.photo-kcal { font-family: var(--font-display); font-size: var(--d-2); line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; }
.photo-about, .photo-unit { font-family: var(--font-text); font-size: var(--t-2); color: var(--ink-2); }
.photo-macros { color: var(--ink-2); font-size: var(--t-2); margin-top: 2px; }
.photo-q { margin-top: var(--s-3); }
.photo-q .chips { margin: var(--s-2) 0 0; }
.photo-note { font-size: var(--t-2); margin-top: var(--s-2); }
.photo-top .photo-note { margin-top: 0; }
.photo-acts { display: flex; align-items: center; gap: var(--s-5); margin-top: var(--s-3); }
.photo-acts .link { padding: 0; min-height: 40px; }
.photo-fine { color: var(--ink-2); font-size: var(--t-1); margin-top: var(--s-2); }
.photo-cancel { padding: 0; min-height: 36px; font-size: var(--t-2); }
.photo-ghost { position: fixed; z-index: 60; margin: 0; object-fit: cover; pointer-events: none; border-radius: var(--r-2); box-shadow: var(--float); }
.photo-count { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
.photo-count .photo-ask { margin: 0 0 var(--s-2); }
.count-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 48px; }
.count-name { font-size: var(--t-2); overflow-wrap: anywhere; }
.count-step { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.count-n { min-width: 2.2ch; text-align: center; font-family: var(--font-display); font-size: var(--d-2); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- sheets and toast ---------- */
/* Sheets rise from the bottom edge, follow the finger, settle back or slide away, and leave the way they came. */
.sheet { position: fixed; inset: auto 0 var(--kb) 0; z-index: 40; width: 100%; max-width: 30rem; max-height: calc(100vh - var(--kb) - 24px); max-height: calc(100dvh - var(--kb) - 24px - env(safe-area-inset-top, 0px)); margin: 0 auto; padding: 0; border: 0; border-radius: var(--r-4) var(--r-4) 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--float); overflow-y: auto; overscroll-behavior: contain; transform: translateY(105%); opacity: 0; transition: transform 0.24s var(--ease); }
.sheet::backdrop { background: var(--scrim); }
/* A sheet under the finger is moved by its own transform, set directly: no style variable, which Safari would pass to
   everything inside the sheet on every move (Alex, 23 Nov 2026: the swipe down dropped frames on his iPhone). */
.sheet[open] { transform: translateY(0); opacity: 1; animation: rise var(--m-spring) var(--glide); }
@keyframes rise { from { transform: translateY(100%); } }
.sheet:not([open]), .sheet:not([open])::backdrop { pointer-events: none; }
.sheet.is-dragging { transition: none; }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-3) var(--s-2) max(var(--gutter), env(safe-area-inset-left, 0px)); background: var(--surface); }
#sheet .sheet-head { touch-action: none; }
#sheet .sheet-head::before { content: ''; position: absolute; top: var(--s-2); left: 50%; width: 36px; height: 4px; margin-left: calc(var(--s-4) * -1); border-radius: 4px; background: var(--line); }
.sheet-title { font-family: var(--font-display); font-weight: 500; font-size: var(--d-2); line-height: 1.1; }
.sheet-body { padding: var(--s-1) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(var(--s-6) + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); }
.sheet-body > p { margin-bottom: var(--s-3); }
.sheet-body .chips { margin: calc(var(--s-1) * -1) 0 var(--s-4); }
/* The row of moments in the ideas sheet runs edge to edge, so it comes after the rule above. */
.sheet-body .ideas-moments { margin: 0 calc(var(--gutter) * -1) var(--s-4); padding: 0 var(--gutter) 2px; }
.sheet-body .checks { margin-bottom: var(--s-2); }
.sheet-body .setup { margin-bottom: var(--s-2); }
.sheet-body .setup dt { font-size: var(--d-1); }
.sheet-body .fold { margin-top: var(--s-3); }
.sheet-body .muted.small .link { padding: 0; min-height: 0; font-size: inherit; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.sheet-actions .btn-primary { flex: 1 1 auto; }
.sheet-actions + .muted { margin-top: var(--s-3); }
.sheet-block { padding: var(--s-4) 0; border-top: 1px solid var(--hair); }
.sheet-block:first-child { border-top: 0; padding-top: 0; }
.sheet-block > p, .sheet-block > .btn { margin-bottom: var(--s-3); }
.sheet-sub { font-family: var(--font-display); font-weight: 500; font-size: var(--d-1); margin-bottom: var(--s-2); }
/* Honest review, bug 6: a heading after a row of buttons, a note above a box, a tag above a switch had no room between them. */
.sheet-actions + .sheet-sub { margin-top: var(--s-5); }
.journal-voice-note { margin-bottom: var(--s-3); }
.view-lift .muscle-chips + .seg { margin-top: var(--s-3); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--s-4) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2147483000; display: flex; align-items: center; gap: var(--s-4); width: max-content; max-width: min(26rem, calc(100vw - 32px)); padding: var(--s-3) var(--s-4); border-radius: var(--r-2); background: var(--toast-bg); color: var(--toast-ink); font-size: var(--t-2); box-shadow: var(--float); }
.toast-action { position: relative; border: 0; background: none; padding: var(--s-1) 0; color: var(--toast-accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
@supports (transition-behavior: allow-discrete) {
  .sheet { transition: transform 0.24s var(--ease), opacity 0.2s ease, overlay 0.24s allow-discrete, display 0.24s allow-discrete; }
  .sheet.is-dragging { transition: none; }
  .sheet::backdrop { opacity: 0; transition: opacity 0.24s ease, overlay 0.24s allow-discrete, display 0.24s allow-discrete; }
  .sheet[open]::backdrop { opacity: 1; }
  @starting-style { .sheet[open]::backdrop { opacity: 0; } }
  .toast { transition: opacity 0.2s ease, transform 0.2s ease, display 0.2s allow-discrete; }
  .toast[hidden] { opacity: 0; transform: translate(-50%, 8px); pointer-events: none; }
}

/* ---------- privacy text ---------- */
.prose h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--d-3); line-height: 1.05; margin: var(--s-2) 0 var(--s-4); }
.prose h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--d-2); margin: var(--s-6) 0 var(--s-2); }
.prose p, .prose li { color: var(--ink); font-weight: 300; margin: 0 0 var(--s-3); max-width: 66ch; }
.prose ul { list-style: disc; padding-left: 1.2rem; }
.prose .draft { background: var(--notice); border-radius: var(--r-2); padding: var(--s-3) var(--s-4); font-weight: 400; }
.prose a { color: var(--accent); }
.noscript { padding: var(--s-6); }

@media (min-width: 420px) { :root { --gutter: 24px; } }
/* NEXT-16, 9: the app's own Text size, times the phone's own text size where Safari says it (--sys-text, set by applyText). */
:root { font-size: calc(100% * var(--sys-text, 1)); }
:root[data-text="large"] { font-size: calc(112.5% * var(--sys-text, 1)); }
:root[data-text="larger"] { font-size: calc(125% * var(--sys-text, 1)); }
.sys-probe { position: absolute; top: 0; left: 0; visibility: hidden; pointer-events: none; }
@supports (font: -apple-system-body) { .sys-probe { font: -apple-system-body; } }

/* ---------- the look's details ---------- */
/* Icons in two tones: shapes take a soft fill of their own colour; lines and arrows stay lines. */
.icon-2 path, .icon-2 circle { fill: currentColor; fill-opacity: 0.2; }
/* Warm moments are set in serif italics: the golden hour and the evening on Today and Tonight, and the end of the
   wind-down. */
:root[data-phase="golden"] .today-head .display, :root[data-phase="evening"] .today-head .display, :root[data-phase="evening"] #view-tonight > .display, .warm { font-style: italic; }
/* The ritual's glow: once the wind-down has begun, a warm light breathes slowly behind the top of Tonight, with a
   smaller candle-like light that wavers in it. Opacity only. */
.ritual-glow { position: absolute; z-index: -1; left: 50%; top: 40px; width: 420px; height: 420px; margin-left: -210px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; animation: glow-breathe 6s ease-in-out infinite alternate; }
.ritual-glow > i { position: absolute; left: 50%; top: 42%; width: 120px; height: 160px; margin-left: calc(var(--s-10) * -1); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 150, 0.55), transparent); animation: candle 2.6s ease-in-out infinite; }
#view-tonight { position: relative; }
@keyframes glow-breathe { from { opacity: 0.45; } to { opacity: 0.95; } }
@keyframes candle { 0% { opacity: 0.8; } 18% { opacity: 0.62; } 31% { opacity: 0.9; } 47% { opacity: 0.7; } 63% { opacity: 1; } 79% { opacity: 0.66; } }
/* A finished moment: a short burst of soft light where it happened, gone within a second. Never for a count. */
.burst { position: fixed; z-index: 60; width: 0; height: 0; pointer-events: none; }
.burst.is-in-sheet { position: absolute; }
.burst::before { content: ''; position: absolute; left: -36px; top: -36px; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); animation: burst-glow var(--m-sign) var(--glide) forwards; }
.burst > i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--fill); opacity: 0; animation: burst-out var(--m-sign) var(--glide) forwards; }
@keyframes burst-glow { from { transform: scale(0.3); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
@keyframes burst-out { 0% { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-46px) scale(0.4); opacity: 0; } }
/* Lists arrive in turn on a screen's first showing. */
.is-entering .rows > li { animation: settle-in 0.32s var(--ease) backwards; }
.is-entering .rows > li:nth-child(2) { animation-delay: 0.03s; }
.is-entering .rows > li:nth-child(3) { animation-delay: 0.06s; }
.is-entering .rows > li:nth-child(4) { animation-delay: 0.09s; }
.is-entering .rows > li:nth-child(5) { animation-delay: 0.12s; }
.is-entering .rows > li:nth-child(6) { animation-delay: 0.15s; }
.is-entering .rows > li:nth-child(n+7) { animation-delay: 0.18s; }
/* Calm visuals (You, This app): nothing drifts, breathes, wavers or shimmers, and there are no bursts. */
:root[data-calm] .shell::before, :root[data-calm] .shell::after, :root[data-calm] .ritual-glow, :root[data-calm] .ritual-glow > i, :root[data-calm] .sk::after { animation: none; }
:root[data-calm] .sk::after { display: none; }
/* Out of sight, everything that moves holds still, so a hidden page uses no power drawing. */
:root[data-paused] *, :root[data-paused] *::before, :root[data-paused] *::after { animation-play-state: paused !important; }

/* ---------- Remanso 2.0: the top bar, the + button, Updates, the "i", swipe rows ---------- */
/* The top bar holds the day on the left, and Updates and You on the right. The wordmark is for the first screen. */
.top-day { position: relative; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--ink-2); font-size: var(--t-2); font-weight: 500; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.top-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.bell-dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--fill); box-shadow: 0 0 0 2px var(--bg); opacity: 0; transform: scale(0.4); transition: opacity var(--m-press) ease, transform var(--m-press) ease; }
.top-icon.has-new .bell-dot { opacity: 1; transform: none; }
.top .you-btn, .top .you-btn.has-avatar { width: var(--tap); padding: 0; justify-content: center; border-radius: 50%; }
.top .you-btn .icon { color: var(--ink); }
.chip-sample { min-height: var(--tap); padding: 0 var(--s-3); border-color: var(--accent); color: var(--accent); }
/* The + button: low on the right, within reach of a thumb, on the screens where things are logged. */
.fab { position: fixed; z-index: 25; right: max(var(--gutter), calc((100vw - 30rem) / 2 + var(--gutter))); bottom: calc(var(--tabs-h) + var(--s-4) + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: var(--cta); color: var(--on-cta); box-shadow: var(--float); }
.shell { padding-bottom: calc(var(--tabs-h) + var(--s-11) + env(safe-area-inset-bottom, 0px)); }
.toast { bottom: calc(var(--tabs-h) + 88px + env(safe-area-inset-bottom, 0px)); }
/* Inside an open sheet: a line of no height that stays at the foot of what is in view, with the message above it. */
.toast-anchor { position: sticky; bottom: 0; z-index: 2; height: 0; }
.toast.is-in-sheet { position: absolute; bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); }
.add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-5); }
.add-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); min-height: 92px; padding: var(--s-3) var(--s-2); border: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); color: var(--ink); font-size: var(--t-2); font-weight: 500; }
.add-btn .icon { color: var(--accent); }
.add-usual-box .chips { flex-wrap: wrap; margin: 0 0 var(--s-2); }
/* Updates: a title, one line and one button each; the unread ones in the hour's chip colour. */
.updates { margin: 0; padding: 0; list-style: none; }
.update { display: flex; gap: var(--s-3); padding: var(--s-4) 0; }
.update + .update { border-top: 1px solid var(--hair); }
.update-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--track); color: var(--ink); }
.update.is-unread .update-icon { background: var(--chip); color: var(--on-chip); }
.update-main { flex: 1; min-width: 0; }
.update-title { font-size: var(--t-3); font-weight: 500; }
.update-line { margin-top: 2px; color: var(--ink-2); font-size: var(--t-2); }
.update-act { margin-top: var(--s-2); }
.update .news-lines, .update .chips { margin: var(--s-2) 0 0; }
/* The "i": an explanation one tap away. */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.title-row > :first-child { min-width: 0; margin-bottom: 0; }
.info-btn { flex: none; color: var(--ink-2); }
.about-line { margin-bottom: var(--s-3); line-height: 1.5; }
/* A row that slides left to show Edit and Delete. Delete is the accent, never a warning red. */
.swipe { position: relative; overflow: hidden; }
.swipe > .row { position: relative; z-index: 1; background: var(--bg); touch-action: pan-y; transition: transform 0.26s var(--glide); }
.sheet .swipe > .row { background: var(--surface); }
.swipe > .row.is-sliding { transition: none; }
.swipe-acts { position: absolute; top: 0; right: 0; bottom: 0; display: flex; }
.swipe-act { display: inline-flex; align-items: center; justify-content: center; width: 64px; min-height: var(--tap); padding: 0; border: 0; background: var(--track); color: var(--ink); }
.swipe-act.is-delete { background: var(--accent); color: var(--on-accent); }

/* The membership card on You: the wordmark, the picture, the name, and since when. */
.member-card { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5) var(--s-5); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.member-mark { display: block; margin-bottom: var(--s-4); font-size: var(--t-2); color: var(--label); }
.member-who { display: flex; align-items: center; gap: var(--s-4); }
.member-name { flex: 1; min-width: 0; }
.member-name .display { margin-bottom: 0; overflow-wrap: anywhere; }
.member-since { margin-top: 2px; color: var(--ink-2); font-size: var(--t-2); }
/* Food's figures: a name, the figure, and the thin line. */
.figures { display: grid; gap: var(--s-4); margin: 0 0 var(--s-6); }
.figure-head { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); }
.figure-name { flex: 1; font-size: var(--t-3); font-weight: 500; }
.figure-btn { padding: 0; border: 0; background: none; color: var(--ink); text-align: left; min-height: var(--tap); }
.figure-of { color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.row-value { flex: none; color: var(--ink-2); font-size: var(--t-3); font-variant-numeric: tabular-nums; }
.ritual-nudge { margin: calc(var(--s-2) * -1) 0 var(--s-4); }
.target-chips { margin-top: var(--s-2); }
.chat-empty { margin-top: var(--s-3); }
/* The message box sits low, within reach of a thumb, even before there is a conversation. */
#view-coach.view-chat { display: flex; flex-direction: column; min-height: calc(100vh - var(--tabs-h) - 150px); min-height: calc(100dvh - var(--tabs-h) - 150px - env(safe-area-inset-bottom, 0px)); }
#view-coach.view-chat > .chat { flex: 1; }
.title-row .field { flex: 1; min-width: 0; }

/* ---------- small controls, full-size touch ---------- */
/* A link in a sentence, the toast's action, a tick and the timer pill keep their look, but each answers to a
   touch of at least 44 points: an unseen area is centred on it. */
.link::after, .toast-action::after, .pill::after, .tick::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, var(--tap)); height: max(100%, var(--tap)); transform: translate(-50%, -50%);
}

/* ---------- movement ---------- */
/* What changed is what moves. A screen comes from the side you went to; a page pushes in from the right and
   leaves to it; a number counts; a line fills; a new row settles. Nothing here waits for a tap or blocks one. */
@keyframes settle-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes view-fwd { from { opacity: 0; transform: translateX(26px); } }
@keyframes view-back { from { opacity: 0; transform: translateX(-26px); } }
@keyframes number-in { from { opacity: 0.2; transform: translateY(7px); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes grow { from { transform: scaleY(0.2); } }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes fade-in { from { opacity: 0; } }
.view-enter { animation: view-in var(--m-spring) var(--glide); }
.view-enter-fwd { animation: view-fwd var(--m-spring) var(--glide); }
.view-enter-back { animation: view-back var(--m-spring) var(--glide); }
/* NEXT-16, 2: a physical spring where the browser can draw one (CSS linear(), Safari 17.2 and later). */
@supports (animation-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001); }
}
/* On arriving at a screen its lines fill from empty, its bars grow from the axis and the day line runs to now. */
.is-entering .level-fill { animation: draw-x var(--m-draw) var(--ease) 0.1s backwards; }
.is-entering .chart .bar { animation: grow var(--m-draw) var(--glide) backwards; transform-box: fill-box; transform-origin: 50% 100%; }
.chart .bar:nth-of-type(2) { animation-delay: 0.025s; }
.chart .bar:nth-of-type(3) { animation-delay: 0.050s; }
.chart .bar:nth-of-type(4) { animation-delay: 0.075s; }
.chart .bar:nth-of-type(5) { animation-delay: 0.100s; }
.chart .bar:nth-of-type(6) { animation-delay: 0.125s; }
.chart .bar:nth-of-type(7) { animation-delay: 0.150s; }
.chart .bar:nth-of-type(8) { animation-delay: 0.175s; }
.chart .bar:nth-of-type(9) { animation-delay: 0.200s; }
.chart .bar:nth-of-type(10) { animation-delay: 0.225s; }
.chart .bar:nth-of-type(11) { animation-delay: 0.250s; }
.chart .bar:nth-of-type(12) { animation-delay: 0.275s; }
.chart .bar:nth-of-type(13) { animation-delay: 0.300s; }
.chart .bar:nth-of-type(14) { animation-delay: 0.325s; }
.is-entering .pip { animation: fade-in var(--m-move) ease backwards; }
.is-entering .pip:nth-child(2) { animation-delay: 0.04s; }
.is-entering .pip:nth-child(3) { animation-delay: 0.08s; }
.is-entering .pip:nth-child(4) { animation-delay: 0.12s; }
.is-entering .pip:nth-child(5) { animation-delay: 0.16s; }
.is-entering .pip:nth-child(6) { animation-delay: 0.2s; }
.is-entering .pip:nth-child(7) { animation-delay: 0.24s; }
/* Opening the app: the six tiles arrive in turn, all within a third of a second. */
.board.is-opening .tile { animation: settle-in 0.34s var(--ease) both; }
.board.is-opening .tile:nth-child(2) { animation-delay: 0.04s; }
.board.is-opening .tile:nth-child(3) { animation-delay: 0.08s; }
.board.is-opening .tile:nth-child(4) { animation-delay: 0.12s; }
/* The first screen arrives a line at a time. */
.gate:not([hidden]) #intro-1 > * { animation: settle-in var(--m-spring) var(--glide) backwards; }
#intro-1 > :nth-child(2) { animation-delay: 0.08s; }
#intro-1 > :nth-child(3) { animation-delay: 0.14s; }
#intro-1 > :nth-child(4) { animation-delay: 0.2s; }
#intro-1 > :nth-child(n+5) { animation-delay: 0.26s; }
/* What is new settles in: a logged row, an answer under the entry box, an idea, a reply, the usual meals. */
.rows > li.is-new { animation: settle-in 0.32s var(--ease) both; }
.tell-out.is-new { animation: settle-in 0.26s var(--ease); }
.photo.is-moved .photo-main > *, .photo.is-moved .photo-est, .photo.is-moved .photo-q, .photo.is-moved .photo-acts { animation: settle-in 0.28s var(--ease); }
.idea { animation: settle-in 0.28s var(--ease) both; }
.idea:nth-of-type(2) { animation-delay: 0.05s; }
.idea:nth-of-type(3) { animation-delay: 0.1s; }
.idea:nth-of-type(4) { animation-delay: 0.15s; }
.msg.is-new { animation: settle-in 0.28s var(--ease); }
.state { animation: fade-in 0.3s ease; }
.toast:not([hidden]) { animation: toast-in 0.22s var(--ease); }
/* A number on the board counts to its new value. The text underneath is already the new value. */
.tile.is-bumped .tile-big { animation: number-in 0.32s ease-out; }
.is-rolling { color: transparent !important; animation: none !important; }
.is-rolling::after { content: attr(data-roll); position: absolute; left: 0; top: 0; color: var(--ink); white-space: nowrap; }
.section-aside.is-rolling::after { left: auto; right: 0; color: var(--ink-2); }
/* The craft round: the dial drawn beside a figure while it turns (30-today.js, rollWheels). Each place is a short
   strip of digits seen through a window that fades at its top and bottom edges. Transform only. */
.is-wheeling { color: transparent !important; animation: none !important; }
.wheels { position: absolute !important; z-index: 1; display: inline-flex !important; margin: 0 !important; padding: 0 !important; white-space: nowrap; pointer-events: none; animation: none !important; transition: none !important; }
.wheel { display: inline-block; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, currentColor 18%, currentColor 82%, transparent); mask-image: linear-gradient(transparent, currentColor 18%, currentColor 82%, transparent); }
.wheel-strip { display: flex; flex-direction: column; }
.wheel-line, .wheel-still { display: block; }
/* One pressed feel for everything that can be tapped: it gives a little under the finger, at once. */
.btn, .tile, .tile-add, .tile-main, .quick-btn, .chip, .feel-btn, .send, .seg-btn, .tab, .row, .goal-btn, .back, .you-btn, .link, .toast-action, .icon-btn, .tell-cam, .pill, .fab, .add-btn, .top-icon, .top-day {
  transition: transform var(--m-press) ease, opacity var(--m-press) ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:active, .tile-add:active, .quick-btn:active, .chip:active, .feel-btn:active, .send:active, .back:active, .you-btn:active, .link:active, .toast-action:active, .icon-btn:active, .tell-cam:active, .pill:active, .fab:active, .add-btn:active, .top-icon:active, .top-day:active { transform: scale(0.96); }
.tile:active, .row:active, .goal-btn:active, .widget-card:active { transform: scale(0.98); }
.seg-btn:active, .tab:active { opacity: 0.6; }
.back:active, .you-btn:active, .link:active, .toast-action:active, .icon-btn:active, .row:active { opacity: 0.75; }
.tile-add:active, .quick-btn:active, .tell-cam:active { background: var(--track); }
.btn:disabled:active, .send:disabled:active { transform: none; }
.icon-btn:disabled:active { transform: none; opacity: 0.35; }
.tab .icon { transition: transform var(--m-press) var(--glide); }
.tab[aria-current="page"] .icon { transform: translateY(-1px); }
.step .tick:checked + label .step-title { transition: color 0.2s ease; }

/* When the phone asks for less motion, nothing slides, springs, grows or bursts: screens and sheets fade in, quickly.
   This comes last so it wins. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .mark .water { stroke-dashoffset: 0; animation: none; }
  .waters .wl { stroke-dashoffset: 0; animation: none; }
  .sk { animation: none; opacity: 0.7; }
  .sk::after { display: none; }
  .shell::before, .shell::after, .ritual-glow, .ritual-glow > i, .is-entering .rows > li { animation: none; }
  .burst { display: none; }
  .idea, .state, .msg.is-new, .rows > li.is-new, .board.is-opening .tile, .gate:not([hidden]) #intro-1 > *, .sheet[open] { animation: none; }
  .is-entering .level-fill, .is-entering .chart .bar, .is-entering .pip { animation: none; }
  .btn:active, .tile-add:active, .quick-btn:active, .chip:active, .feel-btn:active, .send:active, .back:active, .you-btn:active, .link:active, .toast-action:active, .icon-btn:active, .tell-cam:active, .pill:active, .tile:active, .row:active, .goal-btn:active, .fab:active, .add-btn:active, .top-icon:active, .top-day:active { transform: none; }
}

/* ---------- Remanso 3.0, Round A part 1: knowing you ---------- */
/* One question a day on Today: a card above the tiles, its reason and Skip on one quiet line. */
.ask-card { margin: 0 0 var(--s-5); }
.ask-title { margin-bottom: var(--s-3); }
.ask-card .sheet-actions { margin-top: var(--s-3); }
.ask-card .careful-list { font-size: var(--t-2); }
.ask-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); }
.ask-why { margin: 0; min-width: 0; }
.ask-skip { flex: none; }
.inline-fields { display: flex; align-items: center; gap: var(--s-3); }
.inline-fields > * { flex: 1 1 0; min-width: 0; }
.inline-fields > span { flex: none; }
/* The phase, under the membership card. */
.phase-pick { margin: 0 0 var(--s-5); }
.phase-pick .seg { margin-top: var(--s-2); }
.phase-pick .muted { margin: var(--s-2) 0 0; }
/* What Remanso knows: one line each, what it rests on under it, and its two actions. */
.know { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; }
.know + .know { border-top: 1px solid var(--hair); }
.know-acts { display: flex; flex: none; gap: var(--s-3); }
/* A routine before it starts, and the wind-down's length. */
.routine-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.routine-step { display: grid; grid-template-columns: 4rem 1fr; gap: var(--s-3); padding: var(--s-2) 0; }
.routine-step + .routine-step { border-top: 1px solid var(--hair); }
.routine-min { color: var(--ink-2); font-size: var(--t-2); }
.wind-len { margin: 0 0 var(--s-4); }
.wind-len .muted { margin: var(--s-2) 0 0; }
.suggest { margin: var(--s-4) 0; }
.rates summary { min-height: var(--tap); display: flex; align-items: center; color: var(--ink-2); font-size: var(--t-2); text-decoration: underline; text-underline-offset: 3px; list-style: none; }
.rates summary::-webkit-details-marker { display: none; }

/* ---------- The Off Switch (Remanso 3.0, the centrepiece) ---------- */
.off-card { margin: 0 0 var(--s-5); }
.off-card .sheet-actions { margin-top: var(--s-3); }
.ask-row { margin: 0 0 var(--s-4); }
.off-steps { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.off-steps li + li { border-top: 1px solid var(--hair); }
.off-said { margin: var(--s-3) 0 0; font-size: var(--t-2); color: var(--ink); }
.off-step.is-done .row-title { color: var(--ink-2); }
.guide-steps { margin: var(--s-4) 0; padding-left: var(--s-5); }
.guide-steps li { margin: 0 0 var(--s-3); }
.off-pause-link { margin-top: var(--s-3); }
/* One slow breath: a soft light that grows and settles. Still under Calm visuals and reduced motion. */
.breath { display: flex; justify-content: center; padding: var(--s-6) 0 var(--s-4); }
.breath-dot { display: block; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: breathe 5s var(--ease) infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.7); opacity: 0.25; } 45% { transform: scale(1); opacity: 0.5; } }
[data-calm] .breath-dot, [data-paused] .breath-dot { animation: none; }
@media (prefers-reduced-motion: reduce) { .breath-dot { animation: none; } }
.pause-line { text-align: center; }

/* ---------- What works for you, needs, Doing nothing, rest (Remanso 3.0, A9 to A12) ---------- */
.feel-now { margin-top: var(--s-5); }
.feel-now .field-label { margin-bottom: var(--s-2); }
.moment-row { margin-top: 0; }
.needs-grid .add-btn { min-height: 4.5rem; }
.rest-today { margin: var(--s-5) 0; }
/* Doing nothing: the sheet becomes the whole screen; slow light, a breathing shape, or a dark, still screen. */
.sheet-still { max-height: none; height: 100%; }
.still-stage { position: relative; height: 16rem; margin: 0 0 var(--s-4); border-radius: var(--r-3); overflow: hidden; background: var(--surface); }
/* Silence is a dark, still screen: the toast's dark colour by day, the page itself in the evening and at night. */
.still-stage.is-dark { background: var(--toast-bg); }
:root[data-phase="evening"] .still-stage.is-dark, :root[data-phase="night"] .still-stage.is-dark { background: var(--bg); }
.still-light i { position: absolute; width: 14rem; height: 14rem; border-radius: 50%; background: var(--accent); opacity: 0.18; filter: blur(2.5rem); animation: drift 40s var(--ease) infinite alternate; }
.still-light i:nth-child(1) { left: -3rem; top: -2rem; }
.still-light i:nth-child(2) { right: -4rem; top: 3rem; opacity: 0.12; animation-duration: 55s; }
.still-light i:nth-child(3) { left: 30%; bottom: -6rem; opacity: 0.1; animation-duration: 70s; }
.still-light.is-dim i { opacity: 0.08; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(2.5rem, 1.5rem) scale(1.15); } }
.still-breath { display: flex; align-items: center; justify-content: center; height: 100%; }
.still-breath span { display: block; width: 7rem; height: 7rem; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: still-breathe 10s var(--ease) infinite; }
@keyframes still-breathe { 0%, 100% { transform: scale(0.6); opacity: 0.2; } 40% { transform: scale(1); opacity: 0.45; } }
[data-calm] .still-light i, [data-calm] .still-breath span, [data-paused] .still-light i, [data-paused] .still-breath span { animation: none; }
@media (prefers-reduced-motion: reduce) { .still-light i, .still-breath span { animation: none; } }
.still-controls { margin: 0 0 var(--s-4); }
.still-line { margin: var(--s-3) 0 0; }
.rested-ask { margin: var(--s-5) 0 0; }
.rested-ask .field-label { margin-bottom: var(--s-2); }

/* Tonight, for you: the script read on the screen, one line at a time, with room for the pauses. */
.tonight-text { margin: var(--s-4) 0; }
.tonight-line { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.5; margin: 0 0 var(--s-2); }
.tonight-pause { height: var(--s-4); }

/* The coach (Remanso 3.0, A6): a quiet line between days, options as chips with their trade-off, a kept note. */
.chat-day { text-align: center; color: var(--ink-2); font-size: var(--t-1); margin: var(--s-4) 0 var(--s-2); }
.msg-options { margin-top: var(--s-3); }
.msg-option { flex-direction: column; align-items: flex-start; height: auto; min-height: var(--tap); padding-top: var(--s-2); padding-bottom: var(--s-2); }
.msg-tradeoff { display: block; color: var(--ink-2); font-size: var(--t-1); }
.chip[aria-pressed="true"] .msg-tradeoff { color: var(--on-accent); }
.msg-note { margin: var(--s-2) 0 0; color: var(--ink-2); font-size: var(--t-1); }
.composer-ticks { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); }
.tab.has-new::after { content: ''; position: absolute; top: 8px; right: calc(50% - 16px); width: 7px; height: 7px; border-radius: 50%; background: var(--fill); }

/* Round B: your day, planned. */
.plan-card { margin-bottom: var(--s-4); }
.plan-line { margin: var(--s-1) 0 0; font-size: var(--t-3); color: var(--ink); }
.plan-acts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-item { display: flex; gap: var(--s-3); padding: var(--s-3) 0; }
.plan-item + .plan-item { border-top: 1px solid var(--hair); }
.plan-time { flex: none; width: 3.25rem; color: var(--ink-2); font-size: var(--t-2); padding-top: 2px; }
.plan-main { flex: 1; min-width: 0; }
.plan-item.is-done .plan-line, .plan-item.is-skipped .plan-line { color: var(--ink-2); }
#dayNext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Round C: the journal. */
.journal-text { min-height: 8rem; }
.journal-prompt { display: block; margin: 0 0 var(--s-2); text-align: left; }
.journal-prompt[aria-pressed="true"] { color: var(--ink); }
.journal-back + .journal-back { margin-top: var(--s-3); }
.journal-line { margin: 0 0 var(--s-2); font-size: var(--t-3); color: var(--ink); white-space: pre-wrap; }
/* Round D: Circles. */
.circle-member { padding: var(--s-3) 0; }
.circle-member + .circle-member { border-top: 1px solid var(--hair); }
.circle-shares { list-style: none; margin: var(--s-1) 0 0; padding: 0; }
.circle-share + .circle-share { margin-top: var(--s-2); }
.circle-got { margin: var(--s-3) 0 var(--s-5); }
/* Remanso Resets. */
.reset-pick { padding: var(--s-3) 0; }
.reset-pick + .reset-pick { border-top: 1px solid var(--hair); }

/* ---------- Round 8: Still Water, with Lamplight's evening (docs/DESIGN-STUDY.md; Alex, 17 Nov 2026) ----------
   Paper and ink: words and figures first, hairlines and space instead of boxes, editorial type, a fixed film grain,
   no gradient behind the content. The colours of the hour stay, quieter. From the wind-down, a warm lamp glows in one
   corner and breathes slowly (opacity only; still under Calm visuals and Reduce Motion). These rules come after the
   older ones on purpose, so they win. */
body { letter-spacing: -0.01em; }
/* The grain: drawn once, never animated, behind everything on the page. Darker specks by day, lighter at night. */
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.12 0 0 0 0 0.16 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"); }
:root:not([data-phase]) body::before, :root[data-phase="evening"] body::before, :root[data-phase="night"] body::before { opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.94 0 0 0 0 0.9 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"); }
.shell { z-index: 1; }
/* In the evening the lamp: a warm light in the top corner that breathes over nine seconds. */
/* Round 10 (Alex, 18 Nov 2026): the colours of the hour at their strength from before Round 8, so the sky behind the top of the
   screen is back. Round 8's layout, fonts, hairlines and icons stay. */
.shell::after { top: -120px; right: -140px; width: 380px; height: 380px; animation: sun-breathe 9s ease-in-out infinite alternate; }
/* The tab bar is solid: nothing blurred behind it. */
.tabs { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.tab { letter-spacing: 0.01em; }
/* Editorial type: a lighter, larger serif for titles; small labels in spaced capitals. */
.display { font-weight: 360; letter-spacing: -0.02em; line-height: 1.06; }
.section-title, .card-title, .sheet-title, .state-title, .sheet-sub { font-weight: 400; letter-spacing: -0.01em; }
.member-mark { font-size: var(--t-1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
/* Round 11 (docs/NEXT-11.md, 4): no small capitals on the screens; a label is a plain, quieter word. */
.card-label, .kicker { font-size: var(--t-2); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.kicker { display: block; margin: 0 0 var(--s-2); }
.display em { font-style: italic; }
/* Hairlines instead of cards: a card is space and a rule above it. */
.card, .state, .member-card, .brief-page, .sk-card, .idea, .places { background: transparent; box-shadow: none; border-radius: 0; }
.card, .state, .brief-page, .idea { padding: var(--s-4) 0; border-top: 1px solid var(--hair); }
.card-plain { border-top: 0; }
.places { padding: 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.member-card { padding: 0 0 var(--s-5); border-bottom: 1px solid var(--hair); }
.sk-card { padding: var(--s-4) 0; border-top: 1px solid var(--hair); }
.add-btn { background: transparent; box-shadow: none; border: 1px solid var(--hair); border-radius: var(--r-2); }
.add-btn .icon, .tile-icon { color: var(--ink); }
.tell-row .input { background: transparent; box-shadow: none; border: 1px solid var(--line); }
.msg-coach { background: transparent; box-shadow: none; border: 1px solid var(--hair); }
.notice, .tell-out { background: transparent; border: 1px solid var(--hair); }
/* Outlined choices, never filled: the chosen one takes a firm edge and the ink. */
.seg { border-color: var(--line); }
.seg-btn[aria-pressed="true"], .chip[aria-pressed="true"], .feel-btn[aria-pressed="true"], .goal-btn[aria-pressed="true"] { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.goal-btn[aria-pressed="true"] .goal-hint { color: var(--ink-2); opacity: 1; }
.chip[aria-pressed="true"] .msg-tradeoff { color: var(--ink-2); }
/* The + button: quiet, an outline of ink on the page, not a coloured disc. */
.fab { width: 56px; height: 56px; background: var(--bg); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
/* Icons are drawn as engraved lines: no fills. */
.icon-2 path, .icon-2 circle { fill: none; }
.update-icon { background: transparent; border: 1px solid var(--hair); }
.update.is-unread .update-icon { background: transparent; border-color: var(--accent); color: var(--accent); }
/* The member's initial, set in the serif, where a silhouette used to be. */
.avatar { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.avatar-s .avatar-letter { font-family: var(--font-display); font-size: var(--t-3); font-weight: 400; }
.top .you-btn { border-color: transparent; }

/* ---------- Round 8: Your day (Today as a personal home, docs/NEXT-7-HOME.md) ---------- */
.home-hello { margin: 0 0 var(--s-1); font-weight: 400; }
.home-line { font-family: var(--font-display); font-size: var(--d-1); font-weight: 360; line-height: 1.18; letter-spacing: -0.015em; margin: 0 0 var(--s-5); text-wrap: pretty; }
:root[data-phase="golden"] .home-line, :root[data-phase="evening"] .home-line { font-style: italic; }
.home-now { padding: var(--s-2) 0 var(--s-4); border-top: 1px solid var(--ink); }
.home-now-time { color: var(--accent); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.home-now-title { font-family: var(--font-display); font-size: var(--d-1); font-weight: 400; line-height: 1.2; letter-spacing: -0.005em; margin: 0 0 2px; }
.home-now-why { color: var(--ink-2); font-size: var(--t-2); }
.home-now-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.home-day-link { margin-left: auto; }
.home-ask { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--ink); text-align: left; font-size: var(--t-3); }
.home-ask .icon { color: var(--ink-2); }
.home-acts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.home-acts .btn { min-height: var(--tap); padding: var(--s-2) var(--s-4); }
.home-acts .btn-primary { flex: 1 1 auto; }
.home-next { margin: 0 0 var(--s-4); border-top: 1px solid var(--hair); }
.home-next-row { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: var(--tap); padding: 2px 0; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--ink); text-align: left; font-size: var(--t-3); }
.home-next-time { flex: none; width: 3.25rem; color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.home-next-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-coach { margin: 0 0 var(--s-4); }
.home-coach-line { font-size: var(--t-3); line-height: 1.4; margin: 0 0 var(--s-2); }
.home-coach .chips { margin: 0; }
.home-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 3.5rem; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.home-strip-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 56px; padding: var(--s-2) var(--s-2) var(--s-2) 0; border: 0; background: none; color: var(--ink); text-align: left; }
.home-strip-fig { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.home-strip-label { color: var(--ink-2); font-size: var(--t-1); letter-spacing: 0.08em; text-transform: uppercase; }
.home-strip-cell { min-width: 0; min-height: 0; border-top: 0; }
.home-strip-cell + .home-strip-cell, .home-strip-cell + .home-strip-btn { border-left: 1px solid var(--hair); }
.home-strip-btn .level { width: 100%; margin-top: var(--s-1); height: 2px; }
.home-strip-cell + .home-strip-cell .home-strip-btn, .home-strip-add { padding-left: var(--s-3); }
.home-strip-label { display: inline-flex; align-items: center; gap: var(--s-1); }
.home-strip-plus { display: inline-flex; color: var(--accent); }
.home-kick { position: relative; min-height: 0; margin: 0 0 var(--s-1); padding: var(--s-1) 0; border: 0; background: none; text-align: left; }
.home-kick::after { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, var(--tap)); height: max(100%, var(--tap)); transform: translate(-50%, -50%); }
.month-card { margin-top: var(--s-6); }
.home-strip-cell .home-strip-btn { width: 100%; }
.home-next-all { color: var(--ink-2); }
.home-next-all .icon { margin-left: auto; align-self: center; }
.home-strip-add { align-items: center; justify-content: center; color: var(--ink); }
.kicker.link { display: inline-flex; align-items: center; min-height: 0; margin: 0 0 var(--s-1); padding: var(--s-1) 0; text-decoration: none; color: var(--ink-2); font-size: var(--t-1); }
.home-noticed { margin: 0 0 var(--s-5); padding: var(--s-3) 0 0; border-top: 1px solid var(--hair); }
/* The numbered evening: the Off Switch's steps as an ordered list, 01 to 04. */
.off-steps { counter-reset: off; }
.off-steps > li { counter-increment: off; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); align-items: start; }
.off-steps > li::before { content: counter(off, decimal-leading-zero); padding-top: var(--s-4); color: var(--accent); font-family: var(--font-display); font-size: var(--d-1); font-variant-numeric: lining-nums tabular-nums; }
/* The set-up's last screen: the day, already planned. */
.aha-day { margin: var(--s-4) 0 var(--s-5); border-top: 1px solid var(--hair); }
.aha-row { display: flex; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--hair); }
.aha-row > :first-child { flex: none; width: 3.25rem; color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; padding-top: 2px; }
.is-entering .aha-row, .is-entering .home-next-row { animation: settle-in 0.36s var(--ease) backwards; }
.is-entering .aha-row:nth-child(2), .is-entering .home-next-row:nth-child(2) { animation-delay: 0.05s; }
.is-entering .aha-row:nth-child(3), .is-entering .home-next-row:nth-child(3) { animation-delay: 0.1s; }
.is-entering .aha-row:nth-child(n+4) { animation-delay: 0.15s; }
/* Statistics: this week's figure in the serif, last week's in words under it. */
.stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--s-1) var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--hair); }
.stat-name { color: var(--ink-2); font-size: var(--t-2); }
.stat-fig { font-family: var(--font-display); font-size: var(--d-1); font-variant-numeric: lining-nums tabular-nums; text-align: right; }
.stat-was { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--t-2); }
.loading .sk-now { height: 132px; border-radius: 0; }
.intro-step { margin: var(--s-4) 0 var(--s-2); }
.month-card { padding: var(--s-5) 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
@media (prefers-reduced-motion: reduce) { .is-entering .aha-row, .is-entering .home-next-row { animation: none; } }
/* Larger text on a small phone: the strip keeps its words inside each cell. */
:root[data-text="large"] .home-strip-fig, :root[data-text="larger"] .home-strip-fig { font-size: var(--t-3); }
.home-strip-label { flex-wrap: wrap; letter-spacing: 0.04em; }
.home-strip-btn { min-width: 0; overflow-wrap: anywhere; }
.home-strip { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(2.75rem, auto); }
@media (prefers-reduced-motion: reduce) { .home-strip-btn { transition: none; } }

/* Round 9: Your week, one row per day, set like Your day: the time, the thing, and Move and Drop at the right. */
.week-day { padding: var(--s-3) 0 var(--s-2); border-top: 1px solid var(--hair); }
.week-day .kicker { margin: 0 0 var(--s-1); }
.week-items { list-style: none; margin: 0; padding: 0; }
.week-item { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; align-items: center; gap: var(--s-2); min-height: var(--tap); }
.week-time { color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.week-title { font-size: var(--t-3); min-width: 0; }
.week-acts { display: inline-flex; gap: var(--s-3); }
.week-acts .link { padding: 0; min-height: 0; font-size: var(--t-2); }
.week-item.is-quiet .week-title, .week-item.is-quiet .week-time { color: var(--ink-2); font-size: var(--t-2); }
.week-item.is-gone .week-title { color: var(--ink-2); text-decoration: line-through; }

/* ---------- Round 10: everything in reach (docs/NEXT-10.md) ----------
   Ask or find at the top of Today, the plan line, the rest of the day under the strip, and the Plan tab. Round 8's
   hairlines and type; the colours of before Round 8. */
.ask { margin: 0 0 var(--s-4); }
.ask .tell-row .input { min-height: 48px; }
.ask-results { margin: var(--s-2) 0 0; }
.ask-results .row-card { min-height: var(--tap); }
.ask-conv { margin: var(--s-2) 0 0; }
.home-plan-line { border-top: 0; }
.home-plan-line .home-next-text { color: var(--ink-2); font-size: var(--t-2); }
.home-q { display: inline-flex; margin: var(--s-2) 0 0; }
.home-later { margin: var(--s-6) 0 var(--s-4); }
.home-later > .kicker { margin: 0 0 var(--s-1); }
.home-next-row.is-past .home-next-text, .home-next-row.is-past .home-next-time { color: var(--ink-2); }
.life-row { margin: var(--s-4) 0 0; }
.plan-group { margin: 0 0 var(--s-5); }
.plan-group .section-title { margin: 0 0 var(--s-2); }
/* The strip of one-tap logs stays in reach just above the tab bar while the rest of the day scrolls (Round 10). */
.home-strip { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px) + 2px); z-index: 5; background: var(--bg); }
/* A question asked once, where it is needed: one quiet line with its one-word way in. */
.home-q { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-2); margin: var(--s-2) 0 0; color: var(--ink-2); font-size: var(--t-2); }
.home-q .link { min-height: 0; padding: 0; font-size: var(--t-2); }

/* ---------- Round 11: clear sections, easy to use (docs/NEXT-11.md) ----------
   3.0's soft white cards and tiles are back on Today, Food and Sleep (the tile tokens above are 3.0's again), with
   Round 8's typefaces and Round 10's colours. Numbers, bars and icons instead of rows of words; no small capitals. */
.view-home .home-hello { font-family: var(--font-display); font-size: var(--d-2); font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 var(--s-1); }
.view-home .home-line { font-size: var(--d-1); margin: 0 0 var(--s-4); }
/* The four add tiles: big, two by two. The whole tile adds; a + says so; the Tasks tile ticks its next task. */
.add-board { gap: var(--s-3); margin: 0 0 var(--s-3); }
.add-tile { min-height: 0; }
.tile-open { gap: var(--s-1); padding: var(--s-3) var(--s-4) var(--s-3); cursor: pointer; }
.tile-top { display: flex; align-items: center; gap: var(--s-1); padding-right: var(--tap); color: var(--ink-2); }
.tile-label { color: var(--ink-2); font-size: var(--t-2); }
.add-tile .tile-figure { margin-top: var(--s-2); }
.add-tile .tile-big { font-size: var(--d-5); }
.add-tile .level { margin-top: var(--s-1); }
.level-none { display: block; height: 3px; }
.tile-sub { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: var(--t-2); }
.tile-plus { position: absolute; top: var(--s-2); right: var(--s-2); width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.tile-tick { position: absolute; top: var(--s-1); right: var(--s-1); width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.tile-tick::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--accent); }
.tile-tick .icon { position: relative; }
.add-any { display: flex; align-items: center; justify-content: center; gap: var(--s-2); margin: 0 0 var(--s-4); }
/* Now: one soft card with two buttons. The time sits before the title. */
.view-home .home-now { padding: var(--s-4); border: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); margin: 0 0 var(--s-3); }
.home-now-title .home-now-time { margin-right: var(--s-2); color: var(--accent); font-family: var(--font-text); font-size: var(--t-3); font-variant-numeric: tabular-nums; }
.view-home .home-acts { margin-top: var(--s-3); }
.home-now-why.link { min-height: 0; padding: 0; text-decoration: none; }
/* The assistant's line: one tap to the conversation. */
.view-home .home-coach { margin: 0; }
.home-coach-btn { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: var(--ctl); padding: var(--s-2) 0; border: 0; border-top: 1px solid var(--hair); background: none; color: var(--ink); text-align: left; }
.home-coach-btn .home-coach-line { flex: 1; min-width: 0; margin: 0; font-size: var(--t-3); line-height: 1.35; }
.home-coach-icon { flex: none; display: inline-flex; color: var(--accent); }
.home-coach-btn > .icon { color: var(--ink-2); }
.view-home .home-coach .chips { margin: 0 0 var(--s-2); }
/* The Assistant: today at the top, the conversation, then the chips and one input. */
.ai-today { margin: 0 0 var(--s-4); }
.ai-today .title-row { align-items: baseline; }
.ai-list { margin: 0; }
.ai-row label { display: flex; align-items: baseline; gap: var(--s-2); }
.ai-time { flex: none; min-width: 3rem; color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.ai-empty { padding: 0; }
.ai-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0; padding: 0 0 2px; scrollbar-width: none; }
.ai-chips::-webkit-scrollbar { display: none; }
.ai-chips .chip { flex: none; }
.composer .ask-results { margin: 0; max-height: 40vh; overflow-y: auto; }
.msg-card { display: flex; margin-top: var(--s-2); }
.msg-undone { color: var(--ink-2); font-size: var(--t-2); }
/* Food: Add a meal first, calories with a bar, three small tiles, the meals, three links as tiles. */
.food-add { display: flex; align-items: center; justify-content: center; gap: var(--s-2); margin: 0 0 var(--s-4); }
.food-hero { min-height: 0; padding: var(--s-4); margin: 0 0 var(--s-3); }
.food-hero-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.food-hero .level { margin-top: var(--s-3); }
.food-left { color: var(--ink-2); font-size: var(--t-2); }
.food-smalls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0 0 var(--s-4); }
.food-small { min-height: 0; padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); }
.food-small .tile-big, .sleep-time .tile-big, .sleep-num .tile-big { font-size: var(--d-1); }
.food-small .level { margin-top: auto; }
.food-water-add { align-self: flex-start; }
.food-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-4) 0; }
.sleep-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.food-link { min-height: 0; padding: var(--s-3); border: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); color: var(--ink); text-align: left; }
.food-link .icon { color: var(--accent); }
.food-link-title { font-size: var(--t-2); font-weight: 500; }
.meal-quick { margin: 0 0 var(--s-4); }
.meal-quick .chips { margin: 0; }
.meal-quick-row { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
/* Sleep: three times, the steps, the plan, last night, two tiles. */
.sleep-tonight { margin: 0 0 var(--s-4); }
.sleep-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0 0 var(--s-3); }
.sleep-time, .sleep-plan-tile, .sleep-last { min-height: 0; padding: var(--s-3); border: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); color: var(--ink); text-align: left; width: 100%; }
.sleep-plan { margin: 0 0 var(--s-3); }
.sleep-plan-tile .level { width: 100%; }
.sleep-last { margin: 0 0 var(--s-3); }
.sleep-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); width: 100%; }
.sleep-num { display: flex; flex-direction: column; gap: 2px; }
.training-card { margin: 0 0 var(--s-3); }
/* Clear my head: one box, three piles, one closing line. */
.clear-q { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.25; margin: 0 0 var(--s-3); }
.clear-box { min-height: 9rem; }
.clear-pile { margin: var(--s-4) 0 0; }
.clear-pile .sheet-sub { display: flex; justify-content: space-between; align-items: baseline; }
.clear-list { list-style: none; margin: 0; padding: 0; }
.clear-item { padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
.clear-line { display: flex; align-items: center; gap: var(--s-2); }
.clear-when { flex: none; min-width: 3.75rem; color: var(--accent); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.clear-text { flex: 1; min-width: 0; font-size: var(--t-3); }
.clear-drop { flex: none; }
.clear-moves { margin: var(--s-1) 0 0; }
.clear-step { display: flex; gap: var(--s-2); align-items: center; margin: var(--s-2) 0 0; }
.clear-step .input { flex: 1; }
.clear-closing { font-family: var(--font-display); font-size: var(--d-2); font-weight: 360; line-height: 1.25; margin: var(--s-4) 0 var(--s-6); }
@media (prefers-reduced-motion: reduce) { .add-tile, .tile-tick { transition: none; } }
/* Round 11: Today fits one iPhone screen; the tiles are big but not tall. */
.view-home .home-line { font-size: var(--t-3); font-family: var(--font-text); font-style: normal; line-height: 1.4; color: var(--ink-2); margin: 0 0 var(--s-2); }
.add-board { gap: var(--s-2); margin: 0 0 var(--s-2); }
.tile-open { padding: var(--s-3); gap: 2px; }
.add-tile .tile-figure { margin-top: var(--s-1); }
.add-tile .tile-big { font-size: var(--d-2); }
.tile-plus { width: 28px; height: 28px; top: var(--s-2); right: var(--s-2); }
.add-any { min-height: var(--tap); margin: 0 0 var(--s-3); }
.view-home .home-now { padding: var(--s-2) var(--s-4) var(--s-3); margin: 0 0 var(--s-2); }
.view-home .home-now-title { font-size: var(--d-1); }
.view-home .home-acts { margin-top: var(--s-2); }
/* Sleep: the steps are a quiet list under the three times. */
.sleep-tonight .step { padding: var(--s-1) 0; }
.sleep-tonight .step-title { font-family: var(--font-text); font-size: var(--t-3); line-height: 1.4; padding-top: 2px; }
/* Clear my head: each item on one line with its moves as quiet links under it. */
.clear-moves { display: flex; gap: var(--s-4); margin: 2px 0 0 calc(3.75rem + var(--s-2)); }
.clear-move { position: relative; min-height: 0; padding: 2px 0; font-size: var(--t-2); color: var(--ink-2); }
.clear-move::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--tap)); height: var(--tap); transform: translate(-50%, -50%); }
.clear-pile[aria-label="Put down"] .clear-moves { margin-left: 0; }
@media (prefers-reduced-motion: reduce) { .clear-move { transition: none; } }
.add-board .tile-open { padding: var(--s-2) var(--s-3) var(--s-2); gap: 0; }
.add-board .tile-top { min-height: 28px; }
.add-board .tile-figure { margin-top: 0; }
.add-board .level { margin: var(--s-1) 0 2px; }
.view-home .home-coach-btn { min-height: var(--tap); padding: 0; }
/* NEXT-16, 1: on Today the assistant's line is a second line, in the second size, so Today still fits one screen. */
.view-home .home-coach-btn .home-coach-line { font-size: var(--t-2); }
.home-q-row { display: flex; align-items: center; gap: var(--s-3); border-top: 1px solid var(--hair); }
.home-q-row .home-coach-btn { border-top: 0; flex: 1; min-width: 0; }
.home-q-skip, .home-skip { position: relative; min-height: 0; padding: 0; font-size: var(--t-2); color: var(--ink-2); }
.home-q-skip::after, .home-skip::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--tap)); height: var(--tap); transform: translate(-50%, -50%); }
@media (prefers-reduced-motion: reduce) { .home-q-skip { transition: none; } }
.food-small .figure-btn { position: relative; min-height: 0; color: var(--ink-2); font-size: var(--t-2); text-decoration: underline; text-underline-offset: 3px; }
.food-small .figure-btn::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, var(--tap)); height: var(--tap); transform: translate(-50%, -50%); }
.sleep-headline { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.25; margin: calc(-1 * var(--s-2)) 0 var(--s-4); }
.add-board .tile-open { padding: var(--s-1) var(--s-3) var(--s-2); }
.add-board .tile-top { min-height: 24px; }
.add-board .tile-plus { top: 6px; }
.view-home .home-hello { font-size: var(--d-1); }
.ai-q { margin: 0 0 var(--s-4); }
.food-small .figure-btn { display: flex; align-items: center; min-height: var(--tap); margin: calc(var(--s-3) * -1) 0; }
.ai-row label { flex-direction: row; align-items: baseline; flex-wrap: nowrap; }
.ai-row .check-title { flex: 1; min-width: 0; }
.tap-url { font-size: var(--t-2); overflow-wrap: anywhere; color: var(--ink); margin: var(--s-1) 0 var(--s-2); }
.stone-steps { margin: 0 0 var(--s-3); padding-left: var(--s-5); }
.stone-steps li { margin: 0 0 var(--s-1); }

/* ---------- Round 12: the Gym section (docs/NEXT-12-GYM.md) ----------
   Only for a member who said they train. Tiles and numbers, not paragraphs; nothing red or green; a lift's progress is
   a thin line in the hour's accent, never a ring or a grade. */
/* Six sections on a 375-point phone: each tab is still about 60 points wide, with its one short word. */
.tabs[data-count="6"] { padding-left: max(2px, env(safe-area-inset-left, 0px)); padding-right: max(2px, env(safe-area-inset-right, 0px)); }
.tabs[data-count="6"] .tab { padding-left: 0; padding-right: 0; letter-spacing: 0; }
.gym-head { display: inline-flex; align-items: center; }
.gym-today { min-height: 0; padding: var(--s-4); margin: 0 0 var(--s-2); display: grid; gap: var(--s-2); }
.gym-name { font-family: var(--font-display); font-weight: 400; font-size: var(--d-2); line-height: 1.15; letter-spacing: -0.01em; }
.gym-sub { color: var(--ink-2); font-size: var(--t-2); }
.gym-xs { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.gym-x { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
.gym-x:first-child { border-top: 0; }
.gym-x-name { min-width: 0; font-size: var(--t-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gym-x-target { flex: none; color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.gym-start { margin-top: var(--s-2); min-height: 56px; font-weight: 600; }
.gym-today .link { justify-self: start; }
.gym-today .title-row .link, .gym-block .section-head .link, .wo-card .title-row .link { position: relative; min-height: 0; padding: 0; }
.gym-miss { padding-top: var(--s-2); border-top: 1px solid var(--hair); }
.gym-miss .home-acts { margin-top: var(--s-2); }
.gym-block { margin-top: var(--s-6); }
.gym-block .places { margin-bottom: 0; }
.gym-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.gym-day { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); min-width: 0; min-height: 80px; padding: var(--s-1) 0; border: 0; background: none; color: var(--ink); touch-action: pan-y; }
.gym-day-name { color: var(--ink-2); font-size: var(--t-1); }
.gym-day-dot { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--on-accent); }
.gym-day.has-workout .gym-day-dot { border-color: var(--ink); }
.gym-day.is-done .gym-day-dot { background: var(--accent); border-color: var(--accent); }
.gym-day.is-today .gym-day-dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }
.gym-day-what { max-width: 100%; font-size: var(--t-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gym-day:not(.has-workout) .gym-day-what { color: var(--ink-2); }
.gym-day.is-dragging { position: relative; z-index: 2; opacity: 0.85; }
.spark { flex: none; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.spark-dot { fill: var(--accent); }
.gym-lift .row-sub { font-variant-numeric: tabular-nums; }
/* Make my program, and a workout's exercises. */
.gym-make-days { display: grid; gap: var(--s-4); margin: 0 0 var(--s-1); }
.gym-make-day { display: grid; gap: var(--s-2); }
.gym-make-day .title-row .input, .gym-new-day .input { flex: 1; }
.gym-wds { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-1); }
.gym-wd { min-height: var(--tap); padding: 0; border: 1px solid var(--line); border-radius: var(--r-2); background: transparent; color: var(--ink); font-size: var(--t-2); }
.gym-wd[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 600; }
.gym-new-day { margin: 0 0 var(--s-4); }
.gym-prog-acts { margin-top: var(--s-2); }
.gym-edit-list { margin: 0 0 var(--s-3); padding: 0; list-style: none; }
.gym-edit-row { display: flex; align-items: center; gap: var(--s-1); border-top: 1px solid var(--hair); }
.gym-edit-row:first-child { border-top: 0; }
.gym-edit-row.is-dragging { position: relative; z-index: 2; opacity: 0.9; }
.gym-handle { flex: none; touch-action: none; cursor: grab; }
.gym-edit-main { flex: 1; min-width: 0; }
.gym-groups { margin: var(--s-2) 0; }
.sheet-body .gym-groups { margin: var(--s-3) 0 var(--s-2); }
.gym-results { display: grid; max-height: 44vh; overflow-y: auto; margin: 0 0 var(--s-2); }
.gym-results > * + * { border-top: 1px solid var(--hair); }
.gym-pick-done { margin-top: var(--s-3); }
.train-row { margin: 0 0 var(--s-3); }
.gym-past-row { margin: 0 0 var(--s-4); }
.sheet-body .lift-session { grid-template-columns: 7.5rem minmax(0, 1fr); }
.intro-train { margin-top: var(--s-4); }
/* A workout in progress: the current exercise, its sets as rows, and the rest timer at the foot, above the tabs. */
.view-workout { padding-bottom: var(--s-11); }
.wo-head { align-items: baseline; margin: 0 0 var(--s-3); }
.wo-head .wo-title { margin: 0; }
.wo-clock { flex: none; color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.wo-steps { margin: 0 0 var(--s-3); }
.wo-step { display: inline-flex; align-items: center; gap: var(--s-1); }
.wo-step.is-done { color: var(--ink-2); }
.wo-card { min-height: 0; padding: var(--s-4); display: grid; gap: var(--s-2); }
.wo-ex { min-width: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--d-2); line-height: 1.15; letter-spacing: -0.01em; }
.wo-target { color: var(--ink-2); font-size: var(--t-2); }
.wo-hint { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--hair); }
.wo-hint-text { font-size: var(--t-2); }
.wo-hint .btn { flex: none; }
.wo-table { display: grid; }
.wo-row { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) 4.5rem 3.75rem var(--tap); align-items: center; gap: var(--s-2); min-height: 58px; border-top: 1px solid var(--hair); }
.wo-row-head { min-height: 0; padding: 0 0 var(--s-1); border-top: 0; color: var(--ink-2); font-size: var(--t-1); }
.wo-row-head span:nth-child(n+3) { text-align: center; }
.wo-n, .wo-prev { color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.wo-prev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-num { min-width: 0; min-height: var(--tap); padding: 0 var(--s-1); border: 1px solid var(--line); border-radius: var(--r-2); background: transparent; color: var(--ink); font-family: var(--font-display); font-size: var(--d-1); font-variant-numeric: lining-nums tabular-nums; }
.wo-num.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.wo-none { border: 0; }
.wo-row.is-done .wo-num, .wo-row.is-done .wo-n { color: var(--ink-2); }
.wo-tick { justify-self: center; width: var(--tap); height: var(--tap); }
.wo-adjust { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) 0 var(--s-3); }
.wo-adjust .input { flex: 1; min-width: 0; text-align: center; font-family: var(--font-display); font-size: var(--d-1); }
.wo-step-btn { flex: none; width: 56px; height: 56px; }
.wo-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); border-top: 1px solid var(--hair); }
.wo-foot { display: grid; gap: var(--s-2); margin: var(--s-5) 0 0; }
.wo-pain { text-align: center; }
.wo-bests { display: grid; gap: var(--s-1); margin: var(--s-3) 0; padding: 0; list-style: none; }
.rest-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); z-index: 19; background: var(--surface); box-shadow: var(--float); }
.rest-bar[hidden] { display: none; }
.rest-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); max-width: 30rem; margin: 0 auto; padding: var(--s-2) var(--gutter) var(--s-3); }
.rest-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rest-clock { font-family: var(--font-display); font-size: var(--d-5); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.rest-bar.is-over .rest-clock { font-size: var(--d-2); animation: rest-pulse 1.6s var(--ease) 3; }
.rest-next { color: var(--ink-2); font-size: var(--t-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rest-acts { flex: none; display: flex; gap: var(--s-1); }
.rest-acts .btn { min-width: var(--tap); padding: var(--s-2) var(--s-2); }
.rest-bar.is-over #restLess, .rest-bar.is-over #restMore { display: none; }
.rest-bar.is-over #restSkip { border-color: var(--line); color: var(--ink); padding: var(--s-2) var(--s-4); }
@keyframes rest-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(1.04); } }
/* One exercise's page. */
.lift-title { margin-bottom: 0; }
.lift-group { margin: 0 0 var(--s-4); }
.lift-stats { margin: var(--s-4) 0 0; }
.lift-block { margin-top: var(--s-6); }
.chart .lift-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .lift-dot { fill: var(--accent); }
.chart-lift { margin: 0 0 var(--s-4); }
.lift-list { margin: 0; padding: 0; list-style: none; }
.lift-session { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--hair); font-size: var(--t-2); }
.lift-day { color: var(--ink-2); }
.hist-best { color: var(--ink); font-weight: 600; }
.lift-sets { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .rest-bar.is-over .rest-clock { animation: none; } .rest-fill { transition: none; } }

/* ---------- Round R19-GYM: the look of Gym (24 Nov 2026) ---------- */
/* The body in 2D: smooth stones in the page's quiet ink; a group lit in the training colour, or half lit. */
.body-map { display: block; overflow: visible; }
.bm-part { fill: color-mix(in srgb, var(--ink) 10%, transparent); }
.bm-part.bm-base { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.bm-part.lv-2 { fill: color-mix(in srgb, var(--c-train) 50%, transparent); }
.bm-part.lv-3 { fill: var(--c-train); }
/* Pictures: black and white, cut to their frame; a group drawn on the body where there is none. */
.ex-pic { position: relative; display: block; overflow: hidden; background: color-mix(in srgb, var(--ink) 6%, var(--tile)); }
.ex-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ex-pic.is-glyph { display: flex; align-items: center; justify-content: center; }
.ex-glyph { width: auto; height: 82%; }
.row-pic { flex: none; width: 56px; height: 42px; margin-right: var(--s-3); border-radius: var(--r-1); }
/* Today's workout: one hero card. */
.gym-hero { padding: var(--s-5) var(--s-4) var(--s-4); gap: var(--s-3); overflow: hidden; }
.gym-hero::before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--c-train) 20%, transparent) 0%, transparent 62%); pointer-events: none; }
.gym-hero > * { position: relative; }
.gym-hero-top { display: flex; align-items: flex-start; gap: var(--s-3); }
.gym-hero-text { flex: 1; min-width: 0; display: grid; gap: var(--s-1); align-content: start; }
.gym-hero-text .title-row { margin: 0; }
.gym-eyebrow { margin: 0; color: var(--c-train); font-size: var(--t-2); font-weight: 600; }
.gym-done-mark { display: inline-flex; align-items: center; gap: var(--s-1); }
.gym-hero-name { font-size: var(--d-3); line-height: 1.05; }
.gym-meta { margin: 0; color: var(--ink-2); font-size: var(--t-2); }
.gym-hero-body { flex: none; width: 112px; height: auto; }
.gym-done { background: color-mix(in srgb, var(--c-train) 10%, var(--tile)); }
/* The exercises as a strip of pictures that scrolls sideways inside the card. */
.gym-strip { display: flex; gap: var(--s-3); margin: 0 calc(var(--s-4) * -1); padding: 0 var(--s-4) var(--s-1); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gym-strip::-webkit-scrollbar { display: none; }
.gym-strip .gym-x { flex: none; display: grid; align-content: start; gap: 2px; width: 136px; padding: 0; border-top: 0; scroll-snap-align: start; }
.gym-strip-pic { width: 136px; height: 92px; margin: 0 0 var(--s-1); border-radius: var(--r-2); }
.gym-strip .gym-x-name { font-size: var(--t-2); font-weight: 600; line-height: 1.25; white-space: normal; }
.gym-strip .gym-x-target { font-size: var(--t-1); }
/* Smart day, #12: the next small step under its exercise, in the training words' colour (never a colour that judges). */
.gym-x-step { color: var(--w-train); font-size: var(--t-1); font-weight: 600; font-variant-numeric: tabular-nums; }
/* This week: the day circles, then the body, trained groups glowing. */
.gym-day.has-workout .gym-day-dot { border-color: transparent; background: color-mix(in srgb, var(--c-train) 18%, transparent); }
.gym-day.is-done .gym-day-dot { border-color: var(--c-train); background: var(--c-train); color: var(--bg); }
.gym-week-body { display: grid; justify-items: center; gap: var(--s-2); margin: var(--s-3) 0 0; padding: var(--s-4); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.gym-week-map { width: 188px; height: auto; }
.gym-week-key { margin: 0; }
/* Programs: cover cards in a row that scrolls sideways. */
.prog-covers { display: flex; gap: var(--s-3); margin: 0 calc(var(--gutter) * -1); padding: var(--s-1) var(--gutter) var(--s-3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.prog-covers::-webkit-scrollbar { display: none; }
.prog-cover { flex: none; display: grid; grid-template-rows: auto auto; width: 200px; min-height: 0; padding: 0; border: 0; border-radius: var(--r-3); overflow: hidden; background: var(--tile); box-shadow: var(--edge), var(--lift); color: var(--ink); text-align: left; scroll-snap-align: start; }
.prog-cover.is-active { outline: 2px solid var(--c-train); outline-offset: -2px; }
.prog-cover-pic { width: 100%; height: 112px; }
.prog-cover-text { display: grid; gap: 2px; padding: var(--s-3) var(--s-4) var(--s-4); }
/* The workout: one exercise per screen. */
.view-workout { padding-bottom: 200px; }
.wo-head { align-items: center; }
.wo-clock { color: var(--ink); font-family: var(--font-display); font-size: var(--d-1); font-variant-numeric: lining-nums tabular-nums; }
.wo-stepbar { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-3); }
.wo-steps { flex: 1; min-width: 0; display: flex; gap: var(--s-2); margin: 0; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.wo-steps::-webkit-scrollbar { display: none; }
.wo-step { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink-2); font-size: var(--t-2); }
.wo-step[aria-pressed="true"] { border-color: var(--c-train); box-shadow: inset 0 0 0 1px var(--c-train); color: var(--ink); font-weight: 600; }
.wo-step.is-done { border-color: var(--c-train); background: var(--c-train); color: var(--bg); }
.wo-step-of { flex: none; color: var(--ink-2); font-size: var(--t-2); }
.wo-card { padding: 0; gap: 0; overflow: hidden; }
.wo-pic { width: 100%; height: 220px; }
.wo-pic::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(180deg, transparent, var(--tile)); pointer-events: none; }
.wo-body { position: relative; display: grid; gap: var(--s-2); margin: calc(var(--s-5) * -1) 0 0; padding: 0 var(--s-4) var(--s-4); }
.wo-ex { font-size: var(--d-3); line-height: 1.05; }
.wo-facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.muscle-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.muscle-chip { display: inline-flex; align-items: center; padding: 2px var(--s-3); border-radius: var(--r-pill); background: color-mix(in srgb, var(--c-train) 18%, transparent); color: var(--ink); font-size: var(--t-1); font-weight: 600; }
.wo-last { color: var(--ink-2); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.wo-row { grid-template-columns: 2.75rem minmax(0, 1fr) minmax(0, 1fr) var(--tap); }
.wo-row-head span:nth-child(2) { text-align: center; }
.wo-row.is-current { margin: 0 calc(var(--s-2) * -1); padding: 0 var(--s-2); border-top-color: transparent; border-radius: var(--r-2); background: color-mix(in srgb, var(--c-train) 10%, transparent); }
.wo-row.is-current + .wo-row { border-top-color: transparent; }
.wo-row.is-current .wo-num { min-height: 52px; border-color: color-mix(in srgb, var(--c-train) 60%, var(--line)); font-size: var(--d-2); }
.wo-row.is-best .wo-num { border-color: var(--ink); color: var(--ink); }
.wo-best-word { color: var(--ink); font-size: var(--t-1); font-weight: 600; }
.wo-row.is-new-best { animation: best-in 0.28s var(--ease) both; }
.wo-row.is-new-best .wo-best-word { animation: best-word 0.28s var(--ease) 0.06s both; }
@keyframes best-in { from { opacity: 0.4; transform: scale(0.98); } }
@keyframes best-word { from { opacity: 0; transform: translateY(var(--s-1)); } }
.wo-done { min-height: 56px; margin: var(--s-2) 0 0; font-weight: 600; }
/* The rest: a calm stone that fills while the time passes, the clock, and what comes next. */
.rest-bar { border-radius: var(--r-4) var(--r-4) 0 0; }
.rest-row { justify-content: flex-start; gap: var(--s-4); padding: var(--s-4) var(--gutter) var(--s-2); }
.rest-stone { flex: none; display: block; }
.rest-stone-track { fill: color-mix(in srgb, var(--c-train) 12%, transparent); stroke: color-mix(in srgb, var(--c-train) 55%, transparent); stroke-width: 1.5; }
.rest-fill { fill: var(--c-train); transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.5s linear; }
.rest-main { gap: var(--s-1); }
.rest-next { color: var(--ink-2); font-size: var(--t-2); white-space: normal; }
.rest-acts { max-width: 30rem; margin: 0 auto; padding: 0 var(--gutter) var(--s-3); gap: var(--s-2); }
.rest-acts .btn { flex: 1; }
/* Finish: a summary card. */
.cheer-mark.wo-sum-body { display: flex; justify-content: center; width: auto; height: auto; margin: 0 0 var(--s-2); }
.wo-sum-map { width: 172px; height: auto; }
.wo-echo { margin: var(--s-2) 0 0; color: var(--w-train); font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.wo-sum-said { margin: 0 0 var(--s-2); text-align: center; font-variant-numeric: tabular-nums; }
.wo-sum-worked { margin: 0 0 var(--s-3); color: var(--ink-2); font-size: var(--t-2); text-align: center; }
.wo-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0 0 var(--s-3); }
.wo-summary .stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: var(--s-3); border: 0; border-radius: var(--r-2); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.wo-summary .stat-fig { font-size: var(--d-1); line-height: 1.15; text-align: left; }
.wo-summary .stat-name { font-size: var(--t-1); }
.wo-summary .stat[data-stat="volume"] { grid-column: 1 / -1; background: color-mix(in srgb, var(--c-train) 14%, transparent); }
.wo-summary .stat[data-stat="volume"] .stat-fig { font-size: var(--d-3); }
.wo-best { display: flex; align-items: center; gap: var(--s-2); color: var(--ink); font-size: var(--t-2); font-weight: 600; }
.wo-best-dot { flex: none; width: var(--s-2); height: var(--s-2); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 var(--s-1) var(--glow); }
/* One exercise's page: its picture first. */
.lift-pic { height: 200px; margin: var(--s-3) 0 var(--s-4); border-radius: var(--r-3); }
:root[data-calm] .wo-row.is-new-best, :root[data-calm] .wo-row.is-new-best .wo-best-word { animation: none; }
@media (prefers-reduced-motion: reduce) { .wo-row.is-new-best, .wo-row.is-new-best .wo-best-word { animation: none; } .rest-fill { transition: none; } }

/* ---------- Round 12 fix (docs/NEXT-12-FIX.md): the photo first, the calendar, paste a program ---------- */
/* Add a meal: the photo is the first and biggest choice. A large button with a camera on it, the library beside it. */
.meal-photo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-2); margin: 0 0 var(--s-3); }
.meal-photo .btn { min-height: 76px; padding: var(--s-3); }
.meal-photo-take { gap: var(--s-3); font-weight: 600; }
.meal-quick .meal-photo + .chips { margin-top: 0; }
/* Today's Food tile: a small camera in the corner, where the Tasks tile has its tick. */
.tile-cam { color: var(--ink); }
.tile-cam::before { box-shadow: inset 0 0 0 1px var(--line); }
/* A meal's photo: a small rounded picture beside it in a list, and bigger at the top of its own sheet. */
.row-photo { width: 48px; height: 48px; border-radius: var(--r-2); }
.meal-shot { display: block; width: 144px; height: 144px; margin: 0 auto var(--s-4); border-radius: var(--r-3); object-fit: cover; background: var(--track); box-shadow: var(--edge); }
/* While a photo is read, the photo itself waits: large, with a soft light passing over it. */
.photo-wait { display: grid; justify-items: center; gap: var(--s-3); }
.photo-big { position: relative; overflow: hidden; width: min(100%, 220px); aspect-ratio: 1; border-radius: var(--r-3); background: var(--track); }
.photo-big-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-big-blank { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--ink-2); }
.photo-thumb-wrap { position: relative; flex: none; display: block; overflow: hidden; width: 72px; height: 72px; border-radius: var(--r-2); }
.is-loading > img { animation: photo-breathe 1.8s ease-in-out infinite alternate; }
.is-loading::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--shine), transparent); transform: translateX(-100%); animation: shimmer 1.6s ease-in-out infinite; }
@keyframes photo-breathe { from { opacity: 1; } to { opacity: 0.72; } }
.photo .photo-cancel { display: block; margin: var(--s-1) auto 0; }

/* The date at the top is the door to the calendar: a small calendar sits beside it. */
.top-day { display: inline-flex; align-items: center; gap: var(--s-2); }
.title-btn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; }
.title-btn .icon { color: var(--ink-2); }
/* The month: a plain grid, Monday first. A day with something done has dots; an empty day is simply plain. */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.cal-title { font-family: var(--font-display); font-weight: 400; font-size: var(--d-1); letter-spacing: -0.01em; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week { margin-top: var(--s-2); color: var(--ink-2); font-size: var(--t-1); text-align: center; }
.cal-grid { row-gap: 2px; margin-top: var(--s-1); touch-action: pan-y; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: var(--s-1); min-width: 0; min-height: 52px; padding: var(--s-1) 0; border: 0; border-radius: var(--r-2); background: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-grid-gym .cal-day { min-height: 68px; }
.cal-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: var(--t-2); line-height: 1; }
.cal-day.is-done .cal-n { font-weight: 600; }
.cal-day.is-today .cal-n { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-day.is-future { color: var(--ink-2); }
.cal-day:disabled { cursor: default; }
.cal-dots { display: flex; gap: var(--s-1); height: 6px; }
.cal-dot { display: block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.cal-dot.is-on.cal-dot-gym { background: var(--dot-gym); }
.cal-dot.is-on.cal-dot-food { background: var(--dot-food); }
.cal-dot.is-on.cal-dot-water { background: var(--dot-water); }
.cal-dot.is-on.cal-dot-tasks { background: var(--dot-tasks); }
.cal-dot.is-on.cal-dot-off { background: var(--dot-off); }
/* Gym's view: a done workout is a tick with its name; one still to come is an empty ring and a quieter name. */
.cal-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 16px; height: 16px; border-radius: 50%; color: var(--on-accent); }
.cal-day.is-done .cal-mark, .cal-mark.is-key-done { background: var(--accent); }
.cal-day.is-planned .cal-mark, .cal-mark.is-key-planned { box-shadow: inset 0 0 0 1px var(--field); }
.cal-what { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-1); line-height: 1.2; }
.cal-day.is-planned .cal-what { color: var(--ink-2); }
.cal-key { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-4); color: var(--ink-2); font-size: var(--t-1); }
.cal-key-item { display: inline-flex; align-items: center; gap: var(--s-2); }
.cal-key .cal-dot { width: 8px; height: 8px; }
.cal-all { margin-top: var(--s-2); }
.cal-now { display: block; margin: var(--s-1) auto 0; }
.cal-grid.cal-enter-fwd { animation: cal-fwd var(--m-move) var(--ease); }
.cal-grid.cal-enter-back { animation: cal-back var(--m-move) var(--ease); }
@keyframes cal-fwd { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes cal-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
/* One day, in simple rows. */
.cal-sec { margin: 0 0 var(--s-4); }
.cal-sec > .sheet-sub { margin: 0 0 var(--s-1); }
.cal-fact { border-top: 1px solid var(--hair); }
.cal-sec .cal-fact { border-top: 0; }
.cal-done { color: var(--accent); }
.cal-sets { margin: 0 0 var(--s-2); }
.cal-total { margin: 0 0 var(--s-1); }
.cal-planned .gym-xs { margin-top: var(--s-2); }
.cal-add { margin: var(--s-4) 0 var(--s-1); }
.cal-open { margin-top: var(--s-3); }
.cal-everything, .cal-on-today { display: block; }
@media (prefers-reduced-motion: reduce) { .is-loading > img, .is-loading::after, .cal-grid.cal-enter-fwd, .cal-grid.cal-enter-back { animation: none; } }
:root[data-calm] .is-loading::after { display: none; }
:root[data-calm] .is-loading > img { animation: none; }
.cal-day-sheet > * + * { border-top: 1px solid var(--hair); }
.cal-day-sheet > .cal-sec { margin: 0; padding: var(--s-3) 0; }
.cal-day-sheet > .cal-add, .cal-day-sheet > .link, .cal-day-sheet > .cal-all, .cal-day-sheet > .cal-open, .cal-day-sheet > .empty { border-top: 0; }
.food-water-add { padding-left: var(--s-2); padding-right: var(--s-2); white-space: nowrap; }
/* Paste a program: the box, the check, the lines not read, the days. */
.gym-paste { margin-top: var(--s-2); }
.gym-make-links, .gym-new-links { display: inline-flex; align-items: center; gap: var(--s-5); }
.paste-text { min-height: 200px; font-size: var(--t-3); }
.paste-tools { margin: var(--s-2) 0 0; }
.paste-day { margin: 0 0 var(--s-5); }
.paste-day-name { font-weight: 600; }
.paste-list { margin: var(--s-1) 0 0; }
.paste-note { color: var(--ink-2); }
.paste-unsure { margin: 0 0 var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
.paste-unsure-list { display: grid; gap: var(--s-2); margin: var(--s-2) 0 0; }
.paste-unsure-row .title-row { gap: var(--s-2); }
.paste-unsure-row .input { flex: 1; min-width: 0; }
.paste-wd-name { font-size: var(--t-2); font-weight: 500; }
.paste-said { margin: 0 0 var(--s-3); }
/* NEXT-35: the review. Each exercise keeps the line it was read from; what the reader was unsure of is set on the
   notice ground with its one-tap answers; the member's notes about themselves come first. */
.paste-row { display: block; padding: var(--s-1) var(--s-2); border-radius: var(--r-2); }
.paste-row-top { gap: var(--s-1); }
.paste-row .paste-x { flex: 1; min-width: 0; }
.paste-line { margin: 0 0 var(--s-1); font-size: var(--t-1); color: var(--ink-2); overflow-wrap: anywhere; }
.paste-day-line { margin: var(--s-1) 0 0; }
.paste-row.is-unsure, .paste-limit.is-unsure { background: var(--notice); }
.paste-ask { display: grid; gap: var(--s-1); padding: var(--s-1) 0 var(--s-2); }
.paste-ask-text { font-size: var(--t-2); }
.paste-ask-btns { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.paste-ask-btns .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.paste-limits, .paste-notes { margin: 0 0 var(--s-4); }
.paste-limit-list, .paste-note-list { display: grid; gap: var(--s-3); margin: var(--s-2) 0; }
.paste-limit { display: grid; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--hair); border-radius: var(--r-2); }
.paste-limit-text { font-weight: 500; overflow-wrap: anywhere; }
.paste-note-row .row-main { display: grid; flex: 1; min-width: 0; }
.paste-note-row .row-title { overflow-wrap: anywhere; }
.paste-as-note { margin: var(--s-1) 0 0; }
/* The AI sorter (D129): lines on their way wear the waiting outline; what came back is marked apart until checked. */
.paste-unsure-row.is-sorting .input { color: var(--ink-2); }
.paste-sort-sk { margin: 0 0 var(--s-1); }
.paste-row.is-ai { border-left: 2px solid var(--accent); }
.paste-sorted { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); margin: 0 0 var(--s-4); padding: var(--s-3); border-radius: var(--r-2); background: var(--notice); }
.paste-sorted-text { font-size: var(--t-2); }
.paste-sort-said { margin: 0 0 var(--s-2); }
/* The member's own notes in a workout and on a programme. */
.wo-notes { display: grid; gap: var(--s-1); margin: var(--s-2) 0; }
.wo-note { font-size: var(--t-2); color: var(--ink-2); overflow-wrap: anywhere; }
.gym-prog-notes { margin: var(--s-4) 0 0; }

/* ---------- Round 12 polish (docs/NEXT-12-POLISH.md, 20 Nov 2026) ---------- */
/* The calendar's dots are easier to see: 9 points across (they were 6), with 4 points between them. Five that size
   cannot sit in one row of a day at 375 points wide, so they sit as three over two, each kind still in its own place. */
.cal-day { gap: 2px; min-height: 56px; padding: var(--s-1) 0; }
.cal-n { width: 26px; height: 26px; }
.cal-dots { flex-wrap: wrap; justify-content: center; gap: 3px 4px; width: 35px; height: auto; }
.cal-dot { width: 9px; height: 9px; }
.cal-key .cal-dot { width: 10px; height: 10px; }
.cal-key { gap: var(--s-2) var(--s-4); }
/* Plain words first, the detail behind the "i" beside them. */
.plain-note { align-items: flex-start; }
.plain-note > p { flex: 1; min-width: 0; margin-top: var(--s-2); }
/* Gym on a rest day: the next workout under "Next", and two quiet links side by side. */
.gym-next { margin: var(--s-2) 0 var(--s-1); }
.gym-rest-links { display: flex; align-items: center; gap: var(--s-5); }
/* Round 14, part A: the food catalogue. The matches under the field as it is typed, one food's amount (weighed, a
   slider, everyday servings), a plate of several foods, and where each figure comes from. */
.food-hit-box { margin: 0 0 var(--s-3); }
/* While a meal is being searched the sheet stands at its full height, so matches changing under the finger never move it. */
.sheet.is-tall { height: calc(100vh - var(--kb) - 24px); height: calc(100dvh - var(--kb) - 24px - env(safe-area-inset-top, 0px)); }
.lookup-found { padding: var(--s-2) 0 var(--s-4); }
.food-hits .row { min-height: var(--ctl); }
.food-hits .row-title { font-size: var(--t-2); font-weight: 500; }
.food-hits .row-sub { font-size: var(--t-1); }
.food-more { align-items: center; margin-top: var(--s-1); }
.food-more .link { flex: 1; min-width: 0; text-align: left; }
.food-kcal { font-family: var(--font-display); font-size: var(--d-3); line-height: 1.05; font-variant-numeric: lining-nums tabular-nums; margin: var(--s-2) 0 0; }
.food-about, .food-unit { font-family: var(--font-text); font-size: var(--t-2); color: var(--ink-2); }
.food-macros { color: var(--ink-2); font-size: var(--t-2); margin: var(--s-1) 0 var(--s-4); min-height: 1.3em; }
.food-amount { display: flex; align-items: flex-end; gap: var(--s-3); }
.food-amount .field { flex: 1; min-width: 0; margin: 0; }
.food-amount .icon-btn { flex: none; margin-bottom: var(--s-1); }
.food-amount .input { text-align: center; font-family: var(--font-display); font-size: var(--d-1); font-variant-numeric: lining-nums; }
.food-slide { display: block; width: 100%; height: var(--tap); margin: var(--s-2) 0 var(--s-3); padding: 0; background: transparent; accent-color: var(--fill); touch-action: pan-y; }
.food-partial { margin: 0 0 var(--s-3); }
.food-serves .chip { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: var(--s-1) var(--s-4); border-radius: var(--r-2); text-align: left; }
.fat-ask { margin: var(--s-3) 0 var(--s-2); }
.fat-ask .field-label { margin: 0 0 var(--s-2); }
.plate-total { margin: var(--s-4) 0 var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--hair); }
.plate-total .food-macros { margin-bottom: var(--s-1); }
.est-label { margin-top: var(--s-2); }
/* Where a meal's figures come from, said quietly after them in a list. */
.row-src { margin-left: var(--s-2); color: var(--ink-2); font-size: var(--t-1); white-space: nowrap; }
.row-src::before { content: '· '; }
/* Round 14, part C (docs/NEXT-14.md): "Way better visuals, same colours". One colour for each area, used the same way in
   tiles, rings, charts and the day's ribbon: food, water, training, sleep, tasks. They are the calendar's five dot
   colours, so each is already clear against a card in every palette and none is a warning red or a go-ahead green. */
:root { --c-food: var(--dot-food); --c-water: var(--dot-water); --c-train: var(--dot-gym); --c-sleep: var(--dot-off); --c-tasks: var(--dot-tasks); }
.area-food { --area: var(--c-food); --area-g: linear-gradient(90deg, color-mix(in srgb, var(--c-food) 62%, var(--bg)), var(--c-food)); }
.area-water { --area: var(--c-water); --area-g: linear-gradient(90deg, color-mix(in srgb, var(--c-water) 62%, var(--bg)), var(--c-water)); }
.area-train { --area: var(--c-train); --area-g: linear-gradient(90deg, color-mix(in srgb, var(--c-train) 62%, var(--bg)), var(--c-train)); }
.area-sleep { --area: var(--c-sleep); --area-g: linear-gradient(90deg, color-mix(in srgb, var(--c-sleep) 62%, var(--bg)), var(--c-sleep)); }
.area-tasks { --area: var(--c-tasks); --area-g: linear-gradient(90deg, color-mix(in srgb, var(--c-tasks) 62%, var(--bg)), var(--c-tasks)); }
/* The same gradients for rings and chart bars, drawn by SVG from one shared set (gradientDefs in 11-charts.js). */
.grad-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.gs-food-a { stop-color: color-mix(in srgb, var(--c-food) 62%, var(--bg)); } .gs-food-b { stop-color: var(--c-food); }
.gs-water-a { stop-color: color-mix(in srgb, var(--c-water) 62%, var(--bg)); } .gs-water-b { stop-color: var(--c-water); }
.gs-train-a { stop-color: color-mix(in srgb, var(--c-train) 62%, var(--bg)); } .gs-train-b { stop-color: var(--c-train); }
.gs-sleep-a { stop-color: color-mix(in srgb, var(--c-sleep) 62%, var(--bg)); } .gs-sleep-b { stop-color: var(--c-sleep); }
.gs-tasks-a { stop-color: color-mix(in srgb, var(--c-tasks) 62%, var(--bg)); } .gs-tasks-b { stop-color: var(--c-tasks); }
.area-food .ring-arc, .ring.area-food .ring-arc { stroke: url(#g-food); } .area-water .ring-arc, .ring.area-water .ring-arc { stroke: url(#g-water); }
.area-train .ring-arc, .ring.area-train .ring-arc { stroke: url(#g-train); } .area-sleep .ring-arc, .ring.area-sleep .ring-arc { stroke: url(#g-sleep); }
.area-tasks .ring-arc, .ring.area-tasks .ring-arc { stroke: url(#g-tasks); }
.area-food .cbar { fill: url(#g-food-v); } .area-water .cbar { fill: url(#g-water-v); } .area-train .cbar { fill: url(#g-train-v); }
.area-sleep .cbar { fill: url(#g-sleep-v); } .area-tasks .cbar { fill: url(#g-tasks-v); }
.add-tile[class*="area-"] .tile-icon { color: var(--area); }
.add-tile[class*="area-"] .level-fill { background: var(--area-g, var(--area)); }
/* A ring: it closes towards a target the member set, or counts days. Never a rating. */
.ring { display: block; }
.ring-track { stroke: var(--track); }
.ring-arc { stroke: var(--area, var(--fill)); }
.ring-arc.is-drawing { animation: settle 0.9s var(--ease) 0.15s forwards; }
.ring-box { position: relative; display: inline-flex; flex: none; }
.ring-mid { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.ring-num { font-size: var(--d-2); }
.ring-count { font-family: var(--font-display); font-size: var(--t-3); font-weight: 500; font-variant-numeric: lining-nums; }
/* Food: the calorie ring with what is left beside it, and this week's plates. */
.food-hero { display: flex; align-items: center; gap: var(--s-5); }
.food-hero-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.food-hero-side .food-left { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.1; }
.plates { display: flex; gap: var(--s-2); overflow-x: auto; margin: 0 0 var(--s-3); padding: 2px; scrollbar-width: none; }
.plates::-webkit-scrollbar { display: none; }
.plate { flex: none; width: 64px; height: 64px; padding: 0; border: 0; border-radius: var(--r-2); overflow: hidden; background: var(--track); box-shadow: var(--edge); }
.plate img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Charts: a week of bars that answers to a finger, with its reading in plain words under it. */
.chart-box { margin: 0 0 var(--s-5); }
.chart-name { color: var(--ink-2); font-size: var(--t-2); margin: 0 0 var(--s-1); }
.chart2 { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-goal { stroke: var(--ink-2); stroke-width: 1; }
.cbar { fill: var(--area, var(--fill)); opacity: 0.55; }
.cbar.is-met, .cbar.is-today, .cbar.is-picked { opacity: 1; }
.cbar.is-none { fill: var(--line); opacity: 1; }
.cbar.is-drawing { transform-box: fill-box; transform-origin: 50% 100%; animation: draw-y var(--m-draw) var(--glide) backwards; }
.chart-label { fill: var(--ink-2); font-family: var(--font-text); font-size: var(--t-1); }
.chart-label.is-today { fill: var(--ink); font-weight: 600; }
.chart-read { min-height: 1.4em; margin: 2px 0 0; font-size: var(--t-2); font-variant-numeric: tabular-nums; }
.chart-says { color: var(--ink-2); font-size: var(--t-2); margin: 0; }
.spark { display: block; }
.spark-line { stroke: var(--area, var(--fill)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark-dot { fill: var(--area, var(--fill)); }
.spark-base { stroke: var(--line); stroke-width: 2; }
/* Sleep: the night as an arc, from switching off to getting up. */
.night-arc { position: relative; margin: 0 0 var(--s-4); }
.arc { display: block; width: 100%; height: auto; }
.arc-track { stroke: var(--track); stroke-width: 10; stroke-linecap: round; }
.arc-wind { stroke: var(--area); stroke-width: 10; stroke-linecap: round; opacity: 0.45; }
.arc-done { stroke: var(--area); stroke-width: 10; stroke-linecap: round; }
.arc-dot { fill: var(--bg); stroke: var(--area); stroke-width: 2.5; }
.arc-now { fill: var(--ink); stroke: var(--bg); stroke-width: 3; }
.arc-mid { position: absolute; left: 0; right: 0; top: 36%; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.arc-big { font-family: var(--font-display); font-size: var(--d-3); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.arc-sub { color: var(--ink-2); font-size: var(--t-2); }
.arc-ends { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); margin-top: var(--s-1); font-size: var(--t-2); }
.arc-end { display: flex; flex-direction: column; }
.arc-right { align-items: flex-end; text-align: right; }
.arc-time { font-weight: 500; font-variant-numeric: tabular-nums; }
.arc-what, .arc-room { color: var(--ink-2); }
/* Today: the day as one ribbon, from getting up to lights out. */
.ribbon { padding: var(--s-1) 0; margin: 0 0 var(--s-2); }
.ribbon-track { position: relative; height: 6px; border-radius: var(--r-pill); background: var(--track); }
.ribbon-past { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); background: var(--line); }
.ribbon-mark { position: absolute; top: 50%; width: 10px; height: 10px; margin: calc(var(--s-1) * -1) 0 0 calc(var(--s-1) * -1); border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--area, var(--ink-2)); }
.ribbon-mark.is-done { background: var(--area, var(--ink-2)); box-shadow: 0 0 0 2px var(--bg); }
.ribbon-mark.is-big { width: 14px; height: 14px; margin: calc(var(--s-2) * -1) 0 0 calc(var(--s-2) * -1); }
.ribbon-now { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
/* You: this week's rings, one for each module that is on. */
.week-rings { display: flex; justify-content: space-around; gap: var(--s-2); margin: 0 0 var(--s-5); }
.week-ring { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); min-width: 0; }
.week-ring-name { color: var(--ink-2); font-size: var(--t-1); }
.intro-for .chips { margin: 0; }
@keyframes draw-y { from { transform: scaleY(0); } }
:root[data-calm] .ring-arc.is-drawing, :root[data-calm] .cbar.is-drawing { animation: none; }
@media (prefers-reduced-motion: reduce) { .ring-arc.is-drawing, .cbar.is-drawing { animation: none; } }

/* Round 14, part C, step 2: Today's widgets. Small takes half the width, medium and large the whole width; large
   shows the week under it. Hold one to arrange: each shows its size and a minus to take it off, and lifts when dragged. */
.widget-board { grid-auto-flow: row dense; align-items: stretch; }
.widget { position: relative; min-width: 0; -webkit-touch-callout: none; user-select: none; }
.widget.size-m, .widget.size-l { grid-column: 1 / -1; }
.widget > * { height: 100%; margin: 0; }
.widget > .add-any { height: auto; }
.widget-board .tile:last-child:nth-child(odd) { grid-column: auto; min-height: 0; }
.widget .tile-m .tile-open, .widget .tile-l .tile-open { padding-right: var(--s-6); }
.tile-extra { padding: 0 var(--s-3) var(--s-2); }
.tile-extra .chart-box { margin: 0; }
.tile-extra .spark { width: 100%; height: 28px; }
.widget-card { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 0; padding: var(--s-1) var(--s-3) var(--s-2); border: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); color: var(--ink); text-align: left; }
.widget-card .tile-icon { color: var(--area); }
.widget-big { font-family: var(--font-display); font-size: var(--d-2); font-weight: 500; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.widget .week-rings { margin: 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.widget-empty { display: flex; align-items: center; min-height: var(--ctl); padding: var(--s-2) var(--s-3); border: 1px dashed var(--line); border-radius: var(--r-3); color: var(--ink-2); font-size: var(--t-2); }
.arrange-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: 0 0 var(--s-2); }
.arrange-hint { color: var(--ink-2); font-size: var(--t-2); margin: 0; }
.is-editing .widget { animation: widget-wait 2.4s var(--ease) infinite; touch-action: none; cursor: grab; }
.is-editing .widget:nth-child(even) { animation-delay: -1.2s; }
.is-editing .widget > :first-child { pointer-events: none; }
.widget.is-lifted { z-index: 5; animation: none; box-shadow: var(--float); border-radius: var(--r-3); transition: none; }
.widget-x { position: absolute; top: -8px; left: -8px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg); box-shadow: var(--lift); }
.widget-size { position: absolute; right: 6px; bottom: 6px; z-index: 2; min-height: 28px; padding: 2px var(--s-2); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg); color: var(--ink); font-size: var(--t-1); }
.widget-x::after, .widget-size::after { content: ''; position: absolute; top: -8px; right: -8px; bottom: -8px; left: -8px; }
#widgetAdd { margin-top: var(--s-3); }
.gallery-more { margin-top: var(--s-4); }
@keyframes widget-wait { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-0.6deg); } 75% { transform: rotate(0.6deg); } }
:root[data-calm] .is-editing .widget { animation: none; }
@media (prefers-reduced-motion: reduce) { .is-editing .widget { animation: none; } }
/* Fixes after looking at the pictures: a wide tile holds its week inside the card, and the arranging buttons keep
   their own size. */
.tile.tile-m, .tile.tile-l { display: flex; flex-direction: column; }
.tile.tile-m > .tile-main, .tile.tile-l > .tile-main { height: auto; }
.widget > .widget-x, .widget > .widget-size { height: auto; }
.widget > .widget-x { height: 28px; }

/* Round 14, part C, step 3: charts on every tab. Bars for today's protein, carbs, fat and fibre (and sets for each
   muscle group), the glass that fills, the nights on a clock, and a month of habit days. */
.mbars { display: grid; gap: var(--s-2); margin: 0 0 var(--s-4); }
.mbar { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--s-2); font-size: var(--t-2); }
.mbar-name { color: var(--ink-2); }
.mbar-track { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.mbar-track.is-open { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.mbar-fill { display: block; width: 100%; height: 100%; border-radius: var(--r-pill); background: var(--area-g, var(--area, var(--fill))); transform-origin: 0 50%; transition: transform var(--m-draw) var(--ease); }
.mbar-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.glass { display: block; margin: var(--s-1) 0; }
.glass-water { fill: var(--area); opacity: 0.85; }
.glass-water.is-drawing { transform-box: fill-box; transform-origin: 50% 100%; animation: draw-y 0.7s var(--ease) backwards; }
.glass-edge { stroke: var(--ink-2); stroke-width: 1.5; stroke-linejoin: round; }
.chart-axis.is-faint { stroke: var(--hair); }
.chart-fold { margin: 0 0 var(--s-4); }
.chart-fold > summary { min-height: var(--tap); display: flex; align-items: center; font-family: var(--font-display); font-size: var(--d-1); cursor: pointer; }
.chart-fold > .block, .chart-fold > section { margin-top: var(--s-2); }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-1); max-width: 280px; }
.mg-day { aspect-ratio: 1; border-radius: var(--r-1); background: var(--track); }
.mg-day.is-on { background: var(--area); opacity: 0.55; }
.mg-day.is-full { opacity: 1; }
.mg-day.is-today { box-shadow: inset 0 0 0 2px var(--ink); }
.numbers-charts .seg { margin: 0 0 var(--s-3); }
:root[data-calm] .glass-water.is-drawing { animation: none; }
@media (prefers-reduced-motion: reduce) { .glass-water.is-drawing { animation: none; } .mbar-fill { transition: none; } }
/* The glass sits in the water tile's corner, so the three small tiles on Food stay short. */
.food-small .glass { position: absolute; top: var(--s-3); right: var(--s-3); width: 22px; height: 33px; margin: 0; }

/* NEXT-16, 3: Today's three rings, in one row under the greeting. Each is a button: the ring, its name and one figure. */
.home-rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0 0 var(--s-2); }
.home-rings[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-rings[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.home-ring { display: flex; align-items: center; gap: var(--s-2); min-width: 0; min-height: var(--tap); padding: 2px 0; border: 0; background: none; color: var(--ink); text-align: left; }
.home-ring .ring { flex: none; }
.home-ring-words { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.home-ring-name { color: var(--ink-2); font-size: var(--t-1); }
/* Round 0: whole words, wrapping to a second line rather than ending in three dots. */
.home-ring-val { font-size: var(--t-2); font-weight: 600; overflow-wrap: anywhere; }
.home-ring:active { transform: scale(0.98); }
/* The + in the middle of the tab bar: a round disc in the hour's own accent, the same height as the tabs. */
.tab-group { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.tab-add { flex: 0 0 var(--s-10); min-height: var(--tabs-h); display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; -webkit-touch-callout: none; user-select: none; }
.tab-add-disc { display: inline-flex; align-items: center; justify-content: center; width: var(--s-9); height: var(--s-9); border-radius: 50%; background: var(--cta); color: var(--on-cta); box-shadow: var(--lift); transition: transform 0.18s var(--ease); }
.tab-add:active .tab-add-disc { transform: scale(0.92); }
/* Held: the top four, in a small frosted card above the +. */
.quick-add { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--s-3) + env(safe-area-inset-bottom, 0px)); z-index: 40; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); width: min(20rem, calc(100% - var(--s-7))); padding: var(--s-3); border-radius: var(--r-3); background: var(--surface); box-shadow: var(--float); transform: translateX(-50%); animation: quick-in var(--m-spring) var(--glide); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .quick-add { background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(24px); backdrop-filter: saturate(1.6) blur(24px); } }
.quick-add-shade { position: fixed; top: -100vh; right: -100vw; bottom: -100vh; left: -100vw; z-index: -1; }
.quick-add-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-1); min-height: var(--s-10); border: 0; border-radius: var(--r-2); background: var(--tile); color: var(--ink); font-size: var(--t-2); }
@keyframes quick-in { from { opacity: 0; transform: translateX(-50%) translateY(var(--s-3)) scale(0.96); } }
:root[data-calm] .quick-add { animation: fade-only var(--m-fade) linear; }
@media (prefers-reduced-motion: reduce) { .quick-add { animation: fade-only var(--m-fade) linear !important; } }

/* NEXT-16, 4: the detail page for each area, and the chart kit's one language: the span before as a faint shadow, a
   bubble that follows the finger, a light grid, a smooth line with a soft fill. */
.chart-stage { position: relative; }
.cbar-prev { fill: var(--area, var(--fill)); opacity: 0.16; }
.chart-bubble { position: absolute; top: calc(var(--s-6) * -1); z-index: 2; max-width: 70%; padding: var(--s-1) var(--s-2); border-radius: var(--r-2); background: var(--ink); color: var(--bg); font-size: var(--t-1); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transform: translateX(-50%); }
.gs-op-hi { stop-opacity: 0.32; }
.gs-op-lo { stop-opacity: 0; }
.line-path { stroke: var(--area, var(--fill)); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.area-food .line-path { stroke: url(#g-food); } .area-water .line-path { stroke: url(#g-water); } .area-train .line-path { stroke: url(#g-train); } .area-sleep .line-path { stroke: url(#g-sleep); } .area-tasks .line-path { stroke: url(#g-tasks); }
.line-fill { fill: var(--area, var(--fill)); opacity: 0.2; stroke: none; }
.area-food .line-fill { fill: url(#g-food-fill); opacity: 1; } .area-water .line-fill { fill: url(#g-water-fill); opacity: 1; } .area-train .line-fill { fill: url(#g-train-fill); opacity: 1; } .area-sleep .line-fill { fill: url(#g-sleep-fill); opacity: 1; } .area-tasks .line-fill { fill: url(#g-tasks-fill); opacity: 1; }
.line-dot { fill: var(--area, var(--fill)); }
.line-pick { fill: var(--bg); stroke: var(--area, var(--fill)); stroke-width: 2.5; }
.line-path.is-drawing { transform-box: fill-box; transform-origin: 0 100%; animation: line-draw 0.6s var(--ease) both; }
@keyframes line-draw { from { opacity: 0; transform: scaleX(0.6); } }
:root[data-calm] .line-path.is-drawing { animation: none; }
@media (prefers-reduced-motion: reduce) { .line-path.is-drawing { animation: none; } }
.detail-areas { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-3); }
.chart-stage { -webkit-user-select: none; user-select: none; }
.detail-spans { margin: 0 0 var(--s-4); }
.detail-spans .seg { width: 100%; }
.detail-spans .seg-btn { flex: 1 1 0; }
.detail-top { margin: 0 0 var(--s-3); }
.detail-big { margin: 0; font-family: var(--font-display); font-size: var(--d-3); font-weight: 500; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.detail-cap { margin: 2px 0 0; color: var(--ink-2); font-size: var(--t-2); }
.detail-says { margin: 0 0 var(--s-5); font-size: var(--t-3); line-height: 1.4; }
.detail-row { min-height: var(--tap); }

/* NEXT-16, 5: the celebration card, the story and the plans. The mark draws itself once (transform and opacity only). */
.cheer { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); }
.cheer-mark { position: relative; width: var(--s-10); height: var(--s-10); margin: 0 0 var(--s-2); }
.cheer-ring { display: block; }
.cheer-track { stroke: var(--track); stroke-width: 4; }
.cheer-arc { stroke: var(--cta); stroke-width: 4; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 50%; animation: cheer-in var(--m-spring) var(--spring) 0.1s both; }
.cheer-light { position: absolute; top: 50%; left: 50%; width: var(--s-4); height: var(--s-4); margin: calc(var(--s-2) * -1) 0 0 calc(var(--s-2) * -1); border-radius: 50%; background: var(--cta); animation: cheer-glow 1.2s var(--ease) 0.2s both; }
@keyframes cheer-in { from { opacity: 0; transform: rotate(-90deg) scale(0.6); } }
@keyframes cheer-glow { 0% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1.4); } 100% { opacity: 0.85; transform: scale(1); } }
:root[data-calm] .cheer-arc, :root[data-calm] .cheer-light { animation: none; }
@media (prefers-reduced-motion: reduce) { .cheer-arc, .cheer-light { animation: none !important; } }
.cheer-title { margin: 0; }
.cheer-lines { margin: 0; padding: 0; list-style: none; font-size: var(--t-3); line-height: 1.5; }
.cheer-best { margin: 0; color: var(--accent); font-weight: 600; }
.share-pic { display: block; width: 100%; height: auto; border-radius: var(--r-3); box-shadow: var(--lift); margin: 0 0 var(--s-3); }
.story-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--s-4) * -1); scrollbar-width: none; }
.story-track::-webkit-scrollbar { display: none; }
.story-card { flex: 0 0 100%; scroll-snap-align: start; min-height: 16rem; display: flex; flex-direction: column; justify-content: center; gap: var(--s-3); padding: var(--s-5) var(--s-4); }
.story-big { margin: 0; font-family: var(--font-display); font-size: var(--d-3); font-weight: 500; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.story-line { margin: 0; font-size: var(--t-3); line-height: 1.45; color: var(--ink-2); }
.story-dots { display: flex; justify-content: center; gap: var(--s-2); margin: var(--s-2) 0; }
.story-dot { width: var(--s-2); height: var(--s-2); border-radius: 50%; background: var(--line); }
.story-dot.is-on { background: var(--ink); }
.plan-list { margin: 0 0 var(--s-5); padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.plan-card { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.plan-main { flex: 1; min-width: 0; }
.plan-title { margin: 0; font-weight: 600; }
.plan-line { margin: 2px 0 0; color: var(--ink-2); font-size: var(--t-2); }
.plan-badge { display: inline-block; margin-top: var(--s-1); padding: 2px var(--s-2); border-radius: var(--r-pill); background: var(--cta); color: var(--on-cta); font-size: var(--t-1); font-weight: 600; }
.milestones { margin: 0; padding: 0; list-style: none; }
.milestone { padding: var(--s-2) 0; border-top: 1px solid var(--hair); font-size: var(--t-2); }

/* NEXT-16, 6: set-up. Big answers, a slider, a progress bar, and the reveal. */
#introWants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
#introWants .chip { min-height: var(--s-10); justify-content: center; border-radius: var(--r-2); font-size: var(--t-3); }
.slider-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.slider-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.slider { width: 100%; min-height: var(--tap); accent-color: var(--accent); }
.slider-check { min-height: 1.4em; margin: var(--s-1) 0 0; color: var(--ink-2); font-size: var(--t-2); }
.intro-bar { height: 4px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.intro-bar-fill { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform var(--m-spring) var(--spring); }
.aha-rings { display: flex; justify-content: space-around; gap: var(--s-2); margin: var(--s-4) 0; }
.aha-ring { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); min-width: 0; text-align: center; animation: aha-in var(--m-spring) var(--spring) both; }
.aha-ring .ring-mid { color: var(--ink-2); }
.aha-ring-name { font-weight: 600; }
.aha-ring-sub { color: var(--ink-2); font-size: var(--t-1); }
@keyframes aha-in { from { opacity: 0; transform: translateY(var(--s-3)) scale(0.9); } }
.aha-wds { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-1); margin: 0 0 var(--s-2); }
.aha-wd { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); color: var(--ink-2); font-size: var(--t-1); }
.aha-wd-dot { width: var(--s-3); height: var(--s-3); border-radius: 50%; background: var(--track); }
.aha-wd.is-on .aha-wd-dot { background: var(--c-train, var(--accent)); }
.aha-first { margin: 0 0 var(--s-3); font-weight: 600; }
:root[data-calm] .aha-ring { animation: fade-only var(--m-fade) linear; }
@media (prefers-reduced-motion: reduce) { .aha-ring { animation: fade-only var(--m-fade) linear !important; } .intro-bar-fill { transition: none; } }

/* NEXT-16, 7: the groups under the one search box. */
.ask-group { margin: var(--s-3) 0 var(--s-1); color: var(--ink-2); font-size: var(--t-1); font-weight: 600; letter-spacing: 0.02em; }

/* NEXT-16, 10 and 11: One Big Thing, the club card, the welcome, For you, the Library. */
.view-home .home-line.is-big { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.15; color: var(--ink); letter-spacing: -0.01em; }
.home-rings { margin-bottom: var(--s-1); }
.member-card.is-club { padding: var(--s-5); border-radius: var(--r-3); background: var(--toast-bg); color: var(--toast-ink); box-shadow: var(--float); }
.member-card.is-club .display, .member-card.is-club .member-since, .member-card.is-club .member-mark { color: var(--toast-ink); }
.member-card.is-club .member-mark { color: var(--toast-accent); letter-spacing: 0.3em; }
.member-card.is-club .btn-small { background: transparent; border-color: var(--toast-ink); color: var(--toast-ink); }
.member-facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 0; padding: var(--s-3) 0 0; border-top: 1px solid var(--toast-ink); }
.member-facts dt { font-size: var(--t-1); color: var(--toast-ink); opacity: 1; }
.member-facts dd { margin: 0; font-size: var(--t-2); font-weight: 600; color: var(--toast-ink); }
.welcome { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3); padding: var(--s-5); background: var(--toast-bg); color: var(--toast-ink); text-align: center; pointer-events: none; animation: welcome-in 0.9s var(--ease) both; }
.welcome.is-leaving { opacity: 0; transition: opacity 0.7s var(--ease); }
.welcome-mark { color: var(--toast-accent); letter-spacing: 0.3em; font-size: var(--t-2); }
.welcome-name { margin: 0; font-family: var(--font-display); font-size: var(--d-3); line-height: 1.1; animation: welcome-rise 1.2s var(--ease) 0.2s both; }
.welcome-sub { margin: 0; font-size: var(--t-3); opacity: 0.9; animation: welcome-rise 1.2s var(--ease) 0.5s both; }
@keyframes welcome-in { from { opacity: 0; } }
@keyframes welcome-rise { from { opacity: 0; transform: translateY(var(--s-3)); } }
:root[data-calm] .welcome, :root[data-calm] .welcome-name, :root[data-calm] .welcome-sub { animation: fade-only var(--m-fade) linear; }
@media (prefers-reduced-motion: reduce) { .welcome, .welcome-name, .welcome-sub { animation: fade-only var(--m-fade) linear !important; } .welcome.is-leaving { transition: none; } }
.for-you-list { display: grid; gap: var(--s-3); margin: 0 0 var(--s-2); }
.for-you-card { display: flex; flex-direction: column; gap: var(--s-1); width: 100%; padding: var(--s-4); border: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); color: var(--ink); text-align: left; }
.for-you-kicker { color: var(--area, var(--ink-2)); font-size: var(--t-1); font-weight: 600; letter-spacing: 0.02em; }
.for-you-line { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.2; }
.library-group { margin: 0 0 var(--s-4); }

/* The body in 3D (Stage 2): the stage, the name under it, the key; the still picture and list where it cannot be drawn. */
.body-block .title-row { margin-bottom: var(--s-2); }
/* Inside the arcs' card at Gym's top (one block): no gap of a block of its own. */
.tab-top .body-block { margin: var(--s-5) 0 0; }
.body-segs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-3); }
.body-segs .seg { flex: 1 1 0; min-width: 0; }
.body-stage { position: relative; height: 30rem; margin: 0 0 var(--s-2); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); touch-action: none; overflow: hidden; }
.body-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
/* NEXT-37: the figure fades in once it is drawn (also under Reduce Motion: a fade is not movement). */
.body-canvas { opacity: 0; transition: opacity var(--m-draw) ease-out; }
.body-stage.is-ready .body-canvas { opacity: 1; }
.body-wait { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: var(--ink-2); pointer-events: none; }
.body-name { min-height: var(--s-9); margin: 0 0 var(--s-2); text-align: center; font-size: var(--t-3); }
.body-name small { display: block; color: var(--ink-2); font-size: var(--t-1); }
.body-key { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1) var(--s-4); margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: var(--t-1); }
.body-key li { display: inline-flex; align-items: center; gap: var(--s-1); }
.body-dot { display: inline-block; width: var(--s-3); height: var(--s-3); border-radius: 50%; background: var(--line); }
.body-dot.lv-3, .body-list-row.lv-3 .body-dot { background: var(--c-train); }
.body-dot.lv-2, .body-list-row.lv-2 .body-dot { background: color-mix(in srgb, var(--c-train) 50%, var(--line)); }
/* The still body (Alex, 2 Dec 2026): centred and big, the facts underneath. The pictures are 480 by 960 with the figure
   from about an eighth of the way down to seven eighths: the frame shows that part, so the figure fills it. */
/* Sample data's example, said first and plainly (Alex, 2 Dec 2026). */
.sample-say { margin: 0 0 var(--s-3); color: var(--ink); font-size: var(--t-2); font-weight: 600; }
/* A food's own name in the tables, small under the name a person would say (Alex, 2 Dec 2026). */
.food-table-name { display: block; color: var(--ink-2); font-size: var(--t-0); line-height: 1.3; }
/* Today's Your day label opens the day: it keeps the label's look, with a small arrow, and a full-size touch that
   takes no more room than the label did (the negative margins give back what the touch area adds). */
.yd-open { display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--s-9); margin-top: calc(-1 * var(--s-4)); margin-bottom: calc(-1 * var(--s-4)); padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.yd-open svg { color: var(--ink-2); }
.card.yd > .yd-open { margin-top: calc(-1 * var(--s-4)); margin-bottom: calc(-1 * var(--s-4)); }
.body-still { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-2); text-align: center; }
.body-stack { position: relative; display: block; flex: none; overflow: hidden; }
/* The frame's height, 760 of the picture's 480 wide, kept by padding so older Safari keeps it too. */
.body-stack::before { content: ""; display: block; padding-top: 158.3%; }
.body-stack img { position: absolute; left: 0; top: -13.2%; display: block; width: 100%; height: auto; }
.body-stack .body-lit.lv-2 { opacity: 0.5; }
.body-stack.is-big { width: 100%; max-width: 20rem; }
.body-stack.body-mini-still { width: 4rem; }
.body-still .body-list { justify-items: center; }
.body-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); font-size: var(--t-2); }
.body-list-row { display: flex; align-items: center; gap: var(--s-2); }
.body-widget-row { display: flex; align-items: center; gap: var(--s-3); }
.body-mini { display: block; width: 4rem; height: 7rem; flex: none; }
.body-widget-line { font-size: var(--t-2); color: var(--ink); }

/* ---------- NEXT-17: the Apple base, appearance only (docs/STYLE-APPLE-2026-11.md; Alex, 22 Nov 2026) ----------
   Nothing moves and no tap changes: every control is where it was. What changes is how it looks.
   One accent (Aegean blue by day, candle gold in the evening and at night) is set in the palettes above: the main
   button, the selected tab and a chosen chip take it; the hour still colours the sky, and each area keeps its own
   colour on icons, lines and charts. Apple: "When every element is tinted, nothing stands out." */
/* Safari on iOS 26 tints its own bars from the page's background, not from the theme colour. */
html { background: var(--bg); }

/* The serif is for moments (the greeting, a page's large title, the one figure that matters, the line under the
   greeting). A heading that only names a part of a screen is the iPhone's own face, bold, as in Apple's apps. */
.section-title, .sheet-title, .card-title, .gym-name, .wo-ex { font-family: var(--font-text); font-size: var(--d-1); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.sheet-sub, .state-title, .step-title, .session-name, .idea-name, .cal-title, .home-now-title, .est-q, .clear-q, .for-you-line, .chart-fold > summary, .daynav-day, .setup dt { font-family: var(--font-text); font-size: var(--t-3); font-weight: 600; letter-spacing: 0; line-height: 1.3; }

/* A choice of one among a few: a soft track and the chosen one raised on it, as on an iPhone. (It was an ink box with
   square corners inside a rounded track.) */
.seg { border: 0; padding: 2px; border-radius: var(--r-2); background: var(--track); overflow: visible; }
.seg-btn { min-height: var(--tap); border-left: 0; border-radius: var(--r-2); }
.seg-btn[aria-pressed="true"] { background: var(--bg); color: var(--ink); font-weight: 600; border-color: transparent; box-shadow: var(--lift-press); }
:root[data-phase="dawn"] .seg-btn[aria-pressed="true"], :root[data-phase="day"] .seg-btn[aria-pressed="true"], :root[data-phase="golden"] .seg-btn[aria-pressed="true"] { background: var(--tile); }
/* A chosen chip or feeling takes the accent; a chosen goal takes its edge. */
.chip[aria-pressed="true"], .feel-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: none; }
.chip[aria-pressed="true"] .msg-tradeoff { color: var(--on-accent); }
.goal-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* A quiet action is plain words in the accent, not an underlined link (that is a web page's habit). */
.link, .toast-action, .fold summary, .rates summary, .food-small .figure-btn { text-decoration: none; }
.link-quiet, .fold summary, .rates summary, .food-small .figure-btn { color: var(--accent); }

/* The small + and camera on a tile are plain signs: the whole tile is the button, so they need no ring of their own. */
.tile-plus { box-shadow: none; }
.tile-cam::before { box-shadow: none; }
.tile-cam { color: var(--accent); }

/* The tab bar: the chosen tab is its colour and a faintly filled icon. No line slides above it. */
.tab-ink.is-placed { opacity: 0; }
@supports (fill: color-mix(in srgb, red 20%, transparent)) {
  .tab[aria-current="page"] .icon path, .tab[aria-current="page"] .icon circle, .tab[aria-current="page"] .icon rect { fill: color-mix(in srgb, currentColor 18%, transparent); }
}

/* Lists of places to go (You, Settings, About) are a rounded group of compact rows, as in the iPhone's own Settings. */
.places { padding: 0 var(--s-4); border: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge); }
.sheet .places { background: var(--bg); box-shadow: none; }
.places .row-card { min-height: 52px; padding: var(--s-2) 0; }

/* On or off is the iPhone's switch, at the end of its row. A thing done (a habit, a step, a task) stays a round tick. */
.tick.is-switch { order: 2; width: 51px; height: 31px; padding: 2px; border: 0; border-radius: var(--r-pill); background: var(--track); box-shadow: inset 0 0 0 1px var(--line); place-content: center start; transition: background-color var(--m-quick) ease; }
.tick.is-switch::after { width: 27px; height: 27px; margin: 0; border: 0; border-radius: 50%; background: var(--ink); transform: none; transition: transform var(--m-quick) var(--ease); }
:root[data-phase="dawn"] .tick.is-switch::after, :root[data-phase="day"] .tick.is-switch::after, :root[data-phase="golden"] .tick.is-switch:not(:checked)::after { background: var(--tile); box-shadow: var(--lift-press); }
.tick.is-switch:checked { background: var(--accent); box-shadow: none; }
/* Honest review, bug 2: at night the knob and the track of a switch that is on were both the ink, so it read as a blank
   pill. On, the knob is the page's own ground, which the accent always stands clear of. */
.tick.is-switch:checked::after { transform: translateX(20px); background: var(--bg); box-shadow: none; }
.tick.is-switch:checked + label .check-title { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .tick.is-switch, .tick.is-switch::after { transition: none; } }

/* Set-up said how far along you are three ways at once (a bar, five dots and "2 of 3"). The bar and the words stay. */
.intro-dots { display: none; }

/* ---------- NEXT-17B (docs/NEXT-17B-APPLE-FULL.md): one Apple base, everything connected ---------- */
/* Step 2. A tile is its page's door; its own small + (filled, in the accent) does the obvious next thing in one tap. */
.tile-acts { position: absolute; top: var(--s-1); right: var(--s-1); display: flex; align-items: center; }
.tile-acts .tile-tick { position: relative; top: auto; right: auto; }
/* On a small card the two buttons stack down its right edge, clear of the middle, which opens the page. */
.widget.size-s .tile-acts { flex-direction: column; }
.tile-acts { pointer-events: none; }
.tile-acts > * { pointer-events: auto; }
.tile-acts .tile-tap { color: var(--on-cta); }
.tile-acts .tile-tap::before { background: var(--cta); box-shadow: none; }
.add-tile.has-page .tile-label { padding-right: var(--s-1); }
/* Large titles: the page's title is large at the top; once it has gone under the bar, a small copy sits in the middle of
   the bar, and the bar takes the page's colour with a hairline. The bar stays at the top while the page scrolls. */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 18; }
.top::before { content: ""; position: fixed; z-index: -1; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top, 0px) + var(--tap) + var(--s-2)); background: var(--bg); border-bottom: 1px solid var(--hair); opacity: 0; transition: opacity var(--m-quick) ease; pointer-events: none; }
:root.is-scrolled .top::before { opacity: 1; }
.top-title { position: absolute; left: 50%; top: 50%; max-width: 38%; overflow: hidden; color: var(--ink); font-size: var(--t-3); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; opacity: 0; transform: translate(-50%, -50%); transition: opacity var(--m-quick) ease; pointer-events: none; }
:root.title-small .top-title { opacity: 1; }
:root.title-small .top-day > span { opacity: 0; }
/* Pages link to each other where it helps: one plain fact from the member's own entries, a tap to the other page. */
.detail-links { margin-top: var(--s-4); }
.detail-link .row-value { color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .top::before, .top-title { transition: none; } }
/* The craft round (23 Nov 2026): where the phone can tie movement to the scroll itself (Safari 26 and later), the bar's
   ground comes in over the first few points of scroll instead of at once, a page's large title shrinks and fades as it
   goes under the bar, and on the area pages and You each block rises softly into place as it comes up from the bottom
   edge. The phone does this work, not the app, so it costs nothing while scrolling. Older phones keep the above.
   Never under Reduce Motion or Calm visuals. Transform and opacity only. */
@keyframes bar-ground { from { opacity: 0; } to { opacity: 1; } }
@keyframes title-under { to { opacity: 0; transform: scale(0.94); } }
@keyframes block-rise { from { opacity: 0; transform: translateY(var(--s-4)) scale(0.98); } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    :root:not([data-calm]) .top::before { transition: none; animation: bar-ground linear both; animation-timeline: scroll(root); animation-range: 0 var(--s-8); }
    :root:not([data-calm]) .view h1.display { transform-origin: 0 100%; animation: title-under linear both; animation-timeline: scroll(root); animation-range: 0 var(--s-10); }
    :root:not([data-calm]) #view-detail > *, :root:not([data-calm]) #view-you > * { animation: block-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}

/* Step 3. An earlier day on Food and Sleep: the day and a small Today under the title. */
.day-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.day-bar-date { color: var(--ink-2); font-size: var(--t-2); }
/* Undo in the row's own place. */
.undo-row .undo-line { justify-content: space-between; color: var(--ink-2); }
.undo-act { color: var(--accent); font-weight: 600; }
/* Pull to refresh: the three water lines under the bar, filling in as the page is pulled. */
.pull-mark { position: fixed; z-index: 17; top: calc(env(safe-area-inset-top, 0px) + var(--tap) + var(--s-2)); left: 50%; color: var(--ink-2); transform: translateX(-50%); pointer-events: none; }
.pull-mark.is-ready { color: var(--accent); }
.pull-mark.is-busy .state-mark line { animation: sun-breathe 0.35s ease infinite alternate; }
@media (prefers-reduced-motion: reduce) { .pull-mark.is-busy .state-mark line { animation: none; } }
:root[data-calm] .pull-mark.is-busy .state-mark line { animation: none; }

/* Step 4. A held card's quick actions: a short list beside the card, the card itself lifted a little. */
.card-menu { position: fixed; z-index: 40; display: grid; min-width: 14rem; padding: var(--s-1) 0; border-radius: var(--r-3); background: var(--surface); box-shadow: var(--float); animation: fade-in var(--m-quick) ease; }
.card-menu-btn { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: var(--tap); padding: 0 var(--s-4); border: 0; background: none; color: var(--ink); font-size: var(--t-3); text-align: left; }
.card-menu-btn + .card-menu-btn { border-top: 1px solid var(--hair); }
.card-menu-btn .icon { color: var(--ink-2); }
.widget.is-held { transform: scale(1.03); transition: transform var(--m-quick) var(--ease); }
@media (prefers-reduced-motion: reduce) { .widget.is-held { transform: none; } .card-menu { animation: none; } }
:root[data-calm] .widget.is-held { transform: none; }

/* Step 5. Summary: pinned cards two by two, each with the week as a small line; highlights as plain sentences. */
.summary .title-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
/* Second honest review, bug 9: a card's caption wraps onto a second line rather than being cut. */
.summary-card .tile-sub { white-space: normal; overflow: visible; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin-bottom: var(--s-3); }
.summary-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); text-align: left; }
.summary-card .spark { width: 100%; height: auto; margin-top: var(--s-1); }
.summary-card.is-editing { padding-bottom: calc(var(--tap) + var(--s-2)); }
.summary-edit { position: absolute; left: var(--s-1); right: var(--s-1); bottom: var(--s-1); display: flex; justify-content: space-between; }
.highlights { display: grid; gap: var(--s-2); }
.highlight-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: var(--s-3) var(--s-4); border: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge); color: var(--ink); font-size: var(--t-2); text-align: left; }
.highlight-card .spark { width: 5rem; height: auto; }
/* The highlights widget on Today: cards to swipe through, one at a time. */
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: var(--s-2); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
.widget-highlights { display: grid; gap: var(--s-2); }
.widget-highlights .highlight-card { background: var(--surface); box-shadow: none; }
/* A chart's title states what it shows. */
.chart-finding { margin: var(--s-2) 0 var(--s-3); color: var(--ink); font-family: inherit; font-size: var(--t-3); font-weight: 600; line-height: 1.3; }

/* Step 6. The stone: a smooth stone that fills from the bottom like still water, in the area's colour. Its figure sits
   beside it. The fill rises once when it arrives; under Calm visuals and Reduce Motion it is simply there. */
.stone-meter .ring-track { fill: var(--track); stroke: none; }
.stone-meter .ring-arc { fill: var(--area, var(--fill)); stroke: none; transform-box: fill-box; transform-origin: 50% 100%; }
.area-food .stone-meter .ring-arc, .stone-meter.area-food .ring-arc { fill: url(#g-food); stroke: none; }
.area-water .stone-meter .ring-arc, .stone-meter.area-water .ring-arc { fill: url(#g-water); stroke: none; }
.area-train .stone-meter .ring-arc, .stone-meter.area-train .ring-arc { fill: url(#g-train); stroke: none; }
.area-sleep .stone-meter .ring-arc, .stone-meter.area-sleep .ring-arc { fill: url(#g-sleep); stroke: none; }
.area-tasks .stone-meter .ring-arc, .stone-meter.area-tasks .ring-arc { fill: url(#g-tasks); stroke: none; }
.stone-meter .ring-arc.is-drawing { animation: draw-y 0.9s var(--ease) 0.15s both; }
.ring-box { align-items: center; gap: var(--s-3); }
.ring-box .ring-mid { position: static; align-items: flex-start; text-align: left; }
.week-ring .ring-box, .aha-ring .ring-box { flex-direction: column; gap: var(--s-1); }
.week-ring .ring-box .ring-mid, .aha-ring .ring-box .ring-mid { align-items: center; text-align: center; }
:root[data-calm] .stone-meter .ring-arc.is-drawing { animation: none; }
@media (prefers-reduced-motion: reduce) { .stone-meter .ring-arc.is-drawing { animation: none; } }

/* Step 7, the premium pass. While arranging, a card's take-off button and size label sit on its edges, never over its
   icon or its words; the night arc on Sleep is one target, never small dots that look like handles. */
.widget-board.is-editing .widget > :first-child { padding-bottom: calc(var(--tap) - var(--s-2)); }
.widget-board.is-editing .tile-icon, .widget-board.is-editing .tile-top .tile-icon { visibility: hidden; }
.night-arc.is-tap { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; }
.night-arc.is-tap:active { transform: scale(0.99); }

/* Step 0, built as step 8 (docs/NEXT-17B-STEP0.md): elevate what is here. */
/* Did you know? sits where the assistant's line sits, with its own close. */
.did-you-know { display: flex; align-items: center; gap: var(--s-1); }
.did-you-know .home-coach-btn { flex: 1; min-width: 0; }
.did-you-know strong { font-weight: 600; }
/* Said once where things moved. */
.moved-line { margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-2); background: var(--notice); color: var(--ink); font-size: var(--t-2); }
/* Food: kept and recent meals at the top, one tap each. */
.food-again-box { margin: var(--s-3) 0 var(--s-4); }
.food-again-box .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.food-again-box .chips::-webkit-scrollbar { display: none; }
/* The photo's result as a card. */
.photo-top { padding: var(--s-4); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.photo-top .photo-thumb { border-radius: var(--r-2); }
/* Habits as a clean grid of tiles inside their sheet. */
.sheet .habit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.sheet .habit-grid > .check { min-height: var(--s-10); padding: var(--s-2) var(--s-3); border-radius: var(--r-2); background: var(--bg); }
/* A task row that slides to complete. */
.task-rows .task-line { display: flex; align-items: center; gap: var(--s-3); background: var(--surface); }
.task-rows .task-line label { flex: 1; min-width: 0; }
.swipe-act.is-done { color: var(--on-cta); background: var(--cta); }
/* Gym: the workout fills the screen; the rest timer is a bar across the top on every other screen. */
/* The tab bar stays, so a member can move around the app while resting (the bar above follows them). */
:root[data-view="workout"] .top { display: none; }
.pill.is-rest-bar { position: fixed; z-index: 30; top: env(safe-area-inset-top, 0px); left: 0; right: 0; min-height: var(--tap); border: 0; border-radius: 0; background: var(--cta); color: var(--on-cta); font-variant-numeric: tabular-nums; }
/* Your objects. */
.object-link { padding: var(--s-2) var(--s-3); border-radius: var(--r-2); background: var(--bg); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.first-thing .row { padding: var(--s-2) 0; }
.run-journal { display: grid; gap: var(--s-2); margin: var(--s-4) 0; }

/* Step 9 (docs/NEXT-17B-STEP9-THEMES.md): the member's own colours. White and Black sit on top of the day and the night
   palettes (data-phase stays "day" or "night", so everything keyed to light or dark still holds); the five area colours
   keep their meaning. An accent colours only the main buttons and the chosen tab. Every pair is held at 4.5 to 1 or
   more by a logic test. */
:root[data-theme="white"][data-phase] {
  --bg: #FFFFFF; --surface: #FFFFFF; --tile: #F2F2F4; --ink: #111111; --ink-2: #4D4D52; --line: #D1D1D6;
  --hair: #E5E5EA; --notice: #F2F2F4; --track: #E5E5EA; --field: #8A8A8F; --label: #4D4D52; --chip: #F2F2F4;
  --on-chip: #111111; --chip-edge: #D1D1D6; --sky-1: #FFFFFF; --sky-2: #FFFFFF; --sky-3: #FFFFFF; --toast-bg: #111111;
  --toast-ink: #FFFFFF; --bar: rgba(255, 255, 255, 0.92); --sun: rgba(255, 255, 255, 0); --glow: rgba(255, 255, 255, 0);
  --edge: inset 0 0 0 1px rgba(0, 0, 0, 0.05); --lift: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 24px -18px rgba(0, 0, 0, 0.22);
  --sky: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
  color-scheme: light;
}
:root[data-theme="black"][data-phase] {
  --bg: #000000; --surface: #1C1C1E; --tile: #1C1C1E; --ink: #F3EEE4; --ink-2: #AEAEB2; --line: #3A3A3C;
  --hair: #2C2C2E; --notice: #1C1C1E; --track: #3A3A3C; --field: #8E8E93; --label: #AEAEB2; --chip: #1C1C1E;
  --on-chip: #FFFFFF; --chip-edge: #3A3A3C; --sky-1: #000000; --sky-2: #000000; --sky-3: #000000; --toast-bg: #F2F2F2;
  --toast-ink: #000000; --bar: rgba(0, 0, 0, 0.92); --sun: rgba(0, 0, 0, 0); --glow: rgba(0, 0, 0, 0);
  --edge: inset 0 0 0 1px rgba(255, 255, 255, 0.08); --lift: 0 14px 30px -20px rgba(0, 0, 0, 0.8);
  --sky: linear-gradient(180deg, #000000 0%, #000000 100%);
  color-scheme: dark;
}
/* Accents: main buttons and the chosen tab only. Light grounds first, then dark ones. */
:root[data-accent="terracotta"] { --cta: #9C4428; --on-cta: #FFFFFF; --tab-on: #9C4428; }
:root[data-accent="sage"] { --cta: #4A6652; --on-cta: #FFFFFF; --tab-on: #4A6652; }
:root[data-accent="violet"] { --cta: #5A4A8C; --on-cta: #FFFFFF; --tab-on: #5A4A8C; }
:root[data-accent="mono"] { --cta: #121110; --on-cta: #F3EEE4; --tab-on: #121110; }
:root[data-accent="terracotta"][data-phase="evening"], :root[data-accent="terracotta"][data-phase="night"] { --cta: #E3A084; --on-cta: #121110; --tab-on: #E3A084; }
:root[data-accent="sage"][data-phase="evening"], :root[data-accent="sage"][data-phase="night"] { --cta: #A3C0A9; --on-cta: #121110; --tab-on: #A3C0A9; }
:root[data-accent="violet"][data-phase="evening"], :root[data-accent="violet"][data-phase="night"] { --cta: #BCAEE8; --on-cta: #121110; --tab-on: #BCAEE8; }
:root[data-accent="mono"][data-phase="evening"], :root[data-accent="mono"][data-phase="night"] { --cta: #F3EEE4; --on-cta: #121110; --tab-on: #F3EEE4; }
:root[data-accent] .tab[aria-current="page"] { color: var(--tab-on, var(--accent)); }
/* Changing theme fades, never flashes: only while the member is choosing (theme-fading, for under half a second), never
   when the app opens; at rest under Reduce Motion and Calm visuals. */
:root.theme-fading body { transition: background-color 0.3s ease, color 0.3s ease; }
@media (prefers-reduced-motion: reduce) { :root.theme-fading body { transition: none; } }
:root[data-calm].theme-fading body { transition: none; }
/* The Appearance sheet: five cards, each a small picture of Today in its theme; six accent circles. */
.theme-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-bottom: var(--s-4); }
.theme-card { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-1); min-height: var(--tap); padding: var(--s-1); border: 2px solid transparent; border-radius: var(--r-2); background: none; color: var(--ink); font-size: var(--t-1); }
.theme-card[aria-pressed="true"] { border-color: var(--cta); }
.theme-mini { display: grid; gap: var(--s-1); height: 4.5rem; padding: var(--s-1); border-radius: var(--r-1); box-shadow: inset 0 0 0 1px var(--line); }
.theme-mini i { display: block; height: 0.5rem; border-radius: 3px; }
.theme-mini b { display: block; height: 1.25rem; border-radius: var(--r-1); }
.accent-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-4); }
.accent-dot { position: relative; width: var(--tap); height: var(--tap); padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; }
.accent-dot::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1px var(--line); }
.accent-dot[aria-pressed="true"] { border-color: var(--ink); }

/* The area colours (Round 2, docs/DESIGN-DIRECTION.md, replacing D103's): honey, blue, coral, indigo and teal, quieter
   on ivory and lighter on ink; made a little richer on 28 Nov 2026 (D118: the same hues, more colour; the light coral
   leans a touch towards orange so it stays coral, never red). Shapes, bars and icons take the shape colour (3 to 1 or more on every ground); words take
   the deeper word colour (4.5 to 1 or more). Dark
   grounds (the evening, the night, Black) first; light grounds (dawn, day, golden hour, White) after. A logic test
   holds every pair. The calendar's dots keep their own colours. */
/* Today, alive (D120 (e), approved by Alex 28 Nov 2026: "alive, not matte"): the lab's purer colours replace D118's. Each
   area has a deep colour (--c-*, shapes: at least 3 to 1 on every ground), a lit tone (--l-*, where a bar, an arc or a
   line starts before it runs into the deep colour; never the only thing that carries meaning) and a word colour (--w-*,
   at least 4.5 to 1). On the light grounds the food and training colours are nudged a touch deeper than the lab's
   (#E26A00 to #DC6700, #F05A38 to #EB5A38) so they reach 3 to 1 on ivory as well as on a card; training keeps enough
   green to stay coral, never a warning red. --tip is the white light at an arc's end; --bloom and --fillto are how
   strongly an arc glows and a line's soft fill shows. A logic test holds every pair and the no-red, no-green check. */
:root {
  --c-food: #FF8A1F; --c-water: #2F8CFF; --c-train: #FF6A4A; --c-sleep: #7C5CFF; --c-tasks: #19C7B4;
  --l-food: #FFC65C; --l-water: #5CD2FF; --l-train: #FFA884; --l-sleep: #BCA6FF; --l-tasks: #6FF2DE;
  --w-food: #FFB25C; --w-water: #74B6FF; --w-train: #FF9A80; --w-sleep: #AE9BFF; --w-tasks: #5CE0CF;
  --tip: #FFFFFF; --bloom: 0.5; --fillto: 0.42;
}
:root[data-phase="dawn"], :root[data-phase="day"], :root[data-phase="golden"] {
  --c-food: #DC6700; --c-water: #1F6BFF; --c-train: #EB5A38; --c-sleep: #5B3DF5; --c-tasks: #0A9A8C;
  --l-food: #FFB534; --l-water: #38C6FF; --l-train: #FF9A62; --l-sleep: #A98BFF; --l-tasks: #2FE0C8;
  --w-food: #A04A00; --w-water: #1257D6; --w-train: #A84420; --w-sleep: #4D31E0; --w-tasks: #07766B;
  --tip: #FFFFFF; --bloom: 0.28; --fillto: 0.34;
}
.area-food { --area: var(--c-food); --area-l: var(--l-food); --area-w: var(--w-food); --area-g: linear-gradient(90deg, var(--l-food), var(--c-food)); }
.area-water { --area: var(--c-water); --area-l: var(--l-water); --area-w: var(--w-water); --area-g: linear-gradient(90deg, var(--l-water), var(--c-water)); }
.area-train { --area: var(--c-train); --area-l: var(--l-train); --area-w: var(--w-train); --area-g: linear-gradient(90deg, var(--l-train), var(--c-train)); }
.area-sleep { --area: var(--c-sleep); --area-l: var(--l-sleep); --area-w: var(--w-sleep); --area-g: linear-gradient(90deg, var(--l-sleep), var(--c-sleep)); }
.area-tasks { --area: var(--c-tasks); --area-l: var(--l-tasks); --area-w: var(--w-tasks); --area-g: linear-gradient(90deg, var(--l-tasks), var(--c-tasks)); }
/* Lit to deep, as the lab draws: a line runs from the lit tone on the left into the deep colour (g-*); a bar is deep at
   its foot and lit at its top (g-*-v); the soft fill under a line is the deep colour fading to nothing (g-*-fill). */
.gs-food-a { stop-color: var(--l-food); } .gs-food-b { stop-color: var(--c-food); }
.gs-water-a { stop-color: var(--l-water); } .gs-water-b { stop-color: var(--c-water); }
.gs-train-a { stop-color: var(--l-train); } .gs-train-b { stop-color: var(--c-train); }
.gs-sleep-a { stop-color: var(--l-sleep); } .gs-sleep-b { stop-color: var(--c-sleep); }
.gs-tasks-a { stop-color: var(--l-tasks); } .gs-tasks-b { stop-color: var(--c-tasks); }
.gv-food-a { stop-color: var(--c-food); } .gv-food-b { stop-color: var(--l-food); }
.gv-water-a { stop-color: var(--c-water); } .gv-water-b { stop-color: var(--l-water); }
.gv-train-a { stop-color: var(--c-train); } .gv-train-b { stop-color: var(--l-train); }
.gv-sleep-a { stop-color: var(--c-sleep); } .gv-sleep-b { stop-color: var(--l-sleep); }
.gv-tasks-a { stop-color: var(--c-tasks); } .gv-tasks-b { stop-color: var(--l-tasks); }
.gs-op-hi { stop-opacity: var(--fillto); }

/* The one chart: a header above, solid bars, a light scale on the right, avg and target lines, a thin touch line. */
.chart-head { display: grid; gap: 0; min-height: calc(var(--t-1) * 1.4 + var(--d-2) * 1.15 + var(--t-2) * 1.4); margin: 0 0 var(--s-2); -webkit-user-select: none; user-select: none; }
.chart-head.is-quiet { visibility: hidden; }
.chart-cap { color: var(--ink-2); font-size: var(--t-1); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.chart-big { color: var(--ink); font-family: var(--font-display); font-size: var(--d-2); font-weight: 500; line-height: 1.15; font-variant-numeric: lining-nums tabular-nums; }
.chart-range { color: var(--ink-2); font-size: var(--t-2); }
.cbar { fill: var(--area, var(--fill)); opacity: 1; transition: opacity var(--m-quick) ease; }
.cbar.is-none { fill: none; }
.cbar.is-dim { opacity: 0.3; }
.chart-tick { fill: var(--ink-2); font-family: var(--font-text); font-size: var(--t-1); }
/* The two words on a chart's lines (avg, target) keep a rim of the page round them, so a bar under them never hides them. */
.chart-avg-label, .chart-goal-label { paint-order: stroke; stroke: var(--tile); stroke-width: 4px; stroke-linejoin: round; }
.chart-avg { stroke: var(--ink-2); stroke-width: 1; }
.chart-goal { stroke: var(--area-w, var(--ink-2)); stroke-width: 1; opacity: 0.6; }
.chart-vline { stroke: var(--ink-2); stroke-width: 1; }
.chart-bubble { display: none; }
/* Trends: a monotone line with a soft glow, the colour fading to nothing under it, the usual range as a faint band. */
.line-path { stroke: var(--area, var(--fill)); stroke-width: 2.75; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--area, var(--fill)) 55%, transparent)); }
.line-fill { opacity: 1; }
.trend-stop-a { stop-color: var(--area, var(--fill)); stop-opacity: 0.32; }
.trend-stop-b { stop-color: var(--area, var(--fill)); stop-opacity: 0; }
.trend-band { fill: var(--area, var(--fill)); opacity: 0.09; }
.line-latest { fill: var(--area, var(--fill)); stroke: var(--bg); stroke-width: 2; }
.line-path.is-drawing { stroke-dasharray: 100; stroke-dashoffset: 100; animation: settle 0.9s var(--ease) forwards; transform: none; }
:root[data-calm] .line-path.is-drawing { animation: none; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .line-path.is-drawing { animation: none; stroke-dashoffset: 0; } .cbar { transition: none; } }
/* The macro donut: parts of a whole only, never progress. */
.donut-box { margin: 0 0 var(--s-5); }
.donut-stage { position: relative; width: 9.5rem; margin: 0 auto var(--s-2); }
.donut { display: block; width: 100%; height: auto; }
.donut-track { stroke: var(--track); stroke-width: 14; }
.donut-part { stroke-width: 14; stroke-linecap: round; cursor: pointer; }
.donut-0 { stroke: var(--c-food); background: var(--c-food); }
.donut-1 { stroke: color-mix(in srgb, var(--c-food) 68%, var(--bg)); background: color-mix(in srgb, var(--c-food) 68%, var(--bg)); }
.donut-2 { stroke: color-mix(in srgb, var(--c-food) 42%, var(--bg)); background: color-mix(in srgb, var(--c-food) 42%, var(--bg)); }
.donut-mid { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.donut-big { font-family: var(--font-display); font-size: var(--d-1); font-variant-numeric: lining-nums tabular-nums; }
.donut-sub { max-width: 5.25rem; color: var(--ink-2); font-size: var(--t-1); line-height: 1.2; }
.donut-key { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1) var(--s-4); color: var(--ink-2); font-size: var(--t-2); }
.donut-key li { display: flex; align-items: center; gap: var(--s-1); }
.donut-dot { width: 10px; height: 10px; border-radius: 50%; }
/* Area chips: no outlines; the chosen one filled with its colour; the rest a soft fill; they scroll sideways. */
.detail-areas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.detail-areas::-webkit-scrollbar { display: none; }
.detail-areas .chip { flex: none; border: 0; box-shadow: none; background: var(--chip); color: var(--on-chip); }
.detail-areas .chip.is-on { background: var(--area-w, var(--cta)); color: var(--bg); }
/* The history list in Apple's grouped style. */
.detail-rows { padding: 0 var(--s-4); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge); }
.detail-rows .row-value { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Matching the lab (27 Nov 2026): the ground and the cards are the same on every page and never tinted; only the top
   light changes with the hour. Colour lives in the icon, the bar and the chart, in the area's own colour (the coloured
   washes on Food, Sleep and Gym, the tinted cards and their glow at night are gone, as in design-lab). */
.add-tile[class*="area-"] .tile-icon, .widget-card[class*="area-"] .tile-icon, .add-btn[class*="area-"] .icon { color: var(--area); }
/* Life, quick and calm: the card pulses once when something is logged; the clock on Today's ribbon breathes. */
@keyframes tile-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
.add-tile.is-bumped { animation: tile-pulse 0.45s var(--ease); }
.ribbon-now { animation: sun-breathe 2.4s ease-in-out infinite alternate; }
:root[data-calm] .add-tile.is-bumped, :root[data-calm] .ribbon-now { animation: none; }
@media (prefers-reduced-motion: reduce) { .add-tile.is-bumped, .ribbon-now { animation: none; } }
/* Pictures: an empty state's mark in its area's colour; meal photos large and rounded. */
[class*="area-"] .empty .state-mark { color: var(--area); }
.row-photo { width: 3.5rem; height: 3.5rem; border-radius: var(--r-2); object-fit: cover; }

/* Step 12 (docs/NEXT-17B-STEP12-REACH.md): nothing hidden. */
/* The member's initials at the top right, on every tab. */
/* Every button in the bar keeps its 44 points; the date gives way (it shortens) when the bar is full. */
.top-actions { flex: none; gap: var(--s-1); }
.top-icon { flex: none; }
.top-day { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-you { padding: 0; }
.top-you .avatar { width: 2rem; height: 2rem; }
/* One Next suggestion, in place under the title: never a pop-up. */
.next-up { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-4); padding: var(--s-1) var(--s-1) var(--s-1) var(--s-4); border-radius: var(--r-pill); background: var(--tile); box-shadow: var(--edge); }
.next-up-label { color: var(--ink-2); font-size: var(--t-1); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.next-up-go { flex: 1; min-width: 0; }
/* Related, as cards. */
.related { margin-top: var(--s-5); }
.related-cards { display: grid; gap: var(--s-2); }
.related-cards .detail-link { padding: var(--s-3) var(--s-4); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge); }
/* Each card's one action, in its area's word colour. */
.card-act { margin-top: var(--s-1); color: var(--area-w, var(--accent)); font-size: var(--t-2); font-weight: 600; }
/* A card grows into its page, and shrinks back into it on Back (Round R18B, 67-reach.js): transform and opacity only,
   under 300 ms. Under Reduce Motion the move is not made at all (the code checks), so a page simply fades in. */
.is-settling { transition: transform var(--m-open) var(--ease), opacity var(--m-open) var(--ease); }
.is-returning { position: relative; z-index: 3; }

/* Alex's iPhone check of step 12 (23 Nov 2026): eight small fixes. */
/* The date shows whole words only (fitTopDay picks the form that fits); never an ellipsis. */
.top-day { text-overflow: clip; }
/* An empty stone is a faint outline in its own colour, never a grey placeholder. */
.stone-meter .ring-track { fill: color-mix(in srgb, var(--area, var(--fill)) 12%, transparent); stroke: color-mix(in srgb, var(--area, var(--fill)) 55%, transparent); stroke-width: 1.5; }
/* The rest timer is a strip above the tab bar, never in the top bar. */
.pill.is-rest-bar { top: auto; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); border-radius: 0; }
.pill#gymPill:not(.is-rest-bar) { display: none; }
/* A small card's buttons sit down its right edge; its bar and words stop short of them. */
.widget.size-s .add-tile.has-page .level, .widget.size-s .add-tile.has-page .tile-sub { width: auto; margin-right: calc(var(--tap) - var(--s-1)); }
/* The night card ends with its buttons. */
#homeNight .home-acts { margin-bottom: 0; }
.widget > #homeNight { padding-bottom: var(--s-3); }
/* The ribbon's labels: its two ends and a key for its marks. */
.ribbon-legend { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-1); color: var(--ink-2); font-size: var(--t-1); font-variant-numeric: tabular-nums; }
.ribbon-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--s-2); min-width: 0; }
.ribbon-key-item { display: inline-flex; align-items: center; gap: var(--s-1); }
.ribbon-key-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--area); }

/* Smoothness (23 Nov 2026): a sheet, the toast and the + menu move on a plain tint, never a live blur; the trend line has no
   glow filter (it cost every frame it drew). */
.sheet, .toast, .quick-add { -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet { background: var(--surface); }
.quick-add { background: var(--surface); }
.line-path { filter: none; }

/* The small round of 23 Nov 2026. B: a little life, under 300 ms, nothing bounces, flashes or loops. */
.tile-main, .tile-open, .widget-card, .summary-card, .highlight-card, .row-card, .member-avatar { transition: transform 0.12s ease; }
.tile-main:active, .tile-open:active, .widget-card:active, .summary-card:active, .highlight-card:active, .row-card:active, .member-avatar:active { transform: scale(0.98); }
.stone-meter .ring-arc.is-growing { transition: transform 0.28s var(--ease); }
.board.is-opening > *, .widget-board.is-opening > .widget { animation-duration: 0.28s !important; }
@media (prefers-reduced-motion: reduce) { .tile-main, .tile-open, .widget-card, .summary-card, .highlight-card, .row-card, .member-avatar, .stone-meter .ring-arc.is-growing { transition: none; } .tile-main:active, .tile-open:active, .widget-card:active, .summary-card:active, .highlight-card:active, .row-card:active, .member-avatar:active { transform: none; } }

/* C: a real membership card: warm ink (Round 2: no navy, no gold), a thin ivory edge, the name small at the top, the
   member's name large in the serif, since when, the plan as a small label, and the member number. */
.member-card.is-club { --card: #1C1A17; --card-ink: #F3EEE4; --card-quiet: #B8B1A4; --card-line: #B8B1A4; position: relative; overflow: hidden; padding: var(--s-4); border-radius: var(--r-3); background: var(--card); color: var(--card-ink); box-shadow: inset 0 0 0 1px var(--card-line), var(--lift); }
/* Honest review, bug 7: the card turned navy at night, from an older look, and its small name took a colour meant for a
   light message, which could not be read on it. Warm ink at every hour; the name in the card's own quiet colour. */
.member-card.is-club .member-mark { color: var(--card-quiet); }
:root[data-theme="black"] .member-card.is-club { --card: #0A0A0C; }
.member-mark { display: block; color: var(--card-line); font-size: var(--t-1); font-weight: 600; letter-spacing: 0.24em; }
.member-card.is-club .display { color: var(--card-ink); font-family: var(--font-display); }
.member-name-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; min-height: var(--tap); }
.member-card.is-club .member-since { color: var(--card-quiet); font-size: var(--t-2); }
.member-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; padding: 0; overflow: hidden; border: 1px solid var(--card-line); border-radius: 50%; background: transparent; color: var(--card-line); }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* With no name yet, the still-water mark in the circle, in the card's own ink (Alex, 2 Dec 2026: never the word You). */
.member-avatar .avatar { width: 100%; height: 100%; background: transparent; box-shadow: none; color: var(--card-quiet); }
.member-initials { font-family: var(--font-display); font-size: var(--d-1); }
.member-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-3); }
.member-plan { padding: var(--s-1) var(--s-2); border: 1px solid var(--card-line); border-radius: var(--r-pill); color: var(--card-line); font-size: var(--t-1); }
.member-no { color: var(--card-quiet); font-size: var(--t-2); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.member-founding { margin-top: var(--s-1); color: var(--card-line); font-size: var(--t-1); }
/* One slow, soft shine across it when the page opens; never again until the next visit; off with Reduce Motion. */
.member-card.is-club::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.10), transparent); transform: translateX(-120%); pointer-events: none; }
.member-card.is-club.is-shining::after { animation: member-shine 1.6s var(--ease) 0.2s 1 both; }
@keyframes member-shine { 90% { opacity: 1; } to { transform: translateX(300%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .member-card.is-club.is-shining::after { animation: none; } }
:root[data-calm] .member-card.is-club.is-shining::after { animation: none; }

/* Round R18B: the moment stone, at the right of the greeting in the greeting's own row, so it never covers anything.
   Its touch area is the full 44 points; the row grows by none of it. */
.home-hello-row { position: relative; display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-1); }
.home-hello-row .home-hello { flex: 1; min-width: 0; margin: 0; }
.moment-stone { flex: none; display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--s-2); min-width: var(--tap); min-height: var(--tap); margin: calc(var(--s-2) * -1) calc(var(--s-2) * -1) calc(var(--s-2) * -1) 0; padding: 0 var(--s-2); border: 0; background: transparent; color: var(--ink-2); font-size: var(--t-1); }
.moment-pebble { display: block; width: 1.125rem; height: 0.875rem; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; }
.moment-stone.is-waiting .moment-pebble { border-color: var(--area); background: var(--area); box-shadow: 0 0 0 var(--s-1) color-mix(in srgb, var(--area) 20%, transparent), 0 0 var(--s-3) color-mix(in srgb, var(--area) 45%, transparent); }
.moment-stone.is-waiting .moment-word { color: var(--area-w, var(--ink)); font-weight: 600; }
.moment-stone.is-pulsing .moment-pebble { animation: stone-pulse 1.2s var(--ease) 0.3s 1; }
@keyframes stone-pulse { 50% { transform: scale(1.3); opacity: 0.8; } }
/* Opened in place: a small card that grows from the stone, over what is below, and goes with a swipe. */
.moment-pop { position: absolute; top: 100%; right: 0; z-index: 5; width: min(20rem, 100%); padding: var(--s-3); border-radius: var(--r-3); background: var(--surface); box-shadow: var(--float); transform-origin: 92% 0; touch-action: none; }
.moment-pop.is-opening { animation: stone-open 0.24s var(--ease); }
@keyframes stone-open { from { transform: scale(0.3); opacity: 0; } }
.moment-title { margin: 0; font-size: var(--t-3); font-weight: 600; line-height: 1.3; }
.moment-pop .chips, .moment-pop .feel { margin: var(--s-2) 0 0; padding-bottom: 0; flex-wrap: wrap; }
.moment-pop .feel { display: flex; gap: var(--s-2); }
.moment-pop .feel-btn { flex: 1; min-height: var(--tap); padding: var(--s-1) var(--s-2); font-size: var(--t-2); }
.moment-foot { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-1); color: var(--ink-2); font-size: var(--t-1); }
.moment-foot .moment-next { margin-left: auto; }
/* Round R18B: the week's stones on You and the membership card's foot are buttons now; they keep their look. */
.week-ring { min-width: var(--tap); min-height: var(--tap); padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.member-foot { width: 100%; min-height: var(--tap); margin-top: var(--s-1); padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.member-card { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .moment-stone.is-pulsing .moment-pebble, .moment-pop.is-opening { animation: none; } }

/* ---------- Round 2: the look Alex approved in the design lab (docs/DESIGN-DIRECTION.md, design-lab/lab.css) ----------
   Ivory paper by day and warm ink at night. Only the five areas carry colour; the one main action is the inverse
   button. Later rules here win over the older ones above, so the older screens take the new look without each being
   rewritten. */
/* The label above a card's title: 13, capitals, spaced, in the third ink. */
.label-cap { color: var(--label); font-size: var(--t-1); font-weight: 500; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase; }
/* Buttons are round. The main one is the inverse of the page; every other one is a quiet tone, never an outline. */
.btn { border-radius: var(--r-pill); font-weight: 600; }
.btn:not(.btn-primary) { border-color: transparent; background: var(--tone); }
.btn-primary { border-color: var(--cta); }
.chip { border-radius: var(--r-pill); }
.chip:not([aria-pressed="true"]) { border-color: transparent; background: var(--tone); }
.link { color: var(--ink); }
/* Cards: one style everywhere, 20 corners, 16 inside; a warm shadow by day, an edge and a lit top line at night. */
.card { padding: var(--s-4); }
.notice { background: var(--tone); }
/* The top light: a soft glow behind the greeting that rises once when the app opens (the first signature moment),
   then stays still. Nothing drifts or breathes. */
.shell::before { left: -30%; width: 160%; height: 520px; top: -180px; animation: toplight-rise var(--m-sign) var(--glide) both; }
.shell::after { display: none; animation: none; }
@keyframes toplight-rise { from { opacity: 0; transform: translateY(var(--s-5)); } }
/* The tab bar: glass, quiet labels at 11 (the one place 11 is used, as iOS does), the chosen tab in the text colour,
   and the + as a small inverse disc in the middle that says Add. No sliding marker. */
.tabs { border-top-color: var(--hair); }
.tab { font-size: var(--t-0); font-weight: 500; letter-spacing: 0.01em; color: var(--label); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] .icon { stroke-width: 2; }
.tab-ink { display: none; }
.tab-add-disc { width: var(--s-7); height: 24px; margin: 0; border-radius: var(--r-pill); background: var(--cta); color: var(--on-cta); box-shadow: none; }
.tab-add-disc .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.tab-add-word { font-size: var(--t-0); font-weight: 500; color: var(--ink); letter-spacing: 0.01em; }
.tab:active, .tab-add:active { transform: scale(0.92); transition: transform var(--m-press) var(--glide); }
/* "Search or ask": a box at the top of every tab that opens search and the Assistant (Round 2, D111). */
.ask-box { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--tap); margin: 0 0 var(--s-5); padding: 0 var(--s-4); border: 0; border-radius: var(--r-2); background: var(--tile); box-shadow: var(--edge), var(--lift); color: var(--label); font-size: var(--t-3); text-align: left; }
.ask-box .icon { flex: none; width: 20px; height: 20px; }
/* The words are drawn like a search field's hint, so they are not read as part of the screen's own words (its name says them). */
.ask-hint::before { content: attr(data-hint); }
/* On Today the box is a little shorter and closer, so Today still fits one screen at every hour (Round 11's rule): it
   keeps a full 44-point touch area, unseen, above and below. */
.view-home .ask-box { min-height: 32px; margin: calc(-1 * var(--s-1)) 0 var(--s-1); }
.view-home .ask-box { z-index: 1; }
.view-home .ask-box::before { top: calc(-1 * var(--s-2)) !important; bottom: calc(-1 * var(--s-2)) !important; }
.view-home .home-line:not(.is-big) { font-size: var(--t-2); line-height: 1.3; }
.view-home .home-rings { margin-bottom: 0; }
.view-home .home-line + .ask-box { margin-top: 0; }
.view-home .home-line { margin-bottom: 0; }
.view-home .home-hello-row { margin-bottom: 0; }
.view-home .ask-box::before { content: ''; position: absolute; left: 0; right: 0; top: calc(-1 * var(--s-1)); bottom: calc(-1 * var(--s-1)); }
.ask-box:active { transform: scale(0.98); transition: transform var(--m-press) var(--glide); }
/* Sheets: the sheet ground, 28 corners, a soft shadow above; a card on a sheet is a step lighter. */
.sheet .card, .sheet .tile { background: var(--tile); }
/* The + sheet: five area tiles and More, three across (Round 2). */
.add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin: 0 0 var(--s-4); }
.add-grid .add-btn { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: var(--s-2); min-height: 100px; padding: var(--s-4); border: 0; border-radius: var(--r-3); background: var(--tone); box-shadow: none; color: var(--ink); font-size: var(--t-3); font-weight: 600; text-align: left; }
.add-grid .add-btn .icon { width: 26px; height: 26px; color: var(--area, var(--ink)); }
.add-grid .add-btn .icon path { fill: none; }
/* At the larger text sizes a long word (Movement) wraps inside its tile rather than pushing the sheet wider. */
.add-grid .add-btn { min-width: 0; overflow-wrap: anywhere; }
:root[data-text="larger"] .add-grid .add-btn, :root[data-text="large"] .add-grid .add-btn { padding: var(--s-3); font-size: var(--t-2); }
.ask-box { position: relative; }
.ask-box.has-new::after { content: ""; position: absolute; top: 50%; right: var(--s-4); width: var(--s-2); height: var(--s-2); margin-top: calc(-1 * var(--s-1)); border-radius: 50%; background: var(--ink); }
.add-grid .add-btn:active { transform: scale(0.98); transition: transform var(--m-press) var(--glide); }
.add-more-list { margin: 0 0 var(--s-4); padding: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); overflow: hidden; }
.add-row { position: relative; display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 60px; padding: var(--s-3) var(--s-4); border: 0; background: transparent; color: var(--ink); font-size: var(--t-3); text-align: left; }
.add-row + .add-row { box-shadow: inset 0 1px 0 var(--hair); }
.add-row .icon { flex: none; color: var(--area, var(--ink-2)); }
.add-row .icon path { fill: none; }
/* Add a meal, words first (Round 2): Photo and Barcode beside the words box, then the usual meals. */
.meal-alt { display: flex; gap: var(--s-2); margin: calc(-1 * var(--s-2)) 0 var(--s-4); }
.meal-alt-btn { flex: 1 1 0; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-3); font-size: var(--t-2); }
.meal-usual-label { margin: var(--s-5) 0 var(--s-2); }
.meal-quick .meal-quick-row { margin-top: var(--s-3); }
/* Cards on Today, the area pages and You (Round 2): the small label above, in capitals, one large figure in the serif
   at 300, the second line in the second ink, the card's one action in its area's word colour. */
.tile-label, .chart-cap { color: var(--label); font-size: var(--t-1); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.tile-big, .widget-big { font-weight: 300; letter-spacing: -0.01em; }
/* A tile's label keeps inside its tile at the larger text sizes. */
.tile-label { min-width: 0; overflow-wrap: anywhere; }
/* NEXT-39: Sleep's three times line up. "WIND-DOWN" broke at its hyphen, so that tile alone stood a line taller. */
.sleep-time .tile-label { white-space: nowrap; overflow-wrap: normal; letter-spacing: 0.06em; }
:root[data-text] .tile-label { letter-spacing: 0.04em; }
.home-now-title { font-family: var(--font-text); font-weight: 600; letter-spacing: -0.01em; }
.home-ring-name { color: var(--label); }
/* Charts (Round 2): bars and lines in the area's shape colour, a faint sample before the first entry. */
.cbar { opacity: 1; }
.cbar-sample { fill: var(--area, var(--fill)); opacity: 0.14; }
.line-path { stroke-width: 2; }
.line-fill { opacity: 0.24; }
/* The workout (Round 2, the lab): the set in hand is a quiet tone with a 3-point training line beside it, never a card
   inside a card; a new best breathes one halo round its figure. */
.wo-row.is-current { background: var(--tone); box-shadow: inset 3px 0 0 var(--c-train); }
.wo-row.is-current .wo-num { border-color: var(--line); }
.wo-row.is-new-best { position: relative; }
.wo-row.is-new-best::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-2); box-shadow: 0 0 0 var(--s-1) var(--glow); opacity: 0; pointer-events: none; animation: halo-once var(--m-best) var(--glide); }
/* You (Round 2): three groups, each under its small label. */
.you-group { margin: var(--s-7) 0 var(--s-3); }
.places { border-radius: var(--r-3); }
/* Big figures: Newsreader at 300, units beside them in the text face. */
.fig-big { font-family: var(--font-display); font-weight: 300; font-size: var(--d-5); line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; }
.fig-unit { margin-left: var(--s-1); color: var(--ink-2); font-family: var(--font-text); font-size: var(--d-1); font-weight: 400; }
/* Empty states: one sentence at 22, weight 600; the sample stays faint (14%). */
.empty-big { font-size: var(--d-1); font-weight: 600; line-height: 1.25; margin: var(--s-2) 0 var(--s-4); }
.sample-faint { opacity: 0.14; }
/* A personal best: the halo breathes once round the figure (the third signature moment), 0.6 s, no colour. */
.best-halo { position: relative; }
.best-halo::after { content: ''; position: absolute; inset: calc(-1 * var(--s-2)); border-radius: var(--r-pill); box-shadow: 0 0 0 var(--s-2) var(--glow); opacity: 0; pointer-events: none; animation: halo-once var(--m-best) var(--glide); }
@keyframes halo-once { 40% { opacity: 1; } to { opacity: 0; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  .shell::before, .best-halo::after, .wo-row.is-new-best::after { animation: none; }
  .tab:active, .tab-add:active, .ask-box:active, .add-grid .add-btn:active { transform: none; }
}
:root[data-calm] .shell::before, :root[data-calm] .best-halo::after, :root[data-calm] .wo-row.is-new-best::after { animation: none; }

/* NEXT-16, 2: with Reduce Motion on the phone, or Calm visuals in the app, a screen, a sheet, a new row or a toast fades
   in over a sixth of a second instead of moving. Opacity only. Last in the file, so it wins. */
@keyframes fade-only { from { opacity: 0; } }
/* Today, alive (the section at the end): its one pulse, and what stays still under Reduce Motion. Kept before the last
   Reduce Motion block, which must close the stylesheet. */
.g.bump .g-halo { animation: lightpulse var(--m-sign) var(--glide); }
.g.is-changed .g-in { animation: fade-only var(--m-fade) linear; }
:root[data-calm] .g.bump .g-halo { animation: none; }
@keyframes lightpulse { 0% { transform: scale(1); opacity: 0.55; } 40% { transform: scale(2); opacity: 0.8; } 100% { transform: scale(1); opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  :root .g.bump .g-halo { animation: none; }
  :root .wk i, :root .g { transition: none; }
  :root .quick { transform: none; transition: opacity var(--m-fade) linear; }
}
/* Elevate, stage 5: switching Week, Month and the rest, the chart settles in place (before the reduced-motion rules). */
.chart-box.is-switching .chart-stage { animation: chart-settle 280ms cubic-bezier(0.32, 0.72, 0, 1) both; }
.chart-box.is-switching .cbar.is-drawing { animation-duration: 260ms; }
@keyframes chart-settle { from { opacity: 0.35; transform: translateY(6px) scaleY(0.96); } to { opacity: 1; transform: none; } }

/* ALIVE round 3, words not zeros: a count with none yet says so in words; an empty recipe list shows an example. */
.fig.fig-words { font-size: var(--t-3); font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.example-card { margin: var(--s-2) 0 var(--s-3); padding: var(--s-3); border: 1px dashed var(--hair); border-radius: var(--r-2); color: var(--ink-2); }
.example-title { margin: var(--s-1) 0; font-size: var(--t-3); }
.example-lines { margin: 0 0 var(--s-2); padding-left: var(--s-4); font-size: var(--t-2); }
/* ALIVE round 4: today's one moment, under the story, arriving once (still under Reduce Motion and Calm visuals). */
.al-story-moment { margin: var(--s-2) 0 0; font-size: var(--t-2); color: var(--ink); line-height: 1.45; font-style: italic; font-family: var(--font-display); animation: moment-in var(--m-best) var(--ease) both; }
@keyframes moment-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
:root[data-calm] .al-story-moment { animation: none; }

/* Alex, 29 Nov 2026: the welcome screen at full contrast. ALIVE round 6: Today's This week bars as lit as the arcs. */
.gate .lede, .gate .tagline, .gate .muted, .gate .gate-more { color: var(--ink); }
.al-week .wk i { opacity: 0.72; background: linear-gradient(to top, var(--area), var(--area-l)); }
.al-week .wk i.now { opacity: 1; box-shadow: 0 0 var(--s-3) color-mix(in srgb, var(--area-l) 55%, transparent); }
.al-week .wk i.none { opacity: 1; box-shadow: none; }
.tab-top { margin-bottom: var(--s-3); }

/* ALIVE round 7: Food's day switcher in its title row, as Today's; today's water on Water's own page. */
.food-day { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.food-day .day-bar-date { margin: 0; white-space: nowrap; }
.water-now { margin: var(--s-2) 0 var(--s-3); }
.water-now-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.water-now-fig { color: var(--ink); font-size: var(--t-3); font-variant-numeric: tabular-nums; }

/* ALIVE round 10: the assistant's word for the hour. */
.ai-hello { margin: var(--s-2) 0 var(--s-3); color: var(--ink); font-family: var(--font-display); font-size: var(--t-3); font-style: italic; }

/* The journal (Alex, 29 Nov 2026): calmer, the voice button large and soft, past entries under quiet dates. */
.journal-write { margin: var(--s-3) 0; }
.journal-evening { margin: 0 0 var(--s-1); color: var(--ink-2); font-family: var(--font-display); font-style: italic; font-size: var(--t-3); }
.journal-voice { margin: var(--s-2) 0; }
.journal-speak { min-height: var(--s-10); border-radius: var(--r-3); font-size: var(--t-3); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.journal-speak.is-live { background: color-mix(in srgb, var(--c-sleep) 18%, var(--card)); box-shadow: 0 0 var(--s-5) color-mix(in srgb, var(--l-sleep) 45%, transparent); }
.journal-date { margin: var(--s-4) 0 var(--s-1); color: var(--ink-2); font-size: var(--t-1); letter-spacing: 0.02em; }
.journal-day-rows { margin-top: 0; }

/* The journal's month: days with an entry glow softly, brighter for longer ones; the member's own themes as soft bubbles. */
.journal-month { margin: var(--s-2) 0 var(--s-3); padding: var(--s-3); }
.journal-mon-head { display: flex; align-items: center; justify-content: space-between; }
.journal-mon-head .label { margin: 0; }
.jc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-1); margin-top: var(--s-2); touch-action: pan-y; }
.jc-head { color: var(--ink-2); font-size: var(--t-0); text-align: center; }
.jc-day { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; min-height: 0; padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font-size: var(--t-1); font-variant-numeric: tabular-nums; }
.jc-day.is-blank { visibility: hidden; }
.jc-day.is-later { opacity: 0.55; }
.jc-day.is-today { box-shadow: inset 0 0 0 1px var(--hair); }
.jc-day.has { color: var(--ink); background: radial-gradient(circle, color-mix(in srgb, var(--ink) 16%, transparent) 0%, transparent 72%); animation: jc-in var(--m-best) var(--ease) both; }
.jc-day.has.g2 { background: radial-gradient(circle, color-mix(in srgb, var(--ink) 26%, transparent) 0%, transparent 74%); }
.jc-day.has.g3 { background: radial-gradient(circle, color-mix(in srgb, var(--ink) 38%, transparent) 0%, transparent 78%); box-shadow: 0 0 var(--s-3) color-mix(in srgb, var(--ink) 18%, transparent); }
@keyframes jc-in { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }
:root[data-calm] .jc-day.has { animation: none; }
.journal-counts { margin-top: var(--s-3); }
.journal-count { margin: 0; color: var(--ink); font-size: var(--t-2); }
.jt-label { margin: var(--s-3) 0 var(--s-1); }
.jt-themes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.jt-bubble { min-height: var(--tap); padding: 0 calc(var(--s-3) * var(--n, 1)); border: 0; border-radius: var(--r-pill); background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--ink) 14%, var(--card)), color-mix(in srgb, var(--ink) 6%, var(--card))); color: var(--ink); font-size: calc(var(--t-1) * var(--n, 1)); box-shadow: 0 0 var(--s-3) color-mix(in srgb, var(--ink) 10%, transparent); }

/* You, elevated: each area a card with its glowing arc and one sentence; the rest in a few grouped cards. */
/* Second honest review, change 7: You's areas as one row of rings in one card, the full width of the page. */
.you-areas-box { margin: var(--s-3) 0; }
/* NEXT-46: Speak and Write, side by side, above the box. */
.journal-ways { display: grid; gap: var(--s-2); margin: var(--s-2) 0 var(--s-3); }
.journal-ways > .journal-voice-note { margin: 0; }
/* Speak, big and first (Alex, 2 Dec 2026). */
.journal-ways .journal-speak { min-height: calc(var(--s-10) + var(--s-3)); font-size: var(--t-3); font-weight: 600; }
.journal-ways .btn { margin: 0; }
/* NEXT-45: the card's one sentence, and Your story's months, one plain line each. */
.you-line { margin: var(--s-3) 0 0; color: var(--ink-2); }
.you-story { margin: var(--s-4) 0; }
.you-story > .label { margin: 0 0 var(--s-1); }
.you-story .story-month .row-title { font-weight: 400; white-space: normal; }
/* The month in dots, a day each (Alex, 2 Dec 2026): something logged, a workout, an evening switched off. */
.ms-dots { display: grid; gap: var(--s-1); margin-top: var(--s-2); }
.ms-track { display: flex; flex-wrap: nowrap; gap: calc(var(--s-1) / 2); }
.ms-dot { flex: 1 1 0; max-width: var(--s-2); height: var(--s-2); border-radius: 50%; background: var(--line); }
.ms-track.area-tasks .ms-dot.is-on { background: var(--ink-2); }
.ms-track.area-train .ms-dot.is-on { background: var(--c-train); }
.ms-track.area-sleep .ms-dot.is-on { background: var(--c-sleep); }
/* A small coloured body that opens Gym. */
.card.you-body { display: flex; align-items: center; gap: var(--s-4); width: 100%; margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); text-align: left; color: inherit; font: inherit; cursor: pointer; }
.you-body .you-body-pic { width: 3.5rem; }
.you-body-words { display: grid; gap: var(--s-1); flex: 1 1 auto; min-width: 0; }
.you-body-line { font-size: var(--t-2); }
.you-body > svg { color: var(--ink-2); flex: none; }
/* Moments: the latest best and the firsts, as small cards side by side. */
.you-moments { margin: var(--s-4) 0; }
.you-moments > .label { margin: 0 0 var(--s-2); }
.you-moment-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: var(--s-2); }
.card.you-moment { display: grid; gap: var(--s-1); align-content: start; padding: var(--s-3); text-align: left; color: inherit; font: inherit; cursor: pointer; }
.you-moment-kind { color: var(--w-train); font-size: var(--t-0); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.you-moment-title { font-size: var(--t-2); font-weight: 600; }
.you-moment-when { color: var(--ink-2); font-size: var(--t-1); }
.you-areas-box > .label { margin: 0 0 var(--s-1); }
/* NEXT-39: one row, however many rings. The card's own rule further down (display: block) used to win over this one, so
   the rings stacked for a screen and a half; this is said for the card itself now. */
.card.you-areas { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-1); width: 100%; margin: 0; padding: var(--s-3) var(--s-2); }
.you-areas .week-ring { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); width: 100%; min-width: 0; padding: 0; text-align: center; }
.you-areas .week-ring .dial { flex: none; width: 52px; max-width: 100%; }
.you-areas .week-ring-name { color: var(--ink-2); font-size: var(--t-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.week-ring-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-ring-say { color: var(--ink); font-size: var(--t-2); line-height: 1.35; }
.you-card { margin: var(--s-3) 0; padding: var(--s-2) var(--s-3); }
.you-card .you-group { margin: var(--s-1) 0; }

@media (prefers-reduced-motion: reduce) {
  .view-enter, .view-enter-fwd, .view-enter-back, .sheet[open], .rows > li.is-new, .msg.is-new, .toast:not([hidden]) { animation: fade-only var(--m-fade) linear !important; animation-duration: var(--m-fade) !important; }
  :root .level-fill { transition: none; }
}
:root[data-calm] .view-enter, :root[data-calm] .view-enter-fwd, :root[data-calm] .view-enter-back, :root[data-calm] .sheet[open] { animation: fade-only var(--m-fade) linear; }


/* ---------- R20, clarity: words beside icons (docs/DESIGN-SYSTEM.md, Clarity) ---------- */
.top-word { display: none; font-size: var(--t-2); font-weight: 500; color: var(--ink-2); }
.top-icon.top-worded.word-on { width: auto; min-width: var(--tap); gap: var(--s-1); padding: 0 var(--s-2); border-radius: var(--r-pill); }
.top-worded.word-on .top-word { display: inline; }
.top-worded.word-on .bell-dot { right: auto; left: var(--s-5); }
.top-actions:has(.pill:not([hidden])) .top-word { display: none; }
.top-actions:has(.pill:not([hidden])) .top-icon.top-worded { width: var(--tap); padding: 0; }
/* While a page's small title sits in the bar, Updates is its bell only, so the title has room (Alex, 23 Nov 2026). */
:root.title-small .top-actions .top-word { display: none; }
:root.title-small .top-actions .top-icon.top-worded { width: var(--tap); padding: 0; }
/* The frame meter, on the test copy only (62-connect.js). */
.frame-meter { position: fixed; left: var(--s-2); bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px) + var(--s-2)); z-index: 2147483001; padding: var(--s-1) var(--s-2); border-radius: var(--r-1); background: var(--toast-bg); color: var(--toast-ink); font-size: var(--t-1); font-variant-numeric: tabular-nums; pointer-events: none; }
.frame-meter:empty { display: none; }
.avatar-word { font-size: var(--t-1); font-weight: 600; letter-spacing: 0.01em; }
.tab-add { flex-direction: column; gap: var(--s-1); }
/* Round 0: the disc is taller than the other tabs' icons; it stands out above and below so the word Add sits level with their labels. */
.tab-add-disc { width: var(--s-7); height: 24px; margin: 0; }
.tab-add-word { font-size: var(--t-0); font-weight: 500; color: var(--ink); letter-spacing: 0.01em; }
.wo-adjust-note, .wo-same { margin: 0 0 var(--s-2); }
.day-prev-link { display: inline-flex; margin: 0 0 var(--s-3); }
.theme-card[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cta); }
.theme-card[aria-pressed="true"] > span { font-weight: 600; color: var(--ink); }
/* Progress: a small line beside each kind of day and muscle group. */
.hist-spark { display: block; width: var(--s-10); }
.hist-spark .spark { width: 100%; height: auto; }
/* Round 1 (D112): the account pages, in the lab's Sign up look (design-lab, "Sign up"): the serif title, a quiet lede,
   labelled fields, one inverse button, "or", outlined Apple and Google, the testers' note and the way to the other page. */
.acct { padding: var(--s-5) var(--gutter) var(--s-10); }
.acct-in { max-width: 30rem; margin: 0 auto; }
.acct .display { margin: var(--s-5) 0 var(--s-2); }
.acct .lede { color: var(--ink-2); margin: 0 0 var(--s-4); }
.acct .field { margin-top: var(--s-4); }
.acct .field-label { font-weight: 600; }
.acct-go { width: 100%; margin-top: var(--s-5); }
.pw-box { position: relative; }
.pw-box .input { padding-right: var(--s-11); }
.pw-show { position: absolute; right: var(--s-1); top: 50%; transform: translateY(-50%); min-height: var(--tap); padding: 0 var(--s-3); border: 0; background: none; color: var(--ink-2); font-size: var(--t-2); font-weight: 600; }
.acct-or { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0 var(--s-1); font-size: var(--t-1); color: var(--ink-2); }
.acct-or::before, .acct-or::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.acct-social { display: flex; width: 100%; margin-top: var(--s-3); text-decoration: none; border-color: var(--field); }
.acct-note { font-size: var(--t-1); color: var(--ink-2); text-align: center; margin: var(--s-5) var(--s-2) 0; }
.acct-switch { font-size: var(--t-2); color: var(--ink-2); text-align: center; margin: var(--s-4) 0 0; }
.acct-link { font-weight: 600; color: var(--ink); }
.acct-forgot { display: block; margin: 0; }
.acct-tick { display: flex; align-items: center; justify-content: center; width: var(--s-10); height: var(--s-10); border-radius: var(--r-pill); box-shadow: var(--edge); margin: var(--s-7) 0 0; }
.acct-device { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--hair); }
.acct-device-t { display: flex; flex-direction: column; min-width: 0; }
.acct-email { font-size: var(--t-3); font-weight: 600; margin: var(--s-4) 0 0; overflow-wrap: anywhere; }
.btn.is-busy { opacity: 0.6; }
.acct .check label { display: block; flex-direction: row; }
.acct .check label > * { display: inline; }
.acct-switch .link + span + .link { margin-left: var(--s-4); }
/* Matching the lab (27 Nov 2026), Today: the button on a tile is a quiet tone, as the lab's Start, not a black disc;
   the line under the greeting is one quiet sentence; the rings' words sit under each ring, so none breaks in two. */
.tile-acts .tile-tap { color: var(--ink); }
.tile-acts .tile-tap::before { background: var(--chip); box-shadow: inset 0 0 0 1px var(--chip-edge); }
.view-home .home-line, .view-home .home-line:not(.is-big) { font-family: var(--font-text); font-size: var(--t-3); font-style: normal; line-height: 1.35; letter-spacing: 0; color: var(--ink-2); }
.view-home .home-line.is-big { font-family: var(--font-text); font-size: var(--t-3); font-style: normal; line-height: 1.35; letter-spacing: 0; color: var(--ink); }
.home-ring { flex-direction: column; justify-content: flex-start; gap: var(--s-1); text-align: center; }
.home-ring-words { align-items: center; }
.home-ring-val { white-space: nowrap; overflow-wrap: normal; }
/* Add a meal: Photo and Barcode are small rounded chips beside the words, as in the lab; the other ways match them. */
.meal-alt { flex-wrap: wrap; }
.meal-alt-btn { flex: none; min-height: var(--tap); padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: var(--chip); color: var(--on-chip); font-weight: 600; }
.sheet .nf-ways .btn-small { border: 0; border-radius: var(--r-pill); background: var(--chip); color: var(--on-chip); }
/* Your numbers: section headings are the lab's small label, so the cards carry the weight. */
#view-progress .section-title { color: var(--label); font-family: var(--font-text); font-size: var(--t-1); font-weight: 500; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase; }
.view-home .home-line, .view-home .home-line:not(.is-big) { margin-bottom: var(--s-2); }
/* Today still fits one iPhone screen with the rings' words under each ring: a smaller pill, tighter lines, and the
   line under the greeting at the second-line size, as the lab's own is on a 390-point screen. */
.view-home .home-ring { gap: 2px; padding: 0; }
.view-home .home-ring > svg { height: var(--s-7); width: auto; }
.view-home .home-ring-name, .view-home .home-ring-val { line-height: 1.15; }
.view-home .home-line, .view-home .home-line:not(.is-big), .view-home .home-line.is-big { font-size: var(--t-2); margin-bottom: var(--s-1); }
.view-home .home-ring > svg { height: calc(var(--s-5) - var(--s-1)); }
.view-home .home-ring-name, .view-home .home-ring-val { line-height: 1.1; }
.view-home .home-line, .view-home .home-line:not(.is-big), .view-home .home-line.is-big { line-height: 1.25; margin-bottom: 2px; }
/* Alex's iPhone, 27 Nov 2026 ("a bit messy"): room between the greeting, the rings, the line and the search box that
   grows with the screen. Tight only on a small phone, where Today must still fit one screen. */
.view-home .home-rings { margin-top: clamp(0px, calc((100dvh - 680px) / 8), var(--s-3)); margin-bottom: clamp(0px, calc((100dvh - 680px) / 8), var(--s-3)); }
.view-home .home-line, .view-home .home-line:not(.is-big), .view-home .home-line.is-big { margin-bottom: clamp(2px, calc((100dvh - 680px) / 6), var(--s-4)); }
/* Alex's iPhone, 27 Nov 2026 ("make a bit space and make it look cleaner"): the rings sit in a row, lined up on the left like
   everything else, with short words ("0/7 days") that never wrap; even room between the greeting, the rings, the line and
   the search box, the same on every phone. */
.view-home .home-ring { flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--s-2); text-align: left; }
.view-home .home-ring-words { align-items: flex-start; }
.view-home .home-ring > svg { height: var(--s-6); }
.view-home .home-ring-name, .view-home .home-ring-val { font-size: var(--t-1); line-height: 1.2; }
.view-home .home-rings { margin-top: var(--s-1); margin-bottom: var(--s-2); }
.view-home .home-line, .view-home .home-line:not(.is-big), .view-home .home-line.is-big { margin-bottom: var(--s-3); }
.view-home .home-rings { margin-top: 2px; margin-bottom: var(--s-1); }
.view-home .home-line, .view-home .home-line:not(.is-big), .view-home .home-line.is-big { margin-bottom: var(--s-2); }
/* Holon (D116): the brand files exactly as drawn, the ink one on light grounds and the ivory one on dark grounds. */
.brand-ink { display: none; }
.brand-ivory { display: block; }
:root[data-phase="dawn"] .brand-ink, :root[data-phase="day"] .brand-ink, :root[data-phase="golden"] .brand-ink, :root[data-theme="white"] .brand-ink { display: block; }
:root[data-phase="dawn"] .brand-ivory, :root[data-phase="day"] .brand-ivory, :root[data-phase="golden"] .brand-ivory, :root[data-theme="white"] .brand-ivory { display: none; }
:root[data-theme="black"] .brand-ink { display: none; }
:root[data-theme="black"] .brand-ivory { display: block; }
#topMark { display: inline-flex; align-items: center; }
#topMark img { height: var(--s-4); width: auto; }
.gate-mark { display: block; margin: 0 0 var(--s-3); }
.gate-mark img { height: var(--s-6); width: auto; }
/* The stacked lockup, on the sign-in and sign-up pages only: the file is drawn on its own ink square. */
.acct-lockup { display: block; width: var(--s-11); height: auto; margin: var(--s-2) auto var(--s-4); border-radius: var(--r-3); }

/* ---------- Round 3: the lab, exactly (Alex, 28 Nov 2026: "I want it to look like the lab, exactly ... the lab is the
   source of truth; where the app's old styles conflict, the lab wins") ----------
   design-lab/lab.css, class for class, in the app's own tokens: ground --bg, card --tile, sheet --surface, edge --hair,
   text --ink, second text --ink-2, third text --label, the inverse button --cta and --on-cta, the quiet tone --tone, the
   thin line's track --track, the five areas --c-* (shapes) and --w-* (words). The stones are gone: every figure is the
   lab's figure card (a label, one large figure, the target in small words, a thin line in the area's colour). */
.label { margin: 0; color: var(--label); font: 500 var(--t-1)/1.2 var(--font-text); letter-spacing: 0.12em; text-transform: uppercase; }
.greet { margin: var(--s-1) 0 var(--s-2); font-family: var(--font-display); font-size: var(--d-3); font-weight: 400; font-style: normal; line-height: 1.1; letter-spacing: -0.01em; }
.lead { margin: 0; color: var(--ink-2); font-size: var(--t-3); font-weight: 400; line-height: 1.35; }
.title { display: block; margin: var(--s-2) 0 var(--s-1); font-family: var(--font-text); font-size: var(--d-1); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.title-lg { display: block; margin: var(--s-2) 0 var(--s-1); font-family: var(--font-text); font-size: var(--d-2); font-weight: 400; line-height: 1.15; letter-spacing: -0.015em; }
.sub { display: block; color: var(--ink-2); font-size: var(--t-2); font-weight: 400; line-height: 1.35; }
.hint { display: block; margin-top: var(--s-2); color: var(--label); font-size: var(--t-1); }
.fig-row { display: flex; align-items: baseline; margin: var(--s-2) 0 var(--s-1); }
.fig { font-family: var(--font-display); font-size: var(--d-3); font-weight: 300; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); }
.unit { margin-left: var(--s-1); color: var(--ink-2); font-family: var(--font-text); font-size: var(--d-1); font-weight: 400; line-height: 1; letter-spacing: 0; }
.split { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); }
.card-head { display: flex; align-items: center; justify-content: space-between; min-height: 20px; }
.card-head .icon { width: 20px; height: 20px; }
.area-i { display: inline-flex; color: var(--area, var(--ink)); }
.area-i .icon path, .area-i .icon circle { fill: none; }
.card-foot { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.card-foot .level { flex: 1; margin: 0; }
.card-foot .sub { flex: none; }
/* The card: one style everywhere (lab .card): 20 corners, 16 inside, a warm shadow by day, an edge at night. */
.card { position: relative; display: block; width: 100%; margin: 0 0 var(--s-3); padding: var(--s-4); border: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); color: var(--ink); text-align: left; overflow: hidden; }
.stack > .card, .duo > .card, .widget > .card { margin: 0; }
/* The thin line (lab .bar): 6 high, round, the track behind, the area's colour fading in from the card. */
.level { position: relative; display: block; height: 6px; margin-top: var(--s-3); border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.level-fill { position: absolute; inset: 0; width: auto; height: auto; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--area-l, var(--area, var(--fill))), var(--area, var(--fill))); transform-origin: 0 50%; transition: transform var(--m-move) var(--glide); }
/* Buttons (lab .primary and .quiet): the main one 52 high and round, the inverse of the page; the others a quiet tone. */
.btn { min-height: 48px; border: 0; border-radius: var(--r-pill); font-size: var(--t-3); font-weight: 600; }
.btn-primary { min-height: 52px; background: var(--cta); color: var(--on-cta); }
.btn-small { min-height: var(--tap); font-size: var(--t-2); }
/* The lab's Start pill on the training card. */
.go-pill { display: inline-flex; flex: none; align-items: center; gap: var(--s-1); height: 36px; padding: 0 var(--s-2) 0 var(--s-4); border-radius: var(--r-pill); background: var(--tone); color: var(--ink); font-size: var(--t-2); font-weight: 600; }
.go-pill .icon { width: 18px; height: 18px; }

/* Today (lab #today): the wordmark in the middle of the bar, the day as a small label, the greeting, one line, Search or
   ask, then the cards in one column, the figure cards two by two. */
:root.one-bar #topMark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
:root.one-bar #topMark img { height: 12px; }
:root.one-bar .top-day > span { display: none; }
.view-home .home-date { margin: var(--s-3) 0 0; }
.view-home .home-hello-row { margin: 0; align-items: flex-end; }
.view-home .home-hello-row .greet { flex: 1; min-width: 0; margin: var(--s-1) 0 var(--s-2); }
.view-home > .greet { margin: var(--s-1) 0 var(--s-2); }
.view-home .lead, .view-home .lead.is-big { margin: 0; font-family: var(--font-text); font-size: var(--t-3); font-style: normal; line-height: 1.35; letter-spacing: 0; color: var(--ink-2); }
.view-home .ask-box, .ask-box { min-height: var(--tap); margin: var(--s-5) 0; border-radius: var(--r-2); }
.view-home .ask-box::before { display: none; }
/* The board is the lab's stack: one column of cards with the small ones two by two. */
.view-home .widget-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); margin: 0; }
.view-home .widget-board > .widget { min-width: 0; margin: 0; }
.view-home .widget-board > .widget.size-m, .view-home .widget-board > .widget.size-l { grid-column: 1 / -1; }
.view-home .widget-board .tile:last-child:nth-child(odd) { grid-column: auto; }
/* The moment card (lab #wake and #tonight). */
.home-now.now-card { display: block; margin: 0; padding: var(--s-4); border: 0; border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); }
.now-card .home-now-title { display: block; margin: var(--s-2) 0 var(--s-1); font-family: var(--font-text); font-size: var(--d-1); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.now-card.home-off .home-now-title, .now-card#homeNight .home-now-title { font-size: var(--d-2); font-weight: 400; line-height: 1.15; letter-spacing: -0.015em; }
.now-card .home-now-time { margin-right: var(--s-2); color: var(--ink-2); font-weight: 400; }
.now-card .home-now-why { margin: 0; color: var(--ink-2); font-size: var(--t-2); line-height: 1.35; }
.now-card .home-acts { display: flex; gap: var(--s-2); margin: var(--s-4) 0 0; }
.now-card .home-acts .btn { flex: 1 1 0; min-width: 0; margin: 0; }
/* A figure card (lab .card with .fig-row): the whole card opens its page; its foot line is its one action. */
.fig-card { display: flex; flex-direction: column; margin: 0; padding: var(--s-4); min-height: 0; }
.fig-card .fig-main { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; }
.fig-card .fig-main .label { display: block; }
.fig-card .sub { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fig-card .level { margin-top: var(--s-3); }
.fig-card .fig-act { position: relative; overflow: visible; display: flex; align-items: center; min-width: 0; min-height: 0; margin: var(--s-2) 0 0; padding: 0; border: 0; background: none; color: var(--label); font-size: var(--t-1); font-weight: 400; line-height: 1.35; text-align: left; white-space: nowrap; }
.fig-card .fig-act::before { content: ''; position: absolute; left: calc(-1 * var(--s-4)); right: calc(-1 * var(--s-4)); top: calc(-1 * var(--s-4)); bottom: calc(-1 * var(--s-4)); }
.fig-card .fig-act > span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fig-card .tile-acts { position: absolute; top: var(--s-2); right: var(--s-2); display: flex; gap: var(--s-1); }
.fig-card:has(.tile-acts) .area-i { visibility: hidden; }
.fig-card .tile-acts .tile-tick { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--tone); color: var(--area, var(--ink)); }
.fig-card .tile-acts .tile-tick::before { inset: calc(-1 * var(--s-2)); border-radius: 50%; box-shadow: none; }
.fig-card .tile-big.is-dim { opacity: 1; }
.fig-card::after { display: none; }
/* The training card (lab, Today). */
.train-card { display: block; margin: 0; padding: var(--s-4); border: 0; text-align: left; }
.train-card .split .title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.train-card > .sub { white-space: normal; }

/* Sheets (lab .sheet): the title at 22 in the text face, a round quiet close button. */
.sheet-title { font-family: var(--font-text); font-size: var(--d-1); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.sheet-head .icon-btn { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--tone); color: var(--ink-2); }
.sheet-head .icon-btn::before { content: ''; position: absolute; inset: calc(-1 * var(--s-2)); }
.sheet-head .icon-btn .icon { width: 18px; height: 18px; stroke-width: 2; }
.sheet .ask-box { margin: 0 0 var(--s-5); }
/* The + sheet's tiles (lab .tiles .tile): 100 high, the icon at the top, the word at the foot. */
.add-grid { gap: var(--s-3); }
.add-grid .add-btn { height: 100px; min-height: 100px; border-radius: var(--r-3); font-size: var(--t-3); line-height: 1; }

.fig-card .tile-figure { margin: var(--s-2) 0 var(--s-1); gap: 0; flex-wrap: nowrap; }
.fig-card .tile-big { font-family: var(--font-display); font-size: var(--d-3); font-weight: 300; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
.fig-card .tile-unit { margin-left: var(--s-1); color: var(--ink-2); font-size: var(--d-1); line-height: 1; }
.fig-card .tile-label { padding: 0; color: var(--label); font-size: var(--t-1); letter-spacing: 0.12em; }
/* A new best (lab .pbrow): a quiet tone row, one soft halo, no colour. */
.pbrow { display: flex; align-items: center; gap: var(--s-3); width: 100%; margin-top: var(--s-4); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border-radius: var(--r-2); background: var(--tone); text-align: left; }
.pbrow .grow { flex: 1; min-width: 0; }
.pbrow .t { display: block; font-size: var(--t-2); font-weight: 600; line-height: 1.3; }
.pbrow .s { display: block; font-size: var(--t-1); color: var(--ink-2); }
.pbrow .icon { width: 18px; height: 18px; color: var(--label); }
.pbrow .fig-s { font-family: var(--font-display); font-size: var(--d-1); line-height: 1; }
.glow { position: relative; isolation: isolate; }
.glow::before { content: ''; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: radial-gradient(70% 160% at 30% 50%, var(--shine), transparent 80%); box-shadow: 0 8px 30px var(--glow); opacity: 0.7; pointer-events: none; }
/* The tab bar (lab #tabbar): 52 high, icons near the top, the words at 11. */
.tab { justify-content: flex-start; min-height: var(--tabs-h); padding: var(--s-2) 2px 0; gap: var(--s-1); }
.tab .icon { width: 25px; height: 25px; }
.tab-add { justify-content: flex-start; padding-top: var(--s-2); }
/* The bar keeps the wordmark in the middle (on every page since the Stage 2 fixes), so Updates is its bell only. */
:root.one-bar .top-actions .top-word { display: none; }
:root.one-bar .top-actions .top-icon.top-worded { width: var(--tap); padding: 0; }
:root.one-bar .top-worded.word-on .bell-dot { left: auto; right: var(--s-2); }
.week-figs.week-rings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); margin: 0 0 var(--s-5); }
.week-figs .week-ring { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; padding: var(--s-4); border-radius: var(--r-3); background: var(--tile); box-shadow: var(--edge), var(--lift); text-align: left; }
.week-figs .week-ring-name { color: var(--label); font-size: var(--t-1); }
.week-figs .ring-count { font-family: var(--font-display); font-size: var(--d-3); font-weight: 300; }
.week-figs .week-ring-sub { white-space: normal; }
.food-hero.fig-card { display: block; margin: 0 0 var(--s-3); }
.food-hero .sub .food-left { font-family: var(--font-text); font-size: var(--t-2); line-height: 1.35; }
.fig-box { display: flex; flex-direction: column; flex: none; width: var(--s-11); }
.fig-box .fig-row { margin: 0; }
.fig-box .fig { font-size: var(--d-1); }
.fig-box .unit { font-size: var(--t-2); }
.fig-box .level { margin-top: var(--s-2); }
.aha-rings { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-2); }
.aha-ring.card { display: block; margin: 0; padding: var(--s-3); text-align: left; }
.aha-ring .aha-ring-name { font-weight: 500; }
.aha-ring .aha-ring-sub { margin-top: var(--s-2); color: var(--ink-2); font-size: var(--t-2); }
/* Sleep's first card (lab #sleepCard): seven quiet bars, the days under them, one line and Log last night. */
.nights-card { margin: 0 0 var(--s-5); }
.ghost { display: flex; align-items: flex-end; gap: var(--s-3); height: 80px; margin: var(--s-4) 0; }
.ghost i { flex: 1; height: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(to top, var(--c-sleep), var(--l-sleep)); opacity: 0.2; transform-origin: 50% 100%; }
.ghost.real i { opacity: 0.08; }
.ghost.real i.is-on { opacity: 0.4; }
.ghost.real i.last { opacity: 1; }
.ghost-days { display: flex; gap: var(--s-3); margin: calc(-1 * var(--s-2)) 0 var(--s-4); }
.ghost-days span { flex: 1; text-align: center; font-size: var(--t-1); color: var(--label); }
/* The days are drawn from the page's own data, as the search box's hint is: they are a picture's key, not words to read. */
.ghost-days span::before { content: attr(data-d); }
.empty-line { margin: 0 0 var(--s-4); font-size: var(--d-1); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.nights-card .btn-primary { width: 100%; }
/* Add a meal (lab #meal): the words box, Photo and Barcode as small chips under it, the usual meals as rows in one
   card with Log, and More. */
.wordsbox { margin: 0 0 var(--s-2); }
.wordsbox .in { display: block; width: 100%; min-height: 84px; padding: var(--s-4); border: 1px solid var(--field); border-radius: var(--r-2); background: var(--tile); color: var(--ink); font-size: var(--t-3); line-height: 1.35; resize: none; }
.wordsbox .in:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); outline: none; }
.wordsbox .meal-alt { display: flex; gap: var(--s-2); margin: var(--s-3) 0 0; }
.sq { position: relative; display: inline-flex; flex: none; align-items: center; gap: var(--s-1); height: 36px; min-height: 36px; padding: 0 var(--s-4) 0 var(--s-3); border: 0; border-radius: var(--r-pill); background: var(--tone); color: var(--ink); font-size: var(--t-2); font-weight: 600; }
.sq::before { content: ''; position: absolute; left: 0; right: 0; top: calc(-1 * var(--s-1)); bottom: calc(-1 * var(--s-1)); }
.sq .icon { width: 18px; height: 18px; }
.meal-quick .label { margin: var(--s-7) 0 var(--s-3); }
.meal-quick > .chips { margin: var(--s-4) 0 0; }
.group { background: var(--tile); border-radius: var(--r-3); box-shadow: var(--edge), var(--lift); overflow: hidden; }
.group + .group { margin-top: var(--s-3); }
.group > .row { position: relative; display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 60px; margin: 0; padding: var(--s-3) var(--s-4); border: 0; background: none; color: var(--ink); text-align: left; }
.group > .row + .row::before { content: ''; position: absolute; top: 0; left: var(--s-4); right: 0; height: 1px; background: var(--hair); }
.group > .row .grow { flex: 1; min-width: 0; }
.group > .row .t { display: block; font-size: var(--t-3); line-height: 1.3; }
.group > .row .s { display: block; font-size: var(--t-2); line-height: 1.3; color: var(--ink-2); }
.group > .row > .icon { width: 20px; height: 20px; color: var(--label); }
.group > .row .lead-i { display: inline-flex; color: var(--ink-2); }
.log-pill { padding: 0 var(--s-3); }
.meal-more-list { margin: var(--s-3) 0 0; }
.meal-more-list .nf-ways { margin: 0; }
/* NEXT-40, part E: after "Not found yet" there are two ways on, not six. */
.sheet.is-notyet #mealStage .nf-ways { display: none; }
.sheet .nf-ways .btn-small.btn-primary { background: var(--cta); color: var(--on-cta); }
.btn-col { display: flex; flex-direction: column; gap: var(--s-2); }
/* The workout (lab #workout): no tab bar and no top bar while training; back, the name over its clock and End in one
   row; thin steps; the picture in a 144-point tile; the name in the serif; the sets as a quiet table; Finish set held
   at the foot of the screen. */
:root[data-view="workout"] .tabs, :root[data-view="workout"] .fab { display: none !important; }
:root[data-view="workout"] .shell { padding-bottom: var(--s-4); }
.view-workout { padding-bottom: 0; }
.wk-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; height: var(--tap); margin: 0 calc(-1 * var(--s-2)); }
.wk-top .back { margin: 0; padding: 0 var(--s-2); color: var(--ink); font-size: var(--t-3); justify-self: start; }
.wk-top .back .icon { width: 24px; height: 24px; }
.wk-top .end { justify-self: end; }
.wk-title { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); }
.wk-title .label { font-size: var(--t-1); line-height: 1; }
.clock, .wk-title .wo-clock { color: var(--ink); font-family: var(--font-text); font-size: var(--t-3); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.navtext { min-height: var(--tap); padding: 0 var(--s-2); border: 0; background: none; color: var(--ink); font-size: var(--t-3); font-weight: 600; }
.wo-stepbar.steps { display: block; margin: var(--s-2) 0 var(--s-4); }
.steps .wo-steps { display: flex; gap: var(--s-1); padding: 0; overflow: visible; }
.steps .wo-step { position: relative; flex: 1; width: auto; height: var(--tap); min-height: 0; margin: calc(-1 * var(--s-3)) 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: transparent; }
.steps .wo-step > * { display: none; }
.steps .wo-step::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: var(--r-pill); background: var(--track); }
.steps .wo-step[aria-pressed="true"]::after { background: linear-gradient(90deg, var(--l-train), var(--c-train)); }
.steps .wo-step.is-done::after { background: color-mix(in srgb, var(--c-train) 45%, var(--track)); }
.wo-card { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.wo-card .wo-pic { position: relative; height: 144px; border-radius: var(--r-3); background: var(--tone); overflow: hidden; }
.wo-card .wo-pic::after { display: none; }
.wo-card .wo-body { display: block; margin: 0; padding: 0; }
.wo-card .wo-body > .title-row { align-items: baseline; margin: var(--s-4) 0 var(--s-1); }
.wk-name, .wo-card .wo-ex { margin: 0; font-family: var(--font-display); font-size: var(--d-2); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
.wo-history { font-size: var(--t-2); }
.wo-card .wo-facts { display: block; color: var(--ink-2); font-size: var(--t-2); }
.wo-card .muscle-chips { display: inline; }
.wo-card .muscle-chip { display: inline; padding: 0; border-radius: 0; background: none; color: var(--ink-2); font-size: var(--t-2); font-weight: 400; }
.wo-card .muscle-chip + .muscle-chip::before { content: ', '; }
.wo-card .wo-last { display: block; margin: var(--s-3) 0 0; color: var(--ink-2); font-size: var(--t-2); }
.wo-card .wo-target { margin: var(--s-1) 0 var(--s-4); color: var(--label); font-size: var(--t-1); }
.wo-card .wo-table { display: grid; gap: var(--s-2); }
.wo-card .wo-row { grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, 1fr) 3.25rem; gap: 0; min-height: 60px; margin: 0; padding: 0 var(--s-3); border: 0; border-radius: var(--r-2); background: none; }
.wo-card .wo-row-head { min-height: 0; padding: 0 var(--s-3) var(--s-1); color: var(--label); font-size: var(--t-1); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.wo-card .wo-row-head span { text-align: left; }
.wo-card .wo-row-head span:nth-child(n+2) { text-align: left; }
.wo-card .wo-row-head .wo-tick-head { text-align: right; }
.wo-card .wo-n { color: var(--label); font-size: var(--t-2); }
.wo-card .wo-num { justify-self: start; min-width: 0; min-height: var(--tap); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); font-family: var(--font-text); font-size: var(--d-1); font-weight: 400; letter-spacing: -0.01em; text-align: left; }
.wo-card .wo-row.is-current { position: relative; background: var(--tone); box-shadow: none; }
.wo-card .wo-row.is-current::after { content: ''; position: absolute; left: var(--s-1); top: var(--s-4); bottom: var(--s-4); width: 3px; border-radius: var(--r-pill); background: var(--c-train); }
.wo-card .wo-row.is-current .wo-num { min-height: var(--tap); font-size: var(--d-1); font-weight: 500; }
.wo-card .wo-row.is-current .wo-num > span { padding-bottom: 1px; border-bottom: 1px dashed var(--field); }
.wo-card .wo-num.is-on > span { border-bottom: 1px solid var(--ink); }
.wo-card .wo-best-word { color: var(--ink-2); font-size: var(--t-1); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.wo-card .wo-tick { justify-self: end; width: 32px; height: 32px; margin: 0; }
.wo-card .wo-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-4); margin: var(--s-2) 0 0; border-top: 0; }
.addset { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding: 0 var(--s-3); border: 0; background: none; color: var(--ink-2); font-size: var(--t-2); font-weight: 600; text-decoration: none; }
.addset .icon { width: 18px; height: 18px; }
.wo-card .wo-link { color: var(--ink-2); font-size: var(--t-2); text-decoration: none; }
.view-workout .wo-foot { display: block; margin: var(--s-4) 0 0; }
.nextup { margin: 0; color: var(--ink-2); font-size: var(--t-2); }
.nextup b { color: var(--ink); font-weight: 600; }
.view-workout .wo-pain { margin: var(--s-4) 0 0; text-align: left; }
.dock { position: sticky; z-index: 5; bottom: 0; margin: var(--s-2) 0 0; padding: var(--s-4) 0 calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to bottom, transparent, var(--bg) var(--s-4)); }
.dock .btn { width: 100%; margin: 0; }
/* The rest (lab .rest): a card with a thin line that fills while the time passes, the clock beside it. */
.rest-bar.rest { bottom: 0; border-radius: var(--r-4) var(--r-4) 0 0; background: var(--surface); box-shadow: var(--float); }
.rest-bar .rest-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--gutter) var(--s-2); }
.rest-bar .rest-level { flex: 1; order: 2; margin: 0; }
.rest-bar .rest-fill { fill: none; transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.5s linear; }
.rest-bar .rest-main { order: 1; flex: none; min-width: 0; }
.rest-bar .rest-clock { font-family: var(--font-text); font-size: var(--t-3); font-weight: 600; }
.rest-bar .rest-acts { padding: 0 var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom, 0px)); }
/* Progress (lab #progress): the small label over the name, exercise chips that scroll sideways, the chart card, and
   rows in cards under small labels. */
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--tap); margin: 0 calc(-1 * var(--s-2)); }
.nav .back { margin: 0; padding: 0 var(--s-2); color: var(--ink); font-size: var(--t-3); }
.nav .back .icon { width: 24px; height: 24px; }
.view > .display.ptitle { margin: var(--s-2) 0 var(--s-5); }
.chips-x { display: flex; gap: var(--s-2); margin: 0 calc(-1 * var(--gutter)) var(--s-4); padding: var(--s-1) var(--gutter); overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.chips-x::-webkit-scrollbar { display: none; }
.fchip { position: relative; flex: none; height: 36px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-pill); background: var(--tone); color: var(--ink); font-size: var(--t-2); font-weight: 500; white-space: nowrap; }
.fchip::before { content: ''; position: absolute; left: 0; right: 0; top: calc(-1 * var(--s-1)); bottom: calc(-1 * var(--s-1)); }
.fchip[aria-pressed="true"] { background: var(--cta); color: var(--on-cta); }
.find { margin: var(--s-2) 0 var(--s-1); font-family: var(--font-text); font-size: var(--d-1); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.readout { min-height: 20px; color: var(--ink-2); font-size: var(--t-2); }
.hist-chart-card .seg { margin: var(--s-4) 0 var(--s-3); }
.note { margin: var(--s-3) 0 0; color: var(--label); font-size: var(--t-1); line-height: 1.4; }
.section-label { margin: var(--s-7) 0 var(--s-3); }
.group > .row.stat { min-height: 60px; }
.group > .row .stat-fig { flex: none; font-family: var(--font-display); font-size: var(--d-1); line-height: 1; }
/* The lab's Progress line (lab .chart): quiet grid, figures on the right, the line and its fill in the area's colour. */
.lab-chart { position: relative; margin: 0 calc(-1 * var(--s-1)); }
.lab-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.lab-chart .c-grid { stroke: var(--hair); stroke-width: 1; }
.lab-chart .c-base { stroke: var(--label); stroke-opacity: 0.35; stroke-width: 1; }
.lab-chart .c-gl, .lab-chart .c-xl { fill: var(--label); font-family: var(--font-text); font-size: var(--t-1); }
/* Today, alive (D120 (e)): lit to deep, with the lab's glow; the latest point is a white light ringed in the colour. */
.lab-chart .c-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--area, var(--ink)) 55%, transparent)); }
.lab-chart .cs1 { stop-color: var(--area-l, var(--ink)); } .lab-chart .cs2 { stop-color: var(--area, var(--ink)); }
.lab-chart .gs1 { stop-color: var(--area, var(--ink)); stop-opacity: var(--fillto); }
.lab-chart .gs2 { stop-color: var(--area-l, var(--ink)); stop-opacity: 0; }
.lab-chart .mk-first { fill: var(--tile); stroke: var(--area, var(--ink)); stroke-width: 2; }
.lab-chart .mk-now { fill: var(--tip); stroke: var(--area, var(--ink)); stroke-width: 2.5; }
.lab-chart .mk-halo { fill: var(--area-l, var(--ink)); opacity: 0.45; filter: blur(3px); }
.lab-chart .mk-lab { fill: var(--ink-2); font-family: var(--font-text); font-size: var(--t-1); font-weight: 500; }
/* Sign up and sign in (lab #signup): the same 16 at the sides as every screen, the lockup centred, the serif title at
   28, a plain lead, fields on the card colour 52 high, small hints in the third ink. */
.acct { padding: var(--s-5) 0 var(--s-10); }
.acct .acct-lockup { width: 104px; margin: var(--s-5) auto var(--s-7); }
.acct .display { margin: 0 0 var(--s-2); font-size: var(--d-2); line-height: 1.15; }
.acct .lede { margin: 0; max-width: none; color: var(--ink-2); font-size: var(--t-3); font-weight: 400; line-height: 1.35; }
.acct .field { margin: var(--s-4) 0 0; }
.acct .field-label { display: block; margin: 0 0 var(--s-2); color: var(--ink-2); font-size: var(--t-2); font-weight: 600; line-height: 1; }
.acct .input { min-height: 52px; padding: 0 var(--s-4); border-radius: var(--r-2); background: var(--tile); font-size: var(--t-3); }
.acct .input:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); outline: none; }
.acct .input::placeholder { color: var(--label); opacity: 1; }
.acct .field-hint { margin: var(--s-2) 0 0; color: var(--label); font-size: var(--t-1); }
.acct .acct-go { margin-top: var(--s-5); }
.acct-or { margin: var(--s-5) 0 var(--s-3); color: var(--label); }
.acct-social { height: 52px; border: 1px solid var(--field); border-radius: var(--r-pill); background: none; }
.acct-note { color: var(--label); }
.acct-link { text-decoration: underline; text-underline-offset: 3px; }
/* Week, Month and All (lab .seg): the chosen one on the sheet colour by day, a step lighter than the card at night. */
.seg-btn[aria-pressed="true"] { background: var(--line); }
:root[data-phase="dawn"] .seg-btn[aria-pressed="true"], :root[data-phase="day"] .seg-btn[aria-pressed="true"], :root[data-phase="golden"] .seg-btn[aria-pressed="true"], :root[data-theme="white"] .seg-btn[aria-pressed="true"] { background: var(--surface); }
.widget.size-s .fig-card .level, .widget.size-s .fig-card .tile-sub, .widget.size-s .fig-card .sub { width: auto; margin-right: 0; }
/* The lab's paper is plain: no grain over the ground, by day or by night (Round 8's grain, retired). */
body::before { display: none; }
/* Every control keeps a 44-point touch: the calendar on Today's bar, the set's figures and its tick in a workout. */
:root.one-bar .top-day { min-width: var(--tap); justify-content: flex-start; }
.wo-card .wo-num { min-width: var(--tap); }
.wo-card .wo-tick { width: var(--tap); height: var(--tap); }
/* Today ends with room under its last cards, so each can be scrolled clear of the tab bar. */
.view-home { padding-bottom: var(--s-10); }
/* You's week (lab figure cards, two by two, in place of the stones). */
.week-figs { margin: 0 0 var(--s-4); }
.week-figs .card { margin: 0; }
:root[data-calm] .level-fill { transition: none; }
/* Round 4 (Alex, 28 Nov 2026): Today's bar keeps one thing in its middle at a time. The wordmark and the small title
   take turns by scroll position (markFade in 62-connect.js sets their opacity from the scroll itself), so neither may
   lag behind it with a transition of its own. */
:root.title-fade #topMark, :root.title-fade .top-title { transition: none; }
/* Round 4, "arc with a light" (gauge() in 11-charts.js): an open gauge, three quarters of a circle open at the bottom.
   A faint track, the filled part in the area's colour from a lighter mix of it, a small light at the tip with a soft
   glow, the figure in the middle and the target in the opening under it. 136 points across at most on a card, so two
   sit side by side on the smallest iPhone; the small one (the training card, Sleep) is 76. */
.gauge-box { position: relative; display: block; width: 100%; max-width: 8.5rem; margin: var(--s-2) auto 0; --gauge-core: color-mix(in srgb, var(--area, var(--ink)) 40%, var(--ink)); }
:root[data-phase="dawn"] .gauge-box, :root[data-phase="day"] .gauge-box, :root[data-phase="golden"] .gauge-box, :root[data-theme="white"] .gauge-box { --gauge-core: color-mix(in srgb, var(--area, var(--ink)) 22%, var(--surface)); }
:root[data-theme="black"] .gauge-box { --gauge-core: color-mix(in srgb, var(--area, var(--ink)) 40%, var(--ink)); }
.gauge { display: block; width: 100%; height: auto; overflow: visible; }
.gauge-track, .gauge-fill { fill: none; stroke-width: 6; stroke-linecap: round; }
.gauge-track { stroke: var(--track); }
.gauge-tip { transform-box: view-box; transform-origin: 50px 50px; }
.gauge-glow { fill: var(--area, var(--ink)); opacity: 0.55; }
.gauge-dot { fill: var(--gauge-core); stroke: var(--area, var(--ink)); stroke-width: 1.8; }
.gauge-fill.is-zero, .gauge-tip.is-zero { opacity: 0; }
.ga-food-a { stop-color: var(--l-food); } .ga-food-b { stop-color: var(--c-food); }
.ga-water-a { stop-color: var(--l-water); } .ga-water-b { stop-color: var(--c-water); }
.ga-train-a { stop-color: var(--l-train); } .ga-train-b { stop-color: var(--c-train); }
.ga-sleep-a { stop-color: var(--l-sleep); } .ga-sleep-b { stop-color: var(--c-sleep); }
.ga-tasks-a { stop-color: var(--l-tasks); } .ga-tasks-b { stop-color: var(--c-tasks); }
.gauge-box .gauge-fig, .fig-card .gauge-box .tile-figure { position: absolute; left: 0; right: 0; top: 55%; display: flex; align-items: baseline; justify-content: center; margin: 0; gap: 0; flex-wrap: nowrap; white-space: nowrap; transform: translateY(-50%); }
.gauge-box .fig, .fig-card .gauge-box .tile-big { font-size: var(--d-2); line-height: 1.1; }
.gauge-box .unit, .fig-card .gauge-box .tile-unit { margin-left: var(--s-1); font-size: var(--t-2); line-height: 1; }
.gauge-of { position: absolute; left: 20%; right: 20%; top: 84%; overflow: hidden; color: var(--ink-2); font-size: var(--t-1); line-height: 1.2; text-align: center; white-space: nowrap; text-overflow: ellipsis; transform: translateY(-50%); }
.fig-card .gauge-box + .sub { margin-top: var(--s-1); }
.gauge-box.is-small { flex: none; width: 3.75rem; margin: 0; }
.gauge-box.is-small .gauge-track, .gauge-box.is-small .gauge-fill { stroke-width: 8; }
.gauge-box.is-small .fig { font-size: var(--d-1); }
.gauge-box.is-small .gauge-fig { top: 46%; }
.gauge-box.is-small .gauge-of { left: 15%; right: 15%; top: 88%; overflow: visible; }
.gauge-box.of-below .gauge-of { position: static; display: block; margin-top: calc(-1 * var(--s-1)); overflow: visible; transform: none; }
.card-foot.has-gauge { margin-top: var(--s-1); }
.nights-row { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-2) 0 0; }
.nights-last { min-width: 0; }
.nights-last .fig-row { margin-top: 0; }
.nights-row .gauge-box.is-small { width: 4.5rem; }
/* The training card's foot (Round 4): the small gauge, and beside it the workout's facts over "Workouts this week". */
.card-foot .foot-words { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.card-foot .foot-words .sub { flex: none; white-space: normal; }
.card-foot .foot-words .sub + .sub { color: var(--label); font-size: var(--t-1); }

/* ---------- Today, alive (design-lab/lab.css, "Today, alive"; approved by Alex 28 Nov 2026, D120) ----------
   The lab's class names where they are new to the app, in the app's own tokens. Six small arcs, each open at the
   bottom: a faint track tinted with the area, the filled part running from the lit tone into the deep colour, a soft
   bloom of the same arc behind it, and one small white light at the tip. The arcs move by stroke-dash and transform
   only (50-today-alive.js runs them); nothing here moves under Reduce Motion or Calm visuals. */
.alive .al-hello { margin: var(--s-1) 0 var(--s-4); }
.alive .al-day { display: flex; align-items: center; gap: 2px; height: 28px; margin-left: 0; }
.alive .al-day .home-date { margin: 0; }
/* The lab draws the arrows 28 across; each answers to a full 44 by 44, overlapping the date a little. */
.al-step { position: relative; display: flex; flex: none; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); margin: 0 calc(-1 * var(--s-2)); padding: 0; border: 0; background: none; color: var(--label); }
.al-step:first-child { margin-left: calc(-1 * var(--s-3)); }
.al-step .icon { width: 16px; height: 16px; }
.al-step[disabled] { opacity: 0.25; }
.alive .greet { margin: 2px 0 0; }
.alive .ask-box { margin: 0 0 var(--s-3); }
.alive .alive-board { display: block; margin: 0; }
.alive .al-sec > .card { margin: 0; }
.alive .al-sec + .al-sec { margin-top: var(--s-3); }
.alive .al-sec-week, .alive .al-sec-week + .al-sec { margin-top: 0; }
.alive .al-sec-week + .al-sec-best, .alive .al-sec-week + .al-sec-insight, .alive .al-sec-best + .al-sec-insight, .alive .al-sec-insight + .al-sec-best { margin-top: var(--s-3); }

.yd { padding: var(--s-4) var(--s-2) var(--s-3); }
.yd > .label { padding: 0 var(--s-2); }
.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2) 0; margin-top: var(--s-2); }
.g { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 2px 0 var(--s-1); border: 0; border-radius: var(--r-2); background: transparent; color: var(--ink); text-align: center; transition: transform var(--m-press) ease-out, background-color var(--m-fade) ease; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: pan-y; }
.g.pressed { transform: scale(0.96); }
.g.held { background: var(--tone); }
.dial { position: relative; display: block; width: 5.75rem; height: 5.75rem; }
.arc { display: block; width: 100%; height: 100%; overflow: visible; }
.g-track { fill: none; stroke: color-mix(in srgb, var(--area) 13%, var(--track)); stroke-width: 7.5; stroke-linecap: round; }
.g-fill, .g-bloom { fill: none; stroke-width: 7.5; stroke-linecap: round; stroke-dasharray: 0 1; }
.g-bloom { stroke-width: 9; filter: blur(5px); opacity: var(--bloom); }
.g-tip { transform-box: view-box; transform-origin: 50px 50px; transform: rotate(135deg); }
.g-halo2 { fill: var(--area-l); opacity: 0.3; filter: blur(3px); }
.g-halo { fill: var(--area-l); opacity: 0.55; transform-box: fill-box; transform-origin: center; }
.g-dot { fill: var(--tip); stroke: var(--area); stroke-width: 2; }
.g-start .g-dot { fill: var(--tile); stroke: var(--area-l); }
.g.is-empty .g-fill, .g.is-empty .g-bloom, .g.is-empty .g-tip { opacity: 0; }
.g-in { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 2px; }
.g-fig { position: relative; color: var(--ink); font-family: var(--font-display); font-size: var(--d-1); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.g-fig.sm { font-size: var(--d-0); }
.g-fig.is-rolling { color: transparent; }
.g-fig.is-rolling::after { content: attr(data-roll); position: absolute; left: 0; right: 0; top: 0; color: var(--ink); text-align: center; }
.g-unit { margin-top: 2px; color: var(--label); font-family: var(--font-text); font-size: var(--t-0); font-weight: 500; line-height: 1; letter-spacing: 0.01em; }
.g-name { display: block; margin-top: calc(-1 * var(--s-3)); font-size: var(--t-1); font-weight: 600; line-height: 1.2; }
.g-of { display: block; min-height: 17px; max-width: 100%; overflow: hidden; color: var(--label); font-size: var(--t-1); line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }

/* The Next card: the label, the thing, one line, and one button at the right (the inverse of the page). */
.next { padding: var(--s-3) var(--s-4); }
.next .split { align-items: center; }
.next .grow { flex: 1; min-width: 0; }
.next .title { margin: var(--s-1) 0 2px; }
.next .home-now-time { margin-right: var(--s-2); color: var(--ink-2); font-weight: 400; }
.next-sub .link { min-height: 0; padding: 0; color: var(--ink); font-size: var(--t-2); font-weight: 600; text-decoration: none; }
.go { position: relative; flex: none; height: var(--tap); padding: 0 var(--s-5); border: 0; border-radius: var(--r-pill); background: var(--cta); color: var(--on-cta); font-size: var(--t-3); font-weight: 600; transition: transform var(--m-press) ease-out; }
.go:active { transform: scale(0.96); }
.go.quiet-go { background: var(--tone); color: var(--ink); }

/* Below the fold: This week, Latest best, one plain line. */
.alive .label.section { margin: var(--s-6) 0 var(--s-3); }
.find { display: block; margin: var(--s-2) 0 var(--s-1); font-size: var(--d-1); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.al-week .find { margin-top: 0; }
/* Second honest review, change 10: the figures at the ends of a progress line. */
.spark-val { fill: var(--ink-2); font-size: var(--t-1); font-weight: 500; }
.spark-val.is-last { fill: var(--ink); font-weight: 600; }
/* Second honest review, change 7: Today's lower half, one card: the week's finding and what was noticed, a row each. */
.al-week-card { display: grid; gap: 0; padding: var(--s-1) var(--s-4); }
.al-week-row, .al-insight-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; min-height: var(--tap); padding: var(--s-3) 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.al-week-row + .al-insight, .al-week-row + .al-patterns { border-top: 1px solid var(--hair); }
.al-week-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.al-week-row .find { margin: 0; font-size: var(--t-3); }
.al-insight-row .insight { margin: 0; font-size: var(--t-2); font-weight: 500; }
.al-week-row .icon, .al-insight-row .icon { flex: none; color: var(--ink-2); }
.readout { margin: 0; min-height: 20px; color: var(--ink-2); font-size: var(--t-2); }
.wk { display: flex; align-items: flex-end; gap: var(--s-2); height: 76px; margin-top: var(--s-3); }
.wk span { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--s-1); height: 100%; color: var(--label); font-size: var(--t-1); line-height: 1; }
.wk i { display: block; flex: 1; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(to top, var(--area), var(--area-l)); opacity: 0.42; transform: scaleY(var(--h, 0)); transform-origin: 50% 100%; transition: transform var(--m-spring) var(--glide); }
.wk i.now { opacity: 1; }
.wk i.none { flex: none; height: 2px; border-radius: var(--r-pill); background: var(--track); opacity: 1; transform: none; }
.al-pb { margin-top: var(--s-2); }
.al-best .pbrow { width: 100%; }
.insight { margin: var(--s-2) 0 0; font-size: var(--d-0); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }

/* Quick actions: a small menu that rises above the finger in 200 ms. A clear shade behind it closes it. */
.quick-wrap { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; }
.quick-shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.quick { position: fixed; z-index: 61; min-width: 188px; max-width: calc(100% - var(--s-5)); padding: var(--s-1); border-radius: var(--r-3); background: var(--surface); box-shadow: var(--float), 0 0 0 1px var(--hair); opacity: 0; transform: scale(0.92); transform-origin: 50% 100%; transition: opacity var(--m-quick) var(--glide), transform var(--m-quick) var(--glide); }
.quick.on { opacity: 1; transform: scale(1); }
.q-head { margin: 0; padding: var(--s-2) var(--s-3) var(--s-1); overflow: hidden; color: var(--label); font-size: var(--t-1); font-weight: 500; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.quick-item { display: flex; align-items: center; width: 100%; min-height: var(--tap); padding: 0 var(--s-3); border: 0; border-radius: var(--r-2); background: none; color: var(--ink); font-size: var(--t-3); font-weight: 500; line-height: 1.2; text-align: left; transition: background-color var(--m-quick) ease; }
.quick-item:active, .quick-item:focus-visible { background: var(--tone); }

/* Arranging Today's sections: a bar over each with Up, Down and Hide; a held section lifts and follows the finger. */
.arrange-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: 0 0 var(--s-3); }
.arrange-hint { margin: 0; color: var(--ink-2); font-size: var(--t-2); }
.sec-bar { display: flex; align-items: center; gap: var(--s-1); margin: 0 0 var(--s-2); }
.sec-name { flex: 1; min-width: 0; color: var(--label); font-size: var(--t-1); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.sec-btn { min-width: var(--tap); min-height: var(--tap); padding: 0 var(--s-2); border: 0; border-radius: var(--r-pill); background: var(--tone); color: var(--ink); font-size: var(--t-2); font-weight: 600; }
.sec-btn[disabled] { opacity: 0.35; }
.is-arranging .al-sec { padding: var(--s-2); border-radius: var(--r-3); box-shadow: inset 0 0 0 1px var(--line); touch-action: none; }
.is-arranging .al-sec + .al-sec { margin-top: var(--s-3); }
.al-sec.is-lifted { position: relative; z-index: 5; background: var(--bg); box-shadow: var(--float); }
.sec-empty { margin: 0; color: var(--ink-2); font-size: var(--t-2); }
.sec-hidden { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }

/* A line chart's latest point, as the lab's: a white light ringed in the area's colour. */
.line-latest { fill: var(--tip); stroke: var(--area, var(--fill)); stroke-width: 2.5; }
.level[class*="area-"], [class*="area-"] .level { background: color-mix(in srgb, var(--area) 13%, var(--track)); }

:root[data-calm] .wk i, :root[data-calm] .quick, :root[data-calm] .g { transition: none; }
:root[data-calm] .quick { transform: none; }

/* ---------- Stage 2 fixes (Alex, 28 Nov 2026) ---------- */
/* 1. One header on every tab: the wordmark in the middle, the calendar (or, with sample data, the Sample badge in its
   place) on the left, Updates and You on the right. The badge keeps its 44 points and never grows into the middle. A
   timer pill on the right takes the middle's room, so while one shows the wordmark steps aside. */
:root.one-bar .chip-sample { flex: none; margin-right: auto; }
.top:has(.top-actions .pill:not([hidden])) #topMark { visibility: hidden; }
/* 2. The welcome screen: one Begin and "I have an account" at the foot, the rest under More. */
.gate-signin { justify-self: center; min-height: var(--tap); padding: 0 var(--s-4); }
/* Honest review, change 1: the first screen shows Today, a calm picture in a frame that fades out at its foot. */
.gate-shot { width: 54%; margin: var(--s-2) auto 0; }
.gate-shot img { width: 100%; height: auto; }
/* Who accounts are for, said in the buttons' own area so it is always seen, just above Begin. */
.gate-testers { margin: 0; color: var(--ink-2); font-size: var(--t-1); text-align: center; }
.gate-sample { width: 100%; }
.gate-more { color: var(--ink-2); }
#gateFirst .gate-links { margin-top: 0; }
/* 3. Food's figure cards: two side by side, Water across the width under them, in the lab's card padding. With two
   cards (a careful case has no protein) they simply sit side by side. */
.food-smalls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.food-smalls > .food-small:nth-child(3) { grid-column: 1 / -1; }
.food-small { padding: var(--s-4); }
.food-small .tile-label { padding-right: var(--s-7); }
/* 4. Gym's actions are the lab's buttons: a quiet tone pill, one primary (the inverse of the page) per card, each 44
   points tall. */
.gym-acts, .gym-rest-links, .gym-make-links, .gym-new-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.gym-acts { margin-top: var(--s-4); }
.card .gym-acts .btn, .gym-acts .btn, .title-row .gym-edit, .gym-new-links .btn { margin: 0; }
.title-row .gym-edit { flex: none; }
.wo-card .wo-links { gap: var(--s-2); margin-top: var(--s-3); }
.wo-card .wo-link, .wo-foot .wo-link { color: var(--ink); text-decoration: none; }
.btn.addset { padding: var(--s-2) var(--s-4); background: var(--tone); color: var(--ink); }
/* 5. Sleep's bars, as the lab's: rounded tops (the height is set, not stretched, so the corners stay round), the other
   nights softer, last night lit to deep. */
.ghost i { height: 0; border-radius: var(--r-1) var(--r-1) 2px 2px; transform: none; }
.ghost.real i { opacity: 0.1; }
.ghost.real i.is-on { opacity: 0.22; }
/* 6. The membership card's circle: the initials, or the word You when there is no name at all. */
.member-initials.is-word { font-family: var(--font-text); font-size: var(--t-2); font-weight: 600; letter-spacing: 0.01em; }
.ghost.real i.last { opacity: 0.85; }
/* Circles (D122): the lab's cards and labels, one gauge per shared goal, the board as plain rows (a count, never a
   medal or a colour that judges), the testers' notice as one quiet line. */
.circle-testing { margin: 0 0 var(--s-3); padding: var(--s-2) var(--s-3); border-radius: var(--r-2); background: var(--tone); color: var(--ink-2); font-size: var(--t-2); }
.circle-list { margin-bottom: var(--s-3); }
.circle-card { display: grid; gap: var(--s-1); min-height: var(--tap); }
.circle-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.circle-card-head .icon { flex: none; color: var(--ink-2); }
.circle-name { font-family: var(--font-display); font-size: var(--d-1); line-height: 1.2; overflow-wrap: anywhere; }
.circle-card-sub { color: var(--ink-2); font-size: var(--t-2); overflow-wrap: anywhere; }
.circle-link { margin: var(--s-2) 0; font-family: var(--font-mono); font-size: var(--t-2); }
.circle-join-name { margin: 0 0 var(--s-1); overflow-wrap: anywhere; }
.circle-sees { list-style: none; margin: var(--s-2) 0 var(--s-3); padding: 0; }
.circle-sees li { display: flex; align-items: flex-start; gap: var(--s-2); padding: var(--s-1) 0; font-size: var(--t-3); }
.circle-sees .icon { flex: none; margin-top: var(--s-1); color: var(--ink-2); }
.circle-never { margin-bottom: var(--s-3); }
.circle-goal-row { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-2); }
.circle-goal-row .gauge-box.is-small { width: 4.5rem; }
.circle-goal-words { flex: 1; min-width: 0; }
.circle-goal-title { font-size: var(--t-3); font-weight: 600; overflow-wrap: anywhere; }
.circle-goal-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-3); }
.circle-goal-acts .btn { margin: 0; }
.circle-goal-acts .confirm { flex: none; }
.circle-goal-acts .confirm .btn { flex: none; }
.circle-goal .btn.is-on { background: var(--tone); color: var(--ink); }
.circle-board-rows { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.circle-board-row { display: flex; align-items: center; gap: var(--s-3); min-height: var(--tap); font-size: var(--t-3); }
.circle-board-row + .circle-board-row { border-top: 1px solid var(--hair); }
.circle-board-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.circle-board-row .fig-s { flex: none; font-variant-numeric: tabular-nums; }
.circle-board-row.is-me { font-weight: 600; }
.circle-session { padding: var(--s-2) 0; }
.circle-session + .circle-session { border-top: 1px solid var(--hair); }
.circle-session-title { font-size: var(--t-3); overflow-wrap: anywhere; }
.circle-session-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.circle-session-acts .btn { margin: 0; }
.circle-member-head { display: flex; align-items: center; gap: var(--s-2); }
.circle-member-head .row-title { flex: 1; min-width: 0; }
.circle-member .row-sub + .circle-shares, .circle-member .circle-cheers { margin-top: var(--s-2); }
.circle-cheers { margin-top: var(--s-2); }
.circle-mine { margin-bottom: var(--s-3); }
.circle-sunday-line { font-size: var(--t-3); }
.circle-sunday-line + .circle-sunday-line { margin-top: var(--s-1); }
.circle-reason[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.circle-today { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.circle-today li { font-size: var(--t-3); overflow-wrap: anywhere; }
.circle-today li + li { margin-top: var(--s-1); }
.al-circles .card-head .icon { color: var(--ink-2); }

/* Elevate, stage 1: Search or ask, one screen. The lists sit in the page; the field is one rounded field at the foot,
   with the magnifier and Send inside it. */
.view-ask .ask-results { margin: 0 0 var(--s-5); }
.view-ask .ask-results .ask-group:first-child { margin-top: 0; }
.ai-chips-wrap { flex-wrap: wrap; overflow: visible; margin: 0 0 var(--s-2); }
.composer.is-talk .ai-chips { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); padding-right: var(--s-7); }
.view-ask .composer { border-top: 0; padding: var(--s-2) 0 var(--s-3); }
/* Second honest review, change 9: over a search the field is at the top of the page and does not move. */
.composer:not(.is-talk) { position: static; margin: 0 0 var(--s-3); border-top: 0; }
.ask-field { align-items: center; gap: var(--s-1); padding: var(--s-1) var(--s-1) var(--s-1) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.ask-field:focus-within { border-color: var(--ink-2); }
.ask-field-icon { display: inline-flex; flex: none; color: var(--ink-2); }
.ask-field textarea.chat-input { flex: 1; min-height: var(--tap); padding: var(--s-3) var(--s-1); border: 0; border-radius: 0; background: transparent; }
.ask-field textarea.chat-input:focus { outline: none; box-shadow: none; }
.ask-field .send { width: var(--tap); height: var(--tap); }
.composer .composer-ticks { display: none; padding: 0 var(--s-2); }
.composer.is-talk .composer-ticks { display: flex; }
.ask-send .icon { flex: none; margin-right: var(--s-3); color: var(--ink-2); }
.ask-convo { margin-top: var(--s-2); }
/* The lists as grouped cards: each heading starts a new card, so Try, Recent and each area read as their own block. */
.view-ask .ask-results.places { padding: 0; border: 0; background: transparent; box-shadow: none; }
.view-ask .ask-results.places > * + * { border-top: 0; }
.view-ask .ask-results .row-card { margin: 0; padding: var(--s-2) var(--s-4); min-height: 52px; background: var(--tile); }
.view-ask .ask-results .row-card + .row-card { border-top: 1px solid var(--hair); }
.view-ask .ask-results > .row-card:first-child, .view-ask .ask-results .ask-group + .row-card { border-top-left-radius: var(--r-3); border-top-right-radius: var(--r-3); }
.view-ask .ask-results .row-card:has(+ .ask-group), .view-ask .ask-results .row-card:last-child { border-bottom-left-radius: var(--r-3); border-bottom-right-radius: var(--r-3); }
.view-ask .ask-results .ask-group { margin: var(--s-5) 0 var(--s-2); padding: 0 var(--s-1); }
.view-ask .ask-results .ask-convo { margin-top: var(--s-2); border-radius: var(--r-3); }

/* Elevate, stage 2: Circles, easy to find. A username field with its @ in place, the day in the circles as one card,
   and the two quiet links under Add a friend. */
.at-field { display: flex; align-items: center; gap: var(--s-1); padding: 0 0 0 var(--s-4); border: 1px solid var(--field); border-radius: var(--r-2); background: var(--bg); }
.at-field:focus-within { border-color: var(--ink-2); outline: 2px solid var(--accent); outline-offset: 2px; }
.at-field .input:focus, .at-field .input:focus-visible { outline: none; box-shadow: none; }
.at-sign { flex: none; color: var(--ink-2); font-size: var(--t-3); }
.at-field .input { border: 0; padding-left: 0; background: transparent; }
.circle-asks { display: grid; gap: var(--s-2); margin: 0 0 var(--s-5); }
.circle-day { margin: 0 0 var(--s-4); }
.circle-more-row { display: flex; justify-content: space-between; gap: var(--s-4); margin: var(--s-3) 0 0; }
.circle-actions { margin-top: var(--s-5); }

/* Elevate, stage 4: Your day in words under the greeting, and patterns as rows that open their charts. */
.al-story { margin: var(--s-2) 0 0; max-width: 34em; }
.al-story-lead { margin: 0; font-size: var(--t-3); color: var(--ink); line-height: 1.45; }
.al-story-more { margin: var(--s-1) 0 0; font-size: var(--t-2); color: var(--ink-2); line-height: 1.45; }
.al-patterns { display: grid; gap: 0; }
.al-pattern { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; min-height: var(--tap); padding: var(--s-2) 0; border: 0; background: transparent; color: inherit; text-align: left; }
.al-pattern + .al-pattern { border-top: 1px solid var(--hair); }
.al-pattern .icon { flex: none; color: var(--ink-2); }

/* Elevate, stage 5: on an area's page the finding is the chart's title, and switching Week, Month and the rest lets the
   chart settle in place (a short fade and lift; transform and opacity only; nothing under Reduce Motion or Calm). */
.chart-title { margin: var(--s-5) 0 var(--s-2); font-size: var(--t-3); font-weight: 600; line-height: 1.35; color: var(--ink); }
.detail-top.is-titled .chart-title { margin: var(--s-4) 0 var(--s-1); font-size: var(--t-3); }


/* Honest review, change 4: the evening first on Today. The lead card, then up to three of tonight's steps as on Sleep, then
   the journal, in one calm group. */
.evening-first { display: grid; gap: var(--s-1); }
.evening-steps { padding: 0 var(--s-2); }
.evening-steps .step { padding: var(--s-2) 0; }
.evening-journal { gap: var(--s-2); margin-top: 0; border: 1px solid var(--line); background: var(--tile); color: var(--ink); box-shadow: var(--edge); }
.evening-journal .icon { color: var(--w-sleep, var(--ink)); }
.evening-actions { display: flex; flex-direction: column; gap: var(--s-2); margin: 0 0 var(--s-4); }
.evening-actions > .btn { width: 100%; margin: 0; }
.sleep-tonight.is-first { margin-top: var(--s-3); }
/* Honest review, change 3: the end of set-up, the evening reminder and the Home Screen. */
.aha-keep { display: grid; gap: var(--s-3); margin: var(--s-3) 0 var(--s-4); }
.aha-keep .check { align-items: center; }
/* Honest review, change 6: an area with no target shows its figure plainly, with no arc drawn round it. */
.g.is-plain .arc { visibility: hidden; }
.member-card.is-still { cursor: default; }
/* Honest review, change 7: Your day under the Next card on Today; the one question at the top of Updates. */
.day-open { margin-top: var(--s-2); }
.update-ask { margin: 0 0 var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--hair); }
.you-list { margin: var(--s-5) 0; }
/* The rows under the story: grouped, and quieter (Alex, 2 Dec 2026). */
.you-row-group { margin: var(--s-4) 0 var(--s-1); color: var(--label); font: 500 var(--t-0)/1.2 var(--font-text); letter-spacing: 0.12em; text-transform: uppercase; }
nav.places.you-list.is-quiet .row-title { font-size: var(--t-2); font-weight: 400; }
nav.places.you-list.is-quiet .row-sub { font-size: var(--t-1); }
nav.places.you-list.is-quiet .row { min-height: var(--s-9); padding-top: var(--s-2); padding-bottom: var(--s-2); }
/* Honest review, change 10: Circles' first screen, a picture of a circle and one sentence. */
.circle-first { display: grid; justify-items: center; gap: var(--s-3); margin: var(--s-4) 0; text-align: center; }
.circle-pic-ring { stroke: var(--line); stroke-width: 1.5; }
.circle-pic-dot { fill: var(--track); }
.circle-pic-dot.is-you { fill: var(--c-train); }
.circle-first-line { max-width: 18rem; }
