:root {
  --sun: #ffb84d;
  --sky: #4db8ff;
  --leaf: #7fd67f;
  --rose: #ff8fa3;
  --lavender: #c8a8ff;
  --cream: #fff8e7;
  --paper: #fffdf6;
  --ink: #2f2a24;
  --ink-soft: #6b5e4e;
  --line: #eadcc3;
  --good: #24b47e;
  --danger: #ff5a5f;
  --shadow: 0 12px 28px rgba(67, 48, 16, 0.14);
  --shadow-soft: 0 6px 18px rgba(67, 48, 16, 0.1);
  --shadow-lift: 0 18px 38px rgba(47, 42, 36, 0.16);
  --font: "Fredoka", "Arial Rounded MT Bold", Arial, sans-serif;
  --site-header-height: 72px;
  --page-shell: min(1160px, calc(100% - 32px));
  --page-gutter: max(16px, calc((100vw - 1160px) / 2));
}

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

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

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(77, 184, 255, 0.22), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(255, 143, 163, 0.22), transparent 24%),
    linear-gradient(145deg, #fff8e7 0%, #eaf8ff 56%, #fffdf6 100%);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

#app {
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--site-header-height));
  margin-top: var(--site-header-height);
  overflow: hidden;
}

.site-game-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--site-header-height);
  padding: max(8px, env(safe-area-inset-top)) max(var(--page-gutter), env(safe-area-inset-right)) 8px max(var(--page-gutter), env(safe-area-inset-left));
  border-bottom: 1px solid rgba(15, 118, 110, 0.14);
  background: rgba(255, 248, 237, 0.94);
  color: #134e4a;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.12);
  backdrop-filter: blur(16px);
}

.site-game-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #134e4a;
  text-decoration: none;
}

.site-game-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  flex: 0 0 auto;
  border: 3px solid #134e4a;
  border-radius: 16px;
  background: linear-gradient(135deg, #fef08a, #5eead4 48%, #fb7185);
  box-shadow: 0 4px 0 rgba(19, 78, 74, 0.24);
  color: #134e4a;
  font-size: 22px;
  font-weight: 900;
}

.site-game-brand strong {
  display: block;
  color: #134e4a;
  font-size: clamp(20px, 3.2vw, 28px);
  line-height: 1;
}

.site-game-brand small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.site-game-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.site-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 18px;
  border: 2px solid rgba(15, 118, 110, 0.18);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08), 0 8px 18px rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-game-brand:focus-visible,
.site-home-link:focus-visible {
  outline: 4px solid rgba(20, 184, 166, 0.45);
  outline-offset: 3px;
}

#party-canvas {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 70;
  width: min(92vw, 430px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  margin-top: 8px;
  padding: 12px 16px;
  border: 2px solid rgba(47, 42, 36, 0.08);
  border-radius: 18px;
  background: rgba(255, 253, 246, 0.94);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
}

.screen {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 20px);
  width: var(--page-shell);
  margin: 0 auto;
  overflow: hidden;
  padding: clamp(14px, 2.4vw, 26px) 0;
}

.screen-scroll {
  display: block;
  overflow-y: auto;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 18px);
  flex-wrap: wrap;
  min-height: 52px;
}

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

.mascot {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--sun), #ffe7a8);
  box-shadow: var(--shadow-soft);
  font-size: 28px;
}

.brand-title {
  margin: 0;
  font-size: clamp(24px, 6vw, 46px);
  line-height: 1;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-weight: 600;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-btn,
.btn,
.chip-btn,
.answer-card,
.table-tile,
.mode-card,
.confidence-btn,
.row-move {
  border: 0;
  cursor: pointer;
  color: var(--ink);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  font-size: 20px;
}

.sound-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.sound-btn[aria-pressed="true"] {
  background: #fff;
}

.voice-toggle[aria-pressed="true"] {
  background: linear-gradient(145deg, #fff, #eafff6);
  color: #0f766e;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--sun);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  text-decoration: none;
}

.btn.secondary {
  background: #fff;
}

.btn.sky {
  background: var(--sky);
  color: #fff;
}

.btn.good {
  background: var(--leaf);
}

.btn:disabled,
.mode-card:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.58;
}

.btn:focus-visible,
.icon-btn:focus-visible,
.sound-btn:focus-visible,
.chip-btn:focus-visible,
.answer-card:focus-visible,
.table-tile:focus-visible,
.mode-card:focus-visible,
.confidence-btn:focus-visible,
.row-move:focus-visible {
  outline: 4px solid rgba(47, 42, 36, 0.85);
  outline-offset: 3px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(14px, 2.4vw, 26px);
  align-items: stretch;
  flex: 0 0 auto;
  min-height: 0;
}

.panel,
.mode-stage,
.reward-card {
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 253, 246, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel {
  padding: clamp(18px, 2.4vw, 30px);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(250px, 30vw, 390px);
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  position: absolute;
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(14px, 3vw, 30px);
  width: clamp(88px, 14vw, 150px);
  height: clamp(88px, 14vw, 150px);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(47, 42, 36, 0.12) 2px, transparent 2px),
    linear-gradient(180deg, rgba(47, 42, 36, 0.12) 2px, transparent 2px),
    linear-gradient(145deg, rgba(255, 184, 77, 0.38), rgba(77, 184, 255, 0.2));
  background-size: 24px 24px, 24px 24px, 100% 100%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
  content: "";
  opacity: 0.8;
  pointer-events: none;
  transform: rotate(-4deg);
}

.hero-kicker {
  width: fit-content;
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff0c7;
  color: #7a4e00;
  font-size: 14px;
  font-weight: 800;
}

.hero-panel h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 780px;
  font-size: clamp(38px, 6.5vw, 82px);
  line-height: 0.94;
}

.hero-panel p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 18px 0 22px;
  color: var(--ink-soft);
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 600;
  line-height: 1.25;
}

.hero-actions,
.round-actions,
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.round-actions {
  justify-content: center;
}

.modal-actions {
  justify-content: center;
  margin-top: 16px;
}

.modal-actions .btn {
  min-width: 168px;
}

.stats-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.stat-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.stat-row:nth-child(2) .stat-icon {
  background: #eafff6;
}

.stat-row:nth-child(3) .stat-icon {
  background: #eef5ff;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff0c7;
  font-size: 20px;
  font-weight: 800;
}

.stat-row > div:last-child {
  min-width: 0;
}

.stat-row strong,
.mode-title,
.tile-number {
  display: block;
  font-size: 18px;
}

.stat-row strong {
  line-height: 1.08;
  font-size: 22px;
}

.stat-row span {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
}

.quest-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 5vw, 40px);
}

.section-copy {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
}

.selected-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: #0f766e;
  font-weight: 800;
  white-space: nowrap;
}

.difficulty-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chip-btn {
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.chip-btn.active {
  background: var(--ink);
  color: #fff;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 14px);
}

.table-tile {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.table-tile::after {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(47, 42, 36, 0.12) 2px, transparent 2px),
    linear-gradient(180deg, rgba(47, 42, 36, 0.12) 2px, transparent 2px),
    rgba(255, 240, 199, 0.72);
  background-size: 12px 12px, 12px 12px, 100% 100%;
  content: "";
}

.table-tile:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.table-tile.current {
  background: linear-gradient(145deg, #fff, #fff2cf);
  outline: 3px solid rgba(255, 184, 77, 0.6);
}

.tile-number {
  font-size: 34px;
  line-height: 1;
}

.tile-meta {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.tile-status {
  margin-top: 5px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.stars {
  color: #d98b00;
  letter-spacing: 1px;
}

.journey-layout {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
}

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

.mode-card {
  min-height: 128px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.mode-card small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadcc3;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--sky));
  transition: width 250ms ease;
}

.mode-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.mode-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.mode-stage {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(12px, 2vw, 20px);
}

.flash-stage {
  align-self: start;
  width: 100%;
  min-height: auto;
  overflow: visible;
}

.mascot-line {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
}

.speech {
  padding: 10px 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
  font-weight: 700;
}

.equation {
  font-size: clamp(42px, 12vw, 92px);
  line-height: 1;
  font-weight: 700;
  text-align: center;
}

.equation.small {
  font-size: clamp(30px, 8vw, 58px);
}

.visual-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
  margin: 14px auto;
  max-width: 780px;
}

.group-box {
  min-height: 66px;
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.beads {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.bead {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sky);
}

.group-label {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.flash-wrap {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.flash-card {
  display: grid;
  place-items: center;
  width: min(520px, 100%);
  min-height: clamp(190px, 34vh, 300px);
  padding: clamp(18px, 3vw, 26px);
  border: 0;
  border-radius: 28px;
  background: #0f766e;
  box-shadow: var(--shadow);
  color: #fffdf6;
  text-align: center;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.flash-card:hover {
  transform: translateY(-2px);
}

.flash-card.prompt .hint {
  color: rgba(255, 253, 246, 0.82);
}

.flash-card.revealed {
  background: linear-gradient(145deg, #fff0c7, #ffb84d);
  color: var(--ink);
}

.flash-card.revealed .hint {
  color: #5f4f3d;
}

.flash-answer {
  font-size: clamp(58px, 15vw, 104px);
  line-height: 1;
}

.hint {
  color: var(--ink-soft);
  font-weight: 700;
}

.confidence-row,
.answers-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.confidence-btn,
.answer-card {
  min-height: 58px;
  padding: 12px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-size: clamp(20px, 5vw, 34px);
  font-weight: 700;
  touch-action: none;
  user-select: none;
}

.confidence-btn {
  font-size: 18px;
}

.drop-zone {
  display: grid;
  place-items: center;
  width: min(520px, 100%);
  min-height: 112px;
  margin: 18px auto;
  border: 4px dashed rgba(77, 184, 255, 0.65);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 24px;
  font-weight: 700;
}

.drop-zone.ready {
  border-color: var(--leaf);
  background: #f2fff3;
}

.answer-card.selected {
  outline: 4px solid var(--sky);
}

.answer-card.dragging {
  opacity: 0.45;
}

.drag-ghost {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: var(--shadow-lift);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 16px auto;
}

.match-card {
  position: relative;
  min-height: 96px;
  border: 0;
  border-radius: 20px;
  background: var(--lavender);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transform-style: preserve-3d;
}

.match-card.revealed,
.match-card.matched {
  background: #fff;
}

.match-card.matched {
  outline: 4px solid rgba(36, 180, 126, 0.5);
}

.build-list {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin: 14px auto;
}

.build-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.drag-handle {
  color: var(--ink-soft);
  font-size: 22px;
  font-weight: 700;
}

.row-move {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff1c7;
  font-weight: 700;
}

.boss-scene {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin: 12px auto 20px;
}

.boss {
  display: grid;
  place-items: center;
  width: min(240px, 60vw);
  aspect-ratio: 1;
  border-radius: 38% 45% 42% 40%;
  background: linear-gradient(145deg, #c8a8ff, #7fd67f);
  box-shadow: var(--shadow);
  font-size: clamp(64px, 18vw, 124px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(47, 42, 36, 0.28);
}

.reward-card {
  width: min(540px, 100%);
  padding: clamp(20px, 3vw, 28px);
  text-align: center;
}

.reward-card h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 8vw, 52px);
}

.reward-card .section-copy {
  margin: 8px 0 0;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff0c7;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

@media (max-width: 820px) {
  :root {
    --site-header-height: 68px;
  }

  body {
    overflow: hidden;
  }

  .hero-grid,
  .journey-layout {
    grid-template-columns: 1fr;
    flex: 0 0 auto;
  }

  .hero-grid {
    display: block;
  }

  .hero-grid > * + * {
    margin-top: 14px;
  }

  .hero-panel {
    min-height: auto;
  }

  .hero-panel::after {
    opacity: 0.35;
  }

  .stats-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-row {
    display: block;
    min-height: 86px;
    padding: 12px;
  }

  .stat-icon {
    display: none;
  }

  .stat-row strong {
    font-size: 19px;
  }

  .stat-row span {
    font-size: 13px;
  }

  .table-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mode-list {
    grid-template-columns: 1fr;
  }

  .mode-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mode-header .toolbar {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: -2px;
  }

  .mode-shell {
    gap: 8px;
  }

  .mode-stage {
    padding: 12px;
  }

  .flash-card {
    width: min(100%, 500px);
    min-height: clamp(180px, 30vh, 270px);
  }

  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  :root {
    --site-header-height: 66px;
  }

  .site-game-header {
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .site-game-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 20px;
  }

  .site-game-brand strong {
    font-size: 18px;
    white-space: nowrap;
  }

  .site-game-brand small {
    display: none;
  }

  .site-game-actions {
    width: auto;
    margin-left: auto;
  }

  .site-home-link {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 15px;
    font-size: 14px;
  }

  .topbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }

  .brand-lockup {
    flex: 1 1 auto;
  }

  .toolbar {
    flex: 0 0 auto;
    gap: 6px;
  }

  .mascot {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 24px;
  }

  .brand-title {
    overflow: hidden;
    font-size: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .screen {
    padding: 10px 0 14px;
  }

  .panel {
    padding: 14px;
  }

  .quest-panel {
    padding: 0;
  }

  .brand-subtitle,
  .speech {
    display: none;
  }

  .mode-header {
    gap: 8px;
  }

  .mode-header .toolbar {
    gap: 8px;
  }

  .mode-stage {
    padding: 10px;
  }

  .flash-wrap {
    gap: 10px;
  }

  .flash-card {
    min-height: clamp(176px, 28vh, 250px);
    border-radius: 24px;
  }

  .confidence-row {
    gap: 8px;
  }

  .confidence-btn {
    min-height: 52px;
    padding: 10px 14px;
    font-size: 16px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .reward-card {
    padding: 18px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .modal-actions .btn {
    min-width: 0;
    width: 100%;
  }

  .hero-kicker {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .hero-panel::after {
    right: 12px;
    bottom: 14px;
    width: 76px;
    height: 76px;
    opacity: 0.22;
  }

  .hero-panel h2 {
    font-size: clamp(38px, 14vw, 58px);
  }

  .hero-panel p {
    margin: 14px 0 18px;
    font-size: 18px;
  }

  .hero-grid > * + * {
    margin-top: 10px;
  }

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

  .selected-pill {
    width: fit-content;
    min-height: 36px;
    margin-top: 10px;
    padding: 0 12px;
    font-size: 14px;
  }

  .stats-panel {
    gap: 8px;
  }

  .stat-row {
    display: block;
    min-height: 58px;
    padding: 10px;
    border-radius: 14px;
  }

  .stat-icon {
    display: none;
  }

  .stat-row strong {
    font-size: 15px;
  }

  .stat-row span {
    font-size: 11px;
  }

  .sound-btn {
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

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

  .table-tile {
    min-height: 76px;
    padding: 12px;
  }

  .table-tile::after {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    right: 9px;
    top: 9px;
  }

  .tile-number {
    font-size: 28px;
  }

  .tile-status {
    display: none;
  }

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

  .match-card {
    min-height: 82px;
  }

  .build-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .drag-handle {
    display: none;
  }
}
