/* ------------------------------------------------------------ Tokens */
:root {
  --ink: #2B1B0E;
  --ink-soft: #5E4A3A;
  --paper: #FFFFFF;
  --bg: #FFF5D9;
  --bg2: #FFE9A8;
  --accent: #E07A1F;
  --accent-ink: #FFFFFF;
  --card: #FFFFFF;
  --card-ink: #2B1B0E;
  --line: rgba(43, 27, 14, 0.12);
  --focus: #1B1452;

  --a0: #D7263D; --a0-ink: #FFFFFF;
  --a1: #1B6FD8; --a1-ink: #FFFFFF;
  --a2: #F2B100; --a2-ink: #2B1B0E;
  --a3: #138A36; --a3-ink: #FFFFFF;

  --right: #138A36;
  --wrong: #C0392B;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 6px 0 rgba(43, 27, 14, 0.14);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Trebuchet MS", system-ui, sans-serif;
  color-scheme: light;
}

body[data-theme="money"]    { --bg: #E3FAF3; --bg2: #BDF0E6; --accent: #12857F; }
body[data-theme="stocks"]   { --bg: #FFF1DA; --bg2: #FFD39A; --accent: #B85C0F; }
body[data-theme="lemonade"] { --bg: #FFF8D6; --bg2: #FFE68A; --accent: #B27600; }
body[data-theme="gravity"]  {
  --bg: #1E1650; --bg2: #3E2A8C; --accent: #8E6CFF;
  --ink: #FFFFFF; --ink-soft: #D8D2FF; --line: rgba(255, 255, 255, 0.2);
  --focus: #FFD43B;
}

/* ------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 45%);
  background-attachment: fixed;
  transition: background-color .3s;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1:focus, h2:focus, p:focus, div:focus { outline: none; box-shadow: none; }
p { margin: 0 0 .6em; }
a { color: inherit; }

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .85);
}

.sr-only, .sr-only-input {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--paper); color: #2B1B0E; padding: 10px 16px; border-radius: 10px; font-weight: 800;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------ Top bar */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right));
  max-width: 1200px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.5rem; border-radius: 12px; }
.brand-mark svg { width: 40px; height: 40px; display: block; }
.sound-toggle {
  font: inherit; font-size: 1rem; font-weight: 800;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 8px 16px;
  border-radius: 999px; border: 3px solid var(--ink); background: var(--card); color: var(--card-ink);
  cursor: pointer;
}
.sound-icon::before { content: "🔈"; }
.sound-toggle.on .sound-icon::before { content: "🔊"; }
.sound-toggle.on { background: #FFD43B; }

.banner {
  position: sticky; top: 0; z-index: 10;
  margin: 0 auto; max-width: 720px;
  background: #1B1452; color: #fff; text-align: center; font-weight: 800;
  padding: 10px 16px; border-radius: 0 0 16px 16px;
}

/* ------------------------------------------------------------ Layout */
main { position: relative; z-index: 2; outline: none; }

.screen {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 16px calc(26vh + 16px);
  display: flex; flex-direction: column; gap: 20px;
  animation: screen-in .25s ease-out;
}
.screen.center { min-height: 50vh; justify-content: center; align-items: center; }

body { position: relative; }
.world-backdrop {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  height: 26vh; min-height: 140px;
  pointer-events: none;
}
.world-backdrop svg { width: 100%; height: 100%; display: block; }
.world-backdrop:empty { display: none; }

.card {
  background: var(--card); color: var(--card-ink);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 3px solid rgba(43, 27, 14, .08);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }

.muted { color: var(--ink-soft); }
.card .muted, .card .help { color: #5E4A3A; }
.help { font-size: 1rem; color: var(--ink-soft); margin: 4px 0 0; }

.notice {
  background: #1B1452; color: #fff; font-weight: 800;
  padding: 14px 18px; border-radius: var(--radius-sm); text-align: center;
}
.error {
  background: #FDE2E0; color: #8E1B12; font-weight: 800;
  padding: 10px 14px; border-radius: var(--radius-sm); border: 2px solid #E6A19A;
}

/* ------------------------------------------------------------ Buttons */
.btn {
  font: inherit; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 12px 26px;
  border-radius: 999px; border: 3px solid var(--card-ink);
  background: var(--card); color: var(--card-ink);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 5px 0 var(--card-ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--card-ink); }
.btn.big { min-height: 68px; font-size: 1.5rem; padding: 14px 36px; }
.btn.primary { background: #FFD43B; color: #2B1B0E; border-color: #2B1B0E; box-shadow: 0 5px 0 #2B1B0E; }
.btn.secondary { background: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn[aria-disabled="true"]:active { transform: none; box-shadow: 0 5px 0 var(--card-ink); }

/* ------------------------------------------------------------ Kip */
.kip-says { display: flex; align-items: flex-end; gap: 12px; }
.kip-art { flex: 0 0 auto; width: 96px; }
.kip-art svg, .hero-kip svg, .mini-kip svg { display: block; width: 100%; height: auto; }
.kip-says.size-lg .kip-art { width: 128px; }
.bubble {
  position: relative;
  background: #fff; color: #2B1B0E;
  border: 3px solid #2B1B0E;
  border-radius: 22px;
  padding: 14px 18px;
  font-weight: 700;
  margin: 0 0 30px;
  max-width: 640px;
}
.bubble::before {
  content: ""; position: absolute; left: -16px; bottom: 16px;
  border: 10px solid transparent; border-right: 14px solid #2B1B0E;
}
.bubble::after {
  content: ""; position: absolute; left: -10px; bottom: 18px;
  border: 8px solid transparent; border-right: 11px solid #fff;
}
.size-lg .bubble { font-size: 1.35rem; }
.kip-says .kip-art { animation: hop .5s ease-out; }

/* ------------------------------------------------------------ Home */
.hero { display: flex; align-items: center; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.hero-kip { width: min(220px, 42vw); }
.hero-text { flex: 1 1 320px; max-width: 560px; }
.hero-text .bubble { margin-bottom: 0; }
.hero-text .bubble::before, .hero-text .bubble::after { display: none; }
.logo-title {
  font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 900; letter-spacing: -.02em; margin: 0;
  color: #2B1B0E;
  text-shadow: 4px 4px 0 #FFD43B;
}
.tagline { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; color: var(--accent); margin: 0 0 14px; }

.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.mode-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px; border-radius: var(--radius);
  text-decoration: none; color: #2B1B0E;
  border: 4px solid #2B1B0E; box-shadow: 0 7px 0 #2B1B0E;
  transition: transform .1s;
}
.mode-card:hover { transform: translateY(-3px); }
.mode-card:active { transform: translateY(4px); box-shadow: 0 2px 0 #2B1B0E; }
.mode-join { background: #FFD43B; }
.mode-host { background: #8FE3FF; }
.mode-solo { background: #FFB5CF; }
.mode-icon { font-size: 2.6rem; line-height: 1; }
.mode-title { font-size: 1.8rem; font-weight: 900; }
.mode-desc { font-size: 1.05rem; font-weight: 700; }

.world-strip { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.world-chip { background: #fff; color: #2B1B0E; border-radius: var(--radius-sm); overflow: hidden; border: 3px solid rgba(43, 27, 14, .12); }
.world-chip-art svg { display: block; width: 100%; height: 72px; }
.world-chip-name { display: block; padding: 8px 12px; font-weight: 800; font-size: 1rem; }

/* ------------------------------------------------------------ Forms */
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend { font-size: 1.35rem; font-weight: 900; margin-bottom: 12px; padding: 0; }
.field-label { display: block; font-weight: 900; font-size: 1.2rem; margin-bottom: 8px; }

.join-card { max-width: 520px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.join { align-items: center; }
.join .kip-says { max-width: 520px; width: 100%; }
.code-input {
  font: inherit; font-size: clamp(2.4rem, 10vw, 3.4rem); font-weight: 900;
  letter-spacing: .25em; text-align: center;
  width: 100%; padding: 12px 8px 12px calc(8px + .25em);
  border-radius: var(--radius-sm); border: 4px solid #2B1B0E; background: #FFFBEA; color: #2B1B0E;
}
.code-input::placeholder { color: #CDBF9C; }

.setup-card { display: flex; flex-direction: column; }
.quiz-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.quiz-card {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  height: 100%;
  background: #fff; color: #2B1B0E; text-decoration: none;
  border: 4px solid rgba(43, 27, 14, .18); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; padding-bottom: 14px;
  box-shadow: var(--shadow);
  transition: transform .1s, border-color .1s;
}
.quiz-card:hover { transform: translateY(-3px); }
.quiz-card.selected { border-color: #2B1B0E; box-shadow: 0 0 0 4px #FFD43B, var(--shadow); }
.quiz-card.selected::after {
  content: "✓ Picked"; position: absolute; top: 10px; right: 10px;
  background: #2B1B0E; color: #fff; font-weight: 900; font-size: .95rem; padding: 4px 12px; border-radius: 999px;
}
.quiz-card:has(input:focus-visible) { outline: 4px solid var(--focus); outline-offset: 3px; }
.quiz-art svg { display: block; width: 100%; height: 120px; }
.quiz-title { font-size: 1.45rem; font-weight: 900; padding: 10px 14px 0; }
.quiz-blurb { font-size: 1.05rem; font-weight: 700; padding: 0 14px; }
.quiz-meta { font-size: .95rem; color: #5E4A3A; padding: 0 14px; }

.settings-list { display: grid; gap: 14px; }
.setting { background: rgba(43, 27, 14, .04); border-radius: var(--radius-sm); padding: 14px 16px; color: #2B1B0E; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 900; font-size: 1.3rem; position: relative; }
.switch input { position: absolute; opacity: 0; width: 64px; height: 36px; margin: 0; cursor: pointer; }
.switch-track {
  width: 64px; height: 36px; border-radius: 999px; background: #CBBFAE; border: 3px solid #2B1B0E;
  position: relative; flex: 0 0 auto; transition: background .15s;
}
.switch-track::after {
  content: "OFF"; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid #2B1B0E;
  font-size: 0; transition: transform .15s;
}
.switch input:checked + .switch-track { background: var(--right); }
.switch input:checked + .switch-track::after { transform: translateX(28px); }
.switch input:focus-visible + .switch-track { outline: 4px solid #1B1452; outline-offset: 3px; }
.switch-label::after { content: " Off"; font-weight: 700; color: #5E4A3A; }
.switch input:checked ~ .switch-label::after { content: " On"; color: var(--right); }
.select-label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 800; margin-top: 10px; }
.select-label.block { display: flex; margin: 0 0 12px; color: #2B1B0E; }
select {
  font: inherit; font-weight: 800; font-size: 1.1rem;
  min-height: 48px; padding: 6px 12px;
  border-radius: 12px; border: 3px solid #2B1B0E; background: #fff; color: #2B1B0E;
}

/* ------------------------------------------------------------ Lobby */
.code-panel { text-align: center; }
.join-at { font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 700; }
.join-url { background: #FFF1B8; padding: 2px 10px; border-radius: 8px; word-break: break-all; }
.code-label { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .12em; margin: 10px 0 0; color: #5E4A3A; }
.room-code {
  display: flex; justify-content: center; gap: .4em;
  font-size: clamp(3.6rem, 13vw, 8rem); font-weight: 900; letter-spacing: .08em; line-height: 1; margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.lobby-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.player-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.player-chip {
  background: #FFD43B; color: #2B1B0E; font-weight: 900;
  padding: 8px 16px; border-radius: 999px; border: 3px solid #2B1B0E;
  animation: pop .3s ease-out;
}
.player-chip.away { background: #EEE; color: #6B6B6B; border-style: dashed; }
.away-tag { font-size: .85rem; font-weight: 700; }
.lobby-side .kip-art { width: 84px; }

.player-lobby { align-items: center; text-align: center; }
.name-card { max-width: 520px; width: 100%; }
.nickname { font-size: clamp(2.2rem, 8vw, 3.4rem); color: #2B1B0E; margin: 0 0 14px; }
.waiting { font-weight: 800; text-align: center; font-size: 1.2rem; }

/* ------------------------------------------------------------ Questions */
.q-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.pill {
  background: var(--card); color: var(--card-ink);
  border: 3px solid rgba(43, 27, 14, .15);
  font-weight: 900; font-size: 1.05rem;
  padding: 6px 16px; border-radius: 999px;
}
.pill-strong { background: #2B1B0E; color: #fff; border-color: #2B1B0E; }

.question {
  font-size: clamp(1.7rem, 4.4vw, 3rem);
  font-weight: 900;
  text-align: center;
  background: var(--card); color: var(--card-ink);
  padding: 22px 24px; border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0;
}
.question.small { font-size: clamp(1.3rem, 3vw, 2rem); padding: 16px 20px; }

.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.answers.n3 > :last-child { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .answers { grid-template-columns: 1fr; }
}

.answer {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 96px;
  padding: 14px 20px;
  font: inherit; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 900; text-align: left;
  border-radius: var(--radius); border: 4px solid rgba(0, 0, 0, .25);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25);
  transition: transform .08s, opacity .15s, box-shadow .08s;
}
button.answer { cursor: pointer; }
button.answer:not([aria-disabled="true"]):hover { transform: translateY(-2px); }
button.answer:not([aria-disabled="true"]):active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
button.answer[aria-disabled="true"] { cursor: default; }
button.answer:focus-visible { outline: 5px solid #1B1452; outline-offset: 4px; box-shadow: 0 0 0 9px #fff; }

.answer.a0 { background: var(--a0); color: var(--a0-ink); }
.answer.a1 { background: var(--a1); color: var(--a1-ink); }
.answer.a2 { background: var(--a2); color: var(--a2-ink); }
.answer.a3 { background: var(--a3); color: var(--a3-ink); }

.answer .shape {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255, 255, 255, .95); color: #2B1B0E;
  font-size: 1.9rem; line-height: 1;
  position: relative; z-index: 1;
}
.answer.a0 .shape { color: var(--a0); }
.answer.a1 .shape { color: var(--a1); }
.answer.a2 .shape { color: #9A6B00; }
.answer.a3 .shape { color: var(--a3); }
.answer .letter {
  flex: 0 0 auto; font-size: 1.1em; min-width: 1.2em;
  position: relative; z-index: 1;
}
.answer .text { flex: 1 1 auto; position: relative; z-index: 1; }
.answer .count {
  flex: 0 0 auto; position: relative; z-index: 1;
  background: rgba(0, 0, 0, .25); color: #fff; border-radius: 999px; padding: 2px 14px; font-size: 1.1rem;
}
.answer.a2 .count { background: rgba(43, 27, 14, .2); color: #2B1B0E; }
.answer .bar {
  position: absolute; inset: 0 auto 0 0; width: var(--w); z-index: 0;
  background: rgba(255, 255, 255, .22);
  transition: width .5s ease-out;
}
.answer .mark {
  flex: 0 0 auto; position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; font-size: 1.8rem;
}
.answer.right { outline: 6px solid #fff; box-shadow: 0 0 0 10px var(--right), 0 6px 0 rgba(0, 0, 0, .25); animation: pop .3s ease-out; }
.answer.right .mark { color: var(--right); }
.answer.wrong .mark { color: var(--wrong); }
.answer.dim { opacity: .4; }
.answer.picked { outline: 6px solid #fff; box-shadow: 0 0 0 10px #2B1B0E; }

.key-hint { text-align: center; font-size: 1rem; color: var(--ink-soft); margin: 0; }
@media (hover: none) { .key-hint { display: none; } }

.timer {
  --p: 1;
  position: relative;
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(#2B1B0E calc(var(--p) * 360deg), rgba(43, 27, 14, .15) 0);
}
.timer::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.timer-num { position: relative; font-size: 1.7rem; font-weight: 900; color: #2B1B0E; font-variant-numeric: tabular-nums; }
.timer.low { background: conic-gradient(var(--wrong) calc(var(--p) * 360deg), rgba(192, 57, 43, .2) 0); }
.timer.low .timer-num { color: var(--wrong); }

/* ------------------------------------------------------------ Reveal */
.result-headline {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 900; text-align: center;
  margin: 0; padding: 12px 18px; border-radius: var(--radius);
  color: #fff; animation: pop .3s ease-out;
}
.result-headline.right { background: var(--right); }
.result-headline.wrong { background: #6B4E9B; }
.result-icon {
  display: grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%;
  background: #fff; font-size: .8em;
}
.result-headline.right .result-icon { color: var(--right); }
.result-headline.wrong .result-icon { color: #6B4E9B; }

.reveal-row { display: grid; gap: 20px; align-items: start; }
.reveal-row.has-lb { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); }
@media (max-width: 800px) { .reveal-row.has-lb { grid-template-columns: 1fr; } }

.feedback { display: flex; flex-direction: column; gap: 14px; }

.dots { list-style: none; display: flex; gap: 8px; justify-content: center; margin: 0; padding: 0; }
.dots li { width: 16px; height: 16px; border-radius: 50%; background: rgba(43, 27, 14, .18); border: 2px solid rgba(43, 27, 14, .3); }
body[data-theme="gravity"] .dots li:not(.current, .right, .wrong) {background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); }
.dots li.current { background: #FFD43B; border-color: #2B1B0E; }
.dots li.right { background: var(--right); border-color: var(--right); }
.dots li.wrong { background: var(--wrong); border-color: var(--wrong); }

/* ------------------------------------------------------------ Leaderboard */
.leaderboard h2 { font-size: 1.4rem; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lb-list li {
  display: grid; grid-template-columns: 3.2em 1fr auto; gap: 10px; align-items: center;
  background: #FFF6D6; border-radius: 12px; padding: 8px 12px; font-weight: 800;
}
.lb-list li.me { background: #FFD43B; outline: 3px solid #2B1B0E; }
.lb-rank { font-weight: 900; }
.lb-score { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Final */
.final-title { text-align: center; font-size: clamp(2.6rem, 8vw, 4.4rem); font-weight: 900; margin: 0; }
.score-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { text-align: center; display: flex; flex-direction: column; }
.stat-value { font-size: clamp(2rem, 6vw, 3rem); font-weight: 900; line-height: 1.1; }
.stat-label { font-weight: 800; color: #5E4A3A; }

.podium { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; align-items: flex-end; gap: 12px; }
.podium li { display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(220px, 31%); text-align: center; }
.podium-name { font-weight: 900; font-size: clamp(1rem, 2.6vw, 1.5rem); }
.podium-score { font-weight: 700; font-size: 1rem; color: var(--ink-soft); }
.podium-block {
  width: 100%; display: grid; place-items: center;
  font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 900; color: #2B1B0E;
  border-radius: 16px 16px 0 0; border: 4px solid #2B1B0E; border-bottom: 0;
}
.place-1 .podium-block { height: 160px; background: #FFD43B; }
.place-2 .podium-block { height: 120px; background: #D9E2EC; }
.place-3 .podium-block { height: 90px; background: #F3B27A; }

.review h2 { text-align: center; font-size: 1.8rem; }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.review-item { display: flex; flex-direction: column; gap: 4px; }
.review-q { font-weight: 900; font-size: 1.3rem; }
.review-num { display: block; font-size: .95rem; color: #5E4A3A; text-transform: uppercase; letter-spacing: .06em; }
.review-answer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 1.1rem; }
.chip.a0 { background: var(--a0); } .chip.a1 { background: var(--a1); } .chip.a2 { background: var(--a2); color: #2B1B0E; } .chip.a3 { background: var(--a3); }
.review-mine { font-weight: 800; margin: 0; }
.review-mine.good { color: var(--right); }
.review-mine.bad { color: var(--wrong); }
.review-mine.skipped { color: #5E4A3A; }
.review-stat { font-weight: 800; color: #12576B; margin: 0; }
.review-explain { display: flex; align-items: flex-start; gap: 10px; background: #FFF6D6; border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 6px; }
.review-explain p { margin: 0; font-weight: 700; }
.mini-kip { flex: 0 0 auto; width: 44px; }

/* ------------------------------------------------------------ Motion */
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes hop { 0% { transform: translateY(0); } 40% { transform: translateY(-12px); } 100% { transform: translateY(0); } }
.pop-in { animation: pop .4s ease-out, hop .6s .2s ease-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ Small screens */
@media (max-width: 640px) {
  body { font-size: 1.15rem; }
  .screen { gap: 16px; padding-bottom: calc(16vh + 16px); }
  .world-backdrop { height: 16vh; min-height: 90px; }
  .kip-art { width: 72px; }
  .kip-says.size-lg .kip-art { width: 88px; }
  .card { padding: 16px; }
  .answer { min-height: 80px; }
  .answer .shape { width: 46px; height: 46px; font-size: 1.5rem; }
  .brand-name { font-size: 1.3rem; }
}

/* ============================================================ Stickers */
.sticker { display: inline-grid; place-items: center; line-height: 1; transform: rotate(-4deg); }
.sticker:nth-child(even) { transform: rotate(5deg); }
.sticker-face {
  display: block;
  filter:
    drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff)
    drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff)
    drop-shadow(0 5px 5px rgba(43, 27, 14, .3));
}
.sticker.size-sm .sticker-face { font-size: 1.5rem; }
.sticker.size-md .sticker-face { font-size: 2.1rem; }
.sticker.size-lg .sticker-face { font-size: 3rem; }
.sticker.size-xl .sticker-face { font-size: 4rem; }
.sticker.size-xxl .sticker-face { font-size: 6rem; }
.sticker.locked .sticker-face { filter: grayscale(1) brightness(0) opacity(.18); }
.sticker:not(.locked):hover { animation: sticker-wiggle .45s ease-in-out; }
@keyframes sticker-wiggle { 25% { rotate: -10deg; } 75% { rotate: 10deg; } }

.sticker-row { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; padding: 8px 0; }
.sticker-tray {
  display: flex; gap: 8px; align-items: center;
  background: #fff; border-radius: 999px; padding: 4px 14px;
  border: 3px solid rgba(43, 27, 14, .15); box-shadow: var(--shadow);
}
.mini-stickers { display: flex; gap: 6px; padding: 6px 14px 0; }

.sticker-pop {
  position: absolute; z-index: 40; left: 50%; top: 70px; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fff; color: #2B1B0E;
  border: 4px solid #2B1B0E; border-radius: 26px; box-shadow: 0 8px 0 #2B1B0E;
  padding: 12px 28px 16px; pointer-events: none;
  animation: pop-out 1.7s ease-in forwards;
}
.pop-label { font-weight: 900; font-size: 1.1rem; background: #FFD43B; padding: 2px 14px; border-radius: 999px; }
.pop-name { font-weight: 900; font-size: 1.4rem; }
@keyframes pop-out { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

.sticker-book .book-count { font-size: 1rem; background: #FFD43B; color: #2B1B0E; padding: 2px 12px; border-radius: 999px; vertical-align: middle; }
.book-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px; }
.book-grid li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.book-name { font-size: .9rem; font-weight: 800; color: #5E4A3A; }

.particle { position: absolute; z-index: 45; font-size: 1.7rem; pointer-events: none; }
.float-text {
  position: absolute; z-index: 35; pointer-events: none; white-space: nowrap;
  font-weight: 900; font-size: 1.5rem; padding: 2px 12px; border-radius: 999px;
  border: 3px solid #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .2);
}
.float-text.good { background: var(--right); color: #fff; }
.float-text.bad { background: var(--wrong); color: #fff; }

/* ============================================================ Game intro and done */
.game-banner { position: relative; border-radius: var(--radius); overflow: hidden; border: 4px solid #2B1B0E; box-shadow: 0 7px 0 #2B1B0E; }
.game-banner-art svg { display: block; width: 100%; height: clamp(140px, 24vw, 220px); }
.game-badge { position: absolute; top: 12px; left: 12px; background: #2B1B0E; color: #fff; font-weight: 900; padding: 4px 14px; border-radius: 999px; }
.eyebrow { text-align: center; font-weight: 800; color: var(--ink-soft); margin: 0; }
.game-name { text-align: center; font-size: clamp(2.6rem, 8vw, 4.4rem); font-weight: 900; margin: 0; text-shadow: 4px 4px 0 #FFD43B; }
body[data-theme="gravity"] .game-name { text-shadow: 4px 4px 0 #8E6CFF; }
.intro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.how-to ul, .learned-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-weight: 700; }
.how-to li, .learned-list li { padding-left: 2em; position: relative; }
.how-to li::before { content: "🦘"; position: absolute; left: 0; }
.learned-list li::before { content: "✓"; position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--right); color: #fff; font-weight: 900; font-size: .9em; }
.game-done { position: relative; }
.stickers-won { text-align: center; }

/* ============================================================ Game shell */
.game-screen { gap: 14px; }
.game-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.game-title { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 900; margin: 0; }
.btn.small { min-height: 48px; font-size: 1.05rem; padding: 8px 18px; box-shadow: 0 4px 0 var(--card-ink); }
.game-tip .kip-art { width: 76px; }
.game-tip .bubble { margin-bottom: 18px; min-height: 3.2em; }
.game-stage { position: relative; display: flex; flex-direction: column; gap: 12px; }
.game-hud { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.hud-chip, .hud-label {
  background: #fff; color: #2B1B0E; font-weight: 800; font-size: 1.1rem;
  padding: 6px 16px; border-radius: 999px; border: 3px solid rgba(43, 27, 14, .15);
}
.hud-chip.total.up { background: #DFF5E5; border-color: var(--right); }
.hud-chip.total.down { background: #FDE2E0; border-color: var(--wrong); }

.game-field {
  position: relative; overflow: hidden;
  height: clamp(330px, 56vh, 480px);
  border-radius: 26px; border: 4px solid #2B1B0E; box-shadow: 0 7px 0 #2B1B0E;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.game-field:focus-visible { outline: 5px solid #FFD43B; outline-offset: 4px; box-shadow: 0 0 0 10px #2B1B0E; }

.game-controls { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ctrl-btn {
  font: inherit; font-weight: 900; font-size: 2rem;
  min-width: 84px; min-height: 72px; padding: 6px 18px;
  border-radius: 24px; border: 4px solid #2B1B0E; background: #fff; color: #2B1B0E;
  box-shadow: 0 6px 0 #2B1B0E; cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.ctrl-btn.held, .ctrl-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #2B1B0E; background: #FFD43B; }
.ctrl-btn.jump { min-width: 170px; background: #FFD43B; }

/* ============================================================ Piggy Bank Dash */
.mg-field { background: linear-gradient(#9EE6F0, #E8FBF6 70%); }
.mg-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: #5BBE92; border-top: 4px solid #3E9E74; }
.mg-clouds { position: absolute; inset: 10px 0 auto; font-size: 3rem; opacity: .9; animation: drift 22s linear infinite alternate; }
.mg-clouds span { margin-left: 40%; }
@keyframes drift { from { translate: -5% 0; } to { translate: 15% 0; } }
.mg-pig { position: absolute; left: 0; bottom: 22px; z-index: 5; }
.mg-item { position: absolute; left: 0; top: 0; font-size: 2.7rem; line-height: 1; z-index: 4; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .25)); }
.mg-item.treat { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 6px rgba(192, 57, 43, .7)); }
.price-tag {
  position: absolute; right: -18px; top: -10px; font-size: .9rem; font-weight: 900;
  background: var(--wrong); color: #fff; padding: 1px 6px; border-radius: 8px; border: 2px solid #fff;
}
.mg-bar { flex: 1 1 160px; max-width: 360px; height: 26px; background: #fff; border: 3px solid #2B1B0E; border-radius: 999px; overflow: hidden; }
.mg-fill { display: block; height: 100%; width: 0; background: repeating-linear-gradient(45deg, #FFC83D 0 12px, #FFD95E 12px 24px); transition: width .25s; }
.mg-amount { font-weight: 900; font-size: 1.5rem; min-width: 3ch; }
body[data-theme="money"] .mg-amount, .mg-goal { color: #2B1B0E; }
.mg-goal { font-weight: 800; background: #fff; padding: 4px 12px; border-radius: 999px; }
.mg-bike { position: absolute; left: 50%; top: 40%; translate: -50% -50%; z-index: 6; }
.mg-invest {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255, 255, 255, .93); color: #2B1B0E; text-align: center; padding: 16px;
}
.mg-invest h2 { margin: 0; font-size: 1.6rem; }
.mg-year { font-weight: 900; margin: 0; }
.mg-tree { transform: scale(var(--grow, .7)); transition: transform .5s cubic-bezier(.2, .9, .3, 1.3); }
.mg-tree-value { font-size: 2.2rem; font-weight: 900; margin: 0; }
.mg-tree-value.up { color: var(--right); }
.mg-tree-value.down { color: var(--wrong); }
.mg-chart { display: flex; align-items: flex-end; gap: 8px; min-height: 30px; }
.mg-col {
  display: flex; align-items: flex-start; justify-content: center;
  width: 46px; height: var(--h); padding-top: 2px; border-radius: 8px 8px 0 0;
  font-size: .8rem; font-weight: 900; color: #fff; background: var(--right);
}
.mg-col.down { background: var(--wrong); }
@media (max-height: 760px) { .mg-col { height: calc(var(--h) * .6); } }

/* ============================================================ Share Safari */
.ss-news {
  display: flex; align-items: center; gap: 16px;
  background: #FFFDF5; color: #2B1B0E; border: 4px solid #2B1B0E; border-radius: var(--radius); padding: 12px 18px;
  box-shadow: 0 6px 0 #2B1B0E;
  background-image: repeating-linear-gradient(0deg, transparent 0 26px, rgba(43, 27, 14, .05) 26px 28px);
}
.ss-day { margin: 0; font-weight: 800; color: #5E4A3A; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; }
.ss-headline { margin: 0; font-weight: 900; font-size: clamp(1.25rem, 3vw, 1.6rem); }
.ss-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ss-card {
  position: relative; text-align: center;
  background: #fff; color: #2B1B0E; border-radius: var(--radius); padding: 14px;
  border: 4px solid rgba(43, 27, 14, .15); box-shadow: var(--shadow);
  transition: border-color .3s, background-color .3s;
}
.ss-card.up { border-color: var(--right); background: #F0FAF2; }
.ss-card.down { border-color: var(--wrong); background: #FDF1F0; }
.ss-name { font-weight: 900; font-size: 1.15rem; margin: 4px 0 0; }
.ss-price { margin: 0; }
.ss-price-num { font-size: 2.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.ss-per { font-weight: 700; color: #5E4A3A; font-size: 1rem; }
.ss-change { margin: 0; font-weight: 900; }
.ss-card.up .ss-change { color: var(--right); }
.ss-card.down .ss-change { color: var(--wrong); }
.ss-spark svg { display: block; width: 100%; height: 46px; }
.ss-owned { margin: 4px 0 0; font-weight: 700; }
.ss-pieces { margin: 0; min-height: 1.5em; letter-spacing: -.1em; }
.ss-buttons { display: flex; gap: 8px; justify-content: center; margin-top: 6px; }
.btn.buy { background: #DFF5E5; }
.btn.sell { background: #FFF1D6; }
.ss-end {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: #fff; color: #2B1B0E; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.ss-end h2 { font-size: 2rem; margin: 0; }
.ss-end-line { font-size: 1.3rem; font-weight: 700; margin: 0; }
.ss-end-line strong { font-size: 1.6rem; }
.ss-end-diff { font-weight: 900; font-size: 1.3rem; }
.ss-end-diff.up { color: var(--right); }
.ss-end-diff.down { color: var(--wrong); }

/* ============================================================ Lemonade Tycoon */
.lm-plan {
  display: grid; gap: 16px;
  background: #fff; color: #2B1B0E; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.lm-forecast { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-radius: var(--radius-sm); }
.lm-plan.lm-hot .lm-forecast { background: #FFE8A3; }
.lm-plan.lm-warm .lm-forecast { background: #E3F4FF; }
.lm-plan.lm-rainy .lm-forecast { background: #DCE3EE; }
.lm-label { margin: 0; font-weight: 800; color: #5E4A3A; }
.lm-weather-name { margin: 0; font-weight: 900; font-size: 1.6rem; }
.lm-step h2, .lm-step legend { font-size: 1.25rem; margin: 0 0 8px; }
.lm-stepper { display: flex; align-items: center; gap: 14px; }
.lm-cups-num { font-size: 2.6rem; font-weight: 900; min-width: 2.2ch; text-align: center; }
.lm-cup-row { margin: 6px 0 0; font-size: 1.3rem; line-height: 1.3; word-break: break-all; }
.lm-cost { margin: 4px 0 0; font-weight: 800; }
.lm-prices { display: flex; flex-wrap: wrap; gap: 12px; }
.lm-price-chip { cursor: pointer; position: relative; }
.lm-price-chip span {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: #FFF59D; border: 4px solid #E0C200; font-weight: 900; font-size: 1.5rem;
  transition: transform .12s;
}
.lm-price-chip input:checked + span { background: #FFD43B; border-color: #2B1B0E; transform: scale(1.12) rotate(-6deg); box-shadow: 0 5px 0 #2B1B0E; }
.lm-price-chip input:focus-visible + span { outline: 4px solid #1B1452; outline-offset: 4px; }

.lm-field.lm-hot { background: linear-gradient(#FFC46B, #FFF1C2 70%); }
.lm-field.lm-warm { background: linear-gradient(#A9DDF5, #F2FAFF 70%); }
.lm-field.lm-rainy { background: linear-gradient(#7F8FA6, #CED6E0 70%); }
.lm-sun { position: absolute; top: 12px; right: 24px; font-size: 4rem; }
.lm-sun.spin { animation: spin-slow 20s linear infinite; }
@keyframes spin-slow { to { rotate: 360deg; } }
.lm-rain {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(105deg, transparent 0 22px, rgba(255, 255, 255, .55) 22px 24px);
  background-size: 100% 200%; animation: rain .6s linear infinite;
}
@keyframes rain { to { background-position: -20px 60px; } }
.lm-street { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: #B7B2A8; border-top: 6px solid #8BD46A; }
.lm-stand { position: absolute; left: 50%; bottom: 44px; translate: -50% 0; width: min(260px, 66%); height: 190px; z-index: 2; }
.lm-stand::before, .lm-stand::after { content: ""; position: absolute; top: 40px; bottom: 0; width: 10px; background: #B5763F; border: 2px solid #2B1B0E; }
.lm-stand::before { left: 16px; }
.lm-stand::after { right: 16px; }
.lm-awning {
  position: absolute; top: 0; left: -8px; right: -8px; height: 46px; z-index: 1;
  border-radius: 12px 12px 4px 4px; border: 3px solid #2B1B0E;
  background: repeating-linear-gradient(90deg, #FFD43B 0 26px, #fff 26px 52px);
}
.lm-sign {
  position: absolute; top: 54px; left: 50%; translate: -50% 0; z-index: 1; white-space: nowrap;
  background: #fff; color: #D7263D; font-weight: 900; font-size: 1.05rem;
  padding: 3px 12px; border-radius: 8px; border: 3px solid #2B1B0E;
}
.lm-table { position: absolute; left: 0; right: 0; bottom: 0; height: 62px; background: #E9A15B; border: 3px solid #2B1B0E; border-radius: 8px; }
.lm-pitcher { position: absolute; top: -36px; left: 50%; translate: -50% 0; font-size: 1.9rem; white-space: nowrap; }
.lm-walker { position: absolute; left: 0; bottom: 6px; z-index: 3; font-size: 3.2rem; line-height: 1; }
.lm-thought {
  position: absolute; bottom: 105%; left: 50%; translate: -50% 0; white-space: nowrap;
  background: #fff; color: #2B1B0E; font-size: 1rem; font-weight: 900; padding: 4px 10px;
  border-radius: 14px; border: 3px solid #2B1B0E;
}
.lm-ledger h2 { text-align: center; font-size: 1.8rem; }
.lm-rows { display: grid; gap: 10px; }
.lm-row {
  display: grid; grid-template-columns: 2em 1fr auto; align-items: center; gap: 10px; margin: 0;
  background: #FFF6D6; border-radius: 14px; padding: 10px 14px; font-weight: 800;
}
.lm-row span:first-child { font-size: 1.6rem; }
.lm-math { font-variant-numeric: tabular-nums; }
.lm-math strong { font-size: 1.4rem; }
.lm-profit.up { background: #DFF5E5; outline: 3px solid var(--right); }
.lm-profit.down { background: #FDE2E0; outline: 3px solid var(--wrong); }
.lm-notes { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lm-notes li { background: #F3EEE4; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 1rem; }
.lm-money { text-align: center; font-weight: 900; font-size: 1.4rem; margin: 14px 0 0; }
@media (max-width: 640px) {
  .lm-row { grid-template-columns: 2em 1fr; }
  .lm-math { grid-column: 2; }
}

/* ============================================================ Moon Bounce */
.gv-field { transition: background .6s; }
.gv-field.earth { background: linear-gradient(#7CC8FF, #DDF2FF 75%); }
.gv-field.moon { background: radial-gradient(circle at 20% 20%, #3E2A8C, #140F3A 70%); }
.gv-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; transition: background .6s; }
.earth .gv-ground { background: #6CC24A; border-top: 6px solid #4FA232; }
.moon .gv-ground {
  background: radial-gradient(ellipse 30px 8px at 20% 40%, #9E98BE 98%, transparent) , radial-gradient(ellipse 40px 9px at 70% 60%, #9E98BE 98%, transparent), #C9C4DE;
  border-top: 6px solid #E6E2F5;
}
.gv-decor { position: absolute; inset: 0; pointer-events: none; font-size: 3rem; transition: opacity .6s; }
.gv-decor span { position: absolute; }
.earth .moon-decor, .moon .earth-decor { opacity: 0; }
.d-sun { top: 14px; right: 30px; }
.d-cloud { top: 40px; left: 20%; animation: drift 18s linear infinite alternate; }
.d-tree { bottom: 46px; right: 8%; font-size: 5rem; }
.d-earth { top: 18px; right: 34px; }
.d-flag { bottom: 50px; right: 12%; }
.d-dome { bottom: 52px; left: 10%; font-size: 2.6rem; }
.moon .moon-decor { background-image: radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent), radial-gradient(2px 2px at 30% 60%, #fff 50%, transparent), radial-gradient(2px 2px at 55% 15%, #fff 50%, transparent), radial-gradient(2px 2px at 80% 45%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 45% 40%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 70% 25%, #fff 50%, transparent); }
.gv-ruler { position: absolute; left: 0; bottom: 60px; top: 0; width: 28px; pointer-events: none; }
.gv-ruler span { position: absolute; left: 0; width: 18px; height: 3px; border-radius: 2px; background: rgba(43, 27, 14, .35); bottom: calc(var(--u) * var(--s, 1) * 1px); }
.moon .gv-ruler span { background: rgba(255, 255, 255, .45); }
.gv-player { position: absolute; left: 0; bottom: 56px; z-index: 5; width: 84px; transform-origin: bottom center; }
.gv-kip svg { display: block; width: 100%; height: auto; }
.gv-helmet {
  position: absolute; left: 50%; top: -6px; translate: -50% 0; width: 96px; height: 96px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .9); background: rgba(160, 220, 255, .25); opacity: 0; transition: opacity .4s;
}
.moon .gv-helmet { opacity: 1; }
.gv-star { position: absolute; left: 0; bottom: 60px; z-index: 4; font-size: 2.8rem; line-height: 1; filter: drop-shadow(0 0 10px #FFD43B); animation: twinkle 1.2s ease-in-out infinite alternate; }
@keyframes twinkle { to { scale: 1.18; } }
.gv-weight {
  position: absolute; z-index: 8; top: 10px; left: 50%; translate: -50% 0; max-width: calc(100% - 20px);
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: #2B1B0E; border: 3px solid #2B1B0E; border-radius: 16px; padding: 6px 14px; font-weight: 700; font-size: 1rem;
}
.gv-overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.gv-overlay > * { pointer-events: auto; }
.gv-rocket { position: absolute; left: 0; bottom: 0; z-index: 12; font-size: 4.5rem; }
.gv-drop { position: absolute; left: 0; bottom: 60px; z-index: 6; font-size: 3.4rem; line-height: 1; }
.gv-ledge {
  position: absolute; top: 10px; left: 50%; translate: -50% 0; z-index: 7;
  background: #fff; color: #2B1B0E; font-weight: 900; padding: 4px 14px; border-radius: 999px; border: 3px solid #2B1B0E;
}
.gv-lab-controls[hidden], .game-controls[hidden] { display: none; }

/* ============================================================ Illustrated stickers */
.screen { position: relative; }
.sticker-face.photo { filter: drop-shadow(0 6px 6px rgba(43, 27, 14, .3)); }
.sticker-face.photo img { display: block; height: var(--ph, 56px); width: auto; max-width: none; pointer-events: none; }
.sticker.size-sm { --ph: 40px; }
.sticker.size-md { --ph: 56px; }
.sticker.size-lg { --ph: 84px; }
.sticker.size-xl { --ph: 120px; }
.sticker.size-xxl { --ph: 170px; }
.sticker.locked .sticker-face.photo { filter: grayscale(1) brightness(0) opacity(.18); }

.bonus-title { font-size: 1.3rem; margin: 22px 0 12px; }
.bonus-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.bonus-grid .book-name { font-size: .95rem; }

.hero { position: relative; }
.hero-sticker {
  position: absolute; right: 0; top: -6px; z-index: 1;
  width: clamp(84px, 15vw, 160px); height: auto; rotate: 8deg;
  filter: drop-shadow(0 6px 6px rgba(43, 27, 14, .3));
  animation: pop .5s .3s ease-out backwards;
}

.perfect { position: relative; display: flex; flex-direction: column; align-items: center; }
.perfect-sticker { width: min(260px, 70vw); height: auto; rotate: -5deg; filter: drop-shadow(0 8px 8px rgba(43, 27, 14, .3)); }
.perfect-label {
  margin: -10px 0 0; position: relative;
  background: #FFD43B; color: #2B1B0E; border: 3px solid #2B1B0E; border-radius: 999px;
  font-weight: 900; font-size: 1.3rem; padding: 4px 18px; rotate: 3deg;
}

.mg-treat-pal { position: absolute; left: 10px; bottom: 48px; z-index: 8; display: flex; align-items: flex-end; gap: 6px; pointer-events: none; }
.mg-treat-pal img { width: clamp(90px, 22vw, 130px); height: auto; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .25)); }
.mg-pal-bubble {
  margin-bottom: 70px; max-width: 170px;
  background: #fff; color: #2B1B0E; border: 3px solid #2B1B0E; border-radius: 16px;
  padding: 6px 10px; font-weight: 800; font-size: .95rem;
}

.server-missing { line-height: 1.5; }
.server-missing code { background: #fff; padding: 1px 8px; border-radius: 6px; font-weight: 900; }
