/* Little Goose — shared styles */
:root {
  --bg: #f6eee1;
  --bg-2: #efe3cf;
  --surface: #fffaf2;
  --surface-2: #f8efe1;
  --line: #e2d3bc;
  --text: #2a211c;
  --muted: #6b5a4d;
  --accent: #a24e2a;
  --accent-strong: #c8693f;
  --accent-ink: #fffaf2;
  --clay: #c8693f;
  --clay-dark: #8f4426;
  --clay-light: #e9a27c;
  --root: #d9784a;
  --moss: #5e9a4c;
  --ember: #dfa52f;
  --tide: #3f8fc4;
  --sky: #9a7ed8;
  --good: #3f8a4a;
  --bad: #b8432f;
  --shadow: 0 1px 2px rgba(60, 35, 20, .08), 0 6px 20px rgba(60, 35, 20, .08);
  --shadow-lg: 0 10px 40px rgba(60, 35, 20, .18);
  --radius: 18px;
  --radius-sm: 10px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1d1c;
  --bg-2: #132523;
  --surface: #182c2a;
  --surface-2: #1e3532;
  --line: #2c4642;
  --text: #f3eadb;
  --muted: #b2bfb1;
  --accent: #f2a77a;
  --accent-strong: #e0855a;
  --accent-ink: #1a1210;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .45);
  --bad: #f07a63;
  --good: #7fcf88;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1d1c;
    --bg-2: #132523;
    --surface: #182c2a;
    --surface-2: #1e3532;
    --line: #2c4642;
    --text: #f3eadb;
    --muted: #b2bfb1;
    --accent: #f2a77a;
    --accent-strong: #e0855a;
    --accent-ink: #1a1210;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .45);
    --bad: #f07a63;
    --good: #7fcf88;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(200, 105, 63, .10), transparent 40%),
    radial-gradient(circle at 100% 30%, rgba(94, 154, 76, .08), transparent 35%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 7vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 650; }
h3 { font-size: 1.3rem; font-weight: 650; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5em 1em; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .6rem clamp(.8rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; order: 3; width: 100%; margin: 0 -.3rem; padding-bottom: .1rem; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .95rem; padding: .35rem .7rem; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-strong); }
.header-actions { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
@media (min-width: 980px) {
  .nav { order: 0; width: auto; margin: 0 0 0 1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  --b: var(--accent-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.2;
  padding: .75em 1.25em; min-height: 44px;
  border-radius: 999px; border: 2px solid var(--b);
  background: var(--b); color: var(--accent-ink);
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--b) 60%, #000);
}
.btn:hover { transform: translateY(-1px); color: var(--accent-ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--b) 60%, #000); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-small { padding: .4em .9em; min-height: 36px; font-size: .9rem; }
.btn-mic[aria-pressed="true"] { --b: var(--good); }
.icon-btn { font: inherit; font-size: 1.15rem; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ---------- Layout ---------- */
main { display: block; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }
.section { padding: clamp(2rem, 6vw, 4rem) 0; }
.eyebrow { font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--accent); margin-bottom: .4rem; }
.lede { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 40em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.6rem); box-shadow: var(--shadow); }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.chip { display: inline-flex; align-items: center; gap: .3em; padding: .25em .7em; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; font-weight: 700; color: var(--muted); }
button.chip { cursor: pointer; font-family: inherit; }
button.chip[aria-pressed="true"] { background: var(--accent-strong); color: var(--accent-ink); border-color: var(--accent-strong); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; margin-top: 3rem; color: var(--muted); font-size: .92rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: .8rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(1.5rem, 5vw, 3.5rem) 0 1rem; text-align: center; }
.hero h1 { margin-bottom: .2em; }
.hero h1 .goose { color: var(--accent-strong); font-style: italic; }
.hero .lede { margin-inline: auto; }
.launch-badge { display: inline-flex; align-items: center; gap: .5em; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3em .9em .3em .4em; font-weight: 700; font-size: .9rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.launch-badge .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--clay); display: grid; place-items: center; color: #fff; font-size: .7rem; }

/* ---------- Glyphs ---------- */
.glyph { display: inline-grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; background: var(--c, var(--clay)); color: #fff; font-size: .95rem; line-height: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .3); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); flex: none; }
.glyph.sm { font-size: .75rem; }
.glyph.lg { font-size: 1.25rem; }
.glyph.hidden-note { background: var(--surface-2); color: var(--muted); border: 2px dashed var(--line); box-shadow: none; text-shadow: none; }
.glyph-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.glyph.on { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- Pad (the ocarina) ---------- */
.pad { position: relative; max-width: 560px; margin: 0 auto; }
.pad-body {
  position: relative;
  display: grid; grid-template-columns: 1fr 1.25fr; align-items: center; gap: .5rem;
  padding: 1.6rem 1.4rem 1.6rem 2rem;
  border-radius: 46% 54% 50% 50% / 60% 60% 40% 40%;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, .35), transparent 45%),
    radial-gradient(ellipse at 70% 90%, rgba(0, 0, 0, .18), transparent 55%),
    linear-gradient(160deg, var(--clay-light), var(--clay) 45%, var(--clay-dark));
  box-shadow: inset 0 -10px 24px rgba(0, 0, 0, .22), inset 0 8px 18px rgba(255, 255, 255, .2), var(--shadow-lg);
  min-height: 230px;
}
.pad-body::before { /* mouthpiece */
  content: ""; position: absolute; left: -18px; top: 38%; width: 48px; height: 34px; border-radius: 12px 6px 6px 12px;
  background: linear-gradient(180deg, var(--clay-light), var(--clay-dark)); z-index: -1;
}
.pad-body::after { /* voicing window */
  content: ""; position: absolute; left: 30px; top: 22px; width: 26px; height: 12px; border-radius: 3px;
  background: rgba(40, 18, 8, .55); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6);
}
.pad-root { display: grid; place-items: center; }
.pad-diamond { display: grid; grid-template-columns: repeat(3, auto); grid-template-rows: repeat(3, auto); gap: .1rem; justify-content: center; align-content: center; }
.pad-diamond .s4 { grid-column: 2; grid-row: 1; }
.pad-diamond .s3 { grid-column: 1; grid-row: 2; }
.pad-diamond .s2 { grid-column: 3; grid-row: 2; }
.pad-diamond .s1 { grid-column: 2; grid-row: 3; }
.stone {
  --c: var(--clay);
  position: relative;
  width: clamp(58px, 15vw, 74px); height: clamp(58px, 15vw, 74px);
  border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000));
  color: #fff; font-size: clamp(1.3rem, 4vw, 1.7rem); line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .22), 0 4px 0 rgba(60, 25, 10, .45), 0 0 0 4px rgba(50, 20, 8, .25);
  transition: transform .1s ease, box-shadow .2s ease, filter .2s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  display: grid; place-items: center;
}
.stone .k { position: absolute; bottom: -1.45rem; left: 50%; transform: translateX(-50%); font-size: .68rem; font-weight: 800; color: #fff5e8; text-shadow: none; opacity: .85; white-space: nowrap; letter-spacing: .03em; }
.pad-root .stone { width: clamp(76px, 20vw, 96px); height: clamp(76px, 20vw, 96px); font-size: clamp(1.6rem, 5vw, 2.1rem); }
.stone:hover { filter: brightness(1.08); }
.stone:active, .stone.is-lit { transform: translateY(3px) scale(.96); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .22), 0 1px 0 rgba(60, 25, 10, .45), 0 0 0 4px rgba(255, 255, 255, .6), 0 0 26px 8px color-mix(in srgb, var(--c) 70%, transparent); }
.stone.is-target { animation: beckon 1.2s ease-in-out infinite; }
@keyframes beckon { 50% { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .22), 0 4px 0 rgba(60, 25, 10, .45), 0 0 0 6px rgba(255, 255, 255, .7); } }
.pad[data-disabled="true"] .stone { opacity: .55; cursor: wait; }
.pad-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.2rem; }
.mic-status { font-size: .9rem; color: var(--muted); font-weight: 700; min-height: 1.4em; text-align: center; width: 100%; }
.mic-status.err { color: var(--bad); }

/* pitch meter */
.meter { margin: .9rem auto 0; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem .4rem; }
.meter-track { position: relative; height: 54px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--bg-2)); overflow: hidden; }
.meter-mark { position: absolute; top: 6px; bottom: 6px; width: 34px; margin-left: -17px; border-radius: 8px; background: color-mix(in srgb, var(--c) 22%, transparent); border: 2px solid color-mix(in srgb, var(--c) 60%, transparent); display: grid; place-items: center; color: var(--c); font-weight: 800; transition: background .15s, transform .15s; }
.meter-mark.hit { background: var(--c); color: #fff; transform: scale(1.08); }
.meter-needle { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--text); border-radius: 2px; opacity: 0; transition: left .06s linear, opacity .2s; }
.meter-needle.live { opacity: .85; }
.meter-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); margin-top: .35rem; flex-wrap: wrap; }
.level { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.level i { display: block; height: 100%; width: 0; background: var(--good); transition: width .08s; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; font-weight: 700; }

/* calibrate overlay */
.calib { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 94%, transparent); border-radius: var(--radius); padding: 1rem; text-align: center; }
.calib[hidden] { display: none; }
.calib .ring { width: 92px; height: 92px; border-radius: 50%; margin: .6rem auto; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; background: conic-gradient(var(--good) var(--p, 0%), var(--surface-2) 0); }
.calib .ring span { width: 74px; height: 74px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 1rem; }

/* ribbon */
.ribbon { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; min-height: 2.6em; margin: 1rem 0 .4rem; }
.ribbon .glyph { font-size: 1.05rem; }
.slot { width: 2.2em; height: 2.2em; border-radius: 50%; border: 2px dashed var(--line); display: inline-grid; place-items: center; color: var(--muted); font-weight: 800; }
.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- Songbook ---------- */
.songbook { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.song-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem .9rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .5rem; transition: transform .2s, border-color .2s; }
.song-card h3 { margin: 0; font-size: 1.12rem; }
.song-card p { margin: 0; font-size: .92rem; color: var(--muted); }
.song-card .btn-row { margin-top: auto; }
.song-card.played { border-color: var(--good); }
.song-card.played::after { content: "✓ played"; position: absolute; top: .7rem; right: .8rem; font-size: .75rem; font-weight: 800; color: var(--good); }
.song-card.practising { outline: 3px solid var(--accent-strong); }
.song-card .glyph-row .glyph.done { outline: 3px solid var(--text); outline-offset: 1px; }

.banner { text-align: center; min-height: 3.2em; font-family: var(--font-display); font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 650; }
.banner .b-song { color: var(--accent); }
.banner.flash { animation: pop .5s ease; }

/* mode cards */
.mode-card { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--text); transition: transform .2s ease, box-shadow .2s ease; }
.mode-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.mode-card .icon { font-size: 2rem; }
.mode-card p { color: var(--muted); margin: 0; }

/* ---------- Quest ---------- */
.q-top { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.q-progress { flex: 1 1 100%; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.q-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--clay), var(--ember)); transition: width .5s ease; }
.stage { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 400 / 220; background: #9cc8e0; }
.stage svg { display: block; width: 100%; height: 100%; }
.scene-text { margin-top: 1rem; }
.scene-text .place { font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.song-panel { margin: 1rem 0; padding: 1rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.song-panel h3 { margin-bottom: .4rem; font-size: 1.1rem; }
.known-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.feedback { min-height: 1.6em; font-weight: 700; text-align: center; margin: .4rem 0; }
.feedback.good { color: var(--good); }
.feedback.bad { color: var(--bad); }
.stars { letter-spacing: .1em; color: var(--ember); font-size: 1.1rem; white-space: nowrap; }
.stars .off { color: var(--line); }
.result-card { text-align: center; background: linear-gradient(160deg, var(--surface), var(--surface-2)); border: 2px solid var(--clay); border-radius: 24px; padding: clamp(1.2rem, 4vw, 2.2rem); box-shadow: var(--shadow-lg); }
.result-card .big { font-family: var(--font-display); font-size: clamp(2.6rem, 9vw, 4rem); font-weight: 700; line-height: 1; color: var(--accent-strong); }
.result-card .title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.mode-pick { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 1rem 0; }
.mode-pick label { display: block; cursor: pointer; }
.mode-pick input { position: absolute; opacity: 0; }
.mode-pick .card { height: 100%; border-width: 2px; }
.mode-pick input:checked + .card { border-color: var(--accent-strong); background: color-mix(in srgb, var(--accent-strong) 10%, var(--surface)); }
.mode-pick input:focus-visible + .card { outline: 3px solid var(--accent-strong); outline-offset: 2px; }
.friend { border-left: 5px solid var(--ember); }

/* scene art */
.art .sky-dawn { fill: url(#gDawn); }
.art .solvable { transition: transform 1.2s cubic-bezier(.3, 1.4, .5, 1), opacity 1s ease; transform-box: fill-box; transform-origin: 50% 100%; }
.art .after, .art .before { transition: opacity 1s ease, transform 1.2s cubic-bezier(.3, 1.4, .5, 1); }
.art .after { opacity: 0; }
.art.solved .after { opacity: 1; }
.art.solved .before { opacity: 0; }
.art .deck { transform: translateY(44px); }
.art.solved .deck { transform: none; }
.art.solved .flood { transform: translateY(48px); }
.art.solved .boat { transform: translateX(170px); }
.art.solved .ice { transform: scaleY(.03); opacity: .2; }
.art .lift { transform: translateY(62px); }
.art.solved .lift { transform: translateY(-36px); }
.art.solved .gate-l, .art.solved .gate-r { transform: scaleX(.18); }
.art .after.solvable { transform: scale(.4); }
.art.solved .after.solvable { transform: none; }
.art .flicker { animation: flicker .25s infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flicker { from { transform: scaleY(1) skewX(-3deg); } to { transform: scaleY(1.12) skewX(3deg); } }
.art .bob { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
.art .zz { animation: zz 2.4s ease-in-out infinite; }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -18px); } }
.art .twinkle { animation: twinkle 2s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .25; } }

/* ---------- Echo ---------- */
.spirit-wrap { display: grid; place-items: center; margin: .5rem 0 1rem; }
.spirit { width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--c, #fff) 80%, #fff) 0 22%, color-mix(in srgb, var(--c, #bfe6c9) 45%, transparent) 45%, transparent 70%); transition: background .2s; position: relative; }
.spirit .face { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #e8f6ea 60%, #bfe0c6); box-shadow: 0 0 40px 12px rgba(200, 240, 210, .45); display: grid; place-items: center; font-size: 1.3rem; color: #2a4a35; animation: float 3.5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.spirit.sing .face { box-shadow: 0 0 60px 22px color-mix(in srgb, var(--c, #fff) 70%, transparent); }
.hearts { color: var(--bad); font-size: 1.2rem; letter-spacing: .1em; }
.hearts .off { opacity: .2; }
.score-big { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1; }
.scoreboard { display: flex; gap: 1.2rem; justify-content: center; align-items: flex-end; flex-wrap: wrap; text-align: center; }
.scoreboard .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; }

/* ---------- Forms ---------- */
input[type="text"], input[type="search"] {
  font: inherit; font-size: 1.15rem; padding: .7em 1em; border-radius: 12px; min-height: 48px;
  border: 2px solid var(--line); background: var(--surface); color: var(--text); width: 100%;
}
input[type="text"]:focus { border-color: var(--accent-strong); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-strong) 30%, transparent); }
input[type="range"] { width: 100%; accent-color: var(--accent-strong); }
label.field { display: block; font-weight: 800; margin-bottom: .3rem; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.inline-form input { flex: 1 1 220px; width: auto; }

/* ---------- Lab ---------- */
.lab-ocarina { position: relative; max-width: 520px; margin: 0 auto; }
.lab-ocarina svg { width: 100%; height: auto; display: block; }
.lab-ocarina .hole { cursor: pointer; transition: fill .15s; }
.lab-ocarina .hole:focus-visible { outline: none; stroke: var(--accent-strong); stroke-width: 4; }
.readout { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; text-align: center; margin: .8rem 0; }
.readout .v { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.1; }
.readout .l { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: .6rem .9rem; border-radius: 10px; overflow-x: auto; font-size: .95rem; }
.range-viz { position: relative; height: 70px; margin: 1rem 0; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.range-viz .band { position: absolute; top: 10px; height: 22px; border-radius: 6px; }
.range-viz .band.you { background: var(--accent-strong); }
.range-viz .band.oc { top: 38px; background: var(--tide); }
.range-viz .band span { position: absolute; left: 6px; top: 1px; font-size: .75rem; font-weight: 800; color: #fff; white-space: nowrap; }
.timeline { list-style: none; padding: 0; margin: 1rem 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 3px; background: var(--line); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 1.4rem 44px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: .35rem; width: 19px; height: 19px; border-radius: 50%; background: var(--tc, var(--clay)); border: 3px solid var(--bg); }
.timeline .when { font-weight: 800; color: var(--accent); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.timeline h3 { margin: .1rem 0 .2rem; font-size: 1.15rem; }
.timeline p { margin: 0; color: var(--muted); }
.timeline li[hidden] { display: none; }

/* ---------- Quiz ---------- */
.quiz-q { font-family: var(--font-display); font-size: clamp(1.25rem, 3.5vw, 1.6rem); font-weight: 650; line-height: 1.3; margin-bottom: 1rem; }
.answers { display: grid; gap: .6rem; }
.answer { font: inherit; text-align: left; padding: .85rem 1rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 700; min-height: 48px; transition: border-color .15s, background .15s; }
.answer:hover:not([disabled]) { border-color: var(--accent-strong); }
.answer.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 16%, var(--surface)); }
.answer.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.answer[disabled] { cursor: default; }
.explain { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--surface-2); }
.qbar { display: flex; gap: 4px; margin-bottom: 1rem; }
.qbar i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); }
.qbar i.right { background: var(--good); }
.qbar i.wrong { background: var(--bad); }
.qbar i.cur { background: var(--accent-strong); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 150%); background: var(--text); color: var(--bg); padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; z-index: 100; transition: transform .3s ease; max-width: calc(100% - 2rem); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* prose */
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.notice { padding: .9rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: .95rem; }

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