:root {
  --ink: #16181d;
  --muted: #5e635e;
  --canvas: #f4f1ea;
  --card: #fffcf8;
  --line: #e2dbd0;
  --side: #14171c;
  --side-text: #f3eee6;
  --sun: #f0b429;
  --clay: #d24a2e;
  --clay-deep: #a83822;
  --yes: #1b7a45;
  --no: #a33b32;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", sans-serif;
  --shadow: 0 1px 0 rgba(22, 24, 29, 0.04), 0 12px 32px rgba(22, 24, 29, 0.05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.5;
  background: var(--canvas);
}
a { color: var(--clay); }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; margin: 0; }
h1 { font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.08; }
h2 { font-size: 1.45rem; line-height: 1.2; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 2px; }

.teacher { min-height: 100vh; background: var(--canvas); }
.shell { display: flex; min-height: 100vh; align-items: stretch; }
.side {
  width: 248px;
  flex: none;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--side);
  color: var(--side-text);
}
.brand {
  font-family: var(--serif);
  font-size: 1.85rem;
  color: var(--side-text);
  text-decoration: none;
  letter-spacing: -0.04em;
  padding: 0 12px;
}
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow: auto; }
.nav-label {
  margin: 16px 12px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 238, 230, 0.42);
}
.nav-label:first-child { margin-top: 0; }
.nav a {
  position: relative;
  text-decoration: none;
  color: rgba(243, 238, 230, 0.82);
  font-weight: 500;
  padding: 9px 12px 9px 16px;
  border-radius: 8px;
}
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav a.is-on { color: #fff; background: transparent; }
.nav a.is-on::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--sun);
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 12px 0; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--side-text); text-decoration: none; }
.who.is-on span:last-child { color: var(--sun); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #2a2e36; color: var(--sun); font-weight: 600;
}
.side .text-button { color: rgba(243, 238, 230, 0.62); text-align: left; }
.side .text-button:hover { color: #fff; }

.main { flex: 1; min-width: 0; padding: 40px 48px 72px; max-width: 1120px; }
.page-head { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .lede { max-width: 42rem; margin: 8px 0 0; }
.lede, .meta, .hint, .demo-note { color: var(--muted); }
.lede { font-size: 1.05rem; }
.eyebrow { margin: 0 0 6px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; color: var(--muted); }
.game-name { font-weight: 500; margin: 0; color: var(--ink); }
.crumb { margin: 0 0 12px; font-size: 0.92rem; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.flash, .form-error, .empty {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8e7c4;
  border: 1px solid #ead7a4;
}
.form-error { background: #fde8e4; border-color: #f3c7c0; color: var(--no); }
.empty { margin-top: 8px; }
.flash { margin: 0 0 16px; }

.filters, .inline-form, .play-bar, .split, .done-actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
}
.filters { margin-bottom: 20px; }
.filters label, .inline-form label, .play-bar label { flex: 1 1 150px; min-width: 140px; }
.filters .button, .inline-form .button, .play-bar .button { flex: 0 0 auto; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 0.88rem; }
input:not([type="checkbox"]), select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 44px;
  padding: 0 12px;
  min-width: 0;
  width: 100%;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--clay); }
.button, .text-button { cursor: pointer; }
.button {
  border: 0;
  border-radius: 10px;
  height: 44px;
  padding: 0 16px;
  background: var(--clay);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.button:hover { background: var(--clay-deep); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button-secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.button-secondary:hover { background: #f7f3ec; }
.button-sun { background: var(--sun); color: var(--ink); }
.button-sun:hover { background: #ddaa20; }
.button-ghost { background: transparent; color: var(--side-text); border: 1px solid rgba(243, 238, 230, 0.35); }
.button-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.text-button { background: none; border: 0; padding: 0; color: var(--clay); font-weight: 600; height: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: stretch; }
.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}
.card:hover { border-color: #cfc6b8; }
.card h2 { font-size: 1.45rem; }
.card p { margin: 0; }
.card-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.panel { padding: 20px; }
.panel .table-wrap { border: 0; box-shadow: none; }
.panel + .panel, .stack { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .panel { margin-top: 0; }
.people { list-style: none; margin: 12px 0 0; padding: 0; }
.people li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.people li:last-child { border-bottom: 0; padding-bottom: 0; }
.people li > span { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid th { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: #faf7f2; }
.grid tbody tr:hover td { background: #fbf8f3; }
.pill, .badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--canvas);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid var(--line);
}
.pill-yes, .badge.is-secure { background: #e5f6ea; color: var(--yes); border-color: #c9ead4; }
.pill-no { background: #fde8e4; color: var(--no); border-color: #f3c7c0; }
.badge.is-learning { background: #f8e3a8; border-color: #efd48a; }
.play-bar { margin-top: 0; }
.play-panel { margin-top: 16px; }
.play-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hint { margin: 12px 0 0; }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--canvas);
}
.login-card {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.login-art { padding: 40px 36px; background: var(--side); color: var(--side-text); }
.brand-light { color: var(--sun); padding: 0; }
.login-figure { width: min(260px, 100%); display: block; margin: 28px auto 8px; }
.login-lead { font-family: var(--serif); font-size: 1.55rem; line-height: 1.25; margin: 12px 0 0; }
.login-form { padding: 40px 36px; display: flex; flex-direction: column; gap: 14px; }
.login-form h1 { margin-bottom: 4px; }
.login-form .button { align-self: flex-start; min-width: 140px; }
.demo-note { margin: 4px 0 0; font-size: 0.92rem; }

.stage-body {
  min-height: 100vh;
  margin: 0;
  background: #14171c;
  color: #f3eee6;
  padding: 32px 6vw 56px;
}
.stage-body h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.02; }
.eyebrow.light { color: var(--sun); }
#ready { max-width: 760px; margin: 0 auto; }
.leave { color: #f3eee6; font-weight: 600; text-decoration: none; }
.leave:hover { color: var(--sun); }
.tips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.tips li {
  background: rgba(243, 238, 230, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1rem;
}
#ready-status, #play-status, #guide { font-size: 1.15rem; min-height: 1.4em; color: rgba(243, 238, 230, 0.78); }
.voice-lang {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0 8px;
  max-width: 320px;
  font-size: 0.95rem;
  color: rgba(243, 238, 230, 0.78);
}
.voice-lang select {
  background: #1c2027;
  border: 1px solid rgba(243, 238, 230, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  color: #f3eee6;
}
#feedback { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem); min-height: 1.2em; color: #f3eee6; }
#feedback.is-right { color: #8ee0a8; }
#feedback.is-wrong { color: #f0a3a3; }
#start {
  margin-top: 18px;
  min-width: 220px;
  min-height: 56px;
  padding: 14px 28px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 14px;
}
#start:not(:disabled) {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(232, 176, 48, 0.35);
}
#start:disabled { opacity: 0.4; }
#camera-frame {
  width: min(720px, 100%);
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #0d0f13;
  margin: 0 auto 24px;
}
#camera { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); background: #0d0f13; }
#live-dot {
  position: absolute; top: 14px; left: 14px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #6b3a36; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.28);
}
#live-dot.is-on { background: #7dcea0; }
body.is-playing #camera-frame {
  position: fixed; right: 20px; bottom: 20px;
  width: 220px; aspect-ratio: 4 / 3; z-index: 4;
  border: 3px solid var(--sun);
  margin: 0;
  border-radius: 12px;
}
body.is-done #camera-frame { display: none; }
.stage-top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 8px; }
#who, #progress { margin: 0; font-weight: 500; color: rgba(243, 238, 230, 0.72); }
#picture svg { width: auto; height: min(28vh, 220px); max-width: 92vw; display: block; margin: 8px 0 12px; }
#choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.choices-hand3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice, .say-card {
  pointer-events: none;
  user-select: none;
  border-radius: 16px;
  min-height: 168px;
  padding: 18px;
  background: rgba(243, 238, 230, 0.06);
  border: 1px solid rgba(243, 238, 230, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
.choice span, .say-card span { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; color: var(--sun); }
.choice strong, .say-card strong { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 4rem); line-height: 0.95; }
.choice.is-hot { background: var(--sun); color: var(--ink); border-color: var(--sun); transform: translateY(-4px); }
.choice.is-hot span { color: #6a4b08; }
.choice.is-right, .say-card.is-right, .piece.is-right { background: var(--yes); border-color: var(--yes); color: #fff; }
.choice.is-wrong, .say-card.is-wrong, .piece.is-wrong { background: var(--no); border-color: var(--no); color: #fff; }
.choice.is-picked, .say-card.is-picked { border-color: var(--sun); }
.say-card { min-height: 200px; }
.done-actions { margin-top: 20px; }
#done { max-width: 720px; padding-top: 10vh; }
#timer { font-variant-numeric: tabular-nums; color: var(--sun); font-weight: 600; }

.checks { border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; padding: 12px 14px; margin: 0; }
.checks legend { font-weight: 600; padding: 0 6px; }
.checks label { display: flex; flex-direction: row; gap: 8px; align-items: center; font-weight: 500; }
.stack-form { display: grid; gap: 14px; }
.stack-form > label { max-width: 440px; }
.inline-form > h2, .panel > header.split { width: 100%; }
.stack-form > h2 { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); }
.stack-form > h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.question-row {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0 0;
  padding: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.question-row legend { font-family: var(--serif); font-size: 1.25rem; padding: 0 0 4px; grid-column: 1 / -1; }
.help-list { margin: 8px 0 0; padding-left: 18px; }
.help-list li { margin: 8px 0; }
.knowledge { display: grid; gap: 16px; margin: 8px 0 0; padding-left: 18px; }
.knowledge li { padding-left: 4px; }
.knowledge .badge { margin-left: 8px; }
.knowledge-map { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 14px; }
.k-node {
  width: 200px;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  text-decoration: none;
  color: inherit;
}
.k-node strong { font-family: var(--serif); font-size: 1.15rem; }
.k-node span { color: var(--muted); font-size: 0.88rem; }
.k-node.is-fresh { background: var(--canvas); }
.k-node.is-learning { background: #f8e3a8; border-color: #efd48a; }
.k-node.is-learning span { color: #4a3b12; }
.k-node.is-secure { background: #e5f6ea; border-color: #c9ead4; }
.k-node.is-secure span { color: #145c32; }
.map-join { align-self: center; color: var(--muted); font-weight: 600; }
.order-slots, .order-tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; pointer-events: auto; }
.slot {
  min-height: 112px;
  border: 2px dashed rgba(243, 238, 230, 0.4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(243, 238, 230, 0.04);
}
.slot > span { position: absolute; top: 8px; left: 12px; color: var(--sun); font-weight: 600; }
.piece {
  pointer-events: auto;
  cursor: grab;
  background: #f3eee6;
  color: var(--ink);
  border-radius: 12px;
  min-height: 84px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  font-family: var(--serif);
  font-size: 1.45rem;
  touch-action: none;
}
.piece.is-dragging { opacity: 0.65; }
.choices-order { display: grid; gap: 18px; }
.print-page {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
}
.print-head, .sheet {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px;
}
.print-head { padding-bottom: 0; }
.print-head h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
}
.print-head a { font-weight: 600; text-decoration: none; }
.print-head .button { margin-top: 12px; }
.sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}
.sheet:not(:has(.paper-card)):not(.sheet-table):not(:has(.grid)) {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.sheet:not(:has(.paper-card)):not(.sheet-table):not(:has(.grid)) h2 {
  font-size: 1.25rem;
  margin-top: 1.1rem;
}
.sheet:not(:has(.paper-card)):not(.sheet-table):not(:has(.grid)) h2:first-child { margin-top: 0; }
.sheet:has(> .grid) { display: block; }
.sheet-table {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px 8px 16px;
}
.sheet-table .grid,
.sheet > .grid {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
}
.sheet > .grid { border: 1px solid var(--line); }
.sheet-table .grid th,
.sheet > .grid th { background: #faf7f2; }
.paper-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  break-inside: avoid;
  background: var(--card);
  box-shadow: var(--shadow);
}
.paper-card.lesson-q { text-align: left; justify-items: start; }
.paper-card p, .paper-card .meta { margin: 0; }
.paper-art svg { width: 96px; height: 96px; }
@media print {
  .print-head button, .print-head a { display: none; }
  .print-page, body { background: #fff; }
  .paper-card, .sheet-table, .sheet:not(:has(.paper-card)):not(.sheet-table):not(:has(.grid)) { box-shadow: none; }
  .paper-card { break-inside: avoid; }
}
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.topic-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  min-height: 96px;
}
.topic-card:hover { border-color: #cfc6b8; }
.topic-card .cover { width: 72px; height: 72px; flex: none; }
.topic-copy { min-width: 0; display: grid; gap: 2px; }
.topic-copy h2 { font-size: 1.2rem; }
.topic-copy p { margin: 0; color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topic-grade { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.chev { margin-left: auto; color: var(--muted); font-size: 1.6rem; line-height: 1; }
.cover-photo { display: block; overflow: hidden; border-radius: 18px; background: var(--canvas); }
.cover-photo svg { width: 100%; height: 100%; display: block; }
.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.hero-art .cover, .hero-art .cover-photo { width: 200px; height: 200px; }
.hero h1 { margin: 8px 0; }
.hero .button { margin-top: 12px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.fact span { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.fact-wide { grid-column: 1 / -1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rail { display: flex; gap: 12px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.rail-pic { flex: none; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--canvas); }
.rail-pic svg { width: 96px; height: 96px; display: block; }
.detail-copy { margin-top: 16px; }
.detail-copy p { margin: 8px 0 0; }
.neighbours { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.neighbour {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  text-decoration: none; color: inherit;
}
.neighbour .cover, .neighbour .cover-photo { width: 64px; height: 64px; flex: none; }
.neighbour strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
@media (min-width: 1400px) {
  .filters { flex-wrap: nowrap; }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; padding: 16px 16px 12px; gap: 12px; }
  .nav-label { display: none; }
  .nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { height: 0; }
  .nav a { white-space: nowrap; }
  .side-foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .main { padding: 24px 16px 48px; max-width: none; }
  .login-card { grid-template-columns: 1fr; }
  .choices-hand3, .order-slots, .order-tray { grid-template-columns: 1fr; }
  body.is-playing #camera-frame { width: 120px; }
  .filters { flex-wrap: wrap; }
  .hero, .facts, .neighbours { grid-template-columns: 1fr; }
  .hero-art .cover, .hero-art .cover-photo { width: 160px; height: 160px; }
}
.arena {
  --arena-cyan: #5ce1ff;
  --arena-magenta: #ff6bd6;
  overflow-x: hidden;
  perspective: 1400px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(92, 225, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 110% 80%, rgba(255, 107, 214, 0.12), transparent 50%),
    #07090e;
  padding: 28px 5vw 64px;
}
#world {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.world-load {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
#arena-fx {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.kids-play.is-world .choice,
.kids-play.is-world .say-card {
  background: rgba(20, 23, 28, 0.62);
}
.kids-play.is-world .hud-bar,
.kids-play.is-world .teach-bar {
  background: rgba(20, 23, 28, 0.78);
  border-radius: 16px;
  padding: 8px 12px;
}
.kids-play.is-world .hud-bar { border-bottom: 0; }
.kids-play.is-world .teach-bar { margin-top: 8px; }
.kids-play.is-world .teach-bar button {
  background: rgba(255, 252, 248, 0.12);
  border-color: rgba(243, 238, 230, 0.45);
  color: #f3eee6;
}
.kids-play.is-world .round-banner:not(:empty),
.kids-play.is-world #guide:not(:empty),
.kids-play.is-world #play-status:not(:empty) {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin: 6px 0;
  background: rgba(20, 23, 28, 0.78);
  border-radius: 12px;
  padding: 4px 12px;
  color: #f3eee6;
}
.kids-play.is-world .speech-bubble,
.kids-play.is-world #guide,
.kids-play.is-world #play-status {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.kids-play.is-world #ready .leave {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  background: rgba(20, 23, 28, 0.78);
  color: #f3eee6;
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
}
.kids-play.is-world .play-board {
  flex: 0 0 auto;
  align-self: flex-start;
  width: min(640px, 100%);
  height: auto;
  max-height: min(70vh, 100%);
  overflow: auto;
  margin-top: 12px;
  padding: 16px 18px 18px;
  background: rgba(255, 252, 248, 0.94);
  color: #1c1b19;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(20, 23, 28, 0.12);
}
.kids-play.is-world .play-board .speech-bubble,
.kids-play.is-world .play-board .round-banner,
.kids-play.is-world .play-board #guide,
.kids-play.is-world .play-board #play-status,
.kids-play.is-world .play-board #timer {
  background: transparent;
  color: #1c1b19;
  text-shadow: none;
  display: block;
  width: auto;
  padding: 0;
}
.kids-play.is-world .play-board .choice,
.kids-play.is-world .play-board .say-card {
  background: #14171c;
  color: #f3eee6;
  border-color: #14171c;
}
.arena-mesh, .arena-floor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.arena-mesh {
  background:
    conic-gradient(from 180deg at 50% 40%, rgba(92, 225, 255, 0.07), transparent 40%, rgba(255, 107, 214, 0.08), transparent 80%);
  animation: mesh-spin 48s linear infinite;
  mix-blend-mode: screen;
}
.arena-floor {
  background:
    linear-gradient(rgba(92, 225, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 225, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(700px) rotateX(62deg) translateY(42vh) scale(1.6);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.55), transparent 70%);
}
.arena #ready,
.arena #stage,
.arena #done,
.arena #camera-frame { position: relative; z-index: 2; }
.arena .ready-slab,
.arena .play-board,
.arena .done-slab {
  transform-style: preserve-3d;
  transform: rotateX(6deg) rotateY(-5deg);
  background: linear-gradient(160deg, rgba(18, 24, 36, 0.92), rgba(10, 14, 22, 0.78));
  border: 1px solid rgba(92, 225, 255, 0.28);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(92, 225, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 28px 28px 32px;
  backdrop-filter: blur(10px);
}
.arena .ready-slab { max-width: 760px; margin: 0 auto; animation: slab-float 6s ease-in-out infinite; }
.arena .play-board { margin-top: 8px; }
.arena .hud-bar {
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid rgba(92, 225, 255, 0.22);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.arena .camera-portal {
  border-radius: 22px;
  border: 2px solid rgba(92, 225, 255, 0.45);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(92, 225, 255, 0.25);
  transform: rotateX(8deg);
  overflow: hidden;
}
.arena .portal-ring {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 107, 214, 0.35);
  animation: ring-spin 18s linear infinite;
  pointer-events: none;
  z-index: 1;
}
.arena #live-dot {
  width: 14px;
  height: 14px;
  background: #ff5d6c;
  box-shadow: 0 0 12px #ff5d6c;
}
.arena #live-dot.is-on {
  background: #5dffb1;
  box-shadow: 0 0 16px #5dffb1;
}
body.is-playing.arena #camera-frame {
  transform: rotateX(12deg) rotateY(-12deg);
  border-width: 3px;
  border-color: var(--arena-cyan);
}
.arena .tips li {
  background: rgba(92, 225, 255, 0.1);
  border: 1px solid rgba(92, 225, 255, 0.22);
  animation: chip-float 4.5s ease-in-out infinite;
}
.arena .tips li:nth-child(2) { animation-delay: 0.4s; }
.arena .tips li:nth-child(3) { animation-delay: 0.8s; }
.arena .arcade-start {
  background: linear-gradient(180deg, #ffe08a, var(--sun) 40%, #c48412);
  color: #1a1408;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow:
    0 8px 0 #8a5a08,
    0 16px 28px rgba(0, 0, 0, 0.35);
  transform: translateZ(24px);
}
.arena .arcade-start:not(:disabled):hover {
  transform: translateY(-2px) translateZ(28px);
}
.arena .arcade-start:not(:disabled):active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 #8a5a08;
}
.arena .pic-frame {
  display: inline-block;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(92, 225, 255, 0.16), rgba(255, 107, 214, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotateX(10deg) rotateY(-8deg) translateZ(20px);
  animation: pic-bob 5s ease-in-out infinite;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.35);
}
.arena #picture svg { filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.35)); }
.arena .prompt-slab {
  display: inline-block;
  padding: 8px 4px 4px;
  text-shadow: 0 0 22px rgba(92, 225, 255, 0.25);
}
.arena .prompt-slab.is-flip,
.arena .pic-frame.is-flip {
  animation: card-flip 0.55s ease;
}
.arena .choice, .arena .say-card, .arena .piece {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(12,16,24,0.9));
  border: 1px solid rgba(92, 225, 255, 0.28);
  box-shadow:
    0 16px 0 rgba(0, 0, 0, 0.35),
    0 22px 30px rgba(0, 0, 0, 0.28);
  transform: rotateX(8deg) translateZ(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.arena .choice.is-hot {
  transform: rotateX(4deg) translateY(-14px) translateZ(40px) scale(1.04);
  box-shadow:
    0 0 0 3px var(--sun),
    0 28px 0 rgba(0, 0, 0, 0.3),
    0 0 40px rgba(232, 176, 48, 0.45);
}
.arena .choice.is-right, .arena .say-card.is-right {
  animation: slam-yes 0.45s ease;
}
.arena .choice.is-wrong, .arena .say-card.is-wrong {
  animation: slam-no 0.45s ease;
}
.arena #feedback {
  animation: none;
}
.arena #feedback.is-right,
.arena #feedback.is-wrong {
  animation: slam-in 0.45s cubic-bezier(0.2, 1.4, 0.3, 1);
}
.arena .done-slab {
  max-width: 720px;
  margin: 8vh auto 0;
  text-align: center;
  transform: rotateX(8deg);
  animation: slab-float 6s ease-in-out infinite;
}

@keyframes mesh-spin {
  to { transform: rotate(360deg) scale(1.2); }
}
@keyframes ring-spin {
  to { transform: rotate(360deg); }
}
@keyframes slab-float {
  0%, 100% { transform: rotateX(6deg) rotateY(-5deg) translateY(0); }
  50% { transform: rotateX(8deg) rotateY(-3deg) translateY(-10px); }
}
@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pic-bob {
  0%, 100% { transform: rotateX(10deg) rotateY(-8deg) translateY(0); }
  50% { transform: rotateX(12deg) rotateY(-4deg) translateY(-8px); }
}
@keyframes card-flip {
  0% { transform: rotateY(0) scale(1); }
  45% { transform: rotateY(88deg) scale(0.94); }
  100% { transform: rotateY(0) scale(1); }
}
@keyframes slam-in {
  0% { transform: scale(0.4) translateZ(-80px); opacity: 0; }
  100% { transform: scale(1) translateZ(0); opacity: 1; }
}
@keyframes slam-yes {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.08) translateZ(30px); }
  100% { transform: scale(1); }
}
@keyframes slam-no {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .arena-mesh, .arena .portal-ring, .arena .ready-slab, .arena .pic-frame, .arena .tips li, .arena .done-slab {
    animation: none !important;
  }
  .arena .ready-slab, .arena .play-board, .arena .choice, .arena .camera-portal {
    transform: none !important;
  }
}

html:has(body.kids-play) { height: 100%; overflow: hidden; }
.kids-play {
  height: 100dvh;
  overflow: hidden;
  margin: 0;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 20px;
  align-items: stretch;
  background:
    radial-gradient(520px 320px at 0% 100%, rgba(210, 74, 46, 0.28), transparent 70%),
    radial-gradient(480px 300px at 100% 0%, rgba(240, 180, 41, 0.22), transparent 68%),
    #14171c !important;
  color: #f3eee6;
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  perspective: none;
}
.kids-play .arena-mesh,
.kids-play .arena-floor,
.kids-play .sky-cloud,
.kids-play .grass { display: none; }
.kids-play #ready,
.kids-play #stage,
.kids-play #done,
.kids-play #camera-frame { z-index: 2; min-width: 0; min-height: 0; }
.kids-play #camera-frame,
.kids-play .camera-portal {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  margin: 0;
  align-self: stretch;
  border: 1px solid rgba(243, 238, 230, 0.12);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: none;
  background: #0d0f13;
}
.kids-play .portal-ring { display: none; }
.kids-play #ready {
  grid-column: 2;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kids-play #camera-frame[hidden] ~ #ready { grid-column: 1 / -1; }
.kids-play #ready .leave { color: rgba(243, 238, 230, 0.72); font-weight: 500; font-size: 0.92rem; }
.kids-play .ready-slab {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: #fffcf8;
  color: #1c1b19;
  border: 1px solid #e6e1d8;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transform: none;
  animation: none;
  padding: 28px 32px;
}
.kids-play .ready-slab h1 { font-size: clamp(2rem, 3vw, 3rem); line-height: 1.05; color: #1c1b19; }
.kids-play .ready-slab .eyebrow.light {
  margin: 0;
  color: #6f6a62;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kids-play .ready-slab #ready-status { color: #6f6a62; font-size: 0.95rem; }
.kids-play .ready-slab .voice-lang { color: #6f6a62; margin: 4px 0; max-width: none; }
.kids-play .mascot { display: block; animation: none; }
.kids-play .mascot svg { width: 72px; height: 72px; }
.kids-play .mascot-small svg { width: 48px; height: 48px; }
.kids-play .mouth-sad { display: none; }
.kids-play .mascot.is-sad .mouth-happy { display: none; }
.kids-play .mascot.is-sad .mouth-sad { display: block; }
.kids-play .mascot.is-happy { animation: mascot-spin 0.7s ease; }
.kids-play .tips { display: flex; flex-wrap: wrap; gap: 0; margin: 2px 0 4px; }
.kids-play .tips li {
  background: transparent;
  border: 0;
  padding: 0;
  color: #6f6a62;
  font-size: 0.92rem;
  font-weight: 500;
  animation: none;
}
.kids-play .tips li + li::before { content: "·"; margin: 0 10px; color: #c4bfb6; }
.kids-play .voice-lang select {
  background: #fffcf8;
  border: 1px solid #e6e1d8;
  color: #1c1b19;
  border-radius: 10px;
  height: 40px;
}
.kids-play .arcade-start,
.kids-play #start {
  align-self: flex-start;
  margin-top: 8px;
  background: #d24a2e;
  color: #fffcf8;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  min-height: 44px;
  height: 44px;
  transform: none;
}
.kids-play #start:not(:disabled),
.kids-play .arcade-start:not(:disabled),
.kids-play .arcade-start:not(:disabled):hover,
.kids-play .arcade-start:not(:disabled):active {
  box-shadow: none;
  transform: none;
  opacity: 1;
}
.kids-play .arcade-start:not(:disabled):hover,
.kids-play #start:not(:disabled):hover { background: #a83822; }
.kids-play .level-badge {
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  background: #f0b429;
  border: 0;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1c1b19;
}
body.is-playing.kids-play {
  display: block;
  padding: 20px 24px;
}
body.is-playing.kids-play #stage {
  height: calc(100dvh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.is-playing.kids-play #camera-frame {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 200px;
  height: auto;
  aspect-ratio: 4 / 3;
  z-index: 4;
  margin: 0;
  border-radius: 16px;
  border: 1px solid rgba(243, 238, 230, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  transform: none;
  background: #0d0f13;
}
.kids-play .hud-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(243, 238, 230, 0.12);
  border-radius: 0;
  box-shadow: none;
  color: #f3eee6;
  padding: 0 0 12px;
}
.kids-play .hud-bar .level-badge { color: #1c1b19; background: #f0b429; }
.kids-play .hud-bar .leave { margin-left: auto; color: rgba(243, 238, 230, 0.72); font-weight: 500; }
.kids-play #who,
.kids-play #progress,
.kids-play #play-status,
.kids-play #guide { color: rgba(243, 238, 230, 0.72); }
.kids-play .play-board {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  animation: none;
  color: #f3eee6;
  padding: 12px 0 0;
}
body.kids-play.is-world #stage .play-board {
  flex: 0 0 auto;
  align-self: flex-start;
  width: min(640px, 100%);
  height: auto;
  max-height: min(70vh, 100%);
}
body.kids-play.is-world:not(.is-run) #stage .play-board {
  width: min(640px, calc(100% - 156px));
}
body.kids-play.is-world #stage .play-board #choices {
  flex: 0 0 auto;
}
body.kids-play.is-world.is-run #stage .play-board {
  align-self: stretch;
  width: auto;
  max-height: none;
  overflow: visible;
  margin-top: 8px;
  padding: 8px 14px 10px;
  background: rgba(20, 23, 28, 0.72);
  color: #f3eee6;
  border-radius: 14px;
  box-shadow: none;
}
body.kids-play.is-world.is-run.is-bike #stage .play-board {
  box-shadow: inset 0 0 0 2px rgba(63, 143, 78, 0.9);
}
body.kids-play.is-world.is-run.is-car #stage .play-board {
  box-shadow: inset 0 0 0 2px rgba(240, 180, 41, 0.9);
}
body.kids-play.is-world.is-run #stage .play-board #picture,
body.kids-play.is-world.is-run #stage .play-board .mascot,
body.kids-play.is-world.is-run #stage .play-board #guide,
body.kids-play.is-world.is-run #stage .play-board #feedback:empty,
body.kids-play.is-world.is-run #stage .play-board #hard-count:empty,
body.kids-play.is-world.is-run #stage .play-board #timer:empty {
  display: none;
}
body.kids-play.is-world.is-run #stage .play-board #pose-guide,
body.kids-play.is-world.is-run #stage .play-board #play-status,
body.kids-play.is-world.is-run #stage .play-board .round-banner,
body.kids-play.is-world.is-run #stage .play-board .mascot-row {
  margin: 2px 0;
}
body.kids-play.is-world.is-run #stage .play-board #prompt {
  font-size: 1.25rem !important;
  line-height: 1.3;
  color: #f3eee6;
}
body.kids-play.is-world.is-run #stage .play-board .speech-bubble,
body.kids-play.is-world.is-run #stage .play-board .round-banner,
body.kids-play.is-world.is-run #stage .play-board #guide,
body.kids-play.is-world.is-run #stage .play-board #play-status,
body.kids-play.is-world.is-run #stage .play-board #timer,
body.kids-play.is-world.is-run #stage .play-board #feedback {
  background: transparent;
  color: #f3eee6;
  text-shadow: none;
}
.kids-play .round-banner {
  display: inline-block;
  margin: 0 0 8px;
  padding: 0;
  background: transparent;
  border: 0;
  color: rgba(243, 238, 230, 0.62);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kids-play .mascot-row { display: flex; align-items: center; gap: 12px; }
.kids-play .speech-bubble {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 !important;
  color: #f3eee6;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.6rem) !important;
}
.kids-play .pic-frame {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  animation: none;
}
.kids-play #picture svg { height: min(18vh, 160px); margin: 6px 0; filter: none; }
.kids-play #choices { flex: 1; min-height: 0; margin-top: 8px; gap: 12px; align-content: start; }
.kids-play .choice,
.kids-play .say-card {
  min-height: 88px;
  padding: 12px 14px;
  background: rgba(255, 252, 248, 0.06);
  border: 1px solid rgba(243, 238, 230, 0.14);
  color: #f3eee6;
  box-shadow: none;
  transform: none;
  border-radius: 16px;
}
.kids-play .say-card { min-height: 96px; }
.kids-play .choice strong,
.kids-play .say-card strong { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.kids-play .piece {
  background: #fffcf8;
  color: #1c1b19;
  border: 1px solid #e6e1d8;
  box-shadow: none;
  transform: none;
  border-radius: 12px;
  min-height: 72px;
}
.kids-play .choice.is-hot {
  background: #f0b429;
  color: #1c1b19;
  border-color: #f0b429;
  transform: none;
  box-shadow: none;
}
.kids-play .choice.is-hot span { color: #6a4b08; }
.kids-play .choice.is-right,
.kids-play .say-card.is-right { background: #1f6b45; color: #f3eee6; border-color: #1f6b45; }
.kids-play .choice.is-wrong,
.kids-play .say-card.is-wrong { background: #8d3d45; color: #f3eee6; border-color: #8d3d45; }
.kids-play .star-track { display: flex; gap: 6px; align-items: center; transform: none; }
.kids-play .star-pip { font-size: 1rem; color: rgba(243, 238, 230, 0.28); }
.kids-play .star-pip.is-now { color: #f3eee6; transform: none; }
.kids-play .star-pip.is-done { color: #e7d7a8; text-shadow: none; }
.kids-play .star-pip.is-solid { color: #f0b429; }
.kids-play .star-pip.is-open { color: transparent; -webkit-text-stroke: 1px rgba(243, 238, 230, 0.75); }
.race-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 6px;
}
body.kids-play.is-world.is-run .race-bar { display: flex; }
.lane-lights { display: flex; gap: 8px; }
.lane-lights i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(243, 238, 230, 0.28);
  display: block;
}
.lane-lights i.is-on { background: #f0b429; }
#race-clock { font-variant-numeric: tabular-nums; font-weight: 600; }
.pause-card {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(20, 23, 28, 0.55);
}
.pause-card[hidden] { display: none; }
.pause-card p {
  margin: 0;
  font-family: Fraunces, serif;
  font-size: 3rem;
  color: #f3eee6;
}
.kids-play #feedback.is-right { color: #b7e7c9; }
.kids-play #feedback.is-wrong { color: #f3c1c4; }
.kids-play .phase-splash {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(20, 23, 28, 0.72);
  pointer-events: none;
}
.kids-play .phase-splash[hidden] { display: none; }
.kids-play .phase-splash p {
  max-width: 90vw;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  color: #f3eee6;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.kids-play .phase-splash.is-right p { background: transparent; color: #b7e7c9; }
.kids-play .phase-splash.is-wrong p { background: transparent; color: #f3c1c4; }
body.is-done.kids-play {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 24px;
}
.kids-play #done { width: min(560px, 100%); max-width: none; margin: 0; padding: 0; }
.kids-play .done-slab {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: #fffcf8;
  color: #1c1b19;
  border: 1px solid #e6e1d8;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transform: none;
  animation: none;
  padding: 36px 32px;
}
.kids-play .done-slab h1 { font-size: clamp(2rem, 4vw, 3rem); color: #1c1b19; }
.kids-play .done-slab p { color: #6f6a62; }
.kids-play .button-sun {
  background: #d24a2e;
  color: #fffcf8;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.kids-play .button-sun:hover { background: #a83822; }
.kids-play .button-ghost {
  color: #1c1b19;
  background: transparent;
  border: 1px solid #e6e1d8;
  border-radius: 8px;
  box-shadow: none;
}
.kids-play .button-ghost:hover { background: #f6f4ef; }
@media (max-width: 800px) {
  body.kids-play:not(.is-playing):not(.is-done) {
    grid-template-columns: 1fr;
    grid-template-rows: 38vh minmax(0, 1fr);
    padding: 12px;
    gap: 12px;
  }
  .kids-play #ready { grid-column: 1; grid-row: 2; }
  .kids-play #camera-frame[hidden] ~ #ready { grid-row: 1; }
  .kids-play .ready-slab { padding: 16px 18px; }
  .kids-play .ready-slab h1 { font-size: 1.7rem; }
  .kids-play .mascot svg { width: 56px; height: 56px; }
  body.is-playing.kids-play #camera-frame { width: 120px; }
}

.kids-app .catalog-hero { align-items: flex-end; }
.kids-app .page-head { margin-bottom: 28px; }
.kids-app .page-head h1 { font-size: clamp(2.2rem, 3.2vw, 3rem); }
.kids-app .table-wrap {
  border-radius: 16px;
  border: 1px solid #e6e1d8;
  box-shadow: 0 10px 40px rgba(28, 27, 25, 0.04);
}
.kids-app .catalog-count { margin: 6px 0 0; color: #6f6a62; font-size: 0.92rem; font-weight: 500; }
.kids-app .filter-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.kids-app .filter-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e6e1d8;
  border-radius: 999px;
  background: transparent;
  color: #1c1b19;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}
.kids-app .filter-pill.subject-english:not(.is-on) { background: #e7f1f8; border-color: #2f6f8f; }
.kids-app .filter-pill.subject-maths:not(.is-on) { background: #f8edd4; border-color: #c48412; }
.kids-app .filter-pill.subject-science:not(.is-on) { background: #e5f3ea; border-color: #1b7a45; }
.kids-app .filter-pill.is-on { background: #d24a2e; color: #fffcf8; border-color: #d24a2e; }
.kids-app .catalog-filters {
  background: #fffcf8;
  border: 1px solid #e6e1d8;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 22px;
}
.kids-app .topic-posters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.kids-app .topic-poster {
  display: grid;
  grid-template-rows: auto 1fr;
  background: #fffcf8;
  border: 1px solid #e6e1d8;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(28, 27, 25, 0.05);
  overflow: hidden;
}
.kids-app .subject-english.topic-poster { border-top: 3px solid #2f6f8f; }
.kids-app .subject-maths.topic-poster { border-top: 3px solid #c48412; }
.kids-app .subject-science.topic-poster { border-top: 3px solid #1b7a45; }
.kids-app .poster-cover {
  display: grid;
  place-items: center;
  background: #f6f4ef;
  min-height: 200px;
  padding: 20px;
}
.kids-app .poster-cover .cover,
.kids-app .poster-cover svg { width: 148px; height: 148px; }
.kids-app .subject-english .poster-cover,
.kids-app .pill.subject-english { background: #e7f1f8; }
.kids-app .subject-maths .poster-cover,
.kids-app .pill.subject-maths { background: #f8edd4; }
.kids-app .subject-science .poster-cover,
.kids-app .pill.subject-science { background: #e5f3ea; }
.kids-app .pill.subject-english { border-color: #d3e4f0; }
.kids-app .pill.subject-maths { border-color: #ead9a8; }
.kids-app .pill.subject-science { border-color: #c9e6d4; }
.kids-app .poster-body { display: grid; gap: 8px; padding: 18px 20px 20px; align-content: start; }
.kids-app .poster-body h2 { margin: 0; font-size: 1.55rem; }
.kids-app .poster-body h2 a { color: #1d6a86; text-decoration: none; }
.kids-app .poster-blurb {
  margin: 0;
  color: #6f6a62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kids-app .game-type {
  display: inline-block;
  justify-self: start;
  margin: 4px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f6a62;
}
.kids-app .game-surface { margin: 0; color: #6f6a62; font-weight: 400; }
.kids-app .poster-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; color: #6f6a62; font-size: 0.88rem; }
.kids-app .level-pip {
  border: 1px solid #e6e1d8;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  opacity: 0.45;
  background: transparent;
}
.kids-app .level-pip.is-on { opacity: 1; background: #eeece6; }
.kids-app .poster-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 6px; }
.kids-app .hero, .kids-app .fact, .kids-app .panel {
  background: #fffcf8;
  border: 1px solid #e6e1d8;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(28, 27, 25, 0.04);
}
.kids-app .play-giant {
  min-height: 40px;
  min-width: 0;
  height: 40px;
  font-size: 0.95rem;
  border: 0;
  box-shadow: none;
}
.kids-app .play-giant.button-secondary {
  background: transparent;
  color: #1c1b19;
  border: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kids-app .play-giant.button-secondary:hover { background: transparent; color: #1c1b19; }
.kids-app .level-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}
.kids-app .level-picks legend { font-weight: 600; margin-bottom: 8px; }
.kids-app .level-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #fffcf8;
  border: 1px solid #e6e1d8;
  border-radius: 12px;
  box-shadow: none;
  cursor: pointer;
}
.kids-app .level-card.is-on { background: #d24a2e; color: #fffcf8; border-color: #d24a2e; }
.kids-app .level-card input { margin: 0; }

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to { transform: translateX(120vw); }
}
@keyframes mascot-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes mascot-spin {
  0% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.08); }
  100% { transform: rotate(0) scale(1); }
}

.kids-app {
  --ink: #1c1b19;
  --muted: #6f6a62;
  --canvas: #f3f1ec;
  --card: #fffcf8;
  --line: #e6e1d8;
  --side: #f7f6f3;
  --side-text: #1c1b19;
  --sun: #f0b429;
  --clay: #d24a2e;
  --clay-deep: #a83822;
  --sans: "Instrument Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(520px 320px at 0% 0%, rgba(210, 74, 46, 0.14), transparent 70%),
    radial-gradient(480px 300px at 100% 100%, rgba(29, 106, 134, 0.12), transparent 68%),
    #f3f1ec;
  color: #1c1b19;
  font-family: var(--sans);
}
.kids-app .main { max-width: 1120px; background: transparent; }
.kids-app .main a:not(.button):not(.filter-pill):not(.pager-link) { color: #1d6a86; }
.kids-app .side {
  background: #14171c;
  color: #f3eee6;
  border-right: 1px solid rgba(243, 238, 230, 0.08);
}
.kids-app .brand {
  width: fit-content;
  margin-left: 12px;
  color: #fffcf8;
  background: none;
  border: 0;
  border-bottom: 3px solid #f0b429;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 4px;
}
.kids-app .nav-label { color: rgba(243, 238, 230, 0.45); }
.kids-app .nav a {
  color: rgba(243, 238, 230, 0.82);
  border-radius: 8px;
  font-weight: 500;
}
.kids-app .nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.kids-app .nav a.is-on {
  background: rgba(210, 74, 46, 0.22);
  color: #fff;
  border: 0;
  box-shadow: none;
}
.kids-app .nav a.is-on::before { display: block; background: #f0b429; }
.kids-app .who { color: #f3eee6; }
.kids-app .avatar {
  background: #f0b429;
  color: #1c1b19;
  border: 0;
}
.kids-app .side .text-button { color: rgba(243, 238, 230, 0.62); }
.kids-app .side .text-button:hover { color: #fff; }
.kids-app :focus-visible { outline-color: #d24a2e; }
.kids-app .button {
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  background: #d24a2e;
  color: #fffcf8;
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
}
.kids-app .button:hover { background: #a83822; }
.kids-app .button-secondary {
  background: transparent;
  color: #1c1b19;
  border: 1px solid #e6e1d8;
}
.kids-app .button-secondary:hover { background: #f6f4ef; }
.kids-app .button-sun { background: #d24a2e; color: #fffcf8; }
.kids-app .button-sun:hover { background: #a83822; }
.kids-app .panel, .kids-app .card, .kids-app .flash, .kids-app .empty, .kids-app .form-error {
  border: 1px solid #e6e1d8;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(28, 27, 25, 0.04);
  background: #fffcf8;
}
.kids-app .form-error { background: #fde8e4; color: #a33b32; }
.kids-app input:not([type="checkbox"]), .kids-app select {
  border: 1px solid #e6e1d8;
  border-radius: 10px;
  height: 40px;
  background: #fff;
}
.kids-app .grid th, .kids-app .grid td { border-bottom: 1px solid #e6e1d8; }
.kids-app .grid th {
  background: #fbf6e8;
  color: #6f6a62;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kids-app .grid tbody tr:nth-child(even) td { background: transparent; }
.kids-app .grid tbody tr:hover td { background: #fafaf8; }
.kids-app .table-wrap {
  border: 1px solid #e6e1d8;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(28, 27, 25, 0.04);
}
.kids-app .people li { border-bottom: 1px solid #e6e1d8; }
.kids-app .pill, .kids-app .badge {
  border: 1px solid #e6e1d8;
  background: #f6f4ef;
  color: #1c1b19;
}
.kids-app .k-node {
  border: 1px solid #e6e1d8;
  border-radius: 16px;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
}
.kids-app .k-node.is-fresh { background: #fffcf8; }
.kids-app .k-node.is-learning { background: #f6edd4; }
.kids-app .k-node.is-secure { background: #e5f6ea; }
.login-body.kids-login {
  background: #f3f1ec;
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
}
.kids-login .login-card {
  border: 1px solid #e6e1d8;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(28, 27, 25, 0.06);
  background: #fffcf8;
}
.kids-login .login-form h1 { font-size: clamp(2rem, 3vw, 2.6rem); }
.kids-login .login-art {
  background: #a83822;
  color: #f3eee6;
}
.kids-login .brand-light {
  color: #f0b429;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.kids-login .login-lead { color: #f3eee6; }
.kids-login .login-form .button {
  background: #d24a2e;
  color: #fffcf8;
  border: 0;
  box-shadow: none;
  border-radius: 8px;
}
.kids-login .login-form .button:hover { background: #a83822; }
.kids-app .pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
}
.kids-app .pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e6e1d8;
  border-radius: 999px;
  background: #fffcf8;
  color: #1c1b19;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.kids-app .pager-link.is-on {
  background: #d24a2e;
  border-color: #d24a2e;
  color: #fffcf8;
}
@media (max-width: 800px) {
  .kids-login .login-card { grid-template-columns: 1fr; }
  .kids-app .topic-posters { grid-template-columns: 1fr; }
  .kids-app .shell { flex-direction: column; }
  .kids-app .side {
    width: 100%;
    height: auto;
    position: relative;
    border-right: 0;
    border-bottom: 1px solid rgba(243, 238, 230, 0.12);
  }
}
.kids-app .poster-actions form { display: inline; margin: 0; }
.kids-app .check-line { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.kids-app details.panel { margin-top: 12px; }
.kids-app .ready-room video, .kids-app video#ready-camera {
  width: 100%;
  max-height: 42vh;
  background: #14171c;
  border-radius: 16px;
}
.kids-play .teach-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.kids-play .teach-bar button {
  border: 1px solid rgba(243, 238, 230, 0.24);
  background: transparent;
  color: #f3eee6;
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
}
.kids-play #pose-guide {
  letter-spacing: 0.08em;
  color: #f0b429;
  font-weight: 600;
}
.kids-play.is-hard #hard-count {
  font-family: Fraunces, serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: #f0b429;
  margin: 0;
  line-height: 1;
}
.kids-play.is-board .mascot-row .mascot { display: none; }
.kids-play.is-board #prompt { font-size: clamp(2rem, 4vw, 3.2rem); }
.call-name {
  font-family: Fraunces, serif;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.05;
  margin: 0.2em 0;
}
