:root {
  color-scheme: light;
  --bg: #fdebc8;
  --bg-deep: #f7d29a;
  --panel: #fff8e6;
  --panel-edge: #3a1f3d;
  --cream: #fff2c4;
  --sky: #aee0e8;
  --ink: #2a1426;
  --ink-soft: #6b4a52;
  --accent: #e85d3a;
  --accent-deep: #b13418;
  --gold: #ffc043;
  --gold-deep: #c87c1f;
  --teal: #3aa39a;
  --teal-deep: #1f6b66;
  --purple: #7a3a8a;
  --purple-deep: #3a1f3d;
  --success: #7ac74f;
  --success-deep: #3a6b1f;
  --error: #e85d3a;
  --error-deep: #7a1f1f;
  --font-pixel: "Press Start 2P", "Courier New", ui-monospace, monospace;
  --font-body: "VT323", "Courier New", ui-monospace, monospace;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --tap-audio: 64px;
  --tap-answer: 72px;
  --border-thin: 2px;
  --border-med: 3px;
  --border-thick: 4px;
  --raise-3: 0 3px 0 0 var(--panel-edge);
  --raise-4: 0 4px 0 0 var(--panel-edge);
  --raise-5: 0 5px 0 0 var(--panel-edge);
  --bevel-up: inset 0 4px 0 rgba(255, 255, 255, 0.32), inset 0 -4px 0 rgba(0, 0, 0, 0.18);
  --bevel-down: inset 0 4px 0 rgba(0, 0, 0, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.parent-only {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 242, 196, 0.55) 0%, transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(255, 192, 67, 0.16) 0%, transparent 52%),
    linear-gradient(90deg, rgba(58, 31, 61, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(58, 31, 61, 0.08) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 24px 24px, 24px 24px, auto;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 22px;
  -webkit-font-smoothing: none;
  touch-action: manipulation;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button:focus-visible,
[tabindex]:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(255, 192, 67, 0.95);
  outline-offset: 3px;
}

h1,
h2,
p,
ol {
  margin: 0;
}

.dql-app {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--sp-4) 0 var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.dql-header,
.level-row,
.mission-head,
.controls,
.quest-tabs,
.dql-header__brand,
.dql-helper__head {
  display: flex;
  align-items: center;
}

.dql-header,
.level-row,
.mission-head {
  justify-content: space-between;
  gap: var(--sp-3);
}

.dql-header {
  padding: 0 var(--sp-4);
}

.dql-emblem {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--purple);
  border: var(--border-med) solid var(--panel-edge);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 13px;
  box-shadow: var(--raise-3), var(--bevel-up);
}

.eyebrow,
.dql-header__subtitle {
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dql-header__title {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 15px;
  line-height: 1.25;
  text-shadow: 2px 2px 0 var(--gold);
}

.dql-companion,
.dql-quest,
.dql-helper,
.dql-modal {
  background: var(--panel);
  border: var(--border-thick) solid var(--panel-edge);
  border-radius: var(--radius-xl);
  box-shadow: var(--raise-4);
}

.dql-companion,
.dql-quest,
.dql-helper {
  margin: 0 var(--sp-4);
}

.dql-companion {
  overflow: hidden;
}

.dql-companion__inner {
  display: grid;
  grid-template-columns: 43% 1fr;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: linear-gradient(180deg, var(--sky) 0 55%, var(--bg-deep) 55% 100%);
}

.dql-companion__sprite {
  position: relative;
  display: grid;
  min-height: 142px;
  place-items: center;
  border: var(--border-med) solid var(--panel-edge);
  border-radius: var(--radius-md);
  background: linear-gradient(#aee0e8 0 58%, #75b96c 58% 100%);
}

.dql-companion__sprite::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 70px;
  height: 8px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 50%;
  filter: blur(2px);
}

#dragonCanvas {
  width: 100%;
  max-width: 160px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 1;
}

.dql-companion__stats {
  display: grid;
  align-content: center;
  gap: var(--sp-2);
  min-width: 0;
}

.dql-companion__name {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 13px;
  line-height: 1.2;
}

.dql-level-badge {
  padding: 4px 6px;
  border: var(--border-thin) solid var(--purple-deep);
  border-radius: var(--radius-sm);
  background: var(--purple);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.parent-summary {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border: var(--border-med) solid var(--panel-edge);
  border-radius: var(--radius-md);
  background: var(--cream);
}

.parent-summary__title {
  margin-bottom: var(--sp-2);
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.4;
}

.dql-companion__quote {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.dql-xp {
  position: relative;
  height: 16px;
  overflow: hidden;
  border: var(--border-thin) solid var(--panel-edge);
  border-radius: var(--radius-sm);
  background: var(--panel-edge);
}

.dql-xp__fill {
  display: block;
  width: 0%;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, var(--accent-deep) 6px 9px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  transition: width 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dql-xp__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 7px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.65);
}

.dql-chest {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 8px;
  border: var(--border-thin) solid var(--panel-edge);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
}

.dql-chest__dots {
  display: flex;
  gap: 3px;
  margin-left: auto;
}

.dql-chest__dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--panel-edge);
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.15);
}

.dql-chest__dot--filled {
  background: var(--gold);
}

.dql-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  padding: 0 var(--sp-4);
  margin: 0 0 var(--sp-3);
}

.dql-tab {
  min-height: 58px;
  border: var(--border-thick) solid var(--panel-edge);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.2;
  box-shadow: var(--raise-4), var(--bevel-up);
  transition: transform 80ms, box-shadow 80ms, background 120ms;
}

.dql-tab.active,
.dql-tab[aria-selected="true"] {
  transform: translateY(4px);
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  box-shadow: var(--bevel-down);
}

.dql-tab[data-cat="reading"].active,
.dql-tab[data-cat="reading"][aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent-deep);
}

.dql-tab[data-cat="math"].active,
.dql-tab[data-cat="math"][aria-selected="true"] {
  background: var(--teal);
  border-color: var(--teal-deep);
}

.dql-tab[data-cat="coding"].active,
.dql-tab[data-cat="coding"][aria-selected="true"] {
  background: var(--purple);
  border-color: var(--purple-deep);
}

.dql-quest {
  position: relative;
  overflow: hidden;
}

.dql-quest__banner {
  padding: 10px 12px;
  border-bottom: var(--border-thick) solid var(--panel-edge);
  background: var(--accent);
}

.dql-quest[data-cat="math"] .dql-quest__banner {
  background: var(--teal);
}

.dql-quest[data-cat="coding"] .dql-quest__banner {
  background: var(--purple);
}

.dql-quest__icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: var(--border-med) solid var(--panel-edge);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 12px;
}

.dql-quest__heading {
  flex: 1;
  min-width: 0;
}

.dql-quest__eyebrow {
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-pixel);
  font-size: 8px;
  line-height: 1.25;
}

.dql-quest__title {
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 13px;
  line-height: 1.35;
  margin-top: 4px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.dql-quest__body {
  padding: var(--sp-4);
}

.dql-audio-row,
.word-grid,
.dql-answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.dql-audio-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dql-btn {
  min-height: var(--tap-audio);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--border-thick) solid var(--accent-deep);
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
  box-shadow: 0 5px 0 0 var(--accent-deep), var(--bevel-up);
  transition: transform 60ms, box-shadow 60ms, background 120ms;
}

.dql-audio-row .dql-btn {
  min-height: 58px;
  flex-direction: row;
  gap: 5px;
  font-size: 10px;
  padding: 8px 10px;
}

.dql-btn--gold {
  background: var(--gold);
  border-color: var(--gold-deep);
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 5px 0 0 var(--gold-deep), var(--bevel-up);
}

.dql-btn--teal {
  background: var(--teal);
  border-color: var(--teal-deep);
  box-shadow: 0 5px 0 0 var(--teal-deep), var(--bevel-up);
}

.dql-btn--purple {
  background: var(--purple);
  border-color: var(--purple-deep);
  box-shadow: 0 5px 0 0 var(--purple-deep), var(--bevel-up);
}

.dql-btn--ghost {
  background: var(--cream);
  border-color: var(--panel-edge);
  color: var(--ink);
  text-shadow: none;
  box-shadow: 0 5px 0 0 var(--panel-edge), var(--bevel-up);
}

.dql-btn--md {
  min-height: 56px;
  font-size: 12px;
}

.dql-btn--block {
  width: 100%;
}

.dql-btn:active:not([disabled]),
.dql-tab:active,
.dql-answer:active:not([disabled]),
.dql-pin-btn:active {
  transform: translateY(5px);
  box-shadow: var(--bevel-down);
}

.dql-soundwave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}

.dql-soundwave > i {
  display: block;
  width: 3px;
  height: 8px;
  background: currentColor;
}

.dql-soundwave > i:nth-child(1) { height: 7px; }
.dql-soundwave > i:nth-child(2) { height: 12px; }
.dql-soundwave > i:nth-child(3) { height: 9px; }
.dql-soundwave > i:nth-child(4) { height: 15px; }

.dql-btn.is-playing .dql-soundwave > i {
  animation: dql-wave 700ms ease-in-out infinite;
}

.dql-btn.is-playing .dql-soundwave > i:nth-child(2) { animation-delay: 120ms; }
.dql-btn.is-playing .dql-soundwave > i:nth-child(3) { animation-delay: 240ms; }
.dql-btn.is-playing .dql-soundwave > i:nth-child(4) { animation-delay: 360ms; }

.dql-instruction,
.question-box {
  border: var(--border-med) solid var(--panel-edge);
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--ink);
}

.dql-instruction {
  margin: var(--sp-3) 0 var(--sp-4);
  padding: 14px 12px 16px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
}

.dql-steps {
  margin-bottom: var(--sp-4);
}

.dql-steps__heading {
  color: var(--purple);
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
}

.steps {
  display: grid;
  gap: 10px;
  padding: 0;
  counter-reset: steps;
}

.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: start;
  gap: 10px;
  list-style: none;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.steps li::before {
  content: counter(steps);
  counter-increment: steps;
  display: grid;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  place-items: center;
  border: var(--border-thin) solid var(--purple-deep);
  border-radius: var(--radius-sm);
  background: var(--purple);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 10px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.activity {
  display: grid;
  gap: var(--sp-3);
  min-height: 154px;
}

.prompt {
  display: grid;
  min-height: 86px;
  place-items: center;
  border: var(--border-med) dashed var(--panel-edge);
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
  padding: var(--sp-3);
}

.question-card {
  display: grid;
  gap: var(--sp-3);
}

.rep-count {
  color: var(--purple);
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.question-text {
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.25;
}

.answer-choice,
.word-choice,
.code-cell,
.dql-answer {
  min-height: var(--tap-answer);
  border: var(--border-thick) solid var(--panel-edge);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  padding: 8px;
  box-shadow: var(--raise-4), var(--bevel-up);
  transition: transform 80ms, box-shadow 80ms, background 120ms, border-color 120ms;
}

.answer-row {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: var(--sp-2);
  align-items: stretch;
}

.choice-audio {
  min-height: var(--tap-answer);
  border: var(--border-thick) solid var(--teal-deep);
  border-radius: var(--radius-lg);
  background: var(--teal);
  color: #fff;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 0 0 var(--teal-deep), var(--bevel-up);
}

.choice-audio.is-playing {
  background: var(--purple);
  border-color: var(--purple-deep);
}

.answer-choice:disabled,
.word-choice:disabled,
.dql-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.answer-choice.is-correct,
.word-choice.is-correct {
  background: var(--success);
  border-color: var(--success-deep);
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 0 0 var(--success-deep), var(--bevel-up);
  animation: dql-pop 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.answer-choice.is-wrong,
.word-choice.is-wrong {
  background: var(--error);
  border-color: var(--error-deep);
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 0 0 var(--error-deep), var(--bevel-up);
  animation: dql-shake 320ms ease-in-out;
}

.coding-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
}

.code-cell {
  aspect-ratio: 1;
  min-height: auto;
  display: grid;
  place-items: center;
}

.code-cell.hero-cell {
  background: var(--gold);
  border-color: var(--gold-deep);
}

.code-cell.goal-cell {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #fff;
}

.dql-actions-row {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.mini-game {
  display: grid;
  gap: var(--sp-3);
}

.game-score {
  border: var(--border-med) solid var(--panel-edge);
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 13px;
  padding: var(--sp-3);
  text-align: center;
}

.lanes {
  display: grid;
  gap: var(--sp-3);
}

.lane {
  min-height: 74px;
  border: var(--border-thick) solid var(--panel-edge);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 12px;
  box-shadow: var(--raise-4), var(--bevel-up);
}

.lane.has-gem {
  background: var(--gold);
  border-color: var(--gold-deep);
}

.lane.has-gem::after {
  content: " GEM";
}

.lane.miss {
  background: var(--error);
  border-color: var(--error-deep);
  color: #fff;
  animation: dql-shake 320ms ease-in-out;
}


.dql-pin-btn,
.icon-button:not(.dql-btn) {
  display: grid;
  width: 50px;
  height: 48px;
  place-items: center;
  border: var(--border-med) solid var(--panel-edge);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 10px;
  box-shadow: var(--raise-3), var(--bevel-up);
}

dialog {
  width: min(92vw, 420px);
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(42, 20, 38, 0.85);
}

.dql-modal {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-5);
}

.dql-modal__title {
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 14px;
  line-height: 1.35;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 20px;
  font-weight: 700;
}

input {
  min-height: 48px;
  border: var(--border-med) solid var(--panel-edge);
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--ink);
  padding: var(--sp-2);
}

.dql-xp-gain {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 22px;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 var(--accent-deep), 0 0 20px rgba(255, 200, 80, 0.8);
}

.dql-xp-gain.is-visible {
  animation: dql-xp-fly 1100ms ease-out forwards;
}

@keyframes dql-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.dql-bob {
  animation: dql-bob 1.6s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes dql-wave {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

@keyframes dql-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes dql-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes dql-xp-fly {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  80% { opacity: 1; transform: translate(-50%, -120%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(0.9); }
}

@media (max-width: 390px) {
  .dql-companion__inner {
    grid-template-columns: 1fr;
  }

  .dql-companion__sprite {
    min-height: 150px;
  }

  .dql-header__title {
    font-size: 13px;
  }

  .dql-btn,
  .dql-tab,
  .answer-choice,
  .word-choice {
    font-size: 22px;
  }

  .answer-row {
    grid-template-columns: 1fr 66px;
  }

  .choice-audio {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dql-bob,
  .dql-btn.is-playing .dql-soundwave > i,
  .dql-xp-gain.is-visible,
  .answer-choice.is-correct,
  .answer-choice.is-wrong,
  .word-choice.is-correct,
  .word-choice.is-wrong {
    animation: none !important;
  }
}

/* Academy child map shell */

:root {
  --a5-ink: #17212b;
  --a5-muted: #5f6872;
  --a5-sky: #bfe8f6;
  --a5-sky-deep: #6eb4d5;
  --a5-grass: #83c66d;
  --a5-grass-deep: #3f8c58;
  --a5-sun: #ffd166;
  --a5-coral: #f05d5e;
  --a5-plum: #6d4c90;
  --a5-teal: #2da7a0;
  --a5-panel: #fffaf0;
  --a5-line: #24465c;
  --a5-shadow: 0 10px 24px rgba(23, 33, 43, 0.16);
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #bfe8f6 0 38%, #e9f7cf 38% 100%);
  color: var(--a5-ink);
  font-family: Inter, ui-rounded, "Trebuchet MS", Arial, sans-serif;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

button {
  border: 0;
  color: inherit;
}

#app {
  min-height: 100vh;
}

.academy-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px));
}

.academy-shell--center {
  display: grid;
  place-items: center;
}

.academy-loader {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 18px;
}

.academy-loader p {
  margin: 0;
  color: var(--a5-muted);
  font-weight: 800;
}

.loader-dots {
  display: inline-flex;
  gap: 6px;
}

.loader-dots i {
  width: 12px;
  height: 12px;
  border: 2px solid var(--a5-line);
  border-radius: 50%;
  background: var(--a5-sun);
  animation: loader-pop 1s ease-in-out infinite;
}

.loader-dots i:nth-child(2) {
  animation-delay: 0.12s;
}

.loader-dots i:nth-child(3) {
  animation-delay: 0.24s;
}

.academy-loader h1,
.academy-topbar h1,
.noble-hero h2,
.mission-focus h2,
.practice-panel h2,
.checkpoint-panel h2,
.complete-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.academy-loader h1,
.academy-topbar h1 {
  font-size: 26px;
  line-height: 1.1;
}

.academy-kicker {
  margin: 0 0 4px;
  color: var(--a5-muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.academy-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gem-balance,
.pin-button,
.primary-action,
.audio-button,
.small-action,
.back-link {
  min-height: 48px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  box-shadow: 0 4px 0 var(--a5-line);
  font-weight: 900;
}

.gem-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff2b6;
}

.gem-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: var(--a5-sun);
  border: 2px solid #a45f13;
  transform: rotate(45deg);
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.45);
}

.gem-icon--large {
  width: 34px;
  height: 34px;
}

.pin-button {
  padding: 8px 10px;
  background: #ffffff;
  color: var(--a5-line);
  font-size: 14px;
}

.map-home,
.placement-screen,
.mission-screen,
.checkpoint-screen,
.complete-screen {
  display: grid;
  gap: 14px;
}

.noble-hero {
  min-height: 210px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 46% 1fr;
  gap: 12px;
  padding: 16px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #9bd8ee 0 54%, #73bf65 54% 100%);
  box-shadow: var(--a5-shadow);
}

.noble-hero__scene {
  position: relative;
  min-height: 170px;
}

.noble-hero__copy {
  align-self: center;
  padding: 4px 0;
}

.noble-hero__copy h2 {
  font-size: 28px;
  line-height: 1.05;
}

.noble-hero__copy p:last-child {
  margin: 8px 0 0;
  color: #273746;
  line-height: 1.25;
}

.trail-hill {
  position: absolute;
  bottom: -28px;
  width: 120px;
  height: 78px;
  border: 3px solid var(--a5-line);
  border-radius: 50%;
  background: var(--a5-grass);
}

.trail-hill--left {
  left: -36px;
}

.trail-hill--right {
  right: -56px;
  background: #a7d86c;
}

.noble-sprite {
  position: relative;
  width: 118px;
  height: 118px;
  display: block;
  margin: 34px auto 0;
  animation: noble-float 3s ease-in-out infinite;
  z-index: 2;
}

.noble-sprite--large {
  width: 150px;
  height: 150px;
  margin-top: 0;
}

.noble-sprite--small,
.mini-noble {
  width: 62px;
  height: 62px;
  margin: 0;
  animation: noble-float 3s ease-in-out infinite;
}

.mini-noble {
  position: relative;
  flex: 0 0 auto;
}

.dragon-body,
.dragon-head,
.dragon-belly,
.dragon-wing,
.dragon-tail,
.dragon-horn,
.dragon-eye {
  position: absolute;
  display: block;
}

.dragon-body {
  left: 30%;
  top: 32%;
  width: 48%;
  height: 48%;
  border: 3px solid var(--a5-line);
  border-radius: 8px 8px 14px 14px;
  background: var(--a5-plum);
}

.dragon-belly {
  left: 43%;
  top: 50%;
  width: 25%;
  height: 24%;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: var(--a5-sun);
}

.dragon-head {
  left: 38%;
  top: 12%;
  width: 40%;
  height: 34%;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: #8655a4;
}

.dragon-wing {
  top: 38%;
  width: 32%;
  height: 26%;
  border: 3px solid var(--a5-line);
  background: var(--a5-teal);
}

.dragon-wing--left {
  left: 6%;
  border-radius: 22px 8px 18px 8px;
  transform: rotate(-18deg);
}

.dragon-wing--right {
  right: 0;
  border-radius: 8px 22px 8px 18px;
  transform: rotate(18deg);
}

.dragon-tail {
  left: 10%;
  top: 66%;
  width: 34%;
  height: 16%;
  border: 3px solid var(--a5-line);
  border-radius: 22px 0 0 22px;
  background: var(--a5-plum);
  transform: rotate(-18deg);
}

.dragon-horn {
  top: 2%;
  width: 12%;
  height: 18%;
  background: var(--a5-sun);
  border: 2px solid var(--a5-line);
}

.dragon-horn--left {
  left: 42%;
  transform: rotate(-18deg);
}

.dragon-horn--right {
  left: 62%;
  transform: rotate(18deg);
}

.dragon-eye {
  top: 24%;
  width: 7%;
  height: 7%;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--a5-line);
}

.dragon-eye--left {
  left: 49%;
}

.dragon-eye--right {
  left: 65%;
}

.mission-focus,
.daily-session-card,
.launch-notice,
.placement-hero,
.daily-progress,
.practice-panel,
.checkpoint-panel,
.complete-panel,
.parent-gate form {
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: var(--a5-panel);
  box-shadow: var(--a5-shadow);
}

.mission-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.mission-focus__step {
  min-width: 84px;
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #e9fbff;
  box-shadow: 0 3px 0 var(--a5-line);
  text-align: center;
}

.mission-focus__step span {
  color: var(--a5-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mission-focus__step strong {
  font-size: 16px;
}

.daily-session-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f1fbf7;
}

.daily-session-card h2 {
  font-size: 23px;
}

.session-unlock {
  min-width: 98px;
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 10px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #fff8e4;
  box-shadow: 0 3px 0 var(--a5-line);
  text-align: center;
}

.session-unlock span {
  color: var(--a5-muted);
  font-size: 13px;
  font-weight: 900;
}

.session-unlock strong {
  font-size: 15px;
}

.session-unlock.is-unlocked,
.unlock-badge {
  background: #dbf3d1;
}

.unlock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px auto 4px;
  padding: 10px 12px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--a5-line);
  font-weight: 900;
}

.placement-hero {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #fff8e4 0%, #dff5f0 100%);
}

.placement-hero h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.placement-hero p:last-child {
  margin: 6px 0 0;
  color: var(--a5-muted);
  font-weight: 800;
  line-height: 1.28;
}

.placement-panel {
  background: #fffdf4;
}

.placement-progress {
  min-width: 58px;
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #fff2b6;
  box-shadow: 0 3px 0 var(--a5-line);
  font-weight: 900;
}

.placement-pacing {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #edf9ff;
}

.placement-pacing span,
.placement-pacing p {
  color: var(--a5-muted);
  font-size: 14px;
  font-weight: 900;
}

.placement-pacing strong {
  font-size: 16px;
}

.placement-pacing p {
  grid-column: 1 / -1;
  margin: 0;
}

.child-comfort-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 12px;
  border: 2px solid rgba(36, 70, 92, 0.18);
  border-radius: 8px;
  background: #f7fbef;
}

.child-comfort-rail strong {
  display: block;
  font-size: 17px;
}

.child-comfort-rail span {
  display: block;
  margin-top: 3px;
  color: #405260;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.child-progress-meter {
  height: 16px;
  overflow: hidden;
  border: 2px solid var(--a5-line);
  border-radius: 999px;
  background: #ffffff;
}

.child-progress-meter i {
  display: block;
  height: 100%;
  min-width: 10px;
  max-width: 100%;
  border-right: 2px solid rgba(36, 70, 92, 0.28);
  background: linear-gradient(90deg, #2da7a0, #ffd166);
}

.placement-paused {
  display: grid;
  gap: 12px;
  text-align: center;
}

.placement-paused .mini-noble {
  justify-self: center;
}

.placement-pacing--paused {
  text-align: left;
}

.launch-notice {
  padding: 12px 14px;
  background: #fff8e4;
}

.launch-notice strong {
  display: block;
  font-size: 17px;
}

.launch-notice p {
  margin: 4px 0 0;
  color: var(--a5-muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.mission-focus h2 {
  font-size: 24px;
}

.mission-focus p,
.practice-panel p,
.checkpoint-panel p,
.complete-panel p {
  margin: 6px 0 0;
  line-height: 1.28;
}

.primary-action {
  min-height: 56px;
  padding: 12px 18px;
  background: var(--a5-coral);
  color: #ffffff;
  font-size: 18px;
}

.primary-action:disabled {
  opacity: 0.55;
}

.primary-action--wide {
  width: 100%;
}

.trail-map {
  min-height: 270px;
  position: relative;
  padding: 12px 0;
}

.trail-line {
  position: absolute;
  left: 50%;
  top: 18px;
  bottom: 18px;
  width: 12px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: #f1c16e;
  transform: translateX(-50%);
}

.mission-node {
  position: relative;
  width: min(82%, 330px);
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 18px;
  padding: 12px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 0 var(--a5-line);
  opacity: 0.58;
}

.mission-node:nth-of-type(even) {
  transform: translateX(-22px);
}

.mission-node:nth-of-type(odd) {
  transform: translateX(22px);
}

.mission-node.is-active {
  opacity: 1;
  background: #fff2b6;
  animation: mission-glow 1.8s ease-in-out infinite;
}

.mission-node.is-done {
  opacity: 0.9;
  background: #dbf3d1;
}

.mission-node__coin {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--a5-line);
  border-radius: 50%;
  background: var(--a5-sun);
  font-weight: 900;
}

.mission-node h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.mission-node p {
  margin: 2px 0 0;
  color: var(--a5-muted);
  font-weight: 800;
}

.daily-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  padding: 14px;
}

.daily-progress strong {
  font-size: 20px;
}

.back-link,
.small-action {
  width: max-content;
  padding: 8px 12px;
  background: #ffffff;
}

.practice-panel {
  padding: 16px;
}

.practice-panel__head,
.audio-row,
.parent-gate__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.practice-panel__head h2 {
  font-size: 24px;
}

.audio-row {
  margin: 16px 0 12px;
}

.audio-button {
  min-height: 58px;
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--a5-teal);
  color: #ffffff;
}

.audio-button--quiet {
  flex: 0 0 100px;
  background: #ffffff;
  color: var(--a5-line);
}

.audio-button.is-speaking,
.answer-audio.is-speaking {
  outline: 4px solid rgba(255, 209, 102, 0.85);
}

.sound-bars {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  height: 18px;
}

.sound-bars i {
  width: 4px;
  display: block;
  border-radius: 4px;
  background: currentColor;
}

.sound-bars i:nth-child(1) { height: 8px; }
.sound-bars i:nth-child(2) { height: 14px; }
.sound-bars i:nth-child(3) { height: 11px; }

.sound-bars--small {
  height: 14px;
}

.mission-instruction {
  margin: 10px 0;
  padding: 10px 12px;
  border: 2px dashed rgba(60, 45, 74, 0.24);
  border-radius: 8px;
  background: #fff8e4;
  color: var(--a5-muted);
  font-weight: 800;
  line-height: 1.35;
}

.prompt-box {
  margin-top: 12px;
  padding: 16px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.prompt-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--a5-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.prompt-box p {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.prompt-box strong {
  display: inline-block;
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
}

.voice-status-line,
.answer-heading {
  margin: 8px 0 0;
  color: var(--a5-muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

.answer-heading {
  margin-top: 14px;
}

.prompt-box strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.visual-card {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: #e9fbff;
}

.visual-card mark {
  padding: 0 4px;
  border-radius: 6px;
  background: var(--a5-sun);
  color: var(--a5-ink);
}

.visual-card--letter {
  font-size: 66px;
  font-weight: 900;
}

.visual-card--word span {
  font-size: 44px;
  font-weight: 900;
}

.visual-card--word small {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: var(--a5-sun);
  font-size: 20px;
  font-weight: 900;
}

.sound-chip-row span,
.word-change__card span,
.number-trail span,
.compare-cards span,
.number-path span,
.ordered-cards span {
  min-width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 900;
}

.sound-chip-row {
  background: #eaf8df;
}

.sound-chip {
  position: relative;
  font-size: 30px;
}

.sound-chip small {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid var(--a5-line);
  border-radius: 50%;
  background: var(--a5-sun);
  font-size: 12px;
}

.word-change {
  background: #fff8e4;
}

.word-change__card {
  display: flex;
  gap: 4px;
}

.word-change__card span.is-highlighted {
  background: var(--a5-sun);
}

.word-change__arrow {
  width: 34px;
  height: 6px;
  border-radius: 6px;
  background: var(--a5-line);
}

.dot-set,
.join-groups {
  flex-wrap: wrap;
}

.dot-set span,
.join-groups span,
.ten-frame span {
  width: 30px;
  height: 30px;
  border: 2px solid var(--a5-line);
  border-radius: 50%;
  background: var(--a5-coral);
}

.ten-frame {
  display: grid;
  grid-template-columns: repeat(5, 36px);
  gap: 8px;
  background: #f5fbff;
}

.ten-frame span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff;
}

.ten-frame span.is-filled {
  background: var(--a5-teal);
}

.number-trail,
.number-path {
  flex-wrap: wrap;
}

.number-trail span.is-missing {
  background: var(--a5-sun);
}

.number-path span.is-start {
  background: #ffffff;
}

.number-path span.is-goal {
  background: var(--a5-sun);
}

.number-path span {
  position: relative;
}

.number-path small {
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0;
  color: var(--a5-muted);
}

.join-groups > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 118px;
  justify-content: center;
}

.join-group small {
  width: 100%;
  margin-top: 4px;
  color: var(--a5-muted);
  font-size: 12px;
  text-align: center;
}

.join-groups b,
.compare-cards b {
  font-size: 28px;
}

.routine-card {
  min-width: 82px;
  min-height: 72px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px;
  text-align: center;
  line-height: 1.05;
}

.routine-card i {
  display: grid;
  place-items: center;
  min-width: 52px;
  min-height: 28px;
  border-radius: 8px;
  background: #e9fbff;
  font-style: normal;
  font-size: 12px;
}

.visual-card--sentence span {
  font-size: 26px;
  font-weight: 900;
}

.grid-path {
  display: grid;
  grid-template-columns: repeat(4, 42px);
  gap: 6px;
  position: relative;
}

.grid-path span {
  width: 42px;
  height: 42px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #ffffff;
}

.grid-path span.is-start {
  background: #eaf8df;
}

.grid-path span.is-goal {
  background: var(--a5-sun);
}

.grid-path span.is-blocked {
  display: grid;
  place-items: center;
  background: #d7d1c7;
}

.grid-path span.is-blocked small {
  color: var(--a5-line);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.grid-path.is-repair-queued {
  opacity: 0.7;
}

.grid-path p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.answer-grid {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.answer-choice {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 0 var(--a5-line);
  color: var(--a5-ink);
  text-align: left;
}

.answer-select {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--a5-ink);
  font-size: 24px;
  font-weight: 900;
  text-align: left;
}

.answer-select__content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.answer-select span {
  overflow-wrap: anywhere;
}

.answer-text {
  min-width: 0;
}

.choice-program {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 0 0 auto;
}

.choice-program i,
.choice-step-card i {
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #e9fbff;
  color: var(--a5-teal);
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
}

.choice-step-card {
  flex: 0 0 auto;
}

.choice-step-card i {
  min-width: 56px;
  font-size: 11px;
}

.answer-choice.is-selected {
  background: #fff2b6;
}

.answer-select b {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--a5-line);
  border-radius: 50%;
  background: var(--a5-teal);
  color: #ffffff;
}

.answer-audio {
  min-width: 60px;
  min-height: 64px;
  display: grid;
  place-items: center;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #e9fbff;
  color: var(--a5-teal);
}

.sequence-tray,
.mission-actions,
.feedback {
  margin-top: 14px;
  padding: 14px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: #ffffff;
}

.sequence-tray {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mission-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  border: 0;
  background: transparent;
}

.mission-actions--split {
  justify-content: space-between;
}

.skip-action {
  color: var(--a5-muted);
}

.sequence-tray p {
  margin: 0;
  font-weight: 900;
}

.feedback.is-correct {
  background: #dbf3d1;
}

.feedback.is-wrong {
  background: #ffe0dc;
}

.feedback h3 {
  margin: 0;
  font-size: 22px;
}

.checkpoint-panel,
.complete-panel {
  padding: 16px;
  text-align: center;
}

.checkpoint-sky {
  height: 260px;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #8ed7ee 0 62%, #7dc766 62% 100%);
}

.checkpoint-sky .noble-sprite {
  position: absolute;
  left: 22px;
  bottom: 42px;
}

.checkpoint-gem {
  position: absolute;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 3px solid var(--a5-line);
  border-radius: 50%;
  background: #fffaf0;
  box-shadow: 0 5px 0 var(--a5-line);
}

.checkpoint-count {
  margin-top: 14px;
  font-size: 34px;
  font-weight: 900;
}

.complete-panel {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.parent-gate {
  border: 0;
  background: transparent;
  padding: 14px;
}

.parent-gate form {
  width: min(92vw, 420px);
  padding: 16px;
}

.parent-gate h2 {
  margin: 0;
}

.parent-gate__small {
  color: var(--a5-muted);
  font-size: 14px;
  font-weight: 800;
}

.parent-dashboard {
  width: min(96vw, 980px);
  max-height: min(92vh, 920px);
  overflow: auto;
  overscroll-behavior: contain;
}

.parent-dashboard::backdrop {
  background: rgba(23, 33, 43, 0.44);
}

.parent-dashboard form {
  width: 100%;
  display: grid;
  gap: 16px;
  padding: 16px;
}

.parent-dashboard__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  background: var(--a5-panel);
  border-bottom: 2px dashed rgba(60, 45, 74, 0.22);
}

.parent-dashboard__head h2 {
  font-size: 24px;
}

.parent-dashboard__sub {
  margin: 6px 0 0;
  color: var(--a5-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.parent-overview,
.parent-section--grid,
.truth-grid {
  display: grid;
  gap: 10px;
}

.parent-overview {
  grid-template-columns: 1fr;
}

.parent-overview article,
.parent-path-slot,
.receipt-card,
.mastery-row,
.support-meters article,
.truth-grid article {
  padding: 12px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #ffffff;
}

.parent-overview span,
.parent-path-slot span,
.support-meters span,
.truth-grid span,
.mastery-row span {
  display: block;
  color: var(--a5-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-overview strong,
.parent-path-slot strong,
.receipt-card strong,
.support-meters strong,
.truth-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.15;
}

.parent-overview p,
.parent-path-slot p,
.receipt-card p,
.truth-grid p {
  margin: 6px 0 0;
  color: var(--a5-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.parent-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 2px dashed rgba(60, 45, 74, 0.28);
}

.parent-section__title h3 {
  margin: 0;
  font-size: 20px;
}

.parent-section__title p {
  margin: 4px 0 0;
  color: var(--a5-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.parent-path-list,
.receipt-list,
.mastery-mini-list,
.support-meters {
  display: grid;
  gap: 8px;
}

.parent-settings-grid {
  display: grid;
  gap: 8px;
}

.parent-controls {
  display: grid;
  gap: 8px;
}

.parent-control-field {
  display: grid;
  gap: 6px;
  color: var(--a5-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.parent-control-field input,
.parent-control-field select,
.parent-control-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #fffdf5;
  color: var(--a5-ink);
  font: inherit;
  font-size: 15px;
  text-transform: none;
}

.parent-control-field textarea {
  resize: vertical;
  min-height: 76px;
}

.experience-note-panel,
.playtest-export-panel,
.playtest-import-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #f7f3ea;
}

.playtest-export-panel {
  background: #eef9f4;
}

.playtest-import-panel {
  background: #f3f0ff;
}

.playtest-export-panel textarea,
.playtest-import-panel textarea {
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.small-action--quiet {
  background: #fffdf5;
}

.parent-settings-note {
  margin: 0;
  color: var(--a5-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.parent-path-slot small,
.receipt-card small,
.support-meters small {
  display: block;
  margin-top: 6px;
  color: var(--a5-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.receipt-card--muted {
  background: #f7f3ea;
}

.mastery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mastery-row strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.mastery-row b {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 2px solid var(--a5-line);
  border-radius: 999px;
  background: #e9fbff;
  color: var(--a5-teal);
  font-size: 12px;
}

.parent-bullets {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--a5-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.parent-section--calm,
.parent-section--truth {
  padding: 12px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #f7f3ea;
}

.parent-section--rc {
  padding: 12px;
  border: 2px solid var(--a5-line);
  border-radius: 8px;
  background: #eef9f4;
}

.rc-readiness-grid,
.rc-handoff-grid {
  display: grid;
  gap: 8px;
}

.rc-setup-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 2px solid rgba(36, 70, 92, 0.18);
  border-radius: 8px;
  background: #fffdf5;
}

.rc-setup-panel span {
  display: block;
  color: var(--a5-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rc-setup-panel strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--a5-line);
  font-size: 13px;
  line-height: 1.35;
}

.rc-setup-panel p {
  margin: 6px 0 0;
  color: var(--a5-muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.rc-command-list {
  display: grid;
  gap: 6px;
}

.rc-command-list code {
  display: block;
  padding: 8px 10px;
  border: 2px solid rgba(36, 70, 92, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: var(--a5-line);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Academy-22/24 child experience quality pass */

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0 110px, transparent 110px),
    linear-gradient(180deg, #c8ecf8 0 34%, #f4f1cb 34% 63%, #d9efc2 63% 100%);
}

.academy-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
    transparent;
}

.academy-topbar {
  padding: 2px 2px 8px;
}

.academy-topbar h1 {
  font-size: 25px;
}

.noble-hero {
  min-height: 196px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0 18%, transparent 18%),
    linear-gradient(180deg, #9edcf0 0 58%, #8bd174 58% 100%);
}

.noble-hero__copy h2 {
  max-width: 10ch;
}

.mission-focus {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fffdf5 0%, #f2fbef 100%);
}

.mission-focus::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--a5-sun);
}

.mission-focus > * {
  position: relative;
}

.mission-focus .primary-action {
  min-width: 128px;
}

.practice-panel {
  padding: 14px;
  background: linear-gradient(180deg, #fffdf5 0%, #f6fbff 100%);
}

.practice-panel__head {
  padding-bottom: 12px;
  border-bottom: 2px dashed rgba(36, 70, 92, 0.18);
}

.question-stage {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.voice-toolbox {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(36, 70, 92, 0.16);
  border-radius: 8px;
  background: #eefaf8;
}

.voice-toolbox .audio-row {
  margin: 0;
}

.task-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 3px solid var(--a5-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 0 rgba(36, 70, 92, 0.22);
}

.task-card .mission-instruction,
.task-card .visual-card,
.task-card .prompt-box {
  margin-top: 0;
}

.mission-instruction {
  border-style: solid;
  background: #fff4cd;
  color: #314353;
}

.visual-card {
  min-height: 126px;
  background: #eaf8ff;
}

.prompt-box {
  background: #fffaf0;
}

.answer-heading {
  padding: 0 2px;
  font-size: 14px;
}

.answer-grid {
  gap: 14px;
}

.answer-choice {
  min-height: 88px;
  background: #fffefa;
}

.answer-choice.is-selected {
  border-color: #b9791d;
  background: #fff2b6;
}

.answer-select {
  font-size: 25px;
}

.answer-audio {
  min-width: 60px;
  min-height: 64px;
  background: #dff8f4;
}

.voice-status-line {
  display: grid;
  gap: 2px;
  margin: 0;
}

.voice-status-line span {
  display: block;
  color: var(--a5-line);
  font-size: 12px;
  font-weight: 900;
}

.feedback {
  box-shadow: 0 4px 0 rgba(36, 70, 92, 0.22);
}

.complete-panel {
  background: linear-gradient(180deg, #fffdf5 0%, #eef9f4 100%);
}

.placement-hero {
  background: linear-gradient(135deg, #fff8e4 0%, #e8fbff 55%, #edf9df 100%);
}

.placement-pacing {
  background: #f5fbff;
}

.timeline-list,
.interpretation-grid,
.triage-board,
.triage-card-list,
.review-packet-list,
.safe-fix-plan-list,
.follow-up-checklist,
.copy-audio-fix-list {
  display: grid;
  gap: 10px;
}

.timeline-event,
.interpretation-card,
.triage-card,
.review-packet-card,
.safe-fix-plan-card,
.follow-up-card,
.copy-audio-fix-card {
  border: 2px solid rgba(36, 70, 92, 0.14);
  border-radius: 14px;
  background: #fffdf7;
  padding: 12px;
}

.timeline-event,
.triage-board,
.triage-group,
.review-packet-card,
.safe-fix-plan-card,
.follow-up-card,
.copy-audio-fix-card {
  display: grid;
  gap: 8px;
}

.timeline-event span,
.interpretation-card span,
.triage-card span,
.review-packet-card span,
.safe-fix-plan-card span,
.follow-up-card span,
.copy-audio-fix-card span {
  display: block;
  color: #477177;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-event strong,
.interpretation-card strong,
.triage-card strong,
.review-packet-card strong,
.safe-fix-plan-card strong,
.follow-up-card strong,
.copy-audio-fix-card strong {
  color: var(--a5-line);
}

.timeline-event p,
.interpretation-card p,
.triage-card p,
.review-packet-card p,
.safe-fix-plan-card p,
.follow-up-card p,
.copy-audio-fix-card p {
  margin: 4px 0;
}

.timeline-event small,
.interpretation-card small,
.triage-card small,
.review-packet-card small,
.safe-fix-plan-card small,
.follow-up-card small,
.copy-audio-fix-card small {
  color: #6c7f85;
  font-weight: 800;
}

.copy-audio-fix-card ul {
  margin: 0;
  padding-left: 18px;
}

.copy-audio-fix-card li {
  margin: 4px 0;
  color: var(--a5-line);
  font-weight: 800;
}

.triage-group h4 {
  margin: 0;
  color: var(--a5-muted);
  font-size: 13px;
  text-transform: uppercase;
}

@media (min-width: 720px) {
  .parent-overview {
    grid-template-columns: repeat(4, 1fr);
  }

  .parent-settings-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .parent-controls {
    grid-template-columns: auto 1fr auto auto;
    align-items: end;
  }

  .parent-controls--notes {
    grid-template-columns: auto 1fr;
  }

  .parent-controls--export {
    grid-template-columns: repeat(3, auto) 1fr;
  }

  .parent-section--grid,
  .truth-grid,
  .interpretation-grid,
  .rc-readiness-grid,
  .rc-handoff-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@keyframes noble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes mission-glow {
  0%, 100% { box-shadow: 0 5px 0 var(--a5-line), 0 0 0 rgba(255, 209, 102, 0); }
  50% { box-shadow: 0 5px 0 var(--a5-line), 0 0 26px rgba(255, 209, 102, 0.95); }
}

@keyframes loader-pop {
  0%, 100% { transform: translateY(0); opacity: 0.65; }
  50% { transform: translateY(-5px); opacity: 1; }
}

@media (min-width: 720px) {
  .academy-shell {
    width: min(100%, 760px);
  }

  .map-home {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .noble-hero,
  .trail-map {
    grid-column: span 2;
  }

  .mission-screen,
  .checkpoint-screen,
  .complete-screen {
    width: min(100%, 560px);
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .academy-topbar {
    align-items: start;
  }

  .academy-topbar h1 {
    font-size: 24px;
  }

  .gem-balance,
  .pin-button {
    min-height: 48px;
  }

  .parent-dashboard {
    width: 100vw;
    max-height: 100dvh;
    padding: 8px;
  }

  .parent-dashboard form {
    padding: 12px;
  }

  .parent-dashboard__head {
    align-items: center;
  }
}

@media (max-width: 390px) {
  .academy-shell {
    padding-inline: 10px;
  }

  .noble-hero {
    grid-template-columns: 1fr;
  }

  .noble-sprite {
    margin-top: 8px;
  }

  .mission-focus {
    grid-template-columns: 1fr;
  }

  .mission-focus__step {
    width: 100%;
    justify-items: start;
    text-align: left;
  }

  .primary-action {
    width: 100%;
  }

  .child-comfort-rail {
    grid-template-columns: 1fr;
  }

  .answer-select {
    font-size: 22px;
  }

  .answer-choice {
    grid-template-columns: minmax(0, 1fr) 62px;
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .noble-sprite,
  .mission-node.is-active,
  .loader-dots i {
    animation: none !important;
  }
}
