@font-face {
  font-family: Rubik;
  src: url('assets/fonts/Rubik-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Rubik;
  src: url('assets/fonts/Rubik-Bold.ttf') format('truetype');
  font-weight: 700 950;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --base: #171226;
  --panel: #261e36;
  --ink: #2c223b;
  --sub: #655774;
  --paper: #fff7e9;
  --light: #fff8ef;
  --muted: #cbbfda;
  --line: #53445f;
  --lime: #dbfc84;
  --lavender: #d8c2fe;
  --cyan: #aee9fc;
  --pink: #ffb7d2;
  --speed: 1;
  font-family: Rubik,'Hiragino Sans','Yu Gothic',Meiryo,Arial,sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  background: #0f0c19;
  color: var(--light);
  font-size: 18px;
}

button, input, select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
  opacity: .43;
}

button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 4px solid #65e6ff;
  outline-offset: 4px;
}

button:active:not(:disabled) {
  translate: 0 2px;
}

button[hidden], [hidden] {
  display: none!important;
}

img, svg {
  display: block;
}

b, strong {
  font-weight: 800;
}

#viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

#game {
  position: absolute;
  width: 1600px;
  height: 900px;
  transform: scale(var(--scale,1));
  transform-origin: center;
  background: var(--base);
  overflow: hidden;
  isolation: isolate;
}

#field {
  position: absolute;
  inset: 94px 26px 82px;
  outline: none;
  border: 1px solid #63507f;
  border-radius: 30px;
  overflow: hidden;
  background: #34274a;
  box-shadow: 0 9px 25px #0e0a1a70;
}

.masthead {
  position: absolute;
  inset: 0 26px auto;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 19px;
  align-items: center;
  height: 94px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  line-height: 1;
}

.brand img {
  width: 56px;
  height: 56px;
}

.brand b {
  font-size: 22px;
  letter-spacing: -.055em;
  white-space: nowrap;
}

.brand b span {
  color: var(--lime);
}

.brand small {
  display: block;
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--muted);
  margin-top: 6px;
}

.masthead nav {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 8px;
}

.display-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.projection-button { min-height: 48px; white-space: nowrap; }

.projected-game .masthead { grid-template-columns: 1fr; }

#projection-status {
  position: absolute;
  inset: auto 26px 15px;
  min-height: 48px;
  display: grid;
  place-items: center;
  color: #eee5fc;
  font-size: 29px;
  font-weight: 760;
}

.stage-button {
  height: 54px;
  border: 1px solid #483a5d;
  background: #21192f;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  color: #eadff1;
}

.stage-button span {
  display: grid;
  place-items: center;
  background: #3a2e4c;
  border-radius: 9px;
  width: 28px;
  height: 28px;
  font-size: 14px;
  color: #e2d4ee;
}

.stage-button[aria-current="step"] {
  background: var(--stage-color);
  color: var(--ink);
  border-color: var(--stage-color);
  box-shadow: 0 4px 0 #090711;
}

.stage-button[aria-current="step"] span {
  background: #272036;
  color: var(--stage-color);
}

/* Hover draws a border without replacing the established background/text pair. */
.stage-button:hover:not(:disabled, [aria-current="step"], :focus-visible),
.icon-button:hover:not(:disabled,:focus-visible),
.secondary:hover:not(:disabled,:focus-visible) {
  outline: 2px solid #b69bd9;
  outline-offset: 2px;
}

.icon-button {
  display: grid;
  place-items: center;
  border: 1px solid #564464;
  background: #251c35;
  border-radius: 13px;
  width: 54px;
  height: 52px;
  font-size: 30px;
  justify-self: end;
}

.console {
  position: absolute;
  inset: auto 26px 0;
  z-index: 9;
  height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.console-center {
  color: #cfc1df;
  line-height: 1.38;
  font-size: 16px;
}

.console-tools, .console-actions {
  display: flex;
  gap: 8px;
}

.console button, .secondary {
  border: 1px solid #685575;
  border-radius: 13px;
  background: #2e243f;
  color: #f5eaff;
  padding: 0 17px;
  min-height: 47px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.console .teacher-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.teacher-icon {
  width: 23px;
  height: 23px;
}

.console .console-primary {
  background: var(--lime);
  color: var(--ink);
  border-color: transparent;
}

.console .console-primary:hover:not(:disabled,:focus-visible) {
  outline: 2px solid #d9f88b;
  outline-offset: 2px;
}

kbd {
  margin-left: 7px;
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 1px 5px;
  font: 700 12px Rubik,Arial,sans-serif;
  opacity: .72;
}

.console .audio-off {
  color: #ffcbda;
}

.cavern {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.field-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,#1c163932,transparent 70%),radial-gradient(ellipse at 50% 125%,#17102380,transparent 60%);
  pointer-events: none;
}

.orbit {
  position: absolute;
  width: 646px;
  height: 646px;
  left: 50%;
  top: -70px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle,#d9a8ff31 0,transparent 61%);
  border: 1px solid #e2c5ff38;
  box-shadow: inset 0 0 0 19px #e2c5ff0c;
  pointer-events: none;
}

.orbit:before, .orbit:after {
  content: '';
  position: absolute;
  inset: 42px;
  border: 1px dashed #e2c5ff48;
  border-radius: 50%;
  transform: rotate(-16deg);
}

.orbit:after {
  inset: 86px;
  border-style: solid;
  opacity: .4;
}

.twinkle {
  position: absolute;
  line-height: 1;
  color: #f4d1ff;
  font-size: 37px;
  filter: drop-shadow(0 0 15px #dcacfc);
  pointer-events: none;
}

.twinkle.one {
  left: 23%;
  top: 158px;
}

.twinkle.two {
  left: 73%;
  top: 104px;
  font-size: 50px;
}

.twinkle.three {
  left: 78%;
  top: 340px;
  font-size: 26px;
}

.scene-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #aa94c1;
  border-radius: 999px;
  background: #2b2044;
  color: #f5e8ff;
  font-size: 16px;
  letter-spacing: .08em;
  font-weight: 800;
  white-space: nowrap;
}

.scene-tag i {
  width: 10px;
  height: 10px;
  background: var(--stage-color,var(--lime));
  border-radius: 50%;
  display: block;
}

.hero-flag {
  position: absolute;
  z-index: 2;
  top: 28px;
  left: 30px;
}

.hero-grid, .hero-creature {
  position: absolute;
  inset: 0;
}

.hero-creature .monster {
  width: 641.7px;
  top: 0;
}

.lesson-board {
  position: absolute;
  bottom: 26px;
  left: 50%;
  translate: -50% 0;
  width: 1240px;
  min-height: 164px;
  padding: 20px 26px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid #493853;
  border-radius: 27px;
  box-shadow: 0 8px 0 #241a3c, 0 0 0 4px #d8b9f22e;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.lesson-board:before {
  content: '';
  width: 28px;
  height: 28px;
  position: absolute;
  left: calc(50% - 14px);
  top: -15px;
  background: var(--paper);
  border-top: 2px solid #493853;
  border-left: 2px solid #493853;
  rotate: 45deg;
  border-radius: 5px 0 0;
}

.lesson-copy, .lesson-controls {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.lesson-kicker {
  font-size: 17px;
  padding: 4px 9px;
  background: #ece4fb;
  border: 1px solid #d7c6ee;
  border-radius: 9px;
  color: #50377a;
  letter-spacing: .05em;
  font-weight: 850;
}

.lesson-line {
  margin: 0;
  color: var(--ink);
  font-size: 91px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -.05em;
}

.lesson-line.mid { font-size: 70px; }
.lesson-line.long { font-size: 52px; }
.lesson-line.end-win { font-size: 89px; color: #3e6745; }
.lesson-line.end-lose { font-size: 74px; color: #674877; }
.sentence-board .lesson-line.mid { font-size: 57px; }

.lesson-board .prompt-text .segment {
  display: block;
}

.emphasis { color: #4e3e86; }
.emphasis.no { color: #a33258; }

.lesson-sub {
  margin: 0;
  color: var(--sub);
  font-weight: 700;
  font-size: 27px;
}

.lesson-controls {
  justify-items: end;
  padding-left: 8px;
}

.hero-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}

.primary, .sound-button {
  border: 2px solid #473943;
  border-radius: 14px;
  box-shadow: 0 5px 0 #473943;
  background: var(--lime);
  color: var(--ink);
  min-height: 58px;
}

.primary {
  font-size: 22px;
  font-weight: 850;
  padding: 0 19px;
  white-space: nowrap;
}

.primary:hover:not(:disabled,:focus-visible) { outline: 2px solid #9a77c7; outline-offset: 2px; }
.primary.gentle { background: #ede2fb; }


.sound-button {
  display: grid;
  place-items: center;
  width: 58px;
  padding: 0;
  background: #f3e9fa;
}

.sound-button:hover:not(:disabled,:focus-visible) { outline: 2px solid #9a77c7; outline-offset: 2px; }
.sound-button svg { width: 28px; height: 28px; }

.board-step {
  color: #6a5d79;
  font-size: 16px;
  letter-spacing: .04em;
  font-weight: 800;
}

.challenge-picker {
  position: absolute;
  top: 106px;
  left: 30px;
  width: 278px;
  padding: 15px;
  display: grid;
  gap: 9px;
  border: 1px solid #8a6da3;
  background: #261a36ec;
  border-radius: 19px;
  box-shadow: 0 5px 0 #1a1129;
}

.challenge-picker h2 {
  margin: 0 0 2px;
  font-size: 17px;
  letter-spacing: .025em;
}

.mode-picker { display: flex; gap: 7px; margin-bottom: 4px; }
.mode-button {
  flex: 1;
  padding: 10px 6px;
  border: 1px solid #806a9b;
  border-radius: 9px;
  color: #fff1ee;
  background: #3a284f;
  font-size: 18px;
  font-weight: 800;
}
.mode-button[aria-pressed="true"] { color: #2b2040; background: var(--lime); border-color: var(--lime); }

.challenge-button {
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid #806a9b;
  border-radius: 9px;
  background: #3a284f;
  color: #fff1ee;
}

.challenge-button strong { font-size: 20px; }
.challenge-button small { font-size: 15px; color: #e4d6ed; }

.challenge-button[aria-pressed="true"] {
  color: #2b2040;
  background: var(--lime);
  border-color: var(--lime);
}

.challenge-button[aria-pressed="true"] small { color: #41345b; }

.specimen-board, .sentence-board {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.specimen-board .single-food {
  width: 153px;
  height: 139px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--food);
  border: 1px solid #3728402c;
}

.single-food .food-art { width: 134px; height: 130px; }
.specimen-board.food-words-only { grid-template-columns:minmax(0,1fr) auto; }
.food-words-only .lesson-line { font-size:91px; }

.lesson-foods {
  display: flex;
  gap: 7px;
}

.lesson-foods .food-medal {
  width: 96px;
  height: 101px;
  display: grid;
  place-items: center;
  background: var(--food);
  border-radius: 14px;
  border: 1px solid #3826422b;
}

.lesson-foods .food-art { width: 90px; height: 87px; }

.farewell {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.farewell button {
  border: 1px solid #7b6989;
  border-radius: 11px;
  background: #eee2fa;
  color: #352742;
  padding: 6px 12px;
  font-size: 22px;
  font-weight: 850;
}

/* The same dragon is centered in lessons and in the arena. */
.dragon {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  aspect-ratio: 1416 / 1111;
  pointer-events: none;
  isolation: isolate;
}

.dragon-halo, .dragon-ground, .dragon-motion {
  position: absolute;
  pointer-events: none;
}

.dragon-halo {
  inset: 7% 10% 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #ffae5f51, #f97e5d21 49%, transparent 73%);
}

.dragon-shadow .dragon-halo {
  inset: -2% 0 4%;
  background: radial-gradient(ellipse, #cba1fd81, #9273dc42 48%, transparent 72%);
}

.dragon-ground {
  inset: 91% 3% -3%;
  border-radius: 50%;
  background: #150d24a6;
  filter: blur(9px);
}

.dragon-motion {
  inset: 0;
  transform-origin: 52% 86%;
  animation: dragon-idle calc(4.2s / var(--speed)) ease-in-out infinite;
}

.dragon-image {
  width: 100%;
  height: 100%;
  user-select: none;
  filter: drop-shadow(0 11px 11px #1c0c22a3);
}

.dragon-shadow .dragon-image {
  filter: saturate(.55) brightness(.43) hue-rotate(316deg) contrast(1.23)
    drop-shadow(0 0 1px #fde0ff) drop-shadow(0 0 10px #b598ff9b) drop-shadow(0 10px 12px #150b20);
}

.dragon-mouth {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0;
  height: 0;
}

.dragon-mouth:after {
  content: '';
  display: block;
  position: absolute;
  width: 55px;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8beab, #ffa13a75 43%, transparent 73%);
  opacity: 0;
}

.dragon[data-mood="fire"] .dragon-mouth:after,
.dragon[data-mood="special"] .dragon-mouth:after {
  opacity: .9;
  transition: opacity .23s ease;
}

.dragon-sleep {
  position: absolute;
  display: none;
  left: 76%;
  top: 12%;
  color: #ffe2ff;
  font-weight: 900;
  letter-spacing: .17em;
  font-size: 32px;
  text-shadow: 0 0 18px #d2a9fc;
}

.dragon[data-mood="sleep"] .dragon-sleep { display: block; }
.dragon[data-mood="sleep"] .dragon-motion {
  animation: dragon-rest calc(4.8s / var(--speed)) ease-in-out infinite;
}
.dragon[data-mood="hello"] .dragon-motion,
.dragon[data-mood="happy"] .dragon-motion,
.dragon[data-mood="victory"] .dragon-motion {
  animation: dragon-hop calc(.8s / var(--speed)) ease-in-out 2;
}
.dragon[data-mood="refuse"] .dragon-motion {
  animation: dragon-deny calc(.58s / var(--speed)) ease-in-out 2;
}
.dragon[data-mood="attack"] .dragon-motion,
.dragon[data-mood="fire"] .dragon-motion {
  animation: dragon-attack calc(1.1s / var(--speed)) ease-in-out both;
}
.dragon[data-mood="special"] .dragon-motion {
  animation: dragon-roar calc(1.62s / var(--speed)) ease-in-out both;
}
.dragon[data-mood="hit"] .dragon-motion {
  animation: dragon-hit calc(.54s / var(--speed)) ease-out both;
}
.dragon[data-mood="surprise"] .dragon-motion,
.dragon[data-mood="defeat"] .dragon-motion {
  animation: dragon-roar calc(.9s / var(--speed)) ease-in-out 2;
}
.dragon.talking .dragon-image {
  animation: dragon-talk calc(.52s / var(--speed)) ease-in-out infinite alternate;
  transform-origin: 58% 63%;
}

@keyframes dragon-idle {
  50% { transform: translateY(-8px) rotate(-1.2deg) scale(1.015, 1.021); }
}
@keyframes dragon-hop {
  18% { transform: translateY(3px) scale(1.06, .95); }
  48% { transform: translateY(-29px) rotate(3deg) scale(.99, 1.04); }
  80% { transform: translateY(-6px) rotate(-3deg); }
}
@keyframes dragon-deny {
  25%, 75% { transform: translateX(-10px) rotate(-4deg); }
  50% { transform: translateX(12px) rotate(4deg); }
}
@keyframes dragon-attack {
  19% { transform: translateY(9px) scale(1.02, .95); }
  53% { transform: translateY(-11px) scale(1.08); }
  77% { transform: translateY(-8px) scale(1.04); }
}
@keyframes dragon-roar {
  26% { transform: translateY(4px) scale(1.02, .95); }
  58% { transform: translateY(-19px) scale(1.11); }
  83% { transform: translateY(-10px) scale(1.05); }
}
@keyframes dragon-hit {
  24% { transform: translateX(-25px) rotate(-9deg) scale(1.045, .93); }
  54% { transform: translateX(6px) rotate(3deg); }
}
@keyframes dragon-rest {
  0%, 100% { transform: translateY(9px) rotate(-8deg) scaleY(.88); }
  50% { transform: translateY(5px) rotate(-7deg) scaleY(.91); }
}
@keyframes dragon-talk {
  to { transform: rotate(1deg) scale(1.009, 1.018); }
}

.quiz-contents {
  position: absolute;
  inset: 18px 24px 15px;
  display: grid;
  grid-template-rows: 436px 189px minmax(0, 1fr);
  gap: 9px;
}

.hud {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: grid;
  grid-template-columns: 395px 395px;
  justify-content: space-between;
  pointer-events: none;
}

.hp-card {
  background: #221a34e8;
  border: 1px solid #8c75aa;
  border-radius: 19px;
  padding: 8px 15px 10px;
  box-shadow: 0 4px 0 #191429;
  min-width: 0;
}

.hp-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.hp-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 32px;
  border-radius: 10px;
  background: #433653;
  color: var(--hp);
  font-size: 23px;
  font-weight: 900;
}

.hp-heading strong {
  font-size: 23px;
  letter-spacing: .04em;
}

.hp-numbers {
  margin-left: auto;
  font-size: 30px;
  line-height: 1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.hp-numbers small {
  font-size: 19px;
  color: #c9b9d8;
  font-weight: 700;
}

.hp-track {
  height: 23px;
  border-radius: 7px;
  background: #151121;
  border: 2px solid #12101d;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #716083;
}

.hp-fill {
  width: var(--hp-pct);
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(180deg,#fff5 0 35%,transparent 37%),repeating-linear-gradient(90deg,transparent 0 49px,#160e2926 50px 52px),var(--hp);
  transition: width calc(.43s / var(--speed)) cubic-bezier(.2,.8,.32,1);
}

.hp-card.low {
  border-color: #ff91a9;
}

.hp-card.low .hp-numbers {
  color: #ffb5c2;
}

.hp-card.is-hit {
  animation: hud-hit calc(.5s / var(--speed)) ease-out both;
}

.hp-card.player {
  --hp: #a7edcb;
}

.hp-card.boss-hp {
  --hp: #ffad90;
}

.danger .field-vignette {
  background: linear-gradient(90deg,#a13d4b45,transparent 68%),radial-gradient(ellipse at 50% 120%,#5c153a65,transparent 60%);
}

.question-top {
  position: relative;
  min-height: 0;
}

.quiz-creature {
  position: absolute;
  inset: 0;
}

.quiz-creature .monster {
  width: 411.7px;
  top: -13px;
}

.quiz-creature .scene-tag {
  z-index: 1;
  position: absolute;
  left: 0;
  top: 3px;
}

.has-hud .quiz-creature .scene-tag {
  top: 92px;
}

.question-board {
  position: absolute;
  inset: auto 145px 0;
  min-height: 127px;
  padding: 39px 95px 15px;
  border: 2px solid #493853;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 7px 0 #271b3a,0 0 0 3px #d9bafa24;
  display: grid;
  align-items: center;
}

.question-board:before {
  content: '';
  width: 23px;
  height: 23px;
  position: absolute;
  left: calc(50% - 11px);
  top: -12px;
  background: var(--paper);
  border-top: 2px solid #493853;
  border-left: 2px solid #493853;
  rotate: 45deg;
  border-radius: 4px 0 0;
}

.question-topline, .question-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--sub);
  font-weight: 800;
  font-size: 16px;
}

.question-topline {
  position: absolute;
  inset: 9px 13px auto;
}

.question-topline .level-tag {
  border-radius: 6px;
  background: #ece4f9;
  color: #533d78;
  padding: 4px 8px;
  letter-spacing: .055em;
  white-space: nowrap;
}

.round-label {
  letter-spacing: .05em;
}

.question-topline .timer {
  margin-left: auto;
  border: 1px solid #c6927d;
  color: #763f35;
  border-radius: 8px;
  padding: 4px 8px;
  font-variant-numeric: tabular-nums;
}

.question-topline .timer.expired {
  background: #fbd5c8;
}

.battle-clocks {
  position: absolute;
  inset: 91px 20% auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.battle-countdown {
  width: 220px;
  height: 164px;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  --lean: -11deg;
  --direction: 32px;
  --burst: #d92643;
}

.battle-countdown.clock-right {
  --lean: 10deg;
  --direction: -32px;
}

.battle-countdown::before,
.battle-countdown::after {
  content: '';
  position: absolute;
  z-index: -1;
  rotate: var(--lean);
}

.battle-countdown::before {
  inset: -8px -7px -9px;
  background: #120e16;
  clip-path: polygon(8% 21%, 95% 3%, 87% 25%, 100% 73%, 18% 100%, 24% 79%, 0 65%);
}

.battle-countdown::after {
  inset: 5px 6px;
  background: linear-gradient(153deg, transparent 11%, #ffe7d6 11% 14%, transparent 14% 75%,
    #151016 75% 79%, transparent 79%), var(--burst);
  clip-path: polygon(12% 23%, 95% 4%, 85% 29%, 100% 70%, 20% 93%, 23% 78%, 0 64%);
}

.countdown-ink {
  color: #fff8ea;
  font-size: 151px;
  line-height: .92;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.11em;
  padding-right: .11em;
  paint-order: stroke fill;
  -webkit-text-stroke: 6px #120e16;
  text-shadow: 6px 8px 0 #120e16;
  transform: rotate(var(--lean)) skewX(-9deg);
  animation: countdown-land 235ms cubic-bezier(.2,.84,.24,1) both;
}

.battle-countdown.urgent { --burst: #f13348; }
.battle-countdown.waiting::before, .battle-countdown.waiting::after { display: none; }

.battle-countdown.waiting .countdown-ink {
  padding: 6px 17px;
  border: 1px solid #a484bd;
  background: #322644;
  border-radius: 4px;
  color: #eadaf5;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: .04em;
  text-shadow: none;
  -webkit-text-stroke: 0;
  animation: none;
}

.battle-countdown.ready .countdown-ink {
  font-size: 55px;
  letter-spacing: -.055em;
  padding-right: .055em;
  -webkit-text-stroke-width: 5px;
}

@keyframes countdown-land {
  from { transform: translate(var(--direction), 9px) rotate(var(--lean)) skewX(-16deg) scale(.83); }
  52% { transform: translate(0, -5px) rotate(var(--lean)) skewX(-9deg) scale(1.09); }
  to { transform: rotate(var(--lean)) skewX(-9deg); }
}

#game.reduced .countdown-ink { animation: none; }

.question-board .prompt-text {
  font-weight: 900;
  color: var(--ink);
  min-width: 0;
  font-size: 67px;
  line-height: 1.02;
  letter-spacing: -.045em;
  margin: 0;
  text-align: center;
  text-wrap: balance;
}

.question-board .prompt-text.question-medium { font-size: 59px; }
.question-board .prompt-text.question-long { font-size: 52px; }
.question-board .prompt-text.question-dual { font-size: 42px; }

.listening-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.listening-prompt h1 {
  margin: 0;
  color: #382650;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -.04em;
}

.listen-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #382650;
  background: #f1e3f9;
  border: 1px solid #a184b9;
  border-radius: 12px;
  font-size: 21px;
  font-weight: 800;
}

.listen-button svg { width: 25px; height: 25px; }

.question-board .prompt-text .segment, .question-clause {
  display: block;
}

.question-address {
  display: block;
  margin-bottom: 4px;
  color: #754997;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.025em;
  word-spacing: .12em;
  overflow-wrap: anywhere;
}

.question-meta {
  display: contents;
}

.question-meta .prompt-audio {
  position: absolute;
  right: 15px;
  bottom: 15px;
  border: 1px solid #9d87b4;
  border-radius: 10px;
  background: #f2e6f9;
  color: #342541;
  width: 46px;
  height: 39px;
  display: grid;
  place-items: center;
}

.prompt-audio svg {
  width: 22px;
  height: 22px;
}

.question-meta.hint > span {
  position: absolute;
  right: 74px;
  top: 11px;
  color: #56377b;
  background: #f2e6f9;
  border-radius: 5px;
  padding: 3px 7px;
}

.question-topline:has(.timer) ~ .hint > span {
  right: 103px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(var(--choices,4),minmax(0,1fr));
  gap: 13px;
  min-height: 0;
}

.answer-card {
  border: 2px solid #524159;
  border-radius: 20px;
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: #fff7eb;
  color: var(--ink);
  box-shadow: 0 6px 0 #24192e;
  display: grid;
  grid-template-rows: 1fr 35px;
  align-items: center;
  justify-items: center;
  padding: 8px 12px 9px;
  isolation: isolate;
}

.answer-card:before {
  content: '';
  position: absolute;
  inset: 9px 9px 44px;
  background: var(--card-color,#efe5fa);
  border-radius: 12px;
  z-index: -1;
}

.answer-card.choice:hover {
  background: #fffdf5;
  border-color: #b08adb;
  box-shadow: 0 6px 0 #21162f,0 0 0 3px #d9beff;
}

.choice-letter {
  position: absolute;
  top: 13px;
  left: 13px;
  border-radius: 10px;
  background: #382e4b;
  color: #fff3ec;
  display: grid;
  place-items: center;
  width: 57px;
  height: 53px;
  font-size: 39px;
  line-height: 1;
  font-weight: 900;
  z-index: 1;
}

.food-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding-top: 0;
}

.food-tray .food-art {
  width: 134px;
  height: 130px;
}

.food-tray.pair {
  padding-left: 33px;
}

.food-tray.pair .food-art {
  width: 114px;
  height: 111px;
  min-width: 0;
}

.card-plus {
  flex: 0 0 auto;
  font-size: 29px;
  font-weight: 900;
  color: #604879;
}

.answer-label {
  min-width: 0;
  font-weight: 850;
  line-height: 1.03;
  font-size: 30px;
  letter-spacing: -.03em;
  text-align: center;
  white-space: nowrap;
}

.answer-card.multi .answer-label {
  font-size: 22px;
}

.answer-card.honey-masked { grid-template-rows:minmax(0,1fr) auto; }
.honey-masked .answer-label { text-align:center; white-space:normal; }
.honey-masked .food-tray { height:100%; }
.honey-masked .food-art { max-height:100%; }
.honey-masked.multi .food-art { width:104px; height:100px; }
.honey-masked.multi .answer-label { font-size:26px; line-height:1.06; }

.answer-label .not-word {
  color: #973854;
}

.answer-card.correct {
  border-color: #45794c;
  box-shadow: 0 6px 0 #234c3e,0 0 0 4px #a8f3a7;
}

.answer-card.correct .choice-letter {
  background: #307447;
}

.answer-card.retry {
  border-color: #f09eab;
  box-shadow: 0 6px 0 #582942,0 0 0 3px #f4aab4;
}

.answer-card.clue {
  border-style: dashed;
  border-color: #7d60a2;
}

.answer-state {
  position: absolute;
  right: 14px;
  top: 15px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #264c35;
  color: #fffdec;
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
  z-index: 2;
}

.retry .answer-state {
  background: #873d57;
}

.answer-card.is-other {
  opacity: .8;
}

.activity-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 1px 3px 0;
}

.activity-label {
  color: #f8edff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.17;
  min-width: 0;
}

.activity-label small {
  color: #dfcce9;
  display: block;
  font-size: 15px;
  margin-top: 4px;
  font-weight: 400;
}

.activity-label .answer-reveal {
  color: var(--lime);
  font-size: 27px;
  letter-spacing: .04em;
}

.activity-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.activity-actions .primary, .activity-actions .secondary {
  min-height: 49px;
  font-size: 19px;
  box-shadow: none;
}

.activity-actions .primary {
  border-color: #c1dd6e;
}

.count-buttons {
  display: flex;
  gap: 6px;
}

.count-button {
  width: 53px;
  height: 48px;
  border: 1px solid #a28db7;
  border-radius: 11px;
  background: #302342;
  color: #fcf1ff;
  font-size: 29px;
  font-weight: 900;
}

.count-button[aria-pressed="true"] {
  background: var(--lime);
  color: var(--ink);
  border-color: #e9ff9a;
  box-shadow: 0 0 0 2px #c1a4ef;
  transform: translateY(-2px);
}

.round-preview {
  font-size: 15px;
  color: #f1d9ff;
  font-weight: 800;
  white-space: nowrap;
}

.activity-label .good-text {
  color: var(--lime);
}

.activity-label .try-text {
  color: #ffd6d5;
}

#overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.dialog-scrim {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #100c1cca;
  pointer-events: auto;
}

.dialog {
  width: 900px;
  max-height: 790px;
  overflow: auto;
  border: 2px solid #917bb2;
  border-radius: 24px;
  background: #251d34;
  box-shadow: 0 16px 70px #090611;
  display: grid;
  gap: 16px;
  padding: 26px 30px 29px;
}

.dialog.compact {
  width: 635px;
  overflow: visible;
  padding: 37px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dialog h2, .dialog h3, .dialog p {
  margin: 0;
}

.dialog h2 {
  font-size: 38px;
  letter-spacing: -.04em;
}

.dialog h3 {
  font-size: 18px;
  letter-spacing: .03em;
  color: #efdcfb;
}

.dialog-close {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid #8874a1;
  background: #392b4c;
  font-size: 28px;
}

.dialog p {
  font-size: 17px;
  line-height: 1.4;
  color: #e1d5eb;
}

.quick-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-row .secondary {
  min-height: 40px;
}

.quick-row .danger-button {
  color: #ffd0d8;
  border-color: #ae647e;
}

.teacher-hint {
  padding: 10px 13px;
  background: #342746;
  border: 1px solid #6e5b86;
  border-radius: 11px;
}

.settings-group {
  display: grid;
  gap: 9px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px 16px;
}

.settings-grid label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px 9px;
  min-height: 48px;
  min-width: 0;
  border-bottom: 1px solid #59476c;
  font-size: 16px;
  color: #f2e9f4;
  padding: 4px 0;
}

.settings-grid label:has(input[type="range"]) {
  grid-template-columns: 1fr auto;
}

.settings-grid output {
  color: var(--lime);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  min-width: 40px;
  text-align: right;
}

.settings-grid input[type="range"] {
  grid-column: 1/-1;
  width: 100%;
  accent-color: #c7b3ed;
  margin: 0;
}

.settings-grid input[type="checkbox"] {
  accent-color: #d4f78a;
  width: 23px;
  height: 23px;
}

.settings-grid input[type="number"], .settings-grid select {
  color: #fff8ef;
  background: #312141;
  border: 1px solid #817094;
  border-radius: 7px;
  height: 34px;
  max-width: 143px;
  padding: 2px 6px;
}

.settings-grid input[type="number"] {
  width: 76px;
}

.settings-note {
  font-size: 14px!important;
}

.offline-settings p {
  margin: 0;
  color: #ddcfe9;
  font-size: 16px;
}

.offline-settings summary { cursor: pointer; font-size: 15px; }
.offline-settings details p { margin-top: 7px; }
.offline-settings [data-offline-status] { color: #dcf49e; font-size: 16px; }
.offline-settings progress { width: 100%; height: 12px; accent-color: #d9ff70; }

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.dialog-actions .primary {
  font-size: 19px;
  min-height: 48px;
  box-shadow: none;
}

.dialog-actions .secondary {
  min-height: 48px;
}

.toast {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  z-index: 12;
  max-width: 1100px;
  color: #fff9ee;
  background: #302243;
  border: 1px solid #c1a4e2;
  border-radius: 12px;
  padding: 11px 19px;
  box-shadow: 0 5px 24px #110c27a0;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.toast.visible {
  display: block;
}

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

.fx {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}

.fx>* {
  position: absolute;
  pointer-events: none;
}

.fx-dim {
  inset: 0;
  background: radial-gradient(ellipse at 48% 49%,#482c656b,#110b26e0 73%);
}

.fx-title {
  z-index: 6;
  left: 0;
  top: 17%;
  width: 100%;
  text-align: center;
  font-weight: 900;
  font-style: italic;
  font-size: 135px;
  line-height: 1;
  letter-spacing: -.045em;
  color: #fff1a1;
  text-shadow: 0 8px #75416e,0 14px #2c1b43,0 0 42px #ffe48d99;
  -webkit-text-stroke: 2px #512d55;
  white-space: nowrap;
}

.fx-title.counter {
  color: #ffc2d0;
  text-shadow: 0 8px #7f394e,0 14px #3e233f,0 0 38px #ff8a9b77;
}

.fx-title.victory {
  color: #daff72;
  text-shadow: 0 8px #487d54,0 14px #282847,0 0 42px #becf83;
}

.fx-projectile {
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 6px #1b1329) drop-shadow(0 0 25px #f5be6e);
}

.fx-projectile .food-art {
  width: 100%;
  height: 100%;
}

.fx-charge {
  z-index: 3;
  border-radius: 50%;
  border: 6px solid #ffe2a0a1;
  box-shadow: 0 0 80px #ffc96788,inset 0 0 44px #ffd59e66;
  background: radial-gradient(circle,#ffe7aa8b,transparent 68%);
}

.fx-charge.counter {
  border-color: #ff9ba6ad;
  box-shadow: 0 0 62px #d1699388,inset 0 0 45px #ffd0a66c;
  background: radial-gradient(circle,#ffbc85af,#9a406584 63%,transparent 70%);
}

.fx-ring {
  z-index: 4;
  border: 7px solid var(--fx-color,#fff0a4);
  border-radius: 50%;
  box-shadow: 0 0 22px var(--fx-color,#fff0a4),inset 0 0 18px var(--fx-color,#fff0a4);
}

.fx-bit {
  z-index: 5;
  background: var(--fx-color,#ffd87a);
  box-shadow: 0 0 13px var(--fx-color,#ffd87a);
  border-radius: 3px;
}

.fx-bit.star {
  clip-path: polygon(50% 0,63% 35%,100% 50%,63% 63%,50% 100%,37% 63%,0 50%,37% 37%);
}

.fx-damage {
  z-index: 7;
  font-size: 130px;
  line-height: .8;
  font-weight: 950;
  letter-spacing: -.06em;
  color: #fff2a7;
  -webkit-text-stroke: 3px #43213b;
  text-shadow: 0 8px #4d2b4e,0 0 20px #fff0;
}

.fx-damage.counter {
  color: #ffc2cc;
}

.fx-damage small {
  display: block;
  font-size: 24px;
  letter-spacing: .09em;
  text-align: center;
  -webkit-text-stroke: 0;
  color: #fff2ec;
  text-shadow: 0 3px #32233d;
  margin-top: 13px;
  white-space: nowrap;
}

.fx-fire {
  z-index: 3;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 45%,#fff5ae 11%,#ffb661 35%,#e56378 57%,#a5519b00 72%);
  filter: drop-shadow(0 0 22px #ff9978);
  border: 4px solid #ffce9077;
}

.fx-gust {
  z-index: 3;
  border: 6px solid #ffbbac;
  border-right-color: transparent;
  border-left-color: transparent;
  border-radius: 48%;
  box-shadow: 0 0 20px #f092aa66;
}

@keyframes hud-hit {
  35% {
    box-shadow: inset 0 0 0 4px #fff0ae,0 4px 0 #191429;
  }
}

#game.paused * {
  animation-play-state: paused!important;
}

#game.reduced .monster * {
  animation: none!important;
}

#game.reduced .dragon[data-mood="sleep"] .dragon-motion {
  transform: rotate(-8deg) scaleY(.88);
}

#game.reduced .hp-fill {
  transition: none;
}

#game.reduced .fx-title {
  text-shadow: 0 6px #4a325a;
}

.answer-card.words-only {
  background: var(--paper);
  grid-template-rows: 1fr;
  padding: 41px 12px 10px;
}

.answer-card.words-only::before {
  inset: 9px;
}

.answer-card.words-only .answer-label {
  display: grid;
  align-items: center;
  gap: 2px;
  font-size: 43px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.answer-card.words-only.multi .answer-label { font-size: 32px; }
.answer-card.words-only .text-plus { font-size: 23px; color: #654e76; }
.answer-card.words-only.triple .answer-label { font-size: 28px; gap: 0; }
.answer-card.words-only.triple .text-plus { font-size: 19px; line-height: .9; }

.name-settings {
  display: grid;
  gap: 6px;
  color: #f6edf7;
}

.name-settings textarea {
  resize: vertical;
  min-height: 60px;
  width: 100%;
  padding: 8px 11px;
  font: inherit;
  line-height: 1.3;
  color: #fffaf4;
  background: #1a1327;
  border: 1px solid #957ead;
  border-radius: 9px;
}

.name-settings textarea:focus-visible {
  outline: 3px solid #65e6ff;
  outline-offset: 2px;
}

.name-settings > span {
  color: #d3c2df;
  font-size: 14px;
}

.food-settings-head, .voice-settings {
  display: flex;
  align-items: center;
  gap: 10px;
}

.food-settings-head { justify-content: space-between; }
.food-settings-head .secondary, .voice-settings .secondary { min-height: 32px; padding: 0 10px; }
.food-settings-head h3 span { margin-left: 5px; color: #d3c2df; font-size: 14px; }

.food-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.food-groups h4 {
  margin: 0 0 5px;
  color: #dfccec;
  font-size: 14px;
}

.food-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.food-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  background: #352849;
  border: 1px solid #79658d;
  border-radius: 7px;
  font-size: 16px;
}

.food-checks input { accent-color: #d6f76b; }
.voice-settings label { display: flex; align-items: center; gap: 8px; }

.voice-settings select {
  max-width: 380px;
  height: 34px;
  padding: 0 6px;
  color: #fff8ef;
  background: #2a203c;
  border: 1px solid #847199;
  border-radius: 7px;
}

#settings {
  width: 1010px;
  max-height: 824px;
  padding: 22px 27px;
  gap: 12px;
}

#settings .settings-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 12px;
}

#settings .settings-grid label {
  min-height: 43px;
  font-size: 15px;
}

#settings .settings-grid select {
  max-width: 122px;
}

#settings .dialog-actions {
  position: sticky;
  bottom: -22px;
  z-index: 1;
  margin: 0 -12px -12px;
  padding: 11px 12px 12px;
  background: #251d34;
  border-top: 1px solid #6e5b86;
}

.fx-fire-breath {
  z-index: 5;
  filter: drop-shadow(0 0 12px #f7724d99) drop-shadow(0 0 22px #f7973e55);
}

.fx-fire-breath svg {
  width: 100%;
  height: 100%;
}

.fx-title.flame-title {
  top: 8%;
  font-size: 96px;
  color: #ffe2a7;
}

.brand img {
  padding: 5px;
  object-fit: contain;
  border: 1px solid #674d78;
  border-radius: 13px;
  background: radial-gradient(#814b42, #32213f 72%);
}

.class-entry { margin-top: 12px; font-size: 20px; }
.lesson-controls .class-entry { color:#f3eaff; background:#342843; border-color:#8b739f; }
.hero-creature .class-monster { position:absolute; left:50%; transform:translateX(-50%); top:-20px; width:588px; height:510px; }
.quiz-creature .battle-monster { position:absolute; left:50%; transform:translateX(-50%); top:-24px; width:429.6px; height:342px; }
.battle-monster[data-mood="hit"] .class-creature-image { animation:boss-hit .42s ease-out; }
@keyframes boss-hit { 35% { transform:translateY(-6px) rotate(4deg) scale(.96); } }
.has-hud .quiz-monster-name { top:139px; max-width:280px; font-size:24px; }

.creature-sleep { position:absolute; top:22px; right:15px; font-size:42px; color:#f9ebff; font-weight:800; letter-spacing:.1em; text-shadow:0 3px #38244e; }
.class-monster[data-mood="sleep"] .class-creature-image { transform:rotate(7deg) scale(.96); }
.battle-cast-link { width:100%; margin-top:5px; font-size:18px; min-height:43px; }
.battle-cast-shortcut { position:absolute; top:28px; right:30px; width:285px; }
.battle-monster-settings { border:1px solid #715c8b; border-radius:14px; padding:12px 15px; }
.battle-monster-settings > summary { cursor:pointer; font-size:21px; font-weight:800; color:#e6d2ff; }
.battle-monster-settings > p { margin:10px 0; }
.battle-monster-checks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:12px; }
.battle-monster-checks label { display:grid; grid-template-columns:24px 64px 1fr; align-items:center; gap:10px; min-height:78px; padding:7px 10px; border:1px solid #6d577e; border-radius:12px; background:#30253e; font-size:17px; cursor:pointer; }
.battle-monster-checks label:has(input:checked) { background:#40324f; border-color:#c2e087; }
.battle-monster-checks input { width:22px; height:22px; accent-color:#d8f88d; }
.battle-choice-preview { width:64px; height:64px; object-fit:contain; }
.hero-monster-name { position:absolute; z-index:1; top:460px; left:50%; transform:translateX(-50%); font-size:26px; padding:5px 18px; border-radius:20px; background:#251d39c9; white-space:nowrap; }
.lesson-board .lesson-line.greeting-line { font-size:54px; max-width:790px; }
.lesson-count-picker { display:flex; align-items:center; justify-content:space-between; gap:14px; font-size:17px; }
.lesson-count-picker select { min-width:120px; padding:7px 11px; border-radius:9px; border:1px solid #786387; background:#30253f; color:#fff3e9; font-weight:700; }
.lesson-count-picker option:disabled { color:#938a9d; background:#30283a; }
.lesson-board .lesson-count-picker { color:#51405f; }
.lesson-quiz-setup { position:absolute; right:4px; top:5px; }
.quiz-monster-name { position:absolute; top:45px; left:8px; font-size:26px; font-weight:800; }
.lesson-quiz .quiz-creature .class-monster { position:absolute; left:50%; transform:translateX(-50%); top:-24px; width:420px; height:338.4px; }
.fx-class-skill.practice-skill { top:117px; left:870px; max-width:680px; font-size:23px; }
.class-nav { display:flex; grid-column:1/-1; min-width:0; align-items:center; gap:18px; padding:0 10px; width:100%; }
.class-nav b { white-space:nowrap; font-size:22px; color:var(--lavender); }
.class-nav > span { margin-left:auto; white-space:nowrap; font-size:16px; }
.class-nav button { min-height:40px; font-size:16px; }
.class-monster { width:330px; height:285px; position:relative; margin:auto; isolation:isolate; }
.class-creature-image { width:100%; height:100%; object-fit:contain; padding:14.4px; }
.creature-fallback { display:grid; place-items:center; width:100%; height:100%; border:2px dashed #ddc8f0; border-radius:25px; font-size:32px; text-align:center; }
.class-monster[data-mood="happy"] .class-creature-image { animation:class-cheer .7s ease-out; }
@keyframes class-cheer { 40% { transform:translateY(-18px) rotate(-3deg); } 75% { transform:rotate(3deg); } }
.class-heading h1 { margin:7px 0; font-size:62px; line-height:1.05; }
.class-heading p { margin:8px 0; font-size:23px; color:#e5d5f6; }
.class-heading .lesson-kicker { font-size:18px; color:#3b3151; background:#d6ff9a; }
.class-intro { position:absolute; inset:25px 38px 18px; display:grid; grid-template-rows:145px 1fr 65px; gap:14px; }
.class-roster { display:grid; grid-template-columns:repeat(var(--roster-columns,4),minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:12px; min-height:0; }
.class-roster figure { margin:0; min-height:0; display:grid; grid-template-rows:minmax(0,1fr) 29px; border:1px solid #aa8dbe70; border-radius:18px; background:#221a36b3; padding:5px 8px 8px; }
.class-roster figcaption { text-align:center; font-size:22px; font-weight:800; }
.class-roster .small-creature { width:100%; height:100%; min-height:0; }
.class-roster .class-creature-image { padding:5px 18px; scale:1.12; transform-origin:50% 70%; }
.class-session .quiz-creature .class-monster { position:absolute; top:-16px; left:50%; transform:translateX(-50%); width:408px; height:338.4px; }
.class-current { position:absolute; left:8px; top:6px; display:grid; gap:14px; width:290px; }
.class-phase { font-size:19px; color:#d8c5f2; font-weight:800; }
.class-character-name { font-size:32px; }
.class-session .question-board { inset:auto 118px 0; padding-top:33px; min-height:128px; }
.class-session .question-board .prompt-text { font-size:57px; }
.class-session .battle-clocks { inset:66px 23% auto; }
.class-session .battle-countdown { width:190px; }
.class-session .countdown-ink { font-size:136px; }
.class-session .waiting .countdown-ink { font-size:20px; }
.class-session .ready .countdown-ink { font-size:66px; }
.food-lock { position:absolute; top:25px; right:16px; width:195px; text-align:center; display:grid; justify-items:center; gap:5px; color:#ffedb8; }
.food-lock svg { width:155px; height:136px; }
.food-lock > b { font-size:22px; }
.food-lock > strong { font-size:28px; }
.food-lock small { font-size:14px; color:#e6d8ed; }
.lock-meter { width:95%; height:13px; border-radius:20px; background:#20172d; border:1px solid #be9bdd; overflow:hidden; }
.lock-meter i { display:block; height:100%; background:#d6ff92; transition:width .4s; }
.lock-spark { display:none; }
.food-lock.unlocked .lock-seal { display:none; }
.food-lock.unlocked .lock-spark { display:block; }
.food-lock.unlocked > b { color:#daff94; }
.class-session .answer-card .answer-label { font-size:30px; }
.negation-icon { display:inline-grid; place-items:center; font-size:29px; width:31px; height:31px; border:2px solid currentColor; border-radius:50%; line-height:1; margin-right:7px; flex-shrink:0; }
.class-session .not-word { display:inline-flex; align-items:center; }
.class-session .food-tray { transition:opacity .18s; }
.class-session.picture-faded .food-tray { opacity:0; visibility:hidden; }
.class-session .answer-card.words-only .answer-label { font-size:38px; gap:0; }
.class-results { position:absolute; inset:25px 38px 18px; display:grid; grid-template-columns:minmax(0,1fr) 220px; grid-template-rows:130px 1fr 90px 62px; gap:13px 18px; }
.class-results .class-heading { grid-column:1/-1; }
.class-results .class-heading h1 { font-size:58px; }
.class-results .class-roster { grid-column:1; }
.class-results .class-roster figcaption { font-size:21px; }
.class-result-lock { position:relative; display:grid; place-items:center; }
.class-result-lock .food-lock { position:relative; inset:auto; width:210px; }
.class-result-lock svg { width:190px; height:180px; }
.class-review { grid-column:1/-1; display:flex; align-items:center; gap:15px; padding:6px 15px; background:#191227a6; border-radius:17px; }
.class-review > b { font-size:19px; margin-right:5px; }
.class-review-word { display:flex; gap:8px; align-items:center; padding:3px 9px; border-radius:12px; background:#fff3df; color:#30213e; border:2px solid #a496b4; font-size:21px; }
.class-review-word svg { width:58px; height:58px; }
.class-results > .activity-bar { grid-column:1/-1; }
.class-report { max-width:1350px; width:90%; }
.class-report p { font-size:18px; line-height:1.6; }
.class-report table { width:100%; border-collapse:collapse; font-size:19px; text-align:center; }
.class-report th, .class-report td { border-bottom:1px solid #796287; padding:13px 10px; }
.class-report th:first-child { text-align:left; }
.class-report small { display:block; font-size:13px; color:#d1bddc; margin-top:5px; max-width:230px; }
.fx-class-skill { position:absolute; top:112px; left:960px; max-width:570px; padding:11px 17px; background:#20192fe8; border:2px solid #d0b6ed; border-radius:18px; font-size:24px; color:#f7e6b7; }
.fx-class-shot { color:#e2c3ff; filter:drop-shadow(0 0 8px #b67dc777); }
.fx-class-shot svg { width:100%; height:100%; }
.fx-skill-impact svg { width:100%; height:100%; }
.fx-class-shot.skill-ray { width:var(--ray-length)!important; }
.skill-bite .bite-upper { animation:bite-close-upper .55s ease-out both; }
.skill-bite .bite-lower { animation:bite-close-lower .55s ease-out both; }
@keyframes bite-close-upper { 0% { transform:translateY(-12px); } 65%,100% { transform:translateY(5px); } }
@keyframes bite-close-lower { 0% { transform:translateY(12px); } 65%,100% { transform:translateY(-5px); } }
#game.reduced .bite-upper, #game.reduced .bite-lower { animation:none; }
.skill-honey, .skill-lightning, .skill-candy { color:#ffe58c; }
.skill-hearts { color:#ff9fcd; }
.skill-bubbles { color:#c9ef89; }
.skill-strawberry { color:#ff6f86; }
.skill-eye-beam, .skill-mouth-beam { color:#c1edff; width:180px!important; }
.skill-bite svg { fill:none; }
#game.reduced .class-creature-image { animation:none; }
#game.paused .class-creature-image { animation-play-state:paused; }
@media (prefers-reduced-motion: reduce) { .class-creature-image { animation:none!important; } .class-session .food-tray { transition:none; } }

/* Rana's hot steak: drifting steam, with the same pause and motion controls. */
.steak-steam { animation:steak-steam .9s ease-in-out infinite; transform-origin:50% 40%; }
@keyframes steak-steam { from { opacity:.9; transform:translateY(4px); } to { opacity:.15; transform:translate(3px,-10px); } }
#game.paused .steak-steam { animation-play-state:paused; }
#game.reduced .steak-steam { animation:none; opacity:.85; }
@media (prefers-reduced-motion:reduce) { .steak-steam { animation:none; } }

/* Golden power aura: local SVG and gentle motion, with no flashing layer. */
.power-aura { position:absolute; inset:-4% -9% 0; z-index:-1; pointer-events:none; background:radial-gradient(ellipse at 50% 65%,#ffe98375,#ffba2933 46%,transparent 73%); filter:drop-shadow(0 0 9px #ffce4c80); }
.aura-flames { width:100%; height:100%; overflow:visible; transform-origin:50% 96%; animation:aura-rise calc(1.7s / var(--speed,1)) ease-in-out infinite alternate; }
.aura-outer { fill:#ffc32e; opacity:.66; }
.aura-inner { fill:#fff19c; opacity:.72; }
.aura-streaks { fill:none; stroke:#fff9d1; stroke-width:4; stroke-linecap:round; opacity:.8; }
.aura-ember { position:absolute; left:var(--ember-x); bottom:8%; width:5px; height:23px; border-radius:80% 80% 45% 45%; background:#fff0a2; box-shadow:0 0 8px #ffc13c; animation:aura-ember-rise calc(2.7s / var(--speed,1)) linear infinite; animation-delay:var(--ember-delay); }
.aura-ground { position:absolute; inset:auto 12% 1%; height:9%; border:3px solid #ffe992a6; border-radius:50%; box-shadow:0 0 16px #ffc13c55; }
@keyframes aura-rise { from { transform:scale(.97,.96); } to { transform:scale(1.015,1.035); } }
@keyframes aura-ember-rise { 0% { transform:translate(0,0) scale(.5); opacity:0; } 15% { opacity:.8; } 75% { opacity:.7; } 100% { transform:translate(9px,-235px) scale(.2); opacity:0; } }
#game.paused .power-aura * { animation-play-state:paused; }
#game.reduced .power-aura * { animation:none; }
#game.reduced .power-aura { filter:none; }
#game.reduced .aura-ember { display:none; }
.boss-aura[data-mood="sleep"] .power-aura { opacity:.2; }
@media (prefers-reduced-motion:reduce) { .power-aura * { animation:none!important; } .power-aura { filter:none; } .aura-ember { display:none; } }

/* Once-per-battle awakening: shared cut-in, individual drawn motion and skills. */
.battle-power-label,.battle-guard-label,.battle-poison-label,.battle-honey-label { position:absolute; z-index:2; padding:7px 12px; border-radius:12px; font-size:23px; font-weight:900; background:#281c32e8; border:2px solid #ffcf73; color:#ffe6a1; }
.battle-power-label { left:0; top:179px; }
.battle-power-label small,.battle-poison-label small,.battle-honey-label small { display:block; font-size:16px; letter-spacing:.04em; }
.battle-guard-label { left:0; top:252px; border-color:#d6bdff; color:#eadbff; font-size:20px; }
.battle-honey-label { left:0; top:252px; font-size:20px; }
.battle-poison-label { right:0; top:113px; border-color:#b9ed83; color:#d3ff9e; }
.awakened .power-aura { filter:drop-shadow(0 0 14px #ff8c5988); }
.awakened .aura-outer { fill:#ffb12e; }
.awakened .aura-inner { fill:#ffe9a4; }
.dragon.awakened .aura-outer { fill:#ff7051; }
.fx-ultimate { position:absolute; inset:210px 50px 90px; color:#fff5d7; border:5px solid var(--ultimate-color); background:linear-gradient(115deg,#201126,#342036 55%,#4d2735); border-radius:30px; overflow:hidden; box-shadow:0 0 40px #110a1a,0 0 22px var(--ultimate-color); }
.fx-ultimate:before { content:''; position:absolute; inset:0; opacity:.14; background:repeating-linear-gradient(-25deg,transparent 0 35px,var(--ultimate-color) 36px 39px,transparent 40px 60px); }
.ultimate-copy { position:absolute; inset:0; text-align:center; font-weight:900; }
.ultimate-heading { position:absolute; top:16px; left:24px; right:24px; min-height:60px; display:flex; align-items:center; justify-content:center; gap:26px; }
.ultimate-copy strong { font-size:54px; line-height:1.05; color:#fff4cc; text-shadow:0 5px #503035; white-space:nowrap; }
.ultimate-copy b { font-size:28px; line-height:1.2; color:var(--ultimate-color); white-space:nowrap; }
.ultimate-outcome { position:absolute; left:24px; right:24px; bottom:16px; height:76px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; }
.ultimate-cutout { position:absolute; left:50%; translate:-50% 0; top:80px; width:410px; height:410px; object-fit:contain; filter:drop-shadow(0 12px 18px #110b21aa); }
.fx-ultimate-hud { z-index:100; }
.ultimate-active .quiz-creature { visibility:hidden; }
.fx-ultimate-shot { position:absolute; filter:drop-shadow(0 0 9px currentColor); }
.fx-ultimate-shot svg { width:100%; height:100%; }
.fx-recovery { color:#c8ff9a; text-shadow:0 7px #386440; }
.fx-poison-damage { color:#d2ff91; text-shadow:0 7px #435331; }
.fx-ultimate { z-index:2; }
.secret-boss .class-creature-image,.fx-ultimate.secret-boss .ultimate-cutout,.fx-mirror.secret-boss > img,.fx-mirror-double.secret-boss > img { filter:saturate(.38) brightness(.55) contrast(1.2) drop-shadow(0 0 2px #d9c6ff) drop-shadow(0 8px 10px #120a20aa); }
.dragon.secret-boss:not(.awakened) .dragon-halo { display:none; }
.ultimate-copy .ultimate-effect { font-size:32px; line-height:1.25; color:#f5ffe2; }
.ultimate-copy .ultimate-power { font-size:23px; line-height:1.3; color:#ffe59b; }
.fx-ultimate-shot { z-index:5; }
.fx-mirror,.fx-mirror-cracks,.fx-mirror-double { z-index:6; }
.fx-mirror, .fx-mirror-cracks, .fx-mirror-double { position:absolute; pointer-events:none; }
.fx-mirror > svg, .fx-mirror-cracks > svg { width:100%; height:100%; }
.fx-mirror > img { position:absolute; width:88%; height:88%; object-fit:contain; left:6%; top:6%; opacity:.42; transform:scaleX(-1); }
.fx-mirror-double > img { width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 0 13px #bd9af0); }
.fx-title.guard-title { color:#e9d4ff; font-size:75px; top:31%; }
#game.reduced .fx-ultimate { box-shadow:none; }
#game.reduced .ultimate-cutout { filter:none; }
#game.reduced .fx-ultimate.secret-boss .ultimate-cutout { filter:saturate(.38) brightness(.55) contrast(1.2); }

.primary.food-correct, .primary.food-wrong { min-width: 82px; font-size: 36px; line-height: 1; }
.primary.food-wrong { background: #ffc8c8; }

.food-lesson-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.primary.food-tool { min-height: 36px; font-size: 16px; padding: 0 12px; border-radius: 9px; box-shadow: 0 3px 0 #473943; }

/* Localized controls and dedicated Food mute toggle. */
.language-picker{max-width:125px;min-height:48px;padding:0 9px;color:#f5eaff;background:#30253e;border:1px solid #8b739f;border-radius:10px;font:inherit;font-size:16px;font-weight:700}
.primary.food-tool.food-mute{min-width:40px;padding:0 7px;font-size:18px;white-space:nowrap}
.food-mute[aria-pressed="true"]{background:#bcb0cb;border-color:#6b526f}
html:not([lang="ja"]) .hero-action-row{flex-wrap:wrap;gap:8px}
html:not([lang="ja"]) .hero-action-row .primary{font-size:18px;padding:0 12px;white-space:normal;max-width:275px}
html:not([lang="ja"]) .projection-button{font-size:17px;max-width:160px;white-space:normal}
html:not([lang="ja"]) .console-center{font-size:14px}


.teacher-guide-link a{color:#d7eb9f;font-weight:700;text-decoration:underline}

.challenge-button.locked:disabled { opacity:.68; cursor:not-allowed; border-color:#81718f; color:#ded1e6; background:#2b233b; }
.challenge-button.locked strong { display:flex; align-items:center; gap:7px; }
.challenge-button.locked small { color:#d9c9e6; }

/* Dedicated portrait stage. Logical 800px width uses the same uniform scale
   as landscape, but reflows all controls, preserving artwork proportions. */
#game.phone-portrait { width:800px;height:var(--portrait-height,1600px); }
.phone-portrait .masthead { inset:0 16px auto;height:182px;grid-template-columns:1fr auto;grid-template-rows:90px 82px;gap:4px 10px; }
.phone-portrait .brand {gap:9px;min-width:0}
.phone-portrait .brand img {width:66px;height:66px}
.phone-portrait .brand b {font-size:28px;white-space:normal}
.phone-portrait .brand small {font-size:22px;letter-spacing:0}
.phone-portrait .display-actions {grid-row:1;grid-column:2;gap:8px}
.phone-portrait .language-picker {max-width:190px;min-height:68px;font-size:28px}
.phone-portrait .projection-button {display:none}
.phone-portrait #fullscreen {width:68px;height:68px;font-size:36px}
.phone-portrait .masthead nav {grid-row:2;grid-column:1/-1;gap:7px}
.phone-portrait .stage-button {height:78px;font-size:27px;gap:3px;flex-direction:column;border-radius:13px}
.phone-portrait .stage-button span {width:30px;height:30px;font-size:23px}
.phone-portrait #field {inset:184px 12px 183px;border-radius:22px}
.phone-portrait .console {inset:auto 12px 6px;height:165px;grid-template-columns:1fr;grid-template-rows:75px 75px;gap:8px}
.phone-portrait .console-center {display:none}
.phone-portrait .console-tools,.phone-portrait .console-actions {display:grid;gap:8px;align-self:stretch}
.phone-portrait .console-tools {grid-template-columns:1fr 1fr}
.phone-portrait .console-actions {grid-template-columns:repeat(4,minmax(0,1fr))}
.phone-portrait .console button {padding:4px 7px;font-size:26px;white-space:normal;min-width:0;line-height:1.15;justify-content:center}
.phone-portrait .console kbd,.phone-portrait .activity-actions kbd {display:none}
.phone-portrait .teacher-icon {width:30px;height:30px;flex-shrink:0}
.phone-portrait .orbit {width:690px;height:690px;top:0}
.phone-portrait .hero-flag {top:16px;left:14px}
.phone-portrait .scene-tag {font-size:23px;padding:7px 12px}
.phone-portrait .hero-grid {inset:68px 17px 18px;display:flex;flex-direction:column;gap:12px}
.phone-portrait .hero-creature {position:relative;inset:auto;flex:1;min-height:100px}
.phone-portrait .hero-creature .monster,.phone-portrait .hero-creature .class-monster {top:0;bottom:44px;width:min(100%,650px);height:calc(100% - 44px);left:50%;transform:translateX(-50%);translate:none;aspect-ratio:auto}
.phone-portrait .hero-creature .dragon-image {object-fit:contain}
.phone-portrait .hero-monster-name {top:auto;bottom:0;text-align:center;font-size:31px;max-width:95%;white-space:normal}
.phone-portrait .lesson-board {position:relative;inset:auto;translate:none;width:100%;min-height:0;padding:18px;gap:12px;grid-template-columns:minmax(0,1fr);flex-shrink:0}
.phone-portrait .lesson-copy {gap:8px;justify-items:center;text-align:center}
.phone-portrait .lesson-kicker,.phone-portrait .board-step {font-size:26px}
.phone-portrait .lesson-line,.phone-portrait .food-words-only .lesson-line {font-size:76px;overflow-wrap:anywhere;text-align:center}
.phone-portrait .lesson-board .greeting-line,.phone-portrait .lesson-line.mid {font-size:55px}
.phone-portrait .lesson-line.long,.phone-portrait .sentence-board .lesson-line.mid {font-size:46px}
.phone-portrait .lesson-line.end-win,.phone-portrait .lesson-line.end-lose {font-size:63px}
.phone-portrait .lesson-sub {font-size:32px}
.phone-portrait .lesson-controls {padding:0;justify-items:stretch;gap:10px}
.phone-portrait .hero-action-row,html:not([lang="ja"]) .phone-portrait .hero-action-row {justify-content:center;flex-wrap:wrap;gap:10px}
.phone-portrait .primary,.phone-portrait .sound-button,html:not([lang="ja"]) .phone-portrait .hero-action-row .primary {min-height:80px;font-size:31px;max-width:none;white-space:normal;padding:8px 16px}
.phone-portrait .sound-button {width:80px;padding:0}
.phone-portrait .sound-button svg {width:40px;height:40px}
.phone-portrait .board-step {text-align:center}
.phone-portrait .specimen-board {grid-template-columns:190px minmax(0,1fr)}
.phone-portrait .specimen-board.food-words-only {grid-template-columns:1fr}
.phone-portrait .specimen-board .lesson-controls,.phone-portrait .sentence-board .lesson-controls {grid-column:1/-1}
.phone-portrait .specimen-board .single-food {width:190px;height:170px}
.phone-portrait .single-food .food-art {width:158px;height:155px}
.phone-portrait .specimen-board .lesson-line {font-size:52px}
.phone-portrait .food-lesson-tools {order:-1;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.phone-portrait .primary.food-tool {min-height:72px;font-size:27px;padding:6px 12px}
.phone-portrait .primary.food-mute {min-width:78px;font-size:33px}
.phone-portrait .primary.food-correct,.phone-portrait .primary.food-wrong {min-width:120px;font-size:47px}
.phone-portrait .sentence-board .lesson-foods {justify-content:center}
.phone-portrait .lesson-foods .food-medal {width:102px;height:98px}
.phone-portrait .lesson-count-picker {font-size:26px;justify-content:center}
.phone-portrait .lesson-count-picker select {font-size:28px;min-height:62px}
.phone-portrait .challenge-picker {position:relative;inset:auto;width:100%;padding:10px;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex-shrink:0}
.phone-portrait .challenge-picker h2,.phone-portrait .mode-picker {grid-column:1/-1;margin:0}
.phone-portrait .challenge-picker h2 {font-size:23px}
.phone-portrait .mode-button {font-size:28px;min-height:64px;padding:4px}
.phone-portrait .challenge-button {padding:8px;min-width:0;min-height:115px}
.phone-portrait .challenge-button strong {font-size:27px;line-height:1.13;overflow-wrap:anywhere}
.phone-portrait .challenge-button small {font-size:21px;line-height:1.17;overflow-wrap:anywhere}
.phone-portrait .battle-cast-shortcut {position:relative;inset:auto;width:100%}
.phone-portrait .battle-cast-link {margin:0;min-height:56px;font-size:25px;white-space:normal}
.phone-portrait .hero-grid:has(.challenge-picker) .lesson-board {padding:12px;gap:8px}
.phone-portrait .hero-grid:has(.challenge-picker) .lesson-line {font-size:40px}
.phone-portrait .farewell {justify-content:center;flex-wrap:wrap}
.phone-portrait .farewell button {min-height:64px;font-size:27px}
.phone-portrait .quiz-contents {inset:12px 14px;grid-template-rows:minmax(0,1fr) minmax(320px,36%) auto;gap:10px}
.phone-portrait .hud {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.phone-portrait .hp-card {padding:9px}
.phone-portrait .hp-heading {gap:6px}
.phone-portrait .hp-heading strong {font-size:23px}
.phone-portrait .hp-icon {width:30px;height:30px;font-size:20px}
.phone-portrait .hp-numbers {font-size:35px}
.phone-portrait .hp-numbers small {font-size:22px}
.phone-portrait .hp-track {height:16px}
.phone-portrait .question-top {display:flex;flex-direction:column;gap:6px}
.phone-portrait .quiz-creature {position:relative;inset:auto;flex:1;min-height:90px}
.phone-portrait .has-hud .quiz-creature {margin-top:90px}
.phone-portrait .quiz-creature .monster,.phone-portrait .quiz-creature .class-monster {top:0;left:50%;transform:translateX(-50%);translate:none;width:90%;height:100%;aspect-ratio:auto}
.phone-portrait .quiz-creature .dragon-image {object-fit:contain}
.phone-portrait .quiz-creature .scene-tag,.phone-portrait .has-hud .quiz-creature .scene-tag {top:0;font-size:20px}
.phone-portrait .quiz-monster-name,.phone-portrait .has-hud .quiz-monster-name {top:auto;bottom:calc(100% - 150px);left:8px;max-width:235px;font-size:23px;pointer-events:none}
.phone-portrait .lesson-quiz-setup {top:0;right:0;z-index:2}
.phone-portrait .question-board {position:relative;inset:auto;min-height:122px;padding:48px 64px 16px 16px;flex-shrink:0}
.phone-portrait .question-board .prompt-text {font-size:47px}
.phone-portrait .question-board .prompt-text.question-medium {font-size:41px}
.phone-portrait .question-board .prompt-text.question-long,.phone-portrait .question-board .prompt-text.question-dual {font-size:33px}
.phone-portrait .question-topline {font-size:24px;gap:6px}
.phone-portrait .question-meta.hint > span {font-size:22px;position:relative;inset:auto;grid-row:2;text-align:center}
.phone-portrait .question-meta .prompt-audio {width:60px;height:60px;bottom:10px;right:8px}
.phone-portrait .prompt-audio svg {width:32px;height:32px}
.phone-portrait .listening-prompt {gap:12px;flex-wrap:wrap}
.phone-portrait .listening-prompt h1 {font-size:51px}
.phone-portrait .listen-button {font-size:26px;min-height:64px}
.phone-portrait .choices {grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:12px}
.phone-portrait .answer-card {grid-template-rows:minmax(0,1fr) auto;padding:5px 10px 10px;border-radius:17px}
.phone-portrait .answer-card.words-only {grid-template-rows:1fr;padding:40px 10px 10px}
.phone-portrait .choice-letter {width:50px;height:48px;font-size:34px;left:9px;top:9px}
.phone-portrait .food-tray {height:100%;padding-left:16px}
.phone-portrait .food-tray .food-art {width:125px;height:100%;max-height:126px;max-width:92%}
.phone-portrait .food-tray.pair .food-art {width:93px;max-width:40%}
.phone-portrait .answer-label,.phone-portrait .answer-card.words-only .answer-label {white-space:normal;font-size:33px;overflow-wrap:anywhere}
.phone-portrait .answer-card.multi .answer-label,.phone-portrait .answer-card.words-only.multi .answer-label {font-size:26px}
.phone-portrait .answer-card.words-only.triple .answer-label {font-size:25px}
.phone-portrait .answer-state {font-size:23px}
.phone-portrait .activity-bar {flex-wrap:wrap;justify-content:center;text-align:center;gap:8px}
.phone-portrait .activity-label {font-size:28px}
.phone-portrait .activity-label small {font-size:23px}
.phone-portrait .activity-actions {flex-wrap:wrap;justify-content:center;flex-shrink:1}
.phone-portrait .activity-actions .primary,.phone-portrait .activity-actions .secondary {min-height:65px;font-size:24px;padding:5px 12px;white-space:normal}
.phone-portrait .count-button {width:66px;height:66px}
.phone-portrait .round-preview {font-size:22px;white-space:normal}
.phone-portrait .battle-clocks {inset:92px 0 auto}
.phone-portrait .battle-countdown {width:145px;height:120px}
.phone-portrait .countdown-ink {font-size:85px}
.phone-portrait .battle-power-label,.phone-portrait .battle-guard-label,.phone-portrait .battle-honey-label,.phone-portrait .battle-poison-label {font-size:24px;padding:4px 9px}
.phone-portrait .battle-power-label {top:100px}
.phone-portrait .battle-guard-label,.phone-portrait .battle-honey-label {top:174px}
.phone-portrait .battle-poison-label {top:100px}
.phone-portrait .dialog,.phone-portrait .dialog.compact {width:calc(100% - 32px);max-height:calc(var(--portrait-height) - 80px);overflow:auto;padding:20px;gap:15px}
.phone-portrait .dialog h2 {font-size:44px}
.phone-portrait .dialog h3,.phone-portrait .dialog p,.phone-portrait .settings-grid label,.phone-portrait #settings .settings-grid label {font-size:28px}
.phone-portrait .dialog-close {width:65px;height:65px;font-size:40px;flex-shrink:0}
.phone-portrait .dialog .secondary,.phone-portrait .dialog .primary {min-height:68px;font-size:27px;white-space:normal}
.phone-portrait .settings-grid,.phone-portrait #settings .settings-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 12px}
.phone-portrait .settings-grid select,.phone-portrait .settings-grid input[type="number"] {font-size:27px;height:60px;max-width:180px}
.phone-portrait .settings-grid input[type="checkbox"],.phone-portrait .battle-monster-checks input {width:38px;height:38px}
.phone-portrait .battle-monster-checks {grid-template-columns:repeat(2,minmax(0,1fr))}
.phone-portrait .battle-monster-checks label {grid-template-columns:40px 65px minmax(0,1fr);font-size:25px;gap:7px}
.phone-portrait .toast {max-width:94%;width:max-content;bottom:180px;font-size:27px}
.phone-portrait .fx-title {font-size:86px;white-space:normal}
.phone-portrait .fx-title.flame-title,.phone-portrait .fx-title.guard-title {font-size:65px}
.phone-portrait .fx-ultimate {inset:280px 18px 230px}
.phone-portrait .ultimate-heading {height:auto;top:20px}
.phone-portrait .ultimate-copy strong {font-size:43px;white-space:normal}
.phone-portrait .ultimate-cutout {top:90px;width:90%;height:calc(100% - 250px)}
.phone-portrait .ultimate-outcome {height:130px}
.phone-portrait .fx-class-skill,.phone-portrait .fx-class-skill.practice-skill {left:12px;right:12px;top:186px;max-width:none;font-size:30px;text-align:center}
.phone-portrait .fx-ultimate-hud {grid-template-columns:repeat(2,minmax(0,1fr))}

.phone-portrait .console-actions.no-primary {grid-template-columns:repeat(3,minmax(0,1fr))}

.phone-portrait .console-actions.no-audio {grid-template-columns:repeat(3,minmax(0,1fr))}
.phone-portrait .console-actions.no-primary.no-audio {grid-template-columns:repeat(2,minmax(0,1fr))}

/* Portrait battle header: badge and name share a dedicated row, never overlap. */
.phone-portrait .has-hud .quiz-creature .scene-tag {top:0;left:0;max-width:44%;white-space:normal}
.phone-portrait .has-hud .quiz-monster-name {top:90px;bottom:auto;left:auto;right:0;max-width:52%;text-align:right;line-height:1.15;overflow-wrap:anywhere;padding:5px 8px;background:#261a36df;border-radius:10px;z-index:2}
.phone-portrait .has-hud .battle-clocks {top:151px}
.phone-portrait .has-hud .battle-power-label,.phone-portrait .has-hud .battle-poison-label {top:151px}
.phone-portrait .has-hud .battle-guard-label,.phone-portrait .has-hud .battle-honey-label {top:225px}

/* Teacher form has an ID-width override on landscape. Explicitly reset it
   in portrait so the entire modal fits inside the 800-unit game canvas. */
.phone-portrait #settings {
  width:calc(100% - 32px);
  max-width:calc(100% - 32px);
  max-height:calc(var(--portrait-height) - 80px);
  min-width:0;
  grid-template-columns:minmax(0,1fr);
  padding:20px;
  gap:15px;
  overflow-y:auto;
  overflow-x:hidden;
}
.phone-portrait #settings > *,
.phone-portrait #settings .settings-group,
.phone-portrait #settings .food-groups > section,
.phone-portrait #settings .voice-settings label,
.phone-portrait #settings .dialog-head h2 {min-width:0;max-width:100%;overflow-wrap:anywhere}
.phone-portrait #settings .settings-grid {grid-template-columns:minmax(0,1fr);gap:8px 0}
.phone-portrait #settings .settings-grid label {grid-template-columns:minmax(0,1fr) auto;min-height:65px;overflow-wrap:anywhere}
.phone-portrait #settings .settings-grid select {max-width:260px}
.phone-portrait #settings .voice-settings,.phone-portrait #settings .food-settings-head {flex-wrap:wrap}
.phone-portrait #settings .voice-settings label {flex-wrap:wrap}
.phone-portrait #settings .voice-settings select {width:100%;max-width:100%;height:60px}
.phone-portrait #settings .food-checks label {max-width:100%;overflow-wrap:anywhere}
.phone-portrait #settings .food-checks label input {flex-shrink:0}
.phone-portrait #settings .dialog-actions {bottom:-20px;margin:0 -8px -8px;padding:12px 8px}
.game-guide-link {display:inline-flex;align-items:center;justify-content:center;min-height:34px;font-size:16px;color:#5b416e;text-decoration:underline;font-weight:800;align-self:center}
.dialog .game-guide-link {color:#d7eb9f}
.phone-portrait .game-guide-link {font-size:26px;min-height:54px}
.monster-search-label {display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-weight:700}
.monster-search-label input {flex:1;min-width:0;max-width:100%;padding:10px;border-radius:8px;color:#fff;background:#20162e;border:1px solid #917bb2}
.phone-portrait .monster-search-label {font-size:26px}
.battle-monster-checks label[hidden]{display:none}
.front-guide-button {position:absolute;top:24px;right:28px;z-index:4;max-width:340px}
.game-guide-link {display:inline-flex;align-items:center;justify-content:center;text-align:center;min-height:50px;padding:9px 15px;color:#261c39;background:#e8d2ff;border:2px solid #6b4d95;border-radius:13px;box-shadow:0 4px #322044;text-decoration:none;font-size:18px;font-weight:800;white-space:normal}
.dialog .game-guide-link {color:#261c39;background:#e8d2ff;width:100%}
.phone-portrait .front-guide-button {top:-51px;right:0;max-width:49%}
.phone-portrait .game-guide-link {font-size:24px;min-height:48px;padding:7px 12px}
.settings-guide-bottom {padding-top:10px;border-top:1px solid #715c8b}
#guide-frame {position:fixed;inset:0;width:100%;height:100%;height:100dvh;border:0;z-index:10000;background:#191326}

/* Persistent guide replaces the visible pause control, in all stages. */
.console .console-guide {background:#e8d2ff;color:#261c39;border-color:#9a75cb;white-space:normal;max-width:200px;line-height:1.15;padding:5px 12px;overflow-wrap:anywhere}
.phone-portrait .console .console-guide {max-width:none;padding:4px 7px}

.front-guide-button {display:flex;flex-direction:column;gap:7px}.settings-guide-bottom {display:grid;gap:8px}.phone-portrait .front-guide-button {top:-51px;right:0;max-width:49%}.phone-portrait .front-guide-button .game-guide-link{font-size:20px;min-height:40px}
.word-category { border:1px solid #8275a2; border-radius:8px; padding:8px; margin:6px 0; }
.word-category summary { cursor:pointer; font-weight:bold; }
.word-category [hidden],.word-category[hidden]{display:none!important}
.extended-word { display:grid; place-items:center; font-size:clamp(22px,5cqw,60px); overflow-wrap:anywhere; text-align:center; }
.curriculum-choice .answer-label { white-space:normal; line-height:1.2; font-size:clamp(18px,2.7cqw,38px); }
.curriculum-box { max-height:110px; max-width:150px; object-fit:contain; }
.curriculum-visual { font-size:32px; line-height:1; }
.curriculum-color{background:var(--swatch);width:70px;height:50px;border:2px solid #666;border-radius:8px;margin:auto;}
.curriculum-position{display:flex;align-items:center;justify-content:center;gap:5px;font-size:36px;}
.curriculum-position.on{flex-direction:column;gap:0;}
.curriculum-position.under{flex-direction:column-reverse;gap:0;}
.curriculum-passage {font-size:clamp(18px,2.5cqw,32px);line-height:1.3;max-width:95%;margin:auto;text-align:left;}
.curriculum-settings {border:2px solid #c8a6ff; padding:14px;border-radius:12px}
.curriculum-settings>select{width:100%;margin-bottom:10px}
.curriculum-apply{width:100%;margin-top:12px}
.curriculum-shortcut{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.category-summary,.word-mode-fixed{font-size:16px;line-height:1.5}
.phone-portrait .console-tools{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) minmax(0,.75fr);grid-template-rows:75px;min-width:0}

.phone-portrait .console-tools>button,.phone-portrait .console-actions>button{min-width:0;max-width:100%;height:75px;box-sizing:border-box;overflow:hidden}
.phone-portrait .console-actions{grid-template-rows:75px;min-width:0}

.hero-curriculum{position:absolute;top:24px;right:28px;z-index:5;max-width:45%;min-height:42px;font-size:22px;white-space:normal;line-height:1.1;padding:8px 15px;background:#332649;border:1px solid #b99ce0}
.phone-portrait .hero-curriculum{top:16px;right:14px;max-width:53%;font-size:23px;min-height:48px;padding:8px 12px}
.quiz-curriculum{font-size:18px;min-height:32px;line-height:1.15;max-width:52%;white-space:normal;overflow:hidden;padding:4px 8px}
.phone-portrait .quiz-curriculum{font-size:20px;min-height:36px;max-width:50%}

.phone-portrait .footer-curriculum{grid-column:auto;grid-row:auto;max-width:none;width:100%;min-width:0;overflow:hidden;font-size:23px;line-height:1.1}

.box-choice-icon{font-size:clamp(29px,5cqw,60px);line-height:1.1;display:block;margin:auto;}
.cup-icon{width:54px;height:54px;flex-shrink:0;filter:drop-shadow(0 3px 4px #0004)}
.cup-icon.rank-0{opacity:.5}
.cup-award{display:flex;align-items:center;justify-content:center;gap:10px;background:linear-gradient(135deg,#3d2c54,#67517d);color:#fff;border:2px solid #e9cf90;border-radius:14px;padding:6px 16px;margin:5px auto;max-width:360px}
.cup-award .cup-icon{width:76px;height:76px;animation:cup-pop .55s ease-out both}
.cup-award strong,.cup-award small{display:block}.cup-award strong{font-size:25px}.cup-award small{font-size:16px}
@keyframes cup-pop{from{transform:scale(.7);opacity:.4}to{transform:scale(1);opacity:1}}
.trophy-link{color:#f7e6a4!important}
.trophy-dialog{width:1000px;max-height:90%;overflow:auto;box-sizing:border-box}
.cup-totals{display:flex;justify-content:center;gap:18px;flex-wrap:wrap}
.cup-total{display:flex;align-items:center;gap:6px}
.cup-collection{border:1px solid #8c77aa;border-radius:12px;overflow:hidden}
.cup-row{display:grid;grid-template-columns:minmax(0,1.5fr) repeat(3,minmax(0,1fr));gap:6px;align-items:center;text-align:center;padding:7px;border-bottom:1px solid #645175}
.cup-row:last-child{border:0}.cup-head{background:#47315e}.cup-monster{display:flex;align-items:center;gap:8px;min-width:0;text-align:left}
.cup-monster img{width:56px;height:56px;object-fit:contain;flex-shrink:0}.cup-monster b{overflow-wrap:anywhere}
.cup-slot{display:flex;flex-direction:column;align-items:center;font-size:14px}.cup-slot small{white-space:normal}
.phone-portrait .trophy-dialog{width:calc(100% - 32px);max-width:calc(100% - 32px);padding:16px;overflow:auto}
.phone-portrait .cup-row{font-size:22px;gap:3px;padding:8px 3px}.phone-portrait .cup-slot small{font-size:19px}
.phone-portrait .cup-monster img{width:55px;height:55px}.phone-portrait .cup-award .cup-icon{width:68px;height:68px}
.phone-portrait .cup-award strong{font-size:29px}.phone-portrait .cup-award small{font-size:22px}
@media(prefers-reduced-motion:reduce){.cup-award .cup-icon{animation:none}}
.battle-cast-shortcut{top:86px;display:grid;gap:6px}
.phone-portrait .battle-cast-shortcut{top:auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.55fr);gap:5px}
.phone-portrait .battle-cast-shortcut>[data-action="battle-monster-settings"]{grid-column:1/-1}
.phone-portrait .battle-cast-shortcut>button{min-width:0;white-space:normal}
.hello-curriculum-choice{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;color:#59456b;font-size:16px;font-weight:800}
.hello-curriculum-choice .secondary{min-height:39px;font-size:17px}
.phone-portrait .hello-curriculum-choice{font-size:23px;gap:7px}.phone-portrait .hello-curriculum-choice .secondary{font-size:25px;min-height:48px}
.fixed-word-preview{font-size:18px;line-height:1.6;overflow-wrap:anywhere}
.word-count-shortcut{width:100%;min-height:40px;font-size:17px;white-space:normal}
.phone-portrait .word-count-shortcut{min-height:48px;font-size:23px}
.word-count-presets{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:9px 0}
.word-count-presets .secondary{min-height:36px;padding:4px 10px}
/* Word count button lives in the light speech board, but uses a dark fill. */
.lesson-board .lesson-controls .word-count-shortcut{background:#38274d;color:#fff!important;border:2px solid #795eaa;box-shadow:0 3px 0 #1f172b;font-weight:800}
.lesson-board .lesson-controls .word-count-shortcut:focus-visible{outline:3px solid #9575cd;outline-offset:3px}

/* A single Hello host introduces the selected grammar, inside the speech card. */
.mini-lesson-board{grid-template-columns:minmax(0,1fr) auto;max-height:490px;align-items:start}
.mini-lesson-board .lesson-copy{width:100%;gap:10px}
.mini-lesson-board .lesson-controls{align-self:end;gap:10px}
.mini-title{font-size:34px;margin:0;color:#342843;font-weight:900}
.mini-tip{font-size:27px;font-weight:750;line-height:1.35;color:#342843}
.mini-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;width:100%;max-height:275px;overflow-y:auto;padding:4px 4px 8px;overscroll-behavior:contain}
.mini-mode{border:2px solid #715c91;border-radius:12px;padding:10px;color:#2c2140;background:#f1e9ff;font-size:23px;font-weight:800;text-align:center;line-height:1.15;min-height:48px}
.mini-mode.current{background:#d9ff70;border-color:#55405f}
.mini-mode.mini-right{background:#b2eb99;border-color:#42803b}
.mini-mode.mini-wrong{background:#ffd1d7;border-color:#a84a58}
.mini-example{width:100%;padding:10px 14px;border-radius:14px;background:#e9defb;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px;color:#342843}
.mini-example b{font-size:31px;line-height:1.2}
.mini-example>span{grid-column:1/-1;font-size:26px;font-weight:750}
.mini-example .mini-audio{width:48px;height:48px;background:#fff;border-radius:10px;color:#38274d;border:2px solid #7960a0}
.mini-example .mini-audio svg{width:30px}
.mini-secondary{background:#47345d;color:#fff;border-color:#725994;font-size:20px;white-space:normal}
.mini-quiz{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
.mini-feedback{font-size:26px;color:#43803b}
.mini-feedback.wrong{color:#b04455}
.phone-portrait .mini-lesson-board{max-height:none;gap:12px}
.phone-portrait .mini-title{font-size:35px}
.phone-portrait .mini-tip{font-size:29px;text-align:left}
.phone-portrait .mini-choices{grid-template-columns:repeat(2,minmax(0,1fr));max-height:500px;gap:12px}
.phone-portrait .mini-mode{min-height:67px;font-size:28px}
.phone-portrait .mini-example b{font-size:33px}
.phone-portrait .mini-example>span{font-size:27px}
.phone-portrait .mini-secondary{font-size:25px;min-height:55px}
.phone-portrait .mini-lesson-board .lesson-controls{display:flex;flex-wrap:wrap;justify-content:center}
.mini-example .mini-visual{font-size:40px;line-height:1.15;text-align:center}
.mini-choose .lesson-controls{align-self:end}
.mini-choose .lesson-copy{min-height:0}
#field[data-stage="1"] .front-guide-button{top:82px;right:28px;max-width:310px}
.phone-portrait #field[data-stage="1"] .front-guide-button{top:13px;right:0;max-width:49%}
#field[data-stage="1"] .hero-creature .class-monster{top:-5px}
.phone-portrait #field[data-stage="1"] .hero-creature .class-monster{top:24px;height:calc(100% - 68px)}
.mini-mode b,.mini-mode small{display:block}
.mini-mode small{font-size:.72em;line-height:1.22;margin-top:5px;color:#59486b;font-weight:750;overflow-wrap:anywhere}
.mini-choices{max-height:330px}
.phone-portrait .mini-choices{max-height:520px}
/* Keep each two-line grammar tile at its natural height; scroll the list only. */
.mini-choose{grid-template-columns:minmax(0,1fr);gap:13px;padding:19px 26px;max-height:490px}
.mini-choose .lesson-copy{min-width:0;width:100%}
.mini-choose .lesson-controls{padding:0;justify-items:end}
.mini-choose .mini-choices{grid-auto-rows:max-content;align-content:start;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;max-height:325px;padding:6px 10px 14px 6px;overflow-y:auto}
.mini-choose .mini-mode{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;box-sizing:border-box;min-height:94px;height:auto;padding:14px 12px;line-height:1.25;white-space:normal;overflow:visible;text-align:center}
.mini-choose .mini-mode b{font-size:26px;font-weight:850;line-height:1.25;overflow-wrap:anywhere}
.mini-choose .mini-mode small{font-size:21px;line-height:1.35;margin:0;font-weight:750;overflow-wrap:anywhere;white-space:normal;color:#59486b}
.phone-portrait .mini-choose{padding:18px;gap:12px;max-height:none}
.phone-portrait .mini-choose .mini-choices{grid-template-columns:repeat(2,minmax(0,1fr));max-height:520px;gap:15px}
.phone-portrait .mini-choose .mini-mode{min-height:116px;padding:15px 12px}
.phone-portrait .mini-choose .mini-mode b{font-size:30px}
.phone-portrait .mini-choose .mini-mode small{font-size:24px}
.mini-example .mini-meaning{grid-column:1/-1;font-size:25px;line-height:1.3;font-weight:750;color:#49385d}
.phone-portrait .mini-example .mini-meaning{font-size:28px}
.mini-quiz .mini-mode{min-height:74px;line-height:1.3;font-size:25px;white-space:normal}
.phone-portrait .mini-quiz .mini-mode{min-height:98px;font-size:29px}

/* Alphabet glyphs: distinguish uppercase I from lowercase l. */
.alphabet-board .lesson-line,.answer-card.alphabet-choice .answer-label {font-family:"Courier New",Courier,monospace;font-variant-ligatures:none;font-weight:700;}
.answer-card.alphabet-choice .answer-label{font-size:55px;line-height:1.12;}
.phone-portrait .answer-card.alphabet-choice .answer-label{font-size:50px;}

/* The learning topic is the primary teacher setting. */
#settings .curriculum-settings{border:3px solid #e7c979;background:linear-gradient(145deg,#453263,#342343);padding:18px;border-radius:16px;}
#settings .curriculum-heading{color:#ffe29b;font-size:26px;font-weight:900;margin:0 0 12px;letter-spacing:.02em}
#settings .curriculum-mode-select{display:block;width:100%;min-height:65px;padding:12px 45px 12px 15px;background:#fff2c8;color:#38254e;border:3px solid #f1c85e;border-radius:12px;font-size:25px;font-weight:800;box-shadow:0 3px 12px #1d122d50;cursor:pointer;}
#settings .curriculum-mode-select option{background:#fff;color:#38254e;}
.phone-portrait #settings .curriculum-heading{font-size:29px;}
.phone-portrait #settings .curriculum-mode-select{min-height:72px;font-size:28px;}

/* Practice shares the same upper-right curriculum selector as the lesson stages. */
.quiz-contents .practice-curriculum{top:6px;right:4px}
.phone-portrait .quiz-contents .practice-curriculum{top:4px;right:0}
.question-topline .lesson-count-picker{font-size:15px;gap:6px;white-space:nowrap}
.question-topline .lesson-count-picker select{font-size:15px;min-width:0;padding:3px 6px}
.question-topline .lesson-count-picker + .round-label{margin-left:auto;white-space:nowrap}
.phone-portrait .question-topline .lesson-count-picker{font-size:19px;gap:7px}
.phone-portrait .question-topline .lesson-count-picker select{font-size:20px;min-height:32px}

/* Two distinct conversational speakers, with independent speech highlighting. */
.hero-creature.speak-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:76px 100px 224px;gap:60px}
.speak-actor{position:relative;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}
.hero-creature.speak-pair .speak-actor .class-monster{position:absolute;top:0;left:50%;width:100%;height:calc(100% - 40px);transform:translateX(-50%);margin:0}
.speak-actor-name{font-size:25px;padding:5px 14px;border-radius:18px;background:#251d39e0;max-width:100%;text-align:center;z-index:1}
.speak-actor.active-speaker .speak-actor-name{background:#7950ae;box-shadow:0 0 15px #f0d7ff}
.speak-actor.active-speaker .class-creature-image{animation:speak-actor-bob .5s ease-in-out infinite alternate}
@keyframes speak-actor-bob{from{transform:translateY(0)}to{transform:translateY(-5px)}}
.dialogue-board .lesson-copy{width:100%;gap:8px}
.speak-dialogue-line{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 12px;border:2px solid transparent;border-radius:14px;background:#f2e9fb}
.speak-dialogue-line[data-speaker="1"]{background:#e4f2ed}
.speak-dialogue-line strong{font-size:18px;color:#65467f}
.speak-dialogue-line span{font-size:36px;font-weight:850;line-height:1.1;color:#30243d}
.speak-dialogue-line.active-speaker{border-color:#8c59bc;box-shadow:0 0 10px #a36fd555}
.speak-dialogue-line[data-speaker="1"].active-speaker{border-color:#438969;box-shadow:0 0 10px #43896955}
.phone-portrait .hero-creature.speak-pair{padding:0;gap:8px;min-height:120px}
.phone-portrait .hero-creature.speak-pair .speak-actor .class-monster{width:100%;height:calc(100% - 38px);top:0}
.phone-portrait .speak-actor-name{font-size:23px}
.phone-portrait .dialogue-board .speak-dialogue-line{padding:7px 12px;gap:5px;flex-direction:column;align-items:flex-start}
.phone-portrait .speak-dialogue-line strong{font-size:20px}
.phone-portrait .speak-dialogue-line span{font-size:36px}

/* Conversation: two independent speech bubbles, each aligned under its speaker. */
.hero-grid.dialogue-hero-grid{inset:70px 60px 22px;display:flex;flex-direction:column;gap:20px}
.dialogue-hero-grid .hero-creature.speak-pair{position:relative;inset:auto;flex:1;min-height:0;padding:0;gap:28px}
.dialogue-hero-grid .lesson-board.dialogue-board{position:relative;inset:auto;translate:none;width:100%;min-height:0;padding:0;gap:12px;grid-template-columns:minmax(0,1fr);flex-shrink:0;background:transparent;border:0;box-shadow:none}
.dialogue-board:before{display:none}
.dialogue-hero-grid .dialogue-board .lesson-copy{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;align-items:stretch}
.dialogue-board .speak-dialogue-line{position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:4px;padding:12px 18px;border:2px solid #8064a0;background:#f8f0ff;border-radius:22px;box-shadow:0 5px 0 #2d203d}
.dialogue-board .speak-dialogue-line[data-speaker="1"]{border-color:#56856c;background:#edfaf0}
.dialogue-board .speak-dialogue-line:before{content:"";position:absolute;top:-13px;left:calc(50% - 12px);width:24px;height:24px;transform:rotate(45deg);background:inherit;border-top:2px solid;border-left:2px solid;border-color:inherit;border-radius:4px 0 0}
.dialogue-board .speak-dialogue-line strong,.dialogue-board .speak-dialogue-line span{position:relative}
.dialogue-board .speak-dialogue-line span{font-size:34px;overflow-wrap:anywhere}
.dialogue-board .speak-dialogue-line.active-speaker{border-color:#b081f1;box-shadow:0 0 0 3px #d9b6ff,0 0 22px #b081f1}
.dialogue-board .speak-dialogue-line[data-speaker="1"].active-speaker{border-color:#55be85;box-shadow:0 0 0 3px #abefc0,0 0 22px #55be85}
.dialogue-hero-grid .dialogue-board .lesson-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 14px;background:var(--paper);border-radius:18px;color:var(--ink)}
.phone-portrait .hero-grid.dialogue-hero-grid{inset:68px 17px 18px;gap:16px}
.phone-portrait .dialogue-hero-grid .hero-creature.speak-pair,.phone-portrait .dialogue-hero-grid .dialogue-board .lesson-copy{gap:10px}
.phone-portrait .dialogue-board .speak-dialogue-line{padding:10px 8px;min-height:104px}
.phone-portrait .dialogue-board .speak-dialogue-line span{font-size:32px;line-height:1.15}
.phone-portrait .dialogue-hero-grid .dialogue-board .lesson-controls{flex-wrap:wrap;justify-content:center;padding:10px;gap:8px}
.phone-portrait .dialogue-board .hero-action-row{order:3;width:100%}
.battle-intro-translation{margin:4px 0 0;font-size:25px;line-height:1.25;font-weight:750}
.phone-portrait .battle-intro-translation{font-size:28px;line-height:1.25}

/* Hello and Word: character name has its own line immediately below the stage badge. */
.hello-hero-flag{display:flex;flex-direction:column;align-items:flex-start;gap:5px;max-width:280px}
.hello-hero-flag .scene-tag{margin:0}
.hello-hero-name{max-width:100%;font-size:24px;line-height:1.12;overflow-wrap:anywhere;padding:4px 9px;background:#261a36df;border-radius:10px}
.phone-portrait .hello-hero-flag{max-width:43%}
.phone-portrait .hello-hero-name{font-size:24px}
.mini-explain .mini-example .mini-second-line{margin-top:8px;padding-top:8px;border-top:1px solid #bca8db;font-size:31px;line-height:1.2}
.mini-explain .mini-example .mini-meaning{font-size:22px;font-weight:700;line-height:1.25}
.phone-portrait .mini-explain .mini-example .mini-second-line{font-size:31px}
.phone-portrait .mini-explain .mini-example .mini-meaning{font-size:25px}
.mini-explain .mini-example .mini-second-line{grid-column:1;min-width:0;overflow-wrap:anywhere}
.mini-explain .mini-example .mini-second-audio{grid-column:2;align-self:end}

.word-gloss {font-size:clamp(20px,2vw,30px);line-height:1.18;color:#594770;font-weight:750;max-width:100%;overflow-wrap:anywhere;}
.phone-portrait .word-gloss {font-size:27px;}

.food-lesson-tools{flex-wrap:wrap;}
.word-visibility-tools{display:inline-flex;align-items:center;gap:8px;max-width:100%;}
.word-visibility-tools .food-tool{white-space:normal;min-width:0;}

/* Fit actual Word glyph bounds inside the picture card, with safety padding. */
.specimen-board .single-food{min-width:0;min-height:0;overflow:hidden;box-sizing:border-box}
.single-food .food-art{display:block;max-width:calc(100% - 8px);max-height:calc(100% - 8px);overflow:hidden}
.hero-action-row{flex-wrap:wrap}
.lesson-board .inline-back,.question-board .inline-back{min-width:0;white-space:normal;flex-shrink:0;font-size:18px;padding:6px 12px}
.phone-portrait .lesson-board .inline-back{font-size:27px;min-height:64px}
.question-topline .inline-back{font-size:15px;min-height:30px;padding:2px 9px}
.phone-portrait .question-topline .inline-back{font-size:23px;min-height:40px}
.phone-portrait .console-actions.no-back{grid-template-columns:repeat(3,minmax(0,1fr))}
.phone-portrait .console-actions.no-primary.no-back,.phone-portrait .console-actions.no-audio.no-back{grid-template-columns:repeat(2,minmax(0,1fr))}
.phone-portrait .console-actions.no-primary.no-audio.no-back{grid-template-columns:1fr}

.sentence-gloss{display:block;color:#594770;font-size:24px;font-weight:750;line-height:1.2;overflow-wrap:anywhere;max-width:100%}
.sentence-board.no-word-art{grid-template-columns:minmax(0,1fr) auto}
.dialogue-word-art{display:flex;gap:4px;justify-content:center}
.dialogue-word-art .food-medal{width:66px;height:58px}
.dialogue-word-art .food-art{width:100%;height:100%}
.speak-dialogue-line .sentence-gloss{font-size:22px;line-height:1.2}
.practice-board{padding-top:12px}
.practice-board .question-topline{position:static;flex-wrap:wrap;gap:6px;margin-bottom:4px}
.practice-board .stage-visibility-tools{gap:6px}
.practice-board .stage-visibility-tools .food-tool{font-size:15px;min-height:30px;padding:4px 7px}
.question-board .sentence-gloss{font-size:23px;text-align:center;margin:4px 0 0}
.phone-portrait .sentence-gloss,.phone-portrait .question-board .sentence-gloss{font-size:27px}
.phone-portrait .speak-dialogue-line .sentence-gloss{font-size:25px}
.phone-portrait .sentence-board.no-word-art{grid-template-columns:1fr}
.phone-portrait .practice-board{padding-top:12px}
.phone-portrait .practice-board .stage-visibility-tools .food-tool{font-size:22px;min-height:42px}
.dialogue-board .speak-dialogue-line .sentence-gloss{font-size:22px;line-height:1.2}
.phone-portrait .dialogue-board .speak-dialogue-line .sentence-gloss{font-size:25px;line-height:1.2}
.dialogue-hero-grid .dialogue-board .lesson-controls{flex-wrap:wrap}
/* Return buttons sit on light paper, so use an explicit high-contrast fill. */
.lesson-board .inline-back,.question-board .inline-back{background:#39284f;color:#fff;border:2px solid #2d1d40;box-shadow:0 3px 0 #21152f;font-weight:850}
.lesson-board .inline-back:hover:not(:disabled,:focus-visible),.question-board .inline-back:hover:not(:disabled,:focus-visible){outline:2px solid #9975cb;outline-offset:2px}
.lesson-board .inline-back:focus-visible,.question-board .inline-back:focus-visible{outline:3px solid #9975cb;outline-offset:3px}
.lesson-board .inline-back:disabled,.question-board .inline-back:disabled{background:#776987;color:#fff;opacity:.78}

.front-guide-button .recruit-link{background:#d9f88b;border-color:#647d32;color:#28203c;}

.battle-intro-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
.battle-intro-settings .battle-setup-button{background:#e8dbf7;color:#39284f;border:1px solid #8265a1;min-width:0;font-size:18px;font-weight:800;white-space:normal;padding:8px 10px}
.battle-intro-board .hero-action-row{width:100%;flex-wrap:nowrap;align-items:center}
.battle-intro-board .battle-start-main{flex:1 1 auto;background:#d9fa80;color:#251b34;border:2px solid #526b2a;font-size:35px;min-height:78px;padding:10px 24px;box-shadow:0 5px 0 #4d652a,0 0 17px #d5ff8a66;white-space:normal}
.battle-intro-board .lesson-controls{justify-items:stretch;min-width:430px}
.challenge-button.newly-unlocked{position:relative;border:3px solid #ffd759;background:#594523;box-shadow:0 0 18px #ffe29c;animation:unlock-glow 1.5s ease-in-out infinite alternate}
.challenge-button.newly-unlocked strong,.challenge-button.newly-unlocked small{color:#fff3bd}
.unlock-badge{justify-self:start;font-size:16px;line-height:1.1;color:#332600;background:#ffe786;border-radius:6px;padding:4px 9px;font-weight:900}
.unlocked-result{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-weight:900;color:#5b3b0a;background:#fff0b0;border:2px solid #f4c450;border-radius:12px;padding:7px 12px;animation:unlock-glow 1.5s ease-in-out infinite alternate}
@keyframes unlock-glow{from{box-shadow:0 0 5px #ffc74a85}to{box-shadow:0 0 22px 5px #ffdc72;}}
#game.reduced .newly-unlocked,#game.reduced .unlocked-result{animation:none}
.phone-portrait .battle-intro-board .lesson-controls{min-width:0}
.phone-portrait .battle-intro-board .battle-start-main{font-size:34px;min-height:88px;padding:8px 12px}
.phone-portrait .battle-intro-settings .battle-setup-button{font-size:23px;min-height:56px}
.phone-portrait .battle-trophy-only{display:flex;justify-content:flex-end}
.phone-portrait .battle-trophy-only .trophy-link{width:auto}
.phone-portrait .unlock-badge{font-size:22px}

.mode-button:disabled{background:#514a5a;color:#b9b5c1;border-color:#837b8c;opacity:.72;cursor:not-allowed;box-shadow:none}

.mode-button:hover:not(:disabled,:focus-visible),.challenge-button:hover:not(:disabled,:focus-visible),.game-guide-link:hover:not(:focus-visible),.listen-button:hover:not(:disabled,:focus-visible){outline:2px solid #b69bd9;outline-offset:2px}

/* Greeting responses: illustrations in easy Battle and picture-enabled Practice. */
.answer-card.words-only.greeting-picture {grid-template-rows:minmax(0,1fr) auto;gap:3px;padding:30px 9px 9px;min-width:0;overflow:hidden}
.greeting-choice-icon {display:block;align-self:center;justify-self:center;font-size:clamp(25px,4.5cqw,58px);line-height:1.05;white-space:nowrap;max-width:100%}
.answer-card.words-only.greeting-picture .answer-label {font-size:clamp(16px,2.5cqw,33px);line-height:1.15;min-width:0}
.phone-portrait .answer-card.words-only.greeting-picture {grid-template-rows:minmax(0,1fr) auto;padding:37px 8px 8px}
.phone-portrait .greeting-choice-icon {font-size:44px}
.phone-portrait .answer-card.words-only.greeting-picture .answer-label {font-size:25px}
.resume-sound {position:absolute;top:100px;left:50%;transform:translateX(-50%);z-index:30;background:#4c296e;color:white;border:2px solid #efdaff;border-radius:18px;padding:12px 28px;font-weight:800;font-size:24px;box-shadow:0 3px 16px #0007}
.resume-sound[hidden]{display:none!important}
.phone-portrait .resume-sound{top:190px;font-size:30px}

/* Stage-local restart never changes saved cups. */
.phone-portrait .console-tools{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
.stage-restart {min-height:34px;font-size:18px;padding:5px 10px}
.phone-portrait .stage-restart{font-size:22px;min-height:42px}
.answer-card.alphabet-sequence-choice .answer-label {font-size:clamp(25px,3.7cqw,47px);white-space:pre-wrap;letter-spacing:.08em}
.phone-portrait .answer-card.alphabet-sequence-choice .answer-label {font-size:38px}


/* Analog time questions: a bounded vector face beside the prompt, not a font-size
   increase to the shared word-art/emoji rule. All other visuals stay unchanged. */
.clock-question-body {display:flex;align-items:center;justify-content:center;gap:24px;min-width:0}
.curriculum-clock {display:block;width:116px;height:116px;max-width:100%;flex:0 0 auto}
.clock-question-body > :not(.curriculum-clock) {min-width:0}
.phone-portrait .clock-question-body {gap:16px}
.phone-portrait .curriculum-clock {width:144px;height:144px}
.phone-portrait .clock-question-body .listening-prompt {justify-content:center}

/* Math mode is a responsive separate canvas, preserving English's scaled classroom UI. */
.math-mode-open{min-height:48px;white-space:nowrap;color:#dff9a0;font-weight:850;font-size:16px}
.phone-portrait .math-mode-open{min-height:68px;font-size:25px;padding-inline:9px;max-width:150px;white-space:normal;line-height:1.1}
#math-mode{position:fixed;inset:0;z-index:60;overflow:auto;background:radial-gradient(ellipse at 90% 0%,#533974 0,transparent 50%),#171226;color:#fff8ef;font-size:16px;scrollbar-color:#72568b #171226}
#math-mode button{min-height:44px;padding:8px 14px;border:1px solid #9076ad;background:#342641;border-radius:12px;font-weight:800;color:#fff8ef;box-shadow:0 3px 0 #130d1d;cursor:pointer}
#math-mode button:focus-visible{outline:3px solid #aee9fc;outline-offset:2px}
#math-mode button.selected,#math-mode button[aria-pressed="true"]{background:#443c2b;border-color:#dfff85;color:#efffc8;box-shadow:inset 0 0 0 2px #dfff85,0 3px 0 #151320}
#math-mode button.math-primary,#math-mode button.math-confirm{color:#251b2d;background:linear-gradient(180deg,#e9ffad,#c5ed79);border:1px solid #eaffae;box-shadow:0 4px 0 #688d3a}
#math-mode button:disabled{opacity:.43;cursor:default}
.math-header{width:min(1240px,100%);display:flex;gap:12px;padding:12px clamp(12px,3vw,30px);margin:auto;align-items:center;justify-content:space-between;border-bottom:1px solid #594469}
.math-brand{display:flex;align-items:center;gap:10px;min-width:0}
.math-brand img{width:48px;height:48px;object-fit:contain}
.math-brand strong{display:block;color:#fff8ef;font-size:clamp(17px,3vw,24px);letter-spacing:-.04em;line-height:1}
.math-brand strong span{color:#dbfc84}
.math-brand small{display:block;margin-top:4px;color:#d4c5ec;font-size:clamp(13px,2.2vw,17px)}
.math-actions{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
#math-mode .math-actions button{font-size:16px;padding:8px 12px}
#math-mode .math-actions .math-back{background:#342641;color:#e4f4ff}
.math-main{max-width:1160px;margin:auto;padding:clamp(10px,2vw,24px)}
.math-menu-intro{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;padding:0 4px}
.math-menu-intro h1{font-size:clamp(25px,5vw,39px);font-weight:900;letter-spacing:-.02em;margin:0}
.math-menu-intro p,.math-menu-footer p{font-size:clamp(14px,2vw,18px);color:#e3d0f2;margin:0}
.math-operations{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
#math-mode .math-operations button{display:grid;position:relative;place-items:center;gap:0;min-width:0;padding:8px 4px 12px;font-size:clamp(12px,2.4vw,18px);overflow:hidden}
.math-operations button img{width:clamp(52px,9vw,100px);height:auto;object-fit:contain}
.math-operations strong{overflow-wrap:anywhere;font-weight:900;line-height:1.15}
.math-operations button span{display:none}
.math-level-section{padding:clamp(10px,2vw,18px);border-radius:18px;background:#2b2039;border:1px solid #634b7c}
.math-level-section h2{font-size:clamp(16px,3vw,23px);margin:0 0 10px}
.math-levels{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;padding:0;margin:0;list-style:none}
.math-levels.tables{grid-template-columns:repeat(5,minmax(0,1fr))}
.math-levels li{min-width:0}
#math-mode .math-levels button{width:100%;min-height:63px;padding:7px;display:flex;align-items:center;gap:7px;text-align:left;font-size:clamp(12px,2vw,16px);overflow-wrap:anywhere;line-height:1.2}
#math-mode .math-levels.tables button{min-height:46px;justify-content:center;text-align:center}
#math-mode .math-levels button small{display:grid;place-items:center;min-width:26px;height:26px;background:#21182c;border-radius:8px;color:#e1e5ff;font-size:14px;font-weight:900}
.math-menu-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:15px}
#math-mode .math-menu-footer button{min-width:210px;font-size:clamp(18px,3vw,25px);min-height:55px}
.math-battle{max-width:970px;margin:auto;display:grid;gap:10px}
.math-battle-top{display:flex;align-items:center;gap:12px;justify-content:space-between;color:#e2d9ed;font-size:clamp(13px,2.2vw,17px);text-align:center}
.math-battle-top strong{flex:1}
.math-arena{position:relative;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:72px minmax(110px,clamp(135px,22vh,215px));column-gap:12%;padding:14px 6% 5px;background:radial-gradient(ellipse at 74% 82%,#76528a 0%,transparent 43%),radial-gradient(ellipse at 20% 78%,#4b6858 0%,transparent 50%),linear-gradient(180deg,#342744,#231a30);border:1px solid #80639f;border-radius:20px;overflow:hidden;isolation:isolate}
.math-hp{display:grid;grid-template-rows:auto 15px auto;gap:4px;z-index:2}
.math-hp strong{color:#f4e6ff;font-size:clamp(14px,2.5vw,19px);line-height:1}
.math-hp [role=meter]{height:15px;background:#110b1d;border:2px solid #8e78ae;border-radius:50px;overflow:hidden}
.math-hp i{display:block;height:100%;background:linear-gradient(90deg,#7ad466,#ccfa79);transition:width .3s}
.math-hp.enemy i{background:linear-gradient(90deg,#e75881,#ffb0c0)}
.math-hp span{font-size:13px;color:#dbcbea;line-height:1}
.math-actor{position:relative;display:grid;place-items:center;min-width:0;height:100%}
.math-actor img{max-width:100%;height:100%;width:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 8px 8px #0008)}
.math-monster.powered img{filter:drop-shadow(0 0 9px #ffee68) drop-shadow(0 0 15px #ff8b43);transform:scale(1.08)}
.math-power-mark{position:absolute;bottom:2px;right:0;display:block;color:#fff4a2;background:#672f53e3;font-size:clamp(12px,2vw,15px);font-weight:900;padding:5px 10px;border-radius:999px}
.math-dragon img{transform:none;scale:1 1}.math-dragon.face-flipped img{scale:-1 1}
.math-effect{position:absolute;top:54%;left:72%;font-size:clamp(23px,6vw,47px);color:#fff1a3;font-weight:900;text-shadow:0 2px 2px #80384c,0 0 12px #a83b47;pointer-events:none;z-index:3;translate:-50% -50%;animation:math-effect-pop .72s ease-out both}
.math-effect:empty{display:none}
.math-arena.attack-dragon .math-effect,.math-arena.power-flash .math-effect{left:27%}
.math-arena.attack-monster .math-dragon{animation:math-dash-right .54s ease-in-out}
.math-arena.attack-monster .math-monster{animation:math-hit .65s .15s ease}
.math-arena.attack-dragon .math-monster{animation:math-dash-left .54s ease-in-out}
.math-arena.attack-dragon .math-dragon{animation:math-hit .65s .15s ease}
.math-arena.power-flash{animation:math-power .8s ease}
@keyframes math-dash-right{0%,100%{transform:translateX(0)}45%{transform:translateX(38%) rotate(8deg)}}
@keyframes math-dash-left{0%,100%{transform:translateX(0)}45%{transform:translateX(-38%) rotate(-8deg)}}
@keyframes math-hit{0%,100%{transform:translateX(0)}30%{transform:translateX(7%) scale(.92)}50%{transform:translateX(-4%);opacity:.55}}
@keyframes math-effect-pop{0%{opacity:0;transform:translateY(14px) scale(.5)}30%{opacity:1;transform:translateY(-10px) scale(1.15)}100%{opacity:1;transform:translateY(-28px) scale(1)}}
@keyframes math-power{0%,100%{box-shadow:none}45%{box-shadow:inset 0 0 60px #ffc347a8}}
.math-prompt{display:grid;grid-template-columns:minmax(0,1fr) minmax(95px,24%);align-items:center;gap:12px;padding:12px;border-radius:16px;background:#fff4dc;color:#2a2340;box-shadow:0 5px 0 #ac967c}
.math-equation{font-size:clamp(31px,7vw,66px);font-weight:950;letter-spacing:-.03em;line-height:1.1;text-align:center;white-space:nowrap}
.math-equation span,.math-equation b{color:#744f9b}
.math-answer-display{background:#35274d;border:2px solid #bc9be8;border-radius:12px;text-align:center;color:#e9ffa4;min-height:58px;display:grid;place-items:center;font-variant-numeric:tabular-nums;font-size:clamp(29px,6vw,54px);font-weight:900;line-height:1}
.math-response{min-height:27px;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;text-align:center;font-size:clamp(15px,2.7vw,20px);color:#d6c5ec}
.math-response .good{color:#d9ff9c}
.math-response .miss{color:#ffd6a6}
.math-special{color:#ffdf8d;font-weight:800;font-size:clamp(12px,2.2vw,16px)}
.math-keypad{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
#math-mode .math-keypad button{font-size:clamp(24px,5vw,38px);min-height:58px;padding:5px;line-height:1;border-radius:10px}
#math-mode .math-keypad .math-confirm{font-size:clamp(20px,4.5vw,33px)}
.math-result-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px}
.math-result-title{font-size:clamp(20px,3vw,31px);font-weight:950;color:#edffa8}
#math-mode .math-result-actions button{font-size:clamp(16px,2.5vw,20px);min-width:150px}
@media(min-width:800px) and (min-height:650px){.math-keypad{max-width:660px;width:100%;margin:auto;grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:600px){
.math-header{padding:8px 10px;gap:7px}
.math-brand{gap:5px}.math-brand img{width:36px;height:36px}
.math-brand strong{font-size:15px}.math-brand small{font-size:13px}
.math-actions{gap:5px}#math-mode .math-actions button{font-size:14px;padding:5px 8px;min-height:40px}
.math-main{padding:10px}
.math-operations{gap:5px;margin:10px 0}
#math-mode .math-operations button{min-height:82px;padding:5px 2px;font-size:12px}
.math-levels{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.math-levels.tables{grid-template-columns:repeat(4,minmax(0,1fr))}
#math-mode .math-levels button{font-size:13px;min-height:53px;padding:6px;gap:5px}
#math-mode .math-levels.tables button{min-height:42px;font-size:12px;gap:3px}
#math-mode .math-levels.tables button small{display:none}
.math-menu-footer{display:grid;grid-template-columns:1fr;text-align:center}
#math-mode .math-menu-footer button{width:100%;min-width:0;min-height:52px}
.math-battle{gap:8px}
.math-battle-top{gap:5px;font-size:12px}
#math-mode .math-battle-top button{padding:6px;min-height:38px;font-size:13px}
.math-arena{grid-template-rows:58px minmax(105px,clamp(110px,21vh,160px));padding:10px 5% 4px;column-gap:9%}
.math-hp{grid-template-rows:auto 13px auto}.math-hp [role=meter]{height:13px}
.math-prompt{padding:9px 6px;gap:7px;grid-template-columns:minmax(0,1fr) minmax(63px,24%)}
.math-equation{font-size:clamp(24px,6.9vw,39px)}
.math-answer-display{min-height:45px;font-size:clamp(23px,6vw,33px)}
.math-keypad{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
#math-mode .math-keypad button{min-height:47px;font-size:28px}
#math-mode .math-keypad button:nth-child(10){grid-column:2;grid-row:4}
#math-mode .math-keypad button:nth-child(11){grid-column:1;grid-row:4}
#math-mode .math-keypad button:nth-child(12){grid-column:3;grid-row:4}
.math-response{font-size:15px;min-height:24px;gap:3px}
.math-result-actions{gap:7px}
#math-mode .math-result-actions button{min-width:0;flex:1}
.math-result-title{width:100%;text-align:center}
}
@media(max-height:525px) and (orientation:landscape){.math-main{padding:8px 12px}.math-header{padding:5px 14px}.math-brand img{width:33px;height:33px}.math-battle{gap:6px;grid-template-columns:1fr 1fr;align-items:start}.math-battle-top{grid-column:1/-1}.math-arena{grid-row:2/5;grid-template-rows:58px 130px;height:214px}.math-prompt,.math-response,.math-keypad,.math-result-actions{grid-column:2}.math-prompt{padding:7px;min-height:56px}.math-equation{font-size:32px}.math-answer-display{font-size:26px;min-height:42px}.math-keypad{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}#math-mode .math-keypad button{min-height:40px;font-size:23px}.math-response{font-size:13px;min-height:18px}#math-mode .math-result-actions button{min-height:36px;font-size:14px;min-width:0}.math-result-title{font-size:19px}}
@media(prefers-reduced-motion:reduce){#math-mode *{animation:none!important;transition:none!important}}
body.math-active #crv-support-funnel{display:none!important}
/* Fit the complete arithmetic round, including result action, on classroom 720p. */
.math-arena{grid-template-rows:60px minmax(0,clamp(104px,20vh,190px))}
.math-actor{min-height:0;align-self:stretch}
.math-actor img{min-height:0;max-height:100%;width:100%;height:100%;aspect-ratio:auto;object-fit:contain}
@media(min-width:601px) and (max-height:800px){
.math-header{padding-block:7px}.math-brand img{width:42px;height:42px}
.math-main{padding-block:10px}.math-battle{gap:7px}
.math-arena{grid-template-rows:52px minmax(0,clamp(102px,19vh,145px));padding-block:9px 4px}
.math-prompt{padding:8px 12px}.math-equation{font-size:clamp(31px,6vw,55px)}
.math-answer-display{min-height:46px;font-size:44px}
.math-response{min-height:20px;font-size:18px}
#math-mode .math-keypad button{min-height:47px;font-size:32px}
#math-mode .math-result-actions button{min-height:42px}
}
@media(max-width:600px){.math-arena{grid-template-rows:52px minmax(0,clamp(100px,16vh,140px))}}
@media(max-height:525px) and (orientation:landscape){.math-arena{grid-template-rows:48px minmax(0,130px);height:190px}.math-prompt{padding:7px}.math-equation{font-size:32px}.math-answer-display{min-height:42px;font-size:26px}#math-mode .math-keypad button{min-height:40px;font-size:23px}}

/* Persistent sound control in English and matching math controls. */
#header-mute{flex:0 0 52px;width:52px;height:52px}
#header-mute[aria-pressed=true]{background:#50334a;border-color:#d59cae}
.phone-portrait #header-mute{flex-basis:68px;width:68px;height:68px;font-size:36px}
.math-menu-footer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#math-mode .math-menu-footer button{min-width:0;width:100%;font-size:clamp(15px,3vw,22px);padding:10px 4px}
.math-learn h2,.math-learn h3{margin:14px 0 8px}.math-lesson-steps{display:grid;gap:8px}.math-lesson-steps div{background:#fff4dc;color:#302040;border-radius:12px;padding:12px;text-align:center;font-size:clamp(20px,5vw,34px);font-weight:900;overflow-wrap:anywhere}
.math-lesson-table{display:grid;gap:8px}.math-table-row{background:#342641;border-radius:12px;padding:10px}.math-table-row>strong{display:block;color:#dfff85;margin-bottom:8px}.math-table-row>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:6px}.math-table-row span{background:#21182c;border-radius:7px;padding:8px;text-align:center;white-space:nowrap}
.math-avatars{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:10px;margin:10px 0 18px}.math-avatars button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0}.math-avatars img{width:85px;height:85px;object-fit:contain}.math-avatars button:disabled img{filter:grayscale(1)}.math-avatars strong{font-size:14px;overflow-wrap:anywhere}
.math-practice-head{display:flex;align-items:center;justify-content:center;gap:15px;background:#342641;padding:8px;border-radius:15px}.math-practice-head img{width:clamp(170px,31vh,250px);height:clamp(130px,26vh,210px);object-fit:contain;flex:none}.math-practice-head p{margin:4px 0}.math-practice-head strong{color:#dfff85}
@media(max-width:600px){.math-menu-footer{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.math-avatars{grid-template-columns:repeat(3,minmax(0,1fr))}.math-avatars img{width:65px;height:65px}}

@media(max-width:600px){.math-practice-head{gap:9px;padding:6px}.math-practice-head img{width:clamp(130px,42vw,190px);height:clamp(105px,20vh,155px)}}
/* Keep the defeated fighter down, then let the actual victor celebrate. */
.math-arena .math-knocked-out{z-index:2;animation:none}
.math-arena .math-knocked-out img{animation:math-knockout .64s cubic-bezier(.24,.8,.45,1.18) forwards;transform-origin:50% 50%;filter:grayscale(.30) brightness(.76) drop-shadow(0 7px 6px #0007)}
.math-arena .math-dragon.math-knocked-out img{animation-name:math-knockout-dragon}
.math-arena .math-ko-badge{position:absolute;right:10%;top:13%;font-size:clamp(23px,5vw,42px);color:#ffdf6d;animation:math-ko-stars .8s ease-out 2}
.math-arena .math-celebrate{z-index:2;animation:math-victory-hop .95s .18s ease-in-out 2;transform-origin:50% 96%}
.math-arena .math-win-stars{position:absolute;top:2%;left:50%;transform:translateX(-50%);white-space:nowrap;color:#fff4a6;font-size:clamp(19px,4vw,38px);font-weight:1000;text-shadow:0 0 10px #ffbd46;animation:math-win-sparkle .9s ease-in-out infinite}
.math-arena.math-player-victory{border-color:#dfff85;background:radial-gradient(ellipse at 25% 68%,#7a874345,transparent 55%),linear-gradient(180deg,#342744,#231a30)}
.math-arena.math-enemy-victory{border-color:#ffbd78;background:radial-gradient(ellipse at 75% 68%,#b4794945,transparent 55%),linear-gradient(180deg,#342744,#231a30)}
@keyframes math-knockout{0%{transform:translateY(0) rotate(0)}25%{transform:translateY(-8px) rotate(-9deg)}62%{transform:translateY(21px) rotate(85deg) scale(.82)}100%{transform:translateY(15px) rotate(90deg) scale(.76)}}
@keyframes math-knockout-dragon{0%{transform:scale(1)}25%{transform:translateY(-8px) rotate(9deg)}62%{transform:translateY(21px) rotate(-85deg) scale(.82)}100%{transform:translateY(15px) rotate(-90deg) scale(.76)}}
@keyframes math-victory-hop{0%,100%{transform:translateY(0)}13%{transform:scale(1.07,.93)}35%{transform:translateY(-27px) rotate(-5deg) scale(.97,1.05)}55%{transform:translateY(0) scale(1.08,.92)}76%{transform:translateY(-17px) rotate(5deg) scale(.98,1.04)}}
@keyframes math-win-sparkle{0%,100%{opacity:.7;transform:translate(-50%,0) scale(.9)}50%{opacity:1;transform:translate(-50%,-8px) scale(1.12)}}
@keyframes math-ko-stars{0%,100%{opacity:.65;transform:rotate(0)}50%{opacity:1;transform:rotate(15deg)}}
@media(prefers-reduced-motion:reduce){.math-arena .math-knocked-out img{animation:none;transform:translateY(15px) rotate(90deg) scale(.76)}.math-arena .math-dragon.math-knocked-out img{animation:none;transform:translateY(15px) rotate(-90deg) scale(.76)}.math-arena .math-celebrate,.math-arena .math-win-stars,.math-arena .math-ko-badge{animation:none}}
.math-arena.math-ranged.attack-monster .math-dragon{animation:math-cast .54s ease-in-out}
.math-skill-shot{position:absolute;top:68%;left:29%;width:clamp(38px,8vw,90px);height:clamp(38px,8vw,90px);color:var(--skill-color);pointer-events:none;z-index:3;transform:translate(-50%,-50%);filter:drop-shadow(0 0 7px var(--skill-color));animation:math-projectile .62s ease-in both}
.math-skill-shot svg{width:100%;height:100%;display:block}
.math-skill-shot.strong{width:clamp(55px,11vw,125px);height:clamp(55px,11vw,125px)}
.math-skill-shot.melee{left:68%;animation:math-melee .52s ease-out both}
.math-skill-flame svg{transform:rotate(-9deg)}
.math-skill-eye-beam,.math-skill-mouth-beam{width:43%!important;height:clamp(34px,7vw,74px)!important;left:30%;transform-origin:left center;animation:math-beam .62s ease-out both}
.math-skill-eye-beam svg,.math-skill-mouth-beam svg{width:100%;object-fit:fill}
@keyframes math-projectile{0%{opacity:0;left:29%;transform:translate(-50%,-50%) scale(.55)}20%{opacity:1}80%{opacity:1;left:72%;transform:translate(-50%,-50%) scale(1.12)}100%{opacity:0;left:75%;transform:translate(-50%,-50%) scale(.9)}}
@keyframes math-melee{0%{opacity:0;transform:translate(-50%,-50%) scale(.25)}25%{opacity:1;transform:translate(-50%,-50%) scale(1.12)}75%{opacity:1;transform:translate(-50%,-50%) scale(.95)}100%{opacity:0;transform:translate(-50%,-50%) scale(.7)}}
@keyframes math-cast{0%,100%{transform:translateY(0)}38%{transform:translateY(-6px) scale(.96,1.04)}65%{transform:translateY(3px) scale(1.04,.96)}}
@keyframes math-beam{0%{opacity:0;transform:scaleX(.07)}35%{opacity:1;transform:scaleX(.65)}75%{opacity:1;transform:scaleX(1)}100%{opacity:0;transform:scaleX(1)}}
@media(prefers-reduced-motion:reduce){.math-skill-shot{animation:none;opacity:.8;left:65%;transform:translate(-50%,-50%)}}
.math-time-settings{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;margin:12px 0 6px;padding:10px 12px;border:1px solid #695185;border-radius:14px;background:#261c35;font-weight:800}
.math-time-settings select{font:inherit;color:#eaffae;background:#38294b;border:1px solid #b5a1df;border-radius:8px;padding:7px 12px;cursor:pointer}
.math-time-settings small{color:#d3c7e7;font-size:13px;font-weight:600}
.math-countdown{display:flex;align-items:center;gap:12px;padding:5px 12px;background:#241b31;border:1px solid #5c476d;border-radius:10px}
.math-countdown b{font-size:17px;color:#f2e4ff;min-width:65px;white-space:nowrap;font-variant-numeric:tabular-nums}
.math-countdown-track{height:9px;flex:1;border-radius:10px;background:#160e1d;overflow:hidden}.math-countdown-track i{display:block;height:100%;border-radius:10px;background:#c9ed79;transition:width .1s linear}
.math-countdown.urgent b{color:#ffb2a2}.math-countdown.urgent .math-countdown-track i{background:#ff8c82}
@media(max-width:600px){.math-time-settings{gap:6px;padding:8px}.math-time-settings small{flex-basis:100%;text-align:center}.math-countdown{padding:4px 8px}.math-countdown b{font-size:15px}}

/* A deliberate selection prompt, not a hidden dropdown below the grid. */
#math-mode .math-factor-dialog{color:#fff;background:#2b203c;border:2px solid #a9ee79;border-radius:20px;padding:clamp(18px,4vw,28px);width:min(345px,calc(100vw - 28px));max-height:calc(100dvh - 28px);box-sizing:border-box;text-align:center;box-shadow:0 18px 80px #000a;overflow:auto}
.math-factor-dialog::backdrop{background:#090511b3;backdrop-filter:blur(2px)}
.math-factor-dialog h2{font-size:clamp(19px,5vw,25px);margin:0;color:#eaffae}
.math-factor-dialog p{font-size:18px;margin:8px 0 16px;font-weight:800}
.math-factor-choices{display:grid;gap:10px}
#math-mode .math-factor-choices button{min-height:58px;width:100%;padding:10px;color:#f7ffef;background:#423358;border:2px solid #9b82c5;border-radius:12px;font-size:clamp(18px,5vw,24px);font-weight:900;cursor:pointer}
#math-mode .math-factor-choices button.selected,#math-mode .math-factor-choices button:focus-visible{border-color:#baf389;background:#435931;outline-offset:3px}
#math-mode .math-factor-cancel{margin-top:10px;min-height:44px;min-width:44px;width:44px;padding:0;font-size:18px;background:transparent;color:#d3c7e7;border:0;border-radius:9px;box-shadow:none}
#math-mode .math-factor-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;margin:12px 0 6px;padding:10px 14px;min-height:48px;border:2px solid #baf389;border-radius:12px;background:#352946;color:#eaffae;font-size:clamp(14px,3vw,18px);cursor:pointer}
#math-mode .math-factor-summary strong{white-space:nowrap;color:#fff}

.math-lesson-question{background:#d9f7a4;color:#302040;border:2px solid #c2ef76;border-radius:12px;padding:12px;text-align:center;font-size:clamp(26px,6vw,42px);font-weight:900;box-shadow:0 4px 0 #779b47;margin-bottom:16px}

.math-lesson-steps .math-lesson-answer{background:#d9f7a4;border:2px solid #c2ef76}
.math-lesson-counters{display:flex;align-items:center;justify-content:center;gap:12px;padding:14px;margin:8px 0;background:#2b203c;border-radius:12px;flex-wrap:wrap}.math-lesson-counters span{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.math-lesson-counters i{width:clamp(19px,5vw,34px);aspect-ratio:1;border-radius:50%;background:#c2ef76;border:2px solid #f3ffd8;position:relative}.math-lesson-counters i.b{background:#e0a0ff;border-color:#f6e0ff}.math-lesson-counters i.removed{opacity:.45;background:#999;border-color:#ddd}.math-lesson-counters i.removed::after{content:'×';position:absolute;inset:0;display:grid;place-items:center;color:#2b203c;font-weight:900;font-size:clamp(18px,5vw,32px)}

#math-mode .math-levels button{position:relative;padding-right:34px}
#math-mode .math-levels .math-cup-badge,#math-mode .math-levels .math-level-cups{position:absolute;right:5px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:1px;flex-direction:column;line-height:1}
#math-mode .math-levels .cup-icon{width:25px;height:25px}
#math-mode .math-level-cups em{font-size:9px;font-style:normal;color:#cabcd9}
#math-mode .math-factor-choices button{position:relative;padding-right:52px}
#math-mode .math-factor-choices .math-cup-badge{position:absolute;right:10px;top:50%;transform:translateY(-50%)}
#math-mode .math-factor-choices .cup-icon{width:31px;height:31px}
#math-mode .math-cup-award{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;background:#342847;border:1px solid #9b82c5;border-radius:8px;color:#fff5dd;white-space:nowrap;font-size:15px}
#math-mode .math-cup-award .cup-icon{width:35px;height:35px}#math-mode .math-cup-award small{font-size:12px}
@media(max-width:600px){#math-mode .math-levels button{padding-right:25px}#math-mode .math-levels .cup-icon{width:19px;height:19px}#math-mode .math-level-cups em{font-size:8px}#math-mode .math-cup-award{font-size:12px}}

.metal-gold{background:linear-gradient(135deg,#795015 0%,#c28a23 23%,#fff4b0 42%,#b77c1c 54%,#f6d46b 76%,#795016 100%)!important;border-color:#a27722!important;box-shadow:inset 0 0 0 1px #fff8c3,inset 0 2px 5px #fff9,0 2px 5px #0004}
.metal-silver{background:linear-gradient(135deg,#48545e 0%,#9aa8b3 23%,#ffffff 42%,#7d8a96 54%,#e4edf5 76%,#55626c 100%)!important;border-color:#7d8a96!important;box-shadow:inset 0 0 0 1px #eff7ff,inset 0 2px 5px #fff9,0 2px 5px #0004}

/* Math rats cast oversized cartoon arithmetic symbols, not realistic attacks. */
.math-arena.rat-ranged.attack-dragon .math-monster{animation:rat-cast .66s ease-in-out}
.math-arena.rat-toss.attack-dragon .math-monster{animation:rat-toss .6s ease-in-out}
.rat-shot{position:absolute;left:72%;top:67%;width:clamp(36px,7vw,78px);height:clamp(36px,7vw,78px);z-index:4;display:grid;place-items:center;transform:translate(-50%,-50%);color:var(--rat-color);font-size:clamp(32px,7vw,70px);font-weight:900;pointer-events:none;filter:drop-shadow(0 0 8px var(--rat-color))}
.rat-shot span{line-height:1;color:var(--rat-color);text-shadow:0 2px 0 #28172b,0 0 7px #fff}
.rat-throw{animation:rat-projectile .65s ease-in both}
.rat-magic{animation:rat-magic-projectile .7s ease-in-out both;width:clamp(60px,12vw,140px);height:clamp(60px,12vw,140px);border:3px solid var(--rat-color);border-radius:50%;background:radial-gradient(circle,#fffffa88,transparent 70%);font-size:clamp(45px,11vw,110px)}
.rat-magic i{position:absolute;inset:-10%;border:1px solid var(--rat-color);border-radius:50%;animation:rat-rings .65s ease-out both}.rat-magic i:nth-of-type(2){animation-delay:.1s}.rat-magic i:nth-of-type(3){animation-delay:.2s}
@keyframes rat-projectile{0%{left:73%;transform:translate(-50%,-50%) rotate(0deg) scale(.6);opacity:0}18%{opacity:1}68%{top:51%}90%{left:28%;opacity:1;transform:translate(-50%,-50%) rotate(-350deg)}100%{left:28%;opacity:0}}
@keyframes rat-magic-projectile{0%{left:73%;opacity:0;transform:translate(-50%,-50%) scale(.4)}28%{opacity:1;transform:translate(-50%,-50%) scale(1.12)}85%{left:28%;opacity:1}100%{left:28%;opacity:0;transform:translate(-50%,-50%) scale(1.3)}}
@keyframes rat-rings{0%{transform:scale(.6);opacity:1}100%{transform:scale(1.65);opacity:0}}
@keyframes rat-cast{0%,100%{transform:none}30%{transform:translateY(-8px) rotate(7deg) scale(1.07)}56%{transform:translateX(-5%) rotate(-8deg) scale(1.02)}}
@keyframes rat-toss{0%,100%{transform:none}30%{transform:rotate(12deg)}55%{transform:rotate(-14deg) translateX(-7%)}}
.rat-special-fx{position:absolute;left:72%;top:56%;transform:translate(-50%,-50%);pointer-events:none;z-index:4;font-size:clamp(40px,7vw,82px);font-weight:900;color:#fff4ad;text-shadow:0 2px 5px #261535,0 0 20px #ffda72;animation:rat-special-pop .9s ease-out both;white-space:nowrap}
@keyframes rat-special-pop{0%{transform:translate(-50%,-50%) scale(.2);opacity:0}35%{transform:translate(-50%,-65%) scale(1.14);opacity:1}100%{transform:translate(-50%,-95%) scale(1);opacity:.8}}
.rat-buffs{position:absolute;left:3%;bottom:1%;display:flex;gap:4px;flex-wrap:wrap;pointer-events:none}.rat-buffs span{padding:3px 6px;background:#372553df;border:1px solid #ffdd92;border-radius:12px;font-size:12px;color:#fff4c3}
#math-mode .math-keypad button.rat-slimed{position:relative;background:#456c3e;color:#e2edb4}.rat-slimed:after{content:'';position:absolute;inset:0;border-radius:inherit;background:radial-gradient(ellipse at 32% 30%,#90d74080 0 16%,transparent 17%),radial-gradient(ellipse at 66% 72%,#74bf3a70 0 22%,transparent 23%),linear-gradient(25deg,transparent,#69a93250,transparent);pointer-events:none}
.rat-special-message{font-size:clamp(12px,2.5vw,16px);line-height:1.3}
@media(prefers-reduced-motion:reduce){.rat-shot{left:28%;opacity:.7}.rat-special-fx{opacity:1}.rat-slimed:after{opacity:.45}}
.math-monster:has(.rat-buffs span:first-child) .rat-buffs{z-index:3}
.rat-special-guard .math-monster::before{content:'';position:absolute;inset:6% 12%;border:3px solid #8de4ff;border-radius:50%;box-shadow:inset 0 0 22px #a0eaff77,0 0 17px #a0eaff99;pointer-events:none;animation:rat-special-pop .8s ease-out}
.rat-special-boost .math-monster img{filter:drop-shadow(0 0 12px #ff543b) drop-shadow(0 0 22px #ffb64b)}
.rat-special-cheese .math-monster img{filter:drop-shadow(0 0 12px #c2ff67)}
.rat-special-slime .math-monster img{filter:drop-shadow(0 0 12px #9ef246)}
/* Rat knockout artwork is already lying down, so do not rotate it twice. */
.math-arena .math-monster.math-knocked-out img{animation:rat-ko-drop .6s ease-out forwards;transform-origin:50% 86%}
@keyframes rat-ko-drop{0%{transform:translateY(-8px) scale(.95);opacity:.95}35%{transform:translateY(7px) scale(1.04,.92)}100%{transform:translateY(4px) scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){.math-arena .math-monster.math-knocked-out img{animation:none;transform:translateY(4px)}}

.quick-curriculum-dialog{width:min(820px,94vw);max-height:88dvh;overflow:auto}.quick-curriculum-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0 18px}
.quick-curriculum-grid .quick-curriculum-option{min-width:0;min-height:49px;padding:9px 8px;font-size:clamp(14px,2.2vw,18px);white-space:normal;line-height:1.25;text-align:center;border:1px solid #8b74b0;background:#3b2c50;color:#fff}
.quick-curriculum-grid .quick-curriculum-option.selected{background:#d9ff70;color:#2c2337;border-color:#efffc4}
.quick-curriculum-note{color:#ffe2a3;font-size:15px}
.activity-actions .battle-quit{min-height:32px;font-size:15px;padding:4px 9px;color:#f5c8c4;border-color:#98616a;background:#472d3c;white-space:nowrap}
@media(max-width:600px){.quick-curriculum-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.quick-curriculum-dialog{padding:14px}.quick-curriculum-grid .quick-curriculum-option{min-height:48px}.activity-actions .battle-quit{font-size:17px;min-height:34px}}

/* Battle rats face the player, while the menu keeps their original portraits. */
.math-arena .math-monster img{scale:-1 1}
.rat-shot svg{width:100%;height:100%;display:block;padding:5px;box-sizing:border-box;filter:drop-shadow(0 2px 1px #291a37) drop-shadow(0 0 4px currentColor)}
.rat-shot{left:67%;top:64%}
@keyframes rat-projectile{0%{left:67%;top:64%;transform:translate(-50%,-50%) rotate(0deg) scale(.48);opacity:0}14%{opacity:1}60%{top:50%}89%{left:28%;top:64%;opacity:1;transform:translate(-50%,-50%) rotate(-350deg)}100%{left:28%;top:64%;opacity:0}}
@keyframes rat-magic-projectile{0%{left:67%;top:64%;opacity:0;transform:translate(-50%,-50%) scale(.38)}28%{opacity:1;transform:translate(-50%,-50%) scale(1.12)}85%{left:28%;opacity:1}100%{left:28%;opacity:0;transform:translate(-50%,-50%) scale(1.3)}}
/* Character names are secondary to the arithmetic operation. */
#math-mode .math-operations .rat-name{display:block;margin-top:3px;font-size:clamp(10px,1.25vw,13px);font-weight:500;line-height:1.25;color:#c8b9dc;max-width:100%;overflow-wrap:anywhere;text-align:center}
#math-mode .math-operations button.selected .rat-name{color:#dcd7ba}

/* Consistent, compact dismiss controls; save and resume retain their own labels. */
.dialog .dialog-close{display:inline-grid;place-items:center;flex:0 0 44px;min-width:44px;min-height:44px;width:44px;height:44px;padding:0;font-size:18px;background:transparent;border:0;box-shadow:none;line-height:1}
.dialog .dialog-close:hover,#math-mode .math-factor-cancel:hover{background:#ffffff12}

.math-dragon.honey-coated img{filter:sepia(.65) saturate(1.6) drop-shadow(0 0 8px #ffc748)}.math-dragon.honey-coated:after{content:"🍯";position:absolute;right:0;bottom:8%;font-size:24px;pointer-events:none}

.math-ally-heal{position:absolute;left:22%;top:36%;z-index:6;font-size:clamp(18px,3vw,32px);color:#197746;font-weight:900;text-shadow:0 2px 4px white;animation:math-effect-pop 1s ease both;pointer-events:none}

#math-mode .math-language{font:inherit;color:#edf7ff;background:#342641;border:1px solid #8d76a2;border-radius:9px;padding:7px 8px;max-width:155px;min-height:40px}#math-mode[dir="rtl"] .math-equation,#math-mode[dir="rtl"] .math-keypad,#math-mode[dir="rtl"] .math-table-row,#math-mode[dir="rtl"] .math-lesson-steps{direction:ltr}#math-mode[dir="rtl"] .math-arena{direction:ltr}@media(max-width:480px){.math-header{flex-wrap:wrap}.math-actions{flex-wrap:wrap;justify-content:flex-end}#math-mode .math-language{max-width:108px;font-size:13px}}

/* Local player selection and two independent touch-friendly play areas. */
#math-mode .math-player-bar{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:8px 0 16px}
#math-mode .math-player-bar button{border:2px solid #b4a0e8;background:#3b2f55;color:#fff;min-height:46px;border-radius:14px;padding:10px 16px;font-weight:800}
#math-mode .math-player-bar button:first-child{border-color:#ffd267;background:#55402a}
.math-player-dialog{color:#fff;background:#2a203d;border:2px solid #b4a0e8;border-radius:20px;padding:20px;width:min(440px,94vw);max-height:90vh;overflow:auto;text-align:center}
.math-player-dialog::backdrop{background:#130f22b5}
.math-player-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:14px 0}
#math-mode .math-player-grid button{position:relative;display:grid;gap:4px;place-items:center;min-height:76px;border-radius:12px;background:#403456;border:2px solid #8e7cae;padding:8px;color:#fff}
#math-mode .math-player-grid button[aria-pressed=true]{border-color:#ffd75b;background:#624a31}
.math-player-grid button span{font-size:23px}.math-player-grid button small{font-size:14px}.math-player-grid button em{position:absolute;right:4px;top:2px;color:#ffe294;font-style:normal}
#math-mode .math-dual-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;height:calc(100dvh - 70px);min-height:430px}
#math-mode.math-dual .math-main{max-width:none;padding:4px}
.math-dual-grid iframe{width:100%;height:100%;border:2px solid #9c85d6;border-radius:10px;background:#21182e;min-width:0}
#math-mode.math-split-seat .math-header{padding:6px 10px;justify-content:space-between;min-height:32px}
.math-seat-header span{display:flex;align-items:center;gap:5px}.math-seat-header .cup-icon{width:25px;height:25px}
#math-mode.math-split-seat .math-main{padding:7px;max-width:none}
#math-mode.math-split-seat .math-menu-intro h1{font-size:22px}
#math-mode.math-split-seat .math-menu-intro p{display:none}
#math-mode.math-split-seat .math-operations button{min-width:0;padding:4px}
#math-mode.math-split-seat .math-operations img{max-width:70px;height:auto}
@media(max-width:700px) and (orientation:portrait){#math-mode .math-dual-grid{grid-template-columns:1fr;grid-template-rows:1fr 1fr;height:calc(100dvh - 65px);min-height:620px}}

/* Profile editing is independent of the numbered student slot. */
.math-player-card{position:relative;min-width:0}
#math-mode .math-player-card>button[data-seat]{width:100%;min-height:92px;padding:7px 3px}
.math-player-card strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
#math-mode .math-player-grid .math-seat-edit{position:absolute;top:2px;right:2px;min-height:26px;min-width:26px;padding:0;font-size:18px;border-radius:8px;border:1px solid #d2bfe7;background:#292139;z-index:1}
.math-player-grid button em{right:auto;left:4px}
.math-profile-form label{display:grid;gap:6px;text-align:start;margin:12px 0}
.math-profile-form input{font:inherit;background:#fff;color:#241a35;border:2px solid #a896d9;border-radius:9px;padding:12px;width:100%;box-sizing:border-box;min-height:46px}
.math-animal-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin:14px 0}
#math-mode .math-animal-grid button{font-size:27px;background:#403456;border:2px solid #8e7cae;border-radius:9px;min-height:45px;padding:4px;color:#fff}
#math-mode .math-animal-grid button[aria-pressed=true]{background:#624a31;border-color:#ffd75b}
@media(max-width:430px){.math-player-grid{grid-template-columns:repeat(2,1fr)}.math-player-card strong{font-size:14px}.math-animal-grid{grid-template-columns:repeat(4,1fr)}}

/* Whiteboard compatibility: fixed logical layout without the giant GPU transform,
   static actors and simplified paint, while preserving readable quiz graphics. */
#board-mode{min-height:48px;white-space:nowrap;font-weight:800;font-size:16px;padding-inline:9px}
#board-mode[aria-pressed=true]{background:#425834;border-color:#c5ed79;color:#efffc8}
.phone-portrait #board-mode{min-height:68px;font-size:23px;padding-inline:8px}
.phone-portrait .language-picker{max-width:150px}
#game.board-mode .aura-flames,#game.board-mode .newly-unlocked,#game.board-mode .unlocked-result,#game.board-mode .dragon[data-mood="normal"]:not(.talking) .dragon-motion{animation:none!important}
#game.board-mode .fx-ultimate,#game.board-mode .fx-ultimate-shot,#game.board-mode .fx-charge,#game.board-mode .fx-fire-breath,#game.board-mode .dragon-ground{filter:none!important;box-shadow:none!important}
#game.board-mode .fx-ultimate:before{display:none}
#game.board-mode .board-backdrop{position:absolute;inset:0;pointer-events:none;background:#392956}
#game.board-mode .dragon-halo,#game.board-mode .aura-ember,#game.board-mode .orbit{display:none!important}
#game.board-mode .fx-class-shot,#game.board-mode .fx-ultimate-shot,#game.board-mode .dragon-image:not(.secret-boss *),#game.board-mode .class-creature-image:not(.secret-boss *),#game.board-mode .cup-icon,#game.board-mode .power-aura{filter:none!important}
#game.board-mode #field{box-shadow:none}
@supports(zoom:1){#game.board-mode{transform:none;zoom:var(--scale,1)}}

/* The next action stays reachable even on long multiplication/division lists. */
#math-mode .math-menu-footer,#math-mode .math-start-footer{position:sticky;bottom:0;z-index:12;background:#21182e;border:1px solid #8064a0;border-radius:14px;padding:9px;box-shadow:0 -3px 14px #100b19a0;margin-top:12px}
#math-mode .math-start-footer{display:flex;justify-content:center}
#math-mode .math-start-footer button{flex:1;min-height:54px;font-size:clamp(18px,3vw,24px)}
#math-mode .math-menu-footer button{min-height:46px}
#math-mode{scroll-padding-bottom:86px}
@media(max-height:525px){#math-mode .math-menu-footer,#math-mode .math-start-footer{padding:5px;margin-top:7px}#math-mode .math-menu-footer button,#math-mode .math-start-footer button{min-height:40px;font-size:14px;padding:6px}}

#game.board-mode .fx-fire-breath{max-width:180px;max-height:180px}
#game.board-mode .fx-ultimate .ultimate-cutout{filter:none!important}

/* Color identification: larger stimulus; optional help on beginner levels only. */
.curriculum-color{width:100px;height:65px;border:3px solid #666;border-radius:10px}
.color-hint-toggle{font-size:16px;min-height:32px;padding:4px 10px;align-self:center}
.answer-card.words-only.color-hint-picture{grid-template-rows:minmax(0,1fr) auto}
.color-hint-swatch{width:min(86%,125px);height:clamp(40px,7cqw,76px);align-self:center;justify-self:center}
.phone-portrait .curriculum-color{width:100px;height:62px}
.phone-portrait .color-hint-swatch{width:min(86%,125px);height:64px}
.phone-portrait .color-hint-toggle{font-size:22px;min-height:40px}

/* Color preference cards: read the words and the clear like/dislike symbol. */
.answer-card.words-only.color-like-card{display:flex;align-items:center;justify-content:center;min-width:0;padding:33px 8px 10px}
.like-color-options{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;width:100%;max-width:100%}
.like-color-chip{display:flex;align-items:center;justify-content:center;gap:9px;color:#2c223b;font-size:clamp(19px,3.2cqw,42px);font-weight:850;line-height:1.08;max-width:100%;overflow-wrap:anywhere}
.like-color-sign{font-size:1.3em;flex:0 0 auto;line-height:1}
.like-yes{color:#087133}.like-no{color:#bc2445}
.like-color-swatch{width:clamp(28px,4cqw,58px);height:clamp(28px,4cqw,58px);border-radius:50%;border:2px solid #524454;background:var(--swatch);flex:0 0 auto}
.color-like-card.two-color .like-color-chip{font-size:clamp(17px,2.65cqw,34px)}
.phone-portrait .color-like-card .like-color-chip{font-size:30px;gap:5px}
.phone-portrait .like-color-swatch{width:42px;height:42px}

/* Per-player medal history: repeat wins remain visible without changing unlock ranks. */
.math-cup-history{width:min(660px,95vw);max-height:88vh;color:#fff;background:#2a203d;border:2px solid #b4a0e8;border-radius:18px;padding:14px;overflow:auto}
.math-cup-history::backdrop{background:#130f22bc}
.cup-history-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cup-history-head h2{margin:0;font-size:clamp(18px,3vw,24px)}
.cup-history-totals{display:flex;gap:12px;justify-content:center;margin:12px 0}
.cup-history-totals span{display:flex;align-items:center;gap:6px;background:#403456;border-radius:10px;padding:5px 10px;font-size:22px}
.cup-history-totals .cup-icon{width:36px;height:36px}
.cup-history-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:10px 0}
#math-mode .cup-history-tabs button{min-width:0;font-size:clamp(12px,2.4vw,16px);padding:6px}
.cup-history-scroll{max-height:51vh;overflow:auto;border:1px solid #6d588b;border-radius:10px}
.cup-history-scroll table{border-collapse:collapse;width:100%;font-size:clamp(13px,2vw,17px)}
.cup-history-scroll thead{position:sticky;top:0;background:#392b4e;z-index:1}
.cup-history-scroll th,.cup-history-scroll td{padding:8px 5px;text-align:center;border-bottom:1px solid #59476e}
.cup-history-scroll th:first-child{text-align:start;max-width:40%}
.cup-history-scroll .cup-icon{width:28px;height:28px;margin:auto}
.cup-history-scroll small{display:block;font-size:12px}
.cup-history-count{font-weight:850;min-width:40px;font-variant-numeric:tabular-nums}
.cup-history-count.empty{color:#a69aaf;font-weight:500}
.cup-history-count.earned{background:#594322;color:#fff4bc}

/* In-place special attacks for electronic boards: only small local effects. */
#game.board-mode .board-ultimate-title{font-size:clamp(28px,5cqw,64px);top:9%;max-width:94%;color:#fff6ca;text-shadow:0 3px #37223f;z-index:12}
#game.board-mode .board-ultimate-result{top:16%;font-size:38px;color:#e8ffad;text-shadow:0 3px #342748}
.fx-board-ultimate-shot{position:absolute;display:grid;place-items:center;font-size:84px;font-weight:900;text-shadow:0 2px 0 #39223c;pointer-events:none;z-index:5}
#game.board-mode .board-ultimate-actor{outline:3px solid #ffdc7966;outline-offset:2px;border-radius:28px}
.fx-board-ultimate-shot svg{width:100%;height:100%;display:block}

/* Shared learner selector, below the brand instead of crowding the masthead. */
.english-player-button{display:block;max-width:215px;min-height:26px;padding:2px 9px;margin-top:4px;font-size:15px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;color:#f4dc94;border-color:#b9a368}
.phone-portrait .english-player-button{max-width:230px;font-size:22px;min-height:34px;margin-top:3px}

.unit-stage-dialog{max-width:560px}.unit-stage-grid{display:grid;gap:8px;max-height:55vh;overflow:auto;padding:6px}
.unit-stage-button{min-height:52px;text-align:left;padding:10px 14px}.unit-stage-button:disabled{opacity:.48}

/* Three independent portrait-format play areas on a classroom display. */
#math-mode .math-dual-grid.math-triple-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr;gap:6px}
#math-mode.math-three-seat .math-main{padding:5px;max-width:100%;min-width:0}
#math-mode.math-three-seat .math-battle{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
#math-mode.math-three-seat .math-arena{grid-row:auto;grid-column:1;grid-template-rows:52px minmax(85px,clamp(100px,16vh,145px));height:auto;min-width:0}
#math-mode.math-three-seat .math-prompt,#math-mode.math-three-seat .math-keypad,#math-mode.math-three-seat .math-response,#math-mode.math-three-seat .math-result-actions{grid-column:1}
#math-mode.math-three-seat .math-keypad{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
#math-mode.math-three-seat .math-keypad button{min-height:42px;font-size:26px}
#math-mode.math-three-seat .math-menu-footer button,#math-mode.math-three-seat .math-start-footer button{min-width:0;font-size:14px;padding:8px 3px}
#math-mode.math-three-seat .math-levels{grid-template-columns:repeat(2,minmax(0,1fr))}
#math-mode.math-three-seat .math-levels.tables{grid-template-columns:repeat(4,minmax(0,1fr))}
#math-mode.math-three-seat .math-levels button{min-height:38px;font-size:13px;padding:4px}
#math-mode.math-three-seat .math-levels button small{min-width:18px;height:18px;font-size:11px}
#math-mode.math-three-seat .math-operations{gap:4px}
#math-mode.math-three-seat .math-operations img{max-width:62px}
#math-mode.math-three-seat .math-player-bar{margin:5px 0}
#math-mode.math-three-seat .math-time-settings{gap:4px;padding:5px}
@media(max-width:700px) and (orientation:portrait){#math-mode .math-dual-grid.math-triple-grid{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(330px,1fr));min-height:990px;height:auto}}

.math-record-tools{display:flex;justify-content:flex-end;gap:6px;margin-top:12px;opacity:.86;border-top:1px solid #6c587f;padding-top:7px}
.math-record-tools button{font-size:12px!important;min-height:30px!important;padding:3px 8px!important;background:#392d49;color:#e6d7f4;border:1px solid #8c78a4;border-radius:8px}
.math-record-tools [data-record-reset]{color:#f7aeae;border-color:#a56b73}
.math-backup-list{display:grid;gap:7px;max-height:55vh;overflow:auto;margin:12px 0}
.math-backup-list button{min-height:40px;padding:7px;border-radius:8px}

/* Classroom multi-touch: keep native scroll in menus, disable pinch gestures on play surfaces. */
html.math-multitouch-active,html.math-multitouch-active body,html.math-multitouch-active #math-mode .math-battle {touch-action:none;overscroll-behavior:none}
#math-mode.math-split-seat .math-keypad button,#math-mode.math-split-seat .math-result-actions button{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
@media (orientation:landscape){#math-mode.math-dual .math-dual-grid,#math-mode.math-dual .math-dual-grid iframe{touch-action:none;overscroll-behavior:none}}

@media (orientation:landscape){html.math-multitouch-parent,html.math-multitouch-parent body{touch-action:none;overscroll-behavior:none}}

/* Mode selection also accepts multiple fingers while retaining vertical scrolling. */
html.math-multitouch-seat:not(.math-multitouch-active),html.math-multitouch-seat:not(.math-multitouch-active) body,html.math-multitouch-seat:not(.math-multitouch-active) #math-mode,html.math-multitouch-seat:not(.math-multitouch-active) #math-mode button{touch-action:pan-y;overscroll-behavior:contain}

/* Classroom system bars can cover the viewport bottom. Replace inactive keys with the next action. */
#math-mode.math-split-seat .math-answered .math-keypad{display:none}
#math-mode.math-split-seat .math-result-actions{margin-top:4px;padding-bottom:12px}
#math-mode.math-split-seat .math-result-actions button{min-height:48px}
@media (orientation:landscape){#math-mode.math-dual .math-dual-grid{height:calc(100dvh - 74px);min-height:300px}}

/* Fit each split battle into the actual available height; shrink the arena before controls. */
html.math-multitouch-active #math-mode.math-three-seat{display:flex;flex-direction:column;overflow:hidden}
html.math-multitouch-active #math-mode.math-three-seat>.math-header{flex:none}
html.math-multitouch-active #math-mode.math-three-seat>.math-main{flex:1;min-height:0;width:100%;margin:0;padding:4px 5px 10px}
#math-mode.math-three-seat .math-battle:not(.math-practice){height:100%;grid-template-rows:auto auto minmax(0,1fr) auto auto auto;gap:4px;align-items:stretch}
#math-mode.math-three-seat .math-battle:not(.math-practice) .math-arena{grid-template-rows:auto minmax(0,1fr);min-height:0;height:auto;padding:5px 5% 3px;row-gap:2px}
#math-mode.math-three-seat .math-hp{gap:2px;grid-template-rows:auto 10px auto}
#math-mode.math-three-seat .math-hp [role=meter]{height:10px}
#math-mode.math-three-seat .math-prompt{padding:5px 6px;min-height:0}
#math-mode.math-three-seat .math-answer-display{min-height:36px}
#math-mode.math-three-seat .math-response{min-height:18px;font-size:13px;gap:3px}
#math-mode.math-three-seat .math-keypad{gap:4px;grid-template-columns:repeat(3,minmax(0,1fr))}
#math-mode.math-three-seat .math-keypad button{min-height:clamp(32px,7vh,45px);height:clamp(32px,7vh,45px);font-size:clamp(21px,4.5vh,28px);padding:1px}
#math-mode.math-three-seat .math-result-actions{padding-bottom:0;margin-top:1px}
#math-mode.math-three-seat .math-battle.math-answered:not(.math-practice){grid-template-rows:auto auto minmax(65px,1fr) auto auto auto;max-height:86%}
@media(max-height:460px){
#math-mode.math-three-seat .math-keypad{grid-template-columns:repeat(6,minmax(0,1fr))}
#math-mode.math-three-seat .math-keypad button:nth-child(n){grid-column:auto;grid-row:auto}
#math-mode.math-three-seat .math-keypad button{min-height:34px;height:34px;font-size:20px}
#math-mode.math-three-seat .math-battle-top{font-size:11px}
#math-mode.math-three-seat .math-battle-top button{min-height:30px;font-size:12px;padding:3px}
}
#math-mode.math-three-seat .math-practice{height:100%;grid-template-rows:auto minmax(0,1fr) auto auto auto auto;gap:4px;align-items:stretch}
#math-mode.math-three-seat .math-practice-head{min-height:0;overflow:hidden}
#math-mode.math-three-seat .math-practice-head img{height:100%;max-height:100%;min-height:0;width:40%;object-fit:contain}

#math-mode #math-battle-time{border:2px solid #c4efa2;border-radius:10px;color:#eaffae;background:#38294b;padding:6px 12px;font-size:16px;min-height:40px}
.math-time-dialog{position:fixed;inset:0;margin:auto;width:min(360px,calc(100% - 20px));max-height:calc(100% - 20px);overflow:auto;padding:16px;background:#29203d;border:2px solid #b5a1df;border-radius:15px;color:#fff;text-align:center;touch-action:pan-y}
.math-time-dialog::backdrop{background:#100b20ab}
.math-time-dialog h2{font-size:20px;margin:0 26px 5px}
#math-mode .math-time-close{position:absolute;right:7px;top:7px;min-height:30px;padding:3px 7px;font-size:14px}
.math-time-standard{color:#e5ff9b;font-weight:850;margin:8px 0}
.math-time-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#math-mode .math-time-options button{padding:5px 2px;min-height:44px;font-size:15px;touch-action:manipulation}
#math-mode .math-time-options .recommended{border:2px solid #dfff85;background:#4d643a;color:#efffc8}
#math-mode .math-time-options [aria-pressed=true]{outline:2px solid #fff;outline-offset:1px}
.math-time-options small{font-size:11px;white-space:nowrap}
.math-time-warning{font-size:13px;line-height:1.45;color:#ffe3a3;text-align:left;margin:12px 0 0}

.visual-cue{display:flex;gap:6px;align-items:center;justify-content:center}
.preference-visual{font-size:32px;color:#ff799f;font-weight:bold}
.scenario-cue{display:flex;gap:10px;align-items:center;justify-content:center;font-size:clamp(26px,4vw,42px)}
.scene-word{font-size:clamp(13px,2vw,19px);color:#e6e3ff}
.question-board .visual-cue .food-art,.question-board .visual-cue .box-choice-icon{width:100px;height:92px;max-width:100%;object-fit:contain;margin:0}
.question-board .visual-cue .word-emoji,.question-board .visual-cue .word-art{max-width:100px;max-height:92px}
.phone-portrait .question-board .visual-cue .food-art,.phone-portrait .question-board .visual-cue .box-choice-icon{width:96px;height:88px}

/* Single subject chooser, shared by all three learning modes. */
#subject-picker{width:min(340px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:16px;color:#f1eefc;background:#261d39;border:2px solid #9077ba;border-radius:20px;box-shadow:0 12px 35px #0008;overflow:auto;touch-action:manipulation}
#subject-picker::backdrop{background:#110d20aa}
#subject-picker header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}
#subject-picker h2{margin:0;font-size:23px}
#subject-picker header button{font-size:25px;min-width:44px;min-height:44px;padding:0}
#subject-picker .subject-choice{display:flex;align-items:center;gap:12px;width:100%;min-height:62px;margin:8px 0;padding:8px 14px;text-align:start;background:#3a3051;color:#f8f4ff;border:1px solid #9b82bc;border-radius:12px;font-size:20px}
#subject-picker .subject-choice[aria-pressed=true]{border-color:#e4f7a6;background:#3d4a38;color:#f1ffcb}
#subject-picker .subject-choice strong{flex:1}
body.flag-active #crv-support-funnel{display:none!important}
