/* FICE DOMINION — palettes, each dark + light (v1.17: Dominion, Iron, Bloodline, Spartan, Founder, Warpath + the editions).
   --gold = text accent · --accent = fills (buttons, bars) · --load = load numbers */
:root {
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r: 16px;
  --nav-h: 64px;
}
/* v1.17 · Dominion. Harder blacks, hotter accents. Ids stay the same so saved choices carry over. */
:root {
  --bg: #030303; --surface: #0c0c0d; --surface-2: #141416; --line: #1f1f22; --line-gold: rgba(214,170,76,.34);
  --text: #f2eee5; --muted: #9a958b; --faint: #7f7a70;
  --gold: #d6aa4c; --accent: #d6aa4c; --accent-ink: #050403; --gold-tint: rgba(214,170,76,.11); --load: #e2b75a;
  --danger: #e0553a; --danger-tint: rgba(224,85,58,.13); --ok: #8fb07a;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.62);
  color-scheme: dark;
}
:root[data-mode='light'] {
  --bg: #f5f2eb; --surface: #ffffff; --surface-2: #eeeae1; --line: #dcd5c7; --line-gold: rgba(143,108,38,.38);
  --text: #0f0e0c; --muted: #58534a; --faint: #6f695f;
  --gold: #8f6c26; --accent: #14110c; --accent-ink: #f1d27f; --gold-tint: rgba(143,108,38,.09); --load: #8f6c26;
  --danger: #b4361f; --danger-tint: rgba(180,54,31,.08); --ok: #4f7a3c;
  --shadow: 0 18px 40px rgba(30, 22, 8, 0.13);
  color-scheme: light;
}
/* Iron · Chalk: graphite and steel. */
:root[data-palette='iron'] {
  --bg: #07080a; --surface: #101215; --surface-2: #171a1e; --line: #23272c; --line-gold: rgba(205,212,220,.3);
  --text: #eef1f4; --muted: #949ca5; --faint: #7a828c;
  --gold: #cdd4dc; --accent: #e8edf2; --accent-ink: #07080a; --gold-tint: rgba(205,212,220,.09); --load: #e2b75a;
  --danger: #e0553a; --danger-tint: rgba(224,85,58,.13); --ok: #8fb07a;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
:root[data-palette='iron'][data-mode='light'] {
  --bg: #eceff2; --surface: #ffffff; --surface-2: #e2e6ea; --line: #d0d6dc; --line-gold: rgba(40,50,62,.3);
  --text: #0d1116; --muted: #4f5964; --faint: #66707b;
  --gold: #2c3742; --accent: #161c23; --accent-ink: #ffffff; --gold-tint: rgba(40,50,62,.07); --load: #8a6a2c;
  --danger: #b4361f; --danger-tint: rgba(180,54,31,.08); --ok: #4f7a3c;
  --shadow: 0 18px 40px rgba(10, 20, 30, 0.12);
  color-scheme: light;
}
/* Bloodline · Bone: black and arterial red, gold for the numbers. */
:root[data-palette='oxblood'] {
  --bg: #060303; --surface: #100808; --surface-2: #180c0c; --line: #2a1313; --line-gold: rgba(205,28,38,.42);
  --text: #f5ebe8; --muted: #a58e8a; --faint: #8a736f;
  --gold: #e6b24e; --accent: #c8111c; --accent-ink: #fff3f0; --gold-tint: rgba(200,17,28,.14); --load: #e6b24e;
  --danger: #f2b33d; --danger-tint: rgba(242,179,61,.12); --ok: #8fb07a;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}
:root[data-palette='oxblood'][data-mode='light'] {
  --bg: #f5eee8; --surface: #fffcf9; --surface-2: #ece2d9; --line: #e0d1c5; --line-gold: rgba(150,14,22,.32);
  --text: #1a0c0b; --muted: #66524e; --faint: #7a6560;
  --gold: #900f17; --accent: #a50f18; --accent-ink: #ffffff; --gold-tint: rgba(150,14,22,.07); --load: #8a5a1c;
  --danger: #a86a12; --danger-tint: rgba(168,106,18,.1); --ok: #4f7a3c;
  --shadow: 0 18px 40px rgba(50, 10, 10, 0.12);
  color-scheme: light;
}
/* Spartan · Sandstone: black and forged bronze. */
:root[data-palette='sovereign'] {
  --bg: #060403; --surface: #100c09; --surface-2: #18120d; --line: #292017; --line-gold: rgba(214,132,58,.36);
  --text: #f3e9dd; --muted: #a49383; --faint: #887869;
  --gold: #dc8f44; --accent: #cd7532; --accent-ink: #0d0703; --gold-tint: rgba(214,132,58,.12); --load: #e9a85e;
  --danger: #e0553a; --danger-tint: rgba(224,85,58,.13); --ok: #8fb07a;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.62);
  color-scheme: dark;
}
:root[data-palette='sovereign'][data-mode='light'] {
  --bg: #f3ece1; --surface: #fffaf3; --surface-2: #e9dfcf; --line: #dbcdb9; --line-gold: rgba(143,79,27,.34);
  --text: #1a1009; --muted: #5f4f40; --faint: #756454;
  --gold: #8f4f1b; --accent: #8f4f1b; --accent-ink: #ffffff; --gold-tint: rgba(143,79,27,.08); --load: #8f4f1b;
  --danger: #b4361f; --danger-tint: rgba(180,54,31,.08); --ok: #4f7a3c;
  --shadow: 0 18px 40px rgba(40, 24, 8, 0.12);
  color-scheme: light;
}
/* Founder (coach only): pure black and platinum champagne. */
:root[data-palette='founder'] {
  --bg: #000000; --surface: #090909; --surface-2: #111111; --line: #1c1c1c; --line-gold: rgba(240,226,190,.3);
  --text: #f6f2e9; --muted: #96918a; --faint: #7d7871;
  --gold: #f0e2be; --accent: #f0e2be; --accent-ink: #000000; --gold-tint: rgba(240,226,190,.1); --load: #f0e2be;
  --danger: #e0553a; --danger-tint: rgba(224,85,58,.13); --ok: #8fb07a;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}
:root[data-palette='founder'][data-mode='light'] {
  --bg: #fafaf8; --surface: #ffffff; --surface-2: #f1f0eb; --line: #e4e0d4; --line-gold: rgba(140,122,74,.34);
  --text: #0a0a0a; --muted: #5f5c57; --faint: #75726c;
  --gold: #85723f; --accent: #0a0a0a; --accent-ink: #f0e2be; --gold-tint: rgba(140,122,74,.08); --load: #85723f;
  --danger: #b4361f; --danger-tint: rgba(180,54,31,.08); --ok: #4f7a3c;
  --shadow: 0 18px 40px rgba(30, 24, 10, 0.12);
  color-scheme: light;
}
/* v1.17 · Warpath · Ash: earned with 40 logged sessions. Charcoal and blaze orange. */
:root[data-palette='warpath'] {
  --bg: #050404; --surface: #0f0d0c; --surface-2: #171412; --line: #27211d; --line-gold: rgba(255,90,31,.38);
  --text: #f5ede7; --muted: #a5978e; --faint: #897c73;
  --gold: #ff6a2b; --accent: #ff5314; --accent-ink: #130500; --gold-tint: rgba(255,90,31,.12); --load: #ffa45f;
  --danger: #f2c94c; --danger-tint: rgba(242,201,76,.12); --ok: #8fb07a;
  --flame: linear-gradient(135deg, #ffb347 0%, #ff5314 55%, #b3200a 100%);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}
:root[data-palette='warpath'][data-mode='light'] {
  --bg: #f3f0ed; --surface: #ffffff; --surface-2: #e9e3de; --line: #d9d0c9; --line-gold: rgba(194,65,12,.34);
  --text: #160c07; --muted: #5f524a; --faint: #74665d;
  --gold: #c2410c; --accent: #c2410c; --accent-ink: #ffffff; --gold-tint: rgba(194,65,12,.08); --load: #9a3412;
  --danger: #a86a12; --danger-tint: rgba(168,106,18,.1); --ok: #4f7a3c;
  --flame: linear-gradient(135deg, #f08a24 0%, #c2410c 60%, #8a1c06 100%);
  --shadow: 0 18px 40px rgba(50, 20, 5, 0.12);
  color-scheme: light;
}
/* v1.14 · Long Burn Fuel · Heartbreak Exclusive Edition (coach-granted). Charcoal and ember, a flame on the gold. */
:root[data-palette='heartbreak'] {
  --bg: #0c0807; --surface: #150e0c; --surface-2: #1d1411; --line: #2c1d18; --line-gold: rgba(255,106,61,.3);
  --text: #f3e6dc; --muted: #a58f84; --faint: #8c766c;
  --gold: #ff8a4c; --accent: #e8452f; --accent-ink: #fff3e8; --gold-tint: rgba(255,106,61,.12); --load: #ffb27a;
  --danger: #f2b33d; --danger-tint: rgba(242,179,61,.12); --ok: #8fb07a;
  --flame: linear-gradient(135deg, #ffb347 0%, #ff6a3d 45%, #c41e3a 100%);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
:root[data-palette='heartbreak'][data-mode='light'] {
  --bg: #fbf3ee; --surface: #fffaf7; --surface-2: #f5e8e0; --line: #ead6cb; --line-gold: rgba(196,58,40,.3);
  --text: #23130f; --muted: #6d5750; --faint: #7e675f;
  --gold: #b8331f; --accent: #c43a28; --accent-ink: #ffffff; --gold-tint: rgba(196,58,40,.08); --load: #a8520e;
  --danger: #a86a12; --danger-tint: rgba(168,106,18,.1); --ok: #4f7a3c;
  --flame: linear-gradient(135deg, #f08a24 0%, #d9462a 50%, #a8172f 100%);
  --shadow: 0 18px 40px rgba(60, 20, 10, 0.12);
  color-scheme: light;
}
/* v1.14 · Banana Edition: earned with 30 banana days. Ripe (dark) and Peel (light). */
:root[data-palette='banana'] {
  --bg: #0d0b05; --surface: #16130a; --surface-2: #1e1a0e; --line: #2d2814; --line-gold: rgba(255,214,10,.28);
  --text: #f6f0d8; --muted: #a39b7c; --faint: #8b8466;
  --gold: #ffd60a; --accent: #ffd60a; --accent-ink: #1a1400; --gold-tint: rgba(255,214,10,.1); --load: #ffd60a;
  --danger: #e8743b; --danger-tint: rgba(232,116,59,.12); --ok: #9ccf4a;
  --flame: linear-gradient(135deg, #fff176 0%, #ffd60a 55%, #e0a800 100%);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
:root[data-palette='banana'][data-mode='light'] {
  --bg: #fffbea; --surface: #ffffff; --surface-2: #fbf3cf; --line: #eee2a8; --line-gold: rgba(160,120,0,.32);
  --text: #1f1a05; --muted: #615a3a; --faint: #77704f;
  --gold: #8a6a00; --accent: #f2c200; --accent-ink: #1f1a05; --gold-tint: rgba(242,194,0,.12); --load: #8a6a00;
  --danger: #b4492f; --danger-tint: rgba(180,73,47,.08); --ok: #4f7a3c;
  --flame: linear-gradient(135deg, #ffe45c 0%, #f2c200 60%, #d9a400 100%);
  --shadow: 0 18px 40px rgba(60, 50, 0, 0.12);
  color-scheme: light;
}
:root[data-palette='heartbreak'] .btn.gold, :root[data-palette='banana'] .btn.gold, :root[data-palette='warpath'] .btn.gold { background: var(--flame); border-color: transparent; }
:root[data-palette='heartbreak'] .bar i, :root[data-palette='banana'] .bar i, :root[data-palette='warpath'] .bar i { background: var(--flame); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
svg:not([width]) { width: 18px; height: 18px; flex: none; }
/* v1.12 · text size (Me → Text size, saved per phone). Every font size scales off these two. Big display type scales half as much. */
:root { --fs: 1; --fs-d: 1; }
html[data-text="lg"] { --fs: 1.12; --fs-d: 1.06; }
html[data-text="xl"] { --fs: 1.25; --fs-d: 1.12; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--sans);
  font-size: calc(15px * var(--fs));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold-tint); }

/* ---------- shell ---------- */
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 20px 12px;
  background: var(--bg);
}
.top::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: auto; }
.brand b { font: 600 min(calc(11.5px * var(--fs)), 12.5px)/1.15 var(--sans); letter-spacing: 0.32em; text-transform: uppercase; }
.top .icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; color: var(--muted); }
.top .right { display: flex; gap: 8px; align-items: center; }
.demo-pill { font: 600 calc(11px * var(--fs))/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--line-gold); padding: 6px 8px; border-radius: 99px; }

main.view { padding: 4px 20px calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px); }
main.view.no-nav { padding-bottom: 40px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.nav-in { max-width: 560px; margin: 0 auto; display: flex; height: var(--nav-h); }
.nav-in > a { flex: 1 1 0; min-width: max-content; padding: 0 4px; } /* v1.12: long labels (Programs) take what they need at big text sizes */
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--faint); font: 500 min(calc(11px * var(--fs)), 11.5px)/1 var(--sans); letter-spacing: 0.03em; text-transform: uppercase; position: relative; }
.nav a.on { color: var(--gold); }
.nav a .dot { position: absolute; top: 10px; right: calc(50% - 16px); width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.nav svg { width: 21px; height: 21px; }

/* ---------- type ---------- */
.eyebrow { font: 600 calc(11.5px * var(--fs))/1.2 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.eyebrow.gold { color: var(--gold); }
.display { font-family: var(--serif); font-weight: 500; font-size: calc(44px * var(--fs-d)); line-height: 1; letter-spacing: 0.005em; margin: 6px 0 0; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: calc(27px * var(--fs-d)); line-height: 1.1; margin: 0; }
.h3 { font-weight: 600; font-size: calc(16px * var(--fs)); margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: calc(13px * var(--fs)); }
.tiny { font-size: calc(12px * var(--fs)); }
.gold { color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }

/* ---------- layout ---------- */
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 22px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.top-al { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > *, .grid3 > * { min-width: 0; }
.grid2 > .btn { white-space: normal; line-height: 1.2; text-align: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; }
.hr { height: 1px; background: var(--line); border: 0; margin: 16px 0; }
.page-head { padding: 8px 0 18px; }
.back svg { width: 16px; height: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: calc(13px * var(--fs)); margin-bottom: 8px; background: none; border: 0; padding: 0; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card.tight { padding: 14px 16px; }
.card.gold-edge { border-color: var(--line-gold); }
.card.flat { background: transparent; }
.card + .card { margin-top: 12px; }
.grid2 > .card + .card, .grid3 > .card + .card { margin-top: 0; }
.card-link { display: block; color: inherit; }
.banner { border-radius: 14px; padding: 14px 16px; font-size: calc(13.5px * var(--fs)); border: 1px solid var(--line-gold); background: var(--gold-tint); }
.banner.danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-tint); }
.banner b { display: block; margin-bottom: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 13px; border: 1px solid transparent; font-weight: 600; font-size: calc(14.5px * var(--fs)); letter-spacing: 0.02em; background: var(--surface-2); color: var(--text); transition: transform 0.08s ease, opacity 0.15s; white-space: nowrap; }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.gold { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.line-gold { background: transparent; border-color: var(--line-gold); color: var(--gold); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; font-size: calc(13px * var(--fs)); border-radius: 10px; }
.btn.xs { height: 30px; padding: 0 10px; font-size: calc(12.5px * var(--fs)); border-radius: 9px; }
.btn svg { width: 17px; height: 17px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold); font-weight: 600; font-size: calc(13px * var(--fs)); }
.icon-only { width: 36px; height: 36px; padding: 0; border-radius: 10px; }

/* ---------- chips / tags ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); background: transparent; font-size: calc(13px * var(--fs)); color: var(--muted); }
.chip.on { border-color: var(--gold); color: var(--gold); background: var(--gold-tint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 600 calc(11px * var(--fs))/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.tag.t-load::before, .tag.t-test::before { background: var(--gold); }
.tag.t-primer::before { background: color-mix(in srgb, var(--gold) 55%, var(--faint)); }
.tag.t-session::before { background: var(--gold); opacity: 0.75; }
.tag.t-custom::before { background: var(--ok); }
.tag.t-recovery::before, .tag.t-rest::before { background: var(--faint); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font: 700 calc(11.5px * var(--fs))/1 var(--sans); }
.badge.gold { background: var(--accent); color: var(--accent-ink); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); font-size: calc(12px * var(--fs)); color: var(--muted); }
.pill.warn { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.pill.gold { border-color: var(--line-gold); color: var(--gold); }

/* ---------- forms ---------- */
.field { display: block; }
.field > span { display: block; font: 600 calc(11.5px * var(--fs))/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: calc(16px * var(--fs)); outline: none; appearance: none; -webkit-appearance: none;
}
textarea.input { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input:focus { border-color: var(--gold); }
.input:disabled, .seg button:disabled { opacity: 0.5; }
.input.sm { height: 40px; font-size: calc(15px * var(--fs)); padding: 0 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: calc(14px * var(--fs)); }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
input[type='range'] { width: 100%; accent-color: var(--accent); height: 28px; }
input[type='date'].input { min-height: 48px; }
.seg { display: flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg button { flex: 1; height: 36px; border: 0; background: transparent; border-radius: 9px; font-size: calc(13px * var(--fs)); color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 0 var(--line); }
:root[data-mode='light'] .seg button.on { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.err { color: var(--danger); font-size: calc(13px * var(--fs)); min-height: 18px; }

/* ---------- progress ---------- */
.bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------- today hero ---------- */
.hero { padding: 6px 0 18px; }
.hero .daynum { white-space: nowrap; font-family: var(--serif); font-size: clamp(58px, 18vw, 80px); line-height: 0.9; font-weight: 500; letter-spacing: -0.01em; }
.hero .daynum small { font-size: calc(22px * var(--fs)); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.ready { display: flex; align-items: center; gap: 16px; }
.ready .pct { font-family: var(--serif); font-size: calc(46px * var(--fs-d)); line-height: 1; min-width: 92px; }
.ready .pct small { font-size: calc(20px * var(--fs)); color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.stepper button { width: 42px; height: 40px; border: 0; background: var(--surface-2); font-size: calc(18px * var(--fs)); }
.stepper b { min-width: 58px; text-align: center; font-weight: 600; }

/* ---------- sessions & exercises ---------- */
.session-card .title { font-family: var(--serif); font-size: calc(29px * var(--fs-d)); line-height: 1.08; font-weight: 500; margin: 10px 0 4px; }
.ex-list { margin-top: 14px; }
.ex { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ex:first-child { border-top: 0; }
.ex .n { font-weight: 500; }
.ex .sr { color: var(--muted); font-size: calc(13px * var(--fs)); }
.ex .ld { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; color: var(--load); font-weight: 600; font-size: calc(14px * var(--fs)); white-space: nowrap; }
.ex .cue { grid-column: 1 / -1; font-size: calc(13px * var(--fs)); color: var(--muted); }
.ex .fill-flag { font-size: calc(11px * var(--fs)); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.pre-note { font-size: calc(13px * var(--fs)); color: var(--muted); border-left: 2px solid var(--gold); padding: 2px 0 2px 10px; margin-top: 12px; }

.logger .exblock { padding: 16px 0; border-top: 1px solid var(--line); }
.logger .exblock:first-child { border-top: 0; }
.set-head, .set-row { display: grid; grid-template-columns: 34px 1fr 1fr 46px; gap: 8px; align-items: center; }
.set-head { font: 600 calc(11px * var(--fs))/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin: 12px 0 6px; }
.set-row + .set-row { margin-top: 8px; }
.set-row .idx { color: var(--muted); font-size: calc(13px * var(--fs)); text-align: center; }
.set-row .input { height: 44px; text-align: center; padding: 0 6px; }
.tick { width: 46px; height: 44px; border-radius: 11px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; color: var(--faint); }
.tick.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tick svg { width: 18px; height: 18px; }
.timer-btn { margin-left: 6px; }

.timer { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.timer .big { font-family: var(--serif); font-size: calc(140px * var(--fs-d)); line-height: 1; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li, .list > a { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); color: inherit; }
.list > :first-child { border-top: 0; }
.day-row .d { width: 54px; flex: none; }
.day-row .d b { display: block; font-family: var(--serif); font-size: calc(22px * var(--fs)); font-weight: 500; line-height: 1; }
.day-row.today .d b { color: var(--gold); }
.day-row .t { flex: 1; min-width: 0; }
.day-row .t div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.done-mark { color: var(--gold); }
.done-mark svg { width: 18px; height: 18px; }
.chev { color: var(--faint); }
.chev svg { width: 16px; height: 16px; }

/* ---------- roster ---------- */
.ath { display: flex; gap: 14px; align-items: center; }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line-gold); display: grid; place-items: center; font-family: var(--serif); font-size: calc(18px * var(--fs)); color: var(--gold); background: var(--gold-tint); }
.needs li { align-items: flex-start; }
.needs .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-tint); color: var(--gold); flex: none; }
.needs .ic.warn { background: var(--danger-tint); color: var(--danger); }
.needs .ic svg { width: 16px; height: 16px; }
.stat { text-align: left; }
.stat .eyebrow { letter-spacing: 0.12em; white-space: nowrap; font-size: calc(11px * var(--fs)); }
.stat b { display: block; font-family: var(--serif); font-size: calc(26px * var(--fs-d)); font-weight: 500; line-height: 1.1; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 6px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 0 12px; color: var(--muted); font-size: calc(13.5px * var(--fs)); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); border-color: var(--gold); }
.mini-table { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs)); }
.mini-table th { text-align: left; font: 600 calc(11px * var(--fs))/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); padding: 0 0 8px; }
.mini-table td { padding: 8px 0; border-top: 1px solid var(--line); }
.mini-table .warn { color: var(--danger); font-weight: 600; }

/* ---------- chat ---------- */
.thread { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: calc(14.5px * var(--fs)); line-height: 1.42; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble time { display: block; font-size: calc(11.5px * var(--fs)); opacity: 0.6; margin-top: 3px; }
.composer { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); display: flex; gap: 8px; align-items: flex-end; background: var(--bg); padding-top: 8px; }
.composer textarea { min-height: 48px; height: 48px; max-height: 140px; }

/* ---------- AI ---------- */
.ai-out { white-space: pre-wrap; font-size: calc(14.5px * var(--fs)); line-height: 1.55; }
.ai-mark { display: inline-flex; align-items: center; gap: 6px; }
.ai-mark svg { width: 15px; height: 15px; color: var(--gold); }

/* ---------- sheet / toast ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.62); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.18s ease; }
.sheet { width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 10px 20px calc(env(safe-area-inset-bottom) + 24px); animation: up 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: var(--shadow); }
.sheet .grab { width: 38px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { font-family: var(--serif); font-weight: 500; font-size: calc(26px * var(--fs-d)); margin: 0 0 4px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); z-index: 90; background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: calc(14px * var(--fs)); display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); max-width: calc(100% - 32px); animation: up 0.2s ease; }
.toast button { background: none; border: 0; color: var(--gold); font-weight: 700; padding: 0; }
:root[data-mode='light'] .toast button { color: #e3c27d; }

/* ---------- editor ---------- */
.ex-edit { border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: var(--surface-2); }
.ex-edit + .ex-edit { margin-top: 10px; }
.ex-edit .grid4 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ex-edit .input { background: var(--surface); }
.ex-edit .lbl { margin: 10px 0 5px; font: 600 calc(11px * var(--fs))/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.ex-edit select.input.sm { font-size: calc(14px * var(--fs)); padding-right: 26px; background-position: calc(100% - 14px) 17px, calc(100% - 9px) 17px; }
.ex-edit .tools { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: calc(env(safe-area-inset-top) + 32px) 26px calc(env(safe-area-inset-bottom) + 32px); max-width: 440px; margin: 0 auto; }
.auth .crest { width: 132px; margin: 0 auto 22px; filter: drop-shadow(0 10px 30px rgba(197, 160, 89, 0.18)); }
.auth .word { text-align: center; font: 600 calc(12.5px * var(--fs))/1 var(--sans); letter-spacing: 0.42em; text-transform: uppercase; }
.auth .sub { text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: calc(18px * var(--fs)); margin: 10px 0 34px; }

.empty { text-align: center; padding: 36px 10px; color: var(--muted); }
.empty .h2 { color: var(--text); margin-bottom: 6px; }
.spin { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: rot 0.8s linear infinite; margin: 60px auto; }
@keyframes rot { to { transform: rotate(360deg); } }

@media (min-width: 600px) {
  main.view { padding-left: 28px; padding-right: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- loads, fuel, weight, themes ---------- */
.load { color: var(--load); }
.fuel-chips .chip { height: 38px; }
.weight-big { font-family: var(--serif); font-size: calc(34px * var(--fs-d)); line-height: 1; }
.weight-big small { font-size: calc(15px * var(--fs)); color: var(--muted); margin-left: 3px; }
.trend-up { color: var(--ok); } .trend-down { color: var(--gold); }
svg.chart { width: 100%; height: auto; display: block; }
.parts { display: flex; gap: 14px; font-size: calc(12.5px * var(--fs)); color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.parts b { color: var(--text); font-weight: 600; }
.pal { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; color: inherit; }
.pal:first-child { border-top: 0; }
.pal .sw { display: flex; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.pal .sw span { width: 26px; height: 40px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
.pal .sw i { display: block; width: 12px; height: 3px; border-radius: 2px; }
.pal.locked { opacity: 0.45; }
.pal.on .pname::after { content: ' ✓'; color: var(--gold); }
.unlock-hero { text-align: center; padding: 10px 0 4px; }
.unlock-hero .sw { margin: 14px auto; display: inline-flex; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.unlock-hero .sw span { width: 64px; height: 84px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; }
.unlock-hero .sw i { display: block; width: 30px; height: 4px; border-radius: 2px; }

/* ---------- groceries ---------- */
.gitem { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: inherit; }
.gitem .gbox { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 1.5px solid var(--line-gold); display: grid; place-items: center; color: var(--accent-ink); }
.gitem.got .gbox { background: var(--accent); border-color: var(--accent); }
.gitem .gbox svg { width: 15px; height: 15px; }
.gitem.got .gname { text-decoration: line-through; color: var(--muted); }
.gitem .gname { font-weight: 500; }
details.about { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.about summary { cursor: pointer; color: var(--gold); font-size: calc(13px * var(--fs)); font-weight: 600; list-style: none; }
details.about summary::-webkit-details-marker { display: none; }
details.about[open] summary { margin-bottom: 8px; }
.demo-link { font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--gold); margin-left: 6px; white-space: nowrap; }
.gloss dt { font-weight: 600; margin-top: 12px; }
.gloss dd { margin: 2px 0 0; color: var(--muted); font-size: calc(13.5px * var(--fs)); }

.gedit { padding: 10px 0; border-top: 1px solid var(--line); }
.stepper.sm button { width: 36px; height: 34px; font-size: calc(16px * var(--fs)); }
.stepper.sm b { min-width: 34px; }

.check-chip { cursor: pointer; }
.check-chip input { accent-color: var(--accent); margin: 0; }
.check-chip:has(input:checked) { border-color: var(--line-gold); color: var(--text); }
.obj-row .input { min-width: 0; }
/* folds */
details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-top: 10px; }
details.fold > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .fold-sum { display: block; margin-top: 5px; color: var(--text); }
details.fold > summary .fold-sum.warn { color: var(--danger); }
details.fold > summary .chev { transition: transform 0.15s ease; }
details.fold[open] > summary .chev { transform: rotate(90deg); }
details.fold > .fold-body { padding: 0 16px 16px; }
details.fold > .fold-body > .card { padding: 0; border: 0; background: none; }

details.more > summary { list-style: none; cursor: pointer; color: var(--gold); font-size: calc(13.5px * var(--fs)); font-weight: 600; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { color: var(--muted); }
.card-link.row { display: flex; }

.steps-row .input { font-weight: 600; }
.chip.auto { border-style: dashed; }
.chip.auto.on { border-style: solid; }

/* fuel plans */
.meal { padding: 12px 0; border-top: 1px solid var(--line); }
.meal:first-child { border-top: 0; padding-top: 4px; }
.meal-items { list-style: none; margin: 8px 0 0; padding: 0; }
.meal-items li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: calc(14px * var(--fs)); }
.meal-edit { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.grid-item { display: grid; grid-template-columns: 1fr 1fr 30px; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); align-items: center; }
.grid-item > input[data-f=food] { grid-column: 1 / -1; }
.grid-item .input { min-width: 0; }
.grid-item .mini { display: flex; align-items: center; gap: 6px; }
.grid-item .mini .input { width: 64px; text-align: center; }
.grid-item .mini span { font-size: calc(11.5px * var(--fs)); color: var(--faint); }

/* setup + guide */
ol.steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 10px; font-size: calc(14px * var(--fs)); line-height: 1.45; }
ol.steps li::marker { color: var(--gold); font-weight: 600; }
ul.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: calc(14px * var(--fs)); line-height: 1.45; }
.card.guide ol.steps { margin-top: 0; }
.code-box { font: 500 calc(12.5px * var(--fs))/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--muted); }
.obox { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-gold); display: grid; place-items: center; color: var(--accent-ink); }
.obox.on { background: var(--accent); border-color: var(--accent); }
.obox svg { width: 13px; height: 13px; }
button.plain { background: none; border: 0; padding: 0; color: inherit; text-align: left; width: 100%; }
.onboard .list li { padding: 10px 0; }

/* v1.8 · baselines library + intake */
.lift-list { display: flex; flex-direction: column; gap: 10px; }
.lift-row { border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: var(--surface-2); }
.lift-row .input { background: var(--surface); }
.lift-row .grid3 { gap: 8px; }
.lift-row .field > span, .lift-q .field > span { letter-spacing: 0.12em; font-size: calc(11px * var(--fs)); }
.rm4 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.rm4[hidden] { display: none; }
.tiny-chip { height: 30px; padding: 0 10px; font-size: calc(12px * var(--fs)); white-space: nowrap; }
.plain-card { width: 100%; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.q { display: block; }
.q + .q { padding-top: 14px; border-top: 1px solid var(--line); }
.q-t { font-size: calc(14px * var(--fs)); font-weight: 600; margin-bottom: 10px; line-height: 1.35; }
.q .chips .check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.q .chips .check-chip { position: relative; }
.q .chips .check-chip:has(input:checked) { border-color: var(--gold); color: var(--gold); background: var(--gold-tint); }
.q .chips .check-chip:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.q.need, .card.need { box-shadow: 0 0 0 2px var(--danger); border-radius: 12px; transition: box-shadow .2s; }
.lift-q .grid2 { gap: 8px; }
.consent { height: auto; border-radius: 14px; padding: 12px 14px; align-items: flex-start; line-height: 1.45; font-size: calc(13px * var(--fs)); color: var(--text); }
.consent input { margin-top: 3px; flex: none; }
.intake-pick .chips .check-chip { height: 34px; }
.qa-list li { gap: 12px; align-items: flex-start; }
.warn-text { color: var(--danger); font-weight: 600; }
a.banner.card-link { color: inherit; text-decoration: none; }

.intake-pick > .check-chip, form .check-chip[style*='height:auto'] { border-radius: 14px; }

/* v1.9 · food log, verdict, morning report */
.eat-pick + .eat-pick { margin-top: 12px; }
.food-item { gap: 12px; }
.food-item[hidden], [data-food-group][hidden] { display: none; }
.qty { flex: none; min-width: 40px; display: flex; justify-content: flex-end; }
.qty .btn.xs svg { width: 15px; height: 15px; }
.eat-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 29; padding: 10px 16px; }
.eat-bar[hidden] { display: none; }
.eat-bar-in { max-width: 528px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-gold); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
main.view:has(.eat-bar:not([hidden])) { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 110px); }
.places > a { align-items: flex-start; }
.places .pill { flex: none; }
.verdict .display { line-height: 1.05; }
.report { margin-bottom: 14px; border-color: var(--line-gold); }
.report.r-recovery { border-color: var(--line); }
.report .h3 { line-height: 1.3; }
.q-form .chips { gap: 8px; }

/* v1.10 · meal macros, food list, check-offs, wins */
.totals { line-height: 1.65; }
.tot-group + .tot-group { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.item-edit { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.item-edit .input { min-width: 0; }
.mi-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; align-items: center; }
.mi-nums .mini { display: flex; flex-direction: column; gap: 3px; }
.mi-nums .mini .input { width: 100%; text-align: center; height: 34px; padding: 0 4px; }
.mi-nums .mini span { font-size: calc(11px * var(--fs)); color: var(--faint); text-align: center; letter-spacing: .04em; }
.day-chips { gap: 6px; }
.day-chips .chip.on, .mi-nums .chip.on { border-color: var(--gold); color: var(--gold); background: var(--gold-tint); }
.tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 99px; font-size: calc(11px * var(--fs)); letter-spacing: .02em; vertical-align: 1px; border: 1px solid var(--line); color: var(--muted); }
.tag.col { border-color: var(--line-gold); color: var(--gold); }
.tag.seed { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.check-btn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: transparent; display: grid; place-items: center; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.check-btn svg { width: 17px; height: 17px; }
.check-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.meal.done .meal-items, .meal.done .tiny.faint { opacity: .55; }
.meal-checks li { padding: 10px 0; }
.lib-item .plain, .lib .plain { padding: 2px 0; }
.lib li.added .small::after { content: ' ✓'; color: var(--gold); }
.lib-item[hidden], [data-lib-group][hidden], [data-lib][hidden] { display: none; }
.pop { animation: fd-pop .42s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes fd-pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.burst i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); transform: rotate(var(--a)) translateY(0); opacity: .95; animation: fd-spark .6s ease-out forwards; }
@keyframes fd-spark { to { transform: rotate(var(--a)) translateY(-26px) scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pop, .burst i { animation: none; } }
.meal-items li > span:last-child { white-space: nowrap; }

/* v1.11 · cart */
.gline { position: relative; }
.gline .gitem { padding-right: 0; }
.gline.pantry .gitem { padding-bottom: 26px; }
.gline .have-btn { position: absolute; right: 0; bottom: 8px; font-size: calc(12px * var(--fs)); }
.gline.have .gitem { opacity: .5; }
.gline.have .gname { text-decoration: line-through; }
.gline + .gline .gitem { border-top: 1px solid var(--line); }
.cost-line { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.cost-line.ok { border-color: var(--line-gold); }
.cost-line.warn { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.cost-line.warn .small { color: var(--danger); font-weight: 600; }
.cost-line select.input { padding: 0 8px; }
.price-row[hidden] { display: none; }

/* v1.12 · meals in order, one Fuel card */
.hr-soft { height: 1px; background: var(--line); margin: 14px 0; }
.check-btn.locked { color: var(--faint); border-style: dashed; cursor: not-allowed; }
.check-btn.locked svg { width: 14px; height: 14px; }
.check-btn:disabled.on { opacity: .85; cursor: default; }
.meal-checks li.st-locked .small, .meal.st-locked .meal-items { opacity: .6; }
.meal-checks li.st-skip .small, .meal.st-skip .meal-items { opacity: .55; text-decoration: line-through; text-decoration-color: var(--faint); }
.meal.st-eaten .meal-items, .meal.st-eaten .tiny.faint { opacity: .55; }
/* v1.12 · one coach thread */
.ck-card { max-width: 92%; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ck-card.me { align-self: flex-end; border-bottom-right-radius: 5px; }
.ck-card.them { align-self: flex-start; border-bottom-left-radius: 5px; }
.ck-card.open { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ck-card .pre { white-space: pre-wrap; word-wrap: break-word; }
.snap-preview { padding: 10px 12px; border-radius: 12px; background: var(--surface-2, var(--surface)); border: 1px dashed var(--line); }
/* v1.12 · hero XP and the villain meter */
.xp-strip { display: block; margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-gold); color: inherit; text-decoration: none; }
.xp-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.xp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.xp-bar.villain i { background: var(--danger); }
.villain-ink { color: var(--danger); }
.pill.villain { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.card.villain { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); margin-top: 12px; }
.xp-quote { margin: 12px 0 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--danger); font-family: var(--serif); font-style: italic; font-size: var(--fs-md, 15px); line-height: 1.4; }
.xp-hist { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-top: 14px; }
.xp-hist span { flex: 1; height: 100%; display: flex; align-items: flex-end; background: color-mix(in srgb, var(--line) 50%, transparent); border-radius: 3px; }
.xp-hist i { display: block; width: 100%; background: var(--accent); border-radius: 3px; min-height: 2px; }
.xp-ladder li.on { color: var(--accent); }
.xp-ladder li.on b, .xp-ladder li.on .small { color: var(--accent); }
.xp-ladder li.past { opacity: .65; }
.card.villain li.on .small { color: var(--danger); font-weight: 600; }
.hv li { display: flex; align-items: center; gap: 10px; }
.hv-m { width: 34px; }
.hv-bar { display: block; height: 7px; border-radius: 4px; margin: 2px 0; min-width: 2px; }
.hv-bar.hero { background: var(--accent); }
.hv-bar.vil { background: var(--danger); }
.sw-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-right: 10px; border: 1px solid var(--line); }
.xp-pop { position: fixed; z-index: 90; transform: translate(-50%, -100%); pointer-events: none; font-weight: 700; font-size: var(--fs-sm, 13px); color: var(--accent-ink); background: var(--accent); padding: 3px 9px; border-radius: 99px; box-shadow: 0 4px 14px rgba(0,0,0,.25); animation: fd-xp 1.2s ease-out forwards; }
@keyframes fd-xp { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -110%) scale(1.05); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .xp-pop { animation: fd-xp-still 1.2s linear forwards; } @keyframes fd-xp-still { 0%, 80% { opacity: 1; } 100% { opacity: 0; } } }
.vlist li { gap: 10px; padding-top: 8px; padding-bottom: 8px; }

/* v1.12 · bigger text: grids that would squeeze go to fewer columns. Nothing is hidden. */
.pr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; align-items: end; }
.pr-grid .mini { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pr-grid .mini > span { font-size: calc(11px * var(--fs)); color: var(--faint); letter-spacing: .04em; }
html[data-text="lg"] .mi-nums, html[data-text="xl"] .mi-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-text="lg"] .pr-grid, html[data-text="xl"] .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-text="xl"] .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-text="xl"] .ex-edit .grid4 { grid-template-columns: 1fr 1fr; }
html[data-text="xl"] .grid2.stack-xl { grid-template-columns: 1fr; }
html[data-text="xl"] .grid-item { grid-template-columns: 1fr 30px; }
html[data-text="xl"] .grid-item > :nth-child(2) { grid-column: 1; }
html[data-text="xl"] .set-head, html[data-text="xl"] .set-row { grid-template-columns: 30px 1fr 1fr 42px; gap: 6px; }
html[data-text="lg"] .chip, html[data-text="xl"] .chip { height: auto; min-height: 36px; white-space: normal; }
html[data-text="lg"] .item-top, html[data-text="xl"] .item-top { flex-wrap: wrap; }
html[data-text="lg"] .item-top > .grow, html[data-text="xl"] .item-top > .grow { flex-basis: 100%; }
html[data-text="lg"] .item-top > .stepper, html[data-text="xl"] .item-top > .stepper { margin-left: auto; }
.row.wrap { flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
/* v1.13 · animations: Full / Subtle / Off (Me → Appearance). Off (or the phone's reduce-motion) = nothing moves. */
@keyframes fd-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fd-fade { from { opacity: 0; } to { opacity: 1; } }
html[data-anim="full"] #view.enter { animation: fd-enter .26s cubic-bezier(.2, .8, .3, 1); }
html[data-anim="full"] #view.enter > .card, html[data-anim="full"] #view.enter > .stack > .card { animation: fd-enter .34s cubic-bezier(.2, .8, .3, 1) both; }
html[data-anim="full"] #view.enter > .card:nth-of-type(2) { animation-delay: .03s; }
html[data-anim="full"] #view.enter > .card:nth-of-type(3) { animation-delay: .06s; }
html[data-anim="full"] #view.enter > .card:nth-of-type(n+4) { animation-delay: .09s; }
html[data-anim="subtle"] #view.enter { animation: fd-fade .18s ease-out; }
html[data-anim="off"] .pop, html[data-anim="off"] .burst { animation: none !important; }
html[data-anim="off"] .burst { display: none; }
html[data-anim="off"] .xp-pop { animation: fd-xp-still 1.2s linear forwards; }
html[data-anim="subtle"] .xp-pop { animation: fd-xp-still 1.2s linear forwards; }
@keyframes fd-xp-still { 0%, 80% { opacity: 1; transform: translate(-50%, -110%); } 100% { opacity: 0; transform: translate(-50%, -110%); } }
/* v1.13 · Me menu */
.me-menu li { padding: 0; }
.me-menu a { display: flex; flex: 1; width: 100%; padding: 12px 2px; color: inherit; text-decoration: none; gap: 10px; align-items: center; }
/* v1.13 · Plan → Fuel sub-tabs, Fice standard, nutrient board */
.sub-tabs { margin: -6px 0 16px; }
.sub-tabs a { flex: 1; text-align: center; padding: 9px 6px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: calc(13.5px * var(--fs)); font-weight: 600; }
.sub-tabs a.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 0 var(--line); }
.std-head { display: flex; flex-direction: column; gap: 3px; margin: 22px 0 -6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.std-head.std { border-color: var(--line-gold); background: var(--gold-tint); }
.std-head.junk { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); background: var(--danger-tint); }
.tag.junk { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.nut-list li { display: block; padding: 10px 0; }
.nut-bar { position: relative; height: 7px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 6px; }
.nut-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 6px; }
.nut-bar i.proj { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.nut-row.over .nut-bar i { background: var(--danger); }
.danger-ink { color: var(--danger); }
.food-jump { margin-bottom: 4px; }
.food-jump .chip.junk-chip { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
/* v1.13 · Today folds */
.next-meal .next-label { padding: 6px 0 0; border: 0; }
.mini-fold { margin-top: 6px; }
.mini-fold > summary { cursor: pointer; color: var(--muted); list-style: none; padding: 6px 0; }
.mini-fold > summary::-webkit-details-marker { display: none; }
.mini-fold > summary::before { content: '▸ '; }
.mini-fold[open] > summary::before { content: '▾ '; }
.done-fold > summary .fold-sum { color: var(--text); }
.done-fold > summary .eyebrow { color: var(--gold); }
/* v1.13 · full-screen moments (Day 1 welcome, morning welcome, level up, program complete) */
.moment { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: calc(env(safe-area-inset-top) + 20px) 18px calc(env(safe-area-inset-bottom) + 20px); overflow-y: auto;
  background: radial-gradient(120% 80% at 50% 30%, color-mix(in srgb, var(--surface) 96%, var(--gold) 4%), var(--bg) 70%); opacity: 0; transition: opacity .28s ease; }
.moment.in { opacity: 1; }
.moment.morning { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.moment-in { position: relative; width: 100%; max-width: 420px; text-align: center; padding: 34px 22px 24px; }
.moment.morning .moment-in { background: var(--surface); border: 1px solid var(--line-gold); border-radius: 22px; box-shadow: var(--shadow); }
.moment-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 28px; line-height: 1; }
.moment-crest { display: block; margin: 0 auto; height: auto; filter: drop-shadow(0 8px 26px color-mix(in srgb, var(--gold) 25%, transparent)); }
.moment-title { font-size: calc(38px * var(--fs-d)); margin-top: 10px; overflow-wrap: anywhere; }
.moment-big { font-family: var(--serif); font-size: calc(92px * var(--fs-d)); line-height: .95; color: var(--gold); margin-top: 6px; }
.moment-note { color: var(--muted); font-size: calc(15px * var(--fs)); line-height: 1.55; margin: 14px auto 0; max-width: 34ch; white-space: pre-line; }
.moment-sign { font-family: var(--serif); font-style: italic; font-size: calc(20px * var(--fs)); color: var(--gold); margin-top: 10px; }
.moment-facts { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.moment-facts > div { flex: 1 1 130px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface-2); text-align: left; min-width: 0; }
.moment-facts b { display: block; margin-top: 6px; font-size: calc(14.5px * var(--fs)); overflow-wrap: anywhere; }
.moment-card { text-align: left; margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface-2); }
.moment-burst { position: absolute; left: 50%; top: 96px; width: 0; height: 0; pointer-events: none; }
.moment-burst i { position: absolute; left: -3px; top: -3px; width: 6px; height: 18px; border-radius: 3px; background: var(--gold); opacity: 0; transform: rotate(var(--a)) translateY(-40px); animation: fd-burst .9s cubic-bezier(.2, .8, .3, 1) var(--d) forwards; }
@keyframes fd-burst { 0% { opacity: 0; transform: rotate(var(--a)) translateY(-30px) scaleY(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-150px) scaleY(1); } }
html[data-anim="full"] .moment.in .moment-crest { animation: fd-crest .7s cubic-bezier(.2, .8, .3, 1.2) both; }
@keyframes fd-crest { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
html[data-anim="off"] .moment, html[data-anim="off"] .moment-burst { transition: none; }
html[data-anim="off"] .moment-burst { display: none; }
.report-mini { width: 100%; margin-bottom: 14px; gap: 10px; text-align: left; color: inherit; font: inherit; }
/* v1.13 · share cards */
.share-preview { display: block; width: auto; max-width: 100%; max-height: 52dvh; margin: 12px auto 0; border-radius: 14px; border: 1px solid var(--line); }
/* v1.13 · weekly report card */
.rc { border: 1px solid var(--line-gold); border-radius: 18px; padding: 18px 16px; background: var(--surface-2); }
.rc-head { text-align: center; border-bottom: 1px dashed var(--line-gold); padding-bottom: 12px; }
.rc-title { font-size: calc(32px * var(--fs-d)); margin-top: 4px; }
.rc-overall { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin: 14px 0 6px; }
.rc-big { font-family: var(--serif); font-size: calc(64px * var(--fs-d)); line-height: 1; font-weight: 600; }
.rc-mid { font-family: var(--serif); font-size: calc(30px * var(--fs-d)); line-height: 1; font-weight: 600; min-width: 46px; text-align: center; }
.rc-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.rc-table th { font: 600 calc(10.5px * var(--fs))/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.rc-table td:first-child { white-space: nowrap; }
.rc-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: calc(14px * var(--fs)); }
.rc-table td.rc-g { font-family: var(--serif); font-size: calc(24px * var(--fs-d)); font-weight: 600; width: 58px; text-align: center; }
.rc-stats { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: calc(13px * var(--fs)); color: var(--muted); }
.rc-stats b { color: var(--text); }
.rc-comment { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-gold); }
.rc-comment p { font-family: var(--serif); font-style: italic; font-size: calc(20px * var(--fs)); line-height: 1.35; margin: 8px 0 0; }
.rc-sign { text-align: right; font-family: var(--serif); font-style: italic; color: var(--gold); margin-top: 6px; font-size: calc(16px * var(--fs)); }
.g-a { color: var(--gold); } .g-b { color: var(--text); } .g-c { color: var(--muted); } .g-d, .g-f { color: var(--danger); } .g-na { color: var(--faint); }
.rc-row { width: 100%; gap: 12px; text-align: left; color: inherit; font: inherit; }
.rc-hist { gap: 8px; margin-top: 8px; }
.rc-hist .card { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; }
.rc-list > summary { list-style: none; cursor: pointer; }
.rc-list > summary::-webkit-details-marker { display: none; }
.rc-list[open] > summary .chev { transform: rotate(90deg); }
.rc-li, .ex-lib { width: 100%; gap: 12px; background: none; border: 0; padding: 10px 2px; color: inherit; font: inherit; align-items: center; }
.needs .ic.win { background: var(--gold-tint); color: var(--gold); }
/* v1.13 · testimonials */
.stars { display: flex; gap: 6px; justify-content: center; }
.stars label { cursor: pointer; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars span { font-size: 34px; line-height: 1; color: var(--line); transition: color .12s; }
.stars:has(input:checked) span { color: var(--gold); }
.stars label:has(input:checked) ~ label span { color: var(--line); }
/* v1.13 · in-app video */
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin-top: 12px; border: 1px solid var(--line); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
button.demo-link { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }

/* v1.14 · pain / stiffness slider */
.painf input[type=range] { width: 100%; margin-top: 10px; }
.painf-scale { margin-top: 2px; }
.painf-word { margin-top: 6px; min-height: 1.3em; }
.painf-stop { margin-top: 8px; font-weight: 600; }
.chip.sm { padding: 6px 10px; font-size: calc(12.5px * var(--fs)); min-height: 32px; }
/* v1.14 · finish rows, receipts, review */
.finish-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.receipt { text-align: center; }
.receipt-tick { width: 64px; height: 64px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.receipt-tick.wait { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
html[data-anim="full"] .receipt-tick:not(.wait) { animation: fd-crest .5s cubic-bezier(.2, .8, .3, 1.3) both; }
.receipt-list, .review-list { list-style: none; margin: 14px 0 0; padding: 0; text-align: left; border-top: 1px solid var(--line); }
.receipt-list li, .review-list li { display: flex; gap: 10px; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: calc(14px * var(--fs)); }
.receipt-list li > span, .review-list li > span { flex: 0 0 34%; }
.receipt-list li > b, .review-list li > b { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.review-list li .link-btn { flex: none; }
.outbox { width: 100%; gap: 12px; margin-bottom: 14px; border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: var(--danger-tint); color: inherit; font: inherit; }
.outbox .eyebrow { color: var(--danger); }
.locked-in b.gold { font-size: calc(15px * var(--fs)); }
/* v1.14 · loggers: last time, feel, adjustments, rest timer */
.last-time { margin-top: 6px; color: var(--muted); }
.last-time .eyebrow { font-size: calc(10px * var(--fs)); letter-spacing: .14em; }
.ex-feel { display: inline-flex; gap: 6px; }
.feel-seg button.on { font-weight: 700; }
.pill.adj { margin-left: 6px; font-size: calc(10.5px * var(--fs)); }
#rest-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); z-index: 45; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-gold); box-shadow: var(--shadow); max-width: 560px; margin: 0 auto; }
#rest-bar .rest-t { font-family: var(--serif); font-size: calc(28px * var(--fs-d)); line-height: 1; color: var(--gold); }
#rest-bar button { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font: 600 calc(13px * var(--fs)) var(--sans); }
#rest-bar.go { background: var(--accent); border-color: transparent; }
#rest-bar.go .eyebrow, #rest-bar.go .rest-t { color: var(--accent-ink); }
html[data-anim="full"] #rest-bar.go { animation: fd-go .5s ease-in-out 3; }
@keyframes fd-go { 50% { transform: scale(1.03); } }
/* v1.14 · special-edition emblems */
.emblem { display: block; margin: 0 auto; filter: drop-shadow(0 10px 26px color-mix(in srgb, var(--gold) 30%, transparent)); }
html[data-anim="full"] .moment.in .emblem { animation: fd-crest .8s cubic-bezier(.2, .8, .3, 1.2) both; }
.edition { font-family: var(--serif); font-style: italic; color: var(--gold); }
.pal-emblem { flex: none; width: 52px; display: grid; place-items: center; }
.pal-emblem .emblem { filter: none; }
[hidden] { display: none !important; }

/* ───────── v1.15 ───────── */
/* exercise picker */
.chip .t-dot, .tiny .t-dot, .t-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-left: 6px; vertical-align: middle; }
.xpick-group { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.xpick-group > summary { list-style: none; cursor: pointer; padding: 4px 0; }
.xpick-group > summary::-webkit-details-marker { display: none; }
.xpick-group > summary::after { content: '+'; color: var(--faint); margin-left: 8px; }
.xpick-group[open] > summary::after { content: '−'; }
#exres { max-height: 52vh; overflow-y: auto; }
/* Numbers */
.num-list { display: grid; gap: 10px; }
.num-card { display: block; width: 100%; text-align: left; cursor: pointer; }
.num-card.empty-num .num-big { color: var(--faint); }
.num-big { font-family: var(--serif); font-size: calc(26px * var(--fs-d)); line-height: 1.1; color: var(--text); }
.spark { display: block; color: var(--gold); opacity: .9; }
.spark path { vector-effect: non-scaling-stroke; }
/* pain bands */
.painf-band { margin-top: 4px; }
.warn-ink { color: color-mix(in srgb, var(--danger) 70%, var(--gold)); }
.banner.warn { border-color: color-mix(in srgb, var(--danger) 30%, var(--line-gold)); }
.check-moment .check-mark { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-family: var(--serif); font-size: 52px; color: var(--danger); border: 2px solid var(--danger); background: var(--danger-tint); }
.check-steps { text-align: left; margin: 14px auto 0; max-width: 340px; padding-left: 20px; line-height: 1.5; }
.check-steps li { margin: 6px 0; }
/* intensity */
.lvl-pill { font-weight: 600; }
.lvl-box { border: 1px solid var(--line-gold); border-radius: 14px; padding: 14px; background: var(--gold-tint); }
.lvl-box input[type=range] { width: 100%; margin-top: 10px; accent-color: var(--gold); }
.lvl-v { font-family: var(--serif); font-size: calc(26px * var(--fs-d)); color: var(--gold); }
.ev-verdict { display: grid; gap: 4px; border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); }
.ev-verdict.gold { border-color: var(--line-gold); background: var(--gold-tint); }
.ev-verdict.gold b { color: var(--gold); }
.ev-verdict.warn, .ev-verdict.danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-tint); }
.ev-verdict.warn b, .ev-verdict.danger b { color: var(--danger); }
.diff-list { display: grid; gap: 12px; }
.diff-sess { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.diff-row { display: grid; gap: 2px; padding: 6px 0; border-top: 1px solid var(--line); }
.diff-row:first-of-type { border-top: 0; }
.diff-row.same { opacity: .55; }
.diff-vals { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
/* Playbook */
.playbook-pick .list li { padding: 8px 0; }
.lvl-ticks { padding: 0 6px; }
/* v1.16 · times, gym, second session, number history */
.time-chip { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 8px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line-gold); background: var(--gold-tint); color: var(--gold); font: 600 calc(12.5px * var(--fs))/1.2 var(--sans); font-variant-numeric: tabular-nums; min-height: 30px; cursor: pointer; }
.time-chip svg { width: 14px; height: 14px; }
.time-chip.empty { border-style: dashed; background: transparent; color: var(--muted); border-color: var(--line); }
.time-chip.ro { cursor: default; }
.session-card.second-sess { border-style: dashed; }
.gym-card { margin-bottom: 12px; }
.gym-card .eyebrow { display: block; }
.num-hist .list li { border-top: 1px solid var(--line); }
.num-hist .list li:first-child { border-top: 0; }
.btn.danger-ink { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
input[type=time].input { min-height: 44px; }

/* ═══════════════════════════ v1.17 · DOMINION ═══════════════════════════
   Condensed, heavy type for the big words and numbers. Sharp corners. One hot accent per screen.
   Quiet labels, hairline dividers, room to breathe. Me → Appearance → Type → Classic serif brings the serif back. */
:root { --display: 'Barlow Condensed', 'Oswald', 'Arial Narrow', 'Roboto Condensed', system-ui, sans-serif; --r: 10px; }
html:not([data-type='classic']) :is(.display, .h2, .hero .daynum, .ready .pct, .session-card .title, .timer .big, .day-row .d b, .stat b, .sheet h3, .weight-big, .moment-big, .rc-big, .rc-mid, .rc-table td.rc-g, #rest-bar .rest-t, .num-big, .lvl-v, .avatar, .next-t, .st-cell b, .ring-in b, .brand b) { font-family: var(--display); font-style: normal; }
html:not([data-type='classic']) .display { font-weight: 800; text-transform: uppercase; font-size: calc(50px * var(--fs-d)); line-height: .9; letter-spacing: .005em; }
html:not([data-type='classic']) .h2 { font-weight: 700; font-size: calc(27px * var(--fs-d)); line-height: 1.02; letter-spacing: .005em; }
html:not([data-type='classic']) .hero .daynum { font-weight: 800; text-transform: uppercase; font-size: clamp(78px, 25vw, 112px); line-height: .82; letter-spacing: -.01em; }
html:not([data-type='classic']) .hero .daynum small { font-family: var(--display); font-weight: 700; font-size: calc(30px * var(--fs)); }
html:not([data-type='classic']) .session-card .title { font-weight: 800; text-transform: uppercase; font-size: calc(31px * var(--fs-d)); line-height: .94; letter-spacing: .01em; }
html:not([data-type='classic']) :is(.ready .pct, .stat b, .num-big, .lvl-v, .weight-big, #rest-bar .rest-t, .rc-big, .rc-mid, .moment-big, .timer .big, .day-row .d b, .avatar) { font-weight: 800; }
html:not([data-type='classic']) .sheet h3 { font-weight: 800; text-transform: uppercase; letter-spacing: .01em; font-size: calc(28px * var(--fs-d)); }
html:not([data-type='classic']) .brand b { font-weight: 800; letter-spacing: .2em; font-size: min(calc(14px * var(--fs)), 15px); }

/* Quiet labels: fewer spaced-out capitals. */
.eyebrow { letter-spacing: .12em; font-weight: 700; font-size: calc(11px * var(--fs)); }
.tag { letter-spacing: .12em; font-weight: 700; }
.set-head { letter-spacing: .1em; }

/* Sharp geometry. */
.card, details.fold { border-radius: var(--r); }
.banner { border-radius: 8px; border-left-width: 3px; }
.btn { border-radius: 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: calc(13.5px * var(--fs)); }
.btn.sm { border-radius: 7px; font-size: calc(12.5px * var(--fs)); }
.btn.xs { border-radius: 6px; font-size: calc(11.5px * var(--fs)); letter-spacing: .04em; }
.btn.gold { box-shadow: 0 10px 26px -14px var(--accent); }
.btn.gold:active { box-shadow: none; }
.chip { border-radius: 6px; }
.pill { border-radius: 5px; }
.input, select.input, textarea.input { border-radius: 8px; }
.seg { border-radius: 9px; }
.seg button { border-radius: 6px; }
.tick, .stepper { border-radius: 8px; }
.bar { height: 4px; border-radius: 0; }
.bar > i { border-radius: 0; }
.card.gold-edge { border-color: var(--line); box-shadow: inset 3px 0 0 var(--accent); }
.avatar { border-radius: 10px; }
.avatar.sm { width: 34px; height: 34px; font-size: calc(15px * var(--fs)); border-radius: 8px; }

/* Nav: the hot line marks where you are. Me is the avatar, top right. */
.nav a { font-weight: 700; letter-spacing: .08em; }
.nav a.on::before { content: ''; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; background: var(--accent); }
.me-btn { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font: 800 calc(14px * var(--fs))/1 var(--display); letter-spacing: .04em; color: var(--accent-ink); background: var(--accent); }
.me-btn.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }

/* Skeleton while a screen loads. */
.skel-wrap { padding-top: 10px; }
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 45%, var(--surface) 90%); background-size: 220% 100%; animation: fd-skel 1.15s linear infinite; }
.sk-eyebrow { width: 32%; height: 11px; }
.sk-title { width: 58%; height: 44px; margin-top: 12px; }
.sk-card { height: 168px; margin-top: 22px; border-radius: var(--r); }
.sk-line { height: 54px; margin-top: 10px; border-radius: var(--r); }
.sk-line.short { width: 100%; opacity: .6; }
@keyframes fd-skel { from { background-position: 110% 0; } to { background-position: -110% 0; } }
html[data-anim="off"] .skel { animation: none; }

/* ---------- Today ---------- */
.hero.hero-c { padding: 2px 0 16px; }
.hero.hero-c .daynum { margin: 10px 0 12px; }
.next-wrap { position: relative; }
.next-k { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 8px; font: 800 calc(11px * var(--fs))/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.next-k b { font-family: var(--display); font-size: calc(16px * var(--fs)); letter-spacing: .02em; color: var(--text); }
.next-card .next-k { margin: 0 0 10px; }
.next-card { border-color: var(--line-gold); box-shadow: inset 3px 0 0 var(--accent); }
.next-t { font-weight: 800; font-size: calc(32px * var(--fs-d)); line-height: .95; text-transform: uppercase; letter-spacing: .01em; }
html[data-type='classic'] .next-t { font-family: var(--serif); font-weight: 500; text-transform: none; }
.next-t small { font-family: var(--sans); font-size: calc(14px * var(--fs)); font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.day-done { box-shadow: inset 3px 0 0 var(--ok); }
.day-line { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px -2px 14px; padding: 0 2px; }
.day-line::-webkit-scrollbar { display: none; }
.dl-i { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: calc(12.5px * var(--fs)); font-weight: 600; white-space: nowrap; }
.dl-i i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--faint); }
.dl-i svg { width: 13px; height: 13px; color: var(--ok); }
.dl-i b { font-family: var(--display); font-weight: 700; color: var(--text); letter-spacing: .02em; }
.dl-i.done { color: var(--faint); border-color: transparent; background: var(--surface); }
.dl-i.now { color: var(--text); border-color: var(--accent); }
.dl-i.now i { background: var(--accent); border-color: var(--accent); }
.day-folds { margin-top: 10px; }
.day-fold > .fold-body > .card { padding: 0; border: 0; background: none; box-shadow: none; }
.day-fold > .fold-body > .card + .card, .day-fold > .fold-body .stack > .card { padding: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.day-fold .session-card { background: var(--surface-2); }
.xp-strip { margin: 0 0 12px; }
details.ex-prev { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.ex-prev > summary { list-style: none; cursor: pointer; font-size: calc(12.5px * var(--fs)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
details.ex-prev > summary::after { content: '+'; font-size: 16px; color: var(--faint); }
details.ex-prev[open] > summary::after { content: '−'; }
details.ex-prev > summary::-webkit-details-marker { display: none; }

/* 2-tap morning */
.quick-stiff { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.qs { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 2px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.qs b { font-family: var(--display); font-weight: 800; font-size: calc(26px * var(--fs-d)); line-height: 1; color: var(--text); }
.qs span { font-size: calc(10.5px * var(--fs)); letter-spacing: .02em; }
.qs.on { border-color: var(--accent); background: var(--gold-tint); }
.qs.more b { color: var(--danger); }
details.stiff-more { margin-top: 12px; }

/* 3-tap night */
.mood-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); min-width: 0; }
.mood b { font-family: var(--display); font-weight: 800; font-size: calc(26px * var(--fs-d)); line-height: 1; color: var(--text); }
.mood span { font-size: calc(10.5px * var(--fs)); line-height: 1.15; text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mood.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.mood.on b { color: var(--accent-ink); }

/* ---------- Train ---------- */
.wk-seg { min-width: 200px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ws-d { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); min-width: 0; }
.ws-d .ws-w { font-size: calc(10.5px * var(--fs)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ws-d b { font-family: var(--display); font-weight: 800; font-size: calc(22px * var(--fs-d)); line-height: 1; color: var(--text); }
html[data-type='classic'] .ws-d b { font-family: var(--serif); font-weight: 500; }
.ws-d .ws-t { font-size: calc(9.5px * var(--fs)); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); height: 13px; max-width: 100%; overflow: hidden; }
.ws-d .ws-t svg { width: 12px; height: 12px; color: var(--ok); }
.ws-d.rest .ws-t { color: var(--faint); }
.ws-d.past { opacity: .55; }
.ws-d.today { border-color: var(--line-gold); }
.ws-d.today .ws-w { color: var(--gold); }
.ws-d.on { border-color: var(--accent); background: var(--gold-tint); opacity: 1; }
.ws-d.done .ws-t { color: var(--ok); }

/* ---------- Logger focus ---------- */
.fx-top { margin: 6px 2px 10px; min-height: 18px; }
.fx-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.fx-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--line); border: 0; padding: 0; }
.fx-dot.on { background: var(--accent); width: 22px; }
.logger.focus .exblock { display: none; border-top: 0; padding: 2px 0 6px; }
.logger.focus .exblock.cur { display: block; animation: fd-fx .2s ease both; }
@keyframes fd-fx { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
html[data-anim="off"] .logger.focus .exblock.cur { animation: none; }
.ex-count { letter-spacing: .12em; font-weight: 700; margin-bottom: 6px; }
.logger:not(.focus) .ex-count { display: none; }
.logger.focus .exblock .h3 { font-family: var(--display); font-weight: 800; font-size: calc(26px * var(--fs-d)); line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
html[data-type='classic'] .logger.focus .exblock .h3 { font-family: var(--serif); font-weight: 500; text-transform: none; }
.logger.focus .set-head, .logger.focus .set-row { grid-template-columns: 30px 1fr 1fr 60px; }
.logger.focus .set-row .input { height: 56px; font-size: calc(21px * var(--fs)); font-weight: 700; }
.logger.focus .tick { width: 60px; height: 56px; }
.logger.focus .tick svg { width: 24px; height: 24px; }
.logger.focus .set-row + .set-row { margin-top: 10px; }
.prog-note { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: calc(12px * var(--fs)); font-weight: 600; color: var(--muted); }
.prog-note.up { color: var(--ok); }
.prog-note.down { color: var(--danger); }
.prog-note svg { width: 14px; height: 14px; }
details.ex-more { margin-top: 12px; }
details.ex-more > summary { list-style: none; cursor: pointer; }
details.ex-more > summary::-webkit-details-marker { display: none; }
details.ex-more > summary::before { content: '⋯ '; font-weight: 800; }
.fx-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); z-index: 44; max-width: 536px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fx-bar .btn { height: 46px; }
.fx-bar .btn.ghost { width: 50px; padding: 0; }
.fx-bar .btn.gold { min-width: 120px; }
.fx-bar #fx-sets b { font-family: var(--display); font-size: calc(22px * var(--fs)); font-weight: 800; color: var(--text); }
body.has-fx main.view { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 96px); }
body.has-fx #rest-bar { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 78px); }

/* ---------- Fuel · Just track ---------- */
.track-rings .rings { display: flex; justify-content: space-around; gap: 10px; }
.ring { position: relative; width: 118px; text-align: center; }
.ring svg { display: block; width: 118px; height: 118px; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: butt; transition: stroke-dasharray .5s ease; }
.ring.hit .ring-fg { stroke: var(--ok); }
.ring.over .ring-fg { stroke: var(--danger); }
.ring-in { position: absolute; left: 0; right: 0; top: 0; height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-in b { font-weight: 800; font-size: calc(30px * var(--fs-d)); line-height: 1; }
.ring-l { margin-top: 6px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.track-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.track-acts .btn { flex: 1 1 auto; }
.track-acts .btn.gold { flex: 1 1 100%; }
.my-meals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.my-meal { position: relative; }
.mm-log { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 12px 30px 12px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); min-height: 62px; }
.mm-log b { font-size: calc(14px * var(--fs)); }
.mm-log:active { border-color: var(--accent); background: var(--gold-tint); }
.mm-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; background: transparent; color: var(--faint); display: grid; place-items: center; }
.mm-x svg { width: 13px; height: 13px; }

/* ---------- Command inbox ---------- */
.inbox .ib-g { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-top: 10px; overflow: hidden; }
.inbox .ib-g.urgent { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); box-shadow: inset 3px 0 0 var(--danger); }
.ib-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; border-bottom: 1px solid var(--line); }
.ib-h b { font-size: calc(15px * var(--fs)); }
.ib-items { list-style: none; margin: 0; padding: 0 14px; }
.ib-items > li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.ib-items > li:first-child { border-top: 0; }
.ib-t { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; color: inherit; }
.ib-t .ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--gold-tint); color: var(--gold); flex: none; }
.ib-t .ic.warn { background: var(--danger-tint); color: var(--danger); }
.ib-t .ic svg { width: 15px; height: 15px; }
.ib-acts { display: flex; gap: 6px; flex: none; }
.all-clear { text-align: center; padding: 34px 18px; }
.all-clear .ac-mark { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-tint); color: var(--ok); }
.all-clear .ac-mark svg { width: 28px; height: 28px; }

/* ---------- Client file ---------- */
.status-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.st-cell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-width: 0; }
.st-cell b { display: block; font-weight: 800; font-size: calc(32px * var(--fs-d)); line-height: 1; margin: 6px 0 4px; }
.st-cell b small { font-size: .5em; color: var(--muted); font-weight: 700; margin-left: 2px; }
.st-cell .tiny { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-cell.hot { border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
.st-cell.hot b { color: var(--danger); }
.today-line { margin-top: 0; }
.list > li.warn .small { color: var(--danger); }

/* ---------- Programs ---------- */
.prog-f button { font-weight: 700; }
.pcal .pc-r { display: grid; grid-template-columns: 38px repeat(7, 1fr); gap: 4px; align-items: center; }
.pcal .pc-r + .pc-r { margin-top: 4px; }
.pcal .pc-h span { text-align: center; font-size: calc(10.5px * var(--fs)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.pcal .pc-k { font-size: calc(11px * var(--fs)); color: var(--gold); font-weight: 700; }
.pcal .pc-c { height: 34px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 700 calc(10px * var(--fs))/1 var(--sans); letter-spacing: .03em; text-transform: uppercase; overflow: hidden; padding: 0 2px; }
.pcal .pc-c.rest { background: transparent; color: var(--faint); }
.pcal .pc-c.none { border: 0; background: none; }
.pcal .pc-c.t-test, .pcal .pc-c.t-load { border-color: var(--line-gold); color: var(--gold); }
.pcal.folded .pc-r.more { display: none; }
/* Today's folds read as one line each. */
details.day-fold, details.onboard-fold { margin-top: 8px; }
:is(.day-fold, .onboard-fold) > summary { padding: 13px 14px; }
.day-fold > summary .grow { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.day-fold > summary .eyebrow { flex: none; width: 82px; }
:is(.day-fold, .onboard-fold) > summary .fold-sum { margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onboard-fold > summary .fold-sum { margin-top: 4px; }
.onboard-fold { box-shadow: inset 3px 0 0 var(--accent); }
.xp-strip { padding: 10px 14px; border-radius: var(--r); }
.xp-strip .bar { margin-top: 8px; }
.ready[hidden] { display: none; }
/* Off the logger, the rest timer tucks under the header (it never covers a chat box or a bottom bar). */
body:not(.has-fx) #rest-bar { top: calc(env(safe-area-inset-top) + 66px); bottom: auto; left: auto; right: 12px; max-width: 250px; padding: 6px 8px 6px 12px; gap: 8px; }
body:not(.has-fx) #rest-bar [data-a=restAdd] { display: none; }
body:not(.has-fx) #rest-bar .rest-t { font-size: calc(20px * var(--fs-d)); }

/* ───────────── v1.18 · Fuel Today, the food picker, scan, quick log ───────────── */
.mbars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.mbar-t { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 5px; }
.mbar-t > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
.water-row { margin-top: 10px; }
.water-row .btn { flex: none; }
.water-row .row.between { gap: 8px; }
.slots { display: flex; flex-direction: column; gap: 8px; }
details.slot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
details.slot > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; min-height: 52px; }
details.slot > summary::-webkit-details-marker { display: none; }
details.slot > summary .chev { transition: transform .15s ease; }
details.slot[open] > summary .chev { transform: rotate(90deg); }
details.slot.is-empty > summary b { color: var(--muted); }
details.slot > .list { padding: 0 16px; border-top: 1px solid var(--line); }
details.slot > .list li { padding: 10px 0; }
details.slot .st-eaten .small { color: var(--muted); }
.slot-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px 14px; }
.my-meals.editing .mm-log { border-style: dashed; }
/* Food picker */
.slot-seg { margin-bottom: 10px; overflow-x: auto; }
.slot-seg button { min-width: max-content; padding: 0 10px; }
.food-search { gap: 8px; position: sticky; top: calc(env(safe-area-inset-top) + 62px); z-index: 5; background: var(--bg); padding: 4px 0; }
.scan-btn { flex: none; width: 48px; padding: 0; display: grid; place-items: center; }
.fi-name { background: none; border: 0; padding: 0; text-align: left; color: inherit; min-width: 0; }
details.fgrp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-top: 8px; }
details.fgrp > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; font-weight: 600; font-size: calc(14px * var(--fs)); }
details.fgrp > summary::-webkit-details-marker { display: none; }
details.fgrp > summary .chev { transition: transform .15s ease; }
details.fgrp[open] > summary .chev { transform: rotate(90deg); }
details.fgrp > .list { padding: 0 16px 6px; border-top: 1px solid var(--line); }
details.fgrp.junk { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
details.fgrp[hidden], .food-item[hidden] { display: none; }
.nut-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ng-c { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.ng-c.key { border-color: var(--line-gold); background: var(--gold-tint); }
.portion-chips .chip { min-width: 52px; justify-content: center; }
/* Scan */
.scan-box { position: relative; margin-top: 12px; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: scanl 1.6s ease-in-out infinite alternate; }
@keyframes scanl { from { transform: translateY(-50px); } to { transform: translateY(50px); } }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; } }
/* Quick log */
.fab { position: fixed; right: max(16px, calc(50vw - 264px)); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 30; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.fab svg { width: 26px; height: 26px; stroke-width: 2.4; }
.fab.high { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 86px); }
.fab[hidden], body:has(.eat-bar:not([hidden])) .fab, body:has(.sheet-wrap) .fab { display: none; }
.fab:active { transform: scale(.95); }
main.view { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 84px); }
.ql-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ql-tile { display: flex; align-items: center; gap: 10px; padding: 14px 12px; min-height: 70px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-align: left; text-decoration: none; }
.ql-tile svg { flex: none; width: 24px; height: 24px; color: var(--gold); }
.ql-tile > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ql-tile:active { border-color: var(--accent); background: var(--gold-tint); }
.ql-water { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.ql-water svg { width: 20px; height: 20px; color: var(--gold); }
.chip.on-soft { color: var(--text); border-color: var(--line-gold); }
.x-repeat { border-color: var(--line-gold); }
.mbar { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* v1.18 · Me as tiles */
.me-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me-tile { display: flex; flex-direction: column; gap: 3px; padding: 14px; min-height: 104px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.me-tile svg { width: 22px; height: 22px; color: var(--gold); margin-bottom: 6px; }
.me-tile:active { border-color: var(--accent); background: var(--gold-tint); }
html[data-text="xl"] .me-tiles { grid-template-columns: 1fr; }
.fab { transition: transform .2s ease, opacity .2s ease; }
.fab.tuck { transform: translateY(90px); opacity: 0; pointer-events: none; }
/* v1.19 · log a past day */
.past-link { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px dashed var(--line); color: var(--muted); text-decoration: none; font-size: calc(13px * var(--fs)); }
.past-link svg { width: 18px; height: 18px; flex: none; }
.past-link b { color: var(--text); font-weight: 600; }
.past-days { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.past-days .chip { flex: none; text-decoration: none; }
.past-obj .chip { height: auto; min-height: 36px; padding-top: 6px; padding-bottom: 6px; text-align: left; }
.sec-save { gap: 8px; margin-top: 14px; }
/* ───────────── v1.19 · settings list ───────────── */
.set-search { margin: 4px 0 6px; }
.set-list { padding: 0 !important; overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 58px; color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row > svg { width: 20px; height: 20px; flex: none; color: var(--gold); }
.set-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-row .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row:active { background: var(--gold-tint); }
.set-row[hidden], .set-group[hidden] { display: none; }
.set-group .fold, .set-group .card-link { margin-bottom: 6px; }

/* ═══════════════════════════ v1.19 · PRO STYLE ═══════════════════════════
   Quiet graphite, one muted accent, sans-serif headings at normal sizes, no uppercase shouting,
   no glow. Numbers first. Applies over any palette (their palette comes back when they switch to Dominion). */
:root[data-style='pro'][data-mode='dark'][data-palette] {
  --bg: #0e0f11; --surface: #15171a; --surface-2: #1b1e22; --line: #25292e; --line-gold: rgba(201,168,106,.28);
  --text: #eceef0; --muted: #9ba1a8; --faint: #7d838a;
  --gold: #c9a86a; --accent: #c9a86a; --accent-ink: #101112; --gold-tint: rgba(201,168,106,.08); --load: #c9a86a;
  --danger: #e06a52; --danger-tint: rgba(224,106,82,.12); --ok: #8fb07a;
  --shadow: 0 10px 28px rgba(0,0,0,.45);
}
:root[data-style='pro'][data-mode='light'][data-palette] {
  --bg: #f6f6f4; --surface: #ffffff; --surface-2: #f0f0ed; --line: #e1e1dc; --line-gold: rgba(120,96,48,.3);
  --text: #15171a; --muted: #5d636a; --faint: #747a81;
  --gold: #8a6d33; --accent: #1b1e22; --accent-ink: #ffffff; --gold-tint: rgba(120,96,48,.07); --load: #8a6d33;
  --danger: #b4452f; --danger-tint: rgba(180,69,47,.08); --ok: #4f7a3c;
  --shadow: 0 10px 26px rgba(20,20,20,.08);
}
html[data-style='pro'] :is(.display, .h2, .hero .daynum, .hero .daynum small, .session-card .title, .next-t, .sheet h3, .stat b, .ready .pct, .num-big, .weight-big, .moment-big, .rc-big, .rc-mid, .ring-in b, .st-cell b, .avatar, .brand b, .day-row .d b, .lvl-v) {
  font-family: var(--sans) !important; text-transform: none !important; letter-spacing: -0.01em !important; font-style: normal !important;
}
html[data-style='pro'] .display { font-weight: 650 !important; font-size: calc(30px * var(--fs-d)) !important; line-height: 1.1 !important; }
html[data-style='pro'] .h2 { font-weight: 650 !important; font-size: calc(22px * var(--fs-d)) !important; line-height: 1.15 !important; }
html[data-style='pro'] .hero .daynum { font-weight: 650 !important; font-size: calc(26px * var(--fs-d)) !important; line-height: 1.1 !important; margin: 4px 0 8px; }
html[data-style='pro'] .hero .daynum small { font-size: calc(16px * var(--fs)) !important; font-weight: 500 !important; color: var(--muted); }
html[data-style='pro'] .session-card .title, html[data-style='pro'] .next-t { font-weight: 650 !important; font-size: calc(19px * var(--fs-d)) !important; line-height: 1.2 !important; }
html[data-style='pro'] .sheet h3 { font-weight: 650 !important; font-size: calc(20px * var(--fs-d)) !important; }
html[data-style='pro'] .eyebrow { letter-spacing: .06em; font-weight: 600; }
html[data-style='pro'] .btn { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: calc(14px * var(--fs)); box-shadow: none !important; }
html[data-style='pro'] .btn.gold { background: var(--accent); color: var(--accent-ink); }
html[data-style='pro'] .gold-edge { border-left-color: var(--line); }
html[data-style='pro'] .brand b { letter-spacing: .08em !important; font-weight: 600 !important; }
html[data-style='pro'] :is(.burst, .xp-pop, .xp-strip) { display: none !important; }
html[data-style='pro'] .fab { box-shadow: 0 6px 16px rgba(0,0,0,.3); }
/* The numbers grid on Today */
.pro-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 14px; }
.st-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 12px; min-height: 76px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; min-width: 0; }
.st-tile b { font-family: var(--sans); font-weight: 650; font-size: calc(19px * var(--fs)); line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tile .tiny { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tile.ok b { color: var(--gold); }
.st-tile:active { border-color: var(--accent); }
html[data-text='xl'] .pro-stats { grid-template-columns: repeat(2, 1fr); }
/* v1.19 · the quick log + in the nav bar (clients) and the header (coach) */
.nav-plus { flex: 0 0 64px; display: grid; place-items: center; border: 0; background: none; padding: 0; position: relative; }
.nav-plus svg { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); stroke-width: 2.4; box-shadow: 0 6px 18px rgba(0,0,0,.35); transform: translateY(-6px); }
.nav-plus:active svg { transform: translateY(-6px) scale(.94); }
.top-plus svg { stroke-width: 2.4; }
main.view { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px); }
/* v1.19 · the day line wraps instead of scrolling sideways, so nothing hides off the edge */
.day-line { flex-wrap: wrap; overflow: visible; }
.dl-i { max-width: 100%; }
.dl-i span { overflow: hidden; text-overflow: ellipsis; }
html[data-style='pro'] .dl-i b { font-family: var(--sans); }
/* v1.19 · plan meals: one line each, the foods one tap down */
details.meal-more { margin-top: 4px; }
details.meal-more > summary { list-style: none; display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
details.meal-more > summary::-webkit-details-marker { display: none; }
details.meal-more > summary .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.meal-more[open] > summary .grow { white-space: normal; }
.prog-row b { display: block; }
html[data-style='pro'] :is(.rep-xp, .pill.villain) { display: none !important; }
/* v1.19 · two- and three-digit days fit on one line; the wordmark never wraps */
html:not([data-type='classic']):not([data-style='pro']) .hero .daynum.long { font-size: clamp(60px, 18.5vw, 100px); }
.hero .daynum { white-space: nowrap; }
.top .brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top:has(.top-plus) .brand b { letter-spacing: .1em !important; font-size: min(calc(13px * var(--fs)), 14px) !important; }

/* ───────── v1.20 ───────── */
/* Level + morning report: one card */
.status-card { padding: 0; margin: 0 0 12px; overflow: hidden; }
.status-card > .xp-strip { margin: 0; border: 0; border-radius: 0; background: none; }
.status-card > .report-mini, .status-card > .report { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; border-top: 1px solid var(--line); padding: 11px 14px; width: 100%; }
.status-card > .report { padding: 14px; }
/* Setup after Day 3: one quiet line at the bottom */
details.onboard-fold.slim { margin: 14px 0 0; box-shadow: none; background: transparent; border: 1px dashed var(--line); }
details.onboard-fold.slim > summary { padding: 10px 14px; }
/* Renewal */
.renew-card { margin-bottom: 4px; }
.renew-card.sent { padding: 12px 14px; }
.renew-card .ic-ok { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--bg); flex: none; }
.renew-card .ic-ok svg { width: 16px; height: 16px; }
/* Launch checklist */
.launch-fold { box-shadow: inset 3px 0 0 var(--accent); }
.launch-list li { align-items: flex-start; gap: 12px; }
.launch-list li .obox { margin-top: 2px; flex: none; }
.launch-list li.done .small { color: var(--muted); }
.launch-list li .btn, .launch-list li .link-btn { flex: none; }
/* Public demo bar */
.pub-demo { display: flex; align-items: center; gap: 12px; padding: 8px 16px; font-size: calc(12px * var(--fs)); background: var(--surface); border-bottom: 1px solid var(--line-gold); color: var(--muted); }
.pub-demo a { color: var(--accent); font-weight: 600; text-decoration: none; }
/* Progress: numbers two to a row */
.prog-nums .num-list { grid-template-columns: 1fr 1fr; gap: 8px; }
.prog-nums .num-card { padding: 12px; margin: 0; display: flex; flex-direction: column; min-width: 0; }
.prog-nums .num-card > .row:first-child .small { font-size: calc(12.5px * var(--fs)); line-height: 1.25; }
.prog-nums .num-card > .row:last-child { flex-direction: column; align-items: stretch !important; gap: 4px !important; margin-top: auto !important; padding-top: 6px; }
.prog-nums .num-big { font-size: calc(21px * var(--fs-d)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.prog-nums .num-card svg.spark { width: 100%; height: 20px; display: block; }
.prog-nums .num-card .pill { font-size: 10px; padding: 1px 6px; }
@media (max-width: 340px) { .prog-nums .num-list { grid-template-columns: 1fr; } }
/* Logger: the finish step stays hidden until Finish */
.lg-finish[hidden] { display: none !important; }
.lg-finish { scroll-margin-top: 80px; }
.obj-fold > summary { font-size: calc(13px * var(--fs)); }
.lc-item > summary { list-style: none; cursor: pointer; }
.lc-item > summary::-webkit-details-marker { display: none; }
.lc-item > summary b { font-weight: 600; }
.lc-item[open] > summary b { color: var(--accent); }
.launch-list li { padding-top: 9px; padding-bottom: 9px; }
/* v1.20.1 · cheat places as tiles */
.place-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.place-tile { display: flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.place-tile b { font-size: calc(13.5px * var(--fs)); font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
.place-tile span { font-size: calc(11.5px * var(--fs)); color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-tile:active { border-color: var(--line-gold); }
.place-tile[hidden], .place-sec[hidden] { display: none; }
.seg.sm button { padding: 6px 9px; font-size: calc(12px * var(--fs)); }

/* ───────── v1.20.2 · desktop (Windows and Mac, installed or in the browser) ─────────
   Wide screens: the tab bar becomes a rail on the left, the page gets a little wider,
   sheets open as centred dialogs, and bars that sat above the tab bar sit at the bottom. */
@media (min-width: 960px) {
  :root { --nav-h: 0px; --rail: 228px; }
  body { padding-left: var(--rail); }
  #app { max-width: 700px; }
  main.view { padding-bottom: 48px; }
  .nav { top: 0; bottom: 0; right: auto; width: var(--rail); padding: 92px 14px 24px; border-top: 0; border-right: 1px solid var(--line); background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-in { flex-direction: column; height: auto; max-width: none; gap: 2px; }
  .nav-in > a { flex: none; min-width: 0; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; letter-spacing: .08em; }
  .nav a.on { background: var(--surface); }
  .nav a.on::before { top: 10px; bottom: 10px; left: 0; right: auto; width: 2px; height: auto; }
  .nav a .dot { top: 50%; right: 12px; margin-top: -3px; }
  .nav svg { width: 20px; height: 20px; flex: none; }
  /* Quick log: a full-width button at the top of the rail */
  .nav-plus { order: -1; flex: none; display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 700 12.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
  .nav-plus::after { content: 'Quick log'; }
  .nav-plus svg, .nav-plus:active svg { width: 18px; height: 18px; padding: 0; border-radius: 0; background: none; color: inherit; box-shadow: none; transform: none; }
  .top { padding-top: 18px; }
  /* Fixed bars and toasts line up with the page, not the whole window */
  .eat-bar { left: var(--rail); bottom: 0; }
  .fx-bar, #rest-bar { left: calc(var(--rail) + 12px); bottom: 14px; }
  .toast { left: calc(50% + var(--rail) / 2); bottom: 22px; }
  body:not(.has-fx) #rest-bar { top: 18px; }
  /* Sheets: centred dialogs */
  .sheet-wrap { align-items: center; padding: 24px; padding-left: calc(var(--rail) + 24px); }
  .sheet { border-radius: 18px; border-bottom: 1px solid var(--line); max-height: 86vh; padding-bottom: 24px; animation: fade .16s ease; }
  .pub-demo { border-radius: 0 0 12px 12px; }
}
/* Mouse and trackpad: hover feedback and quieter scrollbars */
@media (hover: hover) and (pointer: fine) {
  .card-link:hover, .set-row:hover, .place-tile:hover { border-color: var(--line-gold); }
  .btn:hover { filter: brightness(1.08); }
  .nav a:hover { color: var(--text); }
  .nav a.on:hover { color: var(--gold); }
  * { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--bg); }
  ::-webkit-scrollbar-track { background: transparent; }
}
/* ───────────── v1.20.3 · Filmed ticks and Footage to send (coach) ───────────── */
.set-head:has(+ .set-row.filmable), .set-row.filmable { grid-template-columns: 34px 1fr 1fr 40px 46px; }
.logger.focus .set-row.filmable { grid-template-columns: 30px 1fr 1fr 48px 60px; }
.film { flex: none; width: 40px; height: 44px; border-radius: 11px; border: 1px dashed var(--line); background: transparent; display: grid; place-items: center; color: var(--faint); padding: 0; }
.film svg { width: 18px; height: 18px; }
.film.on { border: 1px solid var(--gold); color: var(--gold); background: var(--gold-tint, transparent); }
.logger.focus .film { width: 48px; height: 56px; }
.foot-card { margin-bottom: 14px; }
.foot-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.foot-row { gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
