/* Wedding German. Monochrome base, wedding-day colors, calm motion.
   Motion follows NN/g guidance: 100 to 500 ms, the shortest that isn't jarring. Reduced motion is respected. */
:root {
  --bg: #FFFFFF;
  --fill: #F4F4F5;
  --fill-2: #E9E9EC;
  --ink: #111111;
  --ink-2: #3A3A3C;
  --muted: #6E6E73;
  --line: #E4E4E7;
  --inv: #FFFFFF;
  --ok-bg: #E5F6EC; --ok-ink: #17663A; --ok-btn: #1F9D55;
  --bad-bg: #FCEBEB; --bad-ink: #A32D2D; --bad-btn: #D9443A;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.4, 0, .2, 1);
  --t1: 120ms; --t2: 200ms; --t3: 280ms; --t4: 450ms;
  --r: 16px;
  --nav-h: 60px;
  /* default hue = neutral */
  --c-tint: var(--fill); --c-soft: var(--fill-2); --c-mid: #888780; --c-strong: var(--ink); --c-ink: var(--ink); --c-on: var(--inv);
  color-scheme: light;
}
/* Wedding-day hues (light): tint 50, soft 100, mid 400, strong 600, ink 800 */
.hue-blue   { --c-tint: #E6F1FB; --c-soft: #B5D4F4; --c-mid: #378ADD; --c-strong: #185FA5; --c-ink: #0C447C; --c-on: #FFFFFF; }
.hue-pink   { --c-tint: #FBEAF0; --c-soft: #F4C0D1; --c-mid: #D4537E; --c-strong: #993556; --c-ink: #72243E; --c-on: #FFFFFF; }
.hue-teal   { --c-tint: #E1F5EE; --c-soft: #9FE1CB; --c-mid: #1D9E75; --c-strong: #0F6E56; --c-ink: #085041; --c-on: #FFFFFF; }
.hue-purple { --c-tint: #EEEDFE; --c-soft: #CECBF6; --c-mid: #7F77DD; --c-strong: #534AB7; --c-ink: #3C3489; --c-on: #FFFFFF; }
.hue-amber  { --c-tint: #FAEEDA; --c-soft: #FAC775; --c-mid: #BA7517; --c-strong: #854F0B; --c-ink: #633806; --c-on: #FFFFFF; }
.hue-gray   { --c-tint: #F1EFE8; --c-soft: #D3D1C7; --c-mid: #888780; --c-strong: #5F5E5A; --c-ink: #444441; --c-on: #FFFFFF; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B0C; --fill: #1C1C1E; --fill-2: #2C2C2E;
    --ink: #F5F5F7; --ink-2: #D1D1D6; --muted: #98989D; --line: #2A2A2D; --inv: #0B0B0C;
    --ok-bg: #0F2E1C; --ok-ink: #7FD9A1; --ok-btn: #2FB367;
    --bad-bg: #351616; --bad-ink: #F7A1A1; --bad-btn: #E5574D;
    color-scheme: dark;
  }
  /* dark: tint 900, soft 800, mid 400, strong 200, ink 50 */
  .hue-blue   { --c-tint: #0E2238; --c-soft: #0C447C; --c-strong: #85B7EB; --c-ink: #E6F1FB; --c-on: #042C53; }
  .hue-pink   { --c-tint: #2E1220; --c-soft: #72243E; --c-strong: #ED93B1; --c-ink: #FBEAF0; --c-on: #4B1528; }
  .hue-teal   { --c-tint: #0B2A22; --c-soft: #085041; --c-strong: #5DCAA5; --c-ink: #E1F5EE; --c-on: #04342C; }
  .hue-purple { --c-tint: #1C1940; --c-soft: #3C3489; --c-strong: #AFA9EC; --c-ink: #EEEDFE; --c-on: #26215C; }
  .hue-amber  { --c-tint: #2D1D07; --c-soft: #633806; --c-strong: #EF9F27; --c-ink: #FAEEDA; --c-on: #412402; }
  .hue-gray   { --c-tint: #232321; --c-soft: #444441; --c-strong: #B4B2A9; --c-ink: #F1EFE8; --c-on: #2C2C2A; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.45 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -.025em; }
h1 { font-size: 2.1rem; font-weight: 700; line-height: 1.1; }
h1.sm { font-size: 1.15rem; letter-spacing: -.01em; font-weight: 600; }
h2 { font-size: 1.3rem; font-weight: 650; line-height: 1.2; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.ic { width: 22px; height: 22px; flex: none; }
.ic.xs { width: 14px; height: 14px; }
.flame { color: #D85A30; fill: currentColor; stroke: none; width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.label { display: inline-block; font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.eyebrow { font-size: .8rem; font-weight: 600; color: var(--muted); }
.notice { background: var(--fill); border-radius: 12px; padding: 12px 14px; font-size: .9rem; color: var(--ink-2); }
.notice-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; background: var(--fill); color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 550; }
.notice-link span { flex: 1; }
.notice-link .ic { width: 18px; height: 18px; }
.dot-c { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-mid); margin-right: 8px; vertical-align: 1px; flex: none; }

/* ── Layout ─────────────────────────────────────────────── */
#app { min-height: 100dvh; }
.screen {
  max-width: 560px; margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 20px;
}
.screen-session, .screen-speed { min-height: 100dvh; padding-bottom: calc(150px + env(safe-area-inset-bottom)); gap: 0; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.top .eyebrow { margin-bottom: 4px; }
.top .eyebrow::first-letter { text-transform: uppercase; }
.top.sticky {
  position: sticky; top: 0; z-index: 5; flex-direction: column; align-items: stretch; gap: 12px;
  margin: calc(-20px - env(safe-area-inset-top)) -20px 0;
  padding: calc(16px + env(safe-area-inset-top)) 20px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: .5px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spacer { width: 44px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 22px; border-radius: 14px; border: 0;
  font-weight: 650; font-size: 1.02rem; text-decoration: none; background: var(--fill); color: var(--ink);
  transition: transform var(--t1) var(--ease), opacity var(--t2) var(--ease-io), background var(--t2) var(--ease-io);
}
.btn.primary { background: var(--ink); color: var(--inv); }
.btn.secondary { background: var(--fill); color: var(--ink); }
.btn.quiet { background: transparent; color: var(--muted); padding: 0 12px; }
.btn.wide { width: 100%; }
.btn:disabled { background: var(--fill-2); color: var(--muted); cursor: default; }
.btn:active:not(:disabled), .pill-btn:active, .tile:active:not(:disabled), .option:active:not(:disabled), .rate:active, .phrase-main:active, .list-row:active, .choice:active, .chip:active, .icon-btn:active, .play-circle:active, .mic:active {
  transform: scale(.97);
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--fill);
  display: inline-grid; place-items: center; color: var(--ink); text-decoration: none; flex: none;
  transition: transform var(--t1) var(--ease), background var(--t2) var(--ease-io);
}
.icon-btn.bare { background: transparent; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 0; background: var(--c-tint); color: var(--c-ink); font-weight: 600; font-size: .92rem;
  transition: transform var(--t1) var(--ease), background var(--t2) var(--ease-io);
}
.pill-btn .ic { width: 18px; height: 18px; }
.pill-btn.quiet { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.pill-btn.on .ic { fill: currentColor; }
.pill-btn.playing { background: var(--c-strong); color: var(--c-on); }
.pill-btn.recording { background: var(--bad-btn); color: #fff; }
.pill-btn.recording .ic { animation: breathe 1.2s var(--ease-io) infinite; }
.play-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.text-btn { background: none; border: 0; padding: 0 4px; font-weight: 600; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.text-btn.quiet { color: var(--muted); font-size: .95rem; }
.text-btn.danger { color: var(--bad-btn); }
.link-inline { background: none; border: 0; padding: 0; color: inherit; font: inherit; }
.file { position: relative; overflow: hidden; cursor: pointer; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* segmented control */
.seg { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 2px; flex: none; }
.seg button {
  border: 0; background: transparent; min-height: 36px; min-width: 44px; padding: 0 12px; border-radius: 8px;
  font-weight: 550; font-size: .88rem; color: var(--muted);
  transition: background var(--t2) var(--ease-io), color var(--t2) var(--ease-io), box-shadow var(--t2) var(--ease-io);
}
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { background: var(--fill-2); } }
.seg.compact { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.seg.compact button { min-height: 30px; padding: 0 10px; font-size: .8rem; }

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px);
  border-top: .5px solid var(--line);
  view-transition-name: nav;
}
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 550; transition: color var(--t2) var(--ease-io); }
.nav-item .ic { width: 24px; height: 24px; }
.nav-item.active { color: var(--ink); }
.nav-item.active .ic { stroke-width: 2.1; }

/* ── Onboarding ─────────────────────────────────────────── */
.onboarding { min-height: 100dvh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); justify-content: space-between; }
.dots { display: flex; gap: 6px; padding-top: 8px; }
.dots span { flex: 1; height: 4px; border-radius: 99px; background: var(--fill-2); transition: background var(--t3) var(--ease-io); }
.dots span.on { background: var(--ink); }
.ob-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.ob-body h1 { font-size: 2.4rem; }
.lead { font-size: 1.1rem; color: var(--muted); line-height: 1.5; }
.ob-phrases { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-family: var(--display); font-weight: 650; font-size: 1.25rem; letter-spacing: -.02em; }
.ob-phrases span { background: var(--c-tint); color: var(--c-ink); padding: 8px 14px; border-radius: 14px; animation: rise var(--t4) var(--ease) both; }
.ob-phrases span:nth-child(2) { animation-delay: 90ms; align-self: flex-end; }
.ob-phrases span:nth-child(3) { animation-delay: 180ms; }
.compare { display: grid; gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.compare > div { background: var(--bg); padding: 16px; }
.compare > div + div { background: var(--fill); }
.compare .de { margin-top: 4px; }
.ob-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ob-actions .btn.primary { min-width: 160px; }
.choice-list { display: grid; gap: 8px; }
.choice {
  display: flex; justify-content: space-between; align-items: center; text-align: left;
  min-height: 56px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--fill); font-weight: 550;
  transition: transform var(--t1) var(--ease), background var(--t2) var(--ease-io), color var(--t2) var(--ease-io);
}
.choice .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); transition: border var(--t2) var(--ease-io); }
.choice[aria-checked="true"] { background: var(--ink); color: var(--inv); }
.choice[aria-checked="true"] .radio { border: 6px solid var(--inv); }

/* ── Today ──────────────────────────────────────────────── */
.hero { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px 0 0; text-align: center; }
.hero-text { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ring { position: relative; width: 176px; height: 176px; }
.ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring > svg circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--fill-2); }
.ring .arc { stroke-linecap: round; }
.ring-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-inner strong { font-family: var(--display); font-size: 3.1rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-inner span { color: var(--muted); font-size: .85rem; font-weight: 550; }
.ring-check { width: 44px; height: 44px; stroke-width: 2; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cat-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; background: var(--c-tint); color: var(--c-ink); font-size: .85rem; font-weight: 600; }
.meta-line { text-align: center; color: var(--muted); font-size: .9rem; margin-top: -4px; }
.list { list-style: none; margin: 0; padding: 0; border-top: .5px solid var(--line); }
.list li { border-bottom: .5px solid var(--line); }
.list-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 2px; border: 0; background: none; text-align: left; transition: transform var(--t1) var(--ease); }
.lr-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--c-tint); color: var(--c-strong); flex: none; }
.lr-ic .ic { width: 19px; height: 19px; }
.lr-text { flex: 1; display: flex; flex-direction: column; }
.lr-text strong { font-weight: 600; }
.lr-text span { color: var(--muted); font-size: .88rem; }
.chev { width: 18px; height: 18px; color: var(--muted); }
.link-row { display: flex; align-items: center; justify-content: space-between; border: 0; background: none; padding: 8px 2px; color: var(--muted); font-weight: 550; font-size: .95rem; min-height: 44px; }

/* ── Session: prompt zone, body, bottom action bar ──────── */
.prompt-zone {
  margin: calc(-20px - env(safe-area-inset-top)) -20px 0;
  padding: calc(14px + env(safe-area-inset-top)) 20px 26px;
  background: var(--c-tint); color: var(--c-ink);
  display: flex; flex-direction: column; gap: 8px;
  transition: background var(--t3) var(--ease-io);
}
.session-top { display: flex; align-items: center; gap: 10px; margin: 0 -8px 10px -10px; min-height: 44px; }
.session-top .icon-btn { color: var(--c-ink); }
.pbar { flex: 1; height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--c-soft) 70%, transparent); overflow: hidden; }
.pbar span { display: block; height: 100%; border-radius: inherit; background: var(--c-strong); transition: width 380ms var(--ease); }
.pbar.timer span { transition: width 200ms linear; background: var(--ink); }
.screen-speed .pbar { background: var(--fill-2); }
.timer-num { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 2ch; text-align: right; color: var(--muted); }
.tag { font-size: .82rem; font-weight: 650; color: var(--c-strong); }
.prompt { font-size: 1.95rem; line-height: 1.15; color: var(--c-ink); }
.prompt-sub { color: var(--c-strong); font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reg-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--bg); color: var(--c-ink); }
.study { flex: 1; display: flex; flex-direction: column; }
.body { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; }
.body.enter { animation: enter var(--t3) var(--ease) both; }
.de { font-family: var(--display); font-weight: 650; letter-spacing: -.02em; }
.de.xl { font-size: 2rem; line-height: 1.15; }
.de.lg { font-size: 1.5rem; line-height: 1.2; }
.de.md { font-size: 1.2rem; line-height: 1.3; }
.hit { color: inherit; }
.miss { opacity: .55; text-decoration: underline wavy var(--bad-btn); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.alt { color: var(--muted); }
.hint { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--c-ink); background: var(--c-tint); padding: 10px 12px; border-radius: 12px; }
.hint .ic { width: 16px; height: 16px; color: var(--c-strong); }
.note { font-size: .9rem; color: var(--muted); padding-left: 12px; border-left: 2px solid var(--c-mid); border-radius: 0; }
.instruction { color: var(--muted); }

.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
}
.action-inner { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.action-bar.result { border-top: 0; animation: sheet-up var(--t3) var(--ease); }
.action-bar.result .action-inner { gap: 10px; }
.action-bar.ok { background: var(--ok-bg); color: var(--ok-ink); }
.action-bar.bad { background: var(--bad-bg); color: var(--bad-ink); }
.action-bar.neutral { background: var(--c-tint); color: var(--c-ink); }
.action-bar.ok .btn { background: var(--ok-btn); color: #fff; }
.action-bar.bad .btn { background: var(--bad-btn); color: #fff; }
.res-head { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.res-head strong { flex: 1; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
.res-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: currentColor; }
.res-icon .ic { width: 18px; height: 18px; stroke-width: 2.6; color: var(--bg); }
.action-bar.neutral .res-icon { background: var(--c-strong); }
.res-play { color: inherit; }
.res-de { font-family: var(--display); font-weight: 650; font-size: 1.25rem; line-height: 1.25; letter-spacing: -.015em; }
.res-heard, .res-hint { font-size: .9rem; opacity: .85; }
.rate-q { font-size: .85rem; font-weight: 600; opacity: .85; }
.ratings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rate {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 60px; padding: 6px 4px; border-radius: 14px; border: 0; background: var(--bg); color: var(--ink);
  box-shadow: 0 2px 0 color-mix(in srgb, currentColor 14%, transparent);
  transition: transform var(--t1) var(--ease), box-shadow var(--t2) var(--ease-io);
}
.rate strong { font-size: .84rem; font-weight: 650; line-height: 1.15; text-align: center; }
.rate span { font-size: .72rem; color: var(--muted); }
.rate:first-child strong { color: var(--bad-ink); }
.rate.suggest { box-shadow: inset 0 0 0 2px currentColor; }
.action-bar.ok .rate.suggest { color: var(--ok-ink); }

/* listening */
.big-play { display: flex; justify-content: center; align-items: flex-end; gap: 14px; padding: 10px 0 6px; }
.play-circle {
  width: 104px; height: 104px; border-radius: 28px; border: 0; background: var(--c-strong); color: var(--c-on);
  display: grid; place-items: center; transition: transform var(--t1) var(--ease);
  box-shadow: 0 4px 0 var(--c-ink);
}
.play-circle .ic { width: 40px; height: 40px; }
.play-circle.small { width: 64px; height: 64px; border-radius: 20px; background: var(--c-tint); color: var(--c-strong); box-shadow: 0 3px 0 var(--c-soft); }
.play-circle.small .ic { width: 26px; height: 26px; }
.play-circle.playing { animation: ring-pulse 1.4s var(--ease-io) infinite; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px; text-align: left;
  min-height: 58px; padding: 10px 14px; border-radius: 16px; border: 0; background: var(--bg); font-weight: 500;
  box-shadow: inset 0 0 0 2px var(--line), 0 2px 0 var(--line);
  transition: transform var(--t1) var(--ease), background var(--t2) var(--ease-io), box-shadow var(--t2) var(--ease-io), opacity var(--t2) var(--ease-io);
}
.option .num { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: .8rem; font-weight: 650; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.option.selected { background: var(--c-tint); box-shadow: inset 0 0 0 2px var(--c-mid), 0 2px 0 var(--c-mid); color: var(--c-ink); }
.option.selected .num { color: var(--c-strong); box-shadow: inset 0 0 0 1.5px var(--c-mid); }
.option:disabled { cursor: default; color: var(--ink); }
.option.right { background: var(--ok-bg); color: var(--ok-ink); box-shadow: inset 0 0 0 2px var(--ok-btn); }
.option.wrong { background: var(--bad-bg); color: var(--bad-ink); box-shadow: inset 0 0 0 2px var(--bad-btn); animation: shake 320ms var(--ease-io); }
.option.dim { opacity: .45; }

/* voice */
.voice { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 6px; }
.voice.big { padding-top: 40px; }
.mic {
  position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--c-tint); color: var(--c-strong);
  display: grid; place-items: center; transition: transform var(--t1) var(--ease), background var(--t2) var(--ease-io), color var(--t2) var(--ease-io);
}
.voice.big .mic { width: 112px; height: 112px; }
.mic .ic { width: 32px; height: 32px; }
.mic.listening { background: var(--c-strong); color: var(--c-on); }
.mic.listening::before, .mic.listening::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--c-mid);
  animation: halo 1.6s var(--ease-io) infinite; opacity: 0;
}
.mic.listening::after { animation-delay: .8s; }
.mic-label { color: var(--muted); font-size: .95rem; min-height: 1.4em; text-align: center; max-width: 30ch; }

/* build */
.answer-line {
  display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start;
  min-height: 124px; padding: 8px 0;
  background-image: linear-gradient(transparent 55px, var(--line) 55px, var(--line) 56px, transparent 56px);
  background-size: 100% 62px;
}
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-top: 18px; }
.tile {
  min-height: 48px; padding: 0 16px; border-radius: 14px; border: 0;
  background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 2px 0 var(--line);
  font-family: var(--display); font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em;
  transition: transform var(--t1) var(--ease), background var(--t2) var(--ease-io), box-shadow var(--t2) var(--ease-io);
}
.tile.in { animation: pop var(--t2) var(--ease) both; background: var(--c-strong); color: var(--c-on); box-shadow: 0 2px 0 var(--c-ink); }
.tile.used { color: transparent; background: var(--fill); box-shadow: none; pointer-events: none; }
.tile:disabled { cursor: default; }

/* done */
.done-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding-top: 30px; }
.done-ring .ring { width: 148px; height: 148px; }
.draw-check { width: 46px; height: 46px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw var(--t3) var(--ease) 520ms forwards; }
.done-screen h1 { animation: rise var(--t3) var(--ease) 300ms both; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 6px; }
.stat { border-radius: 16px; overflow: hidden; background: var(--c-strong); padding: 2px; display: flex; flex-direction: column; animation: rise var(--t3) var(--ease) both; }
.stat:nth-child(1) { animation-delay: 380ms; } .stat:nth-child(2) { animation-delay: 440ms; } .stat:nth-child(3) { animation-delay: 500ms; }
.stat span { color: var(--c-on); font-size: .75rem; font-weight: 700; padding: 5px 0 4px; }
.stat strong { background: var(--bg); border-radius: 14px; padding: 12px 4px; font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--c-strong); font-variant-numeric: tabular-nums; }
.big-num { font-family: var(--display); font-weight: 700; font-size: 5rem; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.speed-wrap { display: contents; }
.speed-card { padding-top: 22px; gap: 14px; cursor: pointer; }
.speed-card .prompt { color: var(--ink); }
.reveal { animation: rise var(--t3) var(--ease) both; }

/* ── On the day / phrases ───────────────────────────────── */
.search { display: flex; align-items: center; gap: 8px; background: var(--fill); border-radius: 12px; padding: 0 12px; }
.search .ic { color: var(--muted); width: 18px; height: 18px; }
.search input { flex: 1; border: 0; background: transparent; min-height: 42px; outline: none; font-size: 1rem; }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 0;
  min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--fill);
  font-weight: 600; font-size: .88rem; white-space: nowrap; color: var(--ink-2);
  transition: transform var(--t1) var(--ease), background var(--t2) var(--ease-io), color var(--t2) var(--ease-io);
}
.chip .ic { fill: currentColor; margin-right: 6px; }
.chip.on { background: var(--c-strong); color: var(--c-on); }
.chip.on .dot-c { background: var(--c-on); }
.phrase-list { list-style: none; margin: 0; padding: 0; }
.phrase { display: flex; align-items: center; gap: 4px; border-bottom: .5px solid var(--line); }
.phrase-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 16px 0; border: 0; background: none; position: relative;
  transition: transform var(--t1) var(--ease), opacity var(--t2) var(--ease-io);
}
.phrase-main .de { font-size: 1.25rem; line-height: 1.25; }
#phrList .phrase-main .de { font-size: 1.05rem; }
.sub { color: var(--muted); font-size: .9rem; }
.wave { position: absolute; right: 0; top: 18px; display: flex; gap: 2px; align-items: flex-end; height: 14px; opacity: 0; transition: opacity var(--t2) var(--ease-io); }
.wave i { width: 3px; height: 100%; background: var(--c-mid); border-radius: 2px; transform-origin: bottom; }
.phrase-main.playing .de { color: var(--c-strong); }
.phrase-main.playing .wave { opacity: 1; }
.phrase-main.playing .wave i { animation: eq 700ms var(--ease-io) infinite alternate; }
.phrase-main.playing .wave i:nth-child(2) { animation-delay: -250ms; }
.phrase-main.playing .wave i:nth-child(3) { animation-delay: -500ms; }
.phrase-main.playing { padding-right: 18px; }
.phrase-actions { display: flex; flex-direction: column; }
.phrase-actions .icon-btn { color: var(--muted); }
.fav.on { color: #EF9F27 !important; }
.fav.on .ic { fill: currentColor; }
.empty { padding: 24px 0; text-align: center; }
.group { display: flex; flex-direction: column; }
.group-title { font-family: var(--font); font-size: .85rem; font-weight: 650; color: var(--muted); display: flex; gap: 0; align-items: center; margin: 18px 0 2px; }
.group-title span { font-weight: 500; margin-left: 8px; }
.group .group-title { color: var(--c-strong); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin: 0 6px; display: inline-block; }
.dot.new { box-shadow: inset 0 0 0 1.5px var(--fill-2); }
.dot.learning { background: var(--muted); }
.dot.learned { background: var(--ok-btn); }
.status { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: .88rem; }

/* show the couple */
#overlay { position: fixed; inset: 0; z-index: 50; }
.show {
  position: absolute; inset: 0; background: var(--c-tint); color: var(--c-ink); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 40px; padding: 24px; text-align: center; animation: fade var(--t2) var(--ease-io);
}
.show .close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; color: var(--c-ink); }
.show-de { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; font-size: clamp(2.6rem, 12vw, 5rem); line-height: 1.08; max-width: 14ch; animation: rise var(--t4) var(--ease) both; }

/* sheet */
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .32); animation: fade var(--t2) var(--ease-io); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 88dvh; overflow: auto;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px; animation: sheet-up var(--t3) var(--ease);
}
.grabber { width: 36px; height: 5px; border-radius: 99px; background: var(--fill-2); margin: 0 auto 6px; }
.sheet-close { position: absolute; top: 10px; right: 10px; color: var(--muted); }
.sheet h2 { padding-right: 40px; display: flex; align-items: center; gap: 8px; }
.forms { display: grid; gap: 14px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; border-top: .5px solid var(--line); margin-top: 4px; padding-top: 14px; }
.how { margin: 0; padding-left: 20px; display: grid; gap: 12px; color: var(--ink-2); }

/* ── Progress ───────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpis div { background: var(--c-tint); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 2px; animation: rise var(--t3) var(--ease) both; }
.kpis div:nth-child(2) { animation-delay: 50ms; } .kpis div:nth-child(3) { animation-delay: 100ms; } .kpis div:nth-child(4) { animation-delay: 150ms; }
.kpis strong { font-family: var(--display); font-size: 2.2rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--c-strong); font-variant-numeric: tabular-nums; }
.kpis span { color: var(--c-ink); font-size: .85rem; font-weight: 550; }
.block { display: flex; flex-direction: column; gap: 10px; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; align-items: end; height: 84px; }
.bars span { height: var(--h); background: var(--ink); border-radius: 4px; animation: grow var(--t4) var(--ease) both; transform-origin: bottom; }
.bars span.zero { background: var(--fill-2); }
.bars span.today { background: #1D9E75; }
.cat-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.cat-row { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 6px; }
.meter { display: flex; height: 8px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.meter span { width: var(--w); transform-origin: left; animation: grow-x var(--t4) var(--ease) both; }
.meter .l { background: var(--c-mid); }
.meter .s { background: var(--c-soft); }

/* ── Settings ───────────────────────────────────────────── */
.settings { list-style: none; margin: 0; padding: 0; border-top: .5px solid var(--line); }
.settings li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: .5px solid var(--line); }
.settings li.stacked { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 12px 0; }
.settings select { min-height: 44px; border-radius: 10px; border: 0; background: var(--fill); padding: 0 10px; }

/* ── Motion ─────────────────────────────────────────────── */
@keyframes enter { from { opacity: 0; transform: translateX(18px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes breathe { 50% { opacity: .4; } }
@keyframes halo { 0% { transform: scale(.9); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes ring-pulse { 0% { box-shadow: 0 4px 0 var(--c-ink), 0 0 0 0 color-mix(in srgb, var(--c-mid) 40%, transparent); } 100% { box-shadow: 0 4px 0 var(--c-ink), 0 0 0 18px transparent; } }
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; animation-timing-function: var(--ease-io); }

@media (min-width: 720px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .draw-check { stroke-dashoffset: 0; }
}
