/* Who & When — styles.
   Design tokens come from CLAUDE.md. Light is the default; dark mode swaps
   the same variables. Every screen uses only these variables for colour. */

:root {
  /* Page */
  --bg: #FFFBF2;
  --surface: #FFFFFF;
  --text: #2C2C2A;
  --muted: #6B6A64;
  --line: #E8E3D6;
  --shadow: 0 2px 0 rgba(60, 50, 20, .08), 0 6px 18px rgba(60, 50, 20, .08);

  /* Meanings */
  --now-bg: #FAEEDA;    --now-fg: #854F0B;
  --before-bg: #EEEDFE; --before-fg: #534AB7;
  --later-bg: #E1F5EE;  --later-fg: #0F6E56;
  --have-bg: #FBEAF0;   --have-fg: #993556;
  --hl-bg: #FAC775;     --hl-fg: #412402;

  /* Type */
  --font-read: 'Andika', system-ui, sans-serif;  /* sentences a child reads */
  --font-ui: 'Baloo 2', system-ui, sans-serif;   /* headings and buttons */
  --sentence: 24px;
  --tap: 56px;
  --radius: 22px;
  --gutter: 16px;
}

@media (min-width: 700px) {
  :root { --sentence: 30px; --gutter: 24px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F1E1B;
    --surface: #2B2A26;
    --text: #F2EFE6;
    --muted: #B5B2A8;
    --line: #45423B;
    --shadow: 0 2px 0 rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .3);

    --now-bg: #633806;    --now-fg: #FAC775;
    --before-bg: #3C3489; --before-fg: #CECBF6;
    --later-bg: #085041;  --later-fg: #9FE1CB;
    --have-bg: #72243E;   --have-fg: #F4C0D1;
    --hl-bg: #854F0B;     --hl-fg: #FAEEDA;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.35;
  /* No accidental text selection or iOS callouts while tapping. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 980px;
  margin: 0 auto;
  padding:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(var(--gutter), env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

button, a { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { text-decoration: none; }
:focus-visible { outline: 3px solid var(--before-fg); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-ui); margin: 0; line-height: 1.1; }

.sentence { font-family: var(--font-read); font-size: var(--sentence); line-height: 1.3; }

.icon { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; }
.icon svg { width: 100%; height: 100%; }

.loading { font-size: 64px; text-align: center; margin-top: 30vh; }

.screen { display: flex; flex-direction: column; gap: 20px; }
.screen.center { align-items: center; text-align: center; padding-top: 10vh; position: relative; }
.screen.center .back { position: absolute; top: 0; left: 0; }
.note { color: var(--muted); }

/* ---------- Shared bits ---------- */

/* Round icon button (back, speaker, etc.). */
.round-btn {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 26px;
  flex: none;
}

/* Anything tap-to-hear. While it's being read aloud it glows. */
.sayable { cursor: pointer; }
.sayable .speaker { width: .8em; height: .8em; margin-left: .3em; opacity: .55; vertical-align: -0.05em; }
.round-btn.sayable .speaker { width: 1.1em; height: 1.1em; margin: 0; opacity: .8; }
.speaking { box-shadow: 0 0 0 4px var(--hl-bg) !important; border-radius: 14px; }
.no-speech .speaker, .no-speech .card-say { display: none !important; }

/* Pressed feel on everything tappable. */
.station, .pack-card, .round-btn, .mimi, .grownups-btn {
  transition: transform .12s ease;
}
.station:active, .pack-card:active, .round-btn:active, .mimi:active { transform: scale(.96); }

/* Mimi the cat. */
.mimi { font-size: 44px; line-height: 1; width: var(--tap); height: var(--tap); }
.mimi.big { font-size: 64px; width: 84px; height: 84px; }
.mimi.bounce { animation: bounce .5s ease; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-14px) rotate(-6deg); }
  70% { transform: translateY(0) rotate(4deg); }
}

/* Time cards: Before looks faded (finished), Now bright, Later dashed (not yet). */
.t-before { background: var(--before-bg); color: var(--before-fg); border: 3px solid transparent; filter: saturate(.6) brightness(1.02); }
.t-now    { background: var(--now-bg);    color: var(--now-fg);    border: 3px solid var(--now-fg); box-shadow: 0 6px 20px rgba(250, 199, 117, .55); }
.t-later  { background: var(--later-bg);  color: var(--later-fg);  border: 3px dashed var(--later-fg); }
.t-have   { background: var(--have-bg);   color: var(--have-fg);   border: 3px solid transparent; }

/* ---------- Home ---------- */

.home-head { display: flex; align-items: center; gap: 12px; }
.app-title { font-size: clamp(32px, 7vw, 48px); font-weight: 800; flex: 1; }

/* Grown-ups: small corner button, press and hold 2s. */
.grownups-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: var(--tap);
  height: var(--tap);
  padding: 0 8px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  touch-action: none;
}
.grownups-btn .icon { font-size: 22px; }
.hold-ring {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 3px solid var(--before-fg);
  clip-path: inset(0 100% 0 0);
  opacity: 0;
}
.grownups-btn.holding .hold-ring { opacity: 1; clip-path: inset(0 0 0 0); transition: clip-path 2s linear; }

/* Timeline strip: Before · Now · Later, left to right, joined by a line. */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8%; right: 8%; top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 3px;
  background: var(--line);
}
.station {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 150px;
  padding: 14px 8px;
  border-radius: var(--radius);
  text-align: center;
}
.station-icon { font-size: 40px; }
.station-name { font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.station-ex { font-size: var(--sentence); color: var(--text); }

/* On narrow phones, stack the stations top to bottom so text stays big. */
@media (max-width: 479px) {
  .timeline { grid-template-columns: 1fr; gap: 10px; }
  .timeline::before { left: 46px; right: auto; top: 10%; bottom: 10%; width: 6px; height: auto; margin: 0 0 0 -3px; }
  .station { flex-direction: row; min-height: 0; padding: 10px 16px; gap: 12px; text-align: left; }
  .station-name { min-width: 72px; }
}

/* Pack cards. */
.pack-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.pack-card-wrap { position: relative; }
.pack-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
}
.pack-pic { font-size: 60px; line-height: 1; }
.pack-title { font-size: 26px; font-weight: 700; line-height: 1.15; padding-right: 50px; }
.card-say { position: absolute; top: 16px; right: 16px; }

/* Objective circles: empty, half (practising), full (mastered). */
.obj-dots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.obj-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 3px solid var(--later-fg);
  background: transparent;
}
.obj-dot.level-1 { background: linear-gradient(to top, var(--later-fg) 50%, transparent 50%); }
.obj-dot.level-2 { background: var(--later-fg); }

/* ---------- Shared: top bar, stars, highlight, big button ---------- */

.bar { display: flex; align-items: center; gap: 12px; }
.bar-pic { font-size: 40px; line-height: 1; }
.bar-title { font-size: clamp(26px, 5vw, 38px); font-weight: 800; flex: 1; }

.stars { display: inline-flex; gap: 2px; font-size: 26px; color: var(--line); }
.star.on { color: #F2A623; }
.star.on svg { fill: currentColor; }

/* Highlight used for hints and "this part changes". */
mark.hl { background: var(--hl-bg); color: var(--hl-fg); border-radius: 6px; padding: 0 .12em; }

.big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 28px;
  border-radius: 999px;
  font-size: 26px;
  font-weight: 800;
  box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.big-btn:active { transform: scale(.96); }
.big-btn.go { background: var(--later-fg); color: var(--surface); align-self: center; }
.big-btn .icon svg { fill: currentColor; }
/* First visit to a unit: gently lead on to practise. */
.big-btn.lead-on { animation: lead-on 1.4s ease-in-out 1s infinite; }
@keyframes lead-on { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* ---------- Pack ---------- */

.obj-list {
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--line);
}
.obj-item { display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: 18px; }
.obj-item .obj-dot { flex: none; }

.unit-list { display: grid; gap: 12px; }
@media (min-width: 900px) { .unit-list { grid-template-columns: 1fr 1fr; } }

.unit-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
}
.unit-pic { font-size: 44px; line-height: 1; }
.unit-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.unit-title { font-size: 22px; font-weight: 700; line-height: 1.15; }
.unit-actions { display: flex; gap: 10px; }
.act-btn {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 18px;
  font-size: 28px;
  transition: transform .12s ease;
}
.act-btn:active { transform: scale(.94); }
.act-btn.learn { background: var(--before-bg); color: var(--before-fg); }
.act-btn.practise { width: 68px; background: var(--later-fg); color: var(--surface); }
.act-btn.practise svg { fill: currentColor; }

/* On narrow phones, the Learn / Practise buttons drop to their own row. */
@media (max-width: 479px) {
  .unit-card { grid-template-columns: auto 1fr; }
  .unit-actions { grid-column: 1 / -1; }
  .act-btn.learn { flex: 1; }
  .act-btn.practise { flex: 2; }
}

.checkup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 26px;
  font-weight: 800;
  background: var(--now-bg);
  color: var(--now-fg);
  border: 3px solid var(--now-fg);
}
.checkup-pic { font-size: 36px; }
.checkup-btn.locked { background: var(--surface); color: var(--muted); border: 3px dashed var(--line); }
.checkup-lock { font-size: 28px; }

/* ---------- Learn ---------- */

.rule-line { margin: 0; }
.rule-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--line);
}
.rule-body { display: flex; flex-direction: column; gap: 14px; }

/* Where a tapped example shows up. */
.example {
  margin: 0;
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  white-space: pre-wrap;
  text-align: center;
}
.tap-hint { font-size: 36px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-6px); } }

/* Who grid: four columns; each row has a full-width time label above it. */
.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.who-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-height: var(--tap);
  padding: 6px 2px;
  border-radius: 16px;
  text-align: center;
}
.who-icon { font-size: 34px; }
.who-name { font-size: 22px; font-weight: 800; line-height: 1.1; }
.who-sub { font-size: 13px; color: var(--muted); line-height: 1.15; }
.who-head.is-hl { background: var(--hl-bg); color: var(--hl-fg); }
.who-head.is-hl .who-sub { color: inherit; }

.row-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  margin-top: 4px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 800;
  border-width: 0 !important;
  box-shadow: none !important;
}
.row-label .icon { font-size: 26px; }
.cell {
  min-height: 64px;
  padding: 6px 4px;
  border-radius: 16px;
  font-size: clamp(20px, 4.4vw, 28px);
  font-weight: 800;
  line-height: 1.1;
  transition: transform .12s ease;
}
.cell:active { transform: scale(.94); }
.cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.cell-word, .cell-ing { white-space: nowrap; }
.cell-ing {
  font-size: 15px;
  padding: 0 8px;
  border-radius: 999px;
  border: 2px solid currentColor;
  opacity: .85;
}
.cell.t-now { box-shadow: none; }
.cell.is-hl { outline: 4px solid var(--hl-bg); outline-offset: 2px; }

/* Time-line card: three stations with their clue words. */
.tl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 599px) { .tl { grid-template-columns: 1fr; } }
.tl-station {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}
.tl-station.t-now { box-shadow: none; }
.tl-head { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.tl-head .station-icon { font-size: 34px; }
.clues { display: flex; flex-wrap: wrap; gap: 8px; }
.clue-chip {
  min-height: var(--tap);
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  border: 2px solid var(--line);
}

/* Pattern and list cards: base word -> past word. */
.patterns { display: grid; gap: 10px; }
@media (min-width: 700px) { .patterns { grid-template-columns: 1fr 1fr; } }
.pattern-row, .pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px;
  border-radius: 18px;
  background: var(--before-bg);
  color: var(--before-fg);
  transition: transform .12s ease;
}
.pattern-row:active, .pair:active { transform: scale(.96); }
.pattern-rule { font-size: 18px; font-weight: 700; }
.word-change { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: calc(var(--sentence) + 2px); }
.word-change .arrow { font-size: 22px; color: var(--before-fg); }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }

/* Say it aloud strip. */
.say-aloud {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--have-bg);
  color: var(--have-fg);
}
.say-aloud-pic { font-size: 36px; }
.say-aloud .sentence { flex: 1; color: var(--text); }

/* ---------- Practise ---------- */

button { touch-action: manipulation; } /* no double-tap zoom on iOS */

.practise-bar { gap: 16px; }
.dots { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.dot.done { background: var(--later-fg); }
.dot.current { background: var(--now-fg); box-shadow: 0 0 0 4px var(--now-bg); }

.question {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
.q-pic { font-size: clamp(72px, 16vw, 112px); line-height: 1.1; align-self: center; }

.q-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--line);
}
.q-sentence { margin: 0; text-align: center; }
.q-line .speaker { flex: none; }

/* The blank: an empty box that fills in when solved. */
.blank {
  display: inline-block;
  min-width: 3.2em;
  margin: 0 .15em;
  border-bottom: 4px dashed var(--muted);
  text-align: center;
}
.blank.filled {
  border-bottom: 4px solid var(--later-fg);
  background: var(--later-bg);
  color: var(--later-fg);
  border-radius: 8px 8px 0 0;
  padding: 0 .2em;
  animation: pop .4s ease;
}
mark.glow { animation: glow 1s ease 2; }

/* Options: a big choice button plus a small "hear it" button. */
.opts { display: grid; gap: 12px; }
@media (min-width: 600px) { .opts { grid-template-columns: repeat(2, 1fr); } .opts-when { grid-template-columns: repeat(3, 1fr); } }
.opt-wrap { display: flex; align-items: center; gap: 8px; }
.opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 76px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
  font-family: var(--font-read);
  font-size: calc(var(--sentence) + 4px);
  transition: transform .12s ease, opacity .4s ease;
}
.opt:active { transform: scale(.96); }
.opt-icon { font-size: 34px; }
.opts-when .opt { font-family: var(--font-ui); font-weight: 800; }
/* Station colours for the Now / Before / Later buttons. */
.opt.t-before { background: var(--before-bg); color: var(--before-fg); border: 3px solid transparent; }
.opt.t-now    { background: var(--now-bg);    color: var(--now-fg);    border: 3px solid var(--now-fg); }
.opt.t-later  { background: var(--later-bg);  color: var(--later-fg);  border: 3px dashed var(--later-fg); }
.opt.correct { background: var(--later-bg); color: var(--later-fg); border: 3px solid var(--later-fg); filter: none; opacity: 1; animation: pop .4s ease; }
.opt.faded { opacity: .3; box-shadow: none; }
.opt-say { width: var(--tap); height: var(--tap); border-radius: 16px; font-size: 22px; color: var(--muted); }
.no-speech .opt-say { display: none; }

/* Wobble for a slip. Never red. */
.wobble { animation: wobble .45s ease; }
@keyframes wobble {
  20% { transform: translateX(-8px) rotate(-3deg); }
  40% { transform: translateX(7px) rotate(2deg); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes glow { 50% { box-shadow: 0 0 0 6px var(--hl-bg); } }

/* Hint line (step 1) and compact rule (step 2). */
.hint-box:empty, .hint-rule:empty, .next-box:empty { display: none; }
.hint-line {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--now-bg);
  color: var(--text);
  border: 3px dashed var(--hl-bg);
  text-align: left;
  font-size: calc(var(--sentence) - 2px);
  animation: pop .35s ease;
}
.hint-who { font-size: 40px; color: var(--now-fg); }
.rule-card.compact { padding: 10px; animation: pop .35s ease; }
.rule-card.compact .example { display: none; }

.next-box { display: flex; justify-content: center; }
.big-btn.next { background: var(--before-fg); color: var(--surface); min-width: 200px; }
.big-btn.next .icon svg { fill: none; }

/* Star that pops after a right answer. */
.star-pop {
  position: absolute;
  top: 8%;
  left: 50%;
  font-size: 120px;
  pointer-events: none;
  animation: star-pop 1.1s ease forwards;
}
@keyframes star-pop {
  0% { transform: translate(-50%, 20px) scale(.2); opacity: 0; }
  35% { transform: translate(-50%, 0) scale(1.15); opacity: 1; }
  70% { transform: translate(-50%, -10px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -60px) scale(.8); opacity: 0; }
}

/* Spell and build tiles. */
.spell-base { font-weight: 700; }
.q-line .arrow { font-size: 26px; color: var(--muted); }
.spell-moon { font-size: 30px; color: var(--before-fg); }
.slots { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.slot {
  display: inline-grid;
  place-items: center;
  min-width: 1.15em;
  border-bottom: 4px solid var(--muted);
}
.slot.filled { border-bottom-color: var(--later-fg); color: var(--later-fg); animation: pop .3s ease; }
.q-spell .q-sentence { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.q-line.solved { border-color: var(--later-fg); background: var(--later-bg); }

.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tile {
  min-width: 60px;
  min-height: 64px;
  padding: 4px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
  font-family: var(--font-read);
  font-size: 32px;
  transition: transform .12s ease, opacity .3s ease;
}
.tile:active { transform: scale(.94); }
.tile.word { font-size: var(--sentence); }
.tile.used { opacity: 0; pointer-events: none; }
.tile.glow { border-color: var(--hl-bg); animation: glow 1s ease infinite; }

.build-line { justify-content: space-between; }
.built { margin: 0; flex: 1; min-height: 1.4em; text-align: left; }
.built-word { display: inline-block; animation: pop .25s ease; }
.built-gap { display: inline-block; min-width: 3em; border-bottom: 4px dashed var(--muted); }

/* ---------- Done ---------- */

.done { gap: 18px; }
.done-stars { font-size: clamp(72px, 18vw, 110px); gap: 8px; }
.done-stars .star.on { animation: pop .5s ease backwards; }
.done-stars .star:nth-child(2) { animation-delay: .25s; }
.done-stars .star:nth-child(3) { animation-delay: .5s; }
.done-cheer { font-size: 30px; font-weight: 800; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 8px; }
.big-btn.again { background: var(--later-fg); color: var(--surface); }
.big-btn.back-to-pack { background: var(--surface); color: var(--text); border: 2px solid var(--line); }
.big-btn.back-to-pack .icon svg { fill: none; }

.checkup-btn .stars { font-size: 24px; color: var(--now-fg); opacity: .5; }
.checkup-btn .star.on { opacity: 1; }

/* ---------- Grown-ups (adult page: normal text) ---------- */

.grownups { font-family: system-ui, sans-serif; font-size: 16px; gap: 16px; }
.grownups h2 { font-family: var(--font-ui); font-size: 26px; }
.grownups h3 { font-family: var(--font-ui); font-size: 20px; margin-top: 4px; }
.muted { color: var(--muted); margin: 0; }
.gu-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 2px solid var(--line);
}
.gu-pack { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }

.gu-objs { display: grid; gap: 10px; }
.gu-obj { display: grid; grid-template-columns: 1fr minmax(80px, 160px) 92px; align-items: center; gap: 10px; }
@media (max-width: 479px) {
  .gu-obj { grid-template-columns: 1fr 84px; }
  .gu-obj-text { grid-column: 1 / -1; }
}
.gu-bar { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.gu-bar-fill { display: block; height: 100%; background: var(--later-fg); border-radius: 6px; }
.gu-bar-fill.low { background: var(--now-fg); }
.gu-num { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; font-size: 14px; }

.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--before-bg); color: var(--before-fg); white-space: nowrap; }
.tag.needs { background: var(--now-bg); color: var(--now-fg); }

.gu-checkup p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gu-checkup .stars { font-size: 18px; }
.gu-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.gu-sentence { font-family: var(--font-read); font-size: 18px; }
.gu-note { display: block; color: var(--muted); font-size: 14px; }

.gu-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gu-task { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
@media (max-width: 479px) {
  .gu-task { grid-template-columns: auto 1fr; }
  .gu-said { grid-column: 1 / -1; }
}
.gu-task-pic { font-size: 30px; }
.gu-task-text { display: flex; flex-direction: column; gap: 2px; }
.gu-prompt { font-family: var(--font-read); font-size: 18px; }
.gu-example { color: var(--muted); font-size: 15px; }
.gu-said {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--muted);
}
.gu-said[aria-pressed="true"] { background: var(--later-bg); color: var(--later-fg); border-color: var(--later-fg); }

.gu-settings { display: grid; gap: 4px; }
.gu-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 56px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.gu-setting:last-child { border-bottom: 0; }
.gu-setting input[type="checkbox"] { width: 28px; height: 28px; accent-color: var(--later-fg); }
.gu-setting input[type="text"] {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  -webkit-user-select: text;
  user-select: text;
}
.gu-seg { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.gu-seg button { min-height: 44px; padding: 6px 18px; font-family: var(--font-ui); font-weight: 700; }
.gu-seg button[aria-checked="true"] { background: var(--before-fg); color: var(--surface); }
.gu-small, .gu-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  font-family: var(--font-ui);
  font-weight: 700;
}
.gu-reset { color: var(--have-fg); border-color: var(--have-fg); }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .grownups-btn.holding .hold-ring { transition-duration: 2s !important; }
  /* The star still shows (it's the reward), it just doesn't move. */
  .star-pop { animation: none !important; transform: translate(-50%, 0); }
}
