:root {
  color-scheme: light;
  --space-deep: #1b1464;
  --space-mid: #3a2e8c;
  --violet: #6c5ce7;
  --coral: #ff6fa5;
  --sun: #ffd23f;
  --mint: #2ee6a6;
  --sky: #3fc5f0;
  --cloud: #fff9f0;
  --ink: #241c4a;
  --mist: rgba(255, 249, 240, 0.16);
  --line: rgba(255, 249, 240, 0.16);
  --panel: rgba(255, 249, 240, 0.92);
  --panel-soft: rgba(255, 249, 240, 0.82);
  --shadow: 0 18px 44px rgba(17, 12, 62, 0.24);
  --radius-sm: 18px;
  --radius-md: 24px;
  --radius-lg: 28px;
  --radius-blob: 42% 58% 55% 45% / 48% 42% 58% 52%;
  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cloud);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(255, 111, 165, 0.18), transparent 22%),
    radial-gradient(circle at top right, rgba(63, 197, 240, 0.14), transparent 20%),
    radial-gradient(circle at 20% 80%, rgba(46, 230, 166, 0.12), transparent 16%),
    linear-gradient(180deg, var(--space-mid) 0%, var(--space-deep) 48%, #130d46 100%);
}

html,
body {
  overflow-x: hidden;
}

body[data-theme="sunrise"] {
  --space-deep: #4d2b1f;
  --space-mid: #d96b3b;
  --violet: #ff8b5c;
  --coral: #ff5f6d;
  --sun: #ffd166;
  --mint: #ffe29a;
  --sky: #ffb38a;
}

body[data-theme="ocean"] {
  --space-deep: #083b66;
  --space-mid: #0c6fa8;
  --violet: #0a8bdc;
  --coral: #26c6da;
  --sun: #9be7ff;
  --mint: #46f0c5;
  --sky: #5fd3ff;
}

body[data-theme="candy"] {
  --space-deep: #552266;
  --space-mid: #d85ba6;
  --violet: #ff76c8;
  --coral: #ff9f68;
  --sun: #ffd86f;
  --mint: #7bf0d8;
  --sky: #9fc7ff;
}

body[data-theme="volcano"] {
  --space-deep: #2a0d0d;
  --space-mid: #8f2d1f;
  --violet: #d94b2b;
  --coral: #ff7a2f;
  --sun: #ffd166;
  --mint: #ffb36b;
  --sky: #ff8f5a;
}

body[data-theme="aurora"] {
  --space-deep: #13254f;
  --space-mid: #3e4fd2;
  --violet: #7d7cff;
  --coral: #55d6c2;
  --sun: #d7ff8a;
  --mint: #7ef0d8;
  --sky: #8ed7ff;
}

body[data-theme="forest"] {
  --space-deep: #163325;
  --space-mid: #2d6a4f;
  --violet: #3fa36a;
  --coral: #8bd17c;
  --sun: #f4d35e;
  --mint: #80ed99;
  --sky: #95d5b2;
}

body[data-theme="galaxy"] {
  --space-deep: #120521;
  --space-mid: #45206f;
  --violet: #7f5af0;
  --coral: #ef5da8;
  --sun: #ffd166;
  --mint: #3ad5c9;
  --sky: #70a1ff;
}

body[data-theme="royal"] {
  --space-deep: #1a1433;
  --space-mid: #4c2a85;
  --violet: #7a4ef2;
  --coral: #c08bff;
  --sun: #ffdd7a;
  --mint: #f3c969;
  --sky: #c9b6ff;
}

body:has(.kindergarten-home),
body:has(.kindergarten-practice) {
  background:
    radial-gradient(circle at 13% 16%, rgba(255, 244, 154, 0.9), transparent 14%),
    radial-gradient(circle at 88% 10%, rgba(255, 167, 212, 0.55), transparent 18%),
    linear-gradient(180deg, #65ccf4 0%, #84dcf5 42%, #c6f5c4 100%);
}

.kindergarten-home,
.kindergarten-practice {
  position: relative;
  z-index: 1;
  max-width: 980px;
  padding: clamp(12px, 3vw, 28px);
  color: #25315a;
}

.kindergarten-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  min-height: 220px;
  padding: 22px;
  border: 4px solid rgba(255, 255, 255, 0.8);
  border-radius: 36px;
  background: linear-gradient(145deg, #fff1a8, #ffb7dc 52%, #ad8cff);
  box-shadow: 0 18px 0 rgba(80, 78, 159, 0.2), 0 26px 42px rgba(57, 78, 141, 0.2);
}

.kindergarten-cloud {
  position: absolute;
  width: 150px;
  height: 42px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.62);
  filter: blur(1px);
  z-index: -1;
}

.cloud-a { top: 20px; right: 90px; }
.cloud-b { bottom: 18px; left: 14%; transform: scale(0.7); }

.kindergarten-mascot {
  display: grid;
  place-items: center;
  width: clamp(88px, 16vw, 142px);
  aspect-ratio: 1;
  border: 5px solid rgba(255, 255, 255, 0.88);
  border-radius: 44% 56% 52% 48%;
  background: radial-gradient(circle at 38% 28%, #fff 0 12%, #f4ebff 13% 55%, #bd9dff 100%);
  box-shadow: inset 0 -10px 0 rgba(110, 76, 191, 0.12), 0 10px 0 rgba(92, 68, 153, 0.18);
  font-size: clamp(3.4rem, 8vw, 6rem);
  animation: kindergarten-bounce 2.8s ease-in-out infinite;
}

.kindergarten-mascot.small {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 88px;
  transform: translateX(-50%);
  font-size: 3.6rem;
}

.kindergarten-welcome { text-align: center; }
.kindergarten-welcome span,
.lesson-scene-name { font-weight: 900; color: #744b9c; }
.kindergarten-welcome h1 { margin: 4px 0; font-size: clamp(2rem, 6vw, 3.7rem); line-height: 0.98; color: #483172; }
.kindergarten-welcome p { margin: 8px 0 0; font-size: clamp(1rem, 3vw, 1.3rem); font-weight: 800; }

.kindergarten-stars {
  align-self: start;
  min-width: 82px;
  padding: 10px 12px;
  border-radius: 18px;
  color: #704d10;
  background: #fff6b6;
  box-shadow: inset 0 -4px 0 rgba(186, 135, 24, 0.22);
  font-weight: 1000;
  text-align: center;
}

.kindergarten-back,
.kindergarten-sound { align-self: start; position: relative; z-index: 1; }

.kindergarten-map {
  margin-top: 18px;
  padding: clamp(16px, 3vw, 28px);
  border: 4px solid rgba(255, 255, 255, 0.8);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 0 rgba(69, 123, 99, 0.14), 0 24px 38px rgba(55, 95, 119, 0.15);
}

.kindergarten-map-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.kindergarten-map-title > span { font-size: 2.7rem; }
.kindergarten-map-title h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.3rem); }
.kindergarten-map-title p { margin: 2px 0 0; font-weight: 800; color: #667293; }

.kindergarten-lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kindergarten-lesson {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 248px;
  padding: 16px 12px 14px;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  box-shadow: inset 0 -9px 0 rgba(63, 63, 130, 0.14), 0 12px 0 rgba(65, 75, 133, 0.14);
  text-align: center;
}
.lesson-0 { background: linear-gradient(145deg, #ffd57e, #ff9988); }
.lesson-1 { background: linear-gradient(145deg, #9ef4d6, #52c8bc); }
.lesson-2 { background: linear-gradient(145deg, #a8d8ff, #8d9bf0); }
.lesson-3 { background: linear-gradient(145deg, #f5b6ff, #c58ee8); }
.lesson-4 { background: linear-gradient(145deg, #fff99b, #a7df8c); }
.lesson-scene { font-size: clamp(3rem, 9vw, 5rem); line-height: 1; filter: drop-shadow(0 6px 0 rgba(50, 52, 111, 0.18)); }
.kindergarten-lesson h3 { margin: 2px 0 0; font-size: 1.3rem; }
.kindergarten-lesson p { min-height: 2.6em; margin: 0; font-weight: 800; color: rgba(37, 49, 90, 0.82); }
.kindergarten-level-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 6px; }
.kindergarten-level-row button {
  min-height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #3e3e77;
  font-weight: 1000;
  box-shadow: inset 0 -3px 0 rgba(62, 62, 119, 0.13);
}
.kindergarten-level-row button:hover,
.kindergarten-level-row button:focus-visible { transform: translateY(-2px); background: #fff; }
.kindergarten-tip { display: flex; justify-content: center; gap: 9px; margin: 16px auto 0; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.74); color: #3f4f75; text-align: center; }

.kindergarten-practice-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.kindergarten-progress { padding: 10px 16px; border-radius: 18px; background: #fff2a4; box-shadow: inset 0 -4px 0 rgba(184, 133, 23, 0.18); color: #744e1d; font-weight: 1000; }
.kindergarten-progress span { margin-left: 10px; color: #6a7190; }
.kindergarten-listen { width: 64px; min-height: 58px; border: 3px solid #fff; border-radius: 22px; background: linear-gradient(145deg, #ab83ff, #7a61df); box-shadow: inset 0 -6px 0 rgba(62, 42, 142, 0.23), 0 7px 0 rgba(62, 42, 142, 0.18); color: #fff; font-size: 2rem; }

.kindergarten-question-card { position: relative; min-height: min(580px, calc(100svh - 112px)); padding: clamp(74px, 8vw, 88px) clamp(14px, 4vw, 36px) 22px; overflow: hidden; border: 4px solid rgba(255, 255, 255, 0.88); border-radius: 38px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(234, 245, 255, 0.9)); box-shadow: 0 16px 0 rgba(51, 107, 143, 0.14); }
.kindergarten-speech { max-width: 620px; margin: 0 auto 22px; padding: 14px 20px; border-radius: 22px; background: #fff; box-shadow: 0 6px 0 rgba(102, 139, 176, 0.12); color: #37446e; font-size: clamp(1.25rem, 4.6vw, 2rem); font-weight: 1000; text-align: center; }
.kindergarten-activity { display: grid; place-items: center; gap: 18px; min-height: 285px; }
.kindergarten-result {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 28px 18px;
}
.kindergarten-result-card {
  position: relative;
  width: min(100%, 720px);
  padding: 74px clamp(22px, 7vw, 64px) 38px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 40px;
  background: linear-gradient(160deg, #fff9cc, #dff8ff 58%, #ffd9ec);
  box-shadow: 0 16px 0 rgba(51, 107, 143, 0.16);
  color: #37446e;
  text-align: center;
}
.kindergarten-result-mascot {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3.3rem;
}
.kindergarten-result-stars { font-size: clamp(2.3rem, 8vw, 4rem); letter-spacing: 8px; }
.kindergarten-result-card h1 { margin: 10px 0 4px; color: #e25e99; font-size: clamp(2rem, 7vw, 3.4rem); }
.kindergarten-result-card p { margin: 0 0 22px; color: #526589; font-weight: 900; }
.kindergarten-result-score,
.kindergarten-result-gems { margin: 12px auto; padding: 15px 18px; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 rgba(96, 140, 170, 0.12); font-size: clamp(1.1rem, 4.5vw, 1.5rem); font-weight: 1000; }
.kindergarten-result-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.kindergarten-result-actions button { min-height: 64px; border: 3px solid #fff; border-radius: 18px; background: linear-gradient(145deg, #8ba8ff, #8f76e5); box-shadow: inset 0 -6px 0 rgba(62, 42, 142, 0.2); color: #fff; font-weight: 1000; }
.kindergarten-target,
.kindergarten-big-number { display: grid; place-items: center; width: 104px; aspect-ratio: 1; border: 5px solid #fff; border-radius: 28px; background: linear-gradient(145deg, #ffdc61, #ff9f9e); box-shadow: inset 0 -10px 0 rgba(168, 77, 82, 0.16), 0 9px 0 rgba(124, 83, 140, 0.17); color: #fff; font-size: 4rem; font-weight: 1000; text-shadow: 0 3px 0 rgba(122, 72, 114, 0.28); }
.kindergarten-object-grid { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: clamp(8px, 2.2vw, 18px); width: min(100%, 660px); min-height: 180px; }
.kindergarten-object { display: grid; place-items: center; width: clamp(58px, 14vw, 94px); aspect-ratio: 1; border: 3px solid rgba(102, 131, 169, 0.16); border-radius: 26px; background: rgba(255, 255, 255, 0.84); box-shadow: inset 0 -7px 0 rgba(93, 143, 174, 0.11), 0 6px 0 rgba(80, 118, 150, 0.12); font-size: clamp(2.4rem, 8vw, 4rem); }
.kindergarten-object.static { cursor: default; }
.kindergarten-object-grid.dense { gap: 5px; min-height: 128px; }
.kindergarten-object-grid.dense .kindergarten-object { width: clamp(42px, 10vw, 60px); border-radius: 18px; font-size: clamp(1.8rem, 6vw, 2.8rem); }
.kindergarten-object.selectable:hover,
.kindergarten-object.selectable:focus-visible { transform: translateY(-4px) scale(1.04); background: #fff9b9; }
.kindergarten-object.selected { transform: scale(0.88); background: #b8f5c9; opacity: 0.72; }
.kindergarten-count-note { margin: -12px 0 0; color: #5f7698; font-size: 1.2rem; font-weight: 1000; }
.kindergarten-answer-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(100%, 530px); }
.kindergarten-answer-choices button { min-height: 84px; border: 4px solid #fff; border-radius: 24px; background: linear-gradient(145deg, #8ba8ff, #8f76e5); box-shadow: inset 0 -8px 0 rgba(62, 42, 142, 0.21), 0 6px 0 rgba(62, 42, 142, 0.15); color: #fff; font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 1000; }
.kindergarten-group-choices,
.kindergarten-compare-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; width: min(100%, 680px); }
.kindergarten-group-choice,
.kindergarten-compare-choice { min-height: 150px; padding: 14px; border: 4px solid #fff; border-radius: 28px; background: linear-gradient(145deg, #d7baff, #99d8ff); box-shadow: inset 0 -8px 0 rgba(75, 83, 160, 0.16), 0 6px 0 rgba(75, 83, 160, 0.15); color: #34426b; font-size: clamp(2rem, 7vw, 3.2rem); }
.kindergarten-compare-choice { display: grid; gap: 8px; background: linear-gradient(145deg, #ffe692, #ffb4c7); }
.compare-side { font-size: 1rem; font-weight: 1000; }
.kindergarten-number-track { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.kindergarten-number-track span { display: grid; place-items: center; width: clamp(58px, 14vw, 88px); aspect-ratio: 1; border-radius: 22px; background: #9eddf4; box-shadow: inset 0 -7px 0 rgba(60, 122, 157, 0.17); color: #fff; font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 1000; }
.kindergarten-number-track .missing { background: #ffba96; animation: kindergarten-pulse 1.8s ease-in-out infinite; }
.kindergarten-direction { margin-top: -16px; color: #64749a; font-size: 1.2rem; font-weight: 1000; }
.kindergarten-picture-equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; max-width: 620px; font-size: clamp(2rem, 7vw, 4rem); text-align: center; }
.kindergarten-picture-equation b { color: #6c5ce7; font-size: 1.25em; }
.kindergarten-picture-equation .faded { opacity: 0.4; text-decoration: line-through; }
.kindergarten-feedback { position: absolute; inset: auto 16px 20px; padding: 14px; border-radius: 18px; color: #fff; font-size: 1.35rem; font-weight: 1000; text-align: center; animation: kindergarten-feedback 0.35s ease both; }
.kindergarten-feedback.correct { background: linear-gradient(145deg, #2ed39a, #1baf9e); }
.kindergarten-feedback.soft { background: linear-gradient(145deg, #8c9ed9, #6d77bc); }

@keyframes kindergarten-bounce { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes kindergarten-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes kindergarten-feedback { from { transform: translateY(14px) scale(0.94); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: 72px;
  left: 28px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 210, 63, 0.72), rgba(255, 210, 63, 0.18) 34%, transparent 62%);
  filter: blur(6px);
  opacity: 0.24;
}

body::after {
  right: -34px;
  bottom: 18vh;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(108, 92, 231, 0.34), transparent 58%);
  filter: blur(18px);
  opacity: 0.28;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button,
.planet-card,
.profile-tile,
.topic-pick,
.cave-node,
.icon-button,
.choice-btn {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid var(--sun);
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.top-band,
.kid-status,
.practice-status,
.mini-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-band {
  justify-content: center;
  padding: 10px 0 18px;
}

.top-band h1,
h1,
h2,
.profile-name,
.stat-pill,
.home-kicker,
.planet-card span,
.planet-card strong,
.topic-pick span,
.topic-pick strong,
.primary-action,
.danger-action,
.secondary-link,
.pill-link,
.range-pill,
.result-line,
.result-hint,
.practice-chip,
.stage-chip {
  font-family: var(--font-display);
}

.top-band h1 {
  margin: 0;
  font-size: clamp(2.1rem, 8vw, 4.2rem);
  line-height: 0.95;
}

.brand-mark,
.kid-avatar,
.blob {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: var(--radius-blob);
  background:
    linear-gradient(145deg, rgba(255, 249, 240, 0.96), rgba(255, 249, 240, 0.74));
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 2.4rem;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 56px;
  min-height: 62px;
  padding: 8px 10px 6px;
  border: 1px solid rgba(255, 249, 240, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(255, 249, 240, 0.9);
  color: transparent;
  box-shadow: 0 12px 28px rgba(17, 12, 62, 0.18);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.icon-button::before {
  content: attr(data-icon);
  display: block;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.icon-button::after {
  content: attr(aria-label);
  display: block;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.1;
  margin-top: 3px;
}

.icon-button:not([data-icon])::before,
.icon-button[data-icon=""]::before {
  content: none;
}

.icon-button:not([data-icon])::after,
.icon-button[data-icon=""]::after {
  font-size: 0.95rem;
  margin-top: 0;
}

.icon-button.icon-only {
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  font-size: 0;
}

.icon-button.icon-only::after {
  content: none;
}

.icon-button.icon-only::before {
  font-size: 1.45rem;
}

.profile-grid,
.action-grid,
.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-hero,
.home-hero,
.panel,
.result-panel,
.question-zone,
.mission,
.badge,
.empty-state,
.kid-metrics div,
.report-item,
.roster-item,
.metric-table div,
.simple-list div {
  position: relative;
  overflow: hidden;
}

.profile-hero,
.home-hero,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.12), rgba(255, 249, 240, 0.06));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.profile-hero::after,
.home-hero::after,
.panel::after,
.planet-card::after,
.profile-tile::after,
.topic-pick::after,
.result-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 22%);
  pointer-events: none;
}

.profile-hero {
  margin-bottom: 16px;
  padding: 18px;
}

.storybook-hero {
  padding: 18px 18px 24px;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 214, 102, 0.48), transparent 16%),
    radial-gradient(circle at 82% 12%, rgba(255, 145, 197, 0.34), transparent 16%),
    linear-gradient(180deg, rgba(80, 203, 255, 0.34), rgba(96, 141, 255, 0.14)),
    linear-gradient(180deg, rgba(255, 249, 240, 0.16), rgba(255, 249, 240, 0.08));
}

.storybook-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.storybook-brand {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(33, 70, 140, 0.24);
  color: #fffaf3;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.storybook-sound {
  background: rgba(255, 249, 240, 0.96);
}

.storybook-logo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.storybook-plaque {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 28px;
  background: linear-gradient(160deg, #ffd64f, #ff9e4f);
  color: #5c2c00;
  font-size: 2.5rem;
  box-shadow: 0 16px 30px rgba(255, 165, 47, 0.28);
}

.storybook-title-wrap h1 {
  margin: 2px 0 8px;
  color: #fff8e8;
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  line-height: 0.92;
  text-shadow: 0 4px 0 rgba(72, 37, 123, 0.9), 0 10px 18px rgba(43, 29, 109, 0.35);
}

.storybook-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(91, 58, 178, 0.86);
  color: #fff5be;
  font-family: var(--font-display);
  font-size: 0.92rem;
}

.storybook-title-wrap p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 249, 240, 0.92);
  font-size: 1rem;
}

.storybook-stage {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr minmax(120px, 160px);
  gap: 14px;
  align-items: end;
}

.storybook-mascot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 10px 10px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 249, 240, 0.42), rgba(255, 249, 240, 0.16));
}

.mascot-figure {
  font-size: 4.8rem;
  line-height: 1;
  filter: drop-shadow(0 10px 14px rgba(27, 20, 100, 0.24));
}

.mascot-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffe66d;
  color: #7b4200;
  font-size: 1rem;
  box-shadow: 0 8px 16px rgba(255, 214, 79, 0.35);
}

.storybook-mascot strong {
  color: #fffaf3;
  font-family: var(--font-display);
  font-size: 1rem;
  text-align: center;
}

.storybook-center-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 20px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 247, 214, 0.98), rgba(255, 233, 184, 0.94));
  color: #67421b;
  box-shadow: inset 0 0 0 4px rgba(132, 181, 60, 0.55), 0 18px 40px rgba(39, 35, 90, 0.22);
  text-align: center;
}

.storybook-center-card h2 {
  margin: 0;
  color: #513111;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2.4rem);
}

.storybook-center-card p {
  margin: 0;
  color: #7b5a34;
}

.storybook-cta {
  min-width: 250px;
  background: linear-gradient(145deg, #ff78c8, #9c5df5);
  color: #fffaf3;
  box-shadow: 0 14px 26px rgba(131, 60, 213, 0.3);
}

.hero-spark {
  position: absolute;
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  font-weight: 800;
  opacity: 0.5;
  filter: drop-shadow(0 8px 10px rgba(32, 15, 91, 0.2));
}

.hero-spark-a { top: 18px; left: 18px; color: #ffbf40; transform: rotate(-12deg); }
.hero-spark-b { top: 88px; right: 26px; color: #ff7aaa; transform: rotate(14deg); }
.hero-spark-c { bottom: 72px; left: 22px; color: #73d2ff; transform: rotate(10deg); }
.hero-spark-d { bottom: 36px; right: 34px; color: #fff58a; transform: rotate(-8deg); }

.storybook-panel {
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.16), rgba(255, 249, 240, 0.07));
}

.storybook-page .top-band.compact {
  padding: 8px 0 16px;
}

.storybook-page .top-band.compact .brand-mark.small {
  background: linear-gradient(160deg, #ffd55c, #ff9c52);
  color: #6b3600;
  box-shadow: 0 14px 24px rgba(255, 171, 80, 0.24);
}

.storybook-page .top-band.compact h1 {
  color: #fff7d9;
  text-shadow: 0 4px 0 rgba(83, 47, 144, 0.9), 0 10px 18px rgba(31, 22, 78, 0.24);
}

.storybook-page .kid-status,
.storybook-page .practice-status,
.storybook-page .mini-nav {
  padding: 8px 12px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.14), rgba(255, 249, 240, 0.05));
  box-shadow: 0 14px 28px rgba(17, 12, 62, 0.16);
}

.storybook-page .home-hero,
.storybook-page .cave-hero,
.storybook-page .panel,
.storybook-page .daily-reward-card,
.storybook-page .reward-toast,
.storybook-page .warning-banner,
.storybook-page .spotlight-card,
.storybook-page .shop-card,
.storybook-page .reward-group,
.storybook-page .mission,
.storybook-page .kid-metrics div,
.storybook-page .metric-table div,
.storybook-page .simple-list div,
.storybook-page .report-item,
.storybook-page .roster-item {
  border-radius: 28px;
}

.storybook-page .home-hero {
  background:
    radial-gradient(circle at 90% 18%, rgba(255, 214, 102, 0.2), transparent 18%),
    radial-gradient(circle at 15% 78%, rgba(99, 213, 255, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(91, 58, 178, 0.24), rgba(255, 249, 240, 0.08));
}

.storybook-page .home-hero-copy h1,
.storybook-page .cave-hero h1,
.storybook-page .panel h1,
.storybook-page .panel h2 {
  color: #fff7dc;
  text-shadow: 0 3px 0 rgba(86, 47, 149, 0.85);
}

.storybook-page .home-kicker,
.storybook-page .pill,
.storybook-page .stat-pill,
.storybook-page .practice-chip,
.storybook-page .stage-chip,
.storybook-page .world-tab,
.storybook-page .range-pill {
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08), 0 8px 18px rgba(17, 12, 62, 0.14);
}

.storybook-page .planet-card,
.storybook-page .topic-pick,
.storybook-page .big-action,
.storybook-page .cave-node,
.storybook-page .shop-card {
  border-radius: 28px;
  border: 2px solid rgba(255, 249, 240, 0.14);
}

.storybook-page .planet-card,
.storybook-page .topic-pick {
  box-shadow: 0 18px 34px rgba(17, 12, 62, 0.18);
}

.storybook-page .cave-node {
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(160deg, rgba(255, 249, 240, 0.18), rgba(255, 210, 63, 0.12));
}

.storybook-page .cave-node.locked {
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.06), rgba(255, 249, 240, 0.04));
}

.storybook-page .cave-node.cleared {
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(160deg, rgba(46, 230, 166, 0.32), rgba(255, 249, 240, 0.12));
}

.storybook-page .shop-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 22%),
    linear-gradient(160deg, rgba(255, 249, 240, 0.16), rgba(255, 249, 240, 0.06));
}

.storybook-page .shop-card.active,
.storybook-page .range-pill.active,
.storybook-page .world-tab.active {
  background: linear-gradient(145deg, rgba(255, 214, 102, 0.28), rgba(255, 122, 170, 0.16));
  color: #fff2b2;
}

.storybook-page .reward-group {
  background:
    radial-gradient(circle at 8% 15%, rgba(255, 214, 102, 0.14), transparent 16%),
    linear-gradient(160deg, rgba(255, 249, 240, 0.14), rgba(255, 249, 240, 0.05));
}

.storybook-page .warning-banner {
  background: linear-gradient(160deg, rgba(255, 214, 102, 0.22), rgba(255, 122, 170, 0.14));
}

.storybook-page .primary-action {
  background: linear-gradient(145deg, #ff78c8, #9c5df5);
  color: #fffaf3;
  box-shadow: 0 14px 26px rgba(131, 60, 213, 0.24);
}

.storybook-page .secondary-link,
.storybook-page .pill-link,
.storybook-page .icon-button {
  background: rgba(255, 249, 240, 0.94);
}

.storybook-spotlight {
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 214, 102, 0.2), transparent 18%),
    linear-gradient(180deg, rgba(58, 46, 140, 0.28), rgba(27, 20, 100, 0.1));
}

.storybook-grid {
  gap: 16px;
}

.storybook-tile {
  position: relative;
  min-height: 184px;
  border: 2px solid rgba(255, 249, 240, 0.18);
  border-radius: 30px;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.52), transparent 28%),
    linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(232, 241, 255, 0.94));
  box-shadow: 0 18px 34px rgba(17, 12, 62, 0.18);
}

.tile-corner-star {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff8df;
  color: #e4a200;
  font-size: 1rem;
  box-shadow: 0 8px 16px rgba(228, 162, 0, 0.18);
}

.profile-hero-copy h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.8rem, 6vw, 2.7rem);
}

.profile-hero-copy p,
.home-hero-copy p,
.section-heading p,
.stage-legend,
.stage-note,
.metric-table span,
.profile-meta,
.report-item span {
  color: rgba(255, 249, 240, 0.78);
}

.profile-tile {
  display: grid;
  width: 100%;
  align-content: center;
  justify-items: center;
  min-height: 164px;
  padding: 16px;
  border: 1px solid rgba(255, 249, 240, 0.16);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.96), rgba(230, 236, 255, 0.92));
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(17, 12, 62, 0.18);
  text-align: center;
}

.profile-tile .avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border-radius: var(--radius-blob);
  background: linear-gradient(135deg, #fffef9, #e5edff);
  display: grid;
  place-items: center;
  font-size: 3rem;
  box-shadow: 0 10px 24px rgba(63, 197, 240, 0.2);
}

.profile-tile.add {
  background: linear-gradient(145deg, rgba(255, 210, 63, 0.9), rgba(255, 111, 165, 0.78));
  color: var(--ink);
}

.profile-name {
  margin-top: 10px;
  font-size: 1.35rem;
  font-weight: 800;
}

.profile-meta {
  margin-top: 4px;
  color: rgba(36, 28, 74, 0.72);
  font-size: 1rem;
  font-weight: 700;
}

.home-hero {
  display: grid;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.home-kicker,
.pill,
.stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 18px;
  background: rgba(255, 249, 240, 0.16);
  color: var(--sun);
  font-weight: 800;
}

.home-hero-copy h1 {
  margin: 8px 0 6px;
  font-size: clamp(2.4rem, 10vw, 4.4rem);
  line-height: 0.9;
}

.home-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-hero-stats div,
.metric-table div,
.simple-list div,
.report-item,
.roster-item,
.kid-metrics div,
.badge,
.empty-state,
.mission {
  border: 1px solid rgba(255, 249, 240, 0.14);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.13), rgba(255, 249, 240, 0.06));
  box-shadow: 0 12px 28px rgba(17, 12, 62, 0.14);
  backdrop-filter: blur(8px);
}

.home-hero-stats div {
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  text-align: center;
}

.home-hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.home-spotlight {
  margin-bottom: 18px;
}

.profile-spotlight {
  margin-bottom: 18px;
}

.profile-tools,
.profile-section {
  margin-bottom: 18px;
}

.profile-filter-row {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.profile-search {
  display: grid;
  gap: 6px;
  min-width: min(100%, 320px);
  flex: 1 1 260px;
}

.profile-search span {
  color: rgba(255, 249, 240, 0.78);
  font-weight: 700;
}

.profile-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 249, 240, 0.16);
  border-radius: 18px;
  background: rgba(255, 249, 240, 0.92);
  color: var(--ink);
}

.spotlight-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 249, 240, 0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.13), rgba(255, 249, 240, 0.06));
  box-shadow: 0 12px 28px rgba(17, 12, 62, 0.14);
  backdrop-filter: blur(8px);
}

.spotlight-card.empty {
  text-align: center;
}

.spotlight-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.spotlight-avatar {
  width: 72px;
  height: 72px;
  font-size: 2.2rem;
}

.spotlight-head strong,
.spotlight-stats b {
  font-family: var(--font-display);
}

.spotlight-head strong {
  display: block;
  font-size: 1.6rem;
}

.spotlight-head span,
.spotlight-stats span,
.spotlight-card.empty span {
  color: rgba(255, 249, 240, 0.82);
}

.spotlight-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.spotlight-stats div {
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  text-align: center;
  border: 1px solid rgba(255, 249, 240, 0.14);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.13), rgba(255, 249, 240, 0.06));
}

.spotlight-stats b {
  font-size: 1.35rem;
}

.topic-panel {
  margin-top: 18px;
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.topic-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.planet-card,
.topic-pick,
.big-action {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 156px;
  padding: 16px 12px;
  border-radius: 26px;
  color: var(--cloud);
  box-shadow: var(--shadow);
  text-align: center;
}

/* A training topic stays compact while still exposing all three difficulty levels. */
.topic-pick {
  align-content: center;
  gap: 8px;
  padding: 18px 14px;
}

.topic-pick .topic-difficulty-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.topic-difficulty-button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.22);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.topic-difficulty-button.easy { background: rgba(72, 211, 171, 0.42); }
.topic-difficulty-button.medium { background: rgba(255, 210, 90, 0.44); }
.topic-difficulty-button.hard { background: rgba(255, 110, 132, 0.44); }
.topic-difficulty-button:hover,
.topic-difficulty-button:focus-visible { transform: translateY(-2px); background: rgba(255, 255, 255, 0.4); }

.planet-card strong,
.topic-pick strong,
.big-action strong {
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1;
}

.planet-card span,
.topic-pick span,
.big-action span {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.05;
}

.planet-card small,
.topic-pick small,
.big-action small {
  max-width: 18ch;
  color: rgba(255, 249, 240, 0.9);
  font-weight: 700;
}

.planet-card::before,
.topic-pick::before,
.big-action::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 18px;
  border: 3px solid rgba(255, 249, 240, 0.42);
  border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}

.planet-card.p-add,
.topic-pick.p-add,
.big-action.blue {
  background: linear-gradient(145deg, #ff9457, var(--coral));
}

.planet-card.p-sub,
.topic-pick.p-sub,
.big-action.green {
  background: linear-gradient(145deg, var(--sky), #2e7fe6);
}

.planet-card.p-mul,
.topic-pick.p-mul,
.big-action.coral,
.big-action.violet {
  background: linear-gradient(145deg, #9d7cff, var(--violet));
}

.planet-card.p-div,
.topic-pick.p-div,
.big-action.ink {
  background: linear-gradient(145deg, #34e0c4, #14b891);
}

.planet-card.p-mixed,
.topic-pick.p-mixed,
.big-action.gold {
  background: linear-gradient(145deg, #ffd86a, var(--sun));
  color: var(--ink);
}

.planet-card.p-mixed small,
.topic-pick.p-mixed small,
.big-action.gold small {
  color: rgba(36, 28, 74, 0.75);
}

.big-action {
  min-height: 166px;
}

.secondary-link,
.pill-link,
.range-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 249, 240, 0.16);
  border-radius: 18px;
  background: rgba(255, 249, 240, 0.1);
  color: var(--cloud);
  text-decoration: none;
  font-weight: 800;
}

.secondary-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.topic-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 249, 240, 0.18);
  border-radius: 20px;
  color: #fffaf3;
  text-align: left;
  box-shadow: 0 14px 28px rgba(17, 12, 62, 0.18);
}

.topic-toggle.collapsed {
  background: linear-gradient(145deg, #ff9b5f, #ff5fa2);
}

.topic-toggle.expanded {
  background: linear-gradient(145deg, #57a4ff, #7c6cff);
}

.topic-toggle-icon {
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 249, 240, 0.2);
  font-size: 1.15rem;
  font-weight: 900;
}

.topic-toggle-copy {
  display: grid;
  gap: 2px;
}

.topic-toggle-copy strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.topic-toggle-copy small {
  color: rgba(255, 249, 240, 0.88);
  font-weight: 700;
}

.warning-banner {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 210, 63, 0.32);
  background: linear-gradient(160deg, rgba(255, 210, 63, 0.2), rgba(255, 111, 165, 0.12));
  color: #fff6dd;
  box-shadow: 0 18px 36px rgba(14, 10, 54, 0.18);
}

.warning-banner strong {
  font-size: 1.05rem;
}

.daily-reward-card,
.reward-toast,
.shop-card {
  border: 1px solid rgba(255, 249, 240, 0.14);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.14), rgba(255, 249, 240, 0.06));
  box-shadow: 0 12px 28px rgba(17, 12, 62, 0.14);
  backdrop-filter: blur(8px);
}

.daily-reward-card,
.reward-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px 18px;
}

.daily-reward-card strong,
.reward-toast strong,
.shop-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.daily-reward-card span,
.reward-toast span,
.shop-card span {
  color: rgba(255, 249, 240, 0.82);
}

.reward-toast {
  border-color: rgba(255, 210, 63, 0.28);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shop-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.shop-card.active {
  border-color: rgba(255, 210, 63, 0.4);
  box-shadow: 0 16px 34px rgba(255, 210, 63, 0.14);
}

.result-breakdown {
  margin: 10px 0;
}

.result-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.range-pill.active,
.world-tab.active {
  background: rgba(255, 210, 63, 0.2);
  color: var(--sun);
}

.panel {
  padding: 22px;
}

.panel.compact-panel {
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 249, 240, 0.14);
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.12), rgba(255, 249, 240, 0.05));
}

.panel.compact-panel p,
.panel.compact-panel strong {
  margin: 0;
}

.panel.compact-panel p {
  margin-top: 6px;
}

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

.student-form {
  display: grid;
  gap: 16px;
}

.settings-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.settings-shortcuts .icon-button {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  border-radius: 20px;
}

.shortcut-shop {
  background: linear-gradient(145deg, #ffd86a, var(--sun));
}

.shortcut-sound {
  background: linear-gradient(145deg, #72d6ff, var(--sky));
}

.shortcut-logout {
  background: linear-gradient(145deg, rgba(255, 249, 240, 0.95), rgba(230, 236, 255, 0.92));
}

.shortcut-danger {
  background: linear-gradient(145deg, rgba(255, 111, 165, 0.32), rgba(255, 210, 63, 0.26));
}

.admin-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 14px 0 18px;
}

.student-form label,
.admin-search-label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: var(--cloud);
}

.student-form input,
.student-form select,
.admin-search-input {
  width: 100%;
  min-height: 56px;
  border: 2px solid rgba(255, 249, 240, 0.18);
  border-radius: 18px;
  padding: 0 14px;
  background: rgba(255, 249, 240, 0.95);
  color: var(--ink);
}

.admin-picker .primary-action {
  min-width: 152px;
}

@media (max-width: 720px) {
  .admin-picker {
    grid-template-columns: 1fr;
  }

  .admin-picker .primary-action {
    width: 100%;
  }
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.avatar-choice input {
  position: absolute;
  opacity: 0;
}

.avatar-choice span {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 3px solid transparent;
  border-radius: 22px;
  background: rgba(255, 249, 240, 0.16);
  color: var(--cloud);
  font-size: 2.3rem;
}

.avatar-choice input:checked + span {
  border-color: var(--sun);
  background: rgba(255, 210, 63, 0.2);
}

.primary-action,
.danger-action {
  min-height: 64px;
  border-radius: 18px;
  padding: 0 24px;
  font-size: 1.35rem;
  font-weight: 800;
}

.primary-action {
  background: linear-gradient(145deg, #38d18a, var(--mint));
  color: var(--ink);
}

.danger-action {
  background: linear-gradient(145deg, rgba(255, 111, 165, 0.32), rgba(255, 210, 63, 0.26));
  color: #ffd5de;
}

.kid-status,
.practice-status,
.mini-nav {
  justify-content: space-between;
  margin-bottom: 18px;
}

.kid-status {
  flex-wrap: wrap;
  justify-content: center;
}

.stat-pill {
  min-width: 86px;
}

.metric-table,
.report-list,
.roster-list,
.mission-list {
  display: grid;
  gap: 10px;
}

.metric-table div,
.simple-list div,
.report-item,
.roster-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.kid-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.kid-metrics div,
.badge,
.empty-state {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 14px;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
}

.kid-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
}

.kid-metrics.mini div {
  min-height: 96px;
  font-size: 1.4rem;
}

.kid-metrics small {
  display: block;
  color: rgba(255, 249, 240, 0.8);
  font-size: 0.95rem;
  font-weight: 800;
}

.cave-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.world-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.world-tab {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 18px;
  background: rgba(255, 249, 240, 0.08);
  color: var(--cloud);
  font-family: var(--font-display);
  font-weight: 800;
}

.cave-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.cave-node {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 146px;
  padding: 14px 8px;
  border: 1px solid rgba(255, 249, 240, 0.14);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.14), rgba(255, 210, 63, 0.1));
  color: var(--cloud);
  box-shadow: var(--shadow);
}

.cave-node.locked {
  opacity: 0.55;
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.07), rgba(255, 249, 240, 0.05));
}

.cave-node.cleared {
  background: linear-gradient(160deg, rgba(46, 230, 166, 0.28), rgba(255, 249, 240, 0.12));
}

.node-index {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
}

.node-stars {
  min-height: 24px;
  color: var(--sun);
}

.stage-legend {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.practice-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.practice-chip,
.stage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 18px;
}

.practice-chip {
  background: rgba(255, 210, 63, 0.18);
  color: var(--sun);
}

.stage-chip {
  background: rgba(46, 230, 166, 0.18);
  color: var(--mint);
}

.round-progress {
  width: 100%;
  height: 14px;
  margin: -6px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 249, 240, 0.12);
}

.round-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--sky), var(--coral));
  transition: width 220ms ease;
}

.timer-meter {
  display: grid;
  gap: 8px;
  margin: 2px 0 10px;
}

.timer-meter-track {
  position: relative;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 249, 240, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 249, 240, 0.08);
}

.timer-meter-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #41e0b8, #50c9ff, #ffd86a);
  transition: width 180ms linear, background 180ms ease;
}

.timer-meter.warn .timer-meter-track span {
  background: linear-gradient(90deg, #ffd86a, #ff9f68);
}

.timer-meter.danger .timer-meter-track span {
  background: linear-gradient(90deg, #ff9f68, #ff6f8d);
}

.timer-meter-label {
  color: rgba(255, 249, 240, 0.78);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
}

.question-zone,
.result-panel {
  display: grid;
  align-content: center;
  gap: 20px;
  min-height: calc(100vh - 140px);
  padding: 22px;
  border: 1px solid rgba(255, 249, 240, 0.14);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.14), rgba(255, 249, 240, 0.06));
  box-shadow: var(--shadow);
  text-align: center;
}

.practice-view {
  display: grid;
  align-content: start;
  gap: 8px;
}

.practice-status .stat-pill {
  min-width: 78px;
}

.practice-status-compact .blob {
  width: 58px;
  height: 58px;
  font-size: 1.95rem;
}

.question-text {
  padding: 12px 8px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(3rem, 15vw, 7rem);
  line-height: 1.02;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
}

.choice-btn,
.choice-grid button,
.number-pad button {
  width: 100%;
  min-height: 88px;
  border: 1px solid rgba(255, 249, 240, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 249, 240, 0.98), rgba(233, 239, 255, 0.94));
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(17, 12, 62, 0.16);
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 4rem);
  font-weight: 800;
}

.input-display {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 3px solid rgba(255, 249, 240, 0.28);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(233, 239, 255, 0.94));
  color: var(--ink);
  text-align: center;
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(31, 22, 78, 0.08), 0 10px 24px rgba(17, 12, 62, 0.12);
}

.input-display.empty {
  color: rgba(36, 28, 74, 0.3);
}

.input-display.filled {
  color: #1b1464;
}

.number-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.number-pad .confirm {
  background: linear-gradient(145deg, #38d18a, var(--mint));
}

.feedback {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 26px;
  background: rgba(255, 249, 240, 0.96);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(17, 12, 62, 0.12);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 12vw, 5rem);
  font-weight: 800;
}

.question-zone.correct .feedback {
  background: linear-gradient(145deg, rgba(46, 230, 166, 0.36), rgba(255, 249, 240, 0.94));
}

.question-zone.soft .feedback {
  background: linear-gradient(145deg, rgba(255, 210, 63, 0.34), rgba(255, 249, 240, 0.94));
}

.result-panel {
  place-items: center;
}

.result-panel.result {
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 210, 63, 0.2), transparent 20%),
    radial-gradient(circle at 85% 18%, rgba(255, 111, 165, 0.2), transparent 18%),
    radial-gradient(circle at 70% 80%, rgba(46, 230, 166, 0.16), transparent 18%),
    linear-gradient(160deg, rgba(255, 249, 240, 0.16), rgba(255, 249, 240, 0.08));
}

.result-hero {
  font-size: 5rem;
}

.star-row {
  color: var(--sun);
  font-size: clamp(2.8rem, 12vw, 5.5rem);
}

.result-line {
  font-size: clamp(1.35rem, 6vw, 2.6rem);
  font-weight: 800;
}

.result-hint {
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(255, 249, 240, 0.14);
  color: var(--cloud);
  font-size: clamp(1.1rem, 4.5vw, 1.7rem);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.result-action-icon {
  width: 78px;
  min-width: 78px;
  height: 78px;
  min-height: 78px;
  border-radius: 22px;
  background: rgba(255, 249, 240, 0.94);
  box-shadow: 0 14px 28px rgba(17, 12, 62, 0.2);
}

.result-action-icon::before {
  font-size: 2rem;
}

.result-summary-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 720px);
}

.result-summary-badges div {
  display: grid;
  gap: 4px;
  padding: 12px 10px;
  border: 1px solid rgba(255, 249, 240, 0.14);
  border-radius: 18px;
  background: rgba(255, 249, 240, 0.1);
}

.result-summary-badges span {
  color: rgba(255, 249, 240, 0.76);
  font-size: 0.88rem;
  font-weight: 700;
}

.result-summary-badges strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.rewards-overview {
  display: grid;
  gap: 18px;
}

.reward-group-list {
  display: grid;
  gap: 18px;
}

.reward-group {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 249, 240, 0.14);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.12), rgba(255, 249, 240, 0.05));
}

.reward-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reward-group-head strong,
.reward-progress-head strong {
  display: block;
  font-family: var(--font-display);
}

.reward-group-head span,
.reward-progress-head span,
.reward-progress-meta,
.reward-badge-state {
  color: rgba(255, 249, 240, 0.78);
}

.reward-group-icon {
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
}

.reward-progress-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 249, 240, 0.12);
  border-radius: 20px;
  background: rgba(255, 249, 240, 0.08);
}

.reward-progress-head {
  display: grid;
  gap: 4px;
}

.reward-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 700;
}

.reward-progress-bar {
  margin: 0;
}

.reward-badge-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.reward-badge {
  gap: 8px;
  min-height: 148px;
  padding: 16px 14px;
  font-size: 1rem;
}

.reward-badge strong {
  font-size: 1.05rem;
}

.reward-badge small {
  color: rgba(255, 249, 240, 0.84);
  font-size: 0.84rem;
  line-height: 1.35;
}

.reward-badge.earned {
  background: linear-gradient(160deg, rgba(46, 230, 166, 0.22), rgba(255, 249, 240, 0.12));
}

.reward-badge.locked {
  opacity: 0.88;
  background: linear-gradient(160deg, rgba(255, 249, 240, 0.08), rgba(255, 249, 240, 0.04));
}

.mission {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 18px;
}

.mission progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 18px;
}

.mission.done {
  background: linear-gradient(160deg, rgba(46, 230, 166, 0.22), rgba(255, 249, 240, 0.08));
}

.roster-item {
  width: 100%;
  color: var(--cloud);
  text-align: left;
}

.roster-item.active {
  border-color: rgba(255, 210, 63, 0.24);
  background: linear-gradient(160deg, rgba(255, 210, 63, 0.18), rgba(255, 249, 240, 0.08));
}

.sparkle {
  position: fixed;
  inset: 45% auto auto 50%;
  translate: -50% -50%;
  z-index: 10;
  animation: pop 700ms ease-out forwards;
  font-size: 5rem;
  pointer-events: none;
}

.reward-burst {
  position: fixed;
  inset: 45% auto auto 50%;
  width: 1px;
  height: 1px;
  translate: -50% -50%;
  z-index: 9;
  pointer-events: none;
}

.reward-particle {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.8rem;
  opacity: 0;
  filter: drop-shadow(0 6px 12px rgba(17, 12, 62, 0.28));
  animation: rewardBurst 900ms ease-out forwards;
  animation-delay: var(--delay, 0ms);
}

.reward-spark .reward-particle,
.reward-crown .reward-particle {
  font-size: 2rem;
}

.reward-laser .reward-particle,
.reward-thunder .reward-particle {
  color: #fff7c2;
}

.reward-galaxyPulse .reward-particle {
  font-size: 1.95rem;
}

@keyframes pop {
  from { transform: scale(.5); opacity: 0; }
  35% { transform: scale(1.2); opacity: 1; }
  to { transform: translateY(-80px) scale(.9); opacity: 0; }
}

@keyframes rewardBurst {
  from {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(0) scale(0.4);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--distance)) scale(1.12) translateY(-10px);
  }
}
