/* Poco a Poco "lively" theme — loaded after app.css and overrides it.
   Same layout as its German sister app (bright flat colours, chunky 3D buttons that press down,
   heavy rounded type, a winding lesson path, coloured feedback), with its own palette:
   hand-painted tiles on a sun-baked wall. Terracotta is the accent, turquoise/teal the second
   colour, sunny yellow the highlight, on warm cream paper. Dark = warm brown-charcoal.

   How the colours are meant to be used (the contrast check is _spec/tools/contrast.mjs):
   - Light: fills are deep (terracotta, teal, blue, pink, green, red) and carry white text;
     orange, gold, lime, aqua and coral are bright fills and carry dark text.
     Dark: every fill is bright and carries dark text.
   - Text or icons on a coloured fill always use var(--on-fill). A rule that puts a bright colour
     on a fill also sets --on-fill: var(--on-bright) on that element.
   - Coloured text on a neutral surface uses the colour itself (they all pass 4.5:1), except the
     bright ones, which have an -ink partner: --gold-ink, --orange-ink. --good-ink / --bad-ink are
     for text on the soft feedback panels.
   - Genders: --el (masculine, blue) and --la (feminine, pink). --der / --die are the same values
     under the old names; --das stays defined (teal) because scripts still read it. */
:root {
  --bg: #FFF6EA; --surface: #FFFFFF; --surface-2: #FCEEDC; --ink: #2B1B14; --muted: #6B5546; --line: #EFDDC8; --line-strong: #A08872;
  --accent: #BE431A; --accent-dark: #8F2F0E; --accent-2: #D9592B; --accent-soft: #FFEBE1; --accent-ink: #FFFFFF;
  --on-deep: #FFFFFF; --on-bright: #33180A; --on-fill: var(--on-deep);
  --hero-a: #BE431A; --hero-b: #C94A2D; --hero-dark: #8F2F0E; --hero-ink: #FFFFFF;
  --gold: #FFC233; --gold-dark: #BD7700; --gold-soft: #FFF1C9; --gold-ink: #8A5300;
  --marker: #FFD35C; --marker-a: 70%; --marker-b: 30%; --margin: #0A7772;
  --good: #0A7B41; --good-dark: #075A2E; --good-soft: #DFF5E6; --good-ink: #075A2E;
  --bad: #C8202C; --bad-dark: #96141F; --bad-soft: #FFE9EA; --bad-ink: #96141F;
  --mid: #8A5300; --mid-soft: #FFF1C9;
  --teal: #0A7772; --teal-dark: #06544F; --teal-soft: #DDF3F0;
  --sky: #1C68BF; --sky-dark: #134C8F; --pink: #C91D7A; --pink-dark: #99135B;
  --orange: #F58220; --orange-dark: #C25E0A; --orange-ink: #A84A00;
  --navy: #27446E; --navy-dark: #172B4A; --chili: #C8202C; --chili-dark: #96141F;
  --lime: #A5CF3A; --lime-dark: #7A9E1C; --aqua: #3CCFC4; --aqua-dark: #1F9E94; --coral: #FF8F6B; --coral-dark: #D4623F;
  --el: #1C68BF; --la: #C91D7A; --der: #1C68BF; --die: #C91D7A; --das: #0A7772;
  --shadow: 0 3px 0 var(--line);
  --shadow-soft: 0 10px 24px rgba(170, 70, 20, .18);
  --font-display: "Nunito", "Arial Rounded MT Bold", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 22px; --r-sm: 14px; --r-btn: 16px;
  --tab-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1D1613; --surface: #2A201B; --surface-2: #382B24; --ink: #FFF3E6; --muted: #CDB8A7; --line: #4A3A30; --line-strong: #8F7A6A;
    --accent: #FF8A66; --accent-dark: #C9532F; --accent-2: #FFAA8C; --accent-soft: #4A281B; --accent-ink: #2A1108;
    --on-deep: #2A1108; --on-bright: #2A1108; --on-fill: var(--on-deep);
    --hero-a: #BE431A; --hero-b: #C94A2D; --hero-dark: #7A2A0C; --hero-ink: #FFFFFF;
    --gold: #FFCB47; --gold-dark: #B8860F; --gold-soft: #453410; --gold-ink: #FFCB47;
    --marker: #FFD35C; --marker-a: 28%; --marker-b: 18%; --margin: #3DD6C6;
    --good: #3DD68C; --good-dark: #1E9E60; --good-soft: #173A2A; --good-ink: #6BE3A8;
    --bad: #FF6B7D; --bad-dark: #C9404F; --bad-soft: #45201F; --bad-ink: #FF9FA8;
    --mid: #FFC857; --mid-soft: #453410;
    --teal: #3DD6C6; --teal-dark: #1F9E90; --teal-soft: #163B38;
    --sky: #62B5FF; --sky-dark: #2E82CC; --pink: #FF7DC0; --pink-dark: #CC4C8E;
    --orange: #FFA24D; --orange-dark: #CC7222; --orange-ink: #FFA24D;
    --navy: #8FB3F0; --navy-dark: #5C82C4; --chili: #FF6B6B; --chili-dark: #C94444;
    --lime: #B9DE55; --lime-dark: #86A82E; --aqua: #6FDDEE; --aqua-dark: #3AA6B8; --coral: #FFB199; --coral-dark: #D48062;
    --el: #62B5FF; --la: #FF7DC0; --der: #62B5FF; --die: #FF7DC0; --das: #3DD6C6;
    --shadow: 0 3px 0 rgba(0,0,0,.35); --shadow-soft: 0 10px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #1D1613; --surface: #2A201B; --surface-2: #382B24; --ink: #FFF3E6; --muted: #CDB8A7; --line: #4A3A30; --line-strong: #8F7A6A;
  --accent: #FF8A66; --accent-dark: #C9532F; --accent-2: #FFAA8C; --accent-soft: #4A281B; --accent-ink: #2A1108;
  --on-deep: #2A1108; --on-bright: #2A1108; --on-fill: var(--on-deep);
  --hero-a: #BE431A; --hero-b: #C94A2D; --hero-dark: #7A2A0C; --hero-ink: #FFFFFF;
  --gold: #FFCB47; --gold-dark: #B8860F; --gold-soft: #453410; --gold-ink: #FFCB47;
  --marker: #FFD35C; --marker-a: 28%; --marker-b: 18%; --margin: #3DD6C6;
  --good: #3DD68C; --good-dark: #1E9E60; --good-soft: #173A2A; --good-ink: #6BE3A8;
  --bad: #FF6B7D; --bad-dark: #C9404F; --bad-soft: #45201F; --bad-ink: #FF9FA8;
  --mid: #FFC857; --mid-soft: #453410;
  --teal: #3DD6C6; --teal-dark: #1F9E90; --teal-soft: #163B38;
  --sky: #62B5FF; --sky-dark: #2E82CC; --pink: #FF7DC0; --pink-dark: #CC4C8E;
  --orange: #FFA24D; --orange-dark: #CC7222; --orange-ink: #FFA24D;
  --navy: #8FB3F0; --navy-dark: #5C82C4; --chili: #FF6B6B; --chili-dark: #C94444;
  --lime: #B9DE55; --lime-dark: #86A82E; --aqua: #6FDDEE; --aqua-dark: #3AA6B8; --coral: #FFB199; --coral-dark: #D48062;
  --el: #62B5FF; --la: #FF7DC0; --der: #62B5FF; --die: #FF7DC0; --das: #3DD6C6;
  --shadow: 0 3px 0 rgba(0,0,0,.35); --shadow-soft: 0 10px 24px rgba(0,0,0,.35);
}

body { font-weight: 600; letter-spacing: .005em; }
h1, h2, h3 { font-weight: 800; }
h2 { font-size: 1.2rem; }
.display, h1.display { font-family: var(--font-display); font-weight: 900; letter-spacing: -.01em; }
h1.display { font-size: 2rem; }
.eyebrow { font-weight: 800; letter-spacing: .08em; color: var(--accent); }
.muted { font-weight: 600; }
[lang="de"], [lang="es"] { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }

/* ---------- shell ---------- */
.app-head { border-bottom: 2px solid var(--line); }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 3px 0 var(--accent-dark); font: 900 1.3rem/1 var(--font-display); }
/* the app icon (Poco) as the header logo */
img.brand-icon { display: block; object-fit: cover; background: var(--gold-soft); box-shadow: 0 3px 0 var(--accent-dark); }
/* the three-word name stays on one line beside the streak and XP pills: it scales with the screen instead of wrapping */
.brand { min-width: 0; }
.brand-name { font: 900 1.4rem/1 var(--font-display); font-size: clamp(.9rem, 4.9vw, 1.4rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-block: .15em; }
.head-stats { gap: .45rem; flex: none; }
.hs-streak, .hs-xp { padding: .25rem .6rem .25rem .45rem; border-radius: 999px; background: var(--surface-2); font-weight: 900; }
.hs-streak.on { color: var(--orange-ink); background: color-mix(in srgb, var(--orange) 14%, var(--surface)); }
.hs-xp { color: var(--gold-ink); background: var(--gold-soft); }
@media (max-width: 359px) {
  .brand { gap: .35rem; }
  .head-stats { gap: .3rem; }
  .hs-streak, .hs-xp { padding: .2rem .45rem .2rem .35rem; }
}
.tabbar { border-top: 2px solid var(--line); }
.tab { font-weight: 800; font-size: .7rem; gap: 3px; }
.tab .ic { padding: 4px 16px; border-radius: 12px; transition: background .2s, transform .2s; }
.tab.on { color: var(--accent); }
.tab.on .ic { background: var(--accent-soft); transform: translateY(-1px); }
.spinner { border-top-color: var(--accent); }

/* ---------- primitives ---------- */
.card { border: 2px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
button.card { transition: transform .08s, box-shadow .08s; }
button.card:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.btn { min-height: 50px; border-radius: var(--r-btn); border: 0; font-weight: 800; font-size: 1.02rem; padding: .6rem 1.3rem;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 0 var(--accent-dark); margin-bottom: 4px;
  transition: transform .08s, box-shadow .08s, filter .15s; touch-action: manipulation; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--accent-dark); }
.btn.primary { box-shadow: 0 4px 0 var(--accent-dark); }
.btn.ghost { background: var(--surface); color: var(--accent); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.btn.ghost:active:not(:disabled) { box-shadow: 0 0 0 var(--line); }
.btn.danger { background: var(--surface); color: var(--bad); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.btn.primary.good { background: var(--good); color: var(--on-fill); box-shadow: 0 4px 0 var(--good-dark); }
.btn.primary.bad { background: var(--bad); color: var(--on-fill); box-shadow: 0 4px 0 var(--bad-dark); }
.btn:disabled { opacity: 1; background: var(--line); color: var(--muted); box-shadow: 0 4px 0 color-mix(in srgb, var(--line) 70%, #000 8%); }
.btn.ghost:disabled { background: var(--surface); }
.chip-btn { min-height: 40px; border: 2px solid var(--line); border-radius: 12px; font-weight: 800; box-shadow: 0 2px 0 var(--line); padding: .3rem .8rem; transition: transform .08s, box-shadow .08s; }
.chip-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.chip-btn .ic { color: var(--accent); }
.chip-btn.on { box-shadow: 0 2px 0 var(--accent); }
.link-btn { font-weight: 800; }
.chip { border-radius: 10px; font-weight: 700; border-width: 2px; }
.pill { background: var(--gold); color: #3A2600; font-weight: 900; border-radius: 999px; }
.callout { border-radius: var(--r-sm); font-weight: 600; }
/* audio buttons carry the second colour */
.play { width: 38px; height: 38px; border: 0; background: var(--teal-soft); color: var(--teal); box-shadow: 0 2px 0 color-mix(in srgb, var(--teal) 30%, transparent); }
.play.on { background: var(--teal); color: var(--on-fill); }
.input { border: 2px solid var(--line-strong); border-radius: var(--r-sm); font-weight: 600; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seg-group { border-radius: 14px; padding: 4px; background: var(--surface-2); }
.seg { border-radius: 11px; font-weight: 800; }
.seg.on { color: var(--accent); box-shadow: 0 2px 0 var(--line); }
.umlauts button { border: 2px solid var(--line); border-radius: 10px; box-shadow: 0 2px 0 var(--line); background: var(--surface); font-weight: 800; }
.stat-pill { border-radius: var(--r-sm); background: var(--surface-2); }
.stat-pill b { font-weight: 900; }
.quest-bar { height: 12px; background: var(--surface-2); }
/* the yellow bar gets a darker rim so it stays visible on the pale track */
.quest-fill { background: var(--gold); box-shadow: inset 0 0 0 2px var(--gold-dark); position: relative; }
.quest-fill::after, .pbar-fill::after { content: ""; position: absolute; left: 8px; right: 8px; top: 3px; height: 3px; border-radius: 9px; background: rgba(255,255,255,.35); }
.level-badge { background: var(--lv, var(--teal)); color: var(--on-fill); border-radius: 10px; font-family: var(--font-display); font-weight: 900; }
.ring-label { font-weight: 900; }
.toast { border-radius: 16px; font-weight: 700; }
.sheet { border-radius: 28px 28px 0 0; }
.sheet-head h2 { font-weight: 900; }
.sheet-actions { border-top: 2px solid var(--line); }

/* ---------- today ---------- */
/* the hero is the same sun-baked terracotta in both themes, with white text */
.today-head { background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%); color: var(--hero-ink); border-radius: 28px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; isolation: isolate; }
.today-head::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: color-mix(in srgb, var(--hero-dark) 26%, transparent); pointer-events: none; z-index: -1; }
.today-head .eyebrow { color: var(--hero-ink); }
.today-head h1.display { color: var(--hero-ink); font-size: 2.1rem; }
.today-head .ring circle:first-child { stroke: rgba(255,255,255,.28); }
.today-head .ring circle:last-child { stroke: var(--marker); }
.today-head .ring-label, .today-head .ring-label small { color: var(--hero-ink); }
.today-head .en-hint { color: var(--hero-ink); }
.today-head h1 .en-hint { display: block; font-size: .95rem; font-weight: 700; margin: .1rem 0 0; }
.today-head .eyebrow .en-hint { display: block; margin: 0; }
.card.plan, .card.quests { background: transparent; border: 0; box-shadow: none; padding: 0; }
.card.plan .card-head, .card.quests .card-head { padding: 0 .2rem; }
.card.quests { background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); padding: 1rem; }
.streak { font-weight: 800; }
.streak.on { color: var(--orange-ink); }
.joker { color: var(--teal); font-weight: 800; }
.wd-dot { width: 32px; height: 32px; border: 2px dashed var(--line); }
.wday { font-weight: 800; }
.wday.met .wd-dot { background: var(--gold); color: #3A2600; box-shadow: 0 3px 0 var(--gold-dark); }
.wday.joker .wd-dot { background: var(--teal-soft); color: var(--teal); box-shadow: 0 3px 0 color-mix(in srgb, var(--teal) 40%, transparent); }
.wday.today .wd-dot { border-color: var(--accent); }
.plan .tasks { gap: .55rem; }
.task { border: 2px solid var(--line); border-radius: 18px; padding: .65rem .8rem; background: var(--surface); box-shadow: 0 3px 0 var(--line); transition: transform .08s, box-shadow .08s; }
.task:first-child { border-top: 2px solid var(--line); }
.task:active { transform: translateY(3px); box-shadow: none; }
.task-icon { --c: var(--accent); --cd: var(--accent-dark); width: 44px; height: 44px; border-radius: 14px; background: var(--c); color: var(--on-fill); box-shadow: 0 3px 0 var(--cd); }
.task.k-review .task-icon { --c: var(--sky); --cd: var(--sky-dark); }
.task.k-lesson .task-icon, .task.k-checkpoint .task-icon { --c: var(--accent); --cd: var(--accent-dark); }
.task.k-levelTest .task-icon { --c: var(--gold); --cd: var(--gold-dark); --on-fill: var(--on-bright); }
.task.k-pron .task-icon { --c: var(--orange); --cd: var(--orange-dark); --on-fill: var(--on-bright); }
.task.k-gym .task-icon, .task.k-lookback .task-icon { --c: var(--teal); --cd: var(--teal-dark); }
.task.k-packs .task-icon { --c: var(--good); --cd: var(--good-dark); }
.task.k-mistakes .task-icon, .task.k-skill .task-icon { --c: var(--pink); --cd: var(--pink-dark); }
.task.done { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); box-shadow: 0 3px 0 color-mix(in srgb, var(--good) 35%, var(--line)); }
.task.done .task-icon { --c: var(--good); --cd: var(--good-dark); --on-fill: var(--on-deep); }
.task-xp { color: var(--gold-ink); font-weight: 900; background: var(--gold-soft); padding: .2rem .5rem; border-radius: 999px; }
.task.done .task-xp { color: var(--good-ink); background: transparent; }
.quest-xp { color: var(--gold-ink); font-weight: 900; }
.quest.done .quest-fill { background: var(--good); box-shadow: none; }
.article-card { border-left: 2px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 10%, var(--surface)), var(--surface) 60%); }
.article-card h3 { font-weight: 900; }
.fun-card { border-radius: 20px; }
.fun-card .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--on-fill); background: var(--accent); box-shadow: 0 3px 0 var(--accent-dark); }
.fun-row .fun-card:nth-child(1) .ic { background: var(--good); box-shadow: 0 3px 0 var(--good-dark); }
.fun-row .fun-card:nth-child(2) .ic { background: var(--orange); box-shadow: 0 3px 0 var(--orange-dark); --on-fill: var(--on-bright); }
.fun-row .fun-card:nth-child(3) .ic { background: var(--pink); box-shadow: 0 3px 0 var(--pink-dark); }
.wod { background: linear-gradient(135deg, var(--gold-soft), var(--surface) 70%); }
.wod-word { font-family: var(--font-display); font-weight: 900; }
.section-title { font-weight: 900; }
.news-card { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); }

/* ---------- course: unit banners + winding path ---------- */
.level { --lv: var(--accent); --lv-dark: var(--accent-dark); --lv-ink: var(--accent); gap: .2rem; margin-top: .4rem; }
.lv-a1 { --lv: var(--teal); --lv-dark: var(--teal-dark); --lv-ink: var(--teal); }
.lv-a2 { --lv: var(--sky); --lv-dark: var(--sky-dark); --lv-ink: var(--sky); }
.lv-b1 { --lv: var(--accent); --lv-dark: var(--accent-dark); --lv-ink: var(--accent); }
.lv-b2 { --lv: var(--orange); --lv-dark: var(--orange-dark); --lv-ink: var(--orange-ink); }
.lv-b2 .unit-banner, .lv-b2 .path-step.next .path-node, .lv-b2 .level-badge { --on-fill: var(--on-bright); }
.unit-banner { position: sticky; top: calc(var(--head-h) + env(safe-area-inset-top, 0px) + 6px); z-index: 5; background: var(--lv); color: var(--on-fill); border-radius: 20px; padding: .8rem 1rem; box-shadow: 0 4px 0 var(--lv-dark); display: flex; flex-direction: column; gap: .5rem; }
.unit-kicker { font-size: .75rem; font-weight: 900; letter-spacing: .08em; }
.unit-title { font: 900 1.35rem/1.1 var(--font-display); display: block; }
.unit-sub { font-size: .88rem; }
.unit-banner .en-hint { color: var(--on-fill); }
.unit-banner .quest-bar { background: rgba(0,0,0,.25); }
.unit-banner .quest-fill { background: var(--on-fill); box-shadow: none; }
.path { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding: 1.4rem 0 1.6rem; }
.path-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; transform: translateX(calc(var(--x, 0) * 46px)); width: 170px; }
.path-node { width: 72px; height: 72px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--line); color: var(--muted); box-shadow: 0 6px 0 color-mix(in srgb, var(--line) 70%, #000 10%); font: 900 1.4rem/1 var(--font-display); transition: transform .08s, box-shadow .08s; touch-action: manipulation; }
.path-node:active { transform: translateY(6px); box-shadow: 0 0 0 transparent; }
.path-step.done .path-node { background: var(--gold); color: #3A2600; box-shadow: 0 6px 0 var(--gold-dark); }
.path-step.crown .path-node { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 0 var(--accent-dark), 0 0 0 4px var(--gold); }
.path-crown { font-size: 2rem; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.path-step.next .path-node { width: 84px; height: 84px; background: var(--lv); color: var(--on-fill); box-shadow: 0 6px 0 var(--lv-dark), 0 0 0 8px color-mix(in srgb, var(--lv) 22%, transparent); }
.path-label { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; }
.path-label strong { font-size: .92rem; font-weight: 800; }
.path-label span { font-size: .75rem; color: var(--muted); font-weight: 700; }
.path-step.todo .path-label strong { color: var(--muted); }
.path-bubble { background: var(--surface); color: var(--lv-ink, var(--lv)); border: 2px solid var(--line); font-weight: 900; font-size: .85rem; padding: .3rem .7rem; border-radius: 12px; box-shadow: 0 3px 0 var(--line); position: relative; animation: bob 1.6s ease-in-out infinite; white-space: nowrap; }
.path-bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: var(--surface); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: translateX(-50%) rotate(45deg); }
@keyframes bob { 50% { transform: translateY(-5px); } }
.lesson-row.next { background: var(--accent-soft); }

/* ---------- sessions: progress, options, feedback, summary ---------- */
.session-head { border-bottom: 0; }
.pbar { height: 16px; background: var(--surface-2); }
.pbar-fill { background: var(--good); position: relative; }
.counter, .game-score { font-weight: 900; }
.prompt { font-weight: 800; font-size: 1.12rem; }
.de-line { font-weight: 700; }
.option, .match-btn, .tile { border: 2px solid var(--line); border-radius: var(--r-btn); box-shadow: 0 4px 0 var(--line); font-weight: 700; transition: transform .08s, box-shadow .08s, background .15s; touch-action: manipulation; }
.option:active:not(:disabled), .match-btn:active, .tile:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); border-color: var(--accent); }
.option.right, .match-btn.done { border-color: var(--good); background: var(--good-soft); color: var(--good-ink); box-shadow: 0 4px 0 var(--good); animation: pop .3s ease; }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad-ink); box-shadow: 0 4px 0 var(--bad); animation: shake .3s; }
.match-btn.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 4px 0 var(--accent); }
.tile { border-bottom-width: 2px; }
@keyframes pop { 50% { transform: scale(1.04); } }
.en-src, .goal { border: 2px solid var(--line); border-radius: var(--r-sm); }
.session-foot { border-top: 2px solid var(--line); transition: background .2s; }
.session-foot:has(.feedback.good) { background: var(--good-soft); border-top-color: transparent; }
.session-foot:has(.feedback.bad) { background: var(--bad-soft); border-top-color: transparent; }
.session-foot:has(.feedback.good) .btn.primary { background: var(--good); color: var(--on-fill); box-shadow: 0 4px 0 var(--good-dark); }
.session-foot:has(.feedback.bad) .btn.primary { background: var(--bad); color: var(--on-fill); box-shadow: 0 4px 0 var(--bad-dark); }
.session-foot .feedback.good, .session-foot .feedback.bad { background: transparent; padding: .1rem 0; animation: slide-up .22s cubic-bezier(.2,.9,.3,1.2); }
.feedback.good .fb-title { color: var(--good-ink); }
.feedback.bad .fb-title { color: var(--bad-ink); }
.fb-title { font-size: 1.3rem; font-weight: 900; }
@keyframes slide-up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.vocab-list, .lesson-list, .word-list { border: 2px solid var(--line); border-radius: var(--r); }
.vocab-de { font-weight: 800; }
.dl-bubble { border: 2px solid var(--line); border-radius: 18px 18px 18px 6px; }
.dl-line.right .dl-bubble { border-radius: 18px 18px 6px 18px; }
.summary h2 { font-weight: 900; font-size: 2.1rem; }
.summary-badge { width: 104px; height: 104px; background: var(--gold); color: #3A2600; box-shadow: 0 6px 0 var(--gold-dark); animation: trophy .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes trophy { from { transform: scale(0); } 70% { transform: scale(1.15); } to { transform: scale(1); } }
.summary-stats { gap: .6rem; }
.stat { --c: var(--accent); border: 2px solid var(--c); border-radius: 18px; padding: 0 0 .5rem; overflow: hidden; box-shadow: 0 3px 0 var(--c); }
.stat-l { order: -1; background: var(--c); color: var(--on-fill); font-weight: 900; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: .25rem; margin-bottom: .35rem; }
.stat { display: flex; flex-direction: column; }
.stat-v { font-weight: 900; color: var(--ct, var(--c)); }
.summary-stats .stat:nth-child(1) { --c: var(--good); }
.summary-stats .stat:nth-child(2) { --c: var(--gold); --ct: var(--gold-ink); --on-fill: var(--on-bright); }
.summary-stats .stat:nth-child(3) { --c: var(--sky); }
.summary-stats .stat:nth-child(4) { --c: var(--pink); }

/* ---------- games ---------- */
.game-grid { gap: .7rem; }
.game-tile { --c: var(--accent); --cd: var(--accent-dark); background: var(--c); color: var(--on-fill); border: 0; border-radius: 22px; box-shadow: 0 5px 0 var(--cd); min-height: 150px; padding: 1rem; transition: transform .08s, box-shadow .08s; }
.game-tile:active { transform: translateY(5px); box-shadow: 0 0 0 var(--cd); }
.game-tile .muted, .game-tile .en-hint { color: var(--on-fill); }
.game-tile strong { font-size: 1.08rem; font-weight: 900; }
.gt-icon { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.2); margin-bottom: .2rem; }
.game-tile .ic { color: var(--on-fill); }
.game-best { margin-top: auto; background: var(--on-fill); color: var(--c); padding: .15rem .55rem; border-radius: 999px; font-weight: 900; }
.game-tile .pill { background: var(--pill-bg, var(--gold)); color: var(--pill-ink, #3A2600); }
/* the pills inside a tile have their own background: their hint takes the pill's text colour, and a long one may wrap */
.game-tile .game-best .en-hint, .game-tile .pill .en-hint, .runner-hero .pill .en-hint { color: inherit; }
.game-tile .pill, .runner-hero .pill { white-space: normal; max-width: 100%; border-radius: 14px; }
.game-tile.featured { border: 0; outline: 3px solid var(--gold); outline-offset: 3px; }
/* tile colours: deep ones carry white text, bright ones (orange, lime, aqua, gold, coral) dark text */
.gt-artikel { --c: var(--sky); --cd: var(--sky-dark); }
.gt-memory { --c: var(--pink); --cd: var(--pink-dark); }
.gt-satz { --c: var(--teal); --cd: var(--teal-dark); }
.gt-zahlen { --c: var(--orange); --cd: var(--orange-dark); --on-fill: var(--on-bright); }
.gt-kompositum { --c: var(--accent); --cd: var(--accent-dark); }
.gt-sprichwort { --c: var(--navy); --cd: var(--navy-dark); }
.gt-luecke { --c: var(--good); --cd: var(--good-dark); }
.gt-betonung { --c: var(--lime); --cd: var(--lime-dark); --on-fill: var(--on-bright); }
.gt-abc { --c: var(--aqua); --cd: var(--aqua-dark); --on-fill: var(--on-bright); }
.gt-freunde { --c: var(--gold); --cd: var(--gold-dark); --on-fill: var(--on-bright); --pill-bg: var(--on-bright); --pill-ink: var(--gold); }
.gt-bilder { --c: var(--chili); --cd: var(--chili-dark); }
.gt-sages { --c: var(--coral); --cd: var(--coral-dark); --on-fill: var(--on-bright); }
.fuenf-hero { background: linear-gradient(135deg, var(--good-soft), var(--surface) 70%); }
.f-cell { border-radius: 10px; font-family: var(--font-display); font-weight: 900; }
.f-cell.correct { box-shadow: 0 3px 0 var(--good-dark); }
.f-cell.present { background: var(--gold); border-color: var(--gold); color: #3A2600; box-shadow: 0 3px 0 var(--gold-dark); }
.key { border-radius: 10px; font-weight: 900; box-shadow: 0 3px 0 var(--line); background: var(--surface); border: 2px solid var(--line); }
.key.present { background: var(--gold); color: #3A2600; }
.blitz-word { font-family: var(--font-display); font-weight: 900; }
.blitz-btn { border-radius: 20px; font-family: var(--font-display); font-weight: 900; box-shadow: 0 6px 0 rgba(0,0,0,.22); transition: transform .08s, box-shadow .08s; }
.blitz-btn:active { transform: translateY(6px); box-shadow: none; }
.mem-front { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 16px; box-shadow: 0 4px 0 var(--accent-dark); font-weight: 900; }
.mem-back { border-radius: 16px; border: 2px solid var(--line); font-weight: 700; }
.pl-row { border: 2px solid var(--line); border-radius: 16px; }
.abc-tile, .num-chip, .spell-chip { border: 2px solid var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--line); transition: transform .08s, box-shadow .08s; }
.abc-tile:active, .num-chip:active, .spell-chip:active { transform: translateY(3px); box-shadow: none; }
.abc-tile b, .num-chip b { font-weight: 900; }

.goal-card { display: flex; flex-direction: column; gap: .5rem; border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.goal-card.v-behind, .goal-card.v-late { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
.goal-top { display: flex; align-items: center; gap: .6rem; }
.goal-icon { font-size: 1.8rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.goal-card .quest-fill { background: var(--good); box-shadow: none; }
.goal-card.v-behind .quest-fill { background: var(--gold); box-shadow: inset 0 0 0 2px var(--gold-dark); }
.goal-status { margin: 0; }
.goal-card.v-ok .goal-status { color: var(--good-ink); }
.goal-warn { color: var(--mid); margin: 0; }
.goal-hint { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; background: var(--surface); border: 2px dashed var(--line); border-radius: 16px; padding: .35rem .5rem .35rem .8rem; }
.goal-hint .icon-btn { margin-left: auto; font-size: 1.2rem; color: var(--muted); }
.goal-settings select.input.small, .goal-settings input.input.small { width: auto; max-width: 11rem; }
/* speaking missions */
.mission-ic { font-size: 1.7rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.mission-list { display: flex; flex-direction: column; gap: .5rem; }
.mission-row { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; text-align: left; padding: .65rem .8rem; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 3px 0 var(--line); }
.mission-row:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.mission-row.locked { opacity: .55; }
.mission-pic { font-size: 1.9rem; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.mission-text { display: flex; flex-direction: column; min-width: 0; }
.mission-stars { color: var(--gold-ink); font-weight: 900; white-space: nowrap; }
.mission .game-body { display: flex; flex-direction: column; }
.mission-chat { display: flex; flex-direction: column; gap: .7rem; }
.mission-intro { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.mission-big { font-size: 3.4rem; text-align: center; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.mission-goals { display: flex; flex-direction: column; gap: .35rem; }
.mission-goal { display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.mg-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); font-weight: 900; font-size: .8rem; }
.mission-goal.ok .mg-dot { background: var(--good); color: var(--on-fill); }
.mission-goal.miss .mg-dot { background: var(--gold); color: #3A2600; }
.mission-words { display: flex; flex-wrap: wrap; gap: .4rem; }
.mission-words .mw { gap: .35rem; cursor: default; }
.mission-words .mw .play { width: 28px; height: 28px; }
.dl-line.right.mine-ok .dl-bubble { background: var(--good-soft); }
.mission-dock { border-top: 2px solid var(--line); background: var(--surface); padding: .7rem max(16px, env(safe-area-inset-right, 0px)) calc(.7rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: .45rem; }
.mission-task { display: flex; flex-direction: column; gap: .1rem; font-weight: 800; }
.mission-input { display: flex; align-items: center; gap: .7rem; }
.mission-input .rec-wrap { margin: 0; }
.mission-input .rec-btn { width: 60px; height: 60px; }
.mission-input .grow { flex: 1; min-width: 0; gap: .3rem; }
.mission-input .answer-transcript { text-align: left; min-height: 1.2rem; font-size: 1rem; }
.mission-fb { color: var(--bad-ink); font-size: .92rem; }
.mission-fb:empty, .mission-hint:empty { display: none; }
.mission-actions { justify-content: space-between; }
.mission-summary { padding-top: .5rem; }
.mission-stars-big { font-size: 2rem; color: var(--gold-dark); letter-spacing: .2em; }
/* grammar strength bars */
.gs-list { display: flex; flex-direction: column; gap: .35rem; }
.gs-row { --c: var(--line); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 2.6rem; gap: .6rem; align-items: center; text-align: left; border: 0; background: none; padding: .35rem .1rem; border-radius: 10px; }
.gs-row:active { background: var(--surface-2); }
.gs-name { font-weight: 700; font-size: .92rem; min-width: 0; }
.gs-mist { color: var(--bad); font-weight: 700; font-size: .8rem; }
.gs-bar { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.gs-fill { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.gs-pct { font-weight: 900; font-size: .85rem; text-align: right; color: var(--muted); }
.gs-good { --c: var(--good); } .gs-mid { --c: var(--gold-dark); } .gs-low { --c: var(--bad); } .gs-new { --c: var(--line); }
.repair-intro { display: flex; flex-direction: column; gap: .6rem; }
.repair-rule { border-color: var(--pink); box-shadow: 0 3px 0 var(--pink); display: flex; flex-direction: column; gap: .3rem; }

/* ---------- Poco the snail professor (js/mascot.js) ---------- */
.mascot { overflow: visible; display: block; }
.mascot .m-body { transform-box: fill-box; transform-origin: 50% 100%; animation: brezi-bob 2.8s ease-in-out infinite; }
.mascot-cheer .m-body, .mascot-wow .m-body { animation: brezi-jump .9s cubic-bezier(.3,1.6,.6,1) 2; }
.mascot-happy .m-eyes, .mascot-wow .m-eyes, .mascot-think .m-eyes, .mascot-sad .m-eyes { transform-box: fill-box; transform-origin: center; animation: brezi-blink 4.5s infinite; }
.mascot-sleep .m-body { animation-duration: 4.5s; }
@keyframes brezi-bob { 50% { transform: translateY(-2px) scale(1.01, .99); } }
@keyframes brezi-jump { 40% { transform: translateY(-10px) scale(.97, 1.04); } 70% { transform: translateY(0) scale(1.03, .97); } }
@keyframes brezi-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.coach { display: flex; align-items: center; gap: .6rem; margin-top: -.2rem; }
.coach-mascot { flex: none; filter: drop-shadow(0 4px 6px rgba(150, 70, 20, .18)); }
/* Android: "Plus" tag on AI features, report button on AI replies */
.plus-tag { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 999px; background: var(--gold); color: #3B2412; font-size: .72rem; font-weight: 900; vertical-align: .1em; letter-spacing: .02em; }
.report-ai { opacity: .55; } .report-ai:hover, .report-ai:focus-visible { opacity: 1; }
.support-id { user-select: all; -webkit-user-select: all; word-break: break-all; }

/* tapping words instead of typing: the gap fills with the chosen word; the reader's word popup */
.gap.filled { color: var(--accent); font-weight: 900; border-bottom: 3px solid var(--accent); padding: 0 .15em; }
.word-sent { background: var(--accent-soft, rgba(190, 67, 26, .08)); border-radius: 12px; padding: .5rem .7rem; margin: .2rem 0; }
.foot-secondary .row { justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ---------- the runner game (js/runner.js) ---------- */
/* wide button on the games screen: a still of the game under a wash of the hero terracotta (white text in both themes) */
.runner-hero { position: relative; display: flex; align-items: flex-end; width: 100%; min-height: 158px; padding: 1rem 1.1rem; border: 0; border-radius: 24px; overflow: hidden; text-align: left; color: var(--hero-ink); background: var(--hero-a); box-shadow: 0 6px 0 var(--hero-dark); transition: transform .08s, box-shadow .08s; isolation: isolate; }
.runner-hero:active { transform: translateY(6px); box-shadow: 0 0 0 var(--hero-dark); }
.runner-hero.featured { outline: 3px solid var(--gold); outline-offset: 3px; }
.runner-hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.runner-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(190, 67, 26, .96) 0%, rgba(190, 67, 26, .9) 34%, rgba(190, 67, 26, .55) 62%, rgba(190, 67, 26, .2) 100%); }
.runner-hero-text { display: flex; flex-direction: column; gap: .15rem; max-width: 62%; }
.runner-hero-text strong { font-size: 1.5rem; font-weight: 900; line-height: 1.1; text-shadow: 0 2px 0 rgba(100, 30, 5, .45); }
.runner-hero-text .rh-sub, .runner-hero .en-hint { color: var(--hero-ink); font-weight: 700; font-size: .92rem; }
.runner-hero .rh-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.runner-hero .game-best { position: static; background: rgba(70, 22, 4, .5); color: var(--hero-ink); border-radius: 999px; padding: .1rem .55rem; font-size: .78rem; font-weight: 800; }
.runner-hero .pill { background: var(--gold); color: #3A2600; }
/* the game itself */
.game-body.runner-body { padding: 0; overflow: hidden; display: flex; }
.runner { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: #58B4F0; }
.runner-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.runner-hud-canvas { pointer-events: none; }
.runner-opts { position: absolute; left: 0; right: 0; top: 44px; padding: 0 8px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.runner-q { align-self: center; background: rgba(255, 255, 255, .95); color: #2B1B14; border-radius: 999px; padding: .15rem .8rem; font-weight: 900; font-size: 1rem; box-shadow: 0 3px 0 rgba(100, 40, 10, .28); }
.runner-q span { font-weight: 700; color: #6B5546; }
.runner-opt-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.runner-opt { pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 58px; padding: .25rem .3rem; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .96); color: #2B1B14; box-shadow: 0 4px 0 #8F2F0E; font: 900 1.02rem/1.15 var(--font-display, inherit); text-align: center; overflow-wrap: anywhere; hyphens: auto; animation: runner-pop .25s cubic-bezier(.34, 1.56, .64, 1); }
.runner-opt.empty { visibility: hidden; }
.runner-opt .ro-arrow { font-size: .8rem; color: #A0705A; line-height: 1; }
.runner-opt:active { transform: translateY(3px); box-shadow: 0 1px 0 #8F2F0E; }
@keyframes runner-pop { from { transform: scale(.7); opacity: 0; } }
/* the start card sits at the top, so Poco (facing you and waving) stays visible below it */
.runner-card { position: absolute; inset: 0; display: grid; place-items: start center; padding: 14px 16px; background: linear-gradient(rgba(60, 28, 10, .38), rgba(60, 28, 10, .12) 55%, rgba(60, 28, 10, 0)); }
.runner-card[hidden] { display: none; }
.runner-card-in { width: min(100%, 400px); background: var(--surface); color: var(--ink); border-radius: 24px; padding: 1.1rem 1.2rem 1.2rem; box-shadow: 0 6px 0 rgba(100, 40, 10, .3); display: flex; flex-direction: column; gap: .5rem; }
.runner-card-in h2 { margin: 0; font-size: 1.5rem; }
.runner-card-in p { margin: 0; color: var(--muted); font-weight: 700; font-size: .95rem; }
.runner-missed { display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; justify-content: center; font-size: 1.1rem; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .runner-opt { animation: none; } }
.coach-bubble { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: .55rem .8rem; box-shadow: 0 3px 0 var(--line); }
.coach-bubble::before { content: ""; position: absolute; left: -8px; top: 50%; width: 12px; height: 12px; background: var(--surface); border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: translateY(-50%) rotate(45deg); }
.coach-bubble strong { font-size: 1.02rem; }
.summary-mascot { animation: trophy .5s cubic-bezier(.34,1.56,.64,1) both; }
@media (prefers-reduced-motion: reduce) { .mascot .m-body, .mascot .m-eyes { animation: none !important; } }

/* ---------- polish pass (v2.3) ---------- */
/* task subtitles may wrap (up to 3 lines) so their English hint isn't cut off */
.task-text .small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: clip; }
/* Speaking-tab entry cards: coloured 3D icon tiles like the Today tasks */
.pendel-entry > .row { align-items: center; gap: .8rem; }
.pendel-entry > .row > .ic { --c: var(--accent); --cd: var(--accent-dark); width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--c); color: var(--on-fill); box-shadow: 0 3px 0 var(--cd); flex: none; }
.pe-tutor > .row > .ic { --c: var(--pink); --cd: var(--pink-dark); }
.pe-pendel > .row > .ic { --c: var(--teal); --cd: var(--teal-dark); }
.pe-abc > .row > .ic { --c: var(--sky); --cd: var(--sky-dark); }
.diary-entry > .row > .ic { --c: var(--orange); --cd: var(--orange-dark); --on-fill: var(--on-bright); }
.missions-entry .mission-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--gold-soft); box-shadow: 0 3px 0 color-mix(in srgb, var(--gold) 50%, transparent); flex: none; }
/* lesson start: level-coloured band with Poco and a picture preview of the new words */
.step.intro { --lv: var(--accent); --lv-ink: var(--accent); --lv-soft: var(--accent-soft); }
.step.intro.lv-a1 { --lv: var(--teal); --lv-ink: var(--teal); } .step.intro.lv-a2 { --lv: var(--sky); --lv-ink: var(--sky); } .step.intro.lv-b2 { --lv: var(--orange); --lv-ink: var(--orange-ink); }
.intro-band { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: 22px; background: color-mix(in srgb, var(--lv) 14%, var(--surface)); border: 2px solid color-mix(in srgb, var(--lv) 35%, var(--line)); margin-bottom: .4rem; }
.intro-mascot { flex: none; }
.intro-pics { display: flex; flex-wrap: wrap; gap: .3rem .5rem; font-size: 2rem; line-height: 1; }
.step.intro .eyebrow { color: var(--lv-ink); }

/* reader player: one compact row of controls + one swipeable row of toggles, so the text keeps most of the screen */
.reader-layer .player, .session-layer .player { padding-top: .4rem; padding-bottom: calc(.4rem + env(safe-area-inset-bottom, 0px)); gap: .35rem; }
.player-row { flex-wrap: nowrap; }
.player-row .seg-group { flex-wrap: nowrap; margin-left: auto; }
.player-row .seg { padding: .35rem .55rem; font-size: .82rem; }
@media (max-width: 350px) { .player-row .seg { padding: .3rem .4rem; } } /* 320 px phones: speed buttons with hints fit */
.player-row .seg, .player-row.small .chip-btn { flex-direction: column; line-height: 1.1; }
.en-hints .player-row .en-hint { display: block; margin: 0; font-size: .6rem; line-height: 1.1; }
.en-hints .player-row .en-hint::before, .en-hints .player-row .en-hint::after { content: none; }
.player-row.small { overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.player-row.small::-webkit-scrollbar { display: none; }
.player-row.small .chip-btn { flex: none; min-height: 34px; padding: .2rem .65rem; font-size: .85rem; display: inline-flex; align-items: center; }
.player-play { box-shadow: 0 3px 0 var(--accent-dark); }

/* v2.3 pacing: Extra tasks, coach button, time picker, welcome */
.plan-extra { margin-top: .6rem; }
.plan-extra > summary { list-style: none; cursor: pointer; font-weight: 800; color: var(--muted); padding: .45rem .2rem; display: flex; align-items: center; gap: .4rem; }
.plan-extra > summary::-webkit-details-marker { display: none; }
.plan-extra > summary::before { content: "＋"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-2); color: var(--accent); font-size: .9rem; }
.plan-extra[open] > summary::before { content: "−"; }
.plan-extra .tasks { gap: .55rem; display: flex; flex-direction: column; margin-top: .3rem; }
.plan-extra .task { opacity: .92; }
.coach-go { margin-top: .5rem; align-self: flex-start; min-height: 44px; padding: .4rem 1.1rem; }
.time-pick .seg { display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .5rem .3rem; }
.time-pick .seg b { font-size: 1.05rem; font-weight: 900; }
.time-pick .seg span { font-size: .78rem; }
.welcome-hero { display: flex; align-items: center; gap: .8rem; }
.welcome-hero .mascot { flex: none; }
.welcome h3 { margin: .6rem 0 .3rem; }

/* ---------- profile, misc ---------- */
.rank-mark { font-weight: 900; }
.heat i, .heat span { border-radius: 4px; }

/* ---------- styles injected at run time by js/plus.js ---------- */
/* plus.js adds its own <style> after this file, so these use one extra :root to win. They only swap the
   hard-coded white / violet values for the palette tokens (see the note for the JS owners in the hand-over). */
:root .plus-hero .mascot { filter: drop-shadow(0 6px 10px rgba(150, 70, 20, .2)); }
:root .plus-benefit-ic { color: var(--on-fill); }
:root .plus-benefit-ic.b-ads { --on-fill: var(--on-bright); }
:root .plus-plan .pp-trial { color: var(--good-ink); }
:root .reward-offer.done .ro-ic { color: var(--on-fill); }

@media (prefers-reduced-motion: reduce) {
  .path-bubble, .summary-badge, .option.right, .option.wrong, .session-foot .feedback { animation: none !important; }
}
