/* Copyright (c) 2026 Movesong (movesong.com). All rights reserved. See LICENSE.md. */
/* Movesong styles. Tokens first, then base, then components, then page-specific bits.
   See DESIGN.md. Pages compose components from ui.js; they don't set their own sizes or colors. */

/* Fonts are self-hosted: copy them into /fonts/ (see README). Falls back to the system font. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/bricolage-grotesque-v9-latin-300.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/bricolage-grotesque-v9-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/bricolage-grotesque-v9-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/bricolage-grotesque-v9-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/bricolage-grotesque-v9-latin-800.woff2') format('woff2'); }

@property --base { syntax: '<color>'; inherits: true; initial-value: #0C0C0E; }
@property --orbA { syntax: '<color>'; inherits: true; initial-value: #3B4A8F; }
@property --orbB { syntax: '<color>'; inherits: true; initial-value: #6B4E8F; }

/* ---------- tokens ---------- */
:root {
  /* color */
  /* Ink and grain: near-black ink, cream text, one amber accent, the need's glow kept quiet. */
  --base: #0C0C0E;            /* the ink, the same on every screen */
  --bar: #0C0C0E;             /* the status bar color on iPhone: fixed, the app's launch color */
  --orbA: #3B4A8F;            /* the glow, set per need */
  --orbB: #6B4E8F;
  --orb-opacity: 0.32;
  --grain: 0.5;               /* film grain strength */
  --bg: #0C0C0E;
  --bg-deep: #060607;
  --surface-1: rgba(245, 243, 238, 0.06);
  --surface-2: rgba(245, 243, 238, 0.08);
  --surface-3: rgba(245, 243, 238, 0.16);
  --line: rgba(245, 243, 238, 0.11);
  --line-strong: rgba(245, 243, 238, 0.5);
  --text: #F5F3EE;
  --text-2: #D8D4CC;
  --text-3: #A8A49C;
  --accent: #F5F3EE;
  --on-accent: #0C0C0E;
  --warm: #F2B562;
  --warm-surface: rgba(242, 181, 98, 0.10);
  --warm-line: rgba(242, 181, 98, 0.5);
  --danger: #FFB4A8;
  --good: #62E3A6;
  --mid: #F4C95A;
  --low: #F08A6E;
  --sheet: #17171B;
  --raised: #141417;          /* swap thumbnails */
  --fg-rgb: 245, 243, 238;    /* the text color as channels, for see-through lines and glows */
  --bg-rgb: 12, 12, 14;       /* the ground as channels, for the nav and top fade */
  --scrim: rgba(4, 6, 18, 0.6);
  --night: rgba(4, 6, 18, 0.55);
  --beat: #F2B562;            /* the beat dot in the mark */
  --start-sub: #4A4844;
  --glow: rgba(245, 243, 238, 0.4);       /* the figure's soft light */
  --glow-strong: rgba(245, 243, 238, 0.55);
  --orb-k: 1;                 /* how strong the need's glow shows on this ground */
  --shadow: rgba(0, 0, 0, 0.4);
  /* the needs, as dots and stars */
  --n-settle: #7FB6FF; --n-fog: #C3CADB; --n-let: #FF7A6B; --n-sun: #FFC659; --n-lightning: #C77DFF;
  --n-still: #8FD3C7;         /* Be still: sea glass, always a ring */

  /* type */
  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-3xl: 34px;
  --fs-num: 44px;
  --fs-hero: 56px;
  --lh-tight: 1.05;
  --lh-snug: 1.25;
  --lh-body: 1.45;

  /* space (4-point) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --gutter: var(--sp-6);

  /* shape */
  --r-pill: 999px;
  --r-md: 16px;
  --r-lg: 22px;
  --h-btn: 56px;
  --h-chip: 44px;
  --h-row: 56px;
  --h-choice: 64px;
  --tap: 44px;

  /* motion */
  --dur-fast: 150ms;
  --dur: 250ms;
  --dur-slow: 400ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

/* ---------- Daylight: the light theme (You > Look). Cream ground, ink text, the same layout. ---------- */
:root[data-theme="light"] {
  --base: #F3EFE7;
  --bar: #F3EFE7;
  --grain: 0.28;
  --bg: #F3EFE7;
  --bg-deep: #EBE6DC;
  --surface-1: rgba(18, 20, 28, 0.04);
  --surface-2: rgba(18, 20, 28, 0.06);
  --surface-3: rgba(18, 20, 28, 0.12);
  --line: rgba(18, 20, 28, 0.10);
  --line-strong: rgba(18, 20, 28, 0.45);
  --text: #12141C;
  --text-2: #33363F;
  --text-3: #4F5260;
  --accent: #12141C;
  --on-accent: #F3EFE7;
  --warm: #9A4310;
  --warm-surface: rgba(180, 83, 26, 0.08);
  --warm-line: rgba(154, 67, 16, 0.45);
  --danger: #B3261E;
  --good: #178A55;
  --mid: #A87A00;
  --low: #C4502F;
  --sheet: #F8F5EF;
  --raised: #E3DDD1;
  --fg-rgb: 18, 20, 28;
  --bg-rgb: 243, 239, 231;
  --scrim: rgba(18, 20, 28, 0.32);
  --night: rgba(255, 255, 255, 0.5);
  --beat: #E0742A;
  --start-sub: #C9C3B8;
  --glow: rgba(18, 20, 28, 0);
  --glow-strong: rgba(18, 20, 28, 0);
  --orb-k: 0.55;
  --shadow: rgba(40, 30, 10, 0.16);
  --n-settle: #2F6BCF; --n-fog: #5F687D; --n-let: #D2402F; --n-sun: #B26E00; --n-lightning: #8E3BD9;
  --n-still: #185E53;
  color-scheme: light;
}

/* The iPhone Home Screen app paints its status bar once per load, in the theme it loaded with (data-launch). */
html.ios-pwa[data-launch="dark"] { --bar: #0C0C0E; }
html.ios-pwa[data-launch="light"] { --bar: #F3EFE7; }
/* Switching the look reloads the app so the bar repaints (app.js 'theme'). When it can't (offline, mid-workout),
   the bar and the page meet at a clean edge until the next launch: no fade, which would look like a smudge. */
html.ios-pwa[data-launch="dark"][data-theme="light"] .sky::after,
html.ios-pwa[data-launch="light"][data-theme="dark"] .sky::after { display: none; }
html.ios-pwa[data-launch="dark"][data-theme="light"] .topfill,
html.ios-pwa[data-launch="light"][data-theme="dark"] .topfill { display: none; }

/* ---------- base ---------- */
* { box-sizing: border-box; touch-action: manipulation; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--base);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: --base var(--dur-slow) ease, --orbA var(--dur-slow) ease, --orbB var(--dur-slow) ease;
  overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 4px; }
h1[tabindex="-1"]:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
/* The top edge. iPhone paints the status bar once, in the app's launch color (#0C0C0E), and doesn't
   follow the page as the sky changes. So every page starts in that same color at the very top and
   blends into its own sky just below: the bar and the page always meet without a seam. */
.sky::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 160px; background: linear-gradient(to bottom, var(--bar) 0%, rgba(var(--bg-rgb), .55) 40%, rgba(var(--bg-rgb), 0) 100%); }
.topfill { position: fixed; left: 0; right: 0; top: 0; height: 6px; background-color: var(--bar); pointer-events: none; z-index: 50; }
.sky .grain { position: absolute; inset: 0; background: url('../icons/grain.png') repeat; background-size: 160px 160px; opacity: var(--grain); }
.sky .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: calc(var(--orb-opacity) * var(--orb-k)); transition: opacity var(--dur-slow) ease; }
.sky .a { width: 380px; height: 380px; left: -140px; top: -90px; background: var(--orbA); animation: drift 16s ease-in-out infinite; }
.sky .b { width: 330px; height: 330px; right: -150px; bottom: 80px; background: var(--orbB); animation: drift 20s ease-in-out infinite reverse; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18px, -14px); } }

/* ---------- layout ---------- */
#app { position: relative; z-index: 1; min-height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; padding: calc(var(--sp-5) + var(--safe-top)) var(--gutter) calc(var(--sp-6) + var(--safe-bottom)); animation: enter var(--dur-slow) var(--ease) both; }
.screen.has-nav { padding-bottom: calc(100px + var(--safe-bottom)); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stack { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--sp-6); }
.spacer { flex: 1; min-height: var(--sp-6); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.center { text-align: center; }

/* ---------- type components ---------- */
.eyebrow { margin: 0; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.title { margin: 0; font-size: var(--fs-3xl); line-height: var(--lh-tight); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.lede { margin: 0; font-size: var(--fs-md); line-height: var(--lh-body); color: var(--text-2); }
.meta { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--text-3); }
.heading { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-6); }
.section { margin: 0 0 var(--sp-3); font-size: var(--fs-md); font-weight: 700; color: var(--text); display: flex; align-items: baseline; gap: var(--sp-2); }
.section .meta { font-weight: 400; }
.block { margin-top: var(--sp-6); }
.heading + .block { margin-top: 0; }

/* ---------- topbar ---------- */
.topbar { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); align-items: center; height: var(--tap); margin: 0 calc(-1 * var(--sp-3)) var(--sp-4); }
.topbar .mid { display: flex; justify-content: center; font-size: var(--fs-sm); color: var(--text-2); }
.icon-btn { width: var(--tap); height: var(--tap); border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-pill); color: var(--text); transition: background var(--dur-fast) ease; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn[disabled] { opacity: 0.3; cursor: default; }
.dots { display: flex; gap: 6px; }
.dots i { display: block; height: 6px; width: 6px; border-radius: var(--r-pill); background: rgba(var(--fg-rgb), 0.28); transition: width var(--dur) var(--ease), background var(--dur) ease; }
.dots i.done { background: rgba(var(--fg-rgb), 0.75); }
.dots i.now { width: 22px; background: var(--text); }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); width: 100%; min-height: var(--h-btn); padding: 0 var(--sp-6); border: none; border-radius: var(--r-pill); font-size: var(--fs-lg); font-weight: 700; text-decoration: none; text-align: center; transition: transform var(--dur-fast) ease, background var(--dur-fast) ease; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); font-size: var(--fs-md); }
.btn[disabled] { background: var(--surface-2); color: var(--text-3); border: none; cursor: default; transform: none; }
.link { min-height: var(--tap); min-width: var(--tap); padding: 0 var(--sp-1); border: none; background: transparent; font-size: var(--fs-md); font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link.soft { font-weight: 400; color: var(--text-2); text-decoration: none; }
.actions { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-4); }
.actions .links { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.actions .links.one { justify-content: center; }

/* ---------- choices ---------- */
.choice { display: flex; align-items: center; gap: var(--sp-4); width: 100%; min-height: var(--h-choice); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface-2); text-align: left; transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease; }
.choice:active { background: var(--surface-3); }
.choice[aria-pressed="true"] { border-color: var(--text); background: var(--surface-3); }
.choice svg { flex: none; }
.choice .t { display: flex; flex-direction: column; gap: 2px; }
.choice .t b { font-size: var(--fs-lg); font-weight: 700; line-height: var(--lh-snug); }
.choice .t span { font-size: var(--fs-sm); color: var(--text-2); line-height: var(--lh-snug); }
.choice.centered { justify-content: center; }

/* ---------- chips and tiles ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip { min-height: var(--h-chip); padding: 0 var(--sp-4); border-radius: var(--r-pill); border: 2px solid var(--line); background: var(--surface-2); font-size: var(--fs-md); font-weight: 600; transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease; }
.chip[aria-pressed="true"] { border-color: var(--text); background: var(--surface-3); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.tile { min-height: 72px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tile[aria-pressed="true"] { border-color: var(--text); background: var(--surface-3); }
.tile b { font-size: var(--fs-xl); font-weight: 800; line-height: 1; }
.tile span { font-size: var(--fs-xs); color: var(--text-2); }
.seg { display: inline-grid; grid-auto-flow: column; gap: 0; padding: 2px; border-radius: var(--r-pill); background: var(--surface-2); }
.seg button { min-height: var(--tap); min-width: 52px; padding: 0 var(--sp-3); border: none; border-radius: var(--r-pill); background: transparent; font-size: var(--fs-sm); font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* ---------- cards ---------- */
.card { display: block; padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); background: var(--surface-1); border: 1px solid var(--line); text-decoration: none; }
.card.warm { background: var(--warm-surface); border: 2px solid var(--warm-line); }
.card .kicker { margin: 0 0 var(--sp-1); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warm); }
.card .head { margin: 0 0 var(--sp-1); font-size: var(--fs-xl); font-weight: 800; line-height: var(--lh-snug); }
.card .body { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }

/* ---------- rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.row { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--h-row); padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); text-align: left; color: var(--text); }
button.row:active { background: var(--surface-3); }
.row .lead { width: 28px; height: 28px; flex: none; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); display: flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 700; }
.row .name { flex: 1; min-width: 0; font-size: var(--fs-md); font-weight: 600; line-height: var(--lh-snug); }
.row .val { flex: none; font-size: var(--fs-sm); color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.row.done .lead { background: var(--text); border-color: var(--text); color: var(--on-accent); }
.row.done .name { color: var(--text-2); }
.row.muted { opacity: 0.55; }

/* ---------- settings groups ---------- */
.group { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-1); border: 1px solid var(--line); }
.item { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--h-row); padding: var(--sp-3) var(--sp-4); border: none; border-top: 1px solid var(--line); background: transparent; text-align: left; font-size: var(--fs-md); text-decoration: none; color: var(--text); }
.item:first-child { border-top: none; }
.item .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item .txt small { font-size: var(--fs-sm); color: var(--text-3); }
.item.danger { color: var(--danger); }
button.item:active, a.item:active, label.item:active { background: var(--surface-2); }

/* ---------- stepper ---------- */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 64px; padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.stepper .ctl { display: inline-flex; align-items: center; gap: var(--sp-1); }
.stepper .ctl b { min-width: 84px; text-align: center; font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper .icon-btn { border: 2px solid var(--line); font-size: var(--fs-xl); line-height: 1; }

/* ---------- tip, toast, sheet ---------- */
.tip { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) var(--sp-2) var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.tip p { flex: 1; margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.tip .ic { color: var(--warm); padding-top: 2px; }
.tip .icon-btn, .tip .link { margin: calc(-1 * var(--sp-2)) 0; }
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom)); transform: translateX(-50%); z-index: 20; max-width: calc(100vw - 2 * var(--gutter)); padding: var(--sp-3) var(--sp-5); border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); font-size: var(--fs-md); font-weight: 600; box-shadow: 0 10px 30px var(--shadow); animation: enter var(--dur) var(--ease) both; }
.sheet-wrap { position: fixed; inset: 0; z-index: 30; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; animation: fade var(--dur) ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 480px; padding: var(--sp-6) var(--gutter) calc(var(--sp-5) + var(--safe-bottom)); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--sheet); display: flex; flex-direction: column; gap: var(--sp-2); animation: enter var(--dur) var(--ease) both; box-shadow: 0 -10px 40px var(--shadow); }
.sheet p { margin: 0 0 var(--sp-3); font-size: var(--fs-lg); line-height: var(--lh-body); }
.banner { position: relative; z-index: 6; display: flex; align-items: center; gap: var(--sp-3); padding: calc(var(--sp-3) + var(--safe-top)) var(--sp-4) var(--sp-3); background: var(--warm); color: var(--on-accent); font-size: var(--fs-sm); font-weight: 600; }
.banner p { flex: 1; margin: 0; }
.banner .icon-btn { color: var(--on-accent); }

/* ---------- navigation ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 480px; margin: 0 auto; padding: var(--sp-2) var(--sp-3) calc(var(--sp-3) + var(--safe-bottom)); border-top: 1px solid var(--line); background: rgba(var(--bg-rgb), 0.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); min-height: var(--tap); padding: var(--sp-1) 0; color: var(--text-3); text-decoration: none; font-size: var(--fs-xs); font-weight: 600; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 700; }

/* ---------- pages ---------- */
/* Today */
.date { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--sp-1); text-align: center; margin-top: var(--sp-3); }
.week .d { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.week .d span { font-size: var(--fs-xs); color: var(--text-3); }
.week .d.today span { color: var(--text); font-weight: 700; }
.slot { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.dot { width: 5px; height: 5px; border-radius: var(--r-pill); background: rgba(var(--fg-rgb), 0.3); }
.dot.later { background: rgba(var(--fg-rgb), 0.12); }
.ring { width: 14px; height: 14px; border-radius: var(--r-pill); border: 2px solid var(--text); animation: twinkle 2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.start-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 180px; padding: var(--sp-4) 0; }
.start { width: 148px; height: 148px; border-radius: 50%; border: none; background: var(--accent); color: var(--on-accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; animation: breathe 3s ease-in-out infinite; }
.start b { font-size: var(--fs-2xl); font-weight: 800; line-height: 1; }
.start span { font-size: var(--fs-xs); font-weight: 700; color: var(--start-sub); }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--fg-rgb), 0.35); } 50% { box-shadow: 0 0 0 14px rgba(var(--fg-rgb), 0); } }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.shortcut { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; min-height: var(--h-choice); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); text-align: left; }
.shortcut b { font-size: var(--fs-md); }
.shortcut span { font-size: var(--fs-xs); color: var(--text-2); }
.shortcut[disabled] { opacity: 1; cursor: default; background: transparent; border-style: dashed; }
.shortcut[disabled] b, .shortcut[disabled] span { color: var(--text-3); }

/* Check-in */
.battery-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--sp-6); }
.battery { display: flex; align-items: center; gap: 6px; }
.battery .shell { width: 280px; max-width: 72vw; height: 128px; border: 3px solid var(--text); border-radius: 26px; padding: var(--sp-2); display: flex; }
.battery .fill { height: 100%; border-radius: var(--r-md); transition: width 120ms linear, background-color var(--dur) ease; }
.battery .nub { width: 10px; height: 44px; border-radius: 0 6px 6px 0; background: var(--text); }
.energy-word { margin: 0; font-size: var(--fs-2xl); font-weight: 700; }
input[type=range] { width: 100%; height: var(--tap); margin: 0; accent-color: var(--text); }
.agree { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-1); border: 2px solid transparent; cursor: pointer; transition: background var(--dur) ease, border-color var(--dur) ease; }
.agree.nudge { background: var(--surface-3); border-color: var(--low); }
.agree input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--text); }
.agree span { font-size: var(--fs-sm); color: var(--text-2); }
.agree a { color: var(--text); }

/* Session */
.figure-box { margin: 0 calc(-1 * var(--sp-3)) var(--sp-2); aspect-ratio: 300 / 262; max-height: 24vh; display: flex; justify-content: center; }
.detail-foot { display: flex; justify-content: flex-end; margin-top: var(--sp-2); }
.fig-wrap { position: relative; }
.cue { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-3xl); font-weight: 800; opacity: 0; pointer-events: none; }
.cue span { display: flex; align-items: center; justify-content: center; width: 112px; height: 112px; border-radius: 50%; background: rgba(var(--bg-rgb), .72); border: 2px solid rgba(var(--fg-rgb), .3); }
.cue.on { opacity: 1; }
.cue.pulse { animation: cue 450ms var(--ease) both; }
@keyframes cue { from { transform: scale(1.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.count-wrap.tiny { width: 64px; height: 64px; margin: 0; flex: none; }
.count-wrap.tiny .count-in b { font-size: var(--fs-lg); }
.count-wrap.tiny .count-in span { display: none; }
.upnext { margin-bottom: var(--sp-4); }
.stepper .wval { min-width: 104px; min-height: var(--tap); padding: 0 var(--sp-2); border: none; border-radius: var(--r-md); background: transparent; }
.stepper .wval b { font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--warm); text-decoration: underline dotted var(--warm-line); text-underline-offset: 6px; }
.wnote { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-1); }
.wnote .link { min-height: 32px; font-size: var(--fs-sm); color: var(--warm); }
.wnote.up { color: var(--text-2); }
.sheet.pick { gap: var(--sp-3); max-height: 88vh; overflow-y: auto; }
.sheet .pick-total { margin: 0; text-align: center; font-size: var(--fs-num); font-weight: 800; color: var(--warm); }
svg.bar { width: 100%; height: auto; }
svg.bar .shaft { stroke: var(--text-2); stroke-width: 6; stroke-linecap: round; }
svg.bar .collar { stroke: var(--text); stroke-width: 6; stroke-linecap: round; }
svg.bar rect { fill: var(--warm); }
.chips.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chips.grid .chip, .chips.plates .chip { padding: 0 var(--sp-2); font-variant-numeric: tabular-nums; }
.sheet-wrap.still, .sheet-wrap.still .sheet, #app.same .screen { animation: none; }
.upnext-list { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }
.upnext-list li { display: flex; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: 1px solid var(--warm-line); font-size: var(--fs-sm); }
.upnext-list .name { flex: 1; font-weight: 600; }
.upnext-list .val { color: var(--warm); font-variant-numeric: tabular-nums; }
/* iPhone home-screen app (see fitShell in app.js): a screen-tall column, pages scroll inside, nav in the flow at the bottom. */
html.ios-pwa, html.ios-pwa body { height: var(--app-h); overflow: hidden; }
html.ios-pwa #app { height: var(--app-h); min-height: 0; overflow: hidden; }
html.ios-pwa .screen { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
html.ios-pwa .screen.has-nav { padding-bottom: var(--sp-6); }
html.ios-pwa .nav { position: relative; flex: none; width: 100%; }
html.ios-pwa .sky { bottom: auto; height: var(--app-h); }
html.ios-pwa .sheet-wrap { bottom: calc(-1 * var(--vp-gap, 0px)); }
.groove { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: 0 0 var(--sp-2); }
.groove-name { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tempo { display: inline-flex; align-items: center; flex: none; border-radius: var(--r-pill); background: var(--surface-2); }
.tempo b { min-width: 64px; text-align: center; font-size: var(--fs-md); }
.tempo small { font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); }
.figure { height: 100%; width: auto; max-width: 100%; overflow: visible; }
.fig-ground { stroke: rgba(var(--fg-rgb), 0.25); stroke-width: 2; stroke-linecap: round; }
.fig-quiet path { fill: none; stroke: rgba(var(--fg-rgb), 0.4); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fig-ghost path, .fig-ghost circle { fill: none; stroke: rgba(var(--fg-rgb), 0.14); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.fig-back path { fill: none; stroke: rgba(var(--fg-rgb), 0.45); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.fig-body path { fill: none; stroke: var(--text); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px var(--glow)); }
.fig-props path { fill: none; stroke: var(--warm); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.target { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.target .meta { font-size: var(--fs-md); color: var(--text-2); }
.target b { font-size: var(--fs-num); line-height: var(--lh-tight); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.setdots { display: inline-flex; gap: 6px; }
.setdots i { display: block; width: 12px; height: 12px; border-radius: var(--r-pill); border: 2px solid var(--line-strong); }
.setdots i.on { background: var(--text); border-color: var(--text); }
.howto { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-1); border: 1px solid var(--line); }
.howto summary { cursor: pointer; font-weight: 700; font-size: var(--fs-sm); min-height: 28px; display: flex; align-items: center; }
.howto ol { margin: var(--sp-2) 0 var(--sp-1); padding-left: var(--sp-5); }
.howto li { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--sp-2); }
.count-wrap { position: relative; width: 200px; height: 200px; margin: var(--sp-4) auto; }
.count-wrap.small { width: 150px; height: 150px; margin: var(--sp-2) auto; }
.count-wrap svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.count-wrap .track { fill: none; stroke: rgba(var(--fg-rgb), 0.15); stroke-width: 6; }
.count-wrap .bar { fill: none; stroke: var(--text); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 250ms linear; }
.count-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.count-in b { font-size: var(--fs-hero); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.count-wrap.small .count-in b { font-size: var(--fs-num); }
.count-in span { max-width: 72%; text-align: center; line-height: 1.25; font-size: var(--fs-xs); color: var(--text-2); }
.count-in span:empty { display: none; }
.count-in span.now { color: var(--text); font-weight: 700; }
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--sp-3); }
.hero .title { margin-top: var(--sp-2); }
.pop { animation: pop 700ms cubic-bezier(0.2, 1.2, 0.4, 1) both; }
@keyframes pop { from { transform: scale(0.3) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
/* The finished-move star: after the pop it breathes, and a soft breeze drifts past. The cool-off moment. */
.calm-star { position: relative; width: 200px; height: 96px; display: flex; align-items: center; justify-content: center; }
.calm-star svg { position: relative; z-index: 1; }
.mark { color: var(--text); display: block; }
.pop.calm { animation: pop 700ms cubic-bezier(0.2, 1.2, 0.4, 1) both, calm 8s ease-in-out 700ms infinite; }
@keyframes calm {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 6px rgba(var(--fg-rgb), 0.55)); }
  25% { transform: scale(1.05) rotate(4deg); }
  50% { transform: scale(1.09) rotate(0deg); filter: drop-shadow(0 0 16px rgba(var(--fg-rgb), 0.95)); }
  75% { transform: scale(1.05) rotate(-4deg); }
}
.breeze { position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.breeze i { position: absolute; left: 0; height: 1.5px; width: 70px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--fg-rgb), 0.5), transparent); animation: breeze 9s ease-in-out infinite; }
.breeze i:nth-child(1) { top: 30%; animation-delay: 1.2s; }
.breeze i:nth-child(2) { top: 56%; width: 96px; animation-delay: 4.2s; }
.breeze i:nth-child(3) { top: 74%; width: 54px; animation-delay: 7.2s; }
@keyframes breeze {
  0% { transform: translate(-90px, 0); opacity: 0; }
  15% { opacity: 1; }
  45% { transform: translate(110px, -3px); opacity: 0; }
  100% { transform: translate(110px, -3px); opacity: 0; }
}

/* Your sky */
body.deep { --base: var(--bg-deep); }
.night { padding: var(--sp-3) var(--sp-2) var(--sp-2); border-radius: var(--r-lg); background: var(--night); border: 1px solid var(--line); }
.night .head { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--sp-1) var(--sp-2); }
.night .head p { margin: 0; font-size: var(--fs-md); font-weight: 700; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .dow { text-align: center; font-size: var(--fs-xs); color: var(--text-3); padding-bottom: 2px; }
.cal .cell { height: 44px; display: flex; align-items: center; justify-content: center; }
.cal .star { width: var(--tap); height: var(--tap); border: none; border-radius: var(--r-md); background: transparent; display: flex; align-items: center; justify-content: center; }
.cal .star[aria-pressed="true"] { background: var(--surface-3); outline: 2px solid var(--line-strong); }
.legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: var(--sp-3) var(--sp-1) 0; }
.legend span { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-2); }
.legend i { width: 9px; height: 9px; border-radius: var(--r-pill); display: block; }
.need-name { margin: 2px 0 0; font-size: var(--fs-lg); font-weight: 800; display: flex; align-items: center; gap: var(--sp-2); }
.need-name i { width: 10px; height: 10px; border-radius: var(--r-pill); display: block; }
.detail ul { list-style: none; margin: var(--sp-3) 0 0; padding: 0; }
.detail li { display: flex; gap: var(--sp-3); padding: var(--sp-2) 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.detail li .name { flex: 1; font-weight: 600; }
.detail li .val { color: var(--text-2); font-variant-numeric: tabular-nums; }
.detail li.muted { opacity: 0.5; }

/* Docs */
.doc h2 { margin: var(--sp-6) 0 var(--sp-2); font-size: var(--fs-lg); }
.doc p { margin: 0 0 var(--sp-3); font-size: var(--fs-md); color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.sheet.pick p.meta { margin: 0; font-size: var(--fs-sm); }

/* ---------- trends ---------- */
.trends .between .section { margin: 0; }
.trends > .between { margin-bottom: var(--sp-3); }
.play-month { margin-top: var(--sp-4); }
.tlist { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }
.tlist li { display: flex; align-items: center; gap: var(--sp-3); min-height: 40px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.tlist .name { flex: 1; display: flex; align-items: center; gap: var(--sp-2); font-weight: 600; min-width: 0; }
.tlist .name i { width: 9px; height: 9px; border-radius: var(--r-pill); display: block; flex: none; }
.tlist .val { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tlist.lifts .spark { width: 80px; height: 28px; flex: none; }
.tlist .play { width: var(--tap); height: var(--tap); margin: calc(-1 * var(--sp-1)) calc(-1 * var(--sp-3)) calc(-1 * var(--sp-1)) 0; color: var(--warm); }
.tnote { margin-top: var(--sp-3); }
.spark { display: block; width: 100%; height: 64px; margin-top: var(--sp-2); overflow: visible; }
.spark path { fill: none; stroke: rgba(var(--fg-rgb), .55); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--text); }
.wbars { display: flex; align-items: flex-end; gap: 6px; height: 88px; margin-top: var(--sp-3); }
.wbars span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.wbars em { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.wbars i { display: block; width: 100%; max-width: 22px; border-radius: 6px 6px 3px 3px; background: var(--text); opacity: .85; }
.wbars i.none { background: var(--line); opacity: 1; }
.wbars b { font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); min-height: 14px; }
.hbars { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-3); }
.hbars > div { display: grid; grid-template-columns: 48px 1fr 28px; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); }
.hbars i { display: block; height: 10px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.hbars em { display: block; height: 100%; border-radius: var(--r-pill); background: var(--text); }
.hbars b { text-align: right; color: var(--text-2); font-weight: 600; }
.trend-line { margin-top: var(--sp-2); color: var(--text-2); }
/* ---------- month in motion ---------- */
.recap .recap-scene { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); cursor: pointer; }
.recap .recap-scene .title { text-wrap: balance; }
.fig-wrap.big { width: 100%; }
.fig-wrap.big .figure-box { max-height: 38vh; margin-top: var(--sp-3); }
.fig-wrap.big .fig-body path { filter: drop-shadow(0 0 10px var(--glow-strong)); }
.recap-stat { margin: var(--sp-2) 0 0; font-size: var(--fs-hero); font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--warm); animation: enter var(--dur-slow) var(--ease) both; animation-delay: .2s; }
.recap-sky { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); max-width: 300px; margin-bottom: var(--sp-4); }
.recap-sky span { animation: pop var(--dur-slow) var(--ease) both; }

/* ---------- swap sheet ---------- */
.swap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.swap-row { width: 100%; display: flex; align-items: center; gap: var(--sp-3); min-height: 72px; padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); text-align: left; }
.swap-row:active { background: var(--surface-3); }
.swap-row .thumb { flex: none; width: 64px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--raised); display: flex; align-items: center; justify-content: center; }
.swap-row .thumb svg { width: 64px; height: 56px; }
.swap-row .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.swap-row .txt b { font-size: var(--fs-md); font-weight: 700; }
.swap-row .txt .meta { font-size: var(--fs-sm); }

/* ---------- sharing ---------- */
.warm-text { color: var(--warm); }
.rec-pill { position: fixed; bottom: calc(var(--safe-bottom) + 84px); left: 50%; transform: translateX(-50%); z-index: 20; margin: 0; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); background: rgba(var(--bg-rgb), 0.82); border: 1px solid var(--line); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.rec-pill i { width: 8px; height: 8px; border-radius: 4px; background: #FF6B5A; animation: recblink 1.2s ease-in-out infinite; }
@keyframes recblink { 50% { opacity: 0.3; } }
.sheet.share { align-items: stretch; }
.share-preview { display: block; width: 100%; max-height: 52vh; object-fit: contain; border-radius: var(--r-md); background: var(--bg-deep); }
.share-preview.tall { max-height: 56vh; }
.share-acts { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); }
.share-acts .btn { text-decoration: none; }

/* ---------- Be still ---------- */
.divider { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-5) 0 var(--sp-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.choice.bs-entry { border-color: color-mix(in srgb, var(--n-still) 55%, transparent); background: color-mix(in srgb, var(--n-still) 10%, transparent); }
.choice.bs-entry .t { flex: 1; }
.choice.bs-entry em { font-style: normal; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; color: var(--n-still); white-space: nowrap; }
.legend .ring-i, .need-name .ring-i { width: 10px; height: 10px; box-sizing: border-box; border: 2.5px solid; border-radius: var(--r-pill); background: transparent; }

.bs-sound { display: flex; align-items: stretch; gap: var(--sp-2); }
.bs-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-3); min-height: var(--h-choice); padding: var(--sp-2); border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface-2); text-align: left; transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease; }
.bs-pick[aria-pressed="true"] { border-color: var(--n-still); background: color-mix(in srgb, var(--n-still) 12%, transparent); }
.bs-pick .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bs-pick .t b { font-size: var(--fs-lg); font-weight: 700; line-height: var(--lh-snug); }
.bs-pick .t span { font-size: var(--fs-sm); color: var(--text-2); line-height: var(--lh-snug); }
.bs-pick .t em { font-style: normal; font-size: var(--fs-xs); font-weight: 600; color: var(--n-still); margin-top: 2px; }
.bs-hear { flex: none; width: 52px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface-1); display: flex; align-items: center; justify-content: center; }
.bs-hear.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.bs-art { flex: none; width: 48px; height: 48px; border-radius: 12px; }
.bs-warm { background: radial-gradient(circle at 30% 30%, #D29A5A, #4A2E1E 72%); }
.bs-rain { background: radial-gradient(circle at 70% 25%, #7D9DB6, #16202C 72%); }
.bs-sky { background: radial-gradient(circle at 50% 18%, #C3DCF4, #2B3F66 76%); }
.bs-space { background: radial-gradient(circle at 72% 28%, #E9E4FF 0, #8A7BD8 6%, #21173F 38%, #07060E 74%); }
.bs-water { background: radial-gradient(circle at 50% 0%, #6FC4C6, #10464F 55%, #061A20 85%); }
.tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bs-gap { height: var(--sp-6); }
.switch { appearance: none; -webkit-appearance: none; flex: none; box-sizing: content-box; width: 52px; height: 32px; padding: 6px 0; background-clip: content-box; border-radius: 22px; background-color: var(--surface-3); position: relative; margin: 0; cursor: pointer; transition: background-color var(--dur-fast) ease; }   /* 44 px tall to tap, 32 px to see */
.switch::after { content: ''; position: absolute; top: 9px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: var(--text); transition: transform var(--dur-fast) var(--ease); }
.switch:checked { background-color: var(--n-still); }
.switch:checked::after { transform: translateX(20px); background: var(--bg); }

.bs-ready { position: relative; width: 210px; height: 210px; margin: var(--sp-4) auto var(--sp-5); }
.bs-ready svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bs-ready .trk { fill: none; stroke: rgba(var(--fg-rgb), 0.12); stroke-width: 6; }
.bs-ready .arc { fill: none; stroke: var(--n-still); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 628; stroke-dashoffset: 628; transition: stroke-dashoffset 300ms linear; }
.bs-ready .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bs-ready .mid b { font-size: 60px; font-weight: 800; line-height: 1; }
.bs-ready .mid span { font-size: var(--fs-sm); color: var(--text-3); margin-top: 4px; }
.bs-keep { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--warm-surface); border: 1px solid var(--warm-line); margin-bottom: var(--sp-3); }
.bs-keep span { color: var(--warm); flex: none; padding-top: 1px; }
.bs-keep p { margin: 0; font-size: var(--fs-md); line-height: var(--lh-snug); }
.bs-wait ol { margin: var(--sp-2) 0 0; padding: 0; list-style: none; counter-reset: bs; display: flex; flex-direction: column; gap: var(--sp-3); }
.bs-wait li { counter-increment: bs; display: flex; gap: var(--sp-3); align-items: center; color: var(--text-2); }
.bs-wait li::before { content: counter(bs); flex: none; width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 800; color: var(--n-still); background: color-mix(in srgb, var(--n-still) 16%, transparent); }

/* The breath: 10 s, the ring grows for 4 (in) and shrinks for 6 (out). Starts where the music is (--bs-off). */
.bs-stage { position: relative; width: 280px; height: 280px; margin: var(--sp-8) auto var(--sp-6); display: flex; align-items: center; justify-content: center; }
.bs-breath { position: absolute; inset: 0; }
.bs-breath .halo { position: absolute; inset: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--n-still) 25%, transparent); }
.bs-breath .bsr { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--n-still); background: color-mix(in srgb, var(--n-still) 8%, transparent); box-shadow: 0 0 60px color-mix(in srgb, var(--n-still) 22%, transparent);
  transform: scale(0.62); animation: bsbreath 10s ease-in-out infinite; animation-delay: var(--bs-off, 0s); }
.bs-breath.plain .bsr { animation: bsdrift 16s ease-in-out infinite; }
.bs-breath.paused .bsr { animation-play-state: paused; }
@keyframes bsbreath { 0% { transform: scale(0.62); } 40% { transform: scale(1); } 100% { transform: scale(0.62); } }
@keyframes bsdrift { 0%, 100% { transform: scale(0.84); opacity: 0.85; } 50% { transform: scale(0.9); opacity: 1; } }
.bs-cue { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.bs-cue b { font-size: var(--fs-2xl); font-weight: 800; }
.bs-cue span { font-size: var(--fs-md); color: var(--text-3); }
.bs-left { margin: 0; text-align: center; font-size: var(--fs-num); font-weight: 800; line-height: 1; }
.bs-ctl { display: flex; gap: var(--sp-2); padding-top: var(--sp-3); }
.bs-ctl > * { flex: 1; }
@media (prefers-reduced-motion: reduce) { .bs-breath .bsr { animation: none; transform: scale(0.82); } .bs-ready .arc { transition: none; } }

