/* Fynbos: a sticker album per language. Two instance themes share every component; only tokens differ.
   Tokens: --paper (ground), --page (album page), --ink/--ink-2, --line, --brand (actions), --accent (celebration),
   --slot (empty slot), --ok/--oops (answers, always with an icon), fonts --display/--text. */

@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson.woff2") format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson"; src: url("/fonts/atkinson-ext.woff2") format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage-ext.woff2") format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --text: "Atkinson", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-s: 10px; --r-m: 16px; --r-l: 22px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --tap: 52px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --oops: #9B2C5A; --oops-soft: #FBE6EF;
  --shadow-sticker: drop-shadow(0 1.5px 1.5px rgba(20, 30, 25, .22)) drop-shadow(0 6px 10px rgba(20, 30, 25, .14));
}

/* Pepík: fynbos green on sage paper, protea pink for celebration */
:root[data-theme="green"] {
  --display: "Bricolage", "Atkinson", ui-sans-serif, system-ui, sans-serif;
  --display-wght: 760;
  --paper: #EEF4EC; --page: #FFFFFF; --ink: #13231A; --ink-2: #46584D; --line: #D3E0D5;
  --brand: #17663C; --brand-press: #0D4627; --brand-soft: #DCEFE2; --brand-ink: #0F5130;
  --accent: #E2557E; --accent-soft: #FCE4EC; --accent-ink: #A3244C;
  --slot: #F3F7F2; --slot-line: #A9BFAF; --slot-num: #5E7E67; --ok: #17663C; --ok-soft: #DCEFE2;
  --sun: #F2B33D;
  --shadow-tint: 13, 70, 39;
}
/* Alík: apricot ground, deep orange actions, a brighter orange accent, sun yellow stars */
:root[data-theme="orange"] {
  --display: "Fredoka", "Atkinson", ui-rounded, system-ui, sans-serif;
  --display-wght: 600;
  --paper: #FFEBD9; --page: #FFFFFF; --ink: #2A1C14; --ink-2: #5E4636; --line: #F2D3BA;
  --brand: #C2410C; --brand-press: #8F2F08; --brand-soft: #FFE0C7; --brand-ink: #9A3412;
  --brand-fill: #FF8A3D;
  --accent: #E8590C; --accent-soft: #FFE3CF; --accent-ink: #9A3412;
  --slot: #FFF7F0; --slot-line: #E0AE86; --slot-num: #A65E28; --ok: #1E7F4E; --ok-soft: #DDF3E6;
  --sun: #FFB81C;
  --shadow-tint: 154, 52, 18;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink);
  font: 400 17px/1.5 var(--text); font-feature-settings: "kern"; overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--accent-soft); color: var(--ink); }
button, input, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-wght); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { display: inline-flex; width: 24px; height: 24px; flex: none; }
.ic svg { width: 100%; height: 100%; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 var(--s4); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s5); border-radius: var(--r-m); border: 0; cursor: pointer;
  font-weight: 700; font-size: 18px; text-decoration: none; user-select: none;
}
.btn-go {
  background: var(--brand); color: #fff;
  box-shadow: 0 1px 2px rgba(var(--shadow-tint), .25), 0 10px 18px -10px rgba(var(--shadow-tint), .7);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background-color .12s var(--ease);
}
.btn-go:active { transform: translateY(2px) scale(.99); background: var(--brand-press); box-shadow: 0 1px 2px rgba(var(--shadow-tint), .25); }
.btn-go[disabled] { opacity: .5; box-shadow: none; transform: none; }
.btn-quiet { background: var(--page); color: var(--brand-ink); border: 2px solid var(--line); }
.btn-quiet:active { background: var(--brand-soft); }
.btn-wide { width: 100%; }
.btn-start { min-height: 72px; font-size: 22px; font-family: var(--display); font-weight: var(--display-wght); border-radius: var(--r-l); }
.btn-start small { font-family: var(--text); font-weight: 400; font-size: 16px; opacity: .9; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2);
  display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn:active { background: var(--line); }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center;
  padding: calc(env(safe-area-inset-top) + var(--s2)) var(--s3) var(--s2); background: var(--paper);
}
.langs { justify-self: center; display: inline-flex; padding: 4px; gap: 4px; background: var(--page); border-radius: 999px; border: 1px solid var(--line); }
.langs button {
  border: 0; background: transparent; min-height: 40px; padding: 0 var(--s4); border-radius: 999px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.me-btn { width: 52px; height: 52px; padding: 0; border: 0; background: none; cursor: pointer; }
.me-btn img { width: 52px; height: 52px; object-fit: contain; filter: var(--shadow-sticker); }

/* ---------- home ---------- */
.home { display: flex; flex-direction: column; gap: var(--s5); padding-bottom: calc(210px + env(safe-area-inset-bottom)); }
.hello { display: flex; gap: var(--s3); align-items: flex-end; margin-top: var(--s2); }
.hello .bubble {
  position: relative; background: var(--page); border-radius: var(--r-m); padding: var(--s3) var(--s4); font-size: 17px;
  box-shadow: 0 1px 0 var(--line);
}
.home .page header { margin-bottom: var(--s3); }
.home .page h1 { font-size: 30px; }
.mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.mini .cell { aspect-ratio: 1; }
.mini .slot { border-width: 2px; border-radius: 10px; padding: 0; }
.mini .slot .n { font-size: 15px; }
.go-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: var(--s4) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 70%, transparent);
}
.go-dock .wrap { padding: 0; display: grid; gap: var(--s2); }
.rows { display: grid; gap: 2px; background: var(--line); border-radius: var(--r-m); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: var(--s3); min-height: 60px;
  padding: var(--s2) var(--s4); background: var(--page); border: 0; width: 100%; text-align: left; cursor: pointer; color: var(--ink);
}
.row:active { background: var(--brand-soft); }
.row .ic { color: var(--brand-ink); }
.row small { display: block; color: var(--ink-2); font-size: 15px; }
.row .chev { color: var(--ink-2); }

/* weather chip */
.wx {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4);
  background: var(--page); border-radius: var(--r-m); border: 1px solid var(--line); text-align: left; width: 100%; cursor: pointer; color: var(--ink);
}
.wx .sky { width: 44px; height: 44px; color: var(--brand-ink); }
.wx .t { font-family: var(--display); font-weight: var(--display-wght); font-size: 26px; }
.wx .say { font-weight: 700; }
.wx small { color: var(--ink-2); display: block; font-size: 14px; }
.wx .wind { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-size: 14px; font-weight: 700; }

/* ---------- album ---------- */
.album { display: grid; gap: var(--s5); padding-bottom: var(--s7); }
.page {
  background: var(--page); border-radius: var(--r-l); padding: var(--s5) var(--s4) var(--s5);
  box-shadow: 0 1px 2px rgba(var(--shadow-tint), .10), 0 14px 30px -18px rgba(var(--shadow-tint), .45);
}
.page header { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); align-items: start; margin-bottom: var(--s4); }
.page h2 { font-size: 24px; }
.page .en { color: var(--ink-2); font-size: 15px; }
.page .count { font-family: var(--display); font-weight: var(--display-wght); color: var(--brand-ink); font-size: 18px; white-space: nowrap; }
.page.locked .slot { opacity: .5; }
.page .soon { color: var(--ink-2); font-size: 15px; display: inline-flex; gap: 6px; align-items: center; margin-top: var(--s2); }
.page .badge { margin-top: var(--s3); display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--ok); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (min-width: 420px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.slot {
  position: relative; aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--slot-line); background: var(--slot);
  display: grid; place-items: center; text-align: center; padding: 6px; color: var(--ink-2);
}
.slot .n { font-family: var(--display); font-weight: var(--display-wght); font-size: 22px; color: var(--slot-num); line-height: 1; }
.slot .en { font-size: 12px; line-height: 1.2; margin-top: 4px; overflow-wrap: anywhere; }
.cell { position: relative; }
.cell .sticker { position: absolute; inset: 0; }
.slot.filled .n, .slot.filled .en { visibility: hidden; }

.sticker {
  position: relative; aspect-ratio: 1; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  filter: var(--shadow-sticker); transform: rotate(var(--tilt, 0deg)); -webkit-tap-highlight-color: transparent;
}
.sticker img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* gloss and holo follow the sticker's own silhouette: the art is its own mask */
.sticker.art::before, .sticker.holo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat;
}
.sticker.art::before { background: linear-gradient(140deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .08) 30%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .16) 100%); }
.sticker.lettering { display: grid; place-items: center; padding: 6px; container-type: inline-size; }
.sticker.lettering .word-art { width: 100%; height: 100%; overflow: visible; }
.sticker.lettering .word-art text {
  font-family: var(--display); font-weight: var(--display-wght); fill: var(--brand-ink);
  stroke: #fff; stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; paint-order: stroke fill;
}
.sticker.holo.lettering .word-art text { fill: var(--accent-ink); }
.sticker .word { font-family: var(--display); font-weight: var(--display-wght); font-size: 15px; line-height: 1.1; overflow-wrap: anywhere; color: var(--brand-ink); text-align: center; }
.sticker.holo::after {
  mix-blend-mode: color-dodge; background-size: 260% 260%; background-position: 0% 50%; transition: background-position .9s var(--ease);
  background-image: linear-gradient(115deg, transparent 15%, rgba(255, 105, 180, .55) 32%, rgba(120, 220, 255, .55) 47%, rgba(255, 236, 120, .55) 62%, transparent 80%);
}
.sticker.holo.lettering::after { display: none; }
.sticker.holo:active::after, .sticker.holo.shine::after { background-position: 100% 50%; }
.slotbox { display: grid; gap: 6px; align-content: start; }
.slot-label { font-size: 13px; line-height: 1.2; text-align: center; color: var(--ink-2); overflow-wrap: anywhere; min-height: 2.4em; }
.slot-label b { color: var(--ink); font-weight: 700; display: block; }

/* peel and stick: the session's one authored moment. The page with its numbered slots, a backing sheet below. */
.stick-stage { position: fixed; inset: 0; z-index: 30; background: var(--paper); display: grid; }
.stick-stage .head { padding: calc(env(safe-area-inset-top) + var(--s4)) var(--s4) var(--s2); text-align: center; }
.stick-stage .head h2 { font-size: 24px; }
.stick-stage .head p { text-wrap: pretty; }
.stick-stage { grid-template-rows: auto auto 1fr auto; }
.stick-stage .page-head {
  max-width: 560px; width: calc(100% - 2 * var(--s4)); margin: 0 auto; background: var(--page); border-radius: var(--r-l) var(--r-l) 0 0;
  padding: var(--s4) var(--s4) var(--s2); display: grid; grid-template-columns: 1fr auto; gap: var(--s2); align-items: start;
}
.stick-stage .page-head h2 { font-size: 24px; }
.stick-stage .page-head .en { color: var(--ink-2); font-size: 15px; }
.stick-stage .page-head .count { font-family: var(--display); font-weight: var(--display-wght); color: var(--brand-ink); font-size: 18px; transform-origin: right center; }
.stick-stage .stick-area .page { border-radius: 0 0 var(--r-l) var(--r-l); padding-top: var(--s2); }
.stick-stage .stick-area .page + .page { border-radius: var(--r-l); margin-top: var(--s3); }
.stick-stage .stick-area .page header { display: none; }
.stick-stage .stick-area .page + .page header { display: grid; }
.stick-stage .stick-area { padding: 0 var(--s4) var(--s3); overflow: auto; max-width: 560px; width: 100%; margin: 0 auto; display: grid; gap: var(--s4); align-content: start; }
.stick-stage .stick-foot { padding: var(--s3) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom)); max-width: 560px; width: 100%; margin: 0 auto; display: grid; gap: var(--s3); }
.backing {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: var(--s3); min-height: 80px; border-radius: 12px;
  background: var(--page); outline: 1px solid var(--line); outline-offset: -6px;
  box-shadow: 0 1px 2px rgba(var(--shadow-tint), .12), 0 10px 20px -14px rgba(var(--shadow-tint), .5);
}
.backing .peelable { width: 56px; }
.backing .ghost { width: 56px; aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--slot-line); opacity: .5; }
.slot.target { border-color: var(--accent); background: var(--accent-soft); }
.flying { position: fixed; z-index: 40; pointer-events: none; }

/* ---------- lesson ---------- */
.lesson { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background: var(--paper); }
.lesson .bar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: var(--s2); padding: calc(env(safe-area-inset-top) + var(--s2)) var(--s3) var(--s2); }
.progress { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 100%; background: var(--brand); border-radius: inherit; transform-origin: left center;
  transform: scaleX(var(--p, 0)); transition: transform .35s var(--ease); }
.lesson .helper-mini { width: 48px; height: 48px; border: 0; background: none; padding: 0; cursor: pointer; }
.lesson .helper-mini img { width: 48px; height: 48px; object-fit: contain; filter: var(--shadow-sticker); }
.stage { padding: var(--s3) var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s4); max-width: 560px; width: 100%; margin: 0 auto; }
.ask { font-size: 17px; color: var(--ink-2); font-weight: 700; }
.foot { padding: var(--s3) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom)); max-width: 560px; width: 100%; margin: 0 auto; display: grid; gap: var(--s2); }
.lesson .foot { position: sticky; bottom: 0; z-index: 4; background: linear-gradient(to top, var(--paper) 78%, transparent); padding-top: var(--s5); }
.lesson .foot:empty { display: none; }
.lesson .bar { position: sticky; top: 0; z-index: 4; background: var(--paper); }
@media (max-height: 760px) {
  .word-stage { padding: var(--s4) var(--s3); gap: var(--s2); }
  .word-stage .pic { width: min(44vw, 150px); }
  .word-stage .tw { font-size: clamp(30px, 9vw, 42px); }
  .opt { min-height: 52px; }
  .opt.pic { min-height: 104px; }
  .opt.pic img { width: 72px; height: 72px; }
}

/* the word stage: the big target word, tap to hear */
.word-stage {
  display: grid; justify-items: center; gap: var(--s3); padding: var(--s5) var(--s4); background: var(--page); border-radius: var(--r-l);
  text-align: center; border: 0; width: 100%; cursor: pointer; color: var(--ink);
}
.word-stage .pic { width: min(56vw, 220px); }
.word-stage .tw { font-family: var(--display); font-weight: var(--display-wght); font-size: clamp(34px, 10vw, 52px); line-height: 1.05; overflow-wrap: anywhere; }
.word-stage .tw.long { font-size: clamp(26px, 7vw, 36px); }
.word-stage .en { font-size: 19px; color: var(--ink-2); }
.word-stage .hear { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-ink); font-weight: 700; }
.word-stage.playing .hear { color: var(--accent-ink); }
.tip { display: flex; gap: var(--s2); align-items: flex-start; background: var(--accent-soft); color: var(--ink); border-radius: var(--r-m); padding: var(--s3) var(--s4); font-size: 16px; }
.tip .ic { color: var(--accent-ink); width: 22px; height: 22px; }

.opts { display: grid; gap: var(--s3); }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt {
  min-height: 60px; padding: var(--s3) var(--s4); border-radius: var(--r-m); background: var(--page); border: 2px solid var(--line);
  font-size: 19px; font-weight: 700; text-align: left; cursor: pointer; color: var(--ink); display: flex; align-items: center; gap: var(--s3);
}
.opt.pic { flex-direction: column; justify-content: center; text-align: center; padding: var(--s2); min-height: 120px; }
.opt.pic img { width: 92px; height: 92px; object-fit: contain; }
.opt:active { border-color: var(--brand); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--oops); background: var(--oops-soft); }
.opt .mark { margin-left: auto; }
.opt.pic .mark { margin: 0; }
.opt[disabled] { cursor: default; }

.sentence { font-family: var(--display); font-weight: var(--display-wght); font-size: 26px; line-height: 1.3; }
.sentence .gap { display: inline-block; min-width: 3.5em; border-bottom: 3px solid var(--brand); color: var(--brand-ink); text-align: center; }
.en-line { color: var(--ink-2); font-size: 17px; }

.tiles, .built { display: flex; flex-wrap: wrap; gap: var(--s2); min-height: 60px; }
.built { padding: var(--s3); border-radius: var(--r-m); background: var(--page); border: 2px dashed var(--line); align-content: flex-start; }
.tile {
  min-height: 48px; padding: 0 var(--s4); border-radius: 12px; border: 2px solid var(--line); background: var(--page); font-size: 19px; font-weight: 700;
  cursor: pointer; color: var(--ink); box-shadow: 0 1px 1px rgba(var(--shadow-tint), .08), 0 4px 10px -6px rgba(var(--shadow-tint), .35);
}
.tile.used { visibility: hidden; }
.field {
  width: 100%; min-height: var(--tap); padding: var(--s3) var(--s4); border-radius: var(--r-m); border: 2px solid var(--line); background: var(--page);
  font-size: 20px; caret-color: var(--brand);
}
.field:focus { outline: none; border-color: var(--brand); }
textarea.field { min-height: 140px; resize: vertical; line-height: 1.45; }
.accents { display: flex; gap: var(--s2); flex-wrap: wrap; }
.accents button { min-width: 48px; min-height: 44px; border-radius: 10px; border: 2px solid var(--line); background: var(--page); font-size: 19px; cursor: pointer; }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.match .col { display: grid; gap: var(--s2); align-content: start; }
.match .opt { min-height: 54px; font-size: 17px; justify-content: center; text-align: center; }
.match .opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.match .opt.done { opacity: .35; }

.result { border-radius: var(--r-m); padding: var(--s4); display: grid; gap: var(--s2); }
.result.ok { background: var(--ok-soft); }
.result.no { background: var(--oops-soft); }
.result .title { display: flex; align-items: center; gap: var(--s2); font-weight: 800; font-size: 19px; }
.result.ok .title { color: var(--ok); }
.result.no .title { color: var(--oops); }
.result .model { font-family: var(--display); font-weight: var(--display-wght); font-size: 21px; }

.note { background: var(--page); border-radius: var(--r-l); padding: var(--s5) var(--s4); display: grid; gap: var(--s3); }
.note h2 { font-size: 26px; }
.note table { border-collapse: collapse; width: 100%; font-size: 18px; }
.note td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.note td:first-child { font-weight: 700; color: var(--brand-ink); }
.ex { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) 0; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.ex b { font-size: 19px; }
.ex span { color: var(--ink-2); display: block; font-size: 15px; }
.ex .ic { color: var(--brand-ink); }

.dialogue { display: grid; gap: var(--s3); }
.line { max-width: 85%; padding: var(--s3) var(--s4); border-radius: 18px; background: var(--page); border: 0; text-align: left; cursor: pointer; color: var(--ink); }
.line.b { justify-self: end; background: var(--brand-soft); }
.line .who { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.line .t { font-size: 19px; font-weight: 700; display: block; }
.line .e { font-size: 15px; color: var(--ink-2); }

.rec { display: grid; justify-items: center; gap: var(--s3); }
.mic {
  width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 4px rgba(var(--shadow-tint), .3), 0 14px 24px -12px rgba(var(--shadow-tint), .8);
}
.mic .ic { width: 40px; height: 40px; }
.mic.on { background: var(--oops); box-shadow: 0 0 0 10px color-mix(in srgb, var(--oops) 20%, transparent); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); width: 100%; }

/* ---------- helper ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgba(15, 25, 20, .35); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--page); border-radius: var(--r-l) var(--r-l) 0 0;
  padding: var(--s5) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom)); max-height: 88dvh; overflow: auto; display: grid; gap: var(--s4);
  animation: rise .28s var(--ease);
}
@keyframes rise { from { transform: translateY(24px); opacity: .4; } }
.sheet .who { display: flex; gap: var(--s3); align-items: center; }
.sheet .who img { width: 64px; height: 64px; object-fit: contain; }
.sheet .say-it { background: var(--paper); border-radius: var(--r-m); padding: var(--s3) var(--s4); font-size: 18px; }
.sheet .ai-label { font-size: 13px; color: var(--ink-2); }

/* ---------- misc ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  background: var(--ink); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r-m); max-width: 90vw; font-weight: 700;
}
.empty { text-align: center; color: var(--ink-2); padding: var(--s7) var(--s4); display: grid; gap: var(--s3); justify-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.done-screen { display: grid; gap: var(--s4); justify-items: center; text-align: center; padding: var(--s6) var(--s4); }
.done-screen h1 { font-size: 34px; }
.done-screen .num { font-family: var(--display); color: var(--brand-ink); font-weight: 700; }
.done-screen .bubble { background: var(--page); border-radius: var(--r-m); padding: var(--s3) var(--s4); text-align: left; max-width: 34em; }
.page-helper { width: 120px; height: 120px; object-fit: contain; filter: var(--shadow-sticker); }
.cando { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); text-align: left; }
.cando li { display: flex; gap: var(--s2); align-items: flex-start; }
.cando .ic { color: var(--sun); flex: none; }
.parent { display: grid; gap: var(--s5); padding-bottom: var(--s7); }
.parent table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--page); border-radius: var(--r-m); overflow: hidden; }
.parent th, .parent td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.parent th { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.parent .num { font-variant-numeric: tabular-nums; }
.parent ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.login { min-height: 100dvh; display: grid; place-items: center; padding: var(--s5); }
.login form { width: min(100%, 380px); display: grid; gap: var(--s4); text-align: center; }
.login h1 { font-size: 36px; }
.login .err { color: var(--oops); font-weight: 700; min-height: 1.5em; }
.login img { width: 140px; height: 140px; object-fit: contain; justify-self: center; filter: var(--shadow-sticker); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
