/* Dogyoga · design tokens
   Eucalyptus green for calm and action, a biscuit "fur" tone for the dog and
   warmth, on paper with a faint green tint. */
:root {
  --bg: #f2f4ee;
  --surface: #fbfcf8;
  --surface-2: #e7ece3;
  --ink: #1b2822;
  --muted: #5b6a62;
  --line: #d9e0d3;
  --accent: #2e6a55;
  --accent-strong: #235443;
  --accent-ink: #f3f8f4;
  --accent-soft: #dcebe3;
  --fur: #c98643;
  --fur-soft: #f5e6d4;
  --fur-ink: #7a4a1c;
  --warn: #a8502a;
  --warn-soft: #f6e2d8;
  --figure: #2e6a55;
  --figure-far: #9cc3b3;
  --dog: #c98643;
  --dog-far: #e2b98c;
  --mat: #cfd8c8;
  --halo-a: #e9f1ea;
  --halo-b: #f6ead9;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(27, 40, 34, 0.05), 0 8px 24px rgba(27, 40, 34, 0.07);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101612;
    --surface: #171f1a;
    --surface-2: #202a24;
    --ink: #e7eee9;
    --muted: #9aa9a0;
    --line: #29342d;
    --accent: #86c8ac;
    --accent-strong: #a3d8c1;
    --accent-ink: #0e1a14;
    --accent-soft: #1d3a2f;
    --fur: #e3ab70;
    --fur-soft: #3a2b1b;
    --fur-ink: #f0c797;
    --warn: #f0a07c;
    --warn-soft: #3a241b;
    --figure: #86c8ac;
    --figure-far: #3f6b5a;
    --dog: #e3ab70;
    --dog-far: #8a6644;
    --mat: #2c3830;
    --halo-a: #15251e;
    --halo-b: #20372d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #101612;
  --surface: #171f1a;
  --surface-2: #202a24;
  --ink: #e7eee9;
  --muted: #9aa9a0;
  --line: #29342d;
  --accent: #86c8ac;
  --accent-strong: #a3d8c1;
  --accent-ink: #0e1a14;
  --accent-soft: #1d3a2f;
  --fur: #e3ab70;
  --fur-soft: #3a2b1b;
  --fur-ink: #f0c797;
  --warn: #f0a07c;
  --warn-soft: #3a241b;
  --figure: #86c8ac;
  --figure-far: #3f6b5a;
  --dog: #e3ab70;
  --dog-far: #8a6644;
  --mat: #2c3830;
  --halo-a: #15251e;
  --halo-b: #20372d;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

/* ───────── Base ───────── */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}
body.immersive { padding-bottom: 0; }

h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0; }
a { color: inherit; }

.app { max-width: 560px; margin: 0 auto; padding: 20px 16px 28px; display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; line-height: 1.6; }
.hint { color: var(--muted); font-size: 0.86rem; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.grow { flex: 1; min-width: 0; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.icon { flex: none; display: block; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ───────── Buttons ───────── */

.btn {
  font: inherit; font-weight: 700; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 22px; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.big { padding: 16px 24px; font-size: 1.05rem; width: 100%; }
.row .btn.big { width: auto; }

.icon-btn {
  font: inherit; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--surface-2); color: var(--ink);
}
.icon-btn.play { width: 72px; height: 72px; background: var(--accent); color: var(--accent-ink); }

.text-link {
  font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--accent);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}

.pill-btn {
  font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
}

/* ───────── Choice controls ───────── */

/* Option cards: stacked, full width, with an optional hint line. */
.chips { display: flex; flex-direction: column; gap: 8px; }
.chips.inline { flex-direction: row; flex-wrap: wrap; }
.chips.grid { display: grid; grid-template-columns: 1fr 1fr; }
.chips.scroll { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }

.chip {
  font: inherit; font-weight: 650; font-size: 0.97rem; color: var(--ink); text-align: left; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.chip > .chip-label { grid-column: 2; }
.chip small { grid-column: 2; color: var(--muted); font-weight: 400; font-size: 0.84rem; }
.chip .chip-icon { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.chip.is-on { border-color: var(--accent); background: var(--accent-soft); }
.chip.is-on .chip-icon { background: var(--accent); color: var(--accent-ink); }
.chips.inline .chip, .chips.scroll .chip { display: inline-flex; gap: 6px; padding: 9px 14px; border-radius: 999px; }
.chips.inline .chip .chip-icon, .chips.scroll .chip .chip-icon { width: auto; height: auto; background: none; color: inherit; }
.chips.grid .chip { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 92px; padding: 12px; }
.chips.grid .chip .chip-icon { width: 32px; height: 32px; }
.chip-badge {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 999px; background: var(--fur-soft); color: var(--fur-ink);
}

/* Segmented control: equal-width options on one line. */
.seg { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.seg .chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 9px 4px; border: 0; border-radius: 12px; background: transparent; text-align: center;
  font-size: 0.93rem; position: relative; min-height: 44px;
}
.seg .chip .chip-icon { width: auto; height: auto; background: none; color: var(--muted); }
.seg .chip.is-on { background: var(--surface); box-shadow: var(--shadow); }
.seg .chip.is-on .chip-icon { background: none; color: var(--accent); }
.seg .rec-dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--fur); }
.control-note { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.control-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fur); flex: none; }

/* ───────── Forms ───────── */

.field { display: flex; flex-direction: column; gap: 8px; font-weight: 650; font-size: 0.95rem; }
input, select {
  font: inherit; font-weight: 400; width: 100%;
  padding: 13px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
}
input:focus, select:focus { border-color: var(--accent); outline: none; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px 16px; margin: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel legend, .panel-title { font-family: var(--display); font-weight: 650; font-size: 1.15rem; padding: 0; float: left; width: 100%; }
.panel legend + * { clear: both; }
.saved { color: var(--accent); font-weight: 700; text-align: center; display: flex; gap: 6px; justify-content: center; align-items: center; }

.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 0.93rem; }
.toggles .toggle { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .switch { width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background 0.2s; flex: none; margin-left: auto; }
.toggle .switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 0.2s; }
.toggle input:checked + .switch { background: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(16px); }
.toggle input:focus-visible + .switch { outline: 3px solid var(--accent); outline-offset: 2px; }
.toggle .icon { color: var(--muted); }

/* ───────── Onboarding & welcome ───────── */

.onboarding { min-height: calc(100vh - 48px); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.onboarding .step-count { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.dots { display: flex; gap: 6px; }
.dots span { height: 5px; flex: 1; border-radius: 3px; background: var(--line); }
.dots span.on { background: var(--accent); }
.onboarding .actions { display: flex; gap: 10px; margin-top: 4px; }

.welcome { text-align: center; align-items: center; gap: 14px; }
.welcome .hero { width: 100%; max-width: 380px; aspect-ratio: 2 / 1.15; position: relative; display: grid; place-items: center; margin-bottom: 6px; }
.welcome .hero .demo { position: relative; }
.welcome h1 { font-size: 2.8rem; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 10px; }
.welcome h1 .icon { color: var(--fur); }
.tagline { font-weight: 800; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.welcome .intro { color: var(--muted); max-width: 34ch; }
.welcome .btn.big { max-width: 360px; margin-top: 8px; }

/* ───────── Home ───────── */

.home-head { display: flex; flex-direction: column; gap: 6px; }
.home-head h1 { font-size: 1.75rem; }
.home-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-pill {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 0.9rem; font-weight: 650;
  padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
}
.meta-pill .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fur-soft); color: var(--fur); }
.meta-pill.streak .avatar { background: var(--fur-soft); color: var(--fur); }
.meta-pill small { color: var(--muted); font-weight: 500; font-size: 0.85rem; }

.week { display: flex; justify-content: space-between; list-style: none; padding: 12px 14px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.week li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.week i { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--fur); }
.week li.is-done i { background: var(--fur-soft); }
.week li.is-today span { color: var(--accent); }
.week li.is-today i { box-shadow: 0 0 0 2px var(--accent); }

.builder { display: flex; flex-direction: column; gap: 22px; padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.builder .group { display: flex; flex-direction: column; gap: 10px; }
.builder h2 { font-family: var(--font); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.cta-bar {
  position: sticky; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 5;
  display: flex; flex-direction: column; gap: 8px; align-items: stretch;
  padding: 14px 0 4px; margin-top: -8px;
  background: linear-gradient(to bottom, transparent, var(--bg) 26%);
}
.cta-summary { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.cta-bar .row { align-items: stretch; }

.first-steps { padding: 16px; border-radius: var(--radius); background: var(--accent-soft); display: flex; flex-direction: column; gap: 8px; }
.first-steps .row { justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.first-steps-note { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 650; }
.about-link { text-align: center; }

/* ───────── Page headers ───────── */

.page-head { display: flex; gap: 10px; align-items: flex-start; }
.page-head > div { display: flex; flex-direction: column; gap: 4px; }
.back { display: grid; place-items: center; width: 40px; height: 40px; margin: -4px 0 0 -8px; border-radius: 50%; text-decoration: none; color: var(--ink); flex: none; }

/* ───────── Session preview ───────── */

.tips { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.tips summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.tips summary::-webkit-details-marker { display: none; }
.tips summary .icon { color: var(--accent); }
.tips summary::after { content: '+'; margin-left: auto; color: var(--muted); font-weight: 700; }
.tips[open] summary::after { content: '–'; }
.tips ul { margin: 10px 0 0; padding-left: 20px; font-size: 0.93rem; display: flex; flex-direction: column; gap: 6px; }

.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.timeline .phase { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 10px 2px 0; }
.timeline .phase:first-child { margin-top: 0; }
.timeline-item {
  font: inherit; color: inherit; width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px 8px 8px;
}
.thumb { width: 76px; aspect-ratio: 2 / 1; border-radius: 10px; background: var(--surface-2); flex: none; overflow: hidden; display: grid; place-items: center; }
.thumb svg { width: 100%; height: auto; }
.thumb.mirrored svg { transform: scaleX(-1); }
.t-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.t-body strong { font-weight: 700; }
.t-body small { color: var(--muted); font-size: 0.84rem; }
.t-time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 650; font-size: 0.92rem; }

/* ───────── Player ───────── */

.player { min-height: calc(100vh - 48px); display: flex; flex-direction: column; gap: 16px; }
.player-top { display: flex; align-items: center; gap: 12px; }
.player-top .icon-btn { width: 40px; height: 40px; }
.progress { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.25s linear; }
.counter { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.88rem; font-weight: 650; }

.stage { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stage h1 { font-size: 1.6rem; margin-top: 2px; }
.clock { font-family: var(--display); font-size: 3rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 6px; }
.clock.setup { color: var(--fur); }
.clock-note { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.stage .pill-btn { margin-top: 10px; }

.breath { position: relative; width: 100%; max-width: 420px; aspect-ratio: 2 / 1; display: grid; place-items: center; margin: 2px 0 6px; }
.breath-ring {
  position: absolute; inset: -6% 4%; border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--halo-b) 0%, var(--halo-a) 52%, transparent 72%);
  animation: breathe 8s ease-in-out infinite;
}
.breath.paused .breath-ring { animation-play-state: paused; }
.breath-label { color: var(--accent); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.78rem; }
@keyframes breathe { 0%, 100% { transform: scale(0.82); } 50% { transform: scale(1); } }

.demo { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.demo.mirrored { transform: scaleX(-1); }
.demo-video { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.cue-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cues { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.cues li { color: var(--muted); transition: color 0.3s, opacity 0.3s; }
.cues li::marker { font-weight: 700; }
.cues li.now { color: var(--ink); font-weight: 650; }
.cues li.past { opacity: 0.55; }
.cues.static li { color: var(--ink); }
.dog-role { display: flex; gap: 10px; align-items: flex-start; padding-top: 12px; border-top: 1px dashed var(--line); }
.dog-role .icon { color: var(--fur); margin-top: 2px; }
.safety { display: flex; gap: 8px; align-items: flex-start; color: var(--warn); font-size: 0.9rem; }
.safety .icon { margin-top: 2px; }

.up-next { text-align: center; color: var(--muted); font-size: 0.9rem; }
.controls { display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: auto; padding-bottom: env(safe-area-inset-bottom, 0px); }

@media (prefers-reduced-motion: reduce) {
  .breath-ring { animation: none; transform: scale(0.92); }
}

/* ───────── Session complete ───────── */

.done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 16px; }
.done .hero { width: 100%; max-width: 380px; aspect-ratio: 2 / 1; position: relative; display: grid; place-items: center; }
.done h1 { font-size: 2rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 6px 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 6px; display: flex; flex-direction: column; gap: 2px; }
.stats strong { font-family: var(--display); font-size: 1.9rem; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.stats span { font-size: 0.8rem; color: var(--muted); }
.aftercare { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.93rem; }
.aftercare .icon { color: var(--accent); }

/* ───────── Exercises library ───────── */

.about-card {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 14px 16px; border-radius: var(--radius); background: var(--accent-soft);
}
.about-card .icon-wrap { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--accent); flex: none; }
.about-card div { flex: 1; display: flex; flex-direction: column; }
.about-card span { color: var(--muted); font-size: 0.9rem; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card {
  font: inherit; color: inherit; width: 100%; height: 100%; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 8px 12px;
}
.card .thumb { width: 100%; margin-bottom: 6px; }
.card strong { padding: 0 4px; font-weight: 700; line-height: 1.25; }
.card small { padding: 0 4px; color: var(--muted); font-size: 0.82rem; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding: 6px 4px 0; }
.badge { font-size: 0.72rem; font-weight: 650; background: var(--surface-2); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.cue { background: var(--fur-soft); color: var(--fur-ink); }
.cue-note { font-size: 0.9rem; color: var(--muted); }

.dialog {
  border: 0; padding: 0; background: var(--surface); color: var(--ink);
  width: min(560px, 100%); max-width: 100%; max-height: 90vh; margin: auto auto 0; border-radius: 24px 24px 0 0;
}
.dialog::backdrop { background: rgba(10, 18, 14, 0.5); }
@media (min-width: 600px) { .dialog { margin: auto; border-radius: 24px; } }
.sheet { padding: 14px 20px 28px; display: flex; flex-direction: column; gap: 12px; }
.sheet-top { display: flex; justify-content: flex-end; }
.sheet-top .icon-btn { width: 38px; height: 38px; }
.sheet-demo { aspect-ratio: 2 / 1; width: 100%; background: var(--bg); border-radius: var(--radius); }
.sheet h2 { font-size: 1.5rem; }
.sheet h3 { margin-top: 6px; }
.sheet .btn { margin-top: 8px; }
.sheet.confirm { gap: 20px; padding-top: 24px; }
.sheet.confirm .row { align-items: stretch; }

/* ───────── Profile ───────── */

.danger { align-items: flex-start; }
.voice-panel .row { align-items: flex-end; }

/* ───────── What is Doga? ───────── */

.about { display: flex; flex-direction: column; gap: 14px; max-width: 65ch; }
.about h2 { margin-top: 12px; }
.about ul, .about ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.about .names { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }

/* ───────── Pose illustrations ───────── */

.figure-scene { display: block; width: 100%; height: auto; overflow: visible; }
.figure-scene line { fill: none; }
.person-body, .person-limb { stroke: var(--figure); }
.person-far { stroke: var(--figure-far); }
.person-head { fill: var(--figure); }
.dog-body, .dog-limb, .dog-ear { stroke: var(--dog); }
.dog-far { stroke: var(--dog-far); }
.dog-head { fill: var(--dog); }
.dog-eye { fill: var(--surface); }
.fig-dog.behind { opacity: 0.85; }
.fig-mat { fill: var(--mat); }
.fig-wall { fill: var(--line); }

/* ───────── Navigation ───────── */

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center; gap: 6px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
}
.nav a {
  flex: 1; max-width: 160px; text-decoration: none; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 0.76rem; font-weight: 700; color: var(--muted); padding: 6px 4px; border-radius: 12px;
}
.nav a.is-active { color: var(--accent); background: var(--accent-soft); }

.progress-head { display: flex; flex-direction: column; gap: 8px; }
.title-block { display: flex; flex-direction: column; gap: 8px; }
.chip:not(:has(.chip-icon)) { grid-template-columns: 1fr auto; }
.chip:not(:has(.chip-icon)) > .chip-label, .chip:not(:has(.chip-icon)) > small { grid-column: 1; }
.chip:not(:has(.chip-icon)) > .chip-badge { grid-column: 2; grid-row: 1; }
.chip > .chip-badge { grid-column: 3; grid-row: 1; }

.field .hint { font-weight: 400; }
.seg .chip small { font-size: 0.7rem; font-weight: 600; color: var(--muted); line-height: 1; }
.seg .chip .chip-label { line-height: 1.15; }
.cta-main { flex-direction: column; gap: 2px; padding: 12px 24px; }
.cta-title { display: inline-flex; align-items: center; gap: 8px; }
.cta-main .cta-summary { display: block; color: inherit; font-size: 0.8rem; font-weight: 600; opacity: 0.85; }
.toggles .toggle { min-width: 0; }
.toggle-text { display: flex; flex-direction: column; min-width: 0; }
.toggle-text small { font-weight: 400; color: var(--muted); font-size: 0.84rem; }
.meta-line { color: var(--muted); font-size: 0.92rem; }

/* Log out */
.page-head .logout-top { margin-left: auto; min-height: 40px; padding: 8px 14px; font-size: .9rem; gap: 6px; }
.panel.danger [data-logout] { gap: 8px; }
.sheet.confirm p { margin: -8px 0 0; }

/* Log in / create account */
.auth .hero { max-width: 300px; }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; text-align: left; }
.auth-card .seg { width: 100%; }
.auth-card .field input { font-weight: 500; }
.form-error {
  margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.92rem;
  color: #9a2f23; background: #f9e3dd;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-error { color: #ffb8a8; background: #3a211c; } }
:root[data-theme="dark"] .form-error { color: #ffb8a8; background: #3a211c; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
a.btn { box-sizing: border-box; }

/* Admin dashboard */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.kpi-label .icon { color: var(--accent); flex: none; }
.kpi strong { font-family: var(--display); font-size: 2.6rem; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 0.82rem; }
.signups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.signups li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.signups li:first-child { border-top: 0; padding-top: 0; }
.signup-email { display: flex; flex-direction: column; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.signup-email small { color: var(--muted); font-weight: 500; }
.signup-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.plan { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.plan.is-paid { background: var(--accent-soft); color: var(--accent); }
.text-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 0; }
