:root {
  --ink: #121417;
  --paper: #fffdf8;
  --muted: #63707a;
  --line: #d9e1df;
  --teal: #18b7a7;
  --yellow: #ffd166;
  --coral: #ef476f;
  --blue: #3a86ff;
  --green: #60d394;
  --violet: #7c5cff;
  --shadow: 0 18px 50px rgba(18, 20, 23, .14);
}

* { box-sizing: border-box; }
html, body {
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}
@supports (overflow: clip) {
  html, body {
    overflow-x: clip;
  }
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 209, 102, .32), transparent 24rem),
    radial-gradient(circle at 92% 14%, rgba(24, 183, 167, .26), transparent 22rem),
    linear-gradient(135deg, #fffdf8 0%, #ecfff7 45%, #fff3f5 100%);
}

a { color: inherit; }
.ghost,
.nav-link,
.top-map-link {
  text-decoration: none;
}
.top-map-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 900;
}
.nav-link {
  display: inline-flex;
  align-items: center;
}
button, input, select { font: inherit; }
button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(18, 20, 23, .18); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.primary { background: linear-gradient(135deg, var(--teal), var(--blue)); font-weight: 800; }
.ghost { background: white; color: var(--ink); border: 1px solid var(--line); }

:where(
  .auth-shell,
  .auth-brand,
  .auth-panel,
  .app-layout,
  .workspace,
  .panel,
  .panel-head,
  .quest-map-preview,
  .quest-shell,
  .quest-appbar,
  .quest-progress-panel,
  .quest-main-grid,
  .quest-map-panel,
  .quest-side-panel,
  .quest-section-head,
  .quest-menu-drawer,
  .quest-roadmap-panel,
  .quest-utility-panel,
  .arena-profile-panel,
  .game-window,
  .game-window-shell,
  .game-window-toolbar,
  .game-window-controls,
  .game-stage,
  .game-help-card
) {
  max-width: 100%;
  min-width: 0;
}

:where(
  .quest-map-preview,
  .quest-shell,
  .quest-roadmap-panel,
  .quest-utility-panel,
  .arena-profile-panel,
  .game-window,
  .game-window-shell
) {
  overflow-x: hidden;
}
@supports (overflow: clip) {
  :where(
    .quest-map-preview,
    .quest-shell,
    .quest-roadmap-panel,
    .quest-utility-panel,
    .arena-profile-panel,
    .game-window,
    .game-window-shell
  ) {
    overflow-x: clip;
  }
}

:where(
  .panel-head,
  .quest-appbar,
  .quest-progress-panel,
  .quest-main-grid,
  .quest-section-head,
  .quest-roadmap-panel-head,
  .quest-utility-head,
  .arena-profile-head,
  .game-window-toolbar,
  .game-window-controls,
  .game-help-head
) > * {
  min-width: 0;
}

:where(
  .quest-menu-close,
  .quest-roadmap-close,
  .quest-utility-close,
  .game-help-close,
  #gameCloseButton,
  #vocabGameCloseButton
) {
  flex: 0 0 auto;
}
.button-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-weight: 800;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.flash-stack {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(680px, calc(100% - 24px));
  transform: translateX(-50%);
}
.flash {
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  padding: 12px 14px;
  background: white;
  box-shadow: var(--shadow);
}
.flash.error { border-left-color: var(--coral); }
.flash.info { border-left-color: var(--teal); }

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}
.auth-shell {
  display: grid;
  grid-template-columns: minmax(260px, 460px) minmax(320px, 520px);
  gap: 22px;
  width: min(1020px, 100%);
}
.auth-shell.narrow { grid-template-columns: minmax(320px, 520px); justify-content: center; }
.auth-brand {
  min-height: 560px;
  border-radius: 8px;
  padding: 42px;
  color: white;
  background:
    linear-gradient(150deg, rgba(18,20,23,.72), rgba(18,20,23,.08)),
    conic-gradient(from 120deg, var(--teal), var(--yellow), var(--coral), var(--blue), var(--teal));
  box-shadow: var(--shadow);
}
.auth-logo { width: 96px; height: 96px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.18)); }
.auth-brand h1 {
  margin: 44px 0 12px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: .92;
  letter-spacing: 0;
}
.auth-brand p { margin: 0; max-width: 320px; font-size: 20px; font-weight: 800; }
.auth-panel {
  align-self: stretch;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.auth-panel.single { min-height: 0; }
.auth-language {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.auth-language label {
  width: min(180px, 100%);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.auth-tab { background: white; color: var(--ink); border: 1px solid var(--line); font-weight: 800; }
.auth-tab.active { background: var(--ink); color: white; }
.auth-form { display: none; gap: 14px; }
.auth-form.active { display: grid; }
.auth-help {
  color: #5b6678;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.auth-form-message {
  border: 1px solid rgba(220, 38, 38, .25);
  border-left: 5px solid var(--coral);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff7ed;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 750;
}
.auth-form-message ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.auth-form-message li + li { margin-top: 4px; }
.auth-form-message.info {
  border-color: rgba(20, 184, 166, .24);
  border-left-color: var(--teal);
  background: #f0fdfa;
  color: #115e59;
}
.beta-access-panel .auth-form-message {
  display: grid;
  gap: 6px;
}
.beta-access-panel .auth-form-message p {
  margin: 0;
}
.auth-field-invalid {
  color: #991b1b;
}
.auth-input-invalid {
  border-color: #dc2626;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
input, select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dev-link { word-break: break-all; font-size: 13px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(217,225,223,.72);
  background: rgba(255,253,248,.84);
  backdrop-filter: blur(14px);
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 950;
}
.brand-lockup img { width: 42px; height: 42px; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top-actions select { width: 126px; }
.account-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  font-weight: 800;
}

.quest-map-preview[hidden] { display: none; }
body.quest-map-preview-active {
  min-height: 100svh;
  color: #f4f8fb;
  background:
    linear-gradient(180deg, rgba(3, 9, 18, .98), rgba(8, 19, 31, .96)),
    radial-gradient(circle at 50% 0%, rgba(36, 154, 138, .22), transparent 32rem);
  touch-action: manipulation;
}
body.quest-map-preview-active .topbar,
body.quest-map-preview-active .app-layout {
  display: none;
}
.quest-map-preview {
  min-height: 100svh;
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  background:
    linear-gradient(180deg, rgba(4, 11, 20, .74), rgba(6, 16, 26, .94)),
    linear-gradient(135deg, rgba(22, 120, 111, .16), rgba(244, 180, 64, .08));
}
.quest-preview-loading {
  display: grid;
  min-height: calc(100svh - 44px);
  place-content: center;
  gap: 8px;
  text-align: center;
}
.quest-preview-loading h1 {
  margin: 0;
  color: white;
  font-size: clamp(2rem, 8vw, 4rem);
  letter-spacing: 0;
}
.quest-shell {
  display: grid;
  gap: 14px;
  width: min(1280px, 100%);
  margin: 0 auto;
}
.quest-appbar {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 18;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 7px;
  background: rgba(4, 10, 19, .78);
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
}
.quest-menu-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 40px;
  min-height: 40px;
  place-items: center;
  gap: 3px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255,255,255,.06);
}
.quest-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.quest-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(2, 8, 16, .56);
  backdrop-filter: blur(4px);
}
.quest-menu-backdrop[hidden],
.quest-menu-drawer[hidden] {
  display: none;
}
.quest-menu-drawer {
  position: fixed;
  inset: max(10px, env(safe-area-inset-top)) auto max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  z-index: 31;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(340px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(244, 199, 102, .24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(244, 199, 102, .2), transparent 46%),
    radial-gradient(circle at 92% 16%, rgba(101, 220, 200, .18), transparent 42%),
    linear-gradient(180deg, rgba(12, 27, 42, .98), rgba(5, 14, 25, .98));
  box-shadow: 0 28px 68px rgba(0,0,0,.46), inset 0 0 0 1px rgba(255,255,255,.05);
}
.quest-menu-drawer-head {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 13px 14px;
}
.quest-menu-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.quest-menu-brand img {
  width: 38px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(244, 190, 84, .24));
}
.quest-menu-brand span {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.quest-menu-brand strong {
  color: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  line-height: 1;
}
.quest-menu-brand strong span {
  display: inline;
  color: #f4c766;
}
.quest-menu-brand small {
  color: #8fded0;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.quest-menu-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 12px 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.06);
}
.quest-menu-summary div {
  display: grid;
  gap: 2px;
}
.quest-menu-summary span,
.quest-menu-summary small {
  color: #b7c7cf;
  font-size: .72rem;
  font-weight: 800;
}
.quest-menu-summary strong {
  color: #fffdf8;
  font-size: 1rem;
  font-weight: 800;
}
.quest-menu-close {
  position: relative;
  width: 38px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
.quest-menu-close::before,
.quest-menu-close::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 18px;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.quest-menu-close::before { transform: rotate(45deg); }
.quest-menu-close::after { transform: rotate(-45deg); }
.quest-menu-list {
  display: grid;
  align-content: start;
  gap: 9px;
  overflow: auto;
  padding: 12px;
}
.quest-menu-group {
  display: grid;
  gap: 7px;
}
.quest-menu-group summary {
  list-style: none;
  cursor: pointer;
}
.quest-menu-group summary::-webkit-details-marker {
  display: none;
}
.quest-menu-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 0 12px 0 8px;
  color: #fffdf8;
  background: linear-gradient(90deg, rgba(255,255,255,.095), rgba(255,255,255,.045));
  font-weight: 800;
  text-align: left;
}
.quest-menu-item::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: .58;
  transform: rotate(45deg);
}
.quest-menu-item:not(:disabled):hover,
.quest-menu-item:not(:disabled):focus-visible {
  border-color: rgba(244, 199, 102, .54);
  background: rgba(244, 199, 102, .12);
}
.quest-menu-group[open] > .quest-menu-group-summary {
  border-color: rgba(244, 199, 102, .42);
  background: rgba(244, 199, 102, .1);
}
.quest-menu-group[open] > .quest-menu-group-summary::after {
  transform: rotate(135deg);
}
.quest-menu-sublist {
  display: grid;
  gap: 7px;
  padding-left: 18px;
}
.quest-menu-sublist .quest-menu-item {
  min-height: 46px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  padding-left: 6px;
  font-size: .92rem;
}
.quest-menu-sublist .quest-menu-item-icon {
  width: 30px;
  height: 30px;
}
.quest-menu-item-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.34));
}
.quest-menu-item-icon.quest-map { background-image: url("/static/assets/menu-icons/quest-menu-quest-map.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.free-play { background-image: url("/static/assets/menu-icons/quest-menu-free-play.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.arena { background-image: url("/static/assets/menu-icons/quest-menu-arena.png?v=arena-icons-1"); }
.quest-menu-item-icon.avatar { background-image: url("/static/assets/menu-icons/quest-menu-avatar.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.account { background-image: url("/static/assets/menu-icons/quest-menu-account.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.irregular-verbs { background-image: url("/static/assets/menu-icons/quest-menu-irregular-verbs.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.vocabulary { background-image: url("/static/assets/menu-icons/quest-menu-vocabulary.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.account-profile { background-image: url("/static/assets/menu-icons/quest-menu-account-profile.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.verb-list { background-image: url("/static/assets/menu-icons/quest-menu-verb-list.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.progress { background-image: url("/static/assets/menu-icons/quest-menu-progress.png?v=quest-menu-icons-1"); }
.quest-menu-item-icon.parent-settings { background-image: url("/static/assets/menu-icons/quest-menu-parent-settings.png?v=quest-menu-icons-1"); }
.quest-menu-item small {
  color: rgba(215,226,231,.58);
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
}
.quest-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  overflow: hidden;
}
.quest-brand-mark {
  width: 42px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(244, 190, 84, .18));
}
.quest-brand strong,
.quest-brand small {
  display: block;
  line-height: 1.05;
}
.quest-brand strong {
  display: inline-flex;
  color: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.quest-brand strong span:last-child {
  color: #f4c766;
}
.quest-brand small {
  color: #f4c766;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.quest-appbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 7px;
  overflow: hidden;
}
.quest-arena-notice {
  display: grid;
  max-width: min(360px, 34vw);
  min-height: 38px;
  justify-content: start;
  gap: 2px;
  border: 1px solid rgba(143, 222, 208, .28);
  border-radius: 8px;
  padding: 6px 10px;
  color: #f7fbff;
  background: rgba(143, 222, 208, .09);
  text-align: left;
}
.quest-arena-notice span,
.quest-arena-notice strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-arena-notice span {
  color: #8fded0;
  font-size: .62rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-arena-notice strong {
  font-size: .78rem;
  font-weight: 950;
}
.quest-appbar-actions select {
  width: 118px;
  min-height: 40px;
  border-color: rgba(255,255,255,.18);
  color: #f4f8fb;
  background: rgba(255,255,255,.08);
}
.quest-score-pill,
.quest-profile-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 0 10px;
  color: #fffdf8;
  background: rgba(255,255,255,.08);
  font-weight: 700;
}
.quest-score-pill {
  gap: 7px;
}
.quest-score-pill img {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 8px rgba(244, 190, 84, .42));
}
.quest-profile-pill {
  gap: 7px;
  padding: 0 7px 0 4px;
  cursor: pointer;
  font: inherit;
}
.quest-profile-pill img {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(244, 190, 84, .82);
  border-radius: 50%;
  object-fit: cover;
}
.quest-avatar-chevron {
  position: relative;
  width: 24px;
  min-height: 38px;
  border: 0;
  padding: 0;
  background: transparent;
}
.quest-avatar-chevron::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 15px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #f4f8fb;
  transform: none;
}
.quest-avatar-portrait {
  position: relative;
  display: grid;
  width: 120px;
  height: 120px;
  place-items: center;
  flex: 0 0 auto;
  border: 3px solid rgba(244, 199, 102, .7);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, rgba(255,255,255,.12), transparent 36%),
    linear-gradient(180deg, rgba(9, 22, 36, .98), rgba(4, 10, 18, .98));
  box-shadow: 0 18px 36px rgba(0,0,0,.32), inset 0 0 0 4px rgba(255,255,255,.04);
}
.quest-avatar-portrait.compact {
  width: 34px;
  height: 34px;
  border-width: 2px;
}
.quest-avatar-portrait img {
  position: relative;
  z-index: 2;
  width: 86%;
  height: 86%;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
}
.quest-avatar-portrait.compact img {
  width: 100%;
  height: 100%;
}
.quest-avatar-portrait.modular {
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 24%, rgba(244,199,102,.16), transparent 38%),
    linear-gradient(180deg, rgba(6, 16, 28, .98), rgba(3, 9, 17, .98));
}
.quest-avatar-portrait.modular.compact {
  border-radius: 50%;
}
.quest-avatar-portrait.modular .quest-avatar-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  pointer-events: none;
}
.quest-avatar-portrait.modular .quest-avatar-art-base {
  z-index: 2;
}
.quest-avatar-portrait.modular .quest-avatar-art-feature {
  z-index: 3;
}
.quest-avatar-portrait.modular .quest-avatar-art-tattoo {
  z-index: 3;
}
.quest-avatar-portrait.modular .quest-avatar-art-eyes {
  z-index: 4;
}
.quest-avatar-portrait.modular .quest-avatar-art-hair {
  z-index: 5;
}
.quest-avatar-portrait.modular .quest-avatar-art-facial,
.quest-avatar-portrait.modular .quest-avatar-art-scar {
  z-index: 6;
}
.quest-avatar-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
}
.quest-avatar-layer.aura {
  z-index: 1;
  inset: -8px;
  opacity: 0;
  filter: blur(1px);
}
.quest-avatar-portrait[data-avatar-aura="teal_aura"] .quest-avatar-layer.aura {
  opacity: 1;
  background: conic-gradient(from 40deg, rgba(101,220,200,.05), rgba(101,220,200,.8), rgba(244,199,102,.18), rgba(101,220,200,.05));
}
.quest-avatar-portrait[data-avatar-aura="premium_aura"] .quest-avatar-layer.aura {
  opacity: 1;
  background: conic-gradient(from 25deg, rgba(167,124,255,.08), rgba(244,199,102,.86), rgba(167,124,255,.76), rgba(167,124,255,.08));
}
.quest-avatar-portrait[data-avatar-ornament="gold_thread"] .quest-avatar-layer.ornament::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed rgba(255, 217, 120, .82);
  border-radius: 50%;
}
.quest-avatar-portrait[data-avatar-badge="master_crown"] .quest-avatar-layer.badge::before {
  content: "";
  position: absolute;
  left: 34%;
  right: 34%;
  top: -10%;
  height: 20%;
  background: linear-gradient(180deg, #fff4b8, #f4c766);
  clip-path: polygon(0 100%, 14% 36%, 32% 74%, 50% 18%, 68% 74%, 86% 36%, 100% 100%);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.35));
}
.quest-avatar-portrait[data-avatar-tool="story_book"] .quest-avatar-layer.tool::before,
.quest-avatar-portrait[data-avatar-tool="navigator_compass"] .quest-avatar-layer.tool::before {
  content: "";
  position: absolute;
  right: 1%;
  bottom: 6%;
  width: 25%;
  height: 20%;
  border: 2px solid rgba(244,199,102,.9);
  border-radius: 4px;
  background: rgba(6,14,24,.86);
}
.quest-avatar-portrait[data-avatar-tool="navigator_compass"] .quest-avatar-layer.tool::before {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,199,102,.95) 0 18%, rgba(6,14,24,.86) 20% 100%);
}
.quest-avatar-portrait[data-avatar-frame="academy_frame"] {
  border-color: rgba(244, 199, 102, .7);
}
.quest-account-card .quest-avatar-portrait.modular img {
  border: 0;
  border-radius: 0;
}
.quest-progress-panel,
.quest-current-card,
.quest-stats-card,
.quest-vocab-card,
.quest-parent-strip,
.quest-sticky-action {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 28, 42, .9), rgba(8, 18, 30, .86));
  box-shadow: 0 22px 54px rgba(0,0,0,.3);
}
.quest-progress-panel {
  display: grid;
  grid-template-columns: minmax(150px, .82fr) auto minmax(190px, .72fr);
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}
.quest-progress-panel h1,
.quest-section-head h2,
.quest-current-card h2 {
  margin: 0;
  color: #fffdf8;
  letter-spacing: 0;
}
.quest-progress-panel h1 {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.05;
  font-weight: 700;
}
.quest-progress-title {
  display: grid;
  gap: 12px;
}
.quest-streak {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  row-gap: 1px;
}
.quest-flame-icon {
  grid-row: 1 / 3;
}
.quest-streak strong {
  color: white;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}
.quest-streak span:last-child {
  grid-column: 2;
  color: #c7d3d9;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.05;
}
.quest-flame-icon {
  width: 32px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 122, 47, .34));
}
.quest-master-ring {
  --quest-progress: 0%;
  display: grid;
  width: 116px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #101f2c 56%, transparent 58%),
    conic-gradient(#65dcc8 var(--quest-progress), rgba(255,255,255,.12) 0);
}
.quest-master-ring strong,
.quest-master-ring span {
  grid-area: 1 / 1;
}
.quest-master-ring strong {
  color: white;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}
.quest-master-ring span {
  align-self: end;
  margin-bottom: 25px;
  color: #b7c7cf;
  font-size: .7rem;
  font-weight: 700;
}
.quest-level-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.quest-level-block strong,
.quest-level-block span {
  display: block;
}
.quest-level-block strong {
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
}
.quest-level-block span {
  color: #c7d3d9;
  font-size: .86rem;
  font-weight: 700;
}
.quest-diamond-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(151, 94, 255, .48));
}
.quest-xp-bar {
  --quest-xp: 0%;
  overflow: hidden;
  height: 8px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
}
.quest-xp-bar span {
  display: block;
  width: var(--quest-xp);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a05cff, #65dcc8);
}
.quest-next-objective {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 13px;
  color: #b7c7cf;
}
.quest-next-objective span {
  color: #65dcc8;
  display: block;
  font-size: .82rem;
  font-weight: 800;
}
.quest-next-objective strong {
  display: block;
  margin-top: 3px;
  color: white;
  font-size: 1.08rem;
  font-weight: 800;
}
.quest-next-objective small {
  display: block;
  margin-top: 4px;
  font-size: .8rem;
  font-weight: 700;
}
.quest-target-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.28));
}
.quest-launch-card {
  display: grid;
  gap: 12px;
  width: min(620px, 100%);
  margin: 14px auto;
  border: 1px solid rgba(244, 199, 102, .28);
  border-radius: 8px;
  padding: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(244, 199, 102, .16), transparent 42%),
    linear-gradient(180deg, rgba(13, 28, 42, .92), rgba(7, 16, 27, .88));
  box-shadow: 0 18px 44px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.05);
  text-align: left;
}
.quest-launch-card-head {
  display: grid;
  gap: 4px;
}
.quest-launch-card-head span {
  color: #8fded0;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.quest-launch-card-head strong {
  color: #fffdf8;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.05;
}
.quest-launch-card p {
  margin: 0;
  color: #d7e2e7;
  font-weight: 700;
}
.quest-launch-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.quest-launch-meta div {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255,255,255,.055);
}
.quest-launch-meta dt {
  color: #8ea3ae;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}
.quest-launch-meta dd {
  margin: 3px 0 0;
  color: #fffdf8;
  font-weight: 850;
}
.quest-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 14px;
  align-items: start;
}
.quest-map-panel {
  min-width: 0;
}
.quest-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.quest-section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quest-flag-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.quest-section-head p {
  margin: 6px 0 0;
  color: #b7c7cf;
  font-size: .9rem;
  white-space: nowrap;
}
.quest-map-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.quest-map-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 0 11px;
  color: #f4f8fb;
  background: rgba(255,255,255,.08);
  font-weight: 800;
}
.quest-map-button span {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 16px;
  border: 2px solid #f4f8fb;
  border-radius: 3px;
}
.quest-map-button span::before,
.quest-map-button span::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: #f4f8fb;
}
.quest-map-button span::before { left: 6px; }
.quest-map-button span::after { right: 6px; }
.quest-map-stage {
  position: relative;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  min-height: 680px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(4, 10, 18, .04), rgba(4, 10, 18, .18)),
    url("/static/assets/quest-map-background.png") center top / auto 100% no-repeat;
  background-color: #06121f;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 -120px 120px rgba(4,10,18,.52);
}
.quest-map-progress-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 6;
  display: grid;
  gap: 7px;
  width: min(210px, calc(100% - 24px));
  border: 1px solid rgba(244, 199, 102, .24);
  border-radius: 8px;
  padding: 10px;
  color: #fffdf8;
  background: linear-gradient(180deg, rgba(5, 13, 23, .78), rgba(5, 13, 23, .58));
  box-shadow: 0 16px 34px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.quest-map-progress-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px;
}
.quest-map-progress-badge span {
  color: #8fded0;
  font-size: .66rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-map-progress-badge strong {
  color: #f4c766;
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1;
}
.quest-map-progress-badge small {
  grid-column: 1 / -1;
  color: rgba(217,227,234,.8);
  font-size: .7rem;
  font-weight: 850;
}
.quest-map-progress-bar {
  --quest-map-progress: 0%;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
}
.quest-map-progress-bar span {
  display: block;
  width: var(--quest-map-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4c766, #65dcc8);
}
.quest-map-next-card {
  display: grid;
  gap: 3px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 7px;
}
.quest-map-next-card strong,
.quest-map-next-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}
.quest-map-next-card strong {
  color: #fffdf8;
  font-size: .68rem;
  font-weight: 950;
  line-height: 1.12;
}
.quest-map-next-card small {
  color: rgba(244,248,251,.78);
  font-size: .66rem;
  font-weight: 850;
  line-height: 1.2;
}
.quest-map-stage::before {
  display: none;
}
.quest-path {
  position: relative;
  z-index: 1;
  min-height: 680px;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.quest-path::before {
  display: none;
}
.quest-path-connectors {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.quest-path-line {
  fill: none;
  stroke: rgba(246, 203, 104, .92);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: none;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(246, 203, 104, .5));
}
.quest-path-line.completed {
  stroke: rgba(101, 220, 200, .86);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 4px rgba(101, 220, 200, .42));
}
.quest-path-line.current {
  stroke: rgba(244, 198, 102, .9);
  stroke-width: 2.3;
  filter: drop-shadow(0 0 5px rgba(244, 198, 102, .52));
}
.quest-path-line.locked {
  stroke: rgba(244, 198, 102, .38);
}
.quest-chapter-markers {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.quest-chapter-marker {
  position: absolute;
  left: var(--chapter-x, 50%);
  top: var(--chapter-y, 50%);
  display: grid;
  gap: 1px;
  min-width: 104px;
  max-width: 136px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  padding: 6px 8px;
  color: #f8fbff;
  background: linear-gradient(180deg, rgba(6, 16, 28, .82), rgba(6, 14, 24, .68));
  box-shadow: 0 10px 22px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.04);
  transform: translate(-50%, -50%);
}
.quest-chapter-marker strong {
  overflow: hidden;
  font-size: .68rem;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-chapter-marker small {
  color: rgba(217, 227, 234, .72);
  font-size: .58rem;
  font-weight: 900;
}
.quest-chapter-marker.current {
  border-color: rgba(244, 198, 102, .52);
  box-shadow: 0 10px 22px rgba(0,0,0,.28), 0 0 16px rgba(244,198,102,.22);
}
.quest-chapter-marker.completed {
  border-color: rgba(101, 220, 200, .48);
}
.quest-node-button {
  position: absolute;
  left: var(--quest-x, 50%);
  top: var(--quest-y, 50%);
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 5px;
  width: 132px;
  min-height: 96px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: #f4f8fb;
  background: transparent;
  text-align: center;
  box-shadow: none;
  transform: translate(-50%, -34px);
}
.quest-node-button[aria-pressed="true"] {
  z-index: 5;
}
.quest-node-button:hover {
  transform: translate(-50%, -35px);
  box-shadow: none;
}
.quest-node-button[aria-pressed="true"] .quest-node-medal {
  border-color: rgba(244, 198, 102, .92);
  box-shadow: 0 14px 28px rgba(0,0,0,.38), 0 0 0 5px rgba(244,198,102,.16), 0 0 28px rgba(244,198,102,.38);
}
.quest-node-button.current {
  filter: drop-shadow(0 0 16px rgba(244, 190, 84, .55));
}
.quest-node-button.completed {
  filter: drop-shadow(0 0 12px rgba(101, 220, 200, .34));
}
.quest-node-button.locked {
  opacity: .88;
}
.quest-node-button.locked .quest-node-medal::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(244,248,251,.88);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(8,16,28,.98), rgba(19,28,43,.98));
  box-shadow: 0 4px 10px rgba(0,0,0,.32);
}
.quest-node-button.locked .quest-node-medal::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 2px;
  z-index: 1;
  width: 7px;
  height: 7px;
  border: 2px solid rgba(244,248,251,.88);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.quest-node-medal {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(10, 25, 42, .92), rgba(4, 12, 22, .82));
  box-shadow: 0 12px 24px rgba(0,0,0,.34);
}
.quest-game-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.quest-node-number {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #07101a;
  background: #f4c766;
  font-size: .72rem;
  font-weight: 950;
}
.quest-node-info {
  display: grid;
  gap: 1px;
  width: min(118px, 100%);
  max-width: 118px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 4px 6px;
  background: rgba(6, 14, 24, .74);
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
}
.quest-node-info strong,
.quest-node-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-node-info strong {
  color: #fffdf8;
  font-size: .64rem;
  font-weight: 950;
  line-height: 1.08;
}
.quest-node-info small {
  color: #8fded0;
  font-size: .54rem;
  font-weight: 900;
  text-transform: capitalize;
}
.quest-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.quest-stars span {
  display: block;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(244, 199, 102, .42);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 2px rgba(6, 14, 24, .52);
}
.quest-stars span.filled {
  border-color: rgba(255, 217, 120, .95);
  background: radial-gradient(circle, #fff7c2 0 28%, #f4c766 30% 100%);
  box-shadow: 0 0 8px rgba(244, 199, 102, .38);
}
.quest-stars.compact {
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
}
.quest-stars.compact span {
  width: 8px;
  height: 8px;
}
.quest-roadmap {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(9, 22, 36, .88), rgba(5, 13, 23, .94));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.quest-roadmap-panel {
  position: fixed;
  inset:
    max(8px, env(safe-area-inset-top, 0px))
    max(8px, env(safe-area-inset-right, 0px))
    max(8px, env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(1040px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  margin: auto;
  border: 1px solid rgba(244, 199, 102, .24);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(5,13,23,.82), rgba(3,9,17,.92)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 24px 70px rgba(0,0,0,.52);
  overflow: hidden;
}
.quest-roadmap-panel[hidden] {
  display: none;
}
body.quest-roadmap-modal-open {
  overflow: hidden;
}
.quest-map-preview.quest-roadmap-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(2, 7, 12, .62);
  backdrop-filter: blur(8px);
}
.quest-roadmap-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.quest-roadmap-panel-head div {
  display: grid;
  gap: 3px;
}
.quest-roadmap-panel-head span {
  color: #8fded0;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-roadmap-panel-head strong {
  color: #fffdf8;
  font-size: 1.18rem;
  font-weight: 950;
}
.quest-roadmap-close {
  position: relative;
  width: 36px;
  min-height: 36px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
.quest-roadmap-close::before,
.quest-roadmap-close::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 16px;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.quest-roadmap-close::before { transform: rotate(45deg); }
.quest-roadmap-close::after { transform: rotate(-45deg); }
.quest-roadmap-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.quest-roadmap-head {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: end;
}
.quest-roadmap-head span,
.quest-roadmap-head small {
  display: block;
  color: rgba(217, 227, 234, .72);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}
.quest-roadmap-head strong {
  display: block;
  margin-top: 2px;
  color: #fffdf8;
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1;
}
.quest-roadmap-head p {
  margin: 0;
  color: rgba(217,227,234,.76);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
}
.quest-roadmap-worlds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.quest-roadmap-world {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.045);
}
.quest-roadmap-world.current {
  border-color: rgba(244,198,102,.45);
  box-shadow: 0 0 18px rgba(244,198,102,.14);
}
.quest-roadmap-world.premium {
  background: linear-gradient(180deg, rgba(38, 29, 56, .58), rgba(8, 15, 27, .72));
}
.quest-roadmap-world header {
  display: flex;
  gap: 8px;
  align-items: start;
  justify-content: space-between;
}
.quest-roadmap-world strong,
.quest-roadmap-world span,
.quest-roadmap-world em,
.quest-roadmap-chapter span,
.quest-roadmap-chapter small,
.quest-roadmap-chapter em {
  display: block;
}
.quest-roadmap-world strong {
  color: #fffdf8;
  font-size: .86rem;
  font-weight: 950;
  line-height: 1.08;
}
.quest-roadmap-world span {
  color: rgba(217,227,234,.72);
  font-size: .68rem;
  font-weight: 850;
}
.quest-roadmap-world em {
  border: 1px solid rgba(244,198,102,.32);
  border-radius: 999px;
  padding: 3px 7px;
  color: #f4c766;
  background: rgba(244,198,102,.1);
  font-size: .6rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-roadmap-world.free em {
  border-color: rgba(101,220,200,.34);
  color: #8fded0;
  background: rgba(101,220,200,.09);
}
.quest-roadmap-chapters {
  display: grid;
  gap: 6px;
}
.quest-roadmap-chapter {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 7px 8px;
  color: inherit;
  background: rgba(3, 9, 17, .42);
  text-align: left;
}
.quest-roadmap-chapter:hover {
  border-color: rgba(244,198,102,.34);
  background: rgba(244,198,102,.08);
}
.quest-roadmap-chapter.current {
  border-color: rgba(244,198,102,.48);
}
.quest-roadmap-chapter span {
  overflow: hidden;
  color: #f7fbff;
  font-size: .72rem;
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-roadmap-chapter small {
  color: #8fded0;
  font-size: .62rem;
  font-weight: 900;
}
.quest-roadmap-chapter.premium small {
  color: #f4c766;
}
.quest-roadmap-chapter em {
  overflow: hidden;
  color: rgba(217,227,234,.62);
  font-size: .56rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-utility-panel {
  position: fixed;
  inset:
    max(8px, env(safe-area-inset-top, 0px))
    max(8px, env(safe-area-inset-right, 0px))
    max(8px, env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(980px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  margin: auto;
  border: 1px solid rgba(101, 220, 200, .2);
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 18% 0%, rgba(244, 199, 102, .12), transparent 28%),
    linear-gradient(180deg, rgba(8, 24, 36, .98), rgba(5, 13, 23, .98));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 24px 70px rgba(0,0,0,.5);
  overflow: hidden;
}
.quest-utility-panel[hidden] {
  display: none;
}
body.quest-utility-modal-open {
  overflow: hidden;
}
.quest-map-preview.quest-utility-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(2, 7, 12, .72);
  backdrop-filter: blur(8px);
}
.quest-utility-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.quest-utility-head div {
  display: grid;
  gap: 3px;
}
.quest-utility-head span {
  color: #8fded0;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-utility-head strong {
  color: #fffdf8;
  font-size: 1.06rem;
  font-weight: 950;
}
.quest-utility-close {
  position: relative;
  width: 36px;
  min-height: 36px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
.quest-utility-close::before,
.quest-utility-close::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 16px;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.quest-utility-close::before { transform: rotate(45deg); }
.quest-utility-close::after { transform: rotate(-45deg); }
.quest-utility-body,
.quest-utility-section {
  display: grid;
  gap: 10px;
}
.quest-utility-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}
.quest-utility-section[hidden] {
  display: none;
}
.quest-utility-section > p {
  margin: 0;
  color: rgba(217,227,234,.78);
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.35;
}
.quest-utility-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.quest-utility-metrics div,
.quest-utility-current,
.quest-utility-note,
.quest-account-card,
.quest-setting-row {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.045);
}
.quest-utility-metrics span,
.quest-utility-current span,
.quest-setting-row span {
  display: block;
  color: rgba(205, 217, 226, .66);
  font-size: .64rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-utility-metrics strong,
.quest-utility-current strong,
.quest-utility-note strong,
.quest-account-card strong {
  display: block;
  color: #fffdf8;
  font-weight: 950;
}
.quest-utility-metrics small,
.quest-utility-current small,
.quest-utility-note span,
.quest-account-card span,
.quest-account-card small {
  display: block;
  color: rgba(217,227,234,.72);
  font-size: .72rem;
  font-weight: 800;
}
.quest-utility-current {
  display: grid;
  gap: 3px;
}
.quest-utility-note {
  display: grid;
  gap: 4px;
  border-color: rgba(244, 199, 102, .2);
  background: rgba(244, 199, 102, .07);
}
.quest-arena-panel {
  gap: 12px;
}
.arena-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 12px;
  min-height: 190px;
  border: 1px solid rgba(244, 199, 102, .24);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(5, 13, 23, .94), rgba(5, 13, 23, .44)),
    url("/static/assets/arena/arena-hall.png?v=arena-icons-1") center / cover no-repeat;
  overflow: hidden;
}
.arena-hero > div:first-child {
  display: grid;
  align-content: end;
  gap: 6px;
}
.arena-hero span,
.arena-invite-row span,
.arena-public-lobby header small,
.arena-create-drawer summary span,
.arena-private-invite summary span,
.arena-mode-card span,
.arena-mode-choice small,
.arena-challenge-card span,
.arena-challenge-metrics span,
.arena-results small {
  color: rgba(205, 217, 226, .7);
  font-size: .64rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-hero strong {
  color: #fffdf8;
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  line-height: .98;
}
.arena-hero p {
  max-width: 58ch;
  margin: 0;
  color: rgba(242,247,249,.82);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.4;
}
.arena-summary-metrics,
.arena-challenge-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.arena-summary-metrics {
  align-content: end;
}
.arena-summary-metrics div,
.arena-challenge-metrics div,
.arena-invite-row,
.arena-public-lobby,
.arena-lobby-card,
.arena-create-drawer,
.arena-private-invite,
.arena-mode-picker,
.arena-action-panel,
.arena-selected-mode,
.arena-private-code-card,
.arena-mode-card,
.arena-mode-choice,
.arena-challenge-card,
.arena-results,
.arena-team-summary {
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 8px;
  background: rgba(7, 18, 30, .72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.arena-summary-metrics div,
.arena-challenge-metrics div {
  display: grid;
  gap: 3px;
  padding: 10px;
}
.arena-summary-metrics strong,
.arena-challenge-metrics strong {
  color: #fffdf8;
  font-size: 1.2rem;
  font-weight: 950;
}
.arena-public-lobby,
.arena-create-drawer,
.arena-private-invite,
.arena-mode-picker,
.arena-action-panel,
.arena-private-code-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.arena-sticky-actions {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 4px 0;
  background: linear-gradient(180deg, rgba(7, 18, 30, .96), rgba(7, 18, 30, .72));
  backdrop-filter: blur(10px);
}
.arena-sound-toggle {
  display: inline-grid;
  grid-template-columns: 22px auto;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid rgba(143, 222, 208, .3);
  border-radius: 8px;
  padding: 6px 10px;
  color: #f7fbff;
  background: rgba(143, 222, 208, .1);
  font-weight: 950;
  cursor: pointer;
}
.arena-sound-toggle::before {
  content: "";
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  background: url("/static/assets/flash-choice/icon-sound-on.svg") center / contain no-repeat;
}
.arena-sound-toggle[aria-pressed="false"]::before {
  background-image: url("/static/assets/flash-choice/icon-sound-off.svg");
}
.arena-sound-toggle span,
.arena-sound-toggle strong {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-sound-toggle span {
  color: #8fded0;
  font-size: .58rem;
  line-height: 1;
  text-transform: uppercase;
}
.arena-sound-toggle strong {
  color: #fffdf8;
  font-size: .72rem;
  line-height: 1;
}
.arena-sound-toggle.compact {
  grid-template-columns: 22px auto;
  min-height: 36px;
  padding: 5px 9px;
}
.arena-sound-toggle.hero {
  margin-top: 4px;
}
.quest-sound-toggle.arena-sound-toggle {
  display: inline-grid;
  grid-template-columns: 1fr;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-items: center;
  place-items: center;
  padding: 0;
  gap: 0;
  border-color: rgba(244, 199, 102, .28);
  background: rgba(244, 199, 102, .1);
}
.quest-sound-toggle.arena-sound-toggle:hover {
  background: rgba(244, 199, 102, .16);
}
.quest-sound-toggle.arena-sound-toggle::before {
  grid-column: 1;
  grid-row: auto;
  align-self: center;
  justify-self: center;
  margin: 0;
  filter: drop-shadow(0 0 8px rgba(244, 199, 102, .26));
}
.quest-sound-toggle.arena-sound-toggle[aria-pressed="false"] {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .07);
}
.arena-waiting-cinematic {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  border: 1px solid rgba(244,199,102,.28);
  border-radius: 8px;
  background: rgba(4, 10, 20, .7);
  pointer-events: none;
}
.arena-waiting-cinematic::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(4,10,20,0), rgba(4,10,20,.3) 62%),
    linear-gradient(180deg, rgba(4,10,20,.08), rgba(4,10,20,.24));
}
.arena-waiting-cinematic .flash-choice-cinematic-video {
  display: block;
  min-height: 128px;
  opacity: .92;
}
.arena-mode-cinematic {
  position: relative;
  min-height: clamp(150px, 24vw, 230px);
  overflow: hidden;
  border: 1px solid rgba(143, 222, 208, .2);
  border-radius: 8px;
  background: #040a14;
}
.arena-mode-cinematic .arena-mode-cinematic-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.arena-mode-cinematic .arena-mode-cinematic-backdrop {
  object-fit: cover;
  opacity: .38;
  filter: blur(14px) saturate(1.12);
  transform: scale(1.08);
}
.arena-mode-cinematic .arena-mode-cinematic-main {
  object-fit: cover;
  opacity: .92;
}
.arena-mode-cinematic::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(4,10,20,0), rgba(4,10,20,.4) 64%),
    linear-gradient(180deg, rgba(4,10,20,.06), rgba(4,10,20,.58));
}
.arena-mode-cinematic-copy {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  gap: 3px;
  color: #fffdf8;
  text-shadow: 0 12px 30px rgba(0,0,0,.62);
}
.arena-mode-cinematic-copy span {
  color: #8fded0;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-mode-cinematic-copy strong {
  font-size: clamp(1.25rem, 3.2vw, 2.1rem);
  font-weight: 950;
  line-height: 1;
}
.arena-public-lobby > header,
.arena-mode-picker > header,
.arena-lobby-card > header,
.arena-lobby-meta,
.arena-selected-mode,
.arena-private-code-card,
.arena-create-drawer summary,
.arena-private-invite summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.arena-public-lobby > header strong,
.arena-mode-picker > header strong,
.arena-selected-mode strong,
.arena-private-code-card strong,
.arena-create-drawer summary strong,
.arena-private-invite summary strong {
  color: #fffdf8;
  font-weight: 950;
}
.arena-public-lobby > header small,
.arena-mode-picker > header small,
.arena-selected-mode small,
.arena-private-code-card small {
  display: block;
  margin-top: 3px;
  line-height: 1.25;
}
.arena-flow {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(280px, 1.05fr);
  gap: 12px;
}
.arena-step-label {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(143, 222, 208, .28);
  border-radius: 999px;
  padding: 4px 8px;
  color: #8fded0;
  background: rgba(143, 222, 208, .08);
  font-size: .62rem;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}
.arena-selected-mode {
  justify-content: flex-start;
  min-width: 0;
}
.arena-selected-mode .game-mini-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
}
.arena-selected-mode > div,
.arena-private-code-card > div:first-child {
  min-width: 0;
}
.arena-selected-mode strong,
.arena-selected-mode small,
.arena-private-code-card small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.arena-action-grid {
  display: grid;
  gap: 8px;
}
.arena-action-grid .quest-secondary-action,
.arena-secondary-actions .quest-secondary-action {
  display: grid;
  justify-content: stretch;
  gap: 3px;
  min-height: 58px;
  padding: 9px 11px;
  text-align: left;
}
.arena-action-grid .quest-secondary-action small,
.arena-secondary-actions .quest-secondary-action small {
  color: rgba(217,227,234,.72);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
}
.arena-action-grid .quest-secondary-action.premium small {
  color: rgba(7,16,26,.76);
}
.arena-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.arena-private-code-card {
  border-color: rgba(244, 199, 102, .28);
  background: rgba(244, 199, 102, .08);
}
.arena-ready-card {
  border-color: rgba(143, 222, 208, .36);
  background: rgba(143, 222, 208, .1);
}
.arena-ready-now {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(143, 222, 208, .42);
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(143, 222, 208, .18), transparent 34%),
    rgba(6, 20, 29, .84);
}
.arena-ready-now > header span,
.arena-ready-now-card > div span {
  color: #8fded0;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-ready-now > header strong {
  display: block;
  color: #fffdf8;
  font-size: 1.05rem;
}
.arena-ready-now > header small,
.arena-ready-now-card > div small {
  color: rgba(229, 239, 244, .76);
  font-weight: 800;
}
.arena-ready-now-list {
  display: grid;
  gap: 8px;
}
.arena-ready-now-card {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(143, 222, 208, .24);
  border-radius: 8px;
  padding: 10px;
}
.arena-ready-now-card .arena-duel-board,
.arena-ready-now-card .quest-secondary-action {
  width: 100%;
}
.arena-verb-challenge {
  border: 1px solid rgba(244, 199, 102, .28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 0%, rgba(244, 199, 102, .14), transparent 40%),
    rgba(18, 23, 33, .72);
  overflow: hidden;
}
.arena-verb-challenge summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 11px;
  cursor: pointer;
  list-style: none;
}
.arena-verb-challenge summary::-webkit-details-marker {
  display: none;
}
.arena-verb-challenge summary::after {
  content: "+";
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(244, 199, 102, .34);
  border-radius: 50%;
  color: #ffe4a3;
  background: rgba(244, 199, 102, .1);
  font-weight: 950;
}
.arena-verb-challenge[open] summary {
  border-bottom: 1px solid rgba(244, 199, 102, .18);
}
.arena-verb-challenge[open] summary::after {
  content: "-";
}
.arena-verb-challenge-body {
  display: grid;
  gap: 10px;
  padding: 11px;
  padding-top: 10px;
}
.arena-verb-challenge summary span {
  color: #f4c766;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-verb-challenge summary strong {
  display: block;
  color: #fffdf8;
  font-size: 1rem;
}
.arena-verb-challenge summary small {
  color: rgba(229, 239, 244, .78);
  font-weight: 800;
  line-height: 1.25;
}
.arena-verb-challenge-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.arena-verb-challenge-choice {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, .05);
}
.arena-verb-challenge-choice input {
  width: 18px;
  height: 18px;
}
.arena-verb-challenge-choice span {
  min-width: 0;
}
.arena-verb-challenge-choice strong,
.arena-verb-challenge-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-verb-challenge-choice small {
  color: rgba(229, 239, 244, .72);
  font-size: .74rem;
}
.arena-final-card {
  border-color: rgba(244, 199, 102, .36);
  background:
    radial-gradient(circle at 10% 0%, rgba(244,199,102,.16), transparent 42%),
    rgba(4, 12, 24, .72);
}
.arena-final-card .arena-duel-board {
  grid-column: 1 / -1;
}
.arena-final-rewards {
  display: grid;
  grid-column: 1 / -1;
  gap: 3px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 8px;
}
.arena-final-rewards span {
  color: #8fded0;
  font-size: .64rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-final-rewards strong {
  color: #fffdf8;
  font-size: .85rem;
  font-weight: 950;
}
.arena-results-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: rgba(2, 6, 14, .78);
  backdrop-filter: blur(10px);
}
body.arena-results-open {
  overflow: hidden;
}
.arena-results-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(780px, 100%);
  max-height: min(760px, calc(100vh - 28px));
  min-height: 0;
  border: 1px solid rgba(244, 199, 102, .26);
  border-radius: 8px;
  color: #fffdf8;
  background: linear-gradient(180deg, rgba(5, 13, 26, .96), rgba(4, 10, 20, .94));
  box-shadow: 0 30px 80px rgba(0,0,0,.46), inset 0 0 0 1px rgba(255,255,255,.05);
}
.arena-results-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 12px;
}
.arena-results-window-head div {
  display: grid;
  gap: 2px;
}
.arena-results-window-head .arena-results-window-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.arena-results-window-head span {
  color: #8fded0;
  font-size: .66rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-results-window-head strong {
  color: #fffdf8;
  font-size: 1rem;
  font-weight: 950;
}
.arena-results-window-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}
.arena-results-empty {
  margin: 0;
  color: rgba(217,227,234,.78);
  font-weight: 850;
}
.arena-private-code-card strong {
  letter-spacing: 0;
}
.arena-lobby-list {
  display: grid;
  gap: 8px;
}
.arena-lobby-card {
  display: grid;
  gap: 9px;
  padding: 10px;
}
.arena-lobby-title {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.arena-lobby-title .game-mini-icon {
  width: 44px;
  height: 44px;
}
.arena-lobby-title > div,
.arena-lobby-title strong,
.arena-lobby-title small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-lobby-title span {
  color: rgba(205, 217, 226, .7);
  font-size: .64rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-lobby-title strong {
  display: block;
  color: #fffdf8;
  font-weight: 950;
}
.arena-lobby-title small,
.arena-lobby-meta {
  color: rgba(217,227,234,.72);
  font-size: .72rem;
  font-weight: 800;
}
.arena-lobby-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.arena-lobby-roster > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 170px;
  border-radius: 8px;
  padding: 5px 7px;
  background: rgba(255,255,255,.055);
}
.arena-lobby-roster .quest-avatar-portrait.compact,
.arena-lobby-roster .arena-avatar-placeholder {
  width: 30px;
  height: 30px;
}
.arena-lobby-roster strong {
  min-width: 0;
  overflow: hidden;
  color: #fffdf8;
  font-size: .78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-lobby-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
}
.arena-lobby-meta span {
  color: rgba(217,227,234,.72);
}
.arena-lobby-meta strong {
  color: #fffdf8;
}
.arena-create-drawer summary,
.arena-private-invite summary {
  min-height: 48px;
  cursor: pointer;
  list-style: none;
}
.arena-create-drawer summary::-webkit-details-marker,
.arena-private-invite summary::-webkit-details-marker {
  display: none;
}
.arena-create-drawer summary::after,
.arena-private-invite summary::after {
  content: "+";
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(244, 199, 102, .3);
  border-radius: 50%;
  color: #ffe4a3;
  font-weight: 950;
}
.arena-create-drawer[open] summary::after,
.arena-private-invite[open] summary::after {
  content: "-";
}
.arena-mode-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.arena-mode-choice {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 9px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.arena-mode-choice.selected {
  border-color: rgba(244, 199, 102, .46);
  background: rgba(244, 199, 102, .13);
}
.arena-mode-choice .game-mini-icon {
  width: 44px;
  height: 44px;
}
.arena-mode-choice span {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.arena-mode-choice strong,
.arena-mode-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-mode-choice strong {
  color: #fffdf8;
  font-weight: 950;
}
.arena-avatar-button {
  display: inline-grid;
  place-items: center;
  width: max-content;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.arena-avatar-button:focus-visible {
  outline: 3px solid rgba(244, 199, 102, .86);
  outline-offset: 3px;
}
.arena-duel-board {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255,255,255,.05);
}
.arena-duel-board.arena-duel-stage {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  margin: 0 auto 6px;
  border-color: rgba(143, 222, 208, .22);
  padding: 5px 7px;
  background: rgba(4, 12, 24, .72);
}
.arena-duel-board.arena-duel-stage header {
  display: none;
}
.arena-duel-board.arena-duel-result {
  grid-column: 1 / -1;
  border-color: rgba(244,199,102,.32);
  background: rgba(4, 12, 24, .78);
}
.arena-duel-board.compact header {
  min-width: 0;
}
.arena-duel-board header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.arena-duel-board header span {
  color: rgba(205, 217, 226, .7);
  font-size: .64rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-duel-board header strong {
  color: #fffdf8;
  font-size: .92rem;
  font-weight: 950;
}
.arena-duel-board.win header strong {
  color: #8ff4c7;
}
.arena-duel-board.loss header strong {
  color: #ff9ba9;
}
.arena-duel-board.tie header strong,
.arena-duel-board.pending header strong {
  color: #ffe4a3;
}
.arena-duel-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.arena-duel-player {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 54px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 7px;
  background: rgba(4, 12, 24, .55);
}
.arena-duel-player .quest-avatar-portrait.compact,
.arena-avatar-placeholder {
  width: 42px;
  height: 42px;
  border-width: 2px;
}
.arena-avatar-placeholder {
  display: grid;
  place-items: center;
  border: 2px solid rgba(244, 199, 102, .38);
  border-radius: 50%;
  color: rgba(255,255,255,.66);
  background: rgba(255,255,255,.06);
  font-weight: 950;
}
.arena-duel-player > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.arena-duel-player > div span,
.arena-duel-player > div small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-duel-player > div span {
  color: rgba(205, 217, 226, .68);
  font-size: .62rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-duel-player > div strong,
.arena-duel-player b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fffdf8;
  font-weight: 950;
}
.arena-duel-player > div small {
  color: rgba(217,227,234,.7);
  font-size: .68rem;
  font-weight: 800;
}
.arena-duel-player b {
  justify-self: end;
}
.arena-duel-vs {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(244, 199, 102, .34);
  border-radius: 50%;
  color: #ffe4a3;
  background: rgba(244, 199, 102, .09);
  font-size: .68rem;
  font-weight: 950;
}
.arena-duel-stage .arena-duel-player {
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 36px;
  padding: 4px 6px;
}
.arena-duel-stage .arena-duel-player .quest-avatar-portrait.compact,
.arena-duel-stage .arena-avatar-placeholder {
  width: 32px;
  height: 32px;
}
.arena-duel-stage .arena-duel-player > div span,
.arena-duel-stage .arena-duel-player > div small,
.arena-duel-stage .arena-duel-player b {
  display: none;
}
.arena-duel-stage .arena-duel-player > div strong {
  font-size: .78rem;
}
.arena-invite-row,
.arena-private-invite {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 260px) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
}
.arena-invite-row strong,
.arena-private-invite strong,
.arena-challenge-list > header strong,
.arena-results strong {
  color: #fffdf8;
  font-weight: 950;
}
.arena-invite-row small,
.arena-private-invite small {
  display: block;
  color: rgba(217,227,234,.72);
  font-size: .72rem;
  font-weight: 800;
}
.arena-invite-row label,
.arena-private-invite label {
  display: grid;
  gap: 4px;
}
.arena-invite-row input,
.arena-private-invite input {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 0 10px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-weight: 950;
  text-transform: uppercase;
}
.arena-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.arena-mode-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 9px;
  padding: 10px;
}
.arena-mode-art {
  display: flex;
  align-items: center;
  gap: 8px;
}
.arena-mode-art .game-mini-icon {
  width: 52px;
  height: 52px;
}
.arena-mode-card strong,
.arena-challenge-card strong {
  display: block;
  color: #fffdf8;
  font-weight: 950;
}
.arena-mode-card p {
  min-height: 42px;
  margin: 4px 0 0;
  color: rgba(217,227,234,.72);
  font-size: .76rem;
  font-weight: 800;
  line-height: 1.3;
}
.arena-mode-card footer,
.arena-challenge-card footer,
.arena-challenge-list > header,
.arena-results header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.arena-mode-card footer {
  align-items: end;
}
.arena-mode-card small {
  color: rgba(217,227,234,.66);
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.25;
}
.arena-mode-card .game-guidance,
.arena-selected-mode .game-guidance {
  margin-top: 8px;
}
.arena-mode-card .game-ratings,
.arena-selected-mode .game-ratings {
  grid-template-columns: repeat(2, minmax(90px, 1fr));
}
.arena-mode-card .game-guidance > small,
.arena-selected-mode .game-guidance > small {
  color: rgba(217,227,234,.7);
}
.arena-challenge-list {
  display: grid;
  gap: 10px;
}
.arena-challenge-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.arena-challenge-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.arena-challenge-card code {
  border: 1px solid rgba(244, 199, 102, .34);
  border-radius: 8px;
  padding: 8px 10px;
  color: #ffe4a3;
  background: rgba(244, 199, 102, .09);
  font-weight: 950;
  letter-spacing: 0;
}
.arena-challenge-card small {
  color: rgba(217,227,234,.7);
  font-size: .72rem;
  font-weight: 800;
}
.arena-results {
  display: grid;
  gap: 7px;
  padding: 9px;
  background: rgba(255,255,255,.04);
}
.arena-result-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255,255,255,.055);
}
.arena-result-row.winner {
  border: 1px solid rgba(244, 199, 102, .3);
  background: rgba(244, 199, 102, .09);
}
.arena-result-row > span,
.arena-result-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-result-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.arena-result-row .quest-avatar-portrait.compact {
  width: 34px;
  height: 34px;
}
.arena-result-row small {
  grid-column: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-empty-result {
  min-height: 42px;
  border-radius: 8px;
  padding: 11px;
  color: rgba(217,227,234,.68);
  background: rgba(255,255,255,.045);
  font-weight: 800;
}
.arena-team-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
}
.arena-team-summary span {
  display: inline-flex;
  gap: 6px;
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(101, 220, 200, .1);
}
.arena-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  background: rgba(2, 7, 12, .78);
  backdrop-filter: blur(8px);
}
body.arena-profile-open {
  overflow: hidden;
}
.arena-profile-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: min(920px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  margin: auto;
  border: 1px solid rgba(244, 199, 102, .28);
  border-radius: 8px;
  padding: 12px;
  color: #fffdf8;
  background:
    radial-gradient(circle at 20% 0%, rgba(244,199,102,.13), transparent 32%),
    linear-gradient(180deg, rgba(8, 24, 36, .98), rgba(5, 13, 23, .98));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 26px 80px rgba(0,0,0,.55);
  overflow: hidden;
}
.arena-profile-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.arena-profile-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.arena-profile-head span,
.arena-profile-section header strong,
.arena-profile-metrics span {
  color: #8fded0;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.arena-profile-head strong {
  overflow: hidden;
  color: #fffdf8;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-profile-body {
  display: grid;
  grid-template-columns: minmax(280px, .92fr) minmax(0, 1.08fr);
  gap: 12px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.arena-profile-figure,
.arena-profile-details,
.arena-profile-section,
.arena-profile-metrics div {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}
.arena-profile-figure {
  display: grid;
  min-height: 440px;
  place-items: center;
  overflow: hidden;
}
.arena-profile-figure .quest-avatar-full-display {
  width: min(520px, 100%);
  min-height: 420px;
}
.arena-profile-figure .quest-avatar-full-figure {
  width: clamp(330px, 88%, 430px);
}
.arena-profile-details {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}
.arena-profile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.arena-profile-metrics div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 9px;
}
.arena-profile-metrics strong {
  overflow: hidden;
  color: #fffdf8;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-profile-section {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.arena-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.arena-profile-tags span {
  border-radius: 8px;
  padding: 7px 9px;
  color: #fffdf8;
  background: rgba(244,199,102,.1);
  font-size: .78rem;
  font-weight: 850;
}
.arena-profile-score-list {
  display: grid;
  gap: 7px;
}
.arena-profile-score-list > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(255,255,255,.055);
}
.arena-profile-score-list strong,
.arena-profile-score-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-profile-score-list strong {
  color: #fffdf8;
  font-weight: 950;
}
.arena-profile-score-list small {
  color: rgba(217,227,234,.72);
  font-weight: 850;
}
.quest-progress-detail-panel {
  gap: 12px;
}
.quest-progress-hero-detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(244, 199, 102, .2);
  border-radius: 8px;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(244,199,102,.16), transparent 38%),
    linear-gradient(135deg, rgba(9, 25, 37, .92), rgba(5, 13, 23, .9));
}
.quest-progress-orbit,
.progress-dashboard-ring {
  --quest-progress: 0%;
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(5,13,23,.95) 0 52%, transparent 53%),
    conic-gradient(#f4c766 0 var(--quest-progress), rgba(255,255,255,.12) var(--quest-progress) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.28);
}
.quest-progress-orbit strong,
.progress-dashboard-ring strong {
  color: #fffdf8;
  font-size: 1.75rem;
  font-weight: 950;
  line-height: 1;
}
.quest-progress-orbit span,
.progress-dashboard-ring span {
  color: rgba(217,227,234,.72);
  font-size: .72rem;
  font-weight: 900;
}
.quest-progress-hero-detail > div:last-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.quest-progress-hero-detail > div:last-child span,
.quest-progress-card-list header small,
.quest-progress-review header small {
  color: #8fded0;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-progress-hero-detail > div:last-child strong {
  color: #fffdf8;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 950;
  line-height: 1.05;
}
.quest-progress-hero-detail > div:last-child small {
  color: rgba(217,227,234,.74);
  font-weight: 850;
}
.quest-progress-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.quest-progress-detail-grid div,
.quest-progress-card-list,
.quest-progress-review {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.045);
}
.quest-progress-detail-grid span,
.quest-progress-detail-grid small {
  display: block;
  color: rgba(205,217,226,.66);
  font-size: .64rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-progress-detail-grid strong {
  display: block;
  color: #fffdf8;
  font-size: 1.28rem;
  font-weight: 950;
}
.quest-progress-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quest-progress-card-list,
.quest-progress-review {
  display: grid;
  gap: 10px;
}
.quest-progress-card-list header,
.quest-progress-review header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.quest-progress-card-list header strong,
.quest-progress-review header strong {
  color: #fffdf8;
  font-weight: 950;
}
.quest-progress-card-list > div,
.quest-progress-review > div {
  display: grid;
  gap: 7px;
}
.quest-progress-card-list span,
.quest-progress-review span {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 9px;
  background: rgba(3,9,17,.3);
}
.quest-progress-card-list span strong,
.quest-progress-review span strong {
  overflow: hidden;
  color: #fffdf8;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-progress-card-list span small,
.quest-progress-review span small {
  overflow-wrap: anywhere;
  color: rgba(217,227,234,.68);
  font-size: .72rem;
  font-weight: 800;
}
.quest-avatar-forge-panel {
  gap: 12px;
}
.quest-avatar-forge-layout {
  display: grid;
  grid-template-columns: minmax(230px, .9fr) minmax(0, 1.1fr);
  gap: 10px;
  align-items: stretch;
}
.quest-avatar-preview-card,
.quest-avatar-visual-card,
.quest-avatar-wallet,
.quest-avatar-skills,
.quest-avatar-items,
.quest-avatar-bonuses {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,.045);
}
.quest-avatar-preview-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.quest-avatar-preview-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.quest-avatar-preview-copy strong {
  overflow: hidden;
  color: #fffdf8;
  font-size: 1.18rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-avatar-preview-copy span,
.quest-avatar-preview-copy small {
  overflow-wrap: anywhere;
  color: rgba(217,227,234,.72);
  font-weight: 850;
}
.quest-avatar-preview-copy small {
  color: #8fded0;
  line-height: 1.28;
}
.quest-avatar-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quest-avatar-visual-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.quest-avatar-visual-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.quest-avatar-visual-card header strong {
  color: #fffdf8;
  font-weight: 950;
}
.quest-avatar-visual-card header small {
  color: rgba(217,227,234,.62);
  font-weight: 850;
}
.quest-avatar-bust-stage {
  display: grid;
  min-height: 196px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 24%, rgba(244,199,102,.14), transparent 34%),
    rgba(3,9,17,.28);
}
.quest-avatar-bust-stage .quest-avatar-portrait {
  width: 152px;
  height: 152px;
}
.quest-avatar-full-stage {
  display: grid;
  min-height: 390px;
  padding: 6px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 20%, rgba(244,199,102,.12), transparent 34%),
    linear-gradient(180deg, rgba(7,18,30,.36), rgba(2,7,14,.48));
}
.quest-avatar-full-display {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  width: min(560px, 100%);
  min-height: 360px;
  min-width: 0;
}
.quest-avatar-full-figure {
  position: relative;
  z-index: 2;
  width: clamp(320px, 108%, 380px);
  aspect-ratio: 1;
}
.quest-avatar-full-environment {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: clamp(135px, 42%, 210px);
  aspect-ratio: .62;
  pointer-events: none;
}
.quest-avatar-full-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  pointer-events: none;
}
.quest-avatar-full-body {
  z-index: 2;
}
.quest-avatar-full-hair {
  z-index: 3;
}
.quest-avatar-full-lab-bust {
  position: absolute;
  left: var(--quest-avatar-full-lab-left);
  top: var(--quest-avatar-full-lab-top);
  z-index: 3;
  width: var(--quest-avatar-full-lab-size);
  aspect-ratio: 1;
  pointer-events: none;
}
.quest-avatar-full-lab-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  pointer-events: none;
}
.quest-avatar-full-lab-base {
  z-index: 1;
}
.quest-avatar-full-lab-tattoo {
  z-index: 2;
}
.quest-avatar-full-lab-eyes {
  z-index: 3;
}
.quest-avatar-full-lab-hair {
  z-index: 4;
}
.quest-avatar-full-lab-facial,
.quest-avatar-full-lab-scar {
  z-index: 5;
}
.quest-avatar-full-accessory {
  z-index: 5;
}
.quest-avatar-full-environment-art {
  position: absolute;
  border: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.quest-avatar-full-trophy-cabinet {
  top: 0;
  right: 0;
  z-index: 1;
  width: 88%;
  height: 70%;
}
.quest-avatar-full-treasure-chest {
  right: -4%;
  bottom: 0;
  z-index: 2;
  width: 110%;
  height: 45%;
}
.quest-avatar-full-aura {
  position: absolute;
  inset: 10px;
  z-index: -1;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(143,222,208,.28), transparent 70%);
}
.quest-avatar-full-figure[data-avatar-aura="teal_aura"] .quest-avatar-full-aura,
.quest-avatar-full-figure[data-avatar-aura="premium_aura"] .quest-avatar-full-aura {
  opacity: 1;
}
.quest-avatar-creator {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,.045);
}
.quest-avatar-creator header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.quest-avatar-creator header strong {
  color: #fffdf8;
  font-weight: 950;
}
.quest-avatar-creator header small {
  color: rgba(217,227,234,.62);
  font-weight: 850;
}
.quest-avatar-lab-panel {
  gap: 12px;
}
.quest-avatar-lab-layout {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(240px, .7fr);
  gap: 12px;
  align-items: start;
}
.quest-avatar-lab-preview-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 18%, rgba(102,178,255,.1), transparent 38%),
    linear-gradient(180deg, rgba(8, 20, 34, .88), rgba(3, 9, 17, .94));
}
.quest-avatar-lab-preview-card small {
  color: rgba(205,217,226,.68);
  font-weight: 800;
  line-height: 1.35;
}
.quest-avatar-lab-stage {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin-inline: auto;
  overflow: hidden;
  border: 2px solid rgba(244,199,102,.46);
  border-radius: 8px;
  background: #071421;
}
.quest-avatar-lab-face,
.quest-avatar-lab-tattoo-layer,
.quest-avatar-lab-eye-layer,
.quest-avatar-lab-hair-layer,
.quest-avatar-lab-facial-layer,
.quest-avatar-lab-ear-layer,
.quest-avatar-lab-scar-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.quest-avatar-lab-eye-layer,
.quest-avatar-lab-tattoo-layer,
.quest-avatar-lab-hair-layer,
.quest-avatar-lab-facial-layer,
.quest-avatar-lab-ear-layer,
.quest-avatar-lab-scar-layer {
  pointer-events: none;
}
.quest-avatar-field.locked {
  opacity: .68;
}
.quest-avatar-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.quest-avatar-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.quest-avatar-field.title {
  grid-column: 1 / -1;
}
.quest-avatar-field span {
  color: rgba(205,217,226,.66);
  font-size: .62rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-avatar-field select,
.quest-avatar-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 0 10px;
  color: #f4f8fb;
  background: rgba(3,9,17,.5);
  font: inherit;
  font-weight: 850;
}
.quest-avatar-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.quest-avatar-editor-actions small {
  color: #8fded0;
  font-size: .72rem;
  font-weight: 850;
}
.quest-avatar-wallet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.quest-avatar-wallet div {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 9px;
  background: rgba(3,9,17,.32);
}
.quest-avatar-wallet span,
.quest-avatar-wallet small {
  color: rgba(205,217,226,.66);
  font-size: .62rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-avatar-wallet strong {
  color: #fffdf8;
  font-size: 1.3rem;
  font-weight: 950;
}
.quest-avatar-skills,
.quest-avatar-items,
.quest-avatar-bonuses {
  display: grid;
  gap: 10px;
}
.quest-avatar-skills header,
.quest-avatar-items header,
.quest-avatar-bonuses header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.quest-avatar-skills header strong,
.quest-avatar-items header strong,
.quest-avatar-bonuses header strong {
  color: #fffdf8;
  font-weight: 950;
}
.quest-avatar-bonuses header small {
  color: rgba(217,227,234,.62);
  font-weight: 850;
}
.quest-avatar-skills > div,
.quest-avatar-items > div,
.quest-avatar-bonuses > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.quest-avatar-skills span,
.quest-avatar-item,
.quest-avatar-bonus {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(3,9,17,.3);
}
.quest-avatar-skills span strong,
.quest-avatar-item strong,
.quest-avatar-bonus strong {
  color: #fffdf8;
  font-weight: 950;
}
.quest-avatar-skills small,
.quest-avatar-item small,
.quest-avatar-item p,
.quest-avatar-bonus p,
.quest-avatar-bonus small {
  margin: 0;
  color: rgba(217,227,234,.72);
  font-size: .72rem;
  font-weight: 820;
  line-height: 1.3;
}
.quest-avatar-item > div > span,
.quest-avatar-bonus > span {
  width: fit-content;
  border: 1px solid rgba(101,220,200,.28);
  border-radius: 999px;
  padding: 3px 7px;
  color: #8fded0;
  background: rgba(101,220,200,.08);
  font-size: .58rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-avatar-item.locked,
.quest-avatar-bonus.locked {
  opacity: .68;
}
.quest-avatar-item.equipped {
  border-color: rgba(244,199,102,.42);
  box-shadow: inset 0 0 0 1px rgba(244,199,102,.14);
}
.quest-secondary-action.selected {
  color: #07101a;
  background: linear-gradient(180deg, #8fded0, #45b7a8);
}
.quest-secondary-action.locked {
  opacity: .62;
}
.quest-settings-list {
  display: grid;
  gap: 8px;
}
.quest-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  align-items: center;
  gap: 10px;
}
.quest-setting-row select {
  min-height: 38px;
  border-color: rgba(255,255,255,.18);
  color: #f4f8fb;
  background: rgba(255,255,255,.08);
}
.quest-setting-row small {
  grid-column: 1 / -1;
  color: rgba(205, 217, 226, .72);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
}
.quest-toggle-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.quest-toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: #65dcc8;
}
.quest-toggle-row em {
  color: #f4c766;
  font-size: .72rem;
  font-style: normal;
  font-weight: 950;
}
.quest-account-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.quest-account-card img {
  width: 54px;
  height: 54px;
  border: 2px solid rgba(244, 190, 84, .82);
  border-radius: 50%;
  object-fit: cover;
}
.quest-account-card .quest-avatar-portrait {
  width: 54px;
  height: 54px;
}
.quest-account-card .quest-avatar-portrait img {
  width: 100%;
  height: 100%;
  border: 0;
}
.quest-account-card .quest-avatar-portrait.modular img {
  border-radius: 0;
}
.quest-account-card div {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.quest-account-card span,
.quest-account-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-utility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quest-secondary-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 0 13px;
  color: #f8fbff;
  background: rgba(255,255,255,.08);
  font-weight: 950;
}
.quest-secondary-action.premium {
  border-color: rgba(244, 199, 102, .34);
  color: #07101a;
  background: linear-gradient(135deg, #f4c766, #a77cff);
}
.quest-secondary-action.danger {
  border-color: rgba(239, 71, 111, .36);
  color: #ffecef;
  background: rgba(239, 71, 111, .14);
}
.quest-logout-form {
  display: contents;
}
.quest-detail-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(14, 31, 49, .86), rgba(6, 16, 29, .94));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 16px 32px rgba(0,0,0,.22);
}
.quest-detail-panel.current {
  border-color: rgba(244,198,102,.4);
}
.quest-detail-panel.locked {
  border-color: rgba(196,210,220,.2);
}
.quest-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.quest-detail-logo {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.quest-detail-logo .quest-game-logo {
  width: 42px;
  height: 42px;
}
.quest-detail-head h3,
.quest-detail-panel p {
  margin: 0;
}
.quest-detail-head h3 {
  color: #fff;
  font-size: 1rem;
  line-height: 1.08;
}
.quest-detail-head span {
  color: rgba(205, 217, 226, .72);
  font-size: .72rem;
  font-weight: 800;
}
.quest-detail-panel > p {
  color: rgba(231, 238, 244, .86);
  font-size: .86rem;
  line-height: 1.35;
}
.quest-detail-stars {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(244, 199, 102, .18);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(244, 199, 102, .07);
}
.quest-detail-stars > span {
  color: rgba(217,227,234,.72);
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-detail-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.quest-detail-panel dl div {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255,255,255,.045);
}
.quest-detail-panel dt {
  color: rgba(205, 217, 226, .62);
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
}
.quest-detail-panel dd {
  margin: 3px 0 0;
  color: #f8fbff;
  font-size: .78rem;
  font-weight: 900;
}
.quest-parent-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
}
.quest-parent-shield {
  width: 50px;
  height: 56px;
  object-fit: contain;
  box-shadow: 0 0 16px rgba(101, 220, 200, .18);
}
.quest-parent-strip div {
  display: grid;
  gap: 3px;
}
.quest-parent-strip strong {
  color: #65dcc8;
}
.quest-parent-strip strong,
.quest-parent-strip span {
  display: block;
}
.quest-parent-strip span {
  color: #c7d3d9;
}
.quest-side-panel {
  display: grid;
  gap: 12px;
}
.quest-current-card,
.quest-stats-card,
.quest-vocab-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.quest-current-card p,
.quest-vocab-card span {
  margin: 0;
  color: #c7d3d9;
}
.quest-current-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
.quest-current-card dl div,
.quest-stat-row {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.05);
}
.quest-current-card dt {
  color: #8ea3ae;
  font-size: .78rem;
  font-weight: 900;
}
.quest-current-card dd {
  margin: 4px 0 0;
  color: white;
  font-size: 1.18rem;
  font-weight: 950;
}
.quest-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  color: #07101a;
  background: linear-gradient(180deg, #ffd978, #f1a92d);
  font-size: 1rem;
  font-weight: 950;
}
.quest-primary-action img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.quest-primary-action.premium {
  background: linear-gradient(135deg, #f4c766, #a77cff);
  color: #07101a;
}
.quest-primary-action.locked {
  opacity: .62;
}
.quest-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quest-stat-row span {
  color: #b7c7cf;
  font-weight: 800;
}
.quest-stat-row strong,
.quest-vocab-card strong {
  color: white;
  font-size: 1.08rem;
}
.quest-vocab-destinations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quest-vocab-destinations span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 0 8px;
  color: #d7e2e7;
  background: rgba(255,255,255,.06);
  font-size: .68rem;
  font-weight: 900;
}
.quest-vocab-destinations span.available {
  border-color: rgba(101, 220, 200, .32);
  color: #8fded0;
  background: rgba(101, 220, 200, .09);
}
.quest-vocab-destinations small,
.quest-vocab-available {
  color: rgba(217, 227, 234, .68);
  font-size: .68rem;
  font-weight: 950;
}
.quest-vocab-available {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255,255,255,.045);
}
.quest-sticky-action {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 16;
  display: none;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
}
.quest-continue-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid rgba(244, 190, 84, .82);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.quest-continue-icon .game-mini-icon {
  transform: scale(.92);
}
.quest-continue-icon .quest-game-logo {
  width: 50px;
  height: 50px;
}
.quest-current-summary {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.quest-current-summary span,
.quest-current-summary small {
  color: #b7c7cf;
  font-weight: 800;
}
.quest-current-summary span {
  color: #65dcc8;
  font-size: .78rem;
  text-transform: uppercase;
}
.quest-current-summary strong {
  overflow: hidden;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-current-summary p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #d7e2e7;
  font-size: .82rem;
  font-weight: 700;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.quest-sticky-action .quest-primary-action {
  grid-column: 2;
  justify-self: stretch;
  min-height: 46px;
}

.app-layout {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 72px);
  padding: 18px;
}
.side-nav {
  position: sticky;
  top: 90px;
  display: grid;
  align-content: start;
  gap: 8px;
  height: calc(100vh - 108px);
}
.nav-button {
  justify-content: flex-start;
  width: 100%;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 900;
  text-align: left;
}
.nav-button.active {
  background: var(--ink);
  color: white;
}
.workspace { min-width: 0; }
.panel {
  display: none;
  min-height: calc(100vh - 108px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}
.panel.active { display: block; }
.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-head h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 56px);
  line-height: .96;
  letter-spacing: 0;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.game-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.game-controls select { width: 170px; }

.next-gen-hub {
  margin: 0 0 18px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.game-card {
  min-height: 196px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: stretch;
  align-items: center;
  gap: 8px 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(244, 199, 102, .28);
  border-radius: 8px;
  padding: 14px;
  color: white;
  text-align: left;
  font-weight: 950;
  background:
    radial-gradient(circle at 18% 16%, rgba(244,199,102,.22), transparent 34%),
    linear-gradient(180deg, rgba(3,9,17,.42), rgba(3,9,17,.68)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 14px 30px rgba(3,7,18,.16);
}
.game-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 22% 20%, rgba(101,220,200,.18), transparent 7rem),
    linear-gradient(115deg, transparent 0 58%, rgba(255,255,255,.07) 59% 64%, transparent 65%);
  transform: rotate(8deg);
}
.game-card-title {
  position: relative;
  align-self: end;
  min-width: 0;
  font-size: 18px;
}
.game-card small {
  position: relative;
  grid-column: 2;
  opacity: .84;
}
.game-guidance {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  align-self: end;
  min-width: 0;
}
.game-ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.game-rating {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 6px;
  background: rgba(3,7,18,.34);
}
.game-rating span,
.game-rating strong {
  color: rgba(255,255,255,.9);
  font-size: .68rem;
  font-weight: 950;
  line-height: 1;
}
.game-rating i {
  display: flex;
  gap: 2px;
}
.game-rating b {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.game-rating b.filled {
  background: #ffd166;
  box-shadow: 0 0 8px rgba(255,209,102,.36);
}
.game-guidance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.game-guidance-tags span {
  border-radius: 999px;
  padding: 3px 6px;
  background: rgba(101,220,200,.18);
  color: rgba(255,255,255,.9);
  font-size: .66rem;
  font-weight: 900;
}
.game-guidance > small {
  grid-column: auto;
  color: rgba(255,255,255,.72);
  font-size: .68rem;
  line-height: 1.2;
  opacity: 1;
}
.game-card:nth-child(4n+1),
.game-card:nth-child(4n+2),
.game-card:nth-child(4n+3),
.game-card:nth-child(4n+4) {
  background:
    radial-gradient(circle at 18% 16%, rgba(244,199,102,.22), transparent 34%),
    linear-gradient(180deg, rgba(3,9,17,.42), rgba(3,9,17,.68)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.game-discovery {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(4,10,19,.38);
}
.game-discovery header strong {
  color: rgba(255,255,255,.82);
  font-size: .92rem;
}
.game-discovery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.game-discovery-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.game-discovery-list h3 {
  margin: 0;
  color: #ffd166;
  font-size: .86rem;
  font-weight: 950;
}
.game-discovery-list > div {
  display: grid;
  gap: 5px;
}
.game-discovery-list button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 5px 7px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  text-align: left;
}
.game-discovery-list button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(244,199,102,.18);
  color: #ffd166;
  font-size: .72rem;
  font-weight: 950;
}
.game-discovery-list button strong {
  overflow: hidden;
  color: white;
  font-size: .78rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-discovery-list button small {
  color: rgba(255,255,255,.66);
  font-size: .68rem;
  font-weight: 850;
}
.game-mini-icon {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 12px;
  background: rgba(3,7,18,.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 22px rgba(0,0,0,.2);
}
.game-mini-icon.game-logo-card {
  display: block;
  grid-row: 1 / span 2;
  border: 0;
  border-radius: 50%;
  background: transparent;
  object-fit: contain;
  box-shadow: 0 10px 22px rgba(0,0,0,.24);
}

.scoring-guide {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid rgba(18,20,23,.08);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(224,247,250,.72));
  box-shadow: 0 14px 30px rgba(10,19,42,.1);
}
.scoring-guide strong {
  color: var(--ink);
  font-weight: 950;
}
.scoring-guide dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.scoring-guide dl div {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,.72);
}
.scoring-guide dt {
  color: #0f766e;
  font-weight: 950;
}
.scoring-guide dd {
  margin: 0;
  color: #334155;
  font-weight: 800;
}

.vocab-panel-head {
  align-items: end;
}
.vocab-place-grid {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: min(360px, 100%);
}
.vocab-place-select {
  display: grid;
  gap: 5px;
  min-width: min(260px, 100%);
}
.vocab-place-select span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.vocab-place-select select {
  min-height: 42px;
  border-color: rgba(18,20,23,.14);
  background: white;
  color: var(--ink);
  font-weight: 900;
}
.vocab-place-summary {
  display: grid;
  place-items: center;
  min-width: 74px;
  min-height: 58px;
  border: 1px solid rgba(18,20,23,.1);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(24,183,167,.12), rgba(37,99,235,.14)), white;
}
.vocab-place-summary strong {
  font-size: 1.35rem;
  line-height: 1;
}
.vocab-place-summary span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 950;
  text-transform: uppercase;
}
.vocab-place-card {
  display: grid;
  gap: 5px;
  min-height: 74px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
}
.vocab-place-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(58,134,255,.18);
}
.vocab-place-card:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.vocab-place-card strong {
  font-weight: 950;
}
.vocab-place-card span {
  color: var(--muted);
  font-weight: 850;
}
.vocab-arcade-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .38fr);
  gap: 14px;
  align-items: start;
}
.vocab-mode-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
}
.vocab-mode-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: start;
  gap: 8px;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(18,20,23,.08);
  color: white;
  text-align: left;
  font-weight: 950;
}
.vocab-mode-card::before {
  content: "";
  position: absolute;
  inset: -32%;
  background: radial-gradient(circle at 22% 18%, rgba(255,255,255,.36), transparent 8rem);
  transform: rotate(9deg);
}
.vocab-mode-card.active {
  box-shadow: 0 0 0 4px rgba(255,255,255,.96), 0 0 0 8px rgba(255,209,102,.68), 0 18px 34px rgba(0,0,0,.22);
}
.vocab-mode-card:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.vocab-mode-card-find,
.vocab-mode-card-object_restore {
  background: linear-gradient(135deg, #18b7a7, #2563eb);
}
.vocab-mode-card-name,
.vocab-mode-card-wrong_labels {
  background: linear-gradient(135deg, #ef476f, #ff9f1c);
}
.vocab-mode-card-label_drop,
.vocab-mode-card-sound_hunt {
  background: linear-gradient(135deg, #60d394, #118ab2);
}
.vocab-mode-title,
.vocab-mode-card small,
.vocab-mode-badge {
  position: relative;
  z-index: 1;
}
.vocab-mode-title {
  align-self: end;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.vocab-mode-card small {
  opacity: .86;
}
.vocab-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(3,7,18,.2);
  font-size: .72rem;
  text-transform: uppercase;
}
.vocab-mode-icon {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 12px;
  background: rgba(3,7,18,.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 22px rgba(0,0,0,.2);
}
.vocab-mode-icon span,
.vocab-mode-icon::before,
.vocab-mode-icon::after {
  content: "";
  position: absolute;
  display: block;
}
.vocab-mode-icon-find::before {
  inset: 10px;
  border: 3px solid white;
  border-radius: 999px;
}
.vocab-mode-icon-find::after {
  left: 20px;
  top: 8px;
  width: 3px;
  height: 30px;
  background: #ffd166;
  box-shadow: -11px 12px 0 -1px #ffd166, 11px 12px 0 -1px #ffd166;
}
.vocab-mode-icon-name span {
  left: 9px;
  right: 9px;
  height: 6px;
  border-radius: 999px;
  background: white;
}
.vocab-mode-icon-name span:nth-child(1) { top: 12px; }
.vocab-mode-icon-name span:nth-child(2) { top: 21px; background: #ffd166; }
.vocab-mode-icon-name span:nth-child(3) { top: 30px; width: 18px; }
.vocab-mode-icon-label_drop span {
  left: 9px;
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: white;
}
.vocab-mode-icon-label_drop span:nth-child(1) { top: 10px; }
.vocab-mode-icon-label_drop span:nth-child(2) { top: 20px; background: #ffd166; }
.vocab-mode-icon-label_drop span:nth-child(3) { top: 30px; }
.vocab-mode-icon-object_restore::before {
  left: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  border: 3px dashed white;
  border-radius: 8px;
}
.vocab-mode-icon-object_restore::after {
  right: 8px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  border-radius: 5px;
  background: #ffd166;
}
.vocab-mode-icon-wrong_labels span {
  left: 9px;
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: white;
}
.vocab-mode-icon-wrong_labels span:nth-child(1) { top: 10px; transform: rotate(-5deg); }
.vocab-mode-icon-wrong_labels span:nth-child(2) { top: 20px; background: #ffd166; transform: rotate(6deg); }
.vocab-mode-icon-wrong_labels span:nth-child(3) { top: 30px; transform: rotate(-7deg); }
.vocab-mode-icon-sound_hunt span {
  bottom: 10px;
  width: 7px;
  border-radius: 999px;
  background: white;
}
.vocab-mode-icon-sound_hunt span:nth-child(1) { left: 11px; height: 16px; }
.vocab-mode-icon-sound_hunt span:nth-child(2) { left: 20px; height: 26px; background: #ffd166; }
.vocab-mode-icon-sound_hunt span:nth-child(3) { right: 11px; height: 19px; }
.vocab-mode-tab {
  display: grid;
  gap: 5px;
  min-width: 150px;
  min-height: 74px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
}
.vocab-mode-tab.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(58,134,255,.18);
}
.vocab-mode-tab:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.vocab-mode-tab span {
  font-weight: 950;
}
.vocab-mode-tab small {
  color: var(--muted);
  font-weight: 850;
}
.vocab-playground {
  display: grid;
}
.vocab-launch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(18,20,23,.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255,255,255,.88);
}
.vocab-launch-main {
  display: grid;
  align-content: start;
  gap: 10px;
}
.vocab-launch-main h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1;
}
.vocab-launch-main p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}
.vocab-launch-main .big-start {
  width: fit-content;
  min-height: 52px;
}
.vocab-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.vocab-launch-actions .ghost,
.vocab-zone-review .ghost {
  border-color: rgba(15,23,42,.18);
  background: rgba(255,255,255,.94);
  color: #0f172a;
}
.vocab-launch-preview {
  display: grid;
  align-content: center;
}
.vocab-launch-preview .vocab-scene-viewport {
  border-radius: 8px;
}
.vocab-launch-preview .vocab-scene {
  min-height: 0;
  box-shadow: none;
}
.vocab-launch-meta {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid rgba(18,20,23,.1);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.86);
}
.vocab-launch-meta strong {
  font-size: 1.25rem;
  line-height: 1;
}
.vocab-launch-meta span {
  color: var(--muted);
  font-weight: 900;
}
.vocab-zone-review {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(236,253,245,.82));
}
.vocab-zone-review header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.vocab-zone-review header strong {
  color: #334155;
  font-weight: 900;
}
.vocab-zone-review-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vocab-zone-review-counts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: white;
  color: #475569;
  font-weight: 900;
}
.vocab-zone-review-counts strong {
  color: #0f172a;
}
.vocab-zone-review-body {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(280px, .42fr);
  gap: 12px;
  min-height: 0;
}
.vocab-zone-review-scene {
  display: grid;
  min-height: 0;
}
.vocab-scene.zone-review .vocab-hotspot {
  pointer-events: none;
}
.vocab-scene.zone-review {
  cursor: crosshair;
}
.vocab-review-box {
  position: absolute;
  z-index: 80;
  display: grid;
  place-items: start;
  border: 2px solid rgba(37,99,235,.78);
  border-radius: 6px;
  padding: 0;
  background: rgba(37,99,235,.1);
  color: white;
  cursor: pointer;
}
.vocab-review-box span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  border-radius: 0 0 6px 0;
  background: #2563eb;
  font-size: .7rem;
  font-weight: 950;
}
.vocab-review-box.status-valid {
  border-color: rgba(16,185,129,.86);
  background: rgba(16,185,129,.16);
}
.vocab-review-box.status-valid span { background: #059669; }
.vocab-review-box.status-review {
  border-color: rgba(244,63,94,.86);
  background: rgba(244,63,94,.16);
}
.vocab-review-box.status-review span { background: #e11d48; }
.vocab-review-box.default-zone {
  border-style: dashed;
}
.vocab-review-box.custom-zone {
  border-style: solid;
  background: rgba(20,184,166,.18);
}
.vocab-review-box.selected {
  z-index: 90;
  border-width: 4px;
  box-shadow: 0 0 0 4px white, 0 0 0 9px rgba(255,209,102,.72), 0 18px 38px rgba(0,0,0,.28);
}
.vocab-review-box.selected-zone {
  box-shadow: 0 0 0 4px white, 0 0 0 10px rgba(20,184,166,.72), 0 18px 38px rgba(0,0,0,.28);
}
.vocab-zone-draft {
  position: absolute;
  z-index: 95;
  border: 3px solid #f59e0b;
  border-radius: 6px;
  background: rgba(245,158,11,.18);
  box-shadow: 0 0 0 3px rgba(255,255,255,.82), 0 12px 26px rgba(0,0,0,.22);
  pointer-events: none;
}
.vocab-zone-review-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}
.vocab-zone-selected {
  display: grid;
  gap: 4px;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  padding: 10px;
  background: white;
}
.vocab-zone-selected.status-valid { border-left-color: #059669; }
.vocab-zone-selected.status-review { border-left-color: #e11d48; }
.vocab-zone-selected span {
  color: #64748b;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.vocab-zone-selected strong {
  color: #0f172a;
  font-size: 1.08rem;
}
.vocab-zone-selected small {
  color: #475569;
  font-weight: 850;
}
.vocab-zone-selected code {
  overflow-wrap: anywhere;
  color: #0f766e;
  font-weight: 850;
}
.vocab-zone-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.vocab-zone-actions button {
  min-height: 38px;
}
.vocab-zone-save-message {
  margin: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(20,184,166,.14);
  color: #0f172a;
  font-weight: 900;
}
.vocab-zone-rect-list {
  display: grid;
  gap: 6px;
  max-height: 116px;
  overflow: auto;
}
.vocab-zone-rect-list > span,
.vocab-zone-rect-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(255,255,255,.88);
  color: #0f172a;
  text-align: left;
}
.vocab-zone-rect-list button.active {
  border-color: #14b8a6;
  box-shadow: inset 0 0 0 2px rgba(20,184,166,.22);
}
.vocab-zone-rect-list span span,
.vocab-zone-rect-list button span {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #14b8a6;
  color: white;
  font-size: .72rem;
  font-weight: 950;
}
.vocab-zone-rect-list code {
  overflow: hidden;
  color: #334155;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vocab-zone-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.vocab-zone-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, .75fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255,255,255,.88);
  color: #0f172a;
  text-align: left;
}
.vocab-zone-list button.active {
  border-color: #ffd166;
  box-shadow: inset 0 0 0 2px rgba(255,209,102,.32);
}
.vocab-zone-list span {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  color: white;
  font-size: .72rem;
  font-weight: 950;
}
.vocab-zone-list .status-valid span { background: #059669; }
.vocab-zone-list .status-review span { background: #e11d48; }
.vocab-zone-list strong,
.vocab-zone-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vocab-zone-list small {
  color: #64748b;
  font-weight: 850;
}
.vocab-session {
  position: relative;
  display: grid;
  gap: 14px;
}
.vocab-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.vocab-session-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
}
.vocab-session-score {
  display: grid;
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
  text-align: center;
}
.vocab-session-score strong {
  font-size: 1.35rem;
}
.vocab-session-score span {
  color: var(--muted);
  font-weight: 900;
}
.vocab-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(18,20,23,.1);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255,255,255,.9);
}
.vocab-prompt-copy {
  display: grid;
  gap: 4px;
}
.vocab-prompt strong {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
}
.vocab-prompt span {
  color: var(--muted);
  font-weight: 850;
}
.vocab-prompt.correct {
  border-color: rgba(96,211,148,.48);
  background: #edfff3;
}
.vocab-prompt.wrong {
  border-color: rgba(239,71,111,.44);
  background: #fff0f2;
}
.vocab-prompt.solution {
  border-color: rgba(255,209,102,.7);
  background: #fff8d8;
}
.vocab-debug-panel {
  display: grid;
  gap: 8px;
  border: 2px solid rgba(255, 234, 0, .78);
  border-radius: 8px;
  padding: 10px;
  background: rgba(3, 7, 18, .92);
  color: white;
  box-shadow: 0 18px 42px rgba(0,0,0,.34);
}
.vocab-debug-panel > strong {
  color: #ffea00;
  font-size: .82rem;
  letter-spacing: 0;
}
.vocab-debug-panel > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.vocab-debug-panel div div {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  padding: 5px 6px;
  background: rgba(255,255,255,.08);
}
.vocab-debug-panel span {
  color: rgba(255,255,255,.68);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}
.vocab-debug-panel code {
  overflow: hidden;
  color: white;
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vocab-game-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(210px, 300px);
  gap: 14px;
  align-items: stretch;
}
.vocab-scene-viewport {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
}
.vocab-scene {
  position: relative;
  width: calc(100% * var(--vocab-zoom, 1));
  aspect-ratio: 1672 / 941;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(18,20,23,.16);
  border-radius: 8px;
  background: #dbeafe;
  box-shadow: var(--shadow);
}
.vocab-scene-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.vocab-touch-loupe {
  position: absolute;
  z-index: 75;
  width: clamp(132px, 28vw, 172px);
  height: clamp(132px, 28vw, 172px);
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.96);
  border-radius: 999px;
  background: #071123;
  box-shadow: 0 18px 38px rgba(0,0,0,.36), 0 0 0 4px rgba(255,209,102,.48);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.94);
  transition: opacity .1s ease, transform .1s ease;
}
.vocab-touch-loupe.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.vocab-touch-loupe-image {
  position: absolute;
  max-width: none;
  pointer-events: none;
  user-select: none;
}
.vocab-scene.solution-visible .vocab-scene-photo {
  filter: brightness(.62) saturate(.85);
}
.vocab-hotspot {
  position: absolute;
  z-index: 20;
  min-height: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(255,255,255,.01);
}
.vocab-hotspot:disabled {
  opacity: 1;
}
.vocab-hotspot:hover,
.vocab-hotspot:focus-visible {
  border-color: #ffd166;
  background: rgba(255,209,102,.18);
  box-shadow: 0 0 0 4px rgba(255,209,102,.16);
}
.vocab-hotspot.target {
  z-index: 40;
  border: 8px solid #ffea00;
  background: rgba(255,234,0,.34);
  box-shadow:
    inset 0 0 0 4px rgba(255,31,90,.95),
    0 0 0 5px rgba(255,255,255,.96),
    0 0 0 13px rgba(0,229,255,.5),
    0 0 42px rgba(255,234,0,.9);
}
.vocab-hotspot.target::before,
.vocab-hotspot.target::after {
  display: none;
  content: "";
  position: absolute;
  pointer-events: none;
}
.vocab-hotspot.target::before {
  inset: -18px;
  border: 5px solid #00e5ff;
  border-radius: 16px;
  box-shadow:
    0 0 0 5px rgba(3,7,18,.54),
    0 0 28px rgba(0,229,255,.9);
  animation: vocabTargetPulse 1s ease-in-out infinite alternate;
}
.vocab-hotspot.target::after {
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 4px solid white;
  border-radius: 999px;
  background: #ff1f5a;
  box-shadow: 0 0 22px rgba(255,31,90,.9);
  transform: translate(-50%, -50%);
}
.vocab-scene.preview .vocab-hotspot {
  pointer-events: none;
}
.vocab-debug-box {
  position: absolute;
  z-index: 55;
  border: 2px dashed rgba(0, 229, 255, .72);
  background: rgba(0, 229, 255, .08);
  pointer-events: none;
}
.vocab-debug-box span {
  position: absolute;
  left: 0;
  top: 0;
  max-width: min(220px, 80vw);
  border-radius: 0 0 6px 0;
  padding: 3px 5px;
  background: rgba(3, 7, 18, .86);
  color: white;
  font-size: .66rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.vocab-debug-box.target {
  z-index: 65;
  border: 5px solid #ffea00;
  background: rgba(255, 234, 0, .22);
  box-shadow:
    0 0 0 4px rgba(255,255,255,.95),
    0 0 0 9px rgba(255,31,90,.78),
    0 0 32px rgba(255,234,0,.96);
}
.vocab-debug-box.target span {
  background: #ffea00;
  color: #071123;
}
.vocab-target-crop {
  display: grid;
  gap: 8px;
}
.vocab-target-crop > span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 950;
  text-transform: uppercase;
}
.vocab-target-crop-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 150px;
  overflow: hidden;
  border: 5px solid #ffea00;
  border-radius: 10px;
  background: #071123;
  box-shadow:
    0 0 0 4px white,
    0 0 0 9px rgba(255,31,90,.78),
    0 16px 34px rgba(0,0,0,.28);
}
.vocab-target-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}
.vocab-crop-debug {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  border-radius: 8px;
  padding: 8px;
  background: rgba(3,7,18,.9);
  color: white;
}
.vocab-crop-debug dt {
  color: rgba(255,255,255,.68);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}
.vocab-crop-debug dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: .76rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vocab-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.vocab-zoom-controls button {
  min-width: 42px;
  min-height: 36px;
  padding: 0 10px;
  border-color: rgba(18,20,23,.18);
  background: rgba(255,255,255,.95);
  color: var(--ink);
}
.vocab-zoom-controls span {
  min-width: 52px;
  border: 1px solid rgba(18,20,23,.16);
  border-radius: 8px;
  padding: 7px 8px;
  background: white;
  color: var(--ink);
  font-weight: 950;
  text-align: center;
}
@keyframes vocabTargetPulse {
  from { transform: scale(.96); opacity: .82; }
  to { transform: scale(1.04); opacity: 1; }
}
@keyframes vocabSoundPulse {
  from { transform: scaleY(.58); opacity: .68; }
  to { transform: scaleY(1); opacity: 1; }
}
.vocab-word-tray,
.vocab-choice-list {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}
.vocab-word-tray strong {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1;
}
.vocab-word-tray span {
  color: var(--muted);
  font-weight: 900;
}
.vocab-word-tray small {
  color: var(--muted);
  font-weight: 900;
}
.vocab-choice {
  min-height: 58px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #e7f5ff);
  color: var(--ink);
  font-weight: 950;
  text-align: left;
}
.vocab-label-panel,
.vocab-restore-panel,
.vocab-wrong-label-panel,
.vocab-sound-panel {
  color: var(--ink);
}
.vocab-restore-card {
  display: grid;
  gap: 8px;
}
.vocab-sound-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 8px;
  padding: 14px;
  background:
    radial-gradient(circle at 14% 8%, rgba(56,189,248,.22), transparent 7rem),
    linear-gradient(135deg, rgba(20,184,166,.14), rgba(59,130,246,.16)),
    white;
}
.vocab-sound-button {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(1.05rem, 1.35vw, 1.28rem);
}
.vocab-sound-button span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  color: white;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.vocab-sound-wave {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  background: rgba(15,23,42,.82);
}
.vocab-sound-wave span {
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #67e8f9, #22c55e);
  box-shadow: 0 0 16px rgba(34,211,238,.34);
  animation: vocabSoundPulse 1.05s ease-in-out infinite alternate;
}
.vocab-sound-wave span:nth-child(1) { height: 18px; animation-delay: -.2s; }
.vocab-sound-wave span:nth-child(2) { height: 34px; animation-delay: -.08s; }
.vocab-sound-wave span:nth-child(3) { height: 48px; }
.vocab-sound-wave span:nth-child(4) { height: 30px; animation-delay: -.16s; }
.vocab-sound-wave span:nth-child(5) { height: 22px; animation-delay: -.04s; }
.vocab-sound-card > span {
  color: #0f766e;
  font-weight: 950;
}
.vocab-sound-reveal-name {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.86);
}
.vocab-sound-reveal-name span {
  color: #0f766e;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.vocab-sound-reveal-name strong {
  min-width: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.vocab-sound-reveal-name small {
  color: var(--muted);
  font-weight: 900;
}
.vocab-label-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.vocab-label-chip {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 2px solid rgba(20,184,166,.28);
  border-radius: 8px;
  padding: 9px 11px;
  background:
    linear-gradient(135deg, rgba(45,212,191,.18), rgba(59,130,246,.12)),
    white;
  color: #0f172a;
  cursor: grab;
  text-align: left;
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
}
.vocab-label-chip:active {
  cursor: grabbing;
}
.vocab-label-chip.selected,
.vocab-label-chip.dragging {
  border-color: #14b8a6;
  background:
    linear-gradient(135deg, rgba(20,184,166,.28), rgba(37,99,235,.16)),
    white;
  box-shadow: 0 0 0 3px rgba(20,184,166,.18), 0 14px 30px rgba(15,23,42,.14);
}
.vocab-label-chip.placed {
  border-color: rgba(34,197,94,.28);
  background: rgba(240,253,244,.86);
  color: #166534;
  cursor: default;
  opacity: .82;
}
.vocab-label-chip strong {
  overflow: hidden;
  font-size: clamp(1rem, 1.35vw, 1.24rem);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vocab-label-chip small {
  overflow: hidden;
  color: #64748b;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vocab-placed-list > span,
.vocab-restore-card > span {
  color: #64748b;
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
}
.vocab-restore-card small {
  color: #475569;
  font-weight: 900;
}
.vocab-placed-list {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(15,23,42,.1);
  padding-top: 10px;
}
.vocab-placed-list strong {
  overflow: hidden;
  border: 1px solid rgba(20,184,166,.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(240,253,250,.92);
  color: #0f766e;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vocab-placed-label,
.vocab-restored-marker {
  position: absolute;
  z-index: 62;
  max-width: min(190px, 26%);
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  color: white;
  font-size: clamp(.68rem, .9vw, .84rem);
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(0,0,0,.24);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
}
.vocab-restored-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #22c55e, #0f766e);
}
.vocab-wrong-label-marker {
  position: absolute;
  z-index: 64;
  max-width: min(180px, 24%);
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 7px 11px;
  background: linear-gradient(135deg, #f8fafc, #dbeafe);
  color: #0f172a;
  font-size: clamp(.7rem, .9vw, .86rem);
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
}
.vocab-wrong-label-marker:hover,
.vocab-wrong-label-marker:focus-visible {
  border-color: #ffd166;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  box-shadow: 0 0 0 4px rgba(255,209,102,.2), 0 14px 28px rgba(0,0,0,.3);
}
.vocab-wrong-label-marker.recent {
  animation: vocabWrongLabelNudge .24s ease-in-out;
}
.vocab-wrong-label-summary {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255,209,102,.18), rgba(59,130,246,.12)),
    white;
}
.vocab-wrong-label-summary strong {
  color: #0f172a;
  font-size: clamp(2rem, 3.4vw, 3.3rem);
  line-height: 1;
}
.vocab-wrong-label-summary span {
  color: #475569;
  font-weight: 900;
}
.vocab-restored-marker::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-left: 0;
  border-top: 0;
  transform: rotate(45deg) translateY(-1px);
}
@keyframes vocabWrongLabelNudge {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  35% { transform: translate(-53%, -50%) rotate(-2deg); }
  70% { transform: translate(-47%, -50%) rotate(2deg); }
}
.vocab-restore-mask {
  position: absolute;
  z-index: 58;
  border: 2px dashed rgba(255,255,255,.9);
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(15,23,42,.72) 0 8px, rgba(15,23,42,.54) 8px 16px),
    rgba(3,7,18,.68);
  pointer-events: none;
  box-shadow:
    inset 0 0 0 3px rgba(20,184,166,.38),
    0 0 0 4px rgba(3,7,18,.22);
}
.vocab-restore-card .vocab-target-crop-frame {
  min-height: 128px;
  border-color: #14b8a6;
  box-shadow:
    0 0 0 4px white,
    0 0 0 8px rgba(20,184,166,.44),
    0 16px 34px rgba(0,0,0,.24);
}
.vocab-restore-card > strong {
  color: #0f172a;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
}

.house-sky {
  position: absolute;
  inset: 0 0 18%;
  background:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,.82), transparent 5rem),
    linear-gradient(180deg, #78cfff, #e7fbff 70%, #9fe6a9 71%);
}
.house-sun {
  position: absolute;
  left: 8%;
  top: 8%;
  width: 8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 0 16px rgba(255,209,102,.18);
}
.house-main {
  position: absolute;
  left: 34%;
  top: 30%;
  width: 34%;
  height: 45%;
  border: 3px solid rgba(71,85,105,.42);
  background:
    linear-gradient(90deg, rgba(255,255,255,.18) 49%, rgba(15,23,42,.12) 50%, transparent 51%),
    linear-gradient(180deg, #f8f1de, #e8d2ad);
}
.house-roof {
  position: absolute;
  left: 31%;
  top: 16%;
  width: 40%;
  height: 18%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: repeating-linear-gradient(90deg, #b45309 0 12px, #d97706 12px 24px);
}
.house-roof i {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 28%;
  background: rgba(255,255,255,.18);
}
.house-chimney {
  position: absolute;
  left: 59%;
  top: 9%;
  width: 5%;
  height: 16%;
  background: #92400e;
  border: 2px solid rgba(15,23,42,.25);
}
.house-gutter {
  position: absolute;
  left: 32.5%;
  top: 29.5%;
  width: 37%;
  height: 2.2%;
  border-radius: 999px;
  background: #64748b;
}
.house-window,
.house-attic-window,
.house-basement-window {
  position: absolute;
  border: 3px solid #334155;
  background: linear-gradient(135deg, #dff6ff, #60a5fa);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.54);
}
.house-window.left { left: 13%; top: 30%; width: 22%; height: 22%; }
.house-window.right { right: 13%; top: 30%; width: 22%; height: 22%; }
.house-window span {
  position: absolute;
  inset: -5px -13px;
  border-left: 8px solid #2563eb;
  border-right: 8px solid #2563eb;
}
.house-attic-window {
  left: 43%;
  top: -20%;
  width: 14%;
  height: 16%;
  border-radius: 50% 50% 6px 6px;
}
.house-basement-window {
  left: 15%;
  bottom: 2%;
  width: 20%;
  height: 12%;
}
.house-door {
  position: absolute;
  left: 42%;
  bottom: 0;
  width: 17%;
  height: 43%;
  border: 3px solid #451a03;
  background: linear-gradient(180deg, #854d0e, #451a03);
}
.house-door span {
  position: absolute;
  right: 13%;
  top: 48%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd166;
}
.house-number,
.house-doorbell,
.house-porch-light {
  position: absolute;
  z-index: 2;
}
.house-number {
  left: 62%;
  bottom: 25%;
  color: #334155;
  font-weight: 950;
}
.house-doorbell {
  left: 61%;
  bottom: 36%;
  width: 8px;
  height: 12px;
  border-radius: 3px;
  background: #111827;
}
.house-porch-light {
  left: 33%;
  bottom: 43%;
  width: 14px;
  height: 18px;
  border-radius: 50% 50% 8px 8px;
  background: #fde68a;
  box-shadow: 0 0 16px rgba(253,230,138,.8);
}
.house-balcony {
  position: absolute;
  right: -4%;
  top: 27%;
  width: 32%;
  height: 18%;
  border: 3px solid #334155;
  background: repeating-linear-gradient(90deg, transparent 0 14px, #334155 14px 17px);
}
.house-veranda {
  position: absolute;
  left: 66%;
  top: 54%;
  width: 18%;
  height: 19%;
  border: 3px solid rgba(14,116,144,.72);
  background: linear-gradient(135deg, rgba(224,242,254,.72), rgba(20,184,166,.22));
}
.house-garage {
  position: absolute;
  left: 70%;
  top: 49%;
  width: 19%;
  height: 25%;
  border: 3px solid #475569;
  background: #e2e8f0;
}
.house-garage span {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 68%;
  background: repeating-linear-gradient(180deg, #94a3b8 0 9px, #cbd5e1 9px 18px);
}
.house-terrace,
.house-driveway,
.house-path {
  position: absolute;
  background: repeating-linear-gradient(45deg, #d6d3d1 0 12px, #e7e5e4 12px 24px);
}
.house-terrace { left: 56%; top: 73%; width: 29%; height: 8%; }
.house-driveway { left: 72%; top: 75%; width: 21%; height: 15%; clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); }
.house-path { left: 45%; top: 73%; width: 12%; height: 15%; clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.house-garden,
.house-lawn {
  position: absolute;
  background: #22c55e;
}
.house-garden { left: 6%; top: 59%; width: 33%; height: 21%; border-radius: 28px 28px 0 0; }
.house-lawn { left: 8%; top: 72%; width: 34%; height: 10%; }
.house-hedge {
  position: absolute;
  left: 8%;
  top: 57%;
  width: 24%;
  height: 8%;
  border-radius: 999px;
  background: #15803d;
}
.house-flower-bed {
  position: absolute;
  left: 28%;
  top: 66%;
  width: 11%;
  height: 8%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 45%, #ef476f 0 8%, transparent 9%),
    radial-gradient(circle at 48% 36%, #ffd166 0 8%, transparent 9%),
    radial-gradient(circle at 73% 52%, #8b5cf6 0 8%, transparent 9%),
    #16a34a;
}
.house-fence {
  position: absolute;
  left: 1%;
  top: 69%;
  width: 31%;
  height: 10%;
  background: repeating-linear-gradient(90deg, #f8fafc 0 8px, transparent 8px 17px);
  border-top: 4px solid #f8fafc;
}
.house-gate {
  position: absolute;
  left: 22%;
  top: 68%;
  width: 9%;
  height: 11%;
  border: 4px solid #f8fafc;
  background: rgba(255,255,255,.16);
}
.house-mailbox {
  position: absolute;
  left: 14%;
  top: 63%;
  width: 7%;
  height: 10%;
}
.house-mailbox::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 48%;
  border-radius: 14px 14px 3px 3px;
  background: #1d4ed8;
}
.house-mailbox span {
  position: absolute;
  left: 48%;
  top: 44%;
  width: 7px;
  height: 56%;
  background: #475569;
}
.house-tree {
  position: absolute;
  left: 88%;
  top: 30%;
  width: 9%;
  height: 32%;
}
.house-tree::before {
  content: "";
  position: absolute;
  left: 42%;
  bottom: 0;
  width: 14%;
  height: 48%;
  background: #854d0e;
}
.house-tree span {
  position: absolute;
  inset: 0 0 34%;
  border-radius: 50%;
  background: #15803d;
}
.house-neighbor {
  position: absolute;
  top: 39%;
  width: 18%;
  height: 24%;
  background: #f1f5f9;
}
.house-neighbor.left { left: 2%; }
.house-neighbor.right { right: 1%; transform: scale(.82); transform-origin: bottom right; }
.house-neighbor::before {
  content: "";
  position: absolute;
  left: -8%;
  top: -24%;
  width: 116%;
  height: 32%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #be123c;
}
.house-neighbor span {
  position: absolute;
  left: 35%;
  top: 36%;
  width: 28%;
  height: 32%;
  background: #93c5fd;
  border: 3px solid #334155;
}
.house-sidewalk {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15%;
  height: 7%;
  background: repeating-linear-gradient(90deg, #e7e5e4 0 60px, #d6d3d1 60px 64px);
}
.house-street {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 15%;
  background: linear-gradient(180deg, #475569, #1f2937);
}
.house-street::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 45%;
  border-top: 4px dashed rgba(255,255,255,.58);
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.hud span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 950;
}
.game-stage {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.7)),
    linear-gradient(135deg, #dffaf2 0%, #fff3bd 45%, #ffd8e2 100%);
}
.stage-title { margin: 0 0 8px; font-size: clamp(28px, 4.5vw, 54px); letter-spacing: 0; }
.stage-subtitle { margin: 0 0 16px; color: var(--muted); font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.choice, .tile-button {
  min-height: 82px;
  padding: 12px;
  background: white;
  color: var(--ink);
  border: 2px solid transparent;
  box-shadow: 0 8px 20px rgba(18,20,23,.1);
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 950;
  text-align: center;
}
.choice.correct { border-color: var(--green); background: #eafff0; }
.choice.wrong { border-color: var(--coral); background: #fff0f2; }
.visual-card {
  display: grid;
  place-items: center;
  width: min(420px, 100%);
  min-height: 220px;
  margin-bottom: 16px;
  border-radius: 8px;
  color: white;
  background:
    radial-gradient(circle at 18% 26%, rgba(255,255,255,.46), transparent 5rem),
    conic-gradient(from 90deg, var(--teal), var(--yellow), var(--coral), var(--blue), var(--teal));
  font-size: clamp(36px, 7vw, 86px);
  font-weight: 950;
  text-shadow: 0 4px 18px rgba(0,0,0,.22);
}

.letter-board { display: grid; gap: 14px; }
.masked-word {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 950;
}
.masked-word span {
  min-width: 34px;
  min-height: 50px;
  display: grid;
  place-items: center;
  border-bottom: 4px solid var(--ink);
}
.keyboard { display: grid; grid-template-columns: repeat(13, 1fr); gap: 6px; }
.keyboard button { min-height: 42px; padding: 0; background: white; color: var(--ink); border: 1px solid var(--line); font-weight: 950; }
.hero-stack {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: min(300px, 40%);
  min-height: 270px;
  display: grid;
  align-content: end;
  justify-items: center;
}
.hero-body {
  width: 90px;
  height: 128px;
  border-radius: 42px 42px 22px 22px;
  background: linear-gradient(180deg, #3a86ff, #18b7a7);
  box-shadow: inset 0 -18px 0 rgba(0,0,0,.12);
}
.weight {
  min-width: 118px;
  min-height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: -4px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 950;
}
.stage-cracked { animation: crack .7s ease both; }
@keyframes crack { 60% { transform: translateY(10px) rotate(-1deg); } 100% { transform: translateY(140px) rotate(2deg); opacity: .35; } }

.mole-field {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  min-height: 420px;
  align-content: center;
}
.hole {
  position: relative;
  min-height: 112px;
  border-radius: 8px;
  background: radial-gradient(ellipse at center, #4b2e21 0%, #231511 58%, transparent 60%);
}
.mole {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 22px;
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 3px solid white;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffd166, #ef476f);
  color: white;
  font-weight: 950;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.balloon-sky {
  position: relative;
  min-height: 450px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, #8fd8ff 0%, #fff7c2 100%);
}
.balloon {
  position: absolute;
  bottom: -90px;
  width: 120px;
  height: 150px;
  border-radius: 60px 60px 48px 48px;
  background: linear-gradient(180deg, #ef476f, #ff9f1c);
  color: white;
  font-weight: 950;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  box-shadow: 0 16px 28px rgba(18,20,23,.18);
  animation: floatUp var(--float-speed, 8s) linear forwards;
}
@keyframes floatUp { to { transform: translateY(-620px); } }

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}
.memory-card {
  aspect-ratio: 5 / 6;
  background: linear-gradient(135deg, var(--ink), #335);
  color: white;
  font-weight: 950;
}
.memory-card.flipped, .memory-card.matched { background: white; color: var(--ink); border: 2px solid var(--teal); }

.crossword-list { display: grid; gap: 12px; }
.crossword-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 320px);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: white;
}
.crossword-row strong { color: #0f172a; }
.crossword-row input { color: #0f172a; font-weight: 900; }
.crossword-row.correct input { border-color: var(--green); background: #edfff3; }
.crossword-row.wrong input,
.crossword-row.solution-added input { border-color: var(--coral); background: #fff0f2; }

.maze-grid { display: grid; gap: 14px; }
.maze-scene {
  min-height: 260px;
  border-radius: 8px;
  background:
    linear-gradient(115deg, transparent 45%, rgba(18,20,23,.12) 46%, transparent 56%),
    linear-gradient(245deg, transparent 42%, rgba(18,20,23,.12) 43%, transparent 58%),
    linear-gradient(180deg, #c7f9cc, #fff3b0);
}
.maze-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.story-line {
  font-size: clamp(20px, 2.5vw, 32px);
  line-height: 1.7;
  font-weight: 800;
}
.story-line input { display: inline-block; width: 160px; margin: 0 6px; }
.story-line input.correct { border-color: var(--green); background: #edfff3; }
.story-line input.wrong { border-color: var(--coral); background: #fff0f2; }

.puzzle-wrap { display: grid; grid-template-columns: minmax(300px, 520px) minmax(220px, 1fr); gap: 18px; align-items: stretch; }
.puzzle-main,
.taquin-main {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 0;
}
.puzzle-board {
  --puzzle-grid: 4;
  display: grid;
  gap: 0;
  padding: 12px;
  width: min(620px, 100%);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(5,10,22,.86);
  box-shadow: var(--shadow);
}
.puzzle-board.puzzle-grid-4 {
  --puzzle-grid: 4;
  grid-template-columns: repeat(4, 1fr);
}
.puzzle-board.puzzle-grid-5 {
  --puzzle-grid: 5;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px;
}
.puzzle-board.puzzle-grid-6 {
  --puzzle-grid: 6;
  grid-template-columns: repeat(6, 1fr);
  padding: 8px;
}
.puzzle-tile {
  --piece-x: 0;
  --piece-y: 0;
  position: relative;
  aspect-ratio: 1;
  overflow: visible;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.62);
  color: white;
  background: #0b1220;
  font-weight: 950;
  cursor: pointer;
  filter: drop-shadow(0 9px 14px rgba(0,0,0,.28));
  isolation: isolate;
  z-index: 1;
}
.puzzle-tile.edge-right-tab,
.puzzle-tile.edge-bottom-tab {
  z-index: 2;
}
.puzzle-tile.selected {
  border-color: #ffd166;
  box-shadow: inset 0 0 0 4px rgba(255,209,102,.32), 0 0 0 3px rgba(255,209,102,.18);
  z-index: 4;
}
.puzzle-board.solved .puzzle-tile {
  border-color: rgba(255,255,255,.86);
}
.puzzle-board.readonly .puzzle-tile:disabled {
  opacity: 1;
  cursor: default;
}
.puzzle-board.readonly .puzzle-tile {
  filter: none;
}
.puzzle-piece-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  transform: rotate(0deg);
  transition: transform .18s ease;
}
.puzzle-piece-art .verb-poster {
  width: 400%;
  height: 400%;
  min-height: 0;
  border-radius: 0;
  transform: translate(var(--piece-x), var(--piece-y));
}
.puzzle-board.puzzle-grid-5 .puzzle-piece-art .verb-poster {
  width: 500%;
  height: 500%;
}
.puzzle-board.puzzle-grid-6 .puzzle-piece-art .verb-poster {
  width: 600%;
  height: 600%;
}
.puzzle-tile.piece-rot-1 .puzzle-piece-art { transform: rotate(90deg); }
.puzzle-tile.piece-rot-2 .puzzle-piece-art { transform: rotate(180deg); }
.puzzle-tile.piece-rot-3 .puzzle-piece-art { transform: rotate(270deg); }
.puzzle-board.puzzle-grid-4 .piece-col-0 { --piece-x: 0; }
.puzzle-board.puzzle-grid-4 .piece-col-1 { --piece-x: -25%; }
.puzzle-board.puzzle-grid-4 .piece-col-2 { --piece-x: -50%; }
.puzzle-board.puzzle-grid-4 .piece-col-3 { --piece-x: -75%; }
.puzzle-board.puzzle-grid-4 .piece-row-0 { --piece-y: 0; }
.puzzle-board.puzzle-grid-4 .piece-row-1 { --piece-y: -25%; }
.puzzle-board.puzzle-grid-4 .piece-row-2 { --piece-y: -50%; }
.puzzle-board.puzzle-grid-4 .piece-row-3 { --piece-y: -75%; }
.puzzle-board.puzzle-grid-5 .piece-col-0 { --piece-x: 0; }
.puzzle-board.puzzle-grid-5 .piece-col-1 { --piece-x: -20%; }
.puzzle-board.puzzle-grid-5 .piece-col-2 { --piece-x: -40%; }
.puzzle-board.puzzle-grid-5 .piece-col-3 { --piece-x: -60%; }
.puzzle-board.puzzle-grid-5 .piece-col-4 { --piece-x: -80%; }
.puzzle-board.puzzle-grid-5 .piece-row-0 { --piece-y: 0; }
.puzzle-board.puzzle-grid-5 .piece-row-1 { --piece-y: -20%; }
.puzzle-board.puzzle-grid-5 .piece-row-2 { --piece-y: -40%; }
.puzzle-board.puzzle-grid-5 .piece-row-3 { --piece-y: -60%; }
.puzzle-board.puzzle-grid-5 .piece-row-4 { --piece-y: -80%; }
.puzzle-board.puzzle-grid-6 .piece-col-0 { --piece-x: 0; }
.puzzle-board.puzzle-grid-6 .piece-col-1 { --piece-x: -16.666%; }
.puzzle-board.puzzle-grid-6 .piece-col-2 { --piece-x: -33.333%; }
.puzzle-board.puzzle-grid-6 .piece-col-3 { --piece-x: -50%; }
.puzzle-board.puzzle-grid-6 .piece-col-4 { --piece-x: -66.666%; }
.puzzle-board.puzzle-grid-6 .piece-col-5 { --piece-x: -83.333%; }
.puzzle-board.puzzle-grid-6 .piece-row-0 { --piece-y: 0; }
.puzzle-board.puzzle-grid-6 .piece-row-1 { --piece-y: -16.666%; }
.puzzle-board.puzzle-grid-6 .piece-row-2 { --piece-y: -33.333%; }
.puzzle-board.puzzle-grid-6 .piece-row-3 { --piece-y: -50%; }
.puzzle-board.puzzle-grid-6 .piece-row-4 { --piece-y: -66.666%; }
.puzzle-board.puzzle-grid-6 .piece-row-5 { --piece-y: -83.333%; }
.puzzle-tile::before,
.puzzle-tile::after {
  content: "";
  position: absolute;
  z-index: 3;
  display: none;
  pointer-events: none;
}
.puzzle-tile.edge-right-tab::before {
  top: 36%;
  right: -13%;
  width: 26%;
  height: 26%;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.54);
  background: linear-gradient(135deg, rgba(226,245,255,.98), rgba(100,116,139,.88));
  box-shadow: inset -8px -10px 16px rgba(15,23,42,.26), 0 4px 10px rgba(0,0,0,.2);
}
.puzzle-tile.edge-right-socket::before {
  top: 36%;
  right: -1px;
  width: 20%;
  height: 26%;
  border-radius: 999px 0 0 999px;
  background: radial-gradient(circle at 100% 50%, rgba(2,6,23,.96) 0 56%, rgba(15,23,42,.6) 57% 72%, transparent 73%);
  box-shadow: inset 4px 0 12px rgba(0,0,0,.5);
}
.puzzle-tile.edge-bottom-tab::after {
  left: 36%;
  bottom: -13%;
  width: 26%;
  height: 26%;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.54);
  background: linear-gradient(135deg, rgba(226,245,255,.98), rgba(100,116,139,.88));
  box-shadow: inset -8px -10px 16px rgba(15,23,42,.26), 0 4px 10px rgba(0,0,0,.2);
}
.puzzle-tile.edge-bottom-socket::after {
  left: 36%;
  bottom: -1px;
  width: 26%;
  height: 20%;
  border-radius: 999px 999px 0 0;
  background: radial-gradient(circle at 50% 100%, rgba(2,6,23,.96) 0 56%, rgba(15,23,42,.6) 57% 72%, transparent 73%);
  box-shadow: inset 0 4px 12px rgba(0,0,0,.5);
}
.puzzle-tile.edge-right-flat::before,
.puzzle-tile.edge-bottom-flat::after {
  display: none;
}
.verb-poster {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border-radius: 8px;
  padding: 20px;
  color: white;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 950;
  text-align: center;
}
.puzzle-form-card {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 100%;
  border-radius: 8px;
  padding: 22px;
  background: rgba(255,255,255,.92);
  color: #0f172a;
  box-shadow: 0 18px 34px rgba(0,0,0,.18);
}
.puzzle-form-card div {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-left: 6px solid #14b8a6;
  background: rgba(20,184,166,.08);
}
.puzzle-form-card div:nth-child(2) { border-left-color: #1d4ed8; background: rgba(29,78,216,.08); }
.puzzle-form-card div:nth-child(3) { border-left-color: #f43f5e; background: rgba(244,63,94,.08); }
.puzzle-form-card span {
  color: #64748b;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}
.puzzle-form-card strong {
  font-size: clamp(1.35rem, 2vw, 2.25rem);
  line-height: 1.05;
}
.puzzle-reference-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(244,199,102,.28);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)),
    rgba(3, 9, 17, .88);
  color: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.taquin-reference-card {
  border-color: rgba(96,165,250,.28);
}
.puzzle-reference-title {
  color: var(--wf-game-accent);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.puzzle-reference-meta {
  color: rgba(217,227,234,.72);
  font-size: .76rem;
  font-weight: 850;
  text-transform: uppercase;
}
.puzzle-reference-row {
  display: grid;
  grid-template-columns: minmax(94px, .44fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-left: 5px solid #14b8a6;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(2,6,23,.58);
}
.puzzle-reference-row-1 {
  border-left-color: #60a5fa;
}
.puzzle-reference-row-2 {
  border-left-color: #f43f5e;
}
.puzzle-reference-row span {
  color: rgba(217,227,234,.82);
  font-size: clamp(.78rem, 1.3vw, .95rem);
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}
.puzzle-reference-row strong {
  min-width: 0;
  color: #fffdf8;
  font-size: clamp(1.02rem, 2vw, 1.42rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 8px rgba(0,0,0,.48);
}
.puzzle-side {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 100%;
}
.puzzle-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
}
.puzzle-actions button {
  min-height: 48px;
}
.puzzle-end-wrap {
  display: grid;
  grid-template-columns: minmax(320px, 600px) minmax(260px, 1fr);
  align-items: center;
  gap: 18px;
  height: 100%;
  min-height: 0;
}
.puzzle-result-card {
  align-content: start;
  min-height: 0;
}
.puzzle-result-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.puzzle-result-stats span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: rgba(15,23,42,.08);
  color: #0f172a;
  font-weight: 950;
}
.taquin-wrap {
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(220px, 1fr);
  gap: 18px;
  align-items: stretch;
}
.taquin-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: min(520px, 100%);
  aspect-ratio: 1;
  border: 8px solid rgba(255,255,255,.24);
  border-radius: 8px;
  padding: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15,23,42,.98), rgba(8,13,30,.96)),
    url("/static/assets/arcade-backdrop.png") center / cover;
  box-shadow: var(--shadow);
}
.taquin-tile,
.taquin-empty {
  position: relative;
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 0;
}
.taquin-tile {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255,255,255,.58);
  background: #0b1220;
  color: white;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.taquin-tile.movable {
  border-color: rgba(255,209,102,.86);
  box-shadow: inset 0 0 0 3px rgba(255,209,102,.18);
}
.taquin-tile:hover,
.taquin-tile:focus-visible {
  transform: translateY(-2px);
}
.taquin-board.solved .taquin-tile {
  border-color: rgba(255,255,255,.86);
  box-shadow: none;
}
.taquin-empty {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255,255,255,.32);
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.1), transparent 48%),
    rgba(2,6,23,.66);
}
.taquin-empty::after {
  content: "";
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.taquin-piece-art {
  position: absolute;
  left: 0;
  top: 0;
  width: 300%;
  height: 300%;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(20,184,166,.9), rgba(244,63,94,.82)),
    linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,0)),
    url("/static/assets/arcade-backdrop.png") center / cover;
}
.taquin-tile.taquin-source-0 .taquin-piece-art { transform: translate(0, 0); }
.taquin-tile.taquin-source-1 .taquin-piece-art { transform: translate(-33.333%, 0); }
.taquin-tile.taquin-source-2 .taquin-piece-art { transform: translate(-66.666%, 0); }
.taquin-tile.taquin-source-3 .taquin-piece-art { transform: translate(0, -33.333%); }
.taquin-tile.taquin-source-4 .taquin-piece-art { transform: translate(-33.333%, -33.333%); }
.taquin-tile.taquin-source-5 .taquin-piece-art { transform: translate(-66.666%, -33.333%); }
.taquin-tile.taquin-source-6 .taquin-piece-art { transform: translate(0, -66.666%); }
.taquin-tile.taquin-source-7 .taquin-piece-art { transform: translate(-33.333%, -66.666%); }
.taquin-tile.taquin-source-8 .taquin-piece-art { transform: translate(-66.666%, -66.666%); }
.taquin-form-card {
  align-content: start;
}
.taquin-status {
  margin: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(15,23,42,.08);
  color: #0f172a;
  font-weight: 950;
}
.taquin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
}
.taquin-actions button {
  min-height: 48px;
}
.taquin-actions .ghost {
  border-color: rgba(15,23,42,.2);
  background: rgba(255,255,255,.94);
  color: #0f172a;
}
.taquin-end-wrap {
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(260px, 1fr);
  align-items: center;
  gap: 18px;
  height: 100%;
  min-height: 0;
}
.taquin-result-card {
  align-content: start;
  min-height: 0;
}

.vase-grid,
.runner-grid {
  display: grid;
  gap: 12px;
}
.vase-grid {
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
}
.runner-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.vase {
  min-height: 132px;
  display: grid;
  place-items: center;
  border-radius: 44px 44px 18px 18px;
  background: linear-gradient(180deg, #ffd166, #f77f00);
  color: var(--ink);
  font-weight: 950;
}
.vase.broken { opacity: .26; transform: rotate(-7deg); }
.runner-lane {
  min-height: 260px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #c7f9cc);
  border: 3px solid transparent;
}
.runner-lane.active { border-color: var(--blue); }
.runner-gate {
  min-width: 128px;
  min-height: 96px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 950;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.check-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding-top: 20px;
}
.check-row input { width: auto; min-height: auto; }
.check-row.compact {
  min-height: 34px;
  padding-top: 0;
}
.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.selection-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}
.selection-summary strong {
  color: var(--ink);
  font-size: 18px;
}
.selection-summary small {
  color: #64748b;
  font-weight: 700;
}
.selection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.selection-actions .ghost {
  min-height: 38px;
  border-color: #0f766e;
  padding: 0 12px;
  background: #0f766e;
  color: white;
  font-weight: 900;
}
.verb-table-wrap {
  max-height: 66vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,250,255,.92));
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { position: sticky; top: 0; background: #f7fbfa; z-index: 1; }
.verb-table tr {
  background: rgba(255,255,255,.76);
  transition: background .16s ease, box-shadow .16s ease;
}
.verb-table tbody tr:hover {
  background: #f8fafc;
  box-shadow: inset 0 0 0 999px rgba(56,189,248,.05);
}
.verb-table tr.is-selected {
  background: linear-gradient(90deg, rgba(20,184,166,.17), rgba(255,255,255,.9));
}
.verb-table tr.is-selected td:first-child {
  box-shadow: inset 4px 0 0 var(--teal);
}
.verb-table tr.freq-8 td:first-child,
.verb-table tr.freq-9 td:first-child,
.verb-table tr.freq-10 td:first-child {
  box-shadow: inset 4px 0 0 #f97316;
}
.verb-table tr.mastery-high {
  background: linear-gradient(90deg, rgba(96,211,148,.16), rgba(255,255,255,.9));
}
.verb-table tr.mastery-low {
  background: linear-gradient(90deg, rgba(239,71,111,.12), rgba(255,255,255,.9));
}
.verb-select-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 112px;
}
.verb-selected-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #0f766e;
  color: white;
  font-size: 11px;
  font-weight: 900;
}
.verb-form-pill,
.translation-pill,
.freq-pill,
.seen-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 0 8px;
  font-weight: 900;
  line-height: 1.1;
}
.verb-form-pill.infinitive {
  background: #e0f2fe;
  color: #075985;
}
.verb-form-pill.preterite {
  background: #ede9fe;
  color: #5b21b6;
}
.verb-form-pill.participle {
  background: #ffe4e6;
  color: #9f1239;
}
.translation-pill.fr {
  background: #ecfdf5;
  color: #047857;
}
.translation-pill.es {
  background: #fff7ed;
  color: #c2410c;
}
.verb-variant-cell {
  display: block;
  margin-top: 4px;
  color: #475569;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.15;
}
.freq-pill,
.seen-pill {
  justify-content: center;
  min-width: 34px;
  background: #f1f5f9;
  color: #334155;
}
.mastery-meter {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 74px;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 8px;
  background: #e2e8f0;
}
.mastery-meter strong {
  position: relative;
  z-index: 2;
  justify-self: center;
  color: #0f172a;
  font-size: .78rem;
  font-weight: 950;
}
.mastery-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef476f, #ffd166, #60d394);
}
.mastery-fill-0 { width: 0%; }
.mastery-fill-1 { width: 10%; }
.mastery-fill-2 { width: 20%; }
.mastery-fill-3 { width: 30%; }
.mastery-fill-4 { width: 40%; }
.mastery-fill-5 { width: 50%; }
.mastery-fill-6 { width: 60%; }
.mastery-fill-7 { width: 70%; }
.mastery-fill-8 { width: 80%; }
.mastery-fill-9 { width: 90%; }
.mastery-fill-10 { width: 100%; }
.empty-row {
  color: #64748b;
  font-weight: 800;
  text-align: center;
}
.stats-grid, .plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.stat-card, .plan-card, .leader-row, .doc-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
  box-shadow: 0 10px 28px rgba(18,20,23,.08);
}
.stat-card strong, .plan-card strong { display: block; font-size: 28px; margin-top: 8px; }
.progress-dashboard {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.progress-dashboard-hero,
.progress-dashboard-panel,
.progress-metric-card {
  border: 1px solid rgba(244,199,102,.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 0%, rgba(244,199,102,.16), transparent 32%),
    linear-gradient(180deg, rgba(8,24,36,.96), rgba(5,13,23,.96));
  color: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 14px 32px rgba(3,7,18,.18);
}
.progress-dashboard-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px;
}
.progress-dashboard-hero h3 {
  margin: 0;
  color: #fffdf8;
  font-size: clamp(1.6rem, 3.4vw, 2.7rem);
  line-height: 1;
}
.progress-dashboard-hero p {
  margin: 0;
  color: rgba(217,227,234,.76);
  font-weight: 800;
  line-height: 1.35;
}
.progress-dashboard-hero .eyebrow {
  color: #8fded0;
}
.progress-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.progress-metric-card {
  display: grid;
  gap: 4px;
  border-color: rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)),
    rgba(7, 16, 30, .92);
}
.progress-metric-card span,
.progress-metric-card small {
  color: rgba(205,217,226,.68);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.progress-metric-card strong {
  color: #fffdf8;
}
.progress-dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.progress-dashboard-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.progress-dashboard-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.progress-dashboard-panel header strong {
  color: #fffdf8;
  font-size: 1.1rem;
  font-weight: 950;
}
.progress-dashboard-panel header small {
  color: #8fded0;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.progress-game-list,
.progress-skill-list,
.progress-verb-review > div {
  display: grid;
  gap: 8px;
}
.progress-game-list article,
.progress-skill-list article,
.progress-verb-review article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 9px;
  background: rgba(3,9,17,.34);
}
.progress-game-list .game-mini-icon {
  width: 38px;
  height: 38px;
}
.progress-game-list strong,
.progress-skill-list strong,
.progress-verb-review strong {
  display: block;
  overflow: hidden;
  color: #fffdf8;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-game-list span,
.progress-skill-list span,
.progress-verb-review span {
  display: block;
  overflow: hidden;
  color: rgba(217,227,234,.68);
  font-size: .76rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-game-list em,
.progress-skill-list em,
.progress-verb-review em {
  color: #f4c766;
  font-style: normal;
  font-weight: 950;
}
.plan-card { display: grid; gap: 10px; }
.coupon-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.leaderboard { display: grid; gap: 8px; }
.leader-row { display: grid; grid-template-columns: 64px 1fr 120px 120px; gap: 10px; align-items: center; }
.doc-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.doc-links a { color: var(--ink); text-decoration: none; font-weight: 950; }

.checkout-shell, .doc-page {
  width: min(920px, calc(100% - 32px));
  margin: 40px auto;
}
.checkout-card, .doc-page section {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
  box-shadow: var(--shadow);
}
.doc-page h1 { font-size: clamp(34px, 6vw, 72px); letter-spacing: 0; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 340px; }
  .app-layout { grid-template-columns: 1fr; }
  .side-nav {
    position: static;
    display: flex;
    height: auto;
    overflow-x: auto;
  }
  .nav-button { min-width: 124px; }
  .game-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .scoring-guide,
  .scoring-guide dl,
  .vocab-zone-review-body {
    grid-template-columns: 1fr;
  }
  .hud { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .selection-toolbar { align-items: flex-start; flex-direction: column; }
  .selection-actions { flex-wrap: wrap; }
  .puzzle-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .auth-body { padding: 12px; }
  .auth-panel, .auth-brand, .panel { padding: 14px; }
  .two-col, .choice-grid, .maze-options, .filters { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .brand-lockup span { font-size: 16px; }
  .top-actions { justify-content: flex-end; }
  .keyboard { grid-template-columns: repeat(7, 1fr); }
  .leader-row { grid-template-columns: 44px 1fr; }
}

/* Arcade redesign pass: richer scenes, video cues and heavier game feel. */
body {
  background:
    linear-gradient(180deg, rgba(6, 10, 25, .62), rgba(255, 253, 248, .9) 54%, rgba(255, 253, 248, .96)),
    url("/static/assets/arcade-backdrop.png") center top / cover fixed no-repeat;
}

.topbar {
  border-bottom: 1px solid rgba(255,255,255,.28);
  background: rgba(7, 14, 30, .78);
  color: white;
}
.brand-lockup, .account-pill { color: white; }
.account-pill, .top-actions select, .ghost {
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.12);
  color: white;
}
.side-nav { gap: 10px; }
.nav-button {
  min-height: 54px;
  border-color: rgba(255,255,255,.36);
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 26px rgba(10, 19, 42, .14);
}
.nav-button.active {
  background: linear-gradient(135deg, #111827, #1f3b8f 55%, #ef476f);
}
.panel {
  border-color: rgba(255,255,255,.62);
  background: rgba(255,255,255,.9);
}
.panel-head h1 {
  font-size: 3.25rem;
  text-shadow: 0 2px 0 rgba(255,255,255,.5);
}

.game-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.game-card {
  min-height: 140px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 18px 36px rgba(10, 19, 42, .24);
  isolation: isolate;
}
.game-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
}
.game-card-title { font-size: 1.32rem; text-shadow: 0 3px 14px rgba(0,0,0,.28); }
.game-card small {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  padding: 0 8px;
  background: rgba(255,255,255,.18);
}

.hud {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}
.hud span {
  min-height: 52px;
  border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(234,244,255,.94));
  box-shadow: 0 10px 20px rgba(10, 19, 42, .12);
}
.game-stage {
  min-height: 680px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 14px;
  background: #071123;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 22px 54px rgba(10,19,42,.26);
}

.scene-frame {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-radius: 14px;
  color: white;
  background: #0b1220;
}
.scene-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,17,35,.24), rgba(7,17,35,.82)),
    url("/static/assets/arcade-backdrop.png") center / cover no-repeat;
  transform: scale(1.03);
}
.flash-choice-cinematic-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
  filter: saturate(1.12) contrast(1.06);
}
.flash-choice-cinematic-victory .flash-choice-cinematic-video {
  opacity: .96;
}
.flash-choice-cinematic-pending .flash-choice-cinematic-video {
  opacity: .8;
}
.flash-choice-cinematic-moment {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #040a14;
}
.flash-choice-cinematic-moment .flash-choice-cinematic-video {
  position: absolute;
  inset: 0;
  opacity: 1;
}
.arena-intro-cinematic-moment {
  background:
    radial-gradient(circle at 50% 48%, rgba(18,35,58,.56), rgba(4,10,20,.96) 72%),
    #040a14;
}
.arena-intro-cinematic-moment .arena-cinematic-video {
  background: transparent;
}
.arena-intro-cinematic-moment .arena-cinematic-video-backdrop {
  object-fit: cover;
  opacity: .42;
  filter: blur(18px) saturate(1.16) contrast(1.04);
  transform: scale(1.08);
}
.arena-intro-cinematic-moment .arena-cinematic-video-main {
  object-fit: contain;
  opacity: 1;
}
.arena-game-cinematic-moment .arena-mode-cinematic-backdrop {
  object-fit: cover;
  opacity: .42;
  filter: blur(18px) saturate(1.16) contrast(1.04);
  transform: scale(1.08);
}
.arena-game-cinematic-moment .arena-mode-cinematic-main {
  object-fit: contain;
  opacity: 1;
}
.arena-matchmaking-cinematic-moment .arena-mode-cinematic-backdrop {
  object-fit: cover;
  opacity: .5;
  filter: blur(18px) saturate(1.2) brightness(.78);
  transform: scale(1.08);
}
.arena-matchmaking-cinematic-moment .arena-mode-cinematic-main {
  object-fit: cover;
  opacity: .95;
}
.arena-matchmaking-orbit {
  position: absolute;
  left: 50%;
  bottom: clamp(80px, 15vh, 150px);
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 12px);
  gap: 9px;
  transform: translateX(-50%);
}
.arena-matchmaking-orbit span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f4c766;
  box-shadow: 0 0 18px rgba(244,199,102,.72);
  animation: arenaMatchmakingPulse .9s ease-in-out infinite;
}
.arena-matchmaking-orbit span:nth-child(2) { animation-delay: .16s; }
.arena-matchmaking-orbit span:nth-child(3) { animation-delay: .32s; }
@keyframes arenaMatchmakingPulse {
  0%, 100% { opacity: .35; transform: translateY(0) scale(.86); }
  45% { opacity: 1; transform: translateY(-8px) scale(1.08); }
}
.flash-choice-cinematic-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(4,10,20,.06), rgba(4,10,20,.5) 64%, rgba(4,10,20,.76)),
    linear-gradient(180deg, rgba(4,10,20,.08), rgba(4,10,20,.48));
}
.flash-choice-cinematic-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: min(680px, calc(100vw - 32px));
  padding: 18px;
  color: #fffdf8;
  text-align: center;
  text-shadow: 0 14px 38px rgba(0,0,0,.62);
}
.flash-choice-cinematic-copy span {
  color: #8fded0;
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.flash-choice-cinematic-copy strong {
  font-size: clamp(2.3rem, 8vw, 5.8rem);
  font-weight: 950;
  line-height: .94;
}
.flash-choice-cinematic-copy small {
  color: rgba(255,253,248,.86);
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  font-weight: 900;
}
.flash-choice-cinematic-skip {
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fffdf8;
  background: rgba(7,18,30,.72);
  font-weight: 950;
  cursor: pointer;
}
.scene-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mix-blend-mode: screen;
}
.scene-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 22px;
}
.scene-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(5, 10, 22, .58);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
}
.scene-titlebar span {
  color: #ffd166;
  font-weight: 950;
  text-transform: uppercase;
}
.scene-titlebar strong { font-size: 1.12rem; text-align: right; }

.stimulus-card {
  width: min(620px, 100%);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(224,255,247,.88));
  color: var(--ink);
  box-shadow: 0 20px 46px rgba(0,0,0,.22);
}
.stage-title {
  font-size: 3rem;
  line-height: 1;
  text-shadow: none;
}
.stage-subtitle { color: rgba(17,24,39,.75); }
.verb-variant-hint {
  display: grid;
  gap: 3px;
  margin: 8px 0 0;
  border-radius: 9px;
  padding: 7px 9px;
  background: rgba(15,23,42,.08);
  color: #1f2937;
  font-size: .78rem;
  line-height: 1.2;
}
.verb-variant-hint strong {
  color: #0f766e;
  font-size: .72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}
.verb-variant-hint span {
  font-weight: 950;
}
.verb-variant-hint small {
  color: #475569;
  font-weight: 750;
}
.audio-mode { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.audio-pulse {
  min-width: 180px;
  box-shadow: 0 0 0 0 rgba(58,134,255,.5);
  animation: pulseRing 1.4s ease infinite;
}
@keyframes pulseRing {
  70% { box-shadow: 0 0 0 18px rgba(58,134,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(58,134,255,0); }
}

.verb-video-shell {
  position: relative;
  overflow: hidden;
  width: min(960px, 100%);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 14px;
  box-shadow: 0 24px 58px rgba(0,0,0,.32);
  background: #071123;
}
.verb-video-canvas {
  display: block;
  width: 100%;
  height: 320px;
}
.choice-grid.cinematic-choices {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.choice, .tile-button {
  min-height: 96px;
  border: 1px solid rgba(255,255,255,.35);
  border-bottom: 5px solid rgba(0,0,0,.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(221,242,255,.96));
  box-shadow: 0 18px 34px rgba(0,0,0,.22);
}
.choice span, .tile-button span {
  display: block;
  color: #0f172a;
  font-size: 1.12rem;
}
.choice.correct {
  background: linear-gradient(180deg, #eafff0, #79e39a);
  animation: popWin .36s ease both;
}
.choice.wrong {
  background: linear-gradient(180deg, #fff0f2, #ff8fa3);
  animation: shake .32s ease both;
}
@keyframes popWin { 50% { transform: scale(1.04); } }
@keyframes shake {
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.letter-arena {
  display: grid;
  grid-template-columns: minmax(420px, 42%) minmax(520px, 1fr);
  gap: 12px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}
.letter-board {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 14px;
  padding: 14px;
  background: rgba(5,10,22,.62);
  backdrop-filter: blur(8px);
}
.letter-board .keyboard {
  flex: 0 0 auto;
  align-self: end;
  width: 100%;
  grid-template-columns: repeat(13, minmax(30px, 1fr));
  gap: 5px;
}
.letter-board .keyboard button {
  padding: 0;
}
.lift-dedicated,
.lift-game {
  display: grid;
  grid-template-rows: minmax(240px, 1fr) auto;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.lift-game {
  grid-template-rows: minmax(260px, 1fr) auto;
}
.lift-split-game {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.lift-letters-panel,
.lift-animation-panel {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 16px;
  background: rgba(5,10,22,.58);
  backdrop-filter: blur(8px);
}
.lift-letters-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}
.lift-animation-panel {
  display: grid;
  position: relative;
  background:
    linear-gradient(180deg, rgba(15,35,63,.94), rgba(18,68,89,.78)),
    radial-gradient(circle at 50% 14%, rgba(255,209,102,.22), transparent 10rem);
}
.lift-animation-panel .lift-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}
.lift-dedicated .lift-canvas {
  height: 100%;
  min-height: 240px;
}
.lift-playfield {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 16px;
}
.lift-playfield .lift-canvas {
  height: 100%;
  min-height: 0;
}
.lift-round-ribbon {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(5,10,22,.56);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.lift-round-ribbon strong {
  color: #ffd166;
  font-size: .86rem;
  font-weight: 950;
  text-transform: uppercase;
}
.lift-round-ribbon span {
  color: white;
  font-weight: 950;
  text-align: right;
}
.lift-letters-panel .lift-round-ribbon {
  position: static;
  min-height: 38px;
}
.lift-console {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 6px;
  min-height: 0;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(5,10,22,.68);
  backdrop-filter: blur(8px);
}
.lift-console-top {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(220px, 1fr);
  gap: 8px;
}
.lift-console .lift-prompt,
.lift-console .lift-step-header {
  margin: 0;
  min-height: 34px;
  padding: 5px 10px;
}
.lift-console .lift-prompt strong {
  font-size: 1.15rem;
}
.lift-console .lift-forms.step-mode {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
  gap: 8px;
  margin: 0;
  flex: none;
}
.lift-console .lift-form-row {
  min-height: 54px;
  padding: 5px 8px;
}
.lift-console .lift-form-row h3 {
  font-size: .66rem;
}
.lift-console .lift-form-parts {
  align-content: flex-start;
}
.lift-console .lift-form-word {
  min-height: 27px;
  padding: 3px;
}
.lift-console .lift-form-row.active .lift-form-word {
  min-height: 29px;
}
.lift-console .form-char {
  width: 18px;
  height: 23px;
  border-bottom-width: 3px;
  font-size: .78rem;
}
.lift-console .lift-form-row.active .form-char {
  width: 20px;
  height: 25px;
  font-size: .86rem;
}
.lift-console .keyboard {
  display: grid;
  grid-template-columns: repeat(26, minmax(24px, 1fr));
  gap: 4px;
}
.lift-console .keyboard button {
  min-height: 28px;
  padding: 0;
  font-size: .86rem;
}
.lift-letter-console {
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 10px;
  padding: 12px;
}
.lift-letter-console .lift-console-top {
  grid-template-columns: minmax(220px, .9fr) minmax(220px, 1fr);
}
.lift-letter-console .lift-prompt,
.lift-letter-console .lift-step-header {
  min-height: 44px;
}
.lift-letter-console .lift-forms.step-mode {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}
.lift-letter-console .lift-form-row {
  min-height: 0;
  padding: 10px;
}
.lift-letter-console .lift-form-row h3 {
  font-size: .78rem;
}
.lift-letter-console .lift-form-parts {
  align-content: center;
}
.lift-letter-console .lift-form-word {
  min-height: 44px;
  padding: 6px;
}
.lift-letter-console .lift-form-row.active .lift-form-word {
  min-height: 48px;
}
.lift-letter-console .form-char {
  width: 24px;
  height: 32px;
  font-size: 1rem;
}
.lift-letter-console .lift-form-row.active .form-char {
  width: 28px;
  height: 36px;
  font-size: 1.12rem;
}
.lift-letter-console .keyboard {
  grid-template-columns: repeat(26, minmax(28px, 1fr));
  gap: 5px;
}
.lift-letter-console .keyboard button {
  min-height: 34px;
  font-size: .94rem;
}
.lift-end-game .lift-letters-panel {
  grid-template-rows: auto minmax(0, 1fr);
}
.lift-end-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(5,10,22,.68);
}
.lift-end-panel.victory {
  place-items: center;
  text-align: center;
}
.lift-end-panel.victory h2 {
  margin: 0;
  color: white;
  font-size: clamp(2rem, 4vw, 4.2rem);
  letter-spacing: 0;
}
.lift-end-panel.victory p,
.lift-end-summary span {
  margin: 0;
  color: rgba(255,255,255,.8);
  font-weight: 900;
}
.lift-end-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,.09);
}
.lift-end-summary strong {
  color: #ffd166;
  font-size: 1.2rem;
}
.lift-solution-list {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}
.lift-solution-row {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15,23,42,.58);
}
.lift-solution-row.active {
  border-color: rgba(239,71,111,.72);
}
.lift-solution-row h3 {
  margin: 0;
  color: #ffd166;
  font-size: .82rem;
  font-weight: 950;
  text-transform: uppercase;
}
.lift-solution-word {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.solution-char {
  width: 28px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  border-bottom: 4px solid #60d394;
  background: rgba(255,255,255,.12);
  color: white;
  font-size: 1.08rem;
  font-weight: 950;
  text-transform: uppercase;
}
.solution-char.missing {
  border-bottom-color: #ef476f;
  background: rgba(239,71,111,.2);
  color: #fecdd3;
  box-shadow: 0 0 0 1px rgba(239,71,111,.22);
}
.solution-char.punctuation {
  width: auto;
  min-width: 18px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.78);
}
.lift-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.lift-prompt {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(255,209,102,.22), rgba(58,134,255,.14));
}
.lift-prompt span {
  color: #ffd166;
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.lift-prompt strong {
  color: white;
  font-size: 1.3rem;
}
.lift-prompt.audio { justify-content: flex-start; }
.lift-prompt.audio .primary { min-height: 38px; }
.lift-step-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.1);
}
.lift-step-header span {
  color: #ffd166;
  font-size: .8rem;
  font-weight: 950;
  text-transform: uppercase;
}
.lift-step-header strong {
  color: white;
}
.lift-forms {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  align-content: stretch;
  gap: 6px;
  min-height: 0;
  margin-bottom: 10px;
  overflow: visible;
}
.lift-forms.step-mode {
  grid-template-rows: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.lift-form-row {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 3px;
  min-height: 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 6px 9px;
  background: rgba(255,255,255,.08);
  opacity: .68;
}
.lift-form-row.active {
  border-color: rgba(255,209,102,.82);
  background: linear-gradient(135deg, rgba(255,209,102,.2), rgba(58,134,255,.12));
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(255,209,102,.2);
}
.lift-form-row.completed {
  border-color: rgba(96,211,148,.55);
  opacity: .9;
}
.lift-form-row h3 {
  margin: 0;
  color: #ffd166;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.lift-form-parts {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  gap: 7px;
  min-height: 0;
}
.lift-form-word {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 5px;
  background: rgba(15,23,42,.42);
}
.lift-form-row.active .lift-form-word {
  min-height: 40px;
}
.lift-form-row.active .form-char {
  width: 26px;
  height: 32px;
  font-size: 1.05rem;
}
.lift-form-row.completed .form-char {
  border-bottom-color: #60d394;
}
.form-char {
  width: 21px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.2);
  border-bottom: 4px solid #ffd166;
  background: rgba(255,255,255,.1);
  color: white;
  font-size: .9rem;
  font-weight: 950;
  text-transform: uppercase;
}
.form-char.punctuation {
  width: auto;
  min-width: 18px;
  border: 0;
  background: transparent;
}
.masked-word span {
  min-width: 38px;
  min-height: 58px;
  border: 1px solid rgba(255,255,255,.24);
  border-bottom: 5px solid #ffd166;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: white;
}
.keyboard button {
  min-height: 31px;
  border-radius: 8px;
  background: linear-gradient(180deg, white, #dbeafe);
}
.lift-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  background: #10233f;
  box-shadow: 0 22px 48px rgba(0,0,0,.28);
}
.hero-stack {
  position: relative;
  right: auto;
  bottom: auto;
  width: 100%;
  min-height: 380px;
}
.weight-stack {
  position: absolute;
  left: 50%;
  bottom: 206px;
  z-index: 4;
  display: grid;
  justify-items: center;
  transform: translateX(-50%);
}
.weight {
  min-width: 154px;
  min-height: 34px;
  border: 2px solid rgba(255,255,255,.45);
  background: linear-gradient(135deg, #1f2937, #475569);
  box-shadow: 0 10px 18px rgba(0,0,0,.28);
}
.weight-1 { min-width: 190px; background: linear-gradient(135deg, #64748b, #111827); }
.weight-2 { min-width: 224px; background: linear-gradient(135deg, #8b5cf6, #334155); }
.weight-3 { min-width: 252px; background: linear-gradient(135deg, #ef476f, #111827); }
.weight-4 { min-width: 286px; background: linear-gradient(135deg, #0f172a, #475569); }
.weight-5 { min-width: 110px; background: linear-gradient(135deg, #fff, #cbd5e1); color: #111827; }
.hero-cape {
  position: absolute;
  left: calc(50% - 72px);
  bottom: 72px;
  width: 144px;
  height: 150px;
  clip-path: polygon(50% 0, 98% 100%, 8% 100%);
  background: linear-gradient(180deg, #ef476f, #7c2d12);
  transform-origin: 50% 0;
  animation: capeWave 1.3s ease-in-out infinite;
}
@keyframes capeWave {
  50% { transform: skewX(-7deg); }
}
.hero-head {
  position: absolute;
  left: calc(50% - 34px);
  bottom: 190px;
  z-index: 3;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffde9f;
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.08);
}
.hero-head::before,
.hero-head::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111827;
}
.hero-head::before { left: 20px; }
.hero-head::after { right: 20px; }
.hero-body {
  position: absolute;
  left: calc(50% - 46px);
  bottom: 70px;
  z-index: 2;
  width: 92px;
  height: 126px;
  border-radius: 34px 34px 18px 18px;
  background: linear-gradient(180deg, #3a86ff, #18b7a7);
}
.ground-crack {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 46px;
  height: 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.28);
}

.mole-field {
  position: relative;
  min-height: 0;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  grid-template-rows: repeat(2, minmax(142px, 1fr));
  align-content: stretch;
  align-items: stretch;
  gap: 10px;
}
.mole-countdown {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fffdf8;
  background:
    radial-gradient(circle at 50% 44%, rgba(244, 199, 102, .24), transparent 34%),
    rgba(4, 10, 20, .42);
  font-size: clamp(3.6rem, 15vw, 8rem);
  font-weight: 950;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 10px 28px rgba(0,0,0,.52);
  transform: scale(.82);
}
.mole-countdown.active {
  animation: moleCountdownPop .72s ease both;
}
.mole-countdown.go {
  color: #102537;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 247, 176, .9), rgba(244, 199, 102, .5) 42%, transparent 68%),
    rgba(4, 10, 20, .32);
  font-size: clamp(2.25rem, 8vw, 5rem);
  text-shadow: 0 8px 20px rgba(255,255,255,.34);
}
.mole-field.countdown-active .hole {
  filter: saturate(.82) brightness(.82);
}
.arcade-countdown {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  border-radius: inherit;
  color: #fffdf8;
  background:
    radial-gradient(circle at 50% 44%, rgba(244, 199, 102, .24), transparent 34%),
    rgba(4, 10, 20, .42);
  font-size: clamp(3.4rem, 15vw, 8rem);
  font-weight: 950;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  text-shadow: 0 10px 28px rgba(0,0,0,.52);
  transform: scale(.82);
}
.arcade-countdown.active {
  animation: moleCountdownPop .72s ease both;
}
.arcade-countdown.go {
  color: #102537;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 247, 176, .9), rgba(244, 199, 102, .5) 42%, transparent 68%),
    rgba(4, 10, 20, .32);
  font-size: clamp(2.2rem, 8vw, 5rem);
  padding: 0 16px;
  text-shadow: 0 8px 20px rgba(255,255,255,.34);
}
.balloon-sky.countdown-active .balloon,
.vase-grid.countdown-active .vase,
.runner-course.countdown-active .runner-grid {
  filter: saturate(.82) brightness(.82);
}
.mole-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(5,10,22,.62);
  color: white;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.mole-feedback strong {
  color: #ffd166;
  font-size: 1.05rem;
  font-weight: 950;
  text-transform: uppercase;
}
.mole-feedback span {
  font-weight: 900;
  color: rgba(255,255,255,.82);
}
.mole-feedback.correct {
  border-color: rgba(96,211,148,.76);
  background: linear-gradient(135deg, rgba(16,185,129,.9), rgba(14,116,144,.72));
  animation: feedbackPop .7s ease both;
}
.mole-feedback.correct strong,
.mole-feedback.wrong strong {
  color: white;
}
.mole-feedback.wrong {
  border-color: rgba(239,71,111,.82);
  background: linear-gradient(135deg, rgba(239,71,111,.92), rgba(127,29,29,.75));
  animation: feedbackShake .54s ease both;
}
.hole {
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 92%, rgba(0,0,0,.8) 0 34%, rgba(42,23,15,.95) 35% 49%, transparent 51%),
    linear-gradient(180deg, rgba(15,23,42,.12), rgba(15,23,42,.36));
  box-shadow: inset 0 -20px 34px rgba(0,0,0,.24);
}
.hole.mole-hole-active {
  background:
    radial-gradient(ellipse at 50% 92%, rgba(0,0,0,.86) 0 34%, rgba(105,62,28,.98) 35% 49%, transparent 51%),
    radial-gradient(circle at 50% 78%, rgba(255,209,102,.2), transparent 48%),
    linear-gradient(180deg, rgba(15,23,42,.1), rgba(15,23,42,.34));
}
.hole-lip {
  position: absolute;
  z-index: 3;
  left: 7%;
  right: 7%;
  bottom: 4px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6b3a1d, #1f120d);
  box-shadow: 0 8px 18px rgba(0,0,0,.32), inset 0 5px 0 rgba(255,255,255,.08);
  pointer-events: none;
}
.mole {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 4px;
  min-height: 92px;
  display: grid;
  grid-template-rows: auto auto;
  gap: 2px;
  justify-items: center;
  align-items: end;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: white;
  text-shadow: 0 3px 10px rgba(0,0,0,.35);
  transform-origin: 50% 100%;
  transform: translateY(116%) scale(.74);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.mole:disabled {
  transform: translateY(116%) scale(.74);
  opacity: 0;
}
.mole.mole-active {
  animation: moleRise .32s cubic-bezier(.16, .88, .24, 1.14) both;
  opacity: 1;
  pointer-events: auto;
}
.mole.mole-leaving {
  animation: moleSink .22s cubic-bezier(.55, 0, .82, .32) both;
}
.mole.mole-active:hover,
.mole.mole-active:focus-visible {
  filter: brightness(1.08);
}
.mole-field.resolved .mole {
  pointer-events: none;
}
.mole-field.resolved .mole:not(.mole-hit):not(.mole-miss) {
  opacity: .34;
  filter: grayscale(.72) brightness(.78);
}
.mole-body {
  position: relative;
  width: min(92px, 66%);
  height: 66px;
  overflow: visible;
  border: 2px solid rgba(255,226,179,.74);
  border-bottom: 0;
  border-radius: 62px 62px 36px 36px;
  background:
    radial-gradient(ellipse at 50% 12%, rgba(255,226,179,.34) 0 22%, transparent 44%),
    radial-gradient(circle at 50% 48%, #f6c37b 0 13%, transparent 14%),
    linear-gradient(180deg, #8b5a2b, #4a2a18);
  box-shadow: inset 0 7px 0 rgba(255,255,255,.08), inset 0 -14px 0 rgba(0,0,0,.14), 0 10px 18px rgba(0,0,0,.28);
}
.mole-body::before,
.mole-body::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 25px;
  height: 22px;
  border-radius: 50%;
  background: #5b351f;
  z-index: -1;
}
.mole-body::before { left: -9px; }
.mole-body::after { right: -9px; }
.mole-eye {
  position: absolute;
  top: 20px;
  width: 9px;
  height: 11px;
  border-radius: 50%;
  background: #050816;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.55);
}
.eye-left { left: 33%; }
.eye-right { right: 33%; }
.mole-nose {
  position: absolute;
  left: calc(50% - 7px);
  top: 32px;
  width: 14px;
  height: 10px;
  border-radius: 50%;
  background: #ef476f;
  box-shadow: 0 4px 0 rgba(0,0,0,.16);
}
.mole-whiskers,
.mole-whiskers::before,
.mole-whiskers::after {
  position: absolute;
  left: calc(50% - 29px);
  top: 42px;
  width: 58px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  content: "";
}
.mole-whiskers::before { transform: rotate(12deg); }
.mole-whiskers::after { transform: rotate(-12deg); }
.mole-paw {
  position: absolute;
  bottom: -4px;
  width: 25px;
  height: 14px;
  border-radius: 18px 18px 8px 8px;
  background: #d8944c;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.14);
}
.paw-left { left: 15px; rotate: -8deg; }
.paw-right { right: 15px; rotate: 8deg; }
.mole-sign {
  position: relative;
  z-index: 7;
  display: grid;
  place-items: center;
  width: min(92%, 210px);
  min-height: 36px;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 10px;
  padding: 4px 10px;
  background: linear-gradient(180deg, #ffd166, #f97316);
  color: white;
  box-shadow: 0 10px 18px rgba(0,0,0,.28), inset 0 -8px 0 rgba(0,0,0,.1);
  font-size: clamp(.86rem, 1.08vw, 1rem);
  line-height: 1.05;
  transform: translateY(-6px);
}
.mole::after {
  position: absolute;
  z-index: 10;
  top: -18px;
  left: 50%;
  translate: -50% 0;
  min-width: 92px;
  border-radius: 999px;
  padding: 7px 12px;
  color: white;
  font-size: 1.05rem;
  font-weight: 950;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.28);
  opacity: 0;
  pointer-events: none;
}
.mole-hit {
  animation: moleHit .82s ease both;
  opacity: 1;
}
.mole-hit .mole-sign {
  background: linear-gradient(180deg, #86efac, #16a34a);
  box-shadow: 0 0 0 5px rgba(96,211,148,.26), 0 14px 24px rgba(0,0,0,.28);
}
.mole-hit .mole-body {
  filter: brightness(1.22);
}
.mole-hit::after {
  content: "BAM!";
  background: #16a34a;
  opacity: 1;
  animation: impactStamp .82s ease both;
}
.mole-miss {
  animation: moleMiss .82s ease both;
  opacity: 1;
}
.mole-miss .mole-sign {
  background: linear-gradient(180deg, #fca5a5, #dc2626);
  box-shadow: 0 0 0 5px rgba(239,71,111,.26), 0 14px 24px rgba(0,0,0,.28);
}
.mole-miss::after {
  content: "MISS!";
  background: #dc2626;
  opacity: 1;
  animation: impactStamp .82s ease both;
}
@keyframes moleRise {
  0% { transform: translateY(116%) scale(.74); opacity: 0; }
  18% { opacity: 1; }
  62% { transform: translateY(-2%) scale(.9); opacity: 1; }
  100% { transform: translateY(0) scale(.84); opacity: 1; }
}
@keyframes moleSink {
  0% { transform: translateY(0) scale(.84); opacity: 1; }
  100% { transform: translateY(116%) scale(.74); opacity: 0; }
}
@keyframes moleHit {
  0% { transform: translateY(0) scale(.84); }
  28% { transform: translateY(-8px) scale(.92) rotate(-5deg); filter: brightness(1.32); }
  58% { transform: translateY(0) scale(.8) rotate(4deg); }
  100% { transform: translateY(12px) scale(.74); }
}
@keyframes moleMiss {
  0% { transform: translateY(0) scale(.84); }
  18% { transform: translateX(-10px) translateY(0) scale(.84); }
  36% { transform: translateX(10px) translateY(0) scale(.84); }
  54% { transform: translateX(-6px) translateY(0) scale(.84); }
  100% { transform: translateX(0) translateY(0) scale(.84); }
}
@keyframes impactStamp {
  0% { transform: translateY(16px) scale(.55) rotate(-12deg); opacity: 0; }
  32% { transform: translateY(-14px) scale(1.22) rotate(-6deg); opacity: 1; }
  100% { transform: translateY(-24px) scale(1) rotate(-6deg); opacity: 0; }
}
@keyframes feedbackPop {
  0% { transform: scale(.98); box-shadow: 0 0 0 rgba(96,211,148,0); }
  45% { transform: scale(1.015); box-shadow: 0 0 0 8px rgba(96,211,148,.24); }
  100% { transform: scale(1); }
}
@keyframes feedbackShake {
  20% { transform: translateX(-8px); }
  45% { transform: translateX(8px); }
  70% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}
@keyframes moleCountdownPop {
  0% { opacity: 0; transform: scale(.72); }
  28% { opacity: 1; transform: scale(1.06); }
  72% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.92); }
}

.mole-end-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .86fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
}
.mole-end-card,
.mole-end-animation {
  min-height: 0;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 16px;
  background: rgba(5,10,22,.68);
  backdrop-filter: blur(8px);
}
.mole-end-card {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  align-content: center;
  gap: 14px;
  padding: clamp(18px, 3vw, 34px);
}
.mole-end-card h2 {
  margin: 0;
  color: white;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  line-height: .95;
  letter-spacing: 0;
}
.mole-end-game.won .mole-end-card h2 { color: #86efac; }
.mole-end-game.lost .mole-end-card h2 { color: #fca5a5; }
.mole-answer-box {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255,209,102,.2), rgba(58,134,255,.14));
  animation: moleAnswerPulse 1.2s ease-in-out infinite alternate;
}
.mole-answer-box span,
.mole-answer-box small {
  color: rgba(255,255,255,.76);
  font-weight: 900;
  text-transform: uppercase;
}
.mole-answer-box strong {
  color: #ffd166;
  font-size: clamp(1.8rem, 3.4vw, 3.4rem);
  line-height: 1;
}
.mole-end-stats {
  display: grid;
  gap: 4px;
  color: rgba(255,255,255,.82);
  font-weight: 900;
}
.mole-end-stats strong {
  color: white;
  font-size: 1.25rem;
}
.mole-end-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.mole-end-animation {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255,209,102,.18), transparent 12rem),
    linear-gradient(180deg, rgba(15,35,63,.95), rgba(8,13,29,.9));
}
.mole-end-animation p {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: white;
  font-weight: 950;
  text-align: center;
  text-shadow: 0 3px 12px rgba(0,0,0,.4);
}
.mole-end-hole {
  position: relative;
  width: min(320px, 82%);
  height: min(340px, 70%);
  display: grid;
  place-items: end center;
}
.mole-end-lip {
  position: absolute;
  z-index: 4;
  left: 4%;
  right: 4%;
  bottom: 16px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6b3a1d, #130b08);
  box-shadow: 0 12px 28px rgba(0,0,0,.44), inset 0 7px 0 rgba(255,255,255,.08);
}
.mole-end-mole {
  position: relative;
  z-index: 5;
  width: min(210px, 72%);
  height: 180px;
  display: grid;
  place-items: center;
  border: 4px solid rgba(255,255,255,.92);
  border-bottom: 0;
  border-radius: 110px 110px 58px 58px;
  background:
    radial-gradient(circle at 50% 50%, #f6c37b 0 14%, transparent 15%),
    linear-gradient(180deg, #8b5a2b, #4a2a18);
  box-shadow: inset 0 -24px 0 rgba(0,0,0,.14), 0 18px 34px rgba(0,0,0,.34);
}
.mole-end-game.won .mole-end-mole {
  animation: moleVictoryBounce 1.1s ease-in-out infinite;
}
.mole-end-game.lost .mole-end-mole {
  animation: moleLostSink 1.6s ease-in-out infinite;
}
.mole-end-ear {
  position: absolute;
  top: 18px;
  width: 48px;
  height: 42px;
  border-radius: 50%;
  background: #5b351f;
  z-index: -1;
}
.mole-end-ear.left { left: -18px; }
.mole-end-ear.right { right: -18px; }
.mole-end-eye {
  position: absolute;
  top: 62px;
  width: 18px;
  height: 22px;
}
.mole-end-game.won .mole-end-eye {
  border-radius: 50%;
  background: #050816;
  box-shadow: inset 4px 4px 0 rgba(255,255,255,.62);
}
.mole-end-game.lost .mole-end-eye::before,
.mole-end-game.lost .mole-end-eye::after {
  content: "";
  position: absolute;
  left: 8px;
  top: -2px;
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: #050816;
}
.mole-end-game.lost .mole-end-eye::before { rotate: 45deg; }
.mole-end-game.lost .mole-end-eye::after { rotate: -45deg; }
.mole-end-eye.left { left: 34%; }
.mole-end-eye.right { right: 34%; }
.mole-end-nose {
  position: absolute;
  top: 88px;
  width: 28px;
  height: 20px;
  border-radius: 50%;
  background: #ef476f;
}
.mole-end-mouth {
  position: absolute;
  top: 118px;
  width: 62px;
  height: 18px;
  border-bottom: 4px solid #050816;
  border-radius: 0 0 999px 999px;
}
.mole-end-game.lost .mole-end-mouth {
  border-top: 4px solid #050816;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.mole-end-mole strong {
  position: absolute;
  bottom: 18px;
  color: white;
  font-size: 1.55rem;
  text-shadow: 0 3px 10px rgba(0,0,0,.32);
}
.mole-end-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mole-end-game.won .mole-end-burst {
  background:
    radial-gradient(circle at 22% 24%, #ffd166 0 5px, transparent 6px),
    radial-gradient(circle at 78% 22%, #60d394 0 5px, transparent 6px),
    radial-gradient(circle at 64% 54%, #3a86ff 0 4px, transparent 5px),
    radial-gradient(circle at 36% 62%, #ef476f 0 4px, transparent 5px);
  animation: moleConfetti 1.05s ease-in-out infinite;
}
.mole-end-game.lost .mole-end-burst::before {
  content: "BONK!";
  position: absolute;
  top: 16%;
  right: 10%;
  color: #ffd166;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 950;
  rotate: -12deg;
  text-shadow: 0 5px 0 #050816, 0 12px 30px rgba(0,0,0,.42);
  animation: moleBonk 1.2s ease-in-out infinite;
}
@keyframes moleVictoryBounce {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-22px) rotate(2deg); }
}
@keyframes moleLostSink {
  0%, 100% { transform: translateY(16px) rotate(-2deg); }
  50% { transform: translateY(42px) rotate(2deg); }
}
@keyframes moleConfetti {
  0% { transform: translateY(-16px) scale(.94); opacity: .62; }
  50% { opacity: 1; }
  100% { transform: translateY(18px) scale(1.06); opacity: .58; }
}
@keyframes moleBonk {
  0%, 100% { transform: scale(.94); }
  50% { transform: scale(1.08); }
}
@keyframes moleAnswerPulse {
  from { box-shadow: 0 0 0 rgba(255,209,102,0); }
  to { box-shadow: 0 0 0 7px rgba(255,209,102,.18); }
}

.balloon-sky {
  position: relative;
  min-height: 0;
  height: 100%;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #66c7ff 0%, #b5f3ff 48%, #fff4b2 100%);
}
.balloon-sky.sky-interrupted {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), inset 0 0 46px rgba(255,209,102,.18);
}
.balloon-play {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
}
.balloon-prompt {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(220px, 1fr);
  gap: 8px;
  align-items: stretch;
}
.balloon-prompt .stimulus-card {
  min-height: 62px;
  width: 100%;
  padding: 6px 10px;
}
.balloon-prompt .stimulus-card .eyebrow {
  margin: 0 0 2px;
  font-size: .66rem;
  line-height: 1;
}
.balloon-prompt .stimulus-card .stage-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.15vw, 2.2rem);
  line-height: .95;
}
.cloud {
  position: absolute;
  width: 180px;
  height: 60px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
}
.cloud-a { left: 8%; top: 44px; animation: drift 9s linear infinite alternate; }
.cloud-b { right: 12%; top: 96px; animation: drift 12s linear infinite alternate-reverse; }
.cloud-c { left: 42%; top: 58%; width: 140px; height: 48px; animation: drift 10s linear infinite alternate; }
@keyframes drift { to { transform: translateX(42px); } }
.sky-interrupt {
  position: absolute;
  left: -14%;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(15,23,42,.28));
}
.sky-interrupt.bird {
  width: 58px;
  height: 26px;
}
.sky-interrupt.bird::before,
.sky-interrupt.bird::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 34px;
  height: 14px;
  border-top: 4px solid rgba(15,23,42,.88);
  border-radius: 50%;
}
.sky-interrupt.bird::before {
  left: 0;
  rotate: 16deg;
}
.sky-interrupt.bird::after {
  right: 0;
  rotate: -16deg;
}
.sky-interrupt.plane {
  width: 128px;
  height: 42px;
  border-radius: 58% 42% 48% 52%;
  background:
    radial-gradient(circle at 70% 38%, #0f172a 0 4px, transparent 5px),
    radial-gradient(circle at 58% 40%, #0f172a 0 3px, transparent 4px),
    linear-gradient(90deg, #f8fafc 0 18%, #dbeafe 18% 54%, #38bdf8 55% 78%, #1d4ed8 79% 100%);
  clip-path: polygon(0 48%, 10% 28%, 68% 22%, 100% 46%, 70% 70%, 10% 63%);
}
.sky-interrupt.plane::before,
.sky-interrupt.plane::after {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, #eff6ff, #2563eb);
}
.sky-interrupt.plane::before {
  left: 45px;
  top: -18px;
  width: 52px;
  height: 72px;
  clip-path: polygon(0 50%, 92% 0, 64% 48%, 100% 100%);
  opacity: .96;
}
.sky-interrupt.plane::after {
  left: 6px;
  top: -10px;
  width: 30px;
  height: 46px;
  clip-path: polygon(0 48%, 100% 0, 76% 48%, 100% 100%);
  background: linear-gradient(180deg, #f8fafc, #1d4ed8);
}
.sky-interrupt.ufo {
  width: 118px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(216,180,254,.95) 0 22%, transparent 24%),
    radial-gradient(circle at 25% 72%, #fef08a 0 5px, transparent 6px),
    radial-gradient(circle at 50% 80%, #67e8f9 0 5px, transparent 6px),
    radial-gradient(circle at 75% 72%, #fef08a 0 5px, transparent 6px),
    linear-gradient(180deg, #e0f2fe 0 38%, #64748b 39% 70%, #1e293b 71% 100%);
  box-shadow: inset 0 8px 16px rgba(255,255,255,.4), 0 0 28px rgba(103,232,249,.5);
}
.sky-interrupt.ufo::before {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  top: -12px;
  height: 34px;
  border-radius: 50% 50% 44% 44%;
  background: linear-gradient(180deg, rgba(245,243,255,.94), rgba(167,139,250,.72));
  box-shadow: inset 0 6px 10px rgba(255,255,255,.58);
}
.sky-interrupt.ufo::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: -12px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(103,232,249,.38), transparent 70%);
}
.balloon {
  bottom: auto;
  width: var(--balloon-w, clamp(86px, 7vw, 124px));
  height: var(--balloon-h, clamp(108px, 8.8vw, 146px));
  isolation: isolate;
  overflow: visible;
  border: 2px solid rgba(255,255,255,.84);
  border-radius: var(--balloon-radius, 66px 66px 54px 54px);
  background:
    radial-gradient(ellipse at 28% 21%, rgba(255,255,255,.88) 0 9%, rgba(255,255,255,.42) 10% 18%, transparent 34%),
    radial-gradient(ellipse at 62% 78%, rgba(0,0,0,.18), transparent 38%),
    radial-gradient(ellipse at 24% 14%, var(--balloon-accent, rgba(255,255,255,.7)), transparent 32%),
    linear-gradient(180deg, var(--balloon-top, #ef476f), var(--balloon-bottom, #7c5cff));
  transform: translate(-50%, -50%);
  animation: balloonDrift 2.9s ease-in-out infinite alternate;
  animation-delay: var(--float-delay, 0s);
  font-size: clamp(.78rem, 1vw, .98rem);
  line-height: 1.05;
  z-index: 2;
  box-shadow:
    inset -12px -18px 22px rgba(15,23,42,.18),
    inset 8px 10px 18px rgba(255,255,255,.16),
    0 16px 28px rgba(15,23,42,.22);
}
.balloon::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -11px;
  width: 20%;
  height: 16%;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 5px 5px 9px 9px;
  background: linear-gradient(180deg, var(--balloon-bottom, #7c5cff), rgba(15,23,42,.22));
  transform: translateX(-50%) rotate(45deg);
}
.balloon::after {
  content: "";
  position: absolute;
  bottom: -26px;
  left: 50%;
  z-index: 0;
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, rgba(17,24,39,.55), rgba(17,24,39,.18));
  transform-origin: 50% 0;
  transform: translateX(-50%) rotate(2deg);
}
.balloon-label {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 92%;
  text-shadow: 0 2px 8px rgba(15,23,42,.38);
}
.balloon.rising {
  animation: none;
  will-change: left, top, transform;
}
.balloon.target {
  z-index: 3;
  touch-action: manipulation;
}
.balloon.decoy {
  z-index: 4;
  cursor: grab;
  touch-action: none;
}
.balloon.decoy.being-pushed,
.balloon.decoy.balloon-pushed {
  cursor: grabbing;
  filter: saturate(1.18) brightness(1.08) drop-shadow(0 0 14px rgba(255,255,255,.4));
}
.balloon.decoy-popped {
  pointer-events: none;
  animation: balloonDecoyPop .42s ease-out forwards;
}
.balloon.wind-swept {
  filter: saturate(1.2) brightness(1.08) drop-shadow(0 0 12px rgba(255,255,255,.35));
}
.balloon.correct {
  background:
    radial-gradient(circle at 34% 26%, rgba(255,255,255,.62), transparent 38px),
    linear-gradient(180deg, #86efac, #16a34a);
  animation: balloonHit .55s ease both;
}
.balloon.wrong {
  background:
    radial-gradient(circle at 34% 26%, rgba(255,255,255,.62), transparent 38px),
    linear-gradient(180deg, #fca5a5, #dc2626);
  animation: balloonWrong .55s ease both;
}
@keyframes balloonDrift {
  from { transform: translate(-50%, -50%) translateY(-8px) rotate(-2deg); }
  to { transform: translate(-50%, -50%) translateY(8px) rotate(2deg); }
}
@keyframes balloonHit {
  45% { transform: translate(-50%, -50%) scale(1.12); filter: brightness(1.18); }
  100% { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
}
@keyframes balloonWrong {
  25% { transform: translate(-50%, -50%) translateX(-10px); }
  55% { transform: translate(-50%, -50%) translateX(10px); }
  100% { transform: translate(-50%, -50%); }
}
@keyframes balloonDecoyPop {
  0% { opacity: 1; filter: brightness(1); }
  42% { transform: translate(-50%, -50%) scale(1.14); opacity: 1; filter: brightness(1.22) saturate(1.22); }
  100% { transform: translate(-50%, -50%) scale(.08); opacity: 0; filter: brightness(1.6) blur(1px); }
}

.memory-table {
  position: relative;
  min-height: 0;
  border-radius: 18px;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.16)),
    linear-gradient(135deg, #182032, #4a2d42 48%, #173d47);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.07), 0 20px 44px rgba(0,0,0,.22);
}
.memory-grid {
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  align-content: center;
  height: 100%;
}
.memory-card {
  position: relative;
  min-height: 92px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 10px 18px rgba(0,0,0,.22);
  transform-style: preserve-3d;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.memory-card:hover,
.memory-card:focus-visible {
  transform: translateY(-3px);
  filter: brightness(1.04);
}
.memory-card-shell,
.memory-card-back,
.memory-card-front {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.memory-card-shell {
  border-radius: inherit;
  transform-style: preserve-3d;
}
.memory-card-back,
.memory-card-front {
  padding: 8px;
  backface-visibility: hidden;
  text-align: center;
}
.memory-card-back {
  gap: 4px;
  background:
    linear-gradient(180deg, rgba(4,8,23,.08), rgba(4,8,23,.16)),
    url("/static/assets/memory/memory-card-back.webp") center / 100% 100% no-repeat,
    linear-gradient(135deg, #14213d, #2563eb 58%, #18b7a7);
  color: white;
}
.memory-card-back::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 8px;
}
.memory-card-back b {
  position: relative;
  display: none;
  font-size: clamp(1.2rem, 1.9vw, 1.85rem);
  letter-spacing: 0;
}
.memory-card-back small {
  position: relative;
  display: none;
  color: rgba(255,255,255,.82);
  font-size: .62rem;
  font-weight: 950;
  text-transform: uppercase;
}
.memory-card-front {
  grid-template-rows: minmax(0, 1fr) auto auto minmax(0, .55fr);
  align-content: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.04)),
    url("/static/assets/memory/memory-card-front-infinitive.webp") center / 100% 100% no-repeat,
    linear-gradient(135deg, #fffdf8, #dffaf2);
  color: #0f172a;
  opacity: 0;
  transform: rotateY(180deg);
}
.memory-card.type-preterite .memory-card-front {
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.04)),
    url("/static/assets/memory/memory-card-front-preterite.webp") center / 100% 100% no-repeat,
    linear-gradient(135deg, #eff6ff, #dbeafe);
}
.memory-card.type-participle .memory-card-front {
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.04)),
    url("/static/assets/memory/memory-card-front-participle.webp") center / 100% 100% no-repeat,
    linear-gradient(135deg, #f5f3ff, #ede9fe);
}
.memory-form-badge {
  grid-row: 3;
  align-self: start;
  justify-self: center;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  margin-top: 4px;
  padding: 2px 7px;
  background: rgba(6, 95, 70, .9);
  color: #fffdf8;
  box-shadow: 0 5px 12px rgba(2,6,23,.22);
}
.memory-form-badge > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #bbf7d0;
  box-shadow: 0 0 9px rgba(187,247,208,.76);
}
.memory-form-badge.time {
  background: rgba(29, 78, 216, .9);
}
.memory-form-badge.time > span {
  background: #bfdbfe;
  box-shadow: 0 0 9px rgba(191,219,254,.78);
}
.memory-form-badge.star {
  background: rgba(126, 34, 206, .9);
}
.memory-form-badge.star > span {
  clip-path: polygon(50% 0, 62% 34%, 98% 35%, 69% 55%, 80% 91%, 50% 70%, 20% 91%, 31% 55%, 2% 35%, 38% 34%);
  background: #fde68a;
  box-shadow: 0 0 10px rgba(253,230,138,.8);
}
.memory-form-badge small {
  color: inherit;
  font-size: .54rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.memory-card-word {
  grid-row: 2;
  align-self: center;
  justify-self: stretch;
  overflow-wrap: anywhere;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px;
  padding: 7px 6px;
  background: rgba(255, 251, 235, .78);
  color: #102537;
  box-shadow: 0 6px 16px rgba(2,6,23,.12);
  font-size: clamp(.88rem, 1.08vw, 1.08rem);
  line-height: 1.02;
}
.memory-card-front em {
  display: none;
  align-self: end;
  color: rgba(15,23,42,.78);
  font-size: .56rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}
.memory-card.flipped .memory-card-back,
.memory-card.matched .memory-card-back {
  opacity: 0;
  transform: rotateY(180deg);
}
.memory-card.flipped .memory-card-front,
.memory-card.matched .memory-card-front {
  opacity: 1;
  transform: rotateY(0deg);
}
.memory-card.flipped,
.memory-card.matched {
  background: transparent;
  border-color: rgba(255,255,255,.48);
  color: #0f172a;
  box-shadow: 0 12px 22px rgba(0,0,0,.2), 0 0 0 2px rgba(255,255,255,.2);
}
.memory-card.matched {
  outline: 3px solid rgba(96,211,148,.62);
  filter: saturate(1.12) brightness(1.06);
}
.memory-card.matched::after {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: 3;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(255,246,180,.45), transparent 62%);
  pointer-events: none;
  animation: memoryMatchedGlow 1.18s ease both;
}
.memory-grid.dealing .memory-card {
  animation: memoryDeal .72s cubic-bezier(.16, .86, .24, 1.06) both;
}
.memory-grid.dealing .memory-card:nth-child(2) { animation-delay: 18ms; }
.memory-grid.dealing .memory-card:nth-child(3) { animation-delay: 36ms; }
.memory-grid.dealing .memory-card:nth-child(4) { animation-delay: 54ms; }
.memory-grid.dealing .memory-card:nth-child(5) { animation-delay: 72ms; }
.memory-grid.dealing .memory-card:nth-child(6) { animation-delay: 90ms; }
.memory-grid.dealing .memory-card:nth-child(7) { animation-delay: 108ms; }
.memory-grid.dealing .memory-card:nth-child(8) { animation-delay: 126ms; }
.memory-grid.dealing .memory-card:nth-child(9) { animation-delay: 144ms; }
.memory-grid.dealing .memory-card:nth-child(10) { animation-delay: 162ms; }
.memory-grid.dealing .memory-card:nth-child(11) { animation-delay: 180ms; }
.memory-grid.dealing .memory-card:nth-child(12) { animation-delay: 198ms; }
.memory-grid.dealing .memory-card:nth-child(13) { animation-delay: 216ms; }
.memory-grid.dealing .memory-card:nth-child(14) { animation-delay: 234ms; }
.memory-grid.dealing .memory-card:nth-child(15) { animation-delay: 252ms; }
.memory-grid.dealing .memory-card:nth-child(16) { animation-delay: 270ms; }
.memory-grid.dealing .memory-card:nth-child(17) { animation-delay: 288ms; }
.memory-grid.dealing .memory-card:nth-child(18) { animation-delay: 306ms; }
.memory-grid.dealing .memory-card:nth-child(19) { animation-delay: 324ms; }
.memory-grid.dealing .memory-card:nth-child(20) { animation-delay: 342ms; }
.memory-grid.dealing .memory-card:nth-child(21) { animation-delay: 360ms; }
.memory-shuffle-wind {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  animation: memoryWindFade 1.15s ease both;
}
.memory-helper {
  position: absolute;
  left: -74px;
  bottom: 18px;
  width: 54px;
  height: 58px;
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(180deg, #ffd166, #f97316);
  box-shadow: 0 12px 22px rgba(0,0,0,.25);
  animation: memoryHelperDash 1.04s ease both;
}
.memory-helper::before {
  content: "";
  position: absolute;
  left: 12px;
  top: -24px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fed7aa;
  box-shadow: inset 7px 0 0 rgba(15,23,42,.16);
}
.memory-helper::after {
  content: "";
  position: absolute;
  left: -28px;
  top: 15px;
  width: 40px;
  height: 20px;
  border-radius: 999px;
  background: rgba(56,189,248,.82);
  box-shadow: 18px 12px 0 rgba(255,255,255,.28);
}
.memory-wind-line {
  position: absolute;
  left: -18%;
  width: 42%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.82), transparent);
  animation: memoryWindLine .92s ease both;
}
.memory-wind-line.line-a { top: 28%; animation-delay: .08s; }
.memory-wind-line.line-b { top: 49%; width: 58%; animation-delay: .16s; }
.memory-wind-line.line-c { top: 69%; width: 36%; animation-delay: .24s; }
.memory-match-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  display: grid;
  gap: 2px;
  width: min(300px, calc(100% - 26px));
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 8px;
  padding: 12px 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.3), transparent 36%),
    linear-gradient(135deg, rgba(38, 18, 79, .92), rgba(5, 52, 67, .9));
  color: #fffdf8;
  text-align: center;
  box-shadow: 0 18px 36px rgba(2,6,23,.38), 0 0 34px rgba(167,139,250,.28);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: memoryMatchBurst 2.35s ease both;
}
.memory-match-burst::before,
.memory-match-burst::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 14% 18%, rgba(255,240,168,.78) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 24%, rgba(125,211,252,.75) 0 2px, transparent 3px),
    radial-gradient(circle at 74% 82%, rgba(196,181,253,.78) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 78%, rgba(134,239,172,.75) 0 2px, transparent 3px);
  pointer-events: none;
}
.memory-match-burst::after {
  inset: -28px;
  filter: blur(2px);
  opacity: .7;
}
.memory-match-burst span {
  color: #ffd166;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.memory-match-burst strong {
  font-size: 1.35rem;
  line-height: 1.05;
}
.memory-match-burst small {
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  font-weight: 850;
}
@keyframes memoryDeal {
  0% { transform: translateX(-64px) rotate(-8deg) scale(.9); opacity: 0; }
  72% { transform: translateX(4px) rotate(1deg) scale(1.02); opacity: 1; }
  100% { transform: translateX(0) rotate(0) scale(1); opacity: 1; }
}
@keyframes memoryHelperDash {
  0% { transform: translateX(0) translateY(12px) rotate(-8deg); opacity: 0; visibility: visible; }
  20% { opacity: 1; visibility: visible; }
  100% { transform: translateX(calc(100vw + 140px)) translateY(-10px) rotate(6deg); opacity: 0; visibility: hidden; }
}
@keyframes memoryWindLine {
  0% { transform: translateX(0) scaleX(.35); opacity: 0; visibility: visible; }
  35% { opacity: .9; visibility: visible; }
  100% { transform: translateX(170%) scaleX(1); opacity: 0; visibility: hidden; }
}
@keyframes memoryWindFade {
  0%, 74% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes memoryMatchedGlow {
  0% { opacity: 0; transform: scale(.94); }
  36% { opacity: 1; transform: scale(1.03); }
  100% { opacity: 0; transform: scale(1.12); }
}
@keyframes memoryMatchBurst {
  0% { opacity: 0; transform: translate(-50%, -44%) scale(.9); filter: saturate(.9); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); filter: saturate(1.2); }
  82% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -56%) scale(.96); }
}
@keyframes memoryVictoryRing {
  0%, 100% { opacity: .72; transform: scale(.95); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes memoryVictoryTrophy {
  0% { opacity: 0; transform: translateY(18px) scale(.72) rotate(-8deg); }
  62% { opacity: 1; transform: translateY(-4px) scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes memoryVictoryCard {
  0%, 100% { filter: brightness(1); margin-top: 0; }
  50% { filter: brightness(1.18); margin-top: -8px; }
}

.memory-end-game {
  display: grid;
  grid-template-columns: minmax(280px, .58fr) minmax(430px, 1fr);
  gap: 14px;
  min-height: 0;
  height: 100%;
  color: white;
}
.memory-end-summary,
.memory-end-results {
  min-height: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(5,10,22,.78), rgba(15,23,42,.62)),
    radial-gradient(circle at 18% 12%, rgba(45,212,191,.22), transparent 14rem);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 22px 46px rgba(0,0,0,.24);
}
.memory-end-summary {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: clamp(16px, 2.1vw, 28px);
}
.memory-victory-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(150px, 22vw, 230px);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,240,168,.42), transparent 34%),
    radial-gradient(circle at 18% 18%, rgba(125,211,252,.28), transparent 32%),
    linear-gradient(135deg, rgba(88,28,135,.54), rgba(8,47,73,.5));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 18px 34px rgba(2,6,23,.26);
}
.memory-victory-ring {
  position: absolute;
  width: clamp(108px, 14vw, 152px);
  height: clamp(108px, 14vw, 152px);
  border: 2px solid rgba(255,240,168,.72);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(255,214,102,.38), inset 0 0 28px rgba(255,255,255,.16);
  animation: memoryVictoryRing 2.2s ease-in-out infinite;
}
.memory-victory-trophy {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(76px, 9vw, 104px);
  height: clamp(76px, 9vw, 104px);
  border: 2px solid rgba(255,255,255,.68);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 24%, rgba(255,255,255,.72), transparent 28%),
    linear-gradient(135deg, #fff0a8, #f4c766 54%, #b9822f);
  color: #301507;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  font-weight: 950;
  box-shadow: 0 18px 34px rgba(244,199,102,.32);
  animation: memoryVictoryTrophy 1.45s cubic-bezier(.16,.86,.24,1.12) both;
}
.memory-victory-card {
  position: absolute;
  width: clamp(42px, 5.6vw, 58px);
  aspect-ratio: 5 / 7;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 8px;
  background: url("/static/assets/memory/memory-card-back.webp") center / 100% 100% no-repeat;
  box-shadow: 0 12px 22px rgba(2,6,23,.28);
  animation: memoryVictoryCard 1.9s ease-in-out infinite;
}
.memory-victory-card.card-a {
  left: 12%;
  top: 18%;
  transform: rotate(-14deg);
}
.memory-victory-card.card-b {
  right: 12%;
  top: 22%;
  animation-delay: .18s;
  transform: rotate(12deg);
}
.memory-victory-card.card-c {
  left: 50%;
  bottom: 10%;
  animation-delay: .36s;
  transform: translateX(-50%) rotate(4deg);
}
.memory-end-summary > span {
  color: #ffd166;
  font-size: .82rem;
  font-weight: 950;
  text-transform: uppercase;
}
.memory-end-summary h2 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(2.3rem, 4vw, 4.6rem);
  line-height: .92;
  text-shadow: 0 5px 20px rgba(0,0,0,.28);
}
.memory-end-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.memory-end-stats div {
  display: grid;
  gap: 4px;
  min-height: 78px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(45,212,191,.08));
}
.memory-end-stats small {
  color: rgba(255,255,255,.7);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.memory-end-stats strong {
  color: white;
  font-size: clamp(1.25rem, 1.9vw, 1.85rem);
}
.memory-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.memory-end-results {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 14px;
}
.memory-end-row {
  display: grid;
  grid-template-columns: 92px repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(96,211,148,.2), rgba(56,189,248,.12));
}
.memory-end-row.is-missed {
  background: linear-gradient(135deg, rgba(239,71,111,.24), rgba(251,113,133,.12));
}
.memory-end-row span {
  color: #86efac;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.memory-end-row.is-missed span {
  color: #fca5a5;
}
.memory-end-row strong,
.memory-end-row em {
  min-width: 0;
  overflow-wrap: anywhere;
  color: white;
  font-style: normal;
  font-weight: 950;
}

.crossword-layout {
  display: grid;
  grid-template-columns: minmax(240px, 460px) 1fr;
  gap: 18px;
}
.crossword-board {
  display: grid;
  min-height: 0;
  border-radius: 14px;
  padding: 16px;
  background: rgba(5,10,22,.68);
}
.crossword-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  grid-template-rows: repeat(11, minmax(0, 1fr));
  gap: 2px;
  width: min(100%, 540px);
  margin: auto;
}
.crossword-grid.crossword-size-13 {
  grid-template-columns: repeat(13, minmax(0, 1fr));
  grid-template-rows: repeat(13, minmax(0, 1fr));
}
.crossword-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgba(15,23,42,.22);
  background: linear-gradient(180deg, #fff, #dbeafe);
  color: #0f172a;
  font-weight: 950;
  text-transform: uppercase;
}
.crossword-cell.black {
  border-color: transparent;
  background: rgba(3,7,18,.72);
}
.crossword-cell.correct {
  border-color: rgba(96,211,148,.95);
  background: linear-gradient(180deg, #f0fff6, #bdf7d2);
  box-shadow: inset 0 0 0 2px rgba(96,211,148,.45);
}
.crossword-cell.wrong,
.crossword-cell.solution-added {
  border-color: rgba(239,71,111,.95);
  background: linear-gradient(180deg, #fff3f5, #ffd7df);
  box-shadow: inset 0 0 0 2px rgba(239,71,111,.38);
}
.crossword-cell small {
  position: absolute;
  top: 2px;
  left: 3px;
  z-index: 2;
  max-width: calc(100% - 6px);
  border-radius: 3px;
  padding: 1px 2px;
  background: rgba(255,255,255,.78);
  color: #1d4ed8;
  font-size: clamp(.42rem, .55vw, .58rem);
  line-height: 1;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crossword-cell b {
  font-size: clamp(.72rem, 1.1vw, 1.05rem);
  line-height: 1;
}
.crossword-cell-input {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  background: transparent;
  color: #0f172a;
  font-size: clamp(.78rem, 1.2vw, 1.08rem);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}
.crossword-cell-input:focus {
  outline: 2px solid #ffd166;
  outline-offset: -2px;
  background: rgba(255,255,255,.42);
}
.crossword-cell:focus-within {
  z-index: 2;
  box-shadow: 0 0 0 2px rgba(255,209,102,.35);
}
.crossword-row {
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.97);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.game-window .crossword-scene {
  height: 100%;
  min-height: 0;
}
.game-window .crossword-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.game-window .crossword-scene .scene-titlebar {
  min-height: 44px;
  padding: 7px 12px;
}
.game-window .crossword-scene .crossword-layout {
  grid-template-columns: minmax(430px, .42fr) minmax(420px, .9fr) minmax(150px, .16fr);
  gap: 12px;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
}
.game-window .crossword-scene .crossword-board {
  place-items: start center;
  align-self: stretch;
  justify-self: stretch;
  padding: 8px;
  overflow: auto;
  overscroll-behavior: contain;
}
.game-window .crossword-scene .crossword-grid {
  width: auto;
  height: min(100%, 370px);
  max-width: 100%;
  aspect-ratio: 1;
}
.game-window .crossword-scene .crossword-grid.crossword-size-13 {
  width: auto;
  height: min(100%, 410px);
  max-width: 100%;
  aspect-ratio: 1;
}
.game-window .crossword-scene .crossword-list {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.game-window .crossword-scene .crossword-row {
  grid-template-columns: minmax(0, 1fr) minmax(130px, 220px);
  min-height: 58px;
  padding: 8px 10px;
}
.game-window .crossword-scene .crossword-row input {
  min-height: 38px;
}
.game-window .crossword-scene .crossword-actions {
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 0;
}
.game-window .crossword-scene #crosswordCheck,
.game-window .crossword-scene #crosswordReveal {
  align-self: end;
  justify-self: stretch;
  min-width: 0;
  min-height: 48px;
}

.maze-prompt-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  width: min(680px, 100%);
  min-height: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.94), rgba(199,249,255,.82));
  box-shadow: 0 18px 30px rgba(3,7,18,.22);
}
.maze-prompt-card span {
  color: #64748b;
  font-size: .82rem;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-prompt-card strong {
  color: #111827;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: .95;
}
.maze-scene {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 42%, rgba(94,234,212,.2), transparent 18%),
    linear-gradient(180deg, #111827 0%, #1f2b47 38%, #0c1221 39%, #050816 100%);
  perspective: 780px;
  transform-style: preserve-3d;
  --maze-shift: 0%;
  --maze-turn: 0deg;
}
.maze-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.16), transparent 5rem),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: auto, 58px 58px, 58px 58px;
  opacity: .42;
}
.maze-scene.maze-run-left { --maze-shift: 18%; --maze-turn: -8deg; }
.maze-scene.maze-run-center { --maze-shift: 0%; --maze-turn: 0deg; }
.maze-scene.maze-run-right { --maze-shift: -18%; --maze-turn: 8deg; }
.maze-speed-lines {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.maze-speed-line {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 38%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.88), transparent);
  transform-origin: left center;
}
.maze-speed-line.line-0 { transform: rotate(-24deg) translateX(58px); }
.maze-speed-line.line-1 { transform: rotate(0deg) translateX(92px); }
.maze-speed-line.line-2 { transform: rotate(24deg) translateX(58px); }
.maze-ceiling,
.maze-floor,
.maze-back-wall,
.corridor {
  position: absolute;
  pointer-events: none;
}
.maze-ceiling {
  left: -10%;
  right: -10%;
  top: -18%;
  height: 48%;
  z-index: 1;
  transform: rotateX(-62deg);
  transform-origin: bottom center;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 2px, transparent 2px 42px),
    linear-gradient(180deg, rgba(19,31,55,.96), rgba(47,65,99,.52));
}
.maze-back-wall {
  left: 30%;
  right: 30%;
  top: 17%;
  height: 38%;
  z-index: 1;
  border: 2px solid rgba(148,163,184,.42);
  border-radius: 8px 8px 2px 2px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255,209,102,.42) 49% 51%, transparent 52%),
    linear-gradient(180deg, rgba(15,23,42,.86), rgba(30,41,59,.76));
  box-shadow: inset 0 0 32px rgba(0,0,0,.45), 0 18px 40px rgba(0,0,0,.32);
}
.corridor {
  bottom: 0;
  width: 35%;
  height: 72%;
  z-index: 2;
  opacity: .82;
  border: 2px solid rgba(125,211,252,.3);
  background:
    linear-gradient(180deg, rgba(59,130,246,.12), rgba(15,23,42,.28)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.1) 0 1px, transparent 1px 36px);
  transform-origin: bottom center;
  box-shadow: inset 0 0 28px rgba(56,189,248,.1);
}
.corridor-left {
  left: -1%;
  clip-path: polygon(74% 0, 100% 0, 72% 100%, 0 100%);
  transform: rotateY(34deg) skewY(4deg);
}
.corridor-center {
  left: 32.5%;
  width: 35%;
  clip-path: polygon(28% 0, 72% 0, 100% 100%, 0 100%);
  transform: translateZ(-18px);
}
.corridor-right {
  right: -1%;
  clip-path: polygon(0 0, 26% 0, 100% 100%, 28% 100%);
  transform: rotateY(-34deg) skewY(-4deg);
}
.gate-mode .corridor-left,
.gate-mode .corridor-right {
  opacity: .42;
}
.crossroad-mode .maze-back-wall {
  opacity: .45;
}
.maze-floor {
  left: -4%;
  right: -4%;
  bottom: -8%;
  height: 58%;
  z-index: 3;
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  transform: rotateX(62deg);
  transform-origin: top center;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 2px, transparent 2px 46px),
    linear-gradient(90deg, rgba(255,209,102,.08), rgba(125,211,252,.16), rgba(255,209,102,.08)),
    rgba(148,122,63,.46);
  box-shadow: inset 0 18px 60px rgba(0,0,0,.36);
}
.maze-crossroad-sign {
  position: absolute;
  top: 10%;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 999px;
  background: rgba(3,7,18,.68);
  color: #ffd166;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.maze-scene .maze-options {
  position: absolute;
  z-index: 6;
  left: clamp(16px, 4vw, 62px);
  right: clamp(16px, 4vw, 62px);
  bottom: clamp(18px, 5vh, 38px);
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}
.maze-scene .tile-button {
  position: relative;
  z-index: 6;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 76px;
  border: 2px solid rgba(255,255,255,.72);
  color: #0f172a;
  box-shadow: 0 16px 28px rgba(0,0,0,.3);
}
.maze-scene .tile-button small {
  display: block;
  color: rgba(15,23,42,.72);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.maze-scene .tile-button span {
  display: block;
  color: #0f172a;
  text-shadow: none;
}
.maze-scene .gate-choice {
  min-height: 112px;
  border-radius: 10px 10px 3px 3px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(191,219,254,.86) 22%, rgba(30,64,175,.9) 23% 100%),
    linear-gradient(135deg, var(--teal), var(--blue));
}
.maze-scene .path-choice {
  min-height: 86px;
  border-radius: 999px 999px 12px 12px;
  background:
    linear-gradient(180deg, rgba(255,248,219,.98), rgba(125,211,252,.9)),
    linear-gradient(135deg, var(--teal), var(--blue));
}
.maze-scene .direction-left {
  transform: perspective(560px) rotateY(10deg) translateY(8px);
}
.maze-scene .direction-center {
  transform: translateY(-8px) scale(1.04);
}
.maze-scene .direction-right {
  transform: perspective(560px) rotateY(-10deg) translateY(8px);
}
.maze-scene .tile-button:disabled {
  opacity: .38;
}
.maze-scene .tile-button.chosen {
  opacity: 1;
  border-color: #ffd166;
  background:
    linear-gradient(180deg, #fff8db, #ffd166),
    linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 0 0 4px rgba(255,209,102,.24), 0 22px 34px rgba(0,0,0,.34);
}
.maze-scene .tile-button.chosen:disabled {
  transform: translateY(-10px) scale(1.06);
}
.maze-scene.run-forward {
  animation: mazeCameraRun 1.04s cubic-bezier(.2,.78,.22,1) both;
}
.maze-scene.run-forward .maze-speed-lines {
  animation: mazeSpeedBurst 1.04s ease both;
}
.maze-scene.run-forward .maze-options {
  animation: mazeGateRush 1.04s cubic-bezier(.2,.78,.22,1) both;
}
.maze-scene.run-forward .corridor,
.maze-scene.run-forward .maze-floor,
.maze-scene.run-forward .maze-back-wall {
  animation: mazeFloorRush 1.04s cubic-bezier(.2,.78,.22,1) both;
}
.maze-scene.wrong-turn {
  animation: mazeWrongTurn 1.08s cubic-bezier(.22,.68,.2,1) both;
}
.maze-scene.wrong-turn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 34%, rgba(248,113,113,.36) 35% 100%);
  animation: mazeImpactFlash 1.08s ease both;
}
.maze-scene.dead-end {
  animation: mazeWrongTurn .65s ease both;
}
.maze-scene.trap {
  animation: trapFall .7s ease both;
}
@keyframes mazeCameraRun {
  0% { filter: brightness(1); transform: translateX(0) rotateY(0deg) scale(1); }
  45% { filter: brightness(1.22) saturate(1.18); transform: translateX(var(--maze-shift)) rotateY(var(--maze-turn)) scale(1.05); }
  100% { filter: brightness(.96); transform: translateX(var(--maze-shift)) rotateY(var(--maze-turn)) scale(1.12); }
}
@keyframes mazeWrongTurn {
  0% { filter: brightness(1); transform: translateX(0) rotateY(0deg) scale(1); }
  34% { filter: brightness(1.12); transform: translateX(var(--maze-shift)) rotateY(var(--maze-turn)) scale(1.04); }
  56% { filter: saturate(1.7) hue-rotate(-18deg); transform: translateX(0) rotateY(0deg) scale(1.02); }
  72% { transform: translateX(14px) rotateZ(1.5deg) scale(1.01); }
  86% { transform: translateX(-12px) rotateZ(-1.2deg) scale(1); }
  100% { filter: brightness(.78); transform: translateX(0) rotateZ(0deg) scale(.99); }
}
@keyframes mazeImpactFlash {
  0%, 28% { opacity: 0; }
  48%, 70% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes mazeSpeedBurst {
  0%, 8% { opacity: 0; transform: scale(.85); }
  26%, 72% { opacity: .92; }
  100% { opacity: 0; transform: scale(1.28); }
}
@keyframes mazeGateRush {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  68% { transform: translateY(18px) scale(1.28); opacity: .96; }
  100% { transform: translateY(48px) scale(1.5); opacity: 0; }
}
@keyframes mazeFloorRush {
  0% { filter: brightness(1); transform: translateY(0) scale(1); }
  62% { filter: brightness(1.28); transform: translateY(14px) scale(1.08); }
  100% { filter: brightness(.92); transform: translateY(32px) scale(1.18); }
}
@keyframes trapFall {
  to { transform: translateY(80px) scale(.94); filter: brightness(.45); }
}
.maze-options { grid-template-columns: repeat(3, minmax(130px, 1fr)); }

.game-window .maze-scene-wrap {
  height: 100%;
  min-height: 0;
}
.game-window .maze-scene-wrap .scene-content {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.game-window .maze-scene-wrap .scene-titlebar {
  min-height: 44px;
  padding: 7px 12px;
}
.game-window .maze-scene-wrap .stimulus-card {
  min-height: 0;
  padding: 12px 16px;
}
.game-window .maze-scene-wrap .stimulus-card .stage-title {
  font-size: clamp(2rem, 4vw, 3rem);
}
.game-window .maze-scene-wrap .maze-grid {
  min-height: 0;
  height: 100%;
}
.game-window .maze-scene-wrap .maze-scene {
  min-height: 0;
  height: 100%;
}
.game-window .maze-scene-wrap .maze-options {
  bottom: clamp(18px, 6vh, 46px);
}

.maze-status-console {
  display: grid;
  grid-template-columns: minmax(110px, .45fr) minmax(180px, 1fr) minmax(140px, .55fr);
  gap: 10px;
  align-items: stretch;
  min-height: 0;
}
.maze-status-console > div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(125,211,252,.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,23,42,.92), rgba(2,6,23,.86)),
    repeating-linear-gradient(90deg, rgba(125,211,252,.08) 0 1px, transparent 1px 12px);
  box-shadow: inset 0 0 22px rgba(14,165,233,.12), 0 12px 24px rgba(0,0,0,.22);
}
.maze-status-console span {
  color: #7dd3fc;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.maze-status-console strong {
  color: #f8fafc;
  font-size: 1.12rem;
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}
.maze-status-action {
  align-content: center;
}
.maze-energy-cells {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 3px;
}
.maze-energy-cells i {
  height: 7px;
  border-radius: 2px;
  background: rgba(71,85,105,.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.maze-energy-cells i.filled {
  background: linear-gradient(90deg, #60d394, #22d3ee);
  box-shadow: 0 0 8px rgba(34,211,238,.52);
}
.maze-fps-scene {
  position: relative;
  isolation: isolate;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  border: 1px solid rgba(148,163,184,.42);
  border-radius: 8px;
  background: #020617;
  box-shadow: inset 0 0 80px rgba(0,0,0,.68), 0 24px 46px rgba(0,0,0,.32);
}
.maze-renderer {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #020617;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.maze-reticle {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(226,232,240,.32);
  border-radius: 50%;
  pointer-events: none;
}
.maze-reticle::before,
.maze-reticle::after {
  content: "";
  position: absolute;
  background: rgba(226,232,240,.48);
}
.maze-reticle::before {
  top: 50%;
  left: -12px;
  right: -12px;
  height: 1px;
}
.maze-reticle::after {
  top: -12px;
  bottom: -12px;
  left: 50%;
  width: 1px;
}
.maze-crossroad-hud {
  position: absolute;
  z-index: 5;
  top: 14px;
  left: 50%;
  display: grid;
  gap: 2px;
  min-width: min(420px, calc(100% - 24px));
  padding: 10px 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(125,211,252,.46);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(2,6,23,.72), rgba(15,23,42,.52));
  color: #f8fafc;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 24px rgba(14,165,233,.2);
}
.maze-crossroad-hud span {
  color: #7dd3fc;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.maze-crossroad-hud strong {
  font-size: 1.45rem;
  line-height: 1;
  overflow-wrap: anywhere;
}
.maze-crossroad-hud strong small {
  display: block;
  color: #7dd3fc;
  font-size: .72rem;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
}
.maze-message {
  position: absolute;
  z-index: 6;
  left: 14px;
  bottom: 122px;
  max-width: min(430px, calc(100% - 28px));
  padding: 9px 12px;
  border: 1px solid rgba(255,209,102,.42);
  border-radius: 8px;
  background: rgba(2,6,23,.72);
  color: #fde68a;
  font-size: .88rem;
  font-weight: 850;
  line-height: 1.2;
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
}
.arcane-compass {
  --arcane-compass-angle: 0rad;
  position: absolute;
  z-index: 7;
  top: 70px;
  right: 14px;
  width: 56px;
  height: 56px;
  opacity: 0;
  transform: translateY(-6px) scale(.92);
  transition: opacity .28s ease, transform .28s ease;
  pointer-events: none;
}
.arcane-compass.active {
  opacity: .94;
  transform: translateY(0) scale(1);
}
.arcane-compass-face {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,255,255,.22) 0 11%, transparent 12%),
    radial-gradient(circle at 50% 50%, rgba(15,23,42,.72), rgba(2,6,23,.88));
  box-shadow: 0 0 18px rgba(125,211,252,.24), inset 0 0 18px rgba(125,211,252,.18);
}
.arcane-compass-face::before,
.arcane-compass-face i {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 20px;
  border-radius: 999px;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(var(--arcane-compass-angle));
}
.arcane-compass-face::before {
  background: rgba(255,255,255,.82);
  transform: translate(-50%, 0) rotate(var(--arcane-compass-angle));
}
.arcane-compass-face i {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,.65);
}
.maze-energy-panel {
  position: absolute;
  z-index: 7;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 5px;
  width: clamp(132px, 22vw, 240px);
  padding: 9px 12px;
  border: 1px solid rgba(125,211,252,.46);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15,23,42,.9), rgba(2,6,23,.82)),
    repeating-linear-gradient(90deg, rgba(125,211,252,.08) 0 1px, transparent 1px 12px);
  pointer-events: none;
  box-shadow: inset 0 0 22px rgba(14,165,233,.12), 0 12px 24px rgba(0,0,0,.28);
}
.maze-energy-panel span {
  color: #7dd3fc;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.maze-energy-panel strong {
  color: #f8fafc;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1;
}
.maze-move-controls {
  position: absolute;
  z-index: 7;
  left: 14px;
  bottom: 14px;
  display: grid;
  grid-template-columns: repeat(3, 52px);
  grid-template-areas:
    ". forward ."
    "left back right";
  gap: 7px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.maze-move {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(226,232,240,.54);
  border-radius: 8px;
  background: rgba(248,250,252,.88);
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
}
.maze-move.turn-left { grid-area: left; }
.maze-move.turn-right { grid-area: right; }
.maze-move.move-forward { grid-area: forward; }
.maze-move.move-back { grid-area: back; }
.maze-move:active {
  background: #ffd166;
  transform: translateY(1px);
}
.maze-move:disabled {
  cursor: default;
  opacity: .48;
}
.maze-solution-button {
  width: 100%;
  min-height: 42px;
  min-width: 0;
  background: rgba(255,255,255,.92);
}
.maze-end-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(96,211,148,.3), transparent 28%),
    linear-gradient(180deg, #07111f, #020617 62%, #040708);
}
.maze-end-screen.lost {
  background:
    radial-gradient(circle at 50% 42%, rgba(239,71,111,.24), transparent 30%),
    linear-gradient(180deg, #1f0b10, #020617 68%, #030303);
}
.maze-end-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  width: min(520px, calc(100% - 28px));
  padding: 24px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(2,6,23,.78);
  color: #f8fafc;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
}
.maze-end-panel span {
  color: #7dd3fc;
  font-size: .8rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.maze-end-panel h2 {
  margin: 0;
  font-size: 2.4rem;
  line-height: 1;
}
.maze-end-panel p {
  margin: 0;
  color: #cbd5e1;
  font-weight: 800;
}
.maze-fireworks {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.maze-fireworks i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow:
    0 -58px #60d394,
    42px -42px #3a86ff,
    58px 0 #ef476f,
    42px 42px #f8fafc,
    0 58px #ffd166,
    -42px 42px #60d394,
    -58px 0 #3a86ff,
    -42px -42px #ef476f;
  animation: mazeFirework 1.45s ease-out infinite;
}
.maze-fireworks .burst-0 { left: 18%; top: 24%; animation-delay: 0s; }
.maze-fireworks .burst-1 { left: 78%; top: 28%; animation-delay: .18s; }
.maze-fireworks .burst-2 { left: 54%; top: 16%; animation-delay: .34s; }
.maze-fireworks .burst-3 { left: 28%; top: 68%; animation-delay: .52s; }
.maze-fireworks .burst-4 { left: 72%; top: 70%; animation-delay: .72s; }
.maze-fireworks .burst-5 { left: 48%; top: 78%; animation-delay: .9s; }
@keyframes mazeFirework {
  0% { opacity: 0; transform: scale(.18); filter: blur(1px); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.45); filter: blur(0); }
}

.maze-trial-wrap {
  min-height: 0;
}
.maze-trial-shell {
  display: grid;
  min-height: min(68vh, 680px);
  overflow: hidden;
  border: 1px solid rgba(244,199,102,.26);
  border-radius: 8px;
  background: #06101d;
  box-shadow: 0 24px 70px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.06);
}
.maze-trial-scene {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 560px;
  overflow: hidden;
  padding: clamp(12px, 2vw, 18px);
}
.maze-trial-bg,
.maze-trial-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.maze-trial-bg {
  background:
    linear-gradient(180deg, rgba(3,8,17,.18), rgba(3,8,17,.7)),
    url("/static/assets/maze-trial/maze-trial-corridor.png") center / cover no-repeat;
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.02);
}
.maze-trial-shell.rewarded .maze-trial-bg {
  animation: mazeTrialRewardScene .76s ease both;
}
.maze-trial-shell.blocked .maze-trial-bg {
  animation: mazeTrialBlockedScene .46s ease both;
}
.maze-trial-vignette {
  background:
    radial-gradient(circle at 50% 44%, transparent 0 34%, rgba(3,8,17,.24) 60%, rgba(3,8,17,.68) 100%),
    linear-gradient(90deg, rgba(3,8,17,.62), transparent 22% 78%, rgba(3,8,17,.62));
}
.maze-trial-route-glow {
  position: absolute;
  inset: 42% 11% 18%;
  z-index: 1;
  pointer-events: none;
  opacity: .36;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(125,211,252,.34), transparent 66%),
    linear-gradient(90deg, transparent, rgba(134,239,172,.2), transparent);
  filter: blur(10px);
  transform: perspective(520px) rotateX(58deg);
}
.maze-trial-shell.room-garden .maze-trial-route-glow,
.maze-trial-shell.room-atrium .maze-trial-route-glow {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(134,239,172,.34), transparent 68%),
    linear-gradient(90deg, transparent, rgba(125,211,252,.22), transparent);
}
.maze-trial-shell.room-gatehouse .maze-trial-route-glow,
.maze-trial-shell.room-threshold .maze-trial-route-glow {
  opacity: .5;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(250,204,21,.32), transparent 66%),
    linear-gradient(90deg, transparent, rgba(251,191,36,.2), transparent);
}
.maze-trial-shell.rewarded .maze-trial-route-glow {
  animation: mazeTrialOpenGlow .96s ease both;
}
.maze-trial-shell.blocked .maze-trial-route-glow {
  animation: mazeTrialSealGlow .54s ease both;
}
.maze-trial-hud,
.maze-trial-prompt,
.maze-trial-paths,
.maze-trial-reward {
  position: relative;
  z-index: 2;
}
.maze-trial-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.maze-trial-hud > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(3,9,17,.54);
  color: #f8fbff;
  box-shadow: 0 16px 36px rgba(0,0,0,.24);
}
.maze-trial-hud span {
  color: rgba(221,246,255,.76);
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-trial-hud strong {
  color: #fffdf8;
  font-size: 1.45rem;
  line-height: 1;
}
.maze-trial-hud small {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  color: #d9f99d;
  font-weight: 900;
  min-width: 0;
  overflow-wrap: anywhere;
}
.maze-trial-hud i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
}
.maze-trial-hud i.filled {
  background: #86efac;
  box-shadow: 0 0 12px rgba(134,239,172,.7);
}
.maze-trial-prompt {
  align-self: center;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 7px;
  width: min(560px, 92%);
  border: 1px solid rgba(244,199,102,.38);
  border-radius: 8px;
  padding: 14px 18px;
  background: rgba(4,12,24,.58);
  color: #fffdf8;
  text-align: center;
  text-shadow: 0 6px 18px rgba(0,0,0,.48);
  backdrop-filter: blur(3px);
}
.maze-trial-prompt span {
  color: #7dd3fc;
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-trial-prompt strong {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: .92;
}
.maze-trial-prompt small {
  color: rgba(255,255,255,.86);
  font-weight: 850;
}
.maze-trial-reward {
  min-height: 34px;
  color: #d9f99d;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 950;
  text-align: center;
  text-shadow: 0 8px 22px rgba(0,0,0,.56);
}
.maze-trial-shell.rewarded .maze-trial-reward {
  animation: mazeTrialRewardText .76s ease both;
}
.maze-trial-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.maze-trial-path {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 86px;
  align-content: center;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(210,229,234,.82)),
    radial-gradient(circle at 50% 0%, rgba(125,211,252,.24), transparent 58%);
  color: #07111f;
  box-shadow: 0 16px 34px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.46);
  text-align: center;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
}
.maze-trial-path::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .58;
}
.maze-trial-path.style-arch::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(125,211,252,.34), transparent 42%),
    linear-gradient(90deg, rgba(15,23,42,.12), transparent 18% 82%, rgba(15,23,42,.12));
}
.maze-trial-path.style-gate::before {
  background:
    radial-gradient(circle at 50% 10%, rgba(250,204,21,.32), transparent 46%),
    linear-gradient(180deg, rgba(180,83,9,.18), transparent 62%);
}
.maze-trial-path.style-garden::before {
  background:
    radial-gradient(circle at 18% 100%, rgba(34,197,94,.28), transparent 38%),
    radial-gradient(circle at 82% 100%, rgba(20,184,166,.22), transparent 38%);
}
.maze-trial-path.style-stairs::before {
  background:
    repeating-linear-gradient(180deg, rgba(15,23,42,.14) 0 5px, transparent 5px 14px),
    radial-gradient(circle at 50% 0%, rgba(226,232,240,.32), transparent 54%);
}
.maze-trial-path.style-crystal::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(56,189,248,.34), transparent 22%),
    radial-gradient(circle at 82% 22%, rgba(167,139,250,.28), transparent 24%),
    linear-gradient(180deg, rgba(240,249,255,.28), transparent 70%);
}
.maze-trial-path.style-sealed::before,
.maze-trial-path.style-deadend::before {
  background:
    repeating-linear-gradient(135deg, rgba(15,23,42,.14) 0 5px, transparent 5px 12px),
    radial-gradient(circle at 50% 0%, rgba(148,163,184,.24), transparent 52%);
}
.maze-trial-path:hover,
.maze-trial-path:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(0,0,0,.38), 0 0 30px rgba(125,211,252,.22);
}
.maze-trial-path small {
  position: relative;
  z-index: 1;
  color: #0f766e;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-trial-path span {
  position: relative;
  z-index: 1;
  overflow-wrap: anywhere;
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  font-weight: 950;
  line-height: 1.05;
}
.maze-trial-path.opened {
  border-color: rgba(134,239,172,.72);
  box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 0 42px rgba(134,239,172,.52), 0 16px 38px rgba(0,0,0,.34);
  animation: mazeTrialPathOpen .96s ease both;
}
.maze-trial-path.opened::after {
  content: "";
  position: absolute;
  inset: -35% -10%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.86) 46%, rgba(134,239,172,.6) 52%, transparent 78%);
  animation: mazeTrialPathShine .96s ease both;
}
.maze-trial-path.denied,
.maze-trial-path.blocked {
  border-color: rgba(248,113,113,.62);
  filter: saturate(.72) brightness(.86);
}
.maze-trial-path.denied {
  animation: mazeTrialPathDenied .46s ease both;
}
.maze-trial-path:disabled {
  cursor: default;
}
.maze-trial-path.blocked:disabled {
  opacity: .74;
}
.maze-trial-end {
  display: grid;
  min-height: 540px;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(134,239,172,.28), transparent 32%),
    url("/static/assets/maze-trial/maze-trial-corridor.png") center / cover no-repeat;
}
.maze-trial-end-panel {
  display: grid;
  gap: 12px;
  width: min(540px, calc(100% - 28px));
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  padding: 24px;
  background: rgba(3,9,17,.74);
  color: #fffdf8;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
}
.maze-trial-end-panel span {
  color: #8fded0;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-trial-end-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: .95;
}
@keyframes mazeTrialRewardScene {
  0% { filter: saturate(1.08) contrast(1.03) brightness(1); transform: scale(1.02); }
  48% { filter: saturate(1.22) contrast(1.06) brightness(1.18); transform: scale(1.055); }
  100% { filter: saturate(1.08) contrast(1.03) brightness(1); transform: scale(1.02); }
}
@keyframes mazeTrialBlockedScene {
  0%, 100% { filter: saturate(1.08) contrast(1.03); transform: translateX(0) scale(1.02); }
  30% { filter: saturate(.9) contrast(1.08) brightness(.82); transform: translateX(-8px) scale(1.02); }
  62% { transform: translateX(8px) scale(1.02); }
}
@keyframes mazeTrialRewardText {
  0% { opacity: 0; transform: translateY(10px) scale(.94); }
  35% { opacity: 1; transform: translateY(0) scale(1.08); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes mazeTrialOpenGlow {
  0% { opacity: .28; filter: blur(14px); transform: perspective(520px) rotateX(58deg) scale(.98); }
  48% { opacity: .86; filter: blur(6px); transform: perspective(520px) rotateX(58deg) scale(1.08); }
  100% { opacity: .42; filter: blur(10px); transform: perspective(520px) rotateX(58deg) scale(1); }
}
@keyframes mazeTrialSealGlow {
  0%, 100% { opacity: .32; transform: perspective(520px) rotateX(58deg) translateX(0); }
  35% { opacity: .18; transform: perspective(520px) rotateX(58deg) translateX(-10px); }
  68% { opacity: .22; transform: perspective(520px) rotateX(58deg) translateX(10px); }
}
@keyframes mazeTrialPathOpen {
  0% { transform: translateY(0) scale(1); }
  46% { transform: translateY(-5px) scale(1.025); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes mazeTrialPathShine {
  0% { opacity: 0; transform: translateX(-70%); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(72%); }
}
@keyframes mazeTrialPathDenied {
  0%, 100% { transform: translateX(0); }
  28% { transform: translateX(-6px); }
  58% { transform: translateX(6px); }
}

.game-window .maze-lab-scene-wrap {
  height: 100%;
  min-height: 0;
}
.game-window .maze-lab-scene-wrap .scene-content {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.game-window .maze-lab-scene-wrap .scene-titlebar {
  min-height: 44px;
  border-color: rgba(244,199,102,.32);
  background:
    linear-gradient(180deg, rgba(15,23,42,.74), rgba(3,9,17,.86)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.maze-lab-console {
  display: grid;
  grid-template-columns: minmax(120px, .42fr) minmax(180px, 1fr) minmax(110px, .32fr);
  gap: 10px;
  min-height: 0;
}
.maze-lab-console > div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(244,199,102,.26);
  border-radius: 8px;
  padding: 9px 12px;
  background:
    linear-gradient(180deg, rgba(15,23,42,.9), rgba(2,6,23,.82)),
    repeating-linear-gradient(90deg, rgba(244,199,102,.08) 0 1px, transparent 1px 12px);
  box-shadow: inset 0 0 24px rgba(244,199,102,.08), 0 12px 24px rgba(0,0,0,.22);
}
.maze-lab-console span {
  color: #f4c766;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-lab-console strong {
  min-width: 0;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}
.maze-lab-grid {
  min-height: 0;
  height: 100%;
}
.maze-lab-fps-scene {
  position: relative;
  isolation: isolate;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(244,199,102,.24);
  border-radius: 8px;
  background: #020617;
  box-shadow: inset 0 0 95px rgba(0,0,0,.72), 0 24px 46px rgba(0,0,0,.34);
}
.maze-lab-renderer {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  background: #020617;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.phaser-maze-lab-root {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  overflow: hidden;
  background: #020617;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.phaser-maze-lab-root canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.maze-lab-fps-scene.phaser-renderer-active .maze-crossroad-hud {
  top: 10px;
  left: 12px;
  gap: 1px;
  width: min(188px, calc(100% - 24px));
  min-width: 0;
  padding: 5px 7px;
  transform: none;
  background: linear-gradient(180deg, rgba(2,6,23,.62), rgba(15,23,42,.42));
  text-align: left;
  box-shadow: 0 0 14px rgba(14,165,233,.1);
}
.maze-lab-fps-scene.phaser-renderer-active .maze-crossroad-hud strong {
  font-size: clamp(.76rem, 2.35vw, .92rem);
}
.maze-lab-fps-scene.phaser-renderer-active .maze-crossroad-hud strong small {
  display: inline;
  margin-right: 6px;
  font-size: .58rem;
}
.maze-lab-fps-scene.phaser-renderer-active .maze-crossroad-hud span {
  display: none;
}
.maze-lab-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.46), transparent 18% 82%, rgba(0,0,0,.46)),
    radial-gradient(circle at 50% 55%, transparent 0 46%, rgba(0,0,0,.38) 75%, rgba(0,0,0,.72));
  mix-blend-mode: multiply;
}
.maze-lab-compass {
  --maze-lab-bearing: 0deg;
  position: absolute;
  z-index: 8;
  top: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: auto 40px auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(244,199,102,.36);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(2,6,23,.72);
  color: #f8fafc;
  box-shadow: 0 16px 28px rgba(0,0,0,.34);
}
.maze-lab-compass span {
  color: #7dd3fc;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-lab-compass i {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,248,223,.28);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(244,199,102,.2), rgba(15,23,42,.86) 62%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.2));
}
.maze-lab-compass i::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef476f 0 46%, #f8fafc 46% 100%);
  transform: rotate(var(--maze-lab-bearing));
  transform-origin: 50% 50%;
  box-shadow: 0 0 14px rgba(244,199,102,.5);
}
.maze-lab-compass-heading {
  color: #ffd166;
  font-size: 1.05rem;
  font-weight: 950;
}
.maze-lab-message {
  position: absolute;
  z-index: 7;
  left: 14px;
  bottom: 146px;
  max-width: min(470px, calc(100% - 28px));
  border: 1px solid rgba(244,199,102,.42);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(2,6,23,.78);
  color: #fde68a;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 16px 28px rgba(0,0,0,.34);
}
.maze-lab-choice-host {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 86px;
  width: min(760px, calc(100% - 28px));
  transform: translateX(-50%);
  pointer-events: none;
}
.maze-lab-choice-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(125,211,252,.42);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(2,6,23,.86), rgba(15,23,42,.76)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
  color: #f8fafc;
  box-shadow: 0 18px 38px rgba(0,0,0,.42);
  pointer-events: auto;
}
.maze-lab-choice-panel[hidden] {
  display: none;
}
.maze-lab-choice-panel > span {
  color: #7dd3fc;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-lab-choice-panel > strong {
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1;
}
.maze-lab-choice-panel > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.maze-lab-choice {
  display: grid;
  gap: 4px;
  min-height: 72px;
  border: 1px solid rgba(255,248,223,.28);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255,248,223,.94), rgba(244,199,102,.82)),
    linear-gradient(135deg, rgba(101,220,200,.18), transparent);
  color: #0f172a;
  font-weight: 950;
  text-align: left;
}
.maze-lab-choice small {
  color: rgba(15,23,42,.62);
  font-size: .68rem;
  text-transform: uppercase;
}
.maze-lab-choice span {
  min-width: 0;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  overflow-wrap: anywhere;
}
.maze-lab-choice.tried {
  opacity: .46;
}
.maze-lab-choice-panel.dead-end {
  border-color: rgba(239,71,111,.58);
  background: linear-gradient(180deg, rgba(37,8,16,.94), rgba(2,6,23,.88));
}
.maze-lab-choice-panel.dead-end button {
  min-height: 48px;
}
.maze-lab-controls {
  position: absolute;
  z-index: 9;
  right: 14px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 8px;
  width: min(430px, calc(100% - 28px));
}
.maze-lab-control {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 52px;
  border: 1px solid rgba(226,232,240,.46);
  border-radius: 8px;
  background: rgba(248,250,252,.9);
  color: #0f172a;
  font-weight: 950;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
}
.maze-lab-control span {
  font-size: 1.35rem;
  line-height: 1;
}
.maze-lab-control small {
  font-size: .68rem;
  line-height: 1;
  text-transform: uppercase;
}
.maze-lab-control:active {
  background: #ffd166;
  transform: translateY(1px);
}
.maze-lab-end-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, rgba(125,211,252,.24), transparent 28%),
    linear-gradient(180deg, #07111f, #020617 62%, #040708);
}
.maze-lab-end-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  width: min(540px, calc(100% - 28px));
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 24px;
  background: rgba(2,6,23,.78);
  color: #f8fafc;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
}
.maze-lab-end-panel span {
  color: #7dd3fc;
  font-size: .8rem;
  font-weight: 950;
  text-transform: uppercase;
}
.maze-lab-end-panel h2 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1;
}
.maze-lab-end-panel p {
  margin: 0;
  color: #cbd5e1;
  font-weight: 800;
}
.maze-lab-end-panel div {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

@media (max-width: 760px) {
  .game-window[data-active-game="maze"],
  .game-window[data-active-game="maze_trial"],
  .game-window[data-active-game="maze_lab"],
  .game-window[data-active-game="arcane_explorer"] {
    overflow-y: auto;
    padding: 8px;
  }
  .game-window[data-active-game="maze"] .game-window-shell,
  .game-window[data-active-game="maze_trial"] .game-window-shell,
  .game-window[data-active-game="maze_lab"] .game-window-shell,
  .game-window[data-active-game="arcane_explorer"] .game-window-shell {
    height: auto;
    min-height: 100%;
    gap: 8px;
    padding: 8px;
  }
  .game-window[data-active-game="maze"] .game-window-toolbar,
  .game-window[data-active-game="maze_trial"] .game-window-toolbar,
  .game-window[data-active-game="maze_lab"] .game-window-toolbar,
  .game-window[data-active-game="arcane_explorer"] .game-window-toolbar {
    min-height: 52px;
    padding: 7px;
    gap: 8px;
  }
  .game-window[data-active-game="maze"] .game-window-toolbar h2,
  .game-window[data-active-game="maze_trial"] .game-window-toolbar h2,
  .game-window[data-active-game="maze_lab"] .game-window-toolbar h2,
  .game-window[data-active-game="arcane_explorer"] .game-window-toolbar h2 {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }
  .game-window[data-active-game="maze"] .game-window-controls,
  .game-window[data-active-game="maze_trial"] .game-window-controls,
  .game-window[data-active-game="maze_lab"] .game-window-controls,
  .game-window[data-active-game="arcane_explorer"] .game-window-controls {
    gap: 6px;
  }
  .game-window[data-active-game="maze"] .game-window-controls select,
  .game-window[data-active-game="maze_trial"] .game-window-controls select,
  .game-window[data-active-game="maze_lab"] .game-window-controls select,
  .game-window[data-active-game="arcane_explorer"] .game-window-controls select {
    width: min(126px, 34vw);
  }
  .game-window[data-active-game="maze"] .game-stage,
  .game-window[data-active-game="maze_trial"] .game-stage,
  .game-window[data-active-game="maze_lab"] .game-stage,
  .game-window[data-active-game="arcane_explorer"] .game-stage {
    height: auto;
    overflow: visible;
  }
  .maze-trial-scene {
    min-height: 500px;
    padding: 10px;
  }
  .maze-trial-hud {
    gap: 6px;
  }
  .maze-trial-hud > div {
    gap: 2px;
    padding: 7px 6px;
  }
  .maze-trial-hud span {
    font-size: .56rem;
    line-height: 1.05;
  }
  .maze-trial-hud strong {
    font-size: 1.05rem;
  }
  .maze-trial-hud small {
    font-size: .62rem;
    line-height: 1.05;
  }
  .maze-trial-hud i {
    width: 7px;
    height: 7px;
  }
  .maze-trial-paths {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .maze-trial-path {
    min-height: 54px;
    padding: 9px 12px;
  }
  .maze-trial-prompt {
    gap: 4px;
    padding: 10px 12px;
  }
  .maze-trial-prompt strong {
    font-size: clamp(1.65rem, 11vw, 2.65rem);
  }
  .maze-trial-reward {
    min-height: 24px;
    font-size: .98rem;
  }
  .game-window .maze-lab-scene-wrap {
    height: auto;
  }
  .game-window .maze-lab-scene-wrap .scene-content {
    grid-template-rows: auto minmax(360px, 64vh);
    padding: 8px;
  }
  .game-window .maze-lab-scene-wrap .scene-titlebar {
    display: none;
  }
  .maze-lab-console {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .maze-lab-console > div:nth-child(2) {
    grid-column: 1 / -1;
  }
  .maze-lab-console > div {
    padding: 8px;
  }
  .maze-lab-console strong {
    font-size: .96rem;
  }
  .maze-lab-renderer,
  .phaser-maze-lab-root {
    min-height: 360px;
  }
  .maze-lab-compass {
    top: 8px;
    right: 8px;
    grid-template-columns: 30px auto;
    gap: 6px;
    min-height: 36px;
    padding: 5px 7px;
  }
  .maze-lab-compass span {
    display: none;
  }
  .maze-lab-compass i {
    width: 30px;
    height: 30px;
  }
  .maze-lab-compass i::before {
    height: 17px;
  }
  .maze-lab-message {
    left: 10px;
    right: 10px;
    top: 50px;
    bottom: auto;
    max-width: none;
    padding: 8px 10px;
    font-size: .95rem;
  }
  .maze-lab-choice-host {
    left: 10px;
    right: 10px;
    bottom: 92px;
    width: auto;
    transform: none;
  }
  .maze-lab-choice-panel {
    padding: 10px;
  }
  .maze-lab-choice-panel > div {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  }
  .maze-lab-choice {
    min-height: 58px;
    padding: 8px;
  }
  .maze-lab-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: auto;
  }
  .maze-lab-control {
    min-height: 58px;
    padding: 5px;
  }
  .maze-lab-control span {
    font-size: 1.28rem;
  }
  .maze-lab-control small {
    font-size: .58rem;
  }
}

.story-start-screen {
  grid-template-rows: minmax(0, 1fr) auto auto auto;
}
.story-closed-book {
  position: relative;
  width: min(360px, 80vw);
  aspect-ratio: .74;
  display: grid;
  place-items: center;
  border: 10px solid #8a622c;
  border-radius: 18px 26px 26px 18px;
  padding: 28px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.18), transparent 30%),
    linear-gradient(135deg, #7a391d 0%, #5f2f1f 44%, #2b150f 100%);
  color: #f9e5a8;
  box-shadow: 0 26px 58px rgba(0,0,0,.42), inset 0 0 0 4px rgba(255,232,166,.28);
}
.story-book-spine {
  position: absolute;
  left: -22px;
  top: 10px;
  bottom: 10px;
  width: 22px;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, #f3c766, #8a622c 48%, #f3c766);
  box-shadow: inset -5px 0 8px rgba(0,0,0,.28);
}
.story-cover-corner {
  position: absolute;
  width: 58px;
  height: 58px;
  color: #f4d27d;
  border-color: #f4d27d;
  opacity: .9;
}
.story-cover-corner.corner-a { top: 16px; left: 18px; border-top: 3px solid; border-left: 3px solid; border-radius: 12px 0 0 0; }
.story-cover-corner.corner-b { top: 16px; right: 18px; border-top: 3px solid; border-right: 3px solid; border-radius: 0 12px 0 0; }
.story-cover-corner.corner-c { bottom: 16px; left: 18px; border-bottom: 3px solid; border-left: 3px solid; border-radius: 0 0 0 12px; }
.story-cover-corner.corner-d { bottom: 16px; right: 18px; border-bottom: 3px solid; border-right: 3px solid; border-radius: 0 0 12px 0; }
.story-cover-title {
  position: absolute;
  z-index: 1;
  top: 45%;
  left: 28px;
  right: 28px;
  transform: translateY(-50%);
  display: block;
  width: auto;
  color: #f8dfa0;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4.7vw, 4.2rem);
  font-weight: 950;
  line-height: .9;
  letter-spacing: 0;
  text-shadow: 0 4px 0 rgba(0,0,0,.24), 0 12px 24px rgba(0,0,0,.3);
}
.story-cover-subtitle {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  text-align: center;
  color: rgba(255,246,214,.82);
  font-weight: 950;
  text-transform: uppercase;
}
.story-book {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 0;
  border-radius: 18px;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.2), transparent 26%),
    linear-gradient(90deg, #6b3f1f 0 4%, transparent 4% 96%, #6b3f1f 96% 100%),
    linear-gradient(135deg, #174f68, #8b2f5b 52%, #2b150f);
  color: #111827;
  box-shadow: 0 24px 54px rgba(0,0,0,.32);
}
.story-open-book {
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}
.story-open-book.turn-next .story-page-text {
  animation: storyPageTurnNext .36s ease;
  transform-origin: left center;
}
.story-open-book.turn-prev .story-page-text {
  animation: storyPageTurnPrev .36s ease;
  transform-origin: left center;
}
.story-open-book.turn-next .story-single-page {
  animation: storyPageTurnNext .36s ease;
  transform-origin: center top;
}
.story-open-book.turn-prev .story-single-page {
  animation: storyPageTurnPrev .36s ease;
  transform-origin: center top;
}
.story-book-spread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .88fr) minmax(0, 1.12fr);
  --story-spread-divider: 44%;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.38), 0 18px 34px rgba(0,0,0,.24);
}
.story-book-spread::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: var(--story-spread-divider);
  width: 26px;
  transform: translateX(-50%);
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.22), rgba(255,255,255,.3) 48%, rgba(0,0,0,.2));
  opacity: .7;
}
.story-single-spread {
  grid-template-columns: minmax(0, 1fr);
  --story-spread-divider: 100%;
}
.story-single-spread::before {
  display: none;
}
.story-page {
  position: relative;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.72), transparent 28%),
    linear-gradient(180deg, #fff8df, #f9f0c8 54%, #f4e3b8);
  box-shadow: inset 0 0 30px rgba(101,63,22,.2);
}
.story-page-illustration {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  border-right: 1px solid rgba(101,63,22,.2);
}
.story-page-text {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}
.story-single-page {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: auto;
}
.story-illustration-top {
  display: grid;
  justify-items: center;
  min-height: 0;
}
.story-illustration-top .story-visual-panel {
  width: min(100%, 34dvh, 420px);
}
.story-single-page .story-line {
  overflow: visible;
  padding-right: 0;
}
.story-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(101,63,22,.22);
}
.story-page-heading span {
  color: #7f1d1d;
  font-weight: 950;
  text-transform: uppercase;
}
.story-page-heading strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}
.story-cue-rack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  min-height: 0;
}
.story-cue-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(125,211,252,.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,248,223,.86)),
    linear-gradient(135deg, rgba(244,211,94,.28), rgba(58,134,255,.14));
  color: #0f172a;
  text-align: left;
  box-shadow: 0 10px 22px rgba(15,23,42,.12);
}
.story-cue-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.story-cue-card strong {
  overflow: hidden;
  color: #7f1d1d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-cue-card small {
  color: #475569;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1.15;
}
.story-cue-card.active {
  border-color: rgba(244,211,94,.78);
  box-shadow: 0 0 0 2px rgba(244,211,94,.25), 0 12px 24px rgba(15,23,42,.16);
}
.story-visual-panel {
  display: grid;
  gap: 12px;
  align-content: center;
}
.story-visual-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 8px solid rgba(95,47,31,.32);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3,7,18,.08), rgba(3,7,18,.2)),
    url("/static/assets/story-fill-cinematic-triptych.png") left center / 300% auto no-repeat;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.3), 0 18px 34px rgba(0,0,0,.28);
}
.story-world-vault .story-visual-frame {
  background-position: left center;
}
.story-world-arcade .story-visual-frame {
  background-position: center center;
}
.story-world-library .story-visual-frame {
  background-position: right center;
}
.story-visual-frame::before,
.story-visual-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.story-visual-frame::before {
  z-index: 1;
  background:
    radial-gradient(circle at 52% 45%, transparent 0 42%, rgba(3,7,18,.2) 100%),
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 32%, rgba(0,0,0,.22));
}
.story-visual-frame::after {
  z-index: 2;
  background:
    linear-gradient(105deg, transparent 0 34%, rgba(255,255,255,.18) 45%, transparent 56% 100%);
  mix-blend-mode: screen;
  opacity: .48;
  animation: storyCinematicSweep 5.8s ease-in-out infinite;
}
.story-world-mark {
  position: absolute;
  left: 10%;
  bottom: 16%;
  width: 32%;
  height: 46%;
  border-radius: 12px;
  background: rgba(255,255,255,.2);
  border: 4px solid rgba(255,255,255,.58);
  box-shadow: 0 16px 28px rgba(0,0,0,.22);
}
.story-world-vault .story-world-mark {
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,209,102,.92) 0 14%, rgba(15,23,42,.86) 15% 26%, rgba(255,209,102,.78) 27% 31%, rgba(15,23,42,.82) 32% 100%);
}
.story-world-arcade .story-world-mark {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), transparent),
    linear-gradient(135deg, #ef476f, #3a86ff);
}
.story-world-library .story-world-mark {
  border-radius: 6px 20px 6px 20px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.18) 0 18%, transparent 18%),
    linear-gradient(135deg, #8b5e34, #f4d35e);
}
.story-action-figure {
  position: absolute;
  left: 52%;
  bottom: 21%;
  width: 58px;
  height: 96px;
  border-radius: 28px 28px 18px 18px;
  background: linear-gradient(180deg, #ffd7a3 0 28%, #3a86ff 29% 100%);
  border: 3px solid rgba(15,23,42,.86);
  box-shadow: 0 12px 22px rgba(0,0,0,.26);
  animation: storyFigureIdle .8s ease-in-out infinite alternate;
}
.story-action-figure::before,
.story-action-figure::after {
  content: "";
  position: absolute;
  bottom: -22px;
  width: 12px;
  height: 28px;
  border-radius: 999px;
  background: #172554;
}
.story-action-figure::before { left: 12px; rotate: 12deg; }
.story-action-figure::after { right: 12px; rotate: -12deg; }
.story-action-trail,
.story-action-effect {
  position: absolute;
  pointer-events: none;
}
.story-action-trail {
  left: 44%;
  bottom: 25%;
  width: 30%;
  height: 18%;
  border-top: 6px solid rgba(255,255,255,.62);
  border-bottom: 4px solid rgba(255,209,102,.62);
  border-radius: 50%;
  opacity: .82;
}
.story-action-effect {
  right: 10%;
  bottom: 25%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,209,102,.88), rgba(239,71,111,.18) 48%, transparent 70%);
}
.story-action-run .story-action-figure,
.story-action-depart .story-action-figure {
  animation: storyRunCue .72s ease-in-out infinite alternate;
}
.story-action-approach .story-action-figure {
  left: 42%;
}
.story-action-fall .story-action-figure {
  rotate: 18deg;
  animation: storyFallCue .9s ease-in-out infinite alternate;
}
.story-action-rise .story-action-figure {
  animation: storyRiseCue .9s ease-in-out infinite alternate;
}
.story-action-travel .story-action-effect {
  border-radius: 999px;
  width: 120px;
  height: 48px;
  background: linear-gradient(90deg, #f8fafc, #38bdf8, #1d4ed8);
}
.story-action-transfer .story-action-effect {
  width: 78px;
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f4d35e, #f97316);
}
.story-action-language .story-action-effect::before {
  content: "ABC";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #0f172a;
  font-weight: 950;
}
.story-action-impact .story-action-effect {
  clip-path: polygon(50% 0, 62% 34%, 100% 22%, 72% 54%, 100% 78%, 60% 70%, 50% 100%, 38% 70%, 0 78%, 28% 54%, 0 22%, 38% 34%);
}
.story-action-daily .story-action-effect {
  border-radius: 18px;
  background: linear-gradient(180deg, #86efac, #10b981);
}
.story-action-energy .story-action-effect {
  animation: storyGlowCue .7s ease-in-out infinite alternate;
}
.story-visual-frame .story-world-mark,
.story-visual-frame .story-action-trail,
.story-visual-frame .story-action-figure,
.story-visual-frame .story-action-effect {
  display: none;
}
.story-visual-copy {
  display: grid;
  gap: 5px;
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,.68);
}
.story-visual-copy span,
.story-visual-copy small {
  color: #64748b;
  font-weight: 900;
  text-transform: uppercase;
}
.story-visual-copy strong {
  color: #0f172a;
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
  line-height: 1;
}
.story-visual-copy p {
  margin: 0;
  color: #334155;
  font-weight: 800;
  line-height: 1.35;
}
.story-cues {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.68);
}
.story-cues span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  font-weight: 800;
}
.story-cues b,
.story-cue-card b,
.story-blank b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #1d4ed8;
  color: white;
  font-size: .8rem;
  flex: 0 0 auto;
}
.story-line {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding-right: 6px;
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
  line-height: 1.7;
}
.story-page-reader {
  align-content: start;
  padding: 4px 8px 4px 0;
  font-family: Georgia, "Times New Roman", serif;
}
.story-line p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.34);
}
.story-page-paragraph {
  position: relative;
  min-height: 116px;
  border: 1px solid rgba(127,29,29,.12);
  background:
    radial-gradient(circle at 18% 18%, rgba(244,211,94,.22), transparent 32%),
    rgba(255,255,255,.36);
}
.story-dropcap {
  float: left;
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 68px;
  margin: 4px 12px 4px 0;
  border: 2px solid rgba(127,29,29,.28);
  border-radius: 12px 4px 12px 4px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.64), transparent 30%),
    linear-gradient(135deg, #f4d35e, #8b2f5b);
  color: #fff8df;
  font-size: 2.85rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(15,23,42,.22);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.24), 0 10px 20px rgba(127,29,29,.18);
}
.story-page-controls {
  display: grid;
  grid-template-columns: 46px auto 46px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
}
.story-page-controls span {
  color: #7f1d1d;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 950;
}
.story-page-turn-button {
  width: 46px;
  height: 40px;
  min-width: 0;
  padding: 0;
  font-size: 1.65rem;
  line-height: 1;
}
.story-blank {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 4px;
  vertical-align: middle;
}
.story-line input {
  width: min(190px, 100%);
  border-width: 2px;
  font-weight: 900;
}
.story-result-line {
  gap: 10px;
}
.story-result-line p {
  line-height: 1.9;
}
.story-end-book {
  min-height: 0;
}
.story-end-page {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
}
.story-end-label {
  color: #7f1d1d;
  font-weight: 950;
  text-transform: uppercase;
}
.story-end-page .story-result-line {
  overflow: auto;
  padding-right: 8px;
}
.story-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}
.story-end-actions .ghost {
  border-color: rgba(15,23,42,.18);
  background: rgba(255,255,255,.94);
  color: #0f172a;
}
.story-result-blank {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
}
.story-player-answer {
  display: inline-grid;
  min-width: 82px;
  min-height: 34px;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 8px;
  padding: 3px 9px;
  background: #edfff3;
  color: #14532d;
  font-weight: 950;
  line-height: 1.1;
}
.story-result-blank.wrong .story-player-answer {
  border-color: var(--coral);
  background: #fff0f2;
  color: #7f1d1d;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.story-correct-answer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid rgba(22,163,74,.24);
  border-radius: 8px;
  padding: 3px 9px;
  background: rgba(220,252,231,.92);
}
.story-correct-answer small {
  color: #64748b;
  font-size: .74rem;
  font-weight: 950;
  text-transform: uppercase;
}
.story-correct-answer strong {
  color: #14532d;
  font-weight: 950;
}
.story-blank.wrong .story-correct-answer {
  margin-left: 2px;
}
.story-cue.correct {
  background: rgba(220,252,231,.92);
  color: #14532d;
}
.story-cue.wrong {
  background: rgba(255,241,242,.95);
  color: #7f1d1d;
}
.story-blank.correct input {
  border-color: var(--green);
  background: #edfff3;
  color: #14532d;
}
.story-blank.wrong input {
  border-color: var(--coral);
  background: #fff0f2;
  color: #7f1d1d;
}
.story-summary .stage-subtitle {
  color: #0f172a;
  font-weight: 950;
}
@keyframes storyFigureIdle {
  to { transform: translateY(-6px); }
}
@keyframes storyRunCue {
  from { transform: translateX(-12px) translateY(2px) skewX(-4deg); }
  to { transform: translateX(18px) translateY(-6px) skewX(4deg); }
}
@keyframes storyFallCue {
  from { transform: translateY(-22px); }
  to { transform: translateY(20px); }
}
@keyframes storyRiseCue {
  from { transform: translateY(20px); }
  to { transform: translateY(-34px); }
}
@keyframes storyGlowCue {
  to { transform: scale(1.12); filter: brightness(1.18); }
}
@keyframes storyCinematicSweep {
  0%, 22% { transform: translateX(-58%); opacity: 0; }
  48% { opacity: .5; }
  74%, 100% { transform: translateX(58%); opacity: 0; }
}
@keyframes storyPageTurnNext {
  from { opacity: .72; transform: perspective(700px) rotateY(-9deg) translateX(10px); }
  to { opacity: 1; transform: perspective(700px) rotateY(0) translateX(0); }
}
@keyframes storyPageTurnPrev {
  from { opacity: .72; transform: perspective(700px) rotateY(9deg) translateX(-10px); }
  to { opacity: 1; transform: perspective(700px) rotateY(0) translateX(0); }
}

.puzzle-board {
  border: 8px solid rgba(255,255,255,.24);
  background: #111827;
}
.puzzle-tile {
  border-radius: 14px;
  text-shadow: 0 3px 12px rgba(0,0,0,.5);
}
.puzzle-piece-art,
.verb-poster {
  background:
    linear-gradient(135deg, rgba(20,184,166,.9), rgba(244,63,94,.82)),
    linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,0)),
    url("/static/assets/arcade-backdrop.png") center / cover;
}
.puzzle-piece-art::after,
.verb-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
.verb-poster {
  position: relative;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: clamp(14px, 3%, 28px);
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: clamp(20px, 5%, 46px);
}
.verb-poster-row {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  padding: 12px 18px 12px 30px;
  background: rgba(2,6,23,.62);
  box-shadow: 0 14px 24px rgba(2,6,23,.28);
}
.verb-poster-row::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 18px;
  bottom: 18px;
  width: 10px;
  border-radius: 999px;
  background: #14b8a6;
}
.verb-poster-row.poster-row-1::before {
  background: #60a5fa;
}
.verb-poster-row.poster-row-2::before {
  background: #f43f5e;
}
.verb-poster-row span {
  color: rgba(255,255,255,.76);
  font-size: clamp(.65rem, 2.6vw, 1.25rem);
  font-weight: 950;
  text-transform: uppercase;
}
.verb-poster-row strong {
  color: white;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: clamp(1.1rem, 5.6vw, 3.1rem);
  line-height: 1.02;
  text-shadow: 0 8px 22px rgba(0,0,0,.42);
}
.verb-poster-row.poster-row-2 strong {
  color: #ffd166;
}
.verb-image-poster {
  isolation: isolate;
}
.verb-image-poster::before {
  content: "";
  position: absolute;
  inset: 9%;
  z-index: 0;
  border: 1px solid rgba(255,248,223,.22);
  opacity: .9;
  pointer-events: none;
}
.verb-image-poster::after {
  z-index: 1;
}
.verb-image-poster .verb-poster-row {
  z-index: 3;
}
.poster-scene-title {
  position: absolute;
  left: 7%;
  top: 6%;
  z-index: 2;
  max-width: 48%;
  border: 1px solid rgba(255,248,223,.22);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(3,9,17,.5);
  color: #fff8df;
  font-size: clamp(.72rem, 1.5vw, 1.08rem);
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}
.poster-scene-mark {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
}
.poster-scene-mark.mark-a {
  right: 8%;
  top: 8%;
  width: 20%;
  height: 22%;
}
.poster-scene-mark.mark-b {
  left: 10%;
  bottom: 11%;
  width: 26%;
  height: 14%;
}
.poster-scene-mark.mark-c {
  right: 12%;
  bottom: 18%;
  width: 16%;
  height: 28%;
}

.vase-grid {
  position: relative;
  align-items: end;
  gap: 16px 14px;
  padding: 16px 6px 6px;
}
.vase {
  appearance: none;
  align-self: end;
  justify-self: center;
  position: relative;
  overflow: visible;
  isolation: isolate;
  width: min(100%, 128px);
  min-height: 136px;
  padding: 34px 10px 14px;
  display: grid;
  place-items: end center;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 50% 50% 22px 22px / 34% 34% 18px 18px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.5), transparent 34px),
    linear-gradient(180deg, #ffd166, #ef476f);
  color: white;
  cursor: pointer;
  font-weight: 950;
  text-shadow: 0 3px 12px rgba(0,0,0,.36);
  box-shadow: 0 18px 34px rgba(0,0,0,.24);
  transform-origin: bottom center;
  transition: transform .18s ease, opacity .18s ease, filter .18s ease;
}
.vase::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 24%;
  right: 24%;
  height: 22px;
  border-radius: 50%;
  background: rgba(7,12,24,.32);
  border: 3px solid rgba(255,255,255,.55);
  box-shadow: inset 0 6px 10px rgba(0,0,0,.2);
}
.vase::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 17%;
  right: 17%;
  bottom: 31%;
  height: 14px;
  border-top: 3px solid rgba(255,255,255,.44);
  border-bottom: 3px solid rgba(7,12,24,.16);
  border-radius: 999px;
}
.vase:hover,
.vase:focus-visible {
  filter: saturate(1.12);
  transform: translateY(-4px);
}
.vase.under-threat {
  box-shadow: 0 0 0 4px rgba(239,71,111,.28), 0 18px 34px rgba(0,0,0,.24);
  animation: vaseThreatPulse .5s ease-in-out infinite alternate;
}
.vase:focus-visible {
  outline: 3px solid rgba(255,209,102,.82);
  outline-offset: 4px;
}
.vase-label {
  position: relative;
  z-index: 2;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: clamp(.92rem, 1.4vw, 1.2rem);
  line-height: 1.04;
}
.vase-hit-meter {
  position: absolute;
  z-index: 5;
  top: -8px;
  left: -8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 50%;
  background: #0f172a;
  color: #ffd166;
  box-shadow: 0 8px 16px rgba(2,6,23,.28);
}
.vase-hit-meter strong {
  font-size: .86rem;
  line-height: 1;
}
.vase-hit-1,
.vase-hit-2 {
  box-shadow: 0 18px 34px rgba(0,0,0,.24), inset 0 0 0 4px rgba(255,255,255,.18);
}
.vase-size-0 {
  width: min(100%, 108px);
  min-height: 118px;
}
.vase-size-1 {
  width: min(100%, 126px);
  min-height: 134px;
}
.vase-size-2 {
  width: min(100%, 144px);
  min-height: 154px;
}
.vase-shape-0 {
  border-radius: 54% 54% 20px 20px / 36% 36% 16px 16px;
}
.vase-shape-1 {
  border-radius: 34px 34px 18px 18px / 62px 62px 18px 18px;
}
.vase-shape-2 {
  border-radius: 46% 46% 34% 34% / 30% 30% 18% 18%;
}
.vase-shape-3 {
  border-radius: 30px 30px 54px 54px / 34px 34px 26px 26px;
}
.vase-shape-1::before {
  left: 32%;
  right: 32%;
}
.vase-shape-2::after {
  left: 9%;
  right: 9%;
  bottom: 42%;
}
.vase-shape-3::before {
  top: 12px;
  left: 18%;
  right: 18%;
}
.vase-tone-0 {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.62), transparent 32px),
    linear-gradient(180deg, #ffd166 0%, #f77f00 54%, #c2410c 100%);
}
.vase-tone-1 {
  background:
    radial-gradient(circle at 68% 18%, rgba(255,255,255,.58), transparent 30px),
    linear-gradient(180deg, #7dd3fc 0%, #2563eb 56%, #1e3a8a 100%);
}
.vase-tone-2 {
  background:
    radial-gradient(circle at 35% 24%, rgba(255,255,255,.55), transparent 34px),
    linear-gradient(180deg, #86efac 0%, #10b981 56%, #047857 100%);
}
.vase-tone-3 {
  background:
    radial-gradient(circle at 62% 22%, rgba(255,255,255,.54), transparent 33px),
    linear-gradient(180deg, #f9a8d4 0%, #ef476f 58%, #9f1239 100%);
}
.vase-tone-4 {
  background:
    radial-gradient(circle at 34% 20%, rgba(255,255,255,.56), transparent 32px),
    linear-gradient(180deg, #c4b5fd 0%, #7c3aed 58%, #4c1d95 100%);
}
.vase.broken {
  opacity: .44;
  cursor: default;
  filter: grayscale(.2);
  transform: rotate(-9deg) translateY(18px);
  clip-path: polygon(0 0, 100% 0, 92% 42%, 100% 100%, 0 100%, 12% 48%);
}
.vase.vase-protected-broken {
  opacity: .58;
  filter: grayscale(.45) brightness(.86);
  box-shadow: 0 0 0 4px rgba(239,71,111,.24), 0 18px 34px rgba(0,0,0,.24);
}
.vase.broken:hover,
.vase.broken:focus-visible {
  transform: rotate(-9deg) translateY(18px);
}
.vase-mischief {
  position: absolute;
  z-index: 6;
  top: -36px;
  right: -14px;
  width: 60px;
  height: 76px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.34));
  animation: vaseMischiefPop .28s ease-out both, vaseMischiefWiggle .7s ease-in-out infinite;
}
.vase-mischief-head,
.vase-mischief-body,
.vase-mischief-arm {
  position: absolute;
  display: block;
}
.vase-mischief-head {
  top: 1px;
  left: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffd7a3;
  border: 3px solid #0f172a;
}
.vase-mischief-head::before,
.vase-mischief-head::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0f172a;
}
.vase-mischief-head::before {
  left: 7px;
}
.vase-mischief-head::after {
  right: 7px;
}
.vase-mischief-body {
  left: 12px;
  bottom: 8px;
  width: 36px;
  height: 42px;
  border-radius: 16px 16px 12px 12px;
  background: linear-gradient(180deg, #22d3ee, #2563eb);
  border: 3px solid #0f172a;
}
.vase-mischief-arm {
  right: 2px;
  top: 34px;
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: #ffd166;
  border: 2px solid #0f172a;
  transform: rotate(-28deg);
  transform-origin: left center;
}
.vase-mischief-hits {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ef476f;
  color: white;
  border: 2px solid white;
  font-size: .78rem;
  font-weight: 950;
  line-height: 1;
}
.vase-mischief.hits-2 {
  animation-duration: .22s, .54s;
}
.vase-mischief.hits-1 {
  animation-duration: .18s, .38s;
}
@keyframes vaseMischiefPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.72);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes vaseMischiefWiggle {
  0%, 100% {
    rotate: -4deg;
  }
  50% {
    rotate: 7deg;
  }
}
@keyframes vaseThreatPulse {
  from {
    transform: translateY(-2px);
    filter: saturate(1.08);
  }
  to {
    transform: translateY(-8px);
    filter: saturate(1.35) brightness(1.08);
  }
}
.vase-end-scene {
  height: 100%;
  min-height: 0;
}
.vase-end-scene .scene-content {
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.vase-end-game {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(260px, .75fr);
  gap: 14px;
  min-height: 0;
}
.vase-end-card,
.vase-end-visual {
  min-height: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 16px;
  background: rgba(5,10,22,.7);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 22px 46px rgba(0,0,0,.24);
}
.vase-end-card {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(18px, 3vw, 34px);
}
.vase-end-card h2 {
  margin: 0;
  color: #86efac;
  font-size: clamp(2.4rem, 4.6vw, 5rem);
  line-height: .92;
}
.vase-end-game.lost .vase-end-card h2 {
  color: #fca5a5;
}
.vase-end-stats {
  display: grid;
  gap: 4px;
  color: rgba(255,255,255,.82);
  font-weight: 900;
}
.vase-end-stats strong {
  color: white;
  font-size: 1.2rem;
}
.vase-end-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.vase-end-visual {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: clamp(18px, 3vw, 34px);
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,209,102,.24), transparent 10rem),
    linear-gradient(160deg, rgba(20,184,166,.28), rgba(244,63,94,.2)),
    rgba(5,10,22,.72);
}
.vase-end-visual p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-weight: 950;
}
.vase-protected-forms {
  display: grid;
  gap: 10px;
  width: min(360px, 100%);
}
.vase-protected-forms strong {
  border: 2px solid rgba(255,255,255,.48);
  border-radius: 64px 64px 22px 22px;
  padding: 24px 16px 18px;
  background: linear-gradient(180deg, #ffd166, #ef476f);
  color: white;
  font-size: clamp(1.45rem, 2.4vw, 2.6rem);
  line-height: 1;
  text-shadow: 0 3px 12px rgba(0,0,0,.36);
  box-shadow: 0 18px 34px rgba(0,0,0,.24);
}
.vase-end-visual small {
  color: #ffd166;
  font-weight: 950;
}

.runner-play {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  min-height: 0;
}
.runner-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(5,10,22,.66);
}
.runner-target span {
  color: #ffd166;
  font-size: .82rem;
  font-weight: 950;
  text-transform: uppercase;
}
.runner-target strong {
  color: white;
  font-size: clamp(1.1rem, 2vw, 1.75rem);
}
.runner-course {
  --runner-gate-duration: 5.2s;
  --runner-road-duration: .42s;
  --runner-speed-duration: .6s;
  --runner-stride-duration: .34s;
  --runner-gate-start: 0px;
  --runner-gate-end: 88px;
  --runner-gate-y: 0px;
  --runner-gate-scale: 1.04;
  --runner-gate-current-scale: .96;
  position: relative;
  display: grid;
  min-height: 360px;
  height: 100%;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255,209,102,.5), transparent 14%),
    linear-gradient(180deg, #60a5fa 0 26%, #4ade80 27% 38%, #1f2937 39% 100%);
  box-shadow: inset 0 0 50px rgba(255,255,255,.1), 0 22px 42px rgba(0,0,0,.24);
  isolation: isolate;
}
.runner-horizon {
  position: absolute;
  inset: 22% -8% auto;
  height: 19%;
  background:
    linear-gradient(135deg, transparent 0 38%, rgba(15,23,42,.45) 39% 54%, transparent 55%),
    linear-gradient(45deg, transparent 0 42%, rgba(15,23,42,.38) 43% 58%, transparent 59%);
  background-size: 220px 100%, 260px 100%;
  opacity: .55;
  pointer-events: none;
}
.runner-speed-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(105deg, transparent 0 34px, rgba(255,255,255,.28) 35px 37px, transparent 38px 88px);
  mix-blend-mode: screen;
  opacity: .32;
  animation: runnerSpeedFlow var(--runner-speed-duration) linear infinite;
  pointer-events: none;
}
.runner-course.locked .runner-speed-lines,
.runner-course.locked .runner-road-markers {
  animation-play-state: paused;
}
.runner-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
  height: 100%;
  min-height: 0;
  perspective: 900px;
}
.runner-lane {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
  min-height: 330px;
  padding: 12px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.32);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.22), transparent 14% 86%, rgba(255,255,255,.22)),
    linear-gradient(180deg, rgba(51,65,85,.65), rgba(15,23,42,.95));
  box-shadow: inset 0 26px 70px rgba(255,255,255,.1), inset 0 -26px 42px rgba(0,0,0,.34);
  cursor: pointer;
  transform-origin: center bottom;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  touch-action: manipulation;
}
.runner-lane::before,
.runner-lane::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.runner-lane::before {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.42) 0 2px, transparent 2px calc(100% - 2px), rgba(255,255,255,.42) calc(100% - 2px)),
    radial-gradient(ellipse at 50% 100%, rgba(255,255,255,.18), transparent 52%);
}
.runner-lane::after {
  left: 10%;
  right: 10%;
  bottom: -18%;
  height: 44%;
  z-index: 1;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(0,0,0,.42), transparent 66%);
}
.runner-lane > * {
  position: relative;
  z-index: 2;
}
.runner-lane.active {
  border-color: #ffd166;
  box-shadow: 0 0 0 4px rgba(255,209,102,.22), inset 0 26px 70px rgba(255,255,255,.14);
  transform: translateY(-3px);
}
.runner-lane.correct {
  border-color: #86efac;
  box-shadow: 0 0 0 4px rgba(134,239,172,.2), inset 0 26px 70px rgba(134,239,172,.16);
}
.runner-lane.wrong {
  border-color: #fca5a5;
  box-shadow: 0 0 0 4px rgba(252,165,165,.18), inset 0 26px 70px rgba(252,165,165,.14);
}
.runner-road-markers {
  position: absolute;
  inset: -140px 18% -30px;
  z-index: 1;
  background:
    repeating-linear-gradient(180deg, transparent 0 34px, rgba(255,255,255,.72) 35px 58px, transparent 59px 96px);
  opacity: .78;
  transform: perspective(420px) rotateX(28deg);
  transform-origin: center bottom;
  animation: runnerRoadFlow var(--runner-road-duration) linear infinite;
}
.runner-lane-number {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(5,10,22,.72);
  color: white;
  font-weight: 950;
}
.runner-avatar {
  position: absolute;
  left: calc(50% - 30px);
  bottom: 38px;
  z-index: 3;
  width: 60px;
  height: 76px;
  display: block;
  filter: drop-shadow(0 13px 12px rgba(0,0,0,.34));
  animation: runnerStride var(--runner-stride-duration) ease-in-out infinite;
}
.runner-shadow {
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: -11px;
  height: 10px;
  border-radius: 999px;
  background: rgba(5,10,22,.48);
  transform: scaleX(1.08);
}
.runner-cape {
  position: absolute;
  left: 13px;
  top: 23px;
  width: 32px;
  height: 43px;
  border-radius: 18px 9px 20px 18px;
  background: linear-gradient(160deg, #7f1d1d, #ef476f 58%, #f4c766);
  transform: skewX(-7deg);
  transform-origin: 50% 0;
  animation: runnerCape var(--runner-stride-duration) ease-in-out infinite;
}
.runner-torso {
  position: absolute;
  left: 17px;
  top: 25px;
  z-index: 3;
  width: 27px;
  height: 37px;
  border-radius: 15px 15px 12px 12px;
  background:
    linear-gradient(90deg, transparent 0 9px, rgba(255,248,223,.92) 9px 13px, transparent 13px),
    linear-gradient(180deg, #65dcc8 0 22%, #1d4ed8 23% 72%, #111827 73%);
  box-shadow:
    inset 0 -8px 0 rgba(3,9,17,.22),
    inset 5px 0 0 rgba(255,255,255,.16);
}
.runner-crest {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 11px;
  height: 12px;
  clip-path: polygon(50% 0, 100% 34%, 82% 100%, 50% 78%, 18% 100%, 0 34%);
  background: linear-gradient(180deg, #fff8df, #f4c766);
  box-shadow: 0 2px 6px rgba(0,0,0,.24);
}
.runner-head {
  position: absolute;
  left: 16px;
  top: 0;
  z-index: 4;
  width: 29px;
  height: 31px;
  border-radius: 48% 52% 46% 48%;
  background: #ffcf99;
  box-shadow:
    inset -5px -5px 0 rgba(130,72,34,.18),
    0 2px 0 rgba(3,9,17,.18);
}
.runner-hair {
  position: absolute;
  left: 2px;
  top: -3px;
  width: 27px;
  height: 14px;
  border-radius: 14px 12px 9px 7px;
  background: linear-gradient(135deg, #111827, #4b2d1d);
  transform: rotate(-5deg);
}
.runner-hair::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 7px;
  width: 8px;
  height: 14px;
  border-radius: 999px;
  background: #111827;
  transform: rotate(28deg);
}
.runner-face {
  position: absolute;
  left: 8px;
  top: 14px;
  width: 15px;
  height: 7px;
  border-top: 2px solid rgba(17,24,39,.72);
  border-bottom: 2px solid rgba(127,29,29,.42);
  border-radius: 50%;
}
.runner-scarf {
  position: absolute;
  left: 31px;
  top: 24px;
  z-index: 5;
  width: 26px;
  height: 9px;
  border-radius: 999px 999px 999px 0;
  background: linear-gradient(90deg, #fff8df, #f4c766);
  transform-origin: 0 50%;
  animation: runnerScarf var(--runner-stride-duration) ease-in-out infinite;
}
.runner-arm,
.runner-leg {
  position: absolute;
  display: block;
  border-radius: 999px;
  transform-origin: 50% 0;
}
.runner-arm {
  top: 29px;
  z-index: 2;
  width: 8px;
  height: 31px;
  background: linear-gradient(180deg, #1d4ed8 0 46%, #ffcf99 47%);
  box-shadow: inset 0 -10px 0 rgba(255,207,153,.18);
}
.runner-arm.arm-a {
  left: 12px;
  animation: runnerArmA var(--runner-stride-duration) ease-in-out infinite;
}
.runner-arm.arm-b {
  right: 12px;
  animation: runnerArmB var(--runner-stride-duration) ease-in-out infinite;
}
.runner-hand {
  position: absolute;
  left: -2px;
  bottom: -4px;
  width: 12px;
  height: 10px;
  border-radius: 999px;
  background: #ffcf99;
  box-shadow: inset -2px -2px 0 rgba(130,72,34,.18);
}
.runner-leg {
  bottom: -8px;
  z-index: 1;
  width: 10px;
  height: 36px;
  background: linear-gradient(180deg, #111827 0 58%, #243b73 59%);
}
.runner-leg.leg-a {
  left: 18px;
  animation: runnerLegA var(--runner-stride-duration) ease-in-out infinite;
}
.runner-leg.leg-b {
  right: 18px;
  animation: runnerLegB var(--runner-stride-duration) ease-in-out infinite;
}
.runner-shoe {
  position: absolute;
  left: -5px;
  bottom: -5px;
  width: 20px;
  height: 9px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #fff8df, #f4c766 56%, #9a5d2c);
  box-shadow: 0 3px 5px rgba(0,0,0,.22);
}
.runner-lane.picked .runner-avatar {
  animation: runnerDash .62s ease both;
}
.runner-lane.picked.wrong .runner-avatar {
  animation: runnerKnockdown .62s ease both;
  transform-origin: 50% 100%;
}
.runner-lane.picked .runner-arm,
.runner-lane.picked .runner-leg {
  animation-duration: .16s;
}
@keyframes runnerSpeedFlow {
  to { background-position: 110px 0; }
}
@keyframes runnerRoadFlow {
  from { background-position: 0 0; }
  to { background-position: 0 96px; }
}
@keyframes runnerStride {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}
@keyframes runnerCape {
  0%, 100% { transform: skewX(-7deg) translateX(0); }
  50% { transform: skewX(-13deg) translateX(-3px); }
}
@keyframes runnerScarf {
  0%, 100% { transform: rotate(5deg) scaleX(1); }
  50% { transform: rotate(-8deg) scaleX(1.12); }
}
@keyframes runnerArmA {
  0%, 100% { transform: rotate(38deg); }
  50% { transform: rotate(-34deg); }
}
@keyframes runnerArmB {
  0%, 100% { transform: rotate(-38deg); }
  50% { transform: rotate(34deg); }
}
@keyframes runnerLegA {
  0%, 100% { transform: rotate(-34deg); }
  50% { transform: rotate(36deg); }
}
@keyframes runnerLegB {
  0%, 100% { transform: rotate(36deg); }
  50% { transform: rotate(-34deg); }
}
@keyframes runnerDash {
  to { transform: translateY(-148px) scale(1.08); }
}
@keyframes runnerKnockdown {
  0% { transform: translateY(0) rotate(0) scale(1); }
  42% { transform: translateY(-22px) rotate(-10deg) scale(1.04); }
  100% { transform: translateY(18px) rotate(84deg) scale(.96); }
}
.runner-gate {
  position: relative;
  z-index: 2;
  grid-row: 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: min(90%, 230px);
  min-width: 136px;
  min-height: 92px;
  margin-top: 34px;
  padding: 10px;
  border: 3px solid rgba(255,255,255,.58);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.24), transparent 18% 82%, rgba(255,255,255,.2)),
    linear-gradient(180deg, #111827, #1d4ed8);
  color: white;
  font-size: clamp(1.08rem, 1.8vw, 1.45rem);
  font-weight: 950;
  text-align: center;
  line-height: 1.08;
  text-shadow: 0 2px 8px rgba(0,0,0,.62);
  box-shadow: 0 18px 34px rgba(0,0,0,.28);
  transform: translateY(var(--runner-gate-y)) scale(var(--runner-gate-current-scale));
}
.runner-course.locked .runner-gate {
  animation: none;
}
.runner-lane.picked .runner-gate {
  animation: runnerGateHit .62s ease both;
}
@keyframes runnerGateHit {
  from { transform: translateY(var(--runner-gate-y)) scale(var(--runner-gate-current-scale)); }
  to { transform: translateY(calc(var(--runner-gate-y) + 26px)) scale(1.1); }
}
.runner-lane.correct .runner-gate {
  background: linear-gradient(180deg, #166534, #22c55e);
}
.runner-lane.wrong .runner-gate {
  background: linear-gradient(180deg, #7f1d1d, #ef4444);
}
.runner-control-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.runner-control-bar .ghost {
  min-width: 56px;
}
.runner-control-bar .primary {
  min-width: 132px;
}
.runner-bottom-prompt {
  display: grid;
  justify-items: center;
  min-height: 0;
}
.runner-end-scene {
  height: 100%;
  min-height: 0;
}
.runner-end-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.runner-end-game {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(420px, 1fr);
  gap: 14px;
  min-height: 0;
  height: 100%;
  color: white;
}
.runner-end-summary,
.runner-end-list-panel {
  min-height: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(5,10,22,.78), rgba(15,23,42,.62)),
    radial-gradient(circle at 24% 18%, rgba(59,130,246,.24), transparent 14rem);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 22px 46px rgba(0,0,0,.24);
}
.runner-end-summary {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 14px;
  overflow: auto;
  padding: clamp(16px, 2.1vw, 28px);
}
.runner-end-summary .eyebrow {
  margin: 0;
  color: #ffd166;
}
.runner-end-summary h2 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(2.4rem, 4.2vw, 5rem);
  line-height: .9;
  text-shadow: 0 5px 20px rgba(0,0,0,.28);
}
.runner-end-summary p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-weight: 900;
}
.runner-end-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: start;
}
.runner-end-stats div {
  display: grid;
  gap: 4px;
  min-height: 82px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(96,165,250,.08));
}
.runner-end-stats span {
  color: rgba(255,255,255,.7);
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.runner-end-stats strong {
  color: white;
  font-size: clamp(1.35rem, 2vw, 2rem);
}
.runner-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}
.runner-end-results {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, .78fr);
  gap: 14px;
  min-height: 0;
}
.runner-end-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.runner-end-list-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: rgba(5,10,22,.42);
}
.runner-end-list-panel header span,
.runner-end-list-panel header strong {
  color: white;
  font-weight: 950;
}
.runner-end-list-panel header span {
  color: #ffd166;
  text-transform: uppercase;
}
.runner-end-list-panel.mistakes header span {
  color: #fca5a5;
}
.runner-end-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}
.runner-result-row {
  display: grid;
  grid-template-columns: minmax(160px, .72fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(96,211,148,.2), rgba(59,130,246,.12));
}
.runner-result-row.wrong {
  background: linear-gradient(135deg, rgba(239,71,111,.24), rgba(251,113,133,.12));
}
.runner-result-row div {
  display: grid;
  gap: 3px;
}
.runner-result-row strong {
  color: white;
  font-size: 1.08rem;
}
.runner-result-row span,
.runner-result-row small {
  color: rgba(255,255,255,.78);
  font-weight: 900;
}
.runner-end-empty {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 1px dashed rgba(255,255,255,.24);
  border-radius: 12px;
  color: rgba(255,255,255,.72);
  font-weight: 900;
}

@media (max-width: 900px) {
  .panel-head h1 { font-size: 2.35rem; }
  .scene-frame, .game-stage { min-height: 620px; }
  .scene-content { padding: 14px; }
  .letter-arena, .crossword-layout, .puzzle-wrap, .puzzle-end-wrap, .taquin-wrap, .taquin-end-wrap, .vase-end-game, .runner-end-game, .memory-end-game, .vocab-game-layout { grid-template-columns: 1fr; }
  .vocab-launch { grid-template-columns: 1fr; }
  .vocab-launch-meta {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }
  .vocab-scene { min-height: 0; }
  .vocab-game-window .vocab-game-layout { grid-template-columns: 1fr; }
  .vocab-game-window .vocab-debug-panel {
    left: 14px;
    right: 14px;
  }
  .vocab-game-window .vocab-debug-panel > div,
  .vocab-debug-panel > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vocab-game-window .vocab-word-tray,
  .vocab-game-window .vocab-choice-list {
    height: auto;
  }
  .lift-split-game {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(220px, .7fr);
  }
  .lift-dedicated,
  .lift-game {
    grid-template-rows: minmax(260px, 1fr) auto;
  }
  .lift-console-top,
  .lift-console .lift-forms.step-mode {
    grid-template-columns: 1fr;
  }
  .lift-letter-console .lift-forms.step-mode {
    grid-template-rows: repeat(3, minmax(76px, 1fr));
  }
  .lift-console .keyboard {
    grid-template-columns: repeat(13, minmax(28px, 1fr));
  }
  .mole-field {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    grid-template-rows: repeat(4, minmax(96px, 1fr));
  }
  .mole-end-game {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(220px, .75fr);
  }
  .story-book-spread {
    grid-template-columns: 1fr;
  }
  .story-book-spread::before {
    display: none;
  }
  .balloon-prompt {
    grid-template-columns: 1fr;
  }
  .hero-stack { min-height: 330px; }
  .lift-canvas { height: 430px; min-height: 430px; }
}

@media (max-width: 560px) {
  .hud { grid-template-columns: repeat(2, 1fr); }
  .scene-titlebar { align-items: flex-start; flex-direction: column; }
  .scene-titlebar strong { text-align: left; }
  .stage-title { font-size: 2.2rem; }
	  .vocab-session-head,
	  .vocab-prompt {
	    align-items: flex-start;
	    flex-direction: column;
	  }
	  .vocab-place-grid {
	    align-items: stretch;
	    flex-direction: column;
	  }
	  .vocab-place-select {
	    min-width: 0;
	  }
	  .vocab-place-summary {
	    grid-template-columns: auto auto;
	    justify-content: center;
	    min-height: 42px;
	    width: 100%;
	  }
	  .vocab-mode-tab { min-width: 100%; }
	  .vocab-scene { min-height: 0; }
  .vocab-launch-preview,
  .vocab-launch-preview .vocab-scene {
    min-height: 0;
  }
  .vocab-debug-panel > div {
    grid-template-columns: 1fr;
  }
  .vocab-game-window .vocab-session-head,
  .vocab-game-window .vocab-prompt {
    align-items: flex-start;
    flex-direction: column;
  }
  .game-window .story-scene .story-book:not(.story-summary) .story-cues,
  .story-cue-rack,
  .story-cues { grid-template-columns: 1fr; }
  .story-line { font-size: 1rem; }
  .story-blank {
    display: flex;
    margin: 6px 0;
  }
  .story-blank input { width: 100%; }
  .verb-video-canvas { height: 260px; }
  .keyboard { grid-template-columns: repeat(6, 1fr); }
  .lift-console .keyboard { grid-template-columns: repeat(7, minmax(28px, 1fr)); }
  .lift-letter-console .keyboard { grid-template-columns: repeat(7, minmax(28px, 1fr)); }
  .maze-options, .runner-grid { grid-template-columns: 1fr; }
  .game-window .runner-scene .runner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .maze-scene .maze-options { grid-template-columns: 1fr; }
  .form-char { width: 24px; height: 32px; font-size: 1rem; }
  .lift-canvas { height: 360px; min-height: 360px; }
}

.game-window[hidden] { display: none; }
.game-window {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(3, 7, 18, .76), rgba(3, 7, 18, .9)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
  backdrop-filter: blur(10px);
}
.game-window-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(1500px, 100%);
  height: 100%;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(circle at 18% 12%, rgba(244, 199, 102, .2), transparent 34%),
    linear-gradient(180deg, rgba(8, 13, 29, .82), rgba(8, 13, 29, .62)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
  box-shadow: 0 28px 80px rgba(0,0,0,.44);
}
.game-window-shell::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 0;
  pointer-events: none;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(2, 6, 14, .16), rgba(2, 6, 14, .48));
}
.game-window-shell > * {
  position: relative;
  z-index: 1;
}
.game-window-toolbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(5,10,22,.72);
  color: white;
}
.game-window-toolbar h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: 0;
}
.game-window-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.game-window-controls select {
  width: 170px;
  border-color: rgba(255,255,255,.26);
  background: rgba(255,255,255,.94);
}
.game-window[data-active-game="memory"] #gameVariantSelect {
  display: none;
}
.memory-verb-count-select {
  width: 132px;
}
.arcane-segment-count-select {
  width: 104px;
}
.game-window[data-active-game="arcane_explorer"] #gameVariantSelect {
  order: 1;
}
.game-window[data-active-game="arcane_explorer"] .music-switch {
  order: 2;
}
.game-window[data-active-game="arcane_explorer"] #gameHelpButton {
  order: 3;
}
.game-window[data-active-game="arcane_explorer"] #gameCloseButton {
  order: 4;
}
.game-window[data-active-game="arcane_explorer"] .arcane-segment-count-select {
  order: 5;
}
.game-window[data-active-game="arcane_explorer"] #gameCloseButton,
.game-window[data-active-game="arcane_explorer"] #gameHelpButton,
.game-window[data-active-game="arcane_explorer"] .music-switch {
  display: grid;
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}
.game-window[data-active-game="arcane_explorer"] #gameCloseButton {
  background: rgba(255,255,255,.06);
}
.game-window[data-active-game="arcane_explorer"] #gameCloseButton::before,
.game-window[data-active-game="arcane_explorer"] #gameCloseButton::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 20px;
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.game-window[data-active-game="arcane_explorer"] #gameCloseButton::before {
  transform: rotate(45deg);
}
.game-window[data-active-game="arcane_explorer"] #gameCloseButton::after {
  transform: rotate(-45deg);
}
.game-window[data-active-game="arcane_explorer"] .music-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.game-window[data-active-game="arcane_explorer"] .music-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.game-window[data-active-game="arcane_explorer"] .music-switch::before {
  content: "";
  width: 25px;
  height: 25px;
  background: url("/static/assets/flash-choice/icon-sound-on.svg") center / contain no-repeat;
}
.game-window[data-active-game="arcane_explorer"] .music-switch::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52,211,153,.7);
}
.game-window[data-active-game="arcane_explorer"] .music-switch:has(input:not(:checked))::before {
  background-image: url("/static/assets/flash-choice/icon-sound-off.svg");
}
.game-window[data-active-game="arcane_explorer"] #gameHelpButton::before {
  content: "?";
  color: #f8fbff;
  font-size: 1.15rem;
  font-weight: 900;
}
.game-window:not([data-active-game="letter_lift"]) .keyboard-layout-select {
  display: none;
}
.help-button {
  min-width: 74px;
}
.game-help-panel[hidden] {
  display: none;
}
.game-help-panel {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: start;
  justify-items: end;
  padding: 92px 14px 14px;
  border-radius: inherit;
  background: rgba(3,7,18,.38);
}
.game-help-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 12px;
  padding: 16px;
  background: rgba(8,13,29,.94);
  color: white;
  box-shadow: 0 24px 58px rgba(0,0,0,.42);
}
.game-help-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.game-help-head h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}
.game-help-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}
.game-help-card li {
  line-height: 1.35;
  font-weight: 800;
}
.game-help-card > p {
  margin: 0;
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 12px;
  color: rgba(255,255,255,.72);
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.35;
}
.music-switch {
  min-height: 42px;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255,255,255,.12);
  color: white;
}
.music-switch input {
  width: 18px;
  min-height: 18px;
}
.game-window-hud {
  margin: 0;
}
.game-window[data-active-game="letter_lift"] .game-window-shell {
  gap: 10px;
  padding: 12px;
}
.game-window[data-active-game="letter_lift"] .game-window-toolbar {
  min-height: 58px;
  padding: 7px 12px;
}
.game-window[data-active-game="letter_lift"] .game-window-toolbar .eyebrow {
  margin: 0 0 2px;
  font-size: .68rem;
}
.game-window[data-active-game="letter_lift"] .game-window-toolbar h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}
.game-window[data-active-game="letter_lift"] .game-window-hud {
  gap: 8px;
}
.game-window[data-active-game="letter_lift"] .game-window-hud span {
  min-height: 36px;
}
.game-window[data-active-game="letter_lift"] .game-stage {
  padding: 10px;
}
.game-window[data-active-game="letter_lift"] #gameStartButton {
  display: none;
}
.game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) #gameVariantSelect,
.game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) #keyboardLayoutSelect {
  display: none;
}
.game-window[data-active-game="letter_lift"] #gameCloseButton,
.game-window[data-active-game="letter_lift"] #gameHelpButton,
.game-window[data-active-game="letter_lift"] .music-switch {
  display: grid;
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}
.game-window[data-active-game="letter_lift"] #gameCloseButton {
  background: rgba(255,255,255,.06);
}
.game-window[data-active-game="letter_lift"] #gameCloseButton::before,
.game-window[data-active-game="letter_lift"] #gameCloseButton::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 20px;
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.game-window[data-active-game="letter_lift"] #gameCloseButton::before { transform: rotate(45deg); }
.game-window[data-active-game="letter_lift"] #gameCloseButton::after { transform: rotate(-45deg); }
.game-window[data-active-game="letter_lift"] .music-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.game-window[data-active-game="letter_lift"] .music-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.game-window[data-active-game="letter_lift"] .music-switch::before {
  content: "";
  width: 25px;
  height: 25px;
  background: url("/static/assets/flash-choice/icon-sound-on.svg") center / contain no-repeat;
}
.game-window[data-active-game="letter_lift"] .music-switch::after {
  display: none;
}
.game-window[data-active-game="letter_lift"] .music-switch:has(input:not(:checked))::before {
  background-image: url("/static/assets/flash-choice/icon-sound-off.svg");
}
.game-window[data-active-game="letter_lift"] #gameHelpButton::before {
  content: "?";
  color: #f4f8fb;
  font-size: 1.45rem;
  font-weight: 900;
}
.game-window[data-active-game="whac_mole"] .game-window-shell {
  gap: 10px;
  padding: 12px;
}
.game-window[data-active-game="whac_mole"] .game-window-toolbar {
  min-height: 58px;
  padding: 7px 12px;
}
.game-window[data-active-game="whac_mole"] .game-window-toolbar .eyebrow {
  margin: 0 0 2px;
  font-size: .68rem;
}
.game-window[data-active-game="whac_mole"] .game-window-toolbar h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}
.game-window[data-active-game="whac_mole"] .game-window-hud span {
  min-height: 36px;
}
.game-window[data-active-game="whac_mole"] .game-stage {
  padding: 10px;
}
.game-window[data-active-game="whac_mole"] #gameStartButton {
  display: none;
}
.game-window[data-active-game="whac_mole"] #gameCloseButton,
.game-window[data-active-game="whac_mole"] #gameHelpButton,
.game-window[data-active-game="whac_mole"] .music-switch {
  display: grid;
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}
.game-window[data-active-game="whac_mole"] #gameCloseButton {
  background: rgba(255,255,255,.06);
}
.game-window[data-active-game="whac_mole"] #gameCloseButton::before,
.game-window[data-active-game="whac_mole"] #gameCloseButton::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 20px;
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.game-window[data-active-game="whac_mole"] #gameCloseButton::before { transform: rotate(45deg); }
.game-window[data-active-game="whac_mole"] #gameCloseButton::after { transform: rotate(-45deg); }
.game-window[data-active-game="whac_mole"] .music-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.game-window[data-active-game="whac_mole"] .music-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.game-window[data-active-game="whac_mole"] .music-switch::before {
  content: "";
  width: 25px;
  height: 25px;
  background: url("/static/assets/flash-choice/icon-sound-on.svg") center / contain no-repeat;
}
.game-window[data-active-game="whac_mole"] .music-switch::after {
  display: none;
}
.game-window[data-active-game="whac_mole"] .music-switch:has(input:not(:checked))::before {
  background-image: url("/static/assets/flash-choice/icon-sound-off.svg");
}
.game-window[data-active-game="whac_mole"] #gameHelpButton::before {
  content: "?";
  color: #f4f8fb;
  font-size: 1.45rem;
  font-weight: 900;
}
.game-window[data-active-game="balloons"] .game-window-shell {
  gap: 10px;
  padding: 12px;
}
.game-window[data-active-game="balloons"] .game-window-toolbar {
  min-height: 58px;
  padding: 7px 12px;
}
.game-window[data-active-game="balloons"] .game-window-toolbar .eyebrow {
  margin: 0 0 2px;
  font-size: .68rem;
}
.game-window[data-active-game="balloons"] .game-window-toolbar h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}
.game-window[data-active-game="balloons"] .game-window-hud span {
  min-height: 36px;
}
.game-window[data-active-game="balloons"] .game-stage {
  padding: 10px;
}
.game-window[data-active-game="balloons"] #gameStartButton {
  display: none;
}
.game-window[data-active-game="balloons"] #gameCloseButton,
.game-window[data-active-game="balloons"] #gameHelpButton,
.game-window[data-active-game="balloons"] .music-switch {
  display: grid;
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}
.game-window[data-active-game="balloons"] #gameCloseButton {
  background: rgba(255,255,255,.06);
}
.game-window[data-active-game="balloons"] #gameCloseButton::before,
.game-window[data-active-game="balloons"] #gameCloseButton::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 20px;
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.game-window[data-active-game="balloons"] #gameCloseButton::before { transform: rotate(45deg); }
.game-window[data-active-game="balloons"] #gameCloseButton::after { transform: rotate(-45deg); }
.game-window[data-active-game="balloons"] .music-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.game-window[data-active-game="balloons"] .music-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.game-window[data-active-game="balloons"] .music-switch::before {
  content: "";
  width: 25px;
  height: 25px;
  background: url("/static/assets/flash-choice/icon-sound-on.svg") center / contain no-repeat;
}
.game-window[data-active-game="balloons"] .music-switch::after {
  display: none;
}
.game-window[data-active-game="balloons"] .music-switch:has(input:not(:checked))::before {
  background-image: url("/static/assets/flash-choice/icon-sound-off.svg");
}
.game-window[data-active-game="balloons"] #gameHelpButton::before {
  content: "?";
  color: #f4f8fb;
  font-size: 1.45rem;
  font-weight: 900;
}
.game-window[data-active-game="memory"] #gameStartButton,
.game-window[data-active-game="crossword"] #gameStartButton {
  display: none;
}
.game-window[data-active-game="memory"] #gameCloseButton,
.game-window[data-active-game="memory"] #gameHelpButton,
.game-window[data-active-game="memory"] .music-switch,
.game-window[data-active-game="crossword"] #gameCloseButton,
.game-window[data-active-game="crossword"] #gameHelpButton,
.game-window[data-active-game="crossword"] .music-switch {
  display: grid;
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}
.game-window[data-active-game="memory"] #gameCloseButton,
.game-window[data-active-game="crossword"] #gameCloseButton {
  background: rgba(255,255,255,.06);
}
.game-window[data-active-game="memory"] #gameCloseButton::before,
.game-window[data-active-game="memory"] #gameCloseButton::after,
.game-window[data-active-game="crossword"] #gameCloseButton::before,
.game-window[data-active-game="crossword"] #gameCloseButton::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 20px;
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.game-window[data-active-game="memory"] #gameCloseButton::before,
.game-window[data-active-game="crossword"] #gameCloseButton::before { transform: rotate(45deg); }
.game-window[data-active-game="memory"] #gameCloseButton::after,
.game-window[data-active-game="crossword"] #gameCloseButton::after { transform: rotate(-45deg); }
.game-window[data-active-game="memory"] .music-switch span,
.game-window[data-active-game="crossword"] .music-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.game-window[data-active-game="memory"] .music-switch input,
.game-window[data-active-game="crossword"] .music-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.game-window[data-active-game="memory"] .music-switch::before,
.game-window[data-active-game="crossword"] .music-switch::before {
  content: "";
  width: 25px;
  height: 25px;
  background: url("/static/assets/flash-choice/icon-sound-on.svg") center / contain no-repeat;
}
.game-window[data-active-game="memory"] .music-switch::after,
.game-window[data-active-game="crossword"] .music-switch::after {
  display: none;
}
.game-window[data-active-game="memory"] .music-switch:has(input:not(:checked))::before,
.game-window[data-active-game="crossword"] .music-switch:has(input:not(:checked))::before {
  background-image: url("/static/assets/flash-choice/icon-sound-off.svg");
}
.game-window[data-active-game="memory"] #gameHelpButton::before,
.game-window[data-active-game="crossword"] #gameHelpButton::before {
  content: "?";
  color: #f4f8fb;
  font-size: 1.45rem;
  font-weight: 900;
}
.game-window[data-active-game="maze"] #gameStartButton,
.game-window[data-active-game="maze_trial"] #gameStartButton,
.game-window[data-active-game="arcane_explorer"] #gameStartButton,
.game-window[data-active-game="story"] #gameStartButton,
.game-window[data-active-game="puzzle"] #gameStartButton,
.game-window[data-active-game="taquin"] #gameStartButton,
.game-window[data-active-game="vases"] #gameStartButton,
.game-window[data-active-game="runner"] #gameStartButton {
  display: none;
}
.game-window[data-active-game="maze"] #gameCloseButton,
.game-window[data-active-game="maze_trial"] #gameCloseButton,
.game-window[data-active-game="maze"] #gameHelpButton,
.game-window[data-active-game="maze_trial"] #gameHelpButton,
.game-window[data-active-game="maze"] .music-switch,
.game-window[data-active-game="maze_trial"] .music-switch,
.game-window[data-active-game="story"] #gameCloseButton,
.game-window[data-active-game="story"] #gameHelpButton,
.game-window[data-active-game="story"] .music-switch,
.game-window[data-active-game="puzzle"] #gameCloseButton,
.game-window[data-active-game="puzzle"] #gameHelpButton,
.game-window[data-active-game="puzzle"] .music-switch,
.game-window[data-active-game="taquin"] #gameCloseButton,
.game-window[data-active-game="taquin"] #gameHelpButton,
.game-window[data-active-game="taquin"] .music-switch,
.game-window[data-active-game="vases"] #gameCloseButton,
.game-window[data-active-game="vases"] #gameHelpButton,
.game-window[data-active-game="vases"] .music-switch,
.game-window[data-active-game="runner"] #gameCloseButton,
.game-window[data-active-game="runner"] #gameHelpButton,
.game-window[data-active-game="runner"] .music-switch {
  display: grid;
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}
.game-window[data-active-game="maze"] #gameCloseButton,
.game-window[data-active-game="maze_trial"] #gameCloseButton,
.game-window[data-active-game="story"] #gameCloseButton,
.game-window[data-active-game="puzzle"] #gameCloseButton,
.game-window[data-active-game="taquin"] #gameCloseButton,
.game-window[data-active-game="vases"] #gameCloseButton,
.game-window[data-active-game="runner"] #gameCloseButton {
  background: rgba(255,255,255,.06);
}
.game-window[data-active-game="maze"] #gameCloseButton::before,
.game-window[data-active-game="maze"] #gameCloseButton::after,
.game-window[data-active-game="maze_trial"] #gameCloseButton::before,
.game-window[data-active-game="maze_trial"] #gameCloseButton::after,
.game-window[data-active-game="story"] #gameCloseButton::before,
.game-window[data-active-game="story"] #gameCloseButton::after,
.game-window[data-active-game="puzzle"] #gameCloseButton::before,
.game-window[data-active-game="puzzle"] #gameCloseButton::after,
.game-window[data-active-game="taquin"] #gameCloseButton::before,
.game-window[data-active-game="taquin"] #gameCloseButton::after,
.game-window[data-active-game="vases"] #gameCloseButton::before,
.game-window[data-active-game="vases"] #gameCloseButton::after,
.game-window[data-active-game="runner"] #gameCloseButton::before,
.game-window[data-active-game="runner"] #gameCloseButton::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  top: 20px;
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #f4f8fb;
}
.game-window[data-active-game="maze"] #gameCloseButton::before,
.game-window[data-active-game="maze_trial"] #gameCloseButton::before,
.game-window[data-active-game="story"] #gameCloseButton::before,
.game-window[data-active-game="puzzle"] #gameCloseButton::before,
.game-window[data-active-game="taquin"] #gameCloseButton::before,
.game-window[data-active-game="vases"] #gameCloseButton::before,
.game-window[data-active-game="runner"] #gameCloseButton::before { transform: rotate(45deg); }
.game-window[data-active-game="maze"] #gameCloseButton::after,
.game-window[data-active-game="maze_trial"] #gameCloseButton::after,
.game-window[data-active-game="story"] #gameCloseButton::after,
.game-window[data-active-game="puzzle"] #gameCloseButton::after,
.game-window[data-active-game="taquin"] #gameCloseButton::after,
.game-window[data-active-game="vases"] #gameCloseButton::after,
.game-window[data-active-game="runner"] #gameCloseButton::after { transform: rotate(-45deg); }
.game-window[data-active-game="maze"] .music-switch span,
.game-window[data-active-game="maze_trial"] .music-switch span,
.game-window[data-active-game="story"] .music-switch span,
.game-window[data-active-game="puzzle"] .music-switch span,
.game-window[data-active-game="taquin"] .music-switch span,
.game-window[data-active-game="vases"] .music-switch span,
.game-window[data-active-game="runner"] .music-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.game-window[data-active-game="maze"] .music-switch input,
.game-window[data-active-game="maze_trial"] .music-switch input,
.game-window[data-active-game="story"] .music-switch input,
.game-window[data-active-game="puzzle"] .music-switch input,
.game-window[data-active-game="taquin"] .music-switch input,
.game-window[data-active-game="vases"] .music-switch input,
.game-window[data-active-game="runner"] .music-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.game-window[data-active-game="maze"] .music-switch::before,
.game-window[data-active-game="maze_trial"] .music-switch::before,
.game-window[data-active-game="story"] .music-switch::before,
.game-window[data-active-game="puzzle"] .music-switch::before,
.game-window[data-active-game="taquin"] .music-switch::before,
.game-window[data-active-game="vases"] .music-switch::before,
.game-window[data-active-game="runner"] .music-switch::before {
  content: "";
  width: 25px;
  height: 25px;
  background: url("/static/assets/flash-choice/icon-sound-on.svg") center / contain no-repeat;
}
.game-window[data-active-game="maze"] .music-switch::after,
.game-window[data-active-game="maze_trial"] .music-switch::after,
.game-window[data-active-game="story"] .music-switch::after,
.game-window[data-active-game="puzzle"] .music-switch::after,
.game-window[data-active-game="taquin"] .music-switch::after,
.game-window[data-active-game="vases"] .music-switch::after,
.game-window[data-active-game="runner"] .music-switch::after {
  display: none;
}
.game-window[data-active-game="maze"] .music-switch:has(input:not(:checked))::before,
.game-window[data-active-game="maze_trial"] .music-switch:has(input:not(:checked))::before,
.game-window[data-active-game="story"] .music-switch:has(input:not(:checked))::before,
.game-window[data-active-game="puzzle"] .music-switch:has(input:not(:checked))::before,
.game-window[data-active-game="taquin"] .music-switch:has(input:not(:checked))::before,
.game-window[data-active-game="vases"] .music-switch:has(input:not(:checked))::before,
.game-window[data-active-game="runner"] .music-switch:has(input:not(:checked))::before {
  background-image: url("/static/assets/flash-choice/icon-sound-off.svg");
}
.game-window[data-active-game="maze"] #gameHelpButton::before,
.game-window[data-active-game="maze_trial"] #gameHelpButton::before,
.game-window[data-active-game="story"] #gameHelpButton::before,
.game-window[data-active-game="puzzle"] #gameHelpButton::before,
.game-window[data-active-game="taquin"] #gameHelpButton::before,
.game-window[data-active-game="vases"] #gameHelpButton::before,
.game-window[data-active-game="runner"] #gameHelpButton::before {
  content: "?";
  color: #f4f8fb;
  font-size: 1.45rem;
  font-weight: 900;
}
.game-window .game-stage {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.game-window-shell .verb-success-feedback {
  --success-accent: #f4c766;
  --success-rgb: 244, 199, 102;
  position: absolute;
  top: 126px;
  right: 18px;
  z-index: 35;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(260px, calc(100% - 36px));
  border: 1px solid rgba(var(--success-rgb), .48);
  border-radius: 8px;
  padding: 7px 10px 7px 7px;
  pointer-events: none;
  color: #fffdf8;
  background:
    radial-gradient(circle at 18% 20%, rgba(var(--success-rgb), .24), transparent 56%),
    linear-gradient(180deg, rgba(8, 13, 29, .92), rgba(4, 10, 20, .82));
  box-shadow: 0 18px 42px rgba(0,0,0,.34), 0 0 22px rgba(var(--success-rgb), .18);
  transform-origin: 92% 0%;
  animation: verbSuccessFloat .98s cubic-bezier(.2, .8, .2, 1) both;
}
.game-moment-feedback {
  position: absolute;
  top: 78px;
  left: 50%;
  z-index: 36;
  display: grid;
  min-width: min(240px, calc(100% - 32px));
  border: 1px solid rgba(143,222,208,.44);
  border-radius: 999px;
  padding: 7px 14px;
  pointer-events: none;
  color: #fffdf8;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(143,222,208,.22), transparent 58%),
    rgba(5, 13, 24, .88);
  box-shadow: 0 18px 38px rgba(0,0,0,.26), 0 0 18px rgba(143,222,208,.16);
  transform: translateX(-50%);
  animation: gameMomentFloat .95s ease both;
}
.game-moment-feedback.progress {
  border-color: rgba(244,199,102,.46);
  background:
    radial-gradient(circle at 50% 0%, rgba(244,199,102,.22), transparent 58%),
    rgba(5, 13, 24, .88);
  animation-duration: 1.15s;
}
.game-moment-feedback span {
  color: #8fded0;
  font-size: .66rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}
.game-moment-feedback.progress span {
  color: #f4c766;
}
.game-moment-feedback strong {
  overflow: hidden;
  font-size: .82rem;
  font-weight: 950;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.verb-success-feedback.quiz { --success-accent: #f4c766; --success-rgb: 244, 199, 102; }
.verb-success-feedback.letter_lift { --success-accent: #7dd3fc; --success-rgb: 125, 211, 252; }
.verb-success-feedback.whac_mole { --success-accent: #f59e0b; --success-rgb: 245, 158, 11; }
.verb-success-feedback.balloons { --success-accent: #38bdf8; --success-rgb: 56, 189, 248; }
.verb-success-feedback.memory { --success-accent: #a78bfa; --success-rgb: 167, 139, 250; }
.verb-success-feedback.crossword { --success-accent: #e5e7eb; --success-rgb: 229, 231, 235; }
.verb-success-feedback.maze { --success-accent: #34d399; --success-rgb: 52, 211, 153; }
.verb-success-feedback.story { --success-accent: #f9a8d4; --success-rgb: 249, 168, 212; }
.verb-success-feedback.puzzle { --success-accent: #60a5fa; --success-rgb: 96, 165, 250; }
.verb-success-feedback.taquin { --success-accent: #c084fc; --success-rgb: 192, 132, 252; }
.verb-success-feedback.vases { --success-accent: #fb7185; --success-rgb: 251, 113, 133; }
.verb-success-feedback.runner { --success-accent: #5eead4; --success-rgb: 94, 234, 212; }
.verb-success-badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  color: #071123;
  background:
    radial-gradient(circle at 34% 26%, rgba(255,255,255,.86), transparent 34%),
    var(--success-accent);
  box-shadow: 0 0 18px rgba(var(--success-rgb), .34);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: 0;
}
.verb-success-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.verb-success-copy strong {
  overflow: hidden;
  color: #fffdf8;
  font-size: .84rem;
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.verb-success-copy small {
  overflow: hidden;
  color: rgba(255,255,255,.72);
  font-size: .64rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-stage[data-success-feedback="quiz"] { --stage-success-rgb: 244, 199, 102; }
.game-stage[data-success-feedback="letter_lift"] { --stage-success-rgb: 125, 211, 252; }
.game-stage[data-success-feedback="whac_mole"] { --stage-success-rgb: 245, 158, 11; }
.game-stage[data-success-feedback="balloons"] { --stage-success-rgb: 56, 189, 248; }
.game-stage[data-success-feedback="memory"] { --stage-success-rgb: 167, 139, 250; }
.game-stage[data-success-feedback="crossword"] { --stage-success-rgb: 229, 231, 235; }
.game-stage[data-success-feedback="maze"] { --stage-success-rgb: 52, 211, 153; }
.game-stage[data-success-feedback="story"] { --stage-success-rgb: 249, 168, 212; }
.game-stage[data-success-feedback="puzzle"] { --stage-success-rgb: 96, 165, 250; }
.game-stage[data-success-feedback="taquin"] { --stage-success-rgb: 192, 132, 252; }
.game-stage[data-success-feedback="vases"] { --stage-success-rgb: 251, 113, 133; }
.game-stage[data-success-feedback="runner"] { --stage-success-rgb: 94, 234, 212; }
.game-stage.verb-success-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 14;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(var(--stage-success-rgb, 244, 199, 102), .2), transparent 34%),
    linear-gradient(180deg, rgba(var(--stage-success-rgb, 244, 199, 102), .1), transparent 42%);
  animation: verbSuccessPulse .42s ease-out both;
}
@keyframes verbSuccessFloat {
  0% { opacity: 0; transform: translateY(10px) scale(.94); filter: saturate(1.1); }
  18% { opacity: 1; transform: translateY(0) scale(1); }
  70% { opacity: 1; transform: translateY(-4px) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(.98); filter: saturate(1); }
}
@keyframes verbSuccessPulse {
  0% { opacity: 0; transform: scale(.98); }
  34% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.025); }
}
@keyframes gameMomentFloat {
  0% { opacity: 0; transform: translate(-50%, -8px) scale(.96); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  72% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(.98); }
}
@media (max-width: 719px) {
  .game-window-shell .verb-success-feedback {
    top: 122px;
    right: 12px;
    grid-template-columns: 32px minmax(0, 1fr);
    width: min(210px, calc(100% - 24px));
    gap: 7px;
    padding: 6px 8px 6px 6px;
  }
  .verb-success-badge {
    width: 32px;
    height: 32px;
    font-size: .6rem;
  }
  .verb-success-copy strong {
    font-size: .78rem;
  }
  .verb-success-copy small {
    font-size: .58rem;
  }
  .game-moment-feedback {
    top: 72px;
    min-width: min(210px, calc(100% - 24px));
    padding: 6px 12px;
  }
  .game-moment-feedback strong {
    font-size: .76rem;
  }
}
.game-result-experience {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  width: min(760px, calc(100% - 24px));
  margin: auto;
  border: 1px solid rgba(244,199,102,.32);
  border-radius: 10px;
  padding: 18px;
  color: #fffdf8;
  background:
    radial-gradient(circle at 12% 0%, rgba(244,199,102,.2), transparent 42%),
    linear-gradient(180deg, rgba(7,17,35,.9), rgba(4,10,20,.86));
  box-shadow: 0 22px 54px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.05);
  overflow: hidden;
}
.game-result-experience.retry {
  border-color: rgba(239,71,111,.34);
}
.game-result-emblem {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid rgba(244,199,102,.5);
  border-radius: 50%;
  color: #07101a;
  background: radial-gradient(circle, #fff7c2 0 30%, #f4c766 32% 100%);
  font-size: 1.8rem;
  font-weight: 950;
  box-shadow: 0 0 24px rgba(244,199,102,.24);
}
.game-result-sparks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.game-result-sparks span {
  position: absolute;
  width: 7px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7b8, #f4c766 58%, transparent);
  opacity: 0;
  transform: rotate(24deg);
  animation: resultSparkRise 1.75s ease-in-out infinite;
}
.game-result-sparks span:nth-child(1) { left: 12%; bottom: -12px; animation-delay: 0s; }
.game-result-sparks span:nth-child(2) { left: 32%; bottom: -16px; animation-delay: .24s; }
.game-result-sparks span:nth-child(3) { right: 34%; bottom: -10px; animation-delay: .48s; }
.game-result-sparks span:nth-child(4) { right: 16%; bottom: -18px; animation-delay: .72s; }
.game-result-sparks span:nth-child(5) { left: 54%; bottom: -14px; animation-delay: .96s; }
.game-result-sparks.compact {
  z-index: 0;
}
.game-result-sparks.compact span {
  height: 26px;
  animation-duration: 2.2s;
}
.memory-end-summary,
.puzzle-result-card,
.taquin-result-card,
.story-end-page {
  position: relative;
  overflow: hidden;
}
.memory-end-summary > *:not(.game-result-sparks),
.puzzle-result-card > *:not(.game-result-sparks),
.taquin-result-card > *:not(.game-result-sparks),
.story-end-page > *:not(.game-result-sparks) {
  position: relative;
  z-index: 1;
}
@keyframes resultSparkRise {
  0% { opacity: 0; transform: translateY(20px) rotate(24deg) scaleY(.6); }
  22% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-120px) rotate(24deg) scaleY(1); }
}
.game-result-experience.retry .game-result-emblem {
  border-color: rgba(239,71,111,.5);
  background: radial-gradient(circle, #ffe5ec 0 30%, #fb7185 32% 100%);
}
.game-result-copy {
  display: grid;
  gap: 6px;
  align-content: start;
}
.game-result-copy span {
  color: #8fded0;
  font-size: .7rem;
  font-weight: 950;
  text-transform: uppercase;
}
.game-result-copy .stage-title {
  color: #fffdf8;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
}
.game-result-copy .stage-subtitle {
  color: rgba(217,227,234,.86);
  font-weight: 850;
}
.game-result-metrics {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.game-result-metrics div {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255,255,255,.055);
}
.game-result-metrics dt {
  color: #8fded0;
  font-size: .66rem;
  font-weight: 950;
  text-transform: uppercase;
}
.game-result-metrics dd {
  margin: 3px 0 0;
  color: #fff;
  font-weight: 950;
}
.game-result-experience .primary {
  grid-column: 1 / -1;
  justify-self: end;
}
.game-result-experience.arena-game-result {
  width: min(900px, calc(100% - 24px));
}
.arena-result-burst {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
}
.arena-result-burst span {
  border: 1px solid rgba(244,199,102,.38);
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff8df;
  background: linear-gradient(135deg, rgba(244,199,102,.2), rgba(143,222,208,.14));
  box-shadow: 0 0 18px rgba(244,199,102,.12);
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.game-result-experience.arena-game-result.won .game-result-emblem {
  animation: arenaResultPulse 1.6s ease-in-out infinite;
}
@keyframes arenaResultPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 24px rgba(244,199,102,.24);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 34px rgba(244,199,102,.42);
  }
}
.memory-victory-cinematic-moment {
  background:
    radial-gradient(circle at 50% 45%, rgba(244,199,102,.24), transparent 28%),
    radial-gradient(circle at 20% 18%, rgba(125,211,252,.2), transparent 26%),
    linear-gradient(135deg, #09071a, #081522 56%, #150926);
}
.memory-victory-cinematic-bg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.memory-victory-cinematic-bg::before {
  content: "";
  position: absolute;
  width: min(76vw, 680px);
  aspect-ratio: 1;
  border: 2px solid rgba(255,240,168,.46);
  border-radius: 50%;
  box-shadow:
    0 0 70px rgba(244,199,102,.24),
    inset 0 0 80px rgba(125,211,252,.16);
  animation: memoryCinematicRing 4.6s ease-in-out infinite;
}
.memory-victory-cinematic-card {
  position: absolute;
  left: 50%;
  top: 42%;
  width: clamp(96px, 17vw, 180px);
  aspect-ratio: 5 / 7;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 14px;
  box-shadow: 0 34px 70px rgba(2,6,23,.46), 0 0 34px rgba(255,255,255,.12);
  animation: memoryCinematicCardMatch 5.8s cubic-bezier(.16,.86,.24,1) both;
}
.memory-victory-cinematic-card.card-inf {
  --memory-card-start-x: -78vw;
  --memory-card-start-y: 24vh;
  --memory-card-land-x: -150px;
  --memory-card-land-y: 0px;
  --memory-card-rotate: -16deg;
  background: url("/static/assets/memory/memory-card-front-infinitive.webp") center / 100% 100% no-repeat;
}
.memory-victory-cinematic-card.card-past {
  --memory-card-start-x: 0vw;
  --memory-card-start-y: -72vh;
  --memory-card-land-x: 0px;
  --memory-card-land-y: -20px;
  --memory-card-rotate: 2deg;
  background: url("/static/assets/memory/memory-card-front-preterite.webp") center / 100% 100% no-repeat;
  animation-delay: .12s;
}
.memory-victory-cinematic-card.card-pp {
  --memory-card-start-x: 78vw;
  --memory-card-start-y: 24vh;
  --memory-card-land-x: 150px;
  --memory-card-land-y: 0px;
  --memory-card-rotate: 16deg;
  background: url("/static/assets/memory/memory-card-front-participle.webp") center / 100% 100% no-repeat;
  animation-delay: .24s;
}
.memory-victory-cinematic-match {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(54vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,240,168,.82), rgba(244,199,102,.18) 28%, transparent 58%),
    conic-gradient(from 0deg, transparent, rgba(125,211,252,.6), transparent, rgba(196,181,253,.68), transparent);
  box-shadow: 0 0 80px rgba(244,199,102,.36);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.35);
  animation: memoryCinematicMatchFlash 5.8s ease both;
}
.memory-victory-cinematic-orbit {
  position: absolute;
  width: min(78vw, 700px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,240,168,.9) 0 5px, transparent 6px),
    radial-gradient(circle at 100% 50%, rgba(125,211,252,.82) 0 4px, transparent 5px),
    radial-gradient(circle at 50% 100%, rgba(196,181,253,.86) 0 5px, transparent 6px),
    radial-gradient(circle at 0% 50%, rgba(134,239,172,.82) 0 4px, transparent 5px);
  animation: memoryCinematicOrbit 5.4s linear infinite;
}
.memory-victory-cinematic-orbit.orbit-b {
  width: min(58vw, 520px);
  animation-duration: 3.8s;
  animation-direction: reverse;
  opacity: .72;
}
.memory-victory-cinematic-copy {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(820px, calc(100vw - 32px));
  padding: clamp(18px, 4vw, 42px);
  color: #fffdf8;
  text-align: center;
  text-shadow: 0 8px 24px rgba(0,0,0,.48);
  animation: memoryCinematicCopyReveal 5.8s ease both;
}
.memory-victory-cinematic-copy > span {
  color: #ffd166;
  font-size: clamp(.82rem, 1.6vw, 1.08rem);
  font-weight: 950;
  text-transform: uppercase;
}
.memory-victory-cinematic-copy strong {
  font-size: clamp(2.4rem, 8vw, 6rem);
  line-height: .9;
}
.memory-victory-cinematic-copy small {
  color: rgba(255,255,255,.84);
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  font-weight: 850;
}
.memory-victory-cinematic-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.memory-victory-cinematic-metrics b,
.memory-victory-cinematic-metrics em {
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(3,9,17,.54);
  box-shadow: 0 12px 28px rgba(2,6,23,.28);
  color: #fffdf8;
  font-style: normal;
  font-weight: 950;
}
.memory-victory-cinematic-metrics b {
  background: linear-gradient(135deg, #fff0a8, #f4c766 60%, #b9822f);
  color: #301507;
}
@keyframes memoryCinematicCardMatch {
  0% {
    opacity: 0;
    filter: brightness(.72) saturate(.8);
    transform: translate(calc(-50% + var(--memory-card-start-x)), calc(-50% + var(--memory-card-start-y))) rotate(calc(var(--memory-card-rotate) * 2.2)) scale(.66);
  }
  16% {
    opacity: 1;
  }
  45% {
    opacity: 1;
    filter: brightness(1.08) saturate(1.05);
    transform: translate(calc(-50% + var(--memory-card-land-x)), calc(-50% + var(--memory-card-land-y))) rotate(var(--memory-card-rotate)) scale(1);
  }
  58% {
    opacity: 1;
    filter: brightness(1.34) saturate(1.16);
    transform: translate(-50%, -50%) rotate(0deg) scale(1.06);
  }
  74% {
    opacity: 1;
    transform: translate(calc(-50% + var(--memory-card-land-x)), calc(-50% + var(--memory-card-land-y))) rotate(var(--memory-card-rotate)) scale(.96);
  }
  100% {
    opacity: .82;
    filter: brightness(1.1) saturate(1.08);
    transform: translate(calc(-50% + var(--memory-card-land-x)), calc(-50% + var(--memory-card-land-y) - 12px)) rotate(var(--memory-card-rotate)) scale(.94);
  }
}
@keyframes memoryCinematicMatchFlash {
  0%, 48% { opacity: 0; transform: translate(-50%, -50%) scale(.28) rotate(0deg); }
  58% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(90deg); }
  78% { opacity: .34; transform: translate(-50%, -50%) scale(1.34) rotate(180deg); }
  100% { opacity: .18; transform: translate(-50%, -50%) scale(1.55) rotate(270deg); }
}
@keyframes memoryCinematicCopyReveal {
  0%, 48% { opacity: 0; transform: translateY(28px) scale(.96); }
  62% { opacity: 1; transform: translateY(0) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes memoryCinematicRing {
  0%, 100% { opacity: .62; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.04); }
}
@keyframes memoryCinematicOrbit {
  to { transform: rotate(360deg); }
}
.maze-victory-cinematic-moment {
  background:
    radial-gradient(circle at 50% 44%, rgba(255,240,168,.2), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(96,211,148,.18), transparent 42%),
    linear-gradient(180deg, #020617, #07111f 54%, #120915);
}
.maze-victory-cinematic-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 920px;
}
.maze-victory-corridor {
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: min(68vw, 620px);
  height: 118vh;
  border: 2px solid rgba(244,199,102,.24);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, transparent 2px 62px),
    linear-gradient(180deg, rgba(45,30,18,.58), rgba(8,13,24,.12));
  box-shadow: inset 0 0 70px rgba(0,0,0,.34);
  transform-origin: 50% 100%;
  animation: mazeCorridorOpen 6.6s cubic-bezier(.18,.84,.22,1) both;
}
.maze-victory-corridor.corridor-a {
  transform: translateX(-96%) rotateY(58deg);
}
.maze-victory-corridor.corridor-b {
  transform: translateX(-4%) rotateY(-58deg);
}
.maze-victory-gate {
  position: absolute;
  left: 50%;
  top: 45%;
  width: min(54vw, 480px);
  height: min(46vh, 390px);
  border: 7px solid rgba(244,199,102,.82);
  border-bottom: 0;
  border-radius: 48% 48% 0 0;
  box-shadow:
    0 0 38px rgba(244,199,102,.42),
    inset 0 0 50px rgba(255,255,255,.18);
  transform: translate(-50%, -50%) scale(.68);
  animation: mazeGateReveal 6.6s ease both;
}
.maze-victory-light {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(72vw, 650px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,251,214,.98), rgba(244,199,102,.42) 28%, rgba(96,211,148,.18) 50%, transparent 72%);
  box-shadow: 0 0 120px rgba(244,199,102,.44);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.22);
  animation: mazeExitLight 6.6s ease both;
}
.maze-victory-runner {
  position: absolute;
  left: 50%;
  bottom: 11%;
  width: 32px;
  height: 52px;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, #7dd3fc, #2563eb 62%, #0f172a);
  box-shadow: 0 20px 34px rgba(0,0,0,.48), 0 0 24px rgba(125,211,252,.52);
  transform: translateX(-50%) scale(.72);
  animation: mazeRunnerExit 6.6s cubic-bezier(.16,.86,.24,1) both;
}
.maze-victory-runner::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -16px;
  width: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffe3b0;
  transform: translateX(-50%);
}
.maze-victory-orb {
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7bd, #60d394 58%, transparent 72%);
  box-shadow: 0 0 24px rgba(96,211,148,.82);
  animation: mazeOrbRise 6.6s ease-in-out both;
}
.maze-victory-orb.orb-a { left: 22%; bottom: 12%; animation-delay: .18s; }
.maze-victory-orb.orb-b { left: 72%; bottom: 18%; animation-delay: .38s; }
.maze-victory-orb.orb-c { left: 50%; bottom: 8%; animation-delay: .62s; }
.maze-victory-cinematic-copy {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(840px, calc(100vw - 32px));
  padding: clamp(18px, 4vw, 42px);
  color: #fffdf8;
  text-align: center;
  text-shadow: 0 8px 24px rgba(0,0,0,.54);
  animation: mazeCinematicCopyReveal 6.6s ease both;
}
.maze-victory-cinematic-copy > span {
  color: #7dd3fc;
  font-size: clamp(.82rem, 1.6vw, 1.08rem);
  font-weight: 950;
  text-transform: uppercase;
}
.maze-victory-cinematic-copy strong {
  font-size: clamp(2.35rem, 8vw, 5.8rem);
  line-height: .9;
}
.maze-victory-cinematic-copy small {
  color: rgba(255,255,255,.86);
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  font-weight: 850;
}
.maze-victory-cinematic-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.maze-victory-cinematic-metrics b,
.maze-victory-cinematic-metrics em {
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(3,9,17,.56);
  box-shadow: 0 12px 28px rgba(2,6,23,.28);
  color: #fffdf8;
  font-style: normal;
  font-weight: 950;
}
.maze-victory-cinematic-metrics b {
  background: linear-gradient(135deg, #d9f99d, #60d394 60%, #16a34a);
  color: #04210f;
}
@keyframes mazeCorridorOpen {
  0% { opacity: .32; filter: brightness(.7); }
  38% { opacity: .76; filter: brightness(1); }
  100% { opacity: .38; filter: brightness(1.18); }
}
@keyframes mazeGateReveal {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.42); }
  34% { opacity: 1; transform: translate(-50%, -50%) scale(.7); }
  66% { opacity: 1; transform: translate(-50%, -50%) scale(.92); }
  100% { opacity: .42; transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes mazeExitLight {
  0%, 32% { opacity: 0; transform: translate(-50%, -50%) scale(.22); }
  58% { opacity: .88; transform: translate(-50%, -50%) scale(.78); }
  100% { opacity: .7; transform: translate(-50%, -50%) scale(1.18); }
}
@keyframes mazeRunnerExit {
  0% { opacity: 0; transform: translate(-50%, 44px) scale(.6); }
  18% { opacity: 1; }
  62% { opacity: 1; transform: translate(-50%, -12vh) scale(.9); }
  100% { opacity: 0; transform: translate(-50%, -26vh) scale(.28); }
}
@keyframes mazeOrbRise {
  0% { opacity: 0; transform: translateY(50px) scale(.5); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-56vh) scale(1.25); }
}
@keyframes mazeCinematicCopyReveal {
  0%, 42% { opacity: 0; transform: translateY(30px) scale(.96); }
  58% { opacity: 1; transform: translateY(0) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .flash-choice-cinematic-moment,
  .arena-waiting-cinematic,
  .arena-matchmaking-orbit,
  .game-moment-feedback,
  .game-result-sparks {
    display: none;
  }
}
.quest-result-summary {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  border: 1px solid rgba(244,199,102,.32);
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(244,199,102,.18), transparent 40%),
    rgba(4, 12, 24, .78);
  color: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.quest-result-summary.retry {
  border-color: rgba(239,71,111,.34);
}
.quest-result-summary header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.quest-result-summary header span,
.quest-result-summary dt {
  color: #8fded0;
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-result-summary header strong {
  color: #fffdf8;
  font-size: 1.05rem;
  font-weight: 950;
}
.quest-result-summary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
.quest-result-summary dl div {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255,255,255,.055);
}
.quest-result-summary dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-weight: 950;
}
.quest-result-summary p {
  margin: 0;
  color: rgba(217,227,234,.76);
  font-size: .82rem;
  font-weight: 850;
}
.quest-result-path {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255,255,255,.045);
}
.quest-result-path > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px;
}
.quest-result-path span {
  color: #8fded0;
  font-size: .66rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quest-result-path strong {
  color: #f4c766;
  font-weight: 950;
}
.quest-result-path small {
  grid-column: 1 / -1;
  color: rgba(217,227,234,.74);
  font-weight: 850;
}
.quest-result-campaign-bar {
  --quest-result-progress: 0%;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.quest-result-campaign-bar span {
  display: block;
  width: var(--quest-result-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4c766, #65dcc8);
}
.quest-result-nudge {
  color: #fffdf8;
}
.quest-result-toast {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  width: min(420px, calc(100% - 56px));
  pointer-events: auto;
}
.vocab-game-window .vocab-game-stage {
  padding: 0;
}
.vocab-game-window {
  padding: 10px;
}
.vocab-game-window .game-window-shell {
  gap: 8px;
  padding: 10px;
}
.vocab-game-window .game-window-toolbar {
  min-height: 58px;
  padding: 7px 12px;
}
.vocab-game-window .game-window-toolbar .eyebrow {
  margin: 0 0 2px;
  font-size: .68rem;
}
.vocab-game-window .game-window-toolbar h2 {
  font-size: clamp(1.55rem, 2.7vw, 2.65rem);
}
.vocab-game-window .game-window-hud {
  gap: 8px;
}
.vocab-game-window .game-window-hud span {
  min-height: 38px;
}
.vocab-game-window .vocab-session {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 8px;
}
.vocab-game-window .vocab-debug-panel {
  position: absolute;
  left: 14px;
  right: 336px;
  bottom: 18px;
  z-index: 85;
  max-height: 32%;
  overflow: auto;
}
.vocab-game-window .vocab-debug-panel > div {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.vocab-game-window .vocab-session-head {
  display: none;
}
.vocab-game-window .vocab-prompt {
  min-height: 46px;
  border-color: rgba(255,255,255,.22);
  padding: 8px 12px;
  background: rgba(255,255,255,.92);
}
.vocab-game-window .vocab-prompt strong {
  font-size: clamp(1rem, 1.55vw, 1.35rem);
}
.vocab-game-window .vocab-prompt span {
  font-size: clamp(.82rem, 1vw, .95rem);
}
.vocab-game-window .vocab-game-layout {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 310px);
  align-items: stretch;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}
.vocab-game-window .vocab-scene-viewport {
  height: 100%;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.28);
  background: #071123;
}
.vocab-game-window .vocab-scene {
  aspect-ratio: 1672 / 941;
  min-height: 0;
  width: calc(100% * var(--vocab-zoom, 1));
  height: auto;
  min-width: 100%;
  border: 0;
  border-radius: 0;
}
.vocab-game-window .vocab-word-tray,
.vocab-game-window .vocab-choice-list {
  min-height: 0;
  height: 100%;
  padding: 12px;
  overflow: hidden;
}
.vocab-game-window .vocab-label-panel,
.vocab-game-window .vocab-restore-panel,
.vocab-game-window .vocab-sound-panel {
  overflow: auto;
}
.vocab-game-window .vocab-word-tray strong {
  font-size: clamp(2rem, 3.4vw, 3.2rem);
}
.vocab-game-window .vocab-label-panel {
  grid-template-rows: auto minmax(96px, 1fr) auto minmax(70px, .62fr);
  align-content: stretch;
  overflow: hidden;
}
.vocab-game-window .vocab-label-list,
.vocab-game-window .vocab-placed-list {
  min-height: 0;
  overflow: auto;
}
.vocab-game-window .vocab-label-chip {
  min-height: 42px;
  padding: 7px 9px;
}
.vocab-game-window .vocab-label-panel .vocab-label-chip strong,
.vocab-game-window .vocab-label-panel .vocab-placed-list strong {
  font-size: clamp(.82rem, .94vw, 1rem);
  line-height: 1.05;
}
.vocab-game-window .vocab-label-panel .vocab-label-chip small,
.vocab-game-window .vocab-label-panel > small {
  font-size: clamp(.68rem, .74vw, .8rem);
}
.vocab-game-window .vocab-label-panel .vocab-placed-list {
  padding-top: 8px;
}
.vocab-game-window .vocab-label-panel .vocab-placed-list strong {
  padding: 5px 8px;
}
.game-window .scene-frame {
  min-height: 100%;
}
.game-window .lift-scene {
  height: 100%;
  min-height: 0;
}
.game-window .scene-content {
  min-height: 100%;
}
.game-window .start-scene {
  height: 100%;
  min-height: 0;
}
.game-window .start-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.game-window .start-scene .scene-titlebar {
  min-height: 44px;
  padding: 7px 12px;
}
.game-window .start-scene .start-screen {
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-items: center;
  gap: 18px;
  height: 100%;
  min-height: 0;
  padding: clamp(18px, 4vh, 44px) 16px;
}
.game-window .start-scene .story-start-screen {
  grid-template-columns: minmax(220px, min(32vw, 300px)) minmax(280px, 520px);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "book title"
    "book subtitle"
    "book action";
  align-content: center;
  align-items: center;
  justify-content: center;
  justify-items: start;
  gap: 14px 32px;
  overflow-x: hidden;
  overflow-y: auto;
}
.game-window .start-scene .story-start-screen .story-closed-book {
  grid-area: book;
  width: min(300px, 32vw, 42vh);
  align-self: center;
  justify-self: center;
}
.game-window .start-scene .story-start-screen .stage-title {
  grid-area: title;
  text-align: left;
}
.game-window .start-scene .story-start-screen .stage-subtitle {
  grid-area: subtitle;
  text-align: left;
}
.game-window .start-scene .story-start-screen .big-start {
  grid-area: action;
}
.game-window .start-scene .stage-title {
  margin: 0;
  font-size: clamp(2.2rem, 4.2vw, 4.35rem);
}
.game-window .start-scene .stage-subtitle {
  margin: 0;
  max-width: 660px;
}
.game-window .start-scene .big-start {
  min-height: 56px;
}
.game-window .story-scene {
  height: 100%;
  min-height: 0;
}
.game-window .story-scene .scene-content {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}
.game-window .story-scene .story-cue-rack {
  max-height: 126px;
  overflow: auto;
  padding-right: 2px;
}
.game-window .story-scene .story-book {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.game-window .story-scene .story-book-spread {
  min-height: 0;
  height: auto;
}
.game-window .story-scene .story-book:not(.story-summary) .story-book-spread {
  grid-template-columns: minmax(0, 1fr);
}
.game-window .story-scene .story-book:not(.story-summary) .story-book-spread::before {
  display: none;
}
.game-window .story-scene .story-book:not(.story-summary) .story-single-page {
  min-height: 0;
}
.game-window .story-scene .story-book:not(.story-summary) .story-page-illustration {
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.game-window .story-scene .story-book:not(.story-summary) .story-visual-panel {
  width: 100%;
  min-height: 0;
  overflow: hidden;
}
.game-window .story-scene .story-book:not(.story-summary) .story-visual-frame {
  height: auto;
  aspect-ratio: 1 / 1;
  min-height: 0;
  max-height: 100%;
  border-width: 6px;
}
.game-window .story-scene .story-book:not(.story-summary) .story-visual-copy {
  display: none;
}
.game-window .story-scene .story-book:not(.story-summary) .story-cues {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  min-height: 0;
  overflow: auto;
  gap: 6px;
  padding: 8px;
}
.game-window .story-scene .story-book:not(.story-summary) .story-cues span {
  min-height: 30px;
  padding: 5px 7px;
  font-size: .9rem;
  line-height: 1.15;
}
.game-window .puzzle-scene {
  height: 100%;
  min-height: 0;
}
.game-window .puzzle-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.game-window .puzzle-scene .puzzle-wrap {
  min-height: 0;
  align-items: center;
}
.game-window .puzzle-scene .puzzle-board {
  width: min(62vh, 620px, 100%);
  justify-self: center;
}
.game-window .puzzle-end-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
}
.game-window .puzzle-end-scene .puzzle-end-wrap {
  min-height: 0;
}
.game-window .taquin-scene {
  height: 100%;
  min-height: 0;
}
.game-window .taquin-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.game-window .taquin-scene .taquin-wrap,
.game-window .taquin-scene .taquin-end-wrap {
  min-height: 0;
  align-items: center;
}
.game-window .taquin-scene .taquin-board {
  width: min(52vh, 520px, 100%);
  justify-self: center;
}
.game-window .runner-scene {
  height: 100%;
  min-height: 0;
}
.game-window .runner-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.game-window .runner-scene .stimulus-card {
  min-height: 0;
  width: min(520px, 100%);
  padding: 8px 14px;
}
.game-window .runner-scene .runner-bottom-prompt .stimulus-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  width: min(520px, 100%);
  padding: 8px 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
}
.game-window .runner-scene .runner-bottom-prompt .stimulus-card .eyebrow {
  margin: 0;
  font-size: .68rem;
  line-height: 1;
  white-space: nowrap;
}
.game-window .runner-scene .runner-bottom-prompt .stimulus-card .stage-title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: .95;
}
.game-window .runner-scene .runner-bottom-prompt .stimulus-card .stage-subtitle {
  margin: 0;
  font-size: .8rem;
}
.game-window .runner-scene .runner-bottom-prompt .verb-video-shell {
  width: min(520px, 100%);
  height: 88px;
  min-height: 0;
}
.game-window .runner-scene .runner-bottom-prompt .verb-video-canvas {
  height: 100%;
}
.game-window .runner-scene .runner-play,
.game-window .runner-scene .runner-grid {
  height: 100%;
}
.game-window .runner-scene .runner-lane {
  min-height: 0;
}
.game-window .lift-scene .scene-content {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 10px;
  height: 100%;
}
.game-window .phaser-lift-scene .scene-content {
  padding: 0;
}
.game-window .phaser-lift-scene #phaserLetterLiftRoot {
  height: 100%;
  min-height: 0;
}
.game-window .memory-scene {
  height: 100%;
  min-height: 0;
}
.game-window .memory-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.game-window .memory-scene .scene-titlebar {
  min-height: 44px;
  padding: 7px 12px;
}
.game-window .memory-scene .memory-table {
  height: 100%;
}
.game-window .memory-scene .memory-grid {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
}
.game-window .memory-scene .memory-card {
  min-height: 82px;
}
.game-window .mole-scene {
  height: 100%;
  min-height: 0;
}
.game-window .mole-scene .scene-content {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
}
.game-window .mole-scene .scene-titlebar {
  min-height: 44px;
  padding: 7px 12px;
}
.game-window .mole-scene .stimulus-card {
  min-height: 58px;
  width: min(620px, 100%);
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 12px;
}
.game-window .mole-scene .stimulus-card .eyebrow {
  margin: 0 0 2px;
  font-size: .68rem;
  line-height: 1;
}
.game-window .mole-scene .stimulus-card .stage-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.35vw, 2.05rem);
  line-height: .95;
}
.game-window .mole-scene .stimulus-card .stage-subtitle {
  margin: 0;
  font-size: .78rem;
  line-height: 1.1;
}
.game-window .mole-scene .verb-video-shell {
  width: min(460px, 100%);
  max-height: clamp(82px, 13vh, 132px);
  justify-self: start;
  border-radius: 10px;
}
.game-window .mole-scene .verb-video-canvas {
  height: clamp(82px, 13vh, 132px);
}
.game-window .mole-scene .mole-field {
  height: 100%;
  min-height: 360px;
}
.game-window .quiz-scene {
  height: 100%;
  min-height: 0;
}
.game-window .quiz-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.game-window .quiz-scene .scene-titlebar {
  min-height: 44px;
  padding: 7px 12px;
}
.game-window .quiz-scene .scene-titlebar strong {
  font-size: clamp(.9rem, 1.5vw, 1.1rem);
}
.game-window .quiz-scene .quiz-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.58fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.game-window .quiz-scene .quiz-stimulus {
  min-height: 0;
}
.game-window .quiz-scene .quiz-board-no-stimulus {
  grid-template-columns: minmax(0, 1fr);
}
.game-window .quiz-scene .quiz-board-no-stimulus .form-columns {
  grid-column: 1 / -1;
}
.game-window .quiz-scene .stimulus-card {
  display: grid;
  align-content: center;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 14px 18px;
}
.game-window .quiz-scene .stimulus-card .stage-title {
  font-size: clamp(2rem, 3vw, 3.25rem);
}
.game-window .quiz-scene .form-columns {
  min-height: 0;
  height: 100%;
  gap: 12px;
}
.game-window .quiz-scene .form-column {
  min-height: 0;
  height: 100%;
  padding: 12px;
}
.game-window .quiz-scene .form-column::before {
  inset: 48px 10px 10px;
}
.game-window .quiz-scene .form-column header {
  min-height: 40px;
}
.game-window .quiz-scene .floating-options {
  grid-template-rows: repeat(6, minmax(40px, 1fr));
  gap: 10px;
  height: calc(100% - 50px);
  min-height: 0;
  padding-top: 10px;
}
.game-window .quiz-scene .floating-option {
  min-height: 0;
  height: 100%;
  padding: 4px 12px;
  border-bottom-width: 4px;
}
.game-window .quiz-scene .floating-option span {
  font-size: clamp(.84rem, 1.15vw, 1rem);
}
.game-window .quiz-scene .floating-option:nth-child(2n),
.game-window .quiz-scene .floating-option:nth-child(3n) {
  transform: none;
}
.quiz-reference-nav {
  display: none;
}
.game-window[data-active-game="quiz"] .game-window-shell {
  background:
    linear-gradient(180deg, rgba(4, 10, 20, .04), rgba(4, 10, 20, .22)),
    url("/static/assets/flash-choice/arcade-play-bg.png") center / cover no-repeat;
}
.game-window[data-active-game="quiz"] .game-window-toolbar {
  border-color: rgba(160, 185, 210, .24);
  background: linear-gradient(180deg, rgba(9, 19, 34, .92), rgba(7, 13, 25, .82));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 16px 32px rgba(0,0,0,.26);
}
.game-window[data-active-game="quiz"] .game-window-toolbar .eyebrow {
  color: rgba(210, 222, 232, .72);
}
.game-window[data-active-game="quiz"] .game-window-hud {
  gap: 8px;
  border: 1px solid rgba(160, 185, 210, .22);
  border-radius: 8px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(13, 27, 47, .82), rgba(7, 16, 30, .9));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 14px 28px rgba(0,0,0,.2);
}
.game-window[data-active-game="quiz"] .game-window-hud span {
  position: relative;
  min-height: 46px;
  justify-items: start;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 5px 10px 5px 42px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  color: #f6fbff;
  box-shadow: none;
}
.game-window[data-active-game="quiz"] .game-window-hud small,
.game-window[data-active-game="quiz"] .game-window-hud strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-window[data-active-game="quiz"] .game-window-hud small {
  color: rgba(205, 217, 226, .76);
  font-size: .68rem;
  font-weight: 850;
  line-height: 1;
}
.game-window[data-active-game="quiz"] .game-window-hud strong {
  color: #f8fbff;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.05;
}
.game-window[data-active-game="quiz"] .game-window-hud span::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 26px;
  height: 26px;
  background: var(--quiz-hud-icon) center / contain no-repeat;
  transform: translateY(-50%);
}
.game-window[data-active-game="quiz"] #hudScore { --quiz-hud-icon: url("/static/assets/flash-choice/icon-star.png"); }
.game-window[data-active-game="quiz"] #hudTimer { --quiz-hud-icon: url("/static/assets/flash-choice/icon-timer.png"); }
.game-window[data-active-game="quiz"] #hudProgress { --quiz-hud-icon: url("/static/assets/flash-choice/icon-progress.png"); }
.game-window[data-active-game="quiz"] #hudErrors { --quiz-hud-icon: url("/static/assets/flash-choice/icon-errors-clean.svg"); }
.game-window .scene-frame.quiz-scene {
  background-color: transparent;
  background:
    radial-gradient(circle at 50% 82%, rgba(244, 198, 102, .10), transparent 26%),
    linear-gradient(180deg, rgba(5, 14, 27, .08), rgba(4, 10, 20, .20));
}
.game-window[data-active-game="quiz"] .game-stage {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.game-window[data-active-game="quiz"] .scene-frame {
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}
.game-window .start-scene {
  background: transparent;
}
.game-window .scene-frame.quiz-scene .scene-bg,
.game-window .start-scene .scene-bg {
  display: none;
}
.game-window .scene-frame.quiz-scene::after,
.game-window .start-scene::after {
  display: none;
}
.game-window .quiz-scene .scene-titlebar {
  border-color: rgba(244, 198, 102, .32);
  background: linear-gradient(180deg, rgba(9, 22, 39, .92), rgba(7, 15, 28, .9));
}
.game-window .quiz-scene .scene-titlebar span {
  color: #f8d573;
}
.game-window .quiz-scene .scene-titlebar strong {
  color: #80dfd0;
}
.game-window .quiz-scene .quiz-board.quiz-arcade-board {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}
.game-window .quiz-scene .quiz-board.quiz-arcade-board.quiz-board-no-stimulus {
  grid-template-rows: minmax(0, 1fr);
}
.game-window .quiz-scene .quiz-board.quiz-arcade-board .quiz-stimulus {
  min-height: 0;
}
.quiz-arcade-prompt {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 16px;
  min-height: 132px;
  border: 0;
  border-radius: 8px;
  padding: 34px 18px 20px;
  background:
    url("/static/assets/flash-choice/prompt-panel-frame.svg") center / 100% 100% no-repeat;
  box-shadow: 0 16px 34px rgba(0,0,0,.26);
  text-align: center;
}
.quiz-arcade-prompt img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.quiz-arcade-prompt p {
  position: relative;
  margin: 16px 0 0;
  padding: 0 52px;
  color: #c8d4dd;
  font-weight: 850;
}
.quiz-arcade-prompt p::before,
.quiz-arcade-prompt p::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f4c766);
}
.quiz-arcade-prompt p::before {
  left: 0;
}
.quiz-arcade-prompt p::after {
  right: 0;
  transform: scaleX(-1);
}
.quiz-arcade-prompt strong {
  position: relative;
  display: block;
  color: #f8fbff;
  font-size: clamp(2rem, 6vw, 4.1rem);
  line-height: 1;
}
.quiz-arcade-prompt strong::before,
.quiz-arcade-prompt strong::after {
  content: none;
}
.quiz-arcade-prompt .quiz-prefix {
  color: #f8fbff;
}
.quiz-arcade-prompt .quiz-verb {
  color: #80dfd0;
}
.game-window .start-scene .quiz-arcade-start {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: min(760px, calc(100dvh - 170px));
  border: 1px solid rgba(244, 198, 102, .36);
  border-radius: 8px;
  padding: 22px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 18px 42px rgba(0,0,0,.28);
}
.quiz-arcade-start-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.quiz-arcade-start-columns section {
  display: grid;
  justify-items: center;
  gap: 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 14px 10px;
  background: rgba(6, 18, 34, .76);
}
.quiz-arcade-start-columns section[data-column="infinitive"] {
  border-color: rgba(101, 220, 200, .58);
}
.quiz-arcade-start-columns section[data-column="preterite"] {
  border-color: rgba(91, 164, 255, .58);
}
.quiz-arcade-start-columns section[data-column="participle"] {
  border-color: rgba(190, 122, 246, .58);
}
.quiz-arcade-start-columns img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.quiz-arcade-start-columns strong {
  color: #eaf6fb;
  font-size: .86rem;
  text-align: center;
  text-transform: uppercase;
}
.quiz-arcade-start-columns span {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 9px 8px;
  color: #f8fbff;
  background: rgba(20, 39, 64, .82);
  font-size: .95rem;
  font-weight: 900;
  text-align: center;
}
.quiz-arcade-start-button {
  justify-self: center;
  color: #07101a;
  background: linear-gradient(180deg, #ffdd7d, #e8a12e);
}
.game-window .quiz-scene .quiz-arcade-board .form-columns {
  gap: 14px;
}
.game-window .quiz-scene .quiz-arcade-board .form-column {
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.025)),
    rgba(4, 13, 25, .68);
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="infinitive"] {
  border-color: rgba(101, 220, 200, .64);
  box-shadow: inset 0 0 0 1px rgba(101,220,200,.14), 0 16px 36px rgba(0,0,0,.24);
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="preterite"] {
  border-color: rgba(91, 164, 255, .62);
  box-shadow: inset 0 0 0 1px rgba(91,164,255,.14), 0 16px 36px rgba(0,0,0,.24);
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="participle"] {
  border-color: rgba(190, 122, 246, .62);
  box-shadow: inset 0 0 0 1px rgba(190,122,246,.14), 0 16px 36px rgba(0,0,0,.24);
}
.game-window .quiz-scene .quiz-arcade-board .form-column header {
  min-height: 78px;
  grid-template-rows: auto auto auto;
  gap: 6px;
  background: transparent;
  color: #eef7fb;
  font-size: .95rem;
}
.game-window .quiz-scene .quiz-arcade-board .form-column header::before {
  content: "";
  width: 42px;
  height: 42px;
  background: var(--quiz-column-icon) center / contain no-repeat;
}
.game-window .quiz-scene .quiz-arcade-board .form-column header::after {
  content: "";
  width: 72%;
  height: 9px;
  margin-top: 4px;
  background:
    radial-gradient(circle at 50% 50%, currentColor 0 2px, transparent 2.5px),
    linear-gradient(90deg, transparent, currentColor 34%, transparent 34% 66%, currentColor 66%, transparent);
  opacity: .46;
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="infinitive"] header {
  color: #80dfd0;
  --quiz-column-icon: url("/static/assets/flash-choice/icon-infinitive-clean.svg");
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="preterite"] header {
  color: #87bdff;
  --quiz-column-icon: url("/static/assets/flash-choice/icon-preterite-clean.svg");
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="participle"] header {
  color: #d889ff;
  --quiz-column-icon: url("/static/assets/flash-choice/icon-participle-clean.svg");
}
.game-window .quiz-scene .quiz-arcade-board .form-column::before {
  inset: 98px 12px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
}
.game-window .quiz-scene .quiz-arcade-board .floating-options {
  height: calc(100% - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-top: 10px;
}
.game-window .quiz-scene .quiz-arcade-board .floating-option {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.22);
  border-bottom: 3px solid rgba(0,0,0,.35);
  background:
    linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.04)),
    rgba(13, 31, 54, .86);
  color: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 10px 20px rgba(0,0,0,.22);
  animation: none;
}
.game-window .quiz-scene .quiz-arcade-board .floating-option span {
  color: var(--quiz-option-color, #f8fbff);
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="infinitive"] .floating-option {
  background:
    linear-gradient(180deg, rgba(128, 223, 208, .18), rgba(255,255,255,.035)),
    rgba(13, 31, 54, .82);
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="infinitive"] .floating-option span {
  --quiz-option-color: #b6fff1;
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="preterite"] .floating-option {
  background:
    linear-gradient(180deg, rgba(135, 189, 255, .18), rgba(255,255,255,.035)),
    rgba(13, 31, 54, .82);
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="preterite"] .floating-option span {
  --quiz-option-color: #c8ddff;
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="participle"] .floating-option {
  background:
    linear-gradient(180deg, rgba(216, 137, 255, .18), rgba(255,255,255,.035)),
    rgba(13, 31, 54, .82);
}
.game-window .quiz-scene .quiz-arcade-board .form-column[data-column="participle"] .floating-option span {
  --quiz-option-color: #efc6ff;
}
.game-window .quiz-scene .quiz-arcade-board .floating-option.correct {
  background: linear-gradient(180deg, rgba(117, 235, 195, .9), rgba(54, 179, 141, .86));
  color: #07101a;
}
.game-window .quiz-scene .quiz-arcade-board .floating-option.correct span {
  color: #07101a;
}
.game-window .quiz-scene .quiz-arcade-board .floating-option.wrong {
  background: linear-gradient(180deg, rgba(255, 111, 128, .92), rgba(178, 45, 62, .88));
}
.quiz-feedback {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 16px;
  background: rgba(3, 7, 18, .58);
  backdrop-filter: blur(8px);
  animation: quizFeedbackIn .18s ease both;
}
.quiz-feedback > div {
  display: grid;
  gap: 8px;
  min-width: min(420px, calc(100% - 36px));
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  background: linear-gradient(135deg, rgba(96,211,148,.92), rgba(24,183,167,.88));
  box-shadow: 0 24px 58px rgba(0,0,0,.34);
}
.quiz-feedback span {
  color: #06251d;
  font-size: .86rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quiz-feedback strong {
  color: white;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: .92;
  text-shadow: 0 4px 0 rgba(5,10,22,.2);
}
.quiz-feedback p {
  margin: 0;
  color: rgba(5,10,22,.72);
  font-weight: 950;
}
.quiz-feedback.quiz-round-recap > div {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  overflow: auto;
  background: rgba(5,10,22,.92);
  color: white;
}
.quiz-feedback.quiz-round-recap > div > span {
  color: #86efac;
}
.quiz-feedback.quiz-round-recap > div > strong {
  font-size: clamp(2rem, 5vw, 3.8rem);
}
.quiz-feedback.quiz-round-recap p {
  color: rgba(255,255,255,.82);
}
.quiz-feedback.quiz-round-recap :where(.quiz-answer-list) {
  grid-area: auto;
  overflow: visible;
}
.quiz-feedback.quiz-round-recap .quiz-answer-row span {
  color: #ffd166;
}
.quiz-feedback.quiz-round-recap .quiz-answer-row strong {
  color: white;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1;
  text-shadow: none;
}
.quiz-round-actions {
  display: flex;
  justify-content: center;
}
.quiz-end-scene {
  height: 100%;
  min-height: 0;
}
.quiz-end-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.quiz-end-game {
  display: grid;
  grid-template-columns: minmax(300px, .92fr) minmax(260px, .74fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
}
.quiz-end-card,
.quiz-end-visual {
  min-height: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 16px;
  background: rgba(5,10,22,.68);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 22px 46px rgba(0,0,0,.24);
}
.quiz-end-card {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(260px, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "eyebrow eyebrow"
    "title message"
    "title answers"
    "stats actions";
  align-content: stretch;
  align-items: start;
  gap: 12px 16px;
  overflow: auto;
  padding: clamp(14px, 2.2vw, 26px);
}
.quiz-end-card .eyebrow {
  grid-area: eyebrow;
  margin: 0;
}
.quiz-end-card h2 {
  grid-area: title;
  align-self: start;
  margin: 0;
  color: #fca5a5;
  font-size: clamp(2.4rem, 4.6vw, 5rem);
  line-height: .92;
}
.quiz-end-game.won .quiz-end-card h2 {
  color: #86efac;
}
.quiz-end-message {
  grid-area: message;
  align-self: end;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-weight: 900;
}
.quiz-answer-list {
  grid-area: answers;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}
.quiz-answer-row {
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(255,209,102,.18), rgba(58,134,255,.12));
}
.quiz-answer-row span {
  color: #ffd166;
  font-size: .82rem;
  font-weight: 950;
  text-transform: uppercase;
}
.quiz-answer-row strong {
  color: white;
  font-size: clamp(1.25rem, 2vw, 2rem);
}
.quiz-answer-row small {
  grid-column: 2;
  color: rgba(255,255,255,.74);
  font-size: .78rem;
  font-weight: 850;
}
.quiz-result-row {
  display: grid;
  grid-template-columns: 34px minmax(120px, .8fr) repeat(2, minmax(90px, .7fr));
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(96,211,148,.18), rgba(58,134,255,.12));
}
.quiz-result-row.wrong {
  background: linear-gradient(135deg, rgba(239,71,111,.22), rgba(251,113,133,.1));
}
.quiz-result-row.pending {
  background: linear-gradient(135deg, rgba(148,163,184,.18), rgba(255,255,255,.08));
}
.quiz-result-row span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: rgba(96,211,148,.92);
  color: #052e16;
  font-size: .78rem;
  font-weight: 950;
}
.quiz-result-row.wrong span {
  background: rgba(239,71,111,.95);
  color: white;
}
.quiz-result-row.pending span {
  background: rgba(148,163,184,.95);
  color: #0f172a;
}
.quiz-result-row strong,
.quiz-result-row em {
  min-width: 0;
  overflow-wrap: anywhere;
  color: white;
  font-style: normal;
  font-weight: 950;
}
.quiz-end-stats {
  grid-area: stats;
  align-self: end;
  display: grid;
  gap: 4px;
  color: rgba(255,255,255,.82);
  font-weight: 900;
}
.quiz-end-stats strong {
  color: white;
  font-size: 1.2rem;
}
.quiz-end-actions {
  grid-area: actions;
  display: flex;
  align-self: end;
  justify-self: end;
  gap: 10px;
  flex-wrap: wrap;
}
.quiz-end-visual {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(239,71,111,.22), transparent 11rem),
    linear-gradient(180deg, rgba(15,23,42,.72), rgba(3,7,18,.92));
}
.quiz-end-bubble {
  display: grid;
  width: min(220px, 45%);
  aspect-ratio: 1;
  place-items: center;
  border: 8px solid #ef476f;
  border-radius: 50%;
  background: rgba(239,71,111,.16);
  box-shadow: 0 0 42px rgba(239,71,111,.3);
  animation: quizBubblePulse 1s ease-in-out infinite alternate;
}
.quiz-end-bubble span {
  color: #fecaca;
  font-size: clamp(4rem, 11vw, 8rem);
  font-weight: 950;
  line-height: 1;
}
.quiz-end-visual strong {
  position: absolute;
  bottom: 18%;
  color: #ffd166;
  font-size: clamp(2rem, 5vw, 5rem);
  text-shadow: 0 5px 0 #020617;
}
@keyframes quizFeedbackIn {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes quizBubblePulse {
  from { transform: scale(.96); }
  to { transform: scale(1.04); }
}
.game-window .mole-end-scene {
  height: 100%;
  min-height: 0;
}
.game-window .mole-end-scene .scene-content {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.game-window .balloon-end-scene {
  height: 100%;
  min-height: 0;
}
.game-window .balloon-end-scene .scene-content {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.balloon-end-game {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(420px, 1fr);
  gap: 14px;
  min-height: 0;
  height: 100%;
  color: white;
}
.balloon-end-summary,
.balloon-end-list-panel {
  min-height: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(5,10,22,.78), rgba(15,23,42,.62)),
    radial-gradient(circle at 20% 12%, rgba(103,232,249,.24), transparent 14rem);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 22px 46px rgba(0,0,0,.24);
}
.balloon-end-summary {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 14px;
  overflow: auto;
  padding: clamp(16px, 2.1vw, 28px);
}
.balloon-end-summary .eyebrow {
  margin: 0;
  color: #ffd166;
}
.balloon-end-summary h2 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(2.4rem, 4.2vw, 5rem);
  line-height: .9;
  text-shadow: 0 5px 20px rgba(0,0,0,.28);
}
.balloon-end-summary p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-weight: 900;
}
.balloon-end-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: start;
}
.balloon-end-stats div {
  display: grid;
  gap: 4px;
  min-height: 82px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(103,232,249,.08));
}
.balloon-end-stats span {
  color: rgba(255,255,255,.7);
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.balloon-end-stats strong {
  color: white;
  font-size: clamp(1.35rem, 2vw, 2rem);
}
.balloon-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}
.balloon-end-results {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, .78fr);
  gap: 14px;
  min-height: 0;
}
.balloon-end-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.balloon-end-list-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: rgba(5,10,22,.42);
}
.balloon-end-list-panel header span,
.balloon-end-list-panel header strong {
  color: white;
  font-weight: 950;
}
.balloon-end-list-panel header span {
  color: #ffd166;
  text-transform: uppercase;
}
.balloon-end-list-panel.mistakes header span {
  color: #fca5a5;
}
.balloon-end-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}
.balloon-result-row {
  display: grid;
  grid-template-columns: minmax(160px, .72fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(96,211,148,.2), rgba(56,189,248,.12));
}
.balloon-result-row.wrong {
  background: linear-gradient(135deg, rgba(239,71,111,.24), rgba(251,113,133,.12));
}
.balloon-result-row div {
  display: grid;
  gap: 3px;
}
.balloon-result-row strong {
  color: white;
  font-size: 1.08rem;
}
.balloon-result-row span,
.balloon-result-row small {
  color: rgba(255,255,255,.78);
  font-weight: 900;
}
.balloon-end-empty {
  display: grid;
  min-height: 96px;
  place-items: center;
  border: 1px dashed rgba(255,255,255,.24);
  border-radius: 12px;
  color: rgba(255,255,255,.72);
  font-weight: 900;
}
.game-window .balloon-scene {
  height: 100%;
  min-height: 0;
}
.game-window .balloon-scene .scene-content {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 12px;
}
.game-window .balloon-scene .scene-titlebar {
  min-height: 44px;
  padding: 7px 12px;
}
.game-window .balloon-scene .balloon-play {
  grid-template-columns: minmax(180px, .24fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.game-window .balloon-scene .balloon-prompt {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  align-content: start;
  min-height: 0;
}
.game-window .balloon-scene .balloon-prompt .stimulus-card {
  min-height: 0;
  padding: 6px 10px;
}
.game-window .balloon-scene .balloon-prompt .stimulus-card .eyebrow {
  margin-bottom: 2px;
  font-size: .64rem;
  line-height: 1;
}
.game-window .balloon-scene .balloon-prompt .stimulus-card .stage-title {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: .95;
}
.game-window .balloon-scene .balloon-sky {
  height: 100%;
  min-height: 0;
}
.game-window .balloon-scene .balloon {
  width: var(--balloon-w, clamp(66px, 5vw, 92px));
  height: var(--balloon-h, clamp(84px, 6.4vw, 116px));
  padding: 8px;
  font-size: clamp(.68rem, .86vw, .88rem);
  overflow-wrap: anywhere;
}
.game-window .balloon-scene .balloon::after {
  bottom: -20px;
  height: 26px;
}
.game-window .lift-scene .scene-titlebar {
  min-height: 46px;
  padding: 7px 10px;
}
.game-window .lift-scene .scene-titlebar strong {
  font-size: .96rem;
}
.game-window .lift-scene .letter-arena,
.game-window .lift-scene .lift-dedicated,
.game-window .lift-scene .lift-split-game {
  min-height: 0;
}
.game-window .lift-scene .letter-board,
.game-window .lift-scene .lift-animation-panel,
.game-window .lift-scene .lift-canvas {
  height: 100%;
}
.game-window-open {
  overflow: hidden;
}
.start-screen {
  display: grid;
  place-items: center;
  min-height: 440px;
  text-align: center;
}
.start-screen .stage-title {
  color: white;
  text-shadow: 0 10px 30px rgba(0,0,0,.38);
}
.start-screen .stage-subtitle {
  color: rgba(255,255,255,.78);
}
.big-start {
  min-width: 220px;
  min-height: 64px;
  font-size: 1.25rem;
}
.game-profile-card {
  display: grid;
  gap: 10px;
  width: min(560px, 100%);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(3,7,18,.42);
  color: rgba(255,255,255,.82);
  text-align: left;
}
.game-profile-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.game-profile-card header span {
  color: #ffd166;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}
.game-profile-card header strong {
  display: block;
  color: white;
  font-size: 1.1rem;
  font-weight: 950;
}
.game-profile-card .game-mini-icon {
  width: 46px;
  height: 46px;
}
.game-profile-ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.game-profile-card p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: .82rem;
  line-height: 1.35;
}
.game-profile-card p strong {
  color: #fffdf8;
}

.form-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.form-column {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 16px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05)),
    rgba(5,10,22,.58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 20px 42px rgba(0,0,0,.2);
}
.form-column::before {
  content: "";
  position: absolute;
  inset: 52px 12px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(58,134,255,.16), rgba(24,183,167,.08)),
    repeating-linear-gradient(180deg, rgba(255,255,255,.08) 0 1px, transparent 1px 34px);
}
.form-column header {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffd166, #ef476f);
  color: #111827;
  font-weight: 950;
  text-transform: uppercase;
}
.form-column.solved header {
  background: linear-gradient(135deg, #60d394, #18b7a7);
}
.floating-options {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  padding-top: 16px;
}
.floating-option {
  min-height: 58px;
  border: 1px solid rgba(255,255,255,.42);
  border-bottom: 5px solid rgba(0,0,0,.24);
  border-radius: 999px;
  padding: 8px 14px;
  background:
    radial-gradient(circle at 25% 22%, rgba(255,255,255,.55), transparent 38px),
    linear-gradient(135deg, #fffdf8, #c7f9ff);
  color: #111827;
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
  animation: floatChoice 2.9s ease-in-out infinite;
  animation-delay: var(--float-delay);
}
.floating-option span {
  color: #111827;
  font-weight: 950;
}
.floating-option:nth-child(2n) {
  transform: translateX(10px);
}
.floating-option:nth-child(3n) {
  transform: translateX(-8px);
}
.floating-option.correct {
  background:
    radial-gradient(circle at 25% 22%, rgba(255,255,255,.6), transparent 38px),
    linear-gradient(135deg, #ecfff3, #60d394);
  animation: lockChoice .34s ease both;
}
.floating-option.wrong {
  background:
    radial-gradient(circle at 25% 22%, rgba(255,255,255,.48), transparent 38px),
    linear-gradient(135deg, #fff0f2, #ef476f);
  animation: shake .32s ease both;
}
.floating-option.dimmed {
  opacity: .24;
  filter: grayscale(.5);
}
@keyframes floatChoice {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
@keyframes lockChoice {
  50% { transform: scale(1.06); }
  100% { transform: scale(1.02); }
}

@media (max-width: 900px) {
  .game-window { padding: 8px; }
  .game-window-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .game-window-controls {
    justify-content: flex-start;
  }
  .form-columns {
    grid-template-columns: 1fr;
  }
  .form-column {
    min-height: 300px;
  }
  .game-window .quiz-scene .quiz-board {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .game-window .quiz-scene .stimulus-card {
    min-height: 108px;
    height: auto;
  }
  .game-window .quiz-scene .form-columns {
    grid-template-columns: 1fr;
  }
  .game-window .quiz-scene .form-column {
    min-height: 260px;
  }
  .game-window .quiz-end-game {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(180px, .55fr);
    overflow: auto;
  }
  .game-window .quiz-end-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "eyebrow"
      "title"
      "message"
      "answers"
      "stats"
      "actions";
  }
  .game-window .quiz-end-actions {
    justify-self: start;
  }
  .game-window .quiz-end-visual {
    min-height: 180px;
  }
}

/* Mobile foundation: keep the shared game engine, but let touch screens breathe. */
@media (hover: none) and (pointer: coarse) {
  button:hover {
    transform: none;
    box-shadow: none;
  }

  button,
  input,
  select,
  .button-link {
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    min-width: 0;
    overflow-x: hidden;
  }

  body {
    background-attachment: scroll;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px;
  }

  .brand-lockup {
    width: 100%;
    justify-content: space-between;
  }

  .brand-lockup img {
    width: 34px;
    height: 34px;
  }

  .brand-lockup span {
    min-width: 0;
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(86px, .75fr) minmax(0, 1fr) minmax(76px, .72fr);
    gap: 8px;
    width: 100%;
  }

  .top-actions select,
  .top-actions form,
  .top-actions button,
  .account-pill {
    width: 100%;
    min-width: 0;
  }

  .account-pill {
    overflow: hidden;
    padding-inline: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px;
  }

  .side-nav {
    position: sticky;
    top: 0;
    z-index: 9;
    display: flex;
    height: auto;
    margin: 0 -10px;
    padding: 8px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(7, 14, 30, .9);
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .nav-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 116px;
    min-height: 42px;
    scroll-snap-align: start;
    text-align: center;
  }

  .workspace,
  .panel,
  .panel * {
    min-width: 0;
  }

  .panel {
    min-height: 0;
    padding: 12px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .panel-head h1 {
    font-size: clamp(1.9rem, 9vw, 2.65rem);
    line-height: 1;
  }

  .game-controls {
    justify-content: stretch;
  }

  .game-controls select,
  .game-controls button {
    flex: 1 1 140px;
  }

  .next-gen-hub,
  #verbforge-phaser-root,
  #verbforge-phaser-root canvas {
    touch-action: pan-y;
  }

  #verbforge-phaser-root {
    min-height: clamp(220px, 36dvh, 340px);
  }

  #verbforge-phaser-root canvas {
    pointer-events: none;
  }

  .game-grid,
  .stats-grid,
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

	  .vocab-place-grid {
	    justify-content: stretch;
	    width: 100%;
	  }

	  .vocab-place-select {
	    flex: 1 1 auto;
	  }

	  .vocab-arcade-shell {
	    grid-template-columns: minmax(0, 1fr);
	  }

	  .vocab-mode-tabs {
	    display: grid;
	    grid-template-columns: repeat(2, minmax(0, 1fr));
	  }

	  .vocab-mode-card {
	    min-height: 124px;
	  }

	  .vocab-mode-tab {
	    min-width: 0;
	  }

  .vocab-launch {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .vocab-launch-main {
    align-content: start;
  }

  .vocab-launch-main .big-start {
    width: 100%;
  }

  .vocab-launch-preview {
    min-height: 180px;
  }

  .vocab-launch-preview .vocab-scene {
    min-height: 180px;
  }

  .verb-table-wrap,
  .leaderboard,
  .doc-page,
  .checkout-shell {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 760px) {
  .game-window {
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .game-window-shell {
    width: 100%;
    min-height: 100dvh;
    height: auto;
    gap: 8px;
    border: 0;
    border-radius: 0;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 8px calc(10px + env(safe-area-inset-bottom, 0px));
    grid-template-rows: auto auto auto;
  }

  .game-window-toolbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 0;
    padding: 7px 8px;
  }

  .game-window-toolbar .eyebrow,
  .game-window .scene-titlebar span {
    font-size: .64rem;
  }

  .game-window-toolbar h2 {
    font-size: clamp(1.05rem, 5.5vw, 1.35rem);
    line-height: 1.05;
  }

  .game-window-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .game-window-controls select,
  .game-window-controls button,
  .music-switch {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding-inline: 8px;
    font-size: .82rem;
  }

  .game-window[data-active-game="letter_lift"] .game-window-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px 42px 42px;
    align-items: center;
  }

  .game-window[data-active-game="letter_lift"] .game-window-controls select {
    width: 100%;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) .game-window-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
    align-items: center;
    gap: 7px;
    min-height: 56px;
    padding: 7px;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) .game-window-toolbar > div:first-child {
    grid-column: 1;
    min-width: 0;
    padding-left: 44px;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) .game-window-toolbar > div:first-child::before {
    width: 36px;
    height: 36px;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) .game-window-toolbar .eyebrow {
    display: none;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) .game-window-toolbar h2 {
    overflow: hidden;
    font-size: clamp(.98rem, 4.8vw, 1.12rem);
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) .game-window-controls {
    display: contents;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) .music-switch {
    grid-column: 2;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) #gameHelpButton {
    grid-column: 3;
  }

  .game-window[data-active-game="letter_lift"]:not([data-window-mode="start"]) #gameCloseButton {
    grid-column: 4;
  }

  .game-window[data-active-game="whac_mole"] .game-window-controls {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
    align-items: center;
  }

  .game-window[data-active-game="whac_mole"] .game-window-controls select {
    width: 100%;
  }

  .game-window[data-active-game="balloons"] .game-window-controls {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
    align-items: center;
  }

  .game-window[data-active-game="balloons"] .game-window-controls select {
    width: 100%;
  }

  .game-window[data-active-game="memory"] .game-window-controls,
  .game-window[data-active-game="crossword"] .game-window-controls {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
    align-items: center;
  }

  .game-window[data-active-game="memory"] .game-window-controls select,
  .game-window[data-active-game="crossword"] .game-window-controls select {
    width: 100%;
  }

  .game-window[data-active-game="maze"] .game-window-controls,
  .game-window[data-active-game="maze_trial"] .game-window-controls,
  .game-window[data-active-game="story"] .game-window-controls,
  .game-window[data-active-game="puzzle"] .game-window-controls,
  .game-window[data-active-game="taquin"] .game-window-controls,
  .game-window[data-active-game="vases"] .game-window-controls,
  .game-window[data-active-game="runner"] .game-window-controls {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
    align-items: center;
  }

  .game-window[data-active-game="maze"] .game-window-controls select,
  .game-window[data-active-game="maze_trial"] .game-window-controls select,
  .game-window[data-active-game="story"] .game-window-controls select,
  .game-window[data-active-game="puzzle"] .game-window-controls select,
  .game-window[data-active-game="taquin"] .game-window-controls select,
  .game-window[data-active-game="vases"] .game-window-controls select,
  .game-window[data-active-game="runner"] .game-window-controls select {
    width: 100%;
  }

  .game-window[data-active-game="arcane_explorer"] .game-window-controls {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
    align-items: center;
  }

  .game-window[data-active-game="arcane_explorer"] .game-window-controls select {
    width: 100%;
  }

  .game-window[data-active-game="arcane_explorer"] #gameVariantSelect {
    grid-column: 1;
  }

  .game-window[data-active-game="arcane_explorer"] .arcane-segment-count-select {
    grid-column: 1 / -1;
  }

  .game-window[data-active-game="arcane_explorer"] .music-switch,
  .game-window[data-active-game="arcane_explorer"] #gameHelpButton,
  .game-window[data-active-game="arcane_explorer"] #gameCloseButton {
    justify-self: center;
  }

  .game-window[data-active-game="arcane_explorer"] .arcane-segment-count-select {
    font-size: .76rem;
    padding-inline: 6px;
  }

  .music-switch {
    justify-content: center;
  }

  .game-window-hud,
  .vocab-game-window .game-window-hud {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .game-window-hud span,
  .vocab-game-window .game-window-hud span {
    min-height: 30px;
    padding: 2px 4px;
    overflow: hidden;
    font-size: .7rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-window .game-stage,
  .vocab-game-window .vocab-game-stage {
    height: auto;
    min-height: calc(100dvh - 156px);
    overflow: visible;
    padding: 6px;
  }

  .game-window .scene-frame,
  .game-window .scene-content,
  .game-window .quiz-scene,
  .game-window .memory-scene,
  .game-window .crossword-scene,
  .game-window .maze-scene-wrap,
  .game-window .story-scene,
  .game-window .puzzle-scene,
  .game-window .taquin-scene,
  .game-window .runner-scene,
  .game-window .mole-scene,
  .game-window .balloon-scene,
  .game-window .lift-scene,
  .vocab-game-window .vocab-session {
    height: auto;
    min-height: 0;
  }

  .game-window .scene-content,
  .game-window .quiz-scene .scene-content,
  .game-window .memory-scene .scene-content,
  .game-window .crossword-scene .scene-content,
  .game-window .maze-scene-wrap .scene-content,
  .game-window .story-scene .scene-content,
  .game-window .puzzle-scene .scene-content,
  .game-window .taquin-scene .scene-content,
  .game-window .runner-scene .scene-content,
  .game-window .mole-scene .scene-content,
  .game-window .balloon-scene .scene-content,
  .game-window .lift-scene .scene-content {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 8px;
  }

  .game-window .scene-titlebar,
  .game-window .quiz-scene .scene-titlebar,
  .game-window .memory-scene .scene-titlebar,
  .game-window .crossword-scene .scene-titlebar,
  .game-window .maze-scene-wrap .scene-titlebar,
  .game-window .mole-scene .scene-titlebar,
  .game-window .balloon-scene .scene-titlebar,
  .game-window .lift-scene .scene-titlebar {
    min-height: 0;
    padding: 7px 8px;
  }

  .game-window .scene-titlebar strong {
    font-size: .86rem;
    line-height: 1.15;
    text-align: left;
  }

  .game-window[data-active-game="letter_lift"] {
    overflow: hidden;
  }

  .game-window[data-active-game="letter_lift"] .game-window-shell {
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
    height: 100dvh;
  }

  .game-window[data-active-game="letter_lift"] .game-stage {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .game-window[data-active-game="letter_lift"] .lift-scene,
  .game-window[data-active-game="letter_lift"] .phaser-lift-scene .scene-content {
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .game-window[data-active-game="letter_lift"] .phaser-lift-scene #phaserLetterLiftRoot {
    min-height: max(560px, calc(100dvh - 156px));
    height: max(560px, calc(100dvh - 156px));
    touch-action: pan-y;
  }

  .game-window[data-active-game="letter_lift"] .phaser-lift-scene canvas {
    touch-action: pan-y;
  }

  .game-window .start-scene .start-screen {
    min-height: calc(100dvh - 230px);
    height: auto;
    padding: 18px 10px;
  }

  .game-window .start-scene .story-start-screen {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "book"
      "title"
      "subtitle"
      "action";
    align-content: start;
    justify-items: center;
    gap: 10px;
    overflow: visible;
  }

  .game-window .start-scene .story-start-screen .story-closed-book {
    width: min(240px, 62vw, 34vh);
  }

  .game-window .start-scene .story-start-screen .story-cover-title {
    left: 22px;
    right: 22px;
    font-size: clamp(1.6rem, 9vw, 3rem);
  }

  .game-window .start-scene .story-start-screen .story-cover-subtitle {
    left: 20px;
    right: 20px;
    bottom: 20px;
    font-size: .72rem;
  }

  .game-window .start-scene .story-start-screen .stage-title,
  .game-window .start-scene .story-start-screen .stage-subtitle {
    text-align: center;
  }

  .game-window .start-scene .stage-title {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .big-start {
    width: min(260px, 100%);
  }

  .game-window .quiz-scene .quiz-board,
  .game-window .crossword-scene .crossword-layout,
  .game-window .balloon-scene .balloon-play,
  .game-window .puzzle-scene .puzzle-wrap,
  .game-window .puzzle-end-scene .puzzle-end-wrap,
  .game-window .taquin-scene .taquin-wrap,
  .game-window .taquin-scene .taquin-end-wrap,
  .game-window .runner-scene .runner-play,
  .game-window .maze-scene-wrap .maze-grid,
  .game-window .memory-scene .memory-table,
  .vocab-game-window .vocab-game-layout {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .game-window .quiz-scene .quiz-board,
  .game-window .balloon-scene .balloon-play,
  .game-window .runner-scene .runner-play,
  .vocab-game-window .vocab-game-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-window .runner-scene .runner-course {
    min-height: clamp(360px, 58dvh, 520px);
    padding: 8px;
    border-radius: 12px;
  }

  .game-window .runner-scene .runner-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    height: clamp(340px, 56dvh, 500px);
  }

  .game-window .runner-scene .runner-lane {
    min-height: 340px;
    padding: 8px 2px;
    border-radius: 12px;
  }

  .game-window .runner-scene .runner-gate {
    width: 100%;
    min-width: 0;
    min-height: 86px;
    margin-top: 26px;
    padding: 8px 2px;
    font-size: clamp(.86rem, 4vw, 1.12rem);
  }

  .game-window[data-active-game="runner"] .runner-gate.runner-gate-long {
    font-size: clamp(.74rem, 3.25vw, .96rem);
  }

  .game-window[data-active-game="runner"] .runner-gate.runner-gate-very-long {
    font-size: clamp(.62rem, 2.7vw, .82rem);
  }

  .game-window[data-active-game="runner"] .runner-target {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .game-window[data-active-game="runner"] .runner-target strong {
    display: block;
    width: 100%;
    text-align: center;
    font-size: clamp(1.15rem, 7vw, 1.72rem);
  }

  .game-window .runner-scene .runner-control-bar button {
    touch-action: manipulation;
  }

  .game-window .quiz-scene .stimulus-card,
  .game-window .balloon-scene .balloon-prompt .stimulus-card,
  .game-window .runner-scene .stimulus-card,
  .game-window .maze-scene-wrap .stimulus-card {
    min-height: 0;
    padding: 10px;
  }

  .game-window .balloon-scene .balloon-prompt .stimulus-card {
    padding: 5px 9px;
  }

  .game-window .quiz-scene .stimulus-card {
    padding: 6px 10px;
  }

  .game-window .quiz-scene .stimulus-card .eyebrow {
    margin-bottom: 4px;
  }

  .game-window .quiz-scene .stimulus-card .stage-title,
  .game-window .balloon-scene .balloon-prompt .stimulus-card .stage-title,
  .game-window .runner-scene .stimulus-card .stage-title,
  .game-window .maze-scene-wrap .stimulus-card .stage-title {
    font-size: clamp(1.45rem, 9vw, 2.35rem);
    line-height: 1;
  }

  .game-window .quiz-scene .stimulus-card .stage-title {
    margin-bottom: 0;
    font-size: clamp(1.35rem, 8vw, 2.05rem);
  }

  .game-window .balloon-scene .balloon-prompt .stimulus-card .stage-title {
    font-size: clamp(1.18rem, 6.6vw, 1.75rem);
    line-height: .95;
  }

  .game-window[data-active-game="crossword"] .crossword-row strong {
    font-size: clamp(.9rem, 3.7vw, 1.02rem);
  }

  .game-window[data-active-game="crossword"] .crossword-row input {
    min-height: 42px;
    font-size: 1rem;
  }

  .game-window[data-active-game="balloons"] .cloud {
    transform: scale(.72);
    transform-origin: center;
  }

  .game-window .memory-scene .memory-grid {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
  }

  .game-window .memory-scene .memory-card {
    min-height: 68px;
  }

  .game-window .crossword-scene .crossword-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-window .crossword-scene .crossword-board {
    order: 2;
    width: 100%;
    overflow: auto;
  }

  .game-window .crossword-scene .crossword-grid,
  .game-window .crossword-scene .crossword-grid.crossword-size-13 {
    width: max(100%, 340px);
    height: auto;
    max-width: none;
  }

  .game-window .crossword-scene .crossword-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-window .crossword-scene .crossword-list {
    order: 1;
    max-height: 260px;
    padding-right: 0;
  }

  .game-window .crossword-scene .crossword-actions {
    order: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }

  .game-window .balloon-scene .balloon-sky,
  .game-window .maze-scene-wrap .maze-scene,
  .game-window .maze-scene-wrap .maze-fps-scene,
  .game-window .mole-scene .mole-field {
    min-height: max(360px, 56dvh);
  }

  .game-window .maze-scene-wrap .maze-status-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-window .maze-scene-wrap .maze-lab-status-console {
    grid-template-columns: minmax(66px, .52fr) minmax(104px, 1fr) minmax(78px, .62fr);
    gap: 6px;
  }

  .game-window .maze-scene-wrap .maze-lab-status-console > div {
    min-height: 44px;
    padding: 6px 7px;
  }

  .game-window .maze-scene-wrap .maze-lab-status-console span {
    font-size: .54rem;
    line-height: 1.05;
  }

  .game-window .maze-scene-wrap .maze-lab-status-console strong {
    font-size: .86rem;
    line-height: 1.05;
  }

  .game-window .maze-scene-wrap .maze-renderer {
    min-height: max(430px, 62dvh);
  }

  .game-window .maze-scene-wrap .maze-crossroad-hud {
    top: 10px;
    min-width: calc(100% - 20px);
    padding: 8px 10px;
  }

  .game-window .maze-scene-wrap .maze-crossroad-hud strong {
    font-size: 1.12rem;
  }

  .game-window .maze-scene-wrap .maze-lab-fps-scene.phaser-renderer-active .maze-lab-objective-hud {
    left: 10px;
    width: min(172px, calc(100% - 20px));
    min-width: 0;
    padding: 5px 7px;
    transform: none;
  }

  .game-window .maze-scene-wrap .maze-lab-fps-scene.phaser-renderer-active .maze-lab-objective-hud strong {
    font-size: .78rem;
  }

  .game-window .maze-scene-wrap .maze-move-controls {
    left: 10px;
    bottom: 10px;
  }

  .game-window .maze-scene-wrap .maze-energy-panel {
    right: 10px;
    bottom: 10px;
    width: clamp(112px, 32vw, 156px);
    padding: 8px 9px;
  }

  .game-window .maze-scene-wrap .maze-energy-panel span {
    font-size: .62rem;
  }

  .game-window .maze-scene-wrap .maze-energy-panel strong {
    font-size: 1rem;
  }

  .game-window .maze-scene-wrap .maze-move {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }

  .game-window .maze-scene-wrap .maze-message {
    left: 10px;
    right: 10px;
    bottom: 116px;
    max-width: none;
  }

  .game-window .balloon-scene .balloon-play {
    gap: 10px;
  }

  .game-window .story-scene .story-book {
    height: auto;
    overflow: visible;
  }

  .game-window .story-scene .story-book:not(.story-summary) {
    padding: 8px;
  }

  .game-window .story-scene .story-cue-rack {
    max-height: 184px;
    overflow: auto;
  }

  .game-window .story-scene .story-book:not(.story-summary) .story-book-spread {
    grid-template-columns: minmax(0, 1fr);
    --story-spread-divider: 100%;
  }

  .game-window .story-scene .story-book:not(.story-summary) .story-book-spread::before {
    display: none;
  }

  .game-window .story-scene .story-book:not(.story-summary) .story-page {
    padding: 10px;
  }

  .game-window .story-scene .story-book:not(.story-summary) .story-page-illustration {
    min-height: 260px;
  }

  .game-window .story-scene .story-book:not(.story-summary) .story-visual-frame {
    min-height: 0;
  }

  .game-window .story-scene .story-line {
    font-size: 1rem;
    line-height: 1.55;
  }

  .game-window .story-scene .story-blank {
    display: flex;
    margin: 5px 0;
  }

  .game-window .story-scene .story-blank input {
    width: min(100%, 220px);
  }

  .game-window .puzzle-scene .puzzle-board,
  .game-window .taquin-scene .taquin-board {
    width: min(100%, 78dvw, 420px);
  }

  .vocab-game-window .vocab-session {
    grid-template-rows: auto auto auto;
    overflow: visible;
  }

  .vocab-game-window .vocab-prompt {
    padding: 8px;
  }

  .vocab-game-window .vocab-scene-viewport {
    height: auto;
    min-height: 56dvh;
  }

  .vocab-game-window .vocab-scene {
    aspect-ratio: 1672 / 941;
    width: calc(100% * var(--vocab-zoom, 1));
    height: auto;
    min-height: 0;
  }

  .vocab-game-window .vocab-word-tray,
  .vocab-game-window .vocab-choice-list {
    height: auto;
    overflow: visible;
  }

  .vocab-game-window .vocab-word-tray strong {
    font-size: clamp(1.35rem, 8vw, 2.05rem);
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .topbar {
    position: static;
  }

  .game-window-toolbar {
    position: static;
  }

  .game-window .game-stage,
  .vocab-game-window .vocab-game-stage {
    min-height: calc(100dvh - 118px);
  }

  .game-window-hud,
  .vocab-game-window .game-window-hud {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }
}

@media (max-width: 900px) {
  .quest-map-preview {
    padding: 10px 10px max(118px, calc(env(safe-area-inset-bottom) + 112px));
  }

  .quest-shell {
    gap: 10px;
  }

  .quest-appbar {
    grid-template-columns: auto minmax(0, .9fr) auto;
    gap: 7px;
    min-height: 48px;
    padding: 6px;
  }

  .quest-arena-notice {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 100%;
  }

  .quest-menu-button {
    width: 34px;
    min-height: 34px;
    padding: 8px;
  }

  .quest-menu-button span {
    width: 17px;
    height: 2px;
  }

  .quest-menu-drawer {
    width: min(304px, calc(100vw - 20px));
  }

  .quest-menu-item {
    min-height: 50px;
  }

  .arena-hero,
  .arena-invite-row,
  .arena-private-invite {
    grid-template-columns: 1fr;
  }

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

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

  .arena-secondary-actions {
    grid-template-columns: 1fr;
  }

  .arena-duel-line {
    grid-template-columns: 1fr;
  }

  .arena-duel-vs {
    justify-self: center;
  }

  .quest-brand-mark {
    width: 31px;
    height: 35px;
  }

  .quest-brand strong {
    font-size: .86rem;
    font-weight: 700;
  }

  .quest-brand small {
    font-size: .54rem;
    font-weight: 700;
    letter-spacing: .06em;
  }

  .quest-appbar-actions select {
    display: none;
  }

  .quest-score-pill {
    min-width: 58px;
    min-height: 34px;
    gap: 5px;
    padding: 0 7px;
    font-size: .82rem;
  }

  .quest-sound-toggle.arena-sound-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
  }

  .quest-sound-toggle.arena-sound-toggle::before {
    width: 18px;
    height: 18px;
  }

  .quest-score-pill img {
    width: 17px;
    height: 17px;
  }

  .quest-profile-pill {
    min-height: 34px;
    max-width: 40px;
    overflow: hidden;
    padding: 0 3px;
  }

  .quest-profile-pill img {
    width: 28px;
    height: 28px;
  }

  .quest-profile-pill .quest-avatar-portrait.compact {
    width: 28px;
    height: 28px;
  }

  .quest-profile-pill > span:not(.quest-avatar-portrait) {
    display: none;
  }

  .quest-profile-pill .quest-avatar-portrait {
    display: grid;
  }

  .quest-avatar-chevron {
    width: 18px;
    min-height: 34px;
  }

  .quest-avatar-chevron::before {
    left: 4px;
    top: 14px;
    border-left-width: 5px;
    border-right-width: 5px;
    border-top-width: 6px;
  }

  .quest-progress-panel {
    grid-template-columns: minmax(92px, .82fr) auto minmax(92px, .72fr);
    gap: 9px;
    padding: 12px;
  }

  .quest-progress-panel h1 {
    font-size: .94rem;
  }

  .quest-progress-title {
    gap: 9px;
  }

  .quest-streak {
    column-gap: 7px;
  }

  .quest-flame-icon {
    width: 26px;
    height: 32px;
  }

  .quest-streak strong {
    font-size: 1.25rem;
  }

  .quest-streak span:last-child {
    font-size: .66rem;
  }

  .quest-master-ring {
    width: 86px;
  }

  .quest-master-ring strong {
    font-size: 1.24rem;
  }

  .quest-master-ring span {
    margin-bottom: 19px;
    font-size: .6rem;
  }

  .quest-diamond-icon {
    width: 27px;
    height: 27px;
  }

  .quest-level-block {
    gap: 7px;
  }

  .quest-level-block strong {
    font-size: .82rem;
  }

  .quest-level-block span {
    font-size: .66rem;
  }

  .quest-xp-bar {
    height: 7px;
    margin-top: 6px;
  }

  .quest-next-objective {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    border-top: 1px solid rgba(255,255,255,.1);
    gap: 9px;
    padding-top: 10px;
  }

  .quest-next-objective span {
    font-size: .72rem;
  }

  .quest-next-objective strong {
    font-size: .9rem;
  }

  .quest-next-objective small {
    font-size: .7rem;
  }

  .quest-target-icon {
    width: 58px;
    height: 58px;
  }

  .quest-launch-card {
    padding: 13px;
  }

  .quest-launch-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .quest-level-block {
    grid-column: auto;
  }

  .quest-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quest-side-panel {
    order: 2;
  }

  .quest-map-panel {
    order: 1;
  }

  .quest-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .quest-section-head p {
    font-size: .76rem;
  }

  .quest-map-actions {
    justify-content: stretch;
    margin-left: 0;
  }

  .quest-map-actions .quest-map-button {
    width: 100%;
    justify-content: center;
  }

  .quest-map-stage {
    min-height: 620px;
    overflow: hidden;
    padding: 0;
    background-position: center top;
    background-size: auto 100%;
  }

  .quest-map-progress-badge {
    left: 10px;
    top: 10px;
    gap: 5px;
    width: min(184px, calc(100% - 20px));
    padding: 7px 8px;
  }

  .quest-map-progress-badge span {
    font-size: .58rem;
  }

  .quest-map-progress-badge strong {
    font-size: .98rem;
  }

  .quest-map-progress-badge small {
    font-size: .62rem;
  }

  .quest-map-progress-badge em {
    font-size: .61rem;
  }

  .quest-map-progress-bar {
    height: 5px;
  }

  .quest-path {
    min-height: 620px;
    min-width: 0;
    padding: 0;
  }

  .quest-path::before {
    display: none;
  }

  .quest-node-button {
    grid-template-columns: 1fr;
    gap: 3px;
    width: 92px;
    min-height: 72px;
    padding: 0;
    transform: translate(-50%, -22px);
  }

  .quest-node-button:hover {
    transform: translate(-50%, -23px);
  }

  .quest-node-medal {
    width: 44px;
    height: 44px;
  }

  .quest-game-logo {
    width: 35px;
    height: 35px;
  }

  .quest-node-number {
    right: -5px;
    bottom: -5px;
    width: 19px;
    height: 19px;
    font-size: .58rem;
  }

  .quest-node-info {
    width: 86px;
    max-width: 86px;
    padding: 3px 5px;
  }

  .quest-node-info strong {
    font-size: .52rem;
  }

  .quest-node-info small {
    font-size: .46rem;
  }

  .quest-roadmap-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .quest-roadmap-worlds {
    grid-template-columns: 1fr;
  }

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

  .quest-progress-hero-detail,
  .progress-dashboard-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .quest-progress-detail-grid,
  .quest-progress-split,
  .progress-dashboard-metrics,
  .progress-dashboard-columns {
    grid-template-columns: 1fr;
  }

  .quest-avatar-forge-layout,
  .quest-avatar-lab-layout,
  .quest-avatar-visuals,
  .quest-avatar-form-grid,
  .quest-avatar-wallet,
  .quest-avatar-skills > div,
  .quest-avatar-items > div,
  .quest-avatar-bonuses > div {
    grid-template-columns: 1fr;
  }

  .quest-avatar-preview-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quest-avatar-preview-card .quest-avatar-portrait {
    width: 86px;
    height: 86px;
  }

  .quest-setting-row,
  .quest-toggle-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

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

  .quest-utility-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quest-node-button.locked .quest-node-medal::after {
    width: 15px;
    height: 15px;
  }

  .quest-node-button.locked .quest-node-medal::before {
    right: 3px;
    top: 1px;
    width: 6px;
    height: 6px;
  }

  .quest-chapter-marker {
    min-width: 72px;
    max-width: 94px;
    padding: 4px 6px;
  }

  .quest-chapter-marker strong {
    font-size: .56rem;
  }

  .quest-chapter-marker small {
    font-size: .5rem;
  }

  .quest-detail-panel dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .quest-side-panel {
    display: none;
  }

  .quest-sticky-action {
    display: grid;
    position: fixed;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    align-items: start;
  }

  .quest-parent-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .game-window[data-active-game="quiz"] .game-window-shell {
    gap: 8px;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px calc(10px + env(safe-area-inset-bottom, 0px));
    background-position: center bottom;
  }

  .game-window[data-active-game="quiz"] .game-window-toolbar {
    position: static;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 40px 40px 40px;
    align-items: center;
    gap: 7px;
    min-height: 56px;
    border-radius: 8px;
    padding: 7px;
  }

  .game-window[data-active-game="quiz"] .game-window-toolbar > div:first-child {
    position: relative;
    grid-column: 1 / 3;
    min-width: 0;
    display: grid;
    padding-left: 50px;
  }

  .game-window[data-active-game="quiz"] .game-window-toolbar > div:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 42px;
    height: 42px;
    background: url("/static/assets/flash-choice/icon-target.png") center / contain no-repeat;
    transform: translateY(-50%);
  }

  .game-window[data-active-game="quiz"] .game-window-toolbar > div:first-child .eyebrow {
    order: 2;
  }

  .game-window[data-active-game="quiz"] .game-window-toolbar > div:first-child h2 {
    order: 1;
  }

  .game-window[data-active-game="quiz"] .game-window-toolbar h2 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.05;
  }

  .game-window[data-active-game="quiz"] .game-window-toolbar .eyebrow {
    margin: 2px 0 0;
    color: #80dfd0;
    font-size: .68rem;
    font-weight: 900;
    text-transform: none;
  }

  .game-window[data-active-game="quiz"] .game-window-controls {
    display: contents;
  }

  .game-window[data-active-game="quiz"] #gameVariantSelect,
  .game-window[data-active-game="quiz"] #keyboardLayoutSelect {
    display: none;
  }

  .game-window[data-active-game="quiz"] #gameStartButton {
    display: none;
  }

  .game-window[data-active-game="quiz"] #gameCloseButton,
  .game-window[data-active-game="quiz"] #gameHelpButton,
  .game-window[data-active-game="quiz"] .music-switch {
    display: grid;
    width: 40px;
    min-width: 0;
    min-height: 40px;
    place-items: center;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .game-window[data-active-game="quiz"] #gameCloseButton {
    position: relative;
    grid-column: 5;
    grid-row: 1;
    background: rgba(255,255,255,.06);
  }

  .game-window[data-active-game="quiz"] #gameCloseButton::before,
  .game-window[data-active-game="quiz"] #gameCloseButton::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    top: 19px;
    display: block;
    height: 2px;
    border-radius: 999px;
    background: #f4f8fb;
  }

  .game-window[data-active-game="quiz"] #gameCloseButton::before { transform: rotate(45deg); }
  .game-window[data-active-game="quiz"] #gameCloseButton::after { transform: rotate(-45deg); }

  .game-window[data-active-game="quiz"] .music-switch {
    grid-column: 3;
    grid-row: 1;
  }

  .game-window[data-active-game="quiz"] #gameHelpButton {
    grid-column: 4;
    grid-row: 1;
  }

  .game-window[data-active-game="quiz"] .music-switch span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .game-window[data-active-game="quiz"] .music-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .game-window[data-active-game="quiz"] .music-switch::before {
    content: "";
    width: 25px;
    height: 25px;
    background: url("/static/assets/flash-choice/icon-sound-on.svg") center / contain no-repeat;
  }

  .game-window[data-active-game="quiz"] .music-switch::after {
    display: none;
  }

  .game-window[data-active-game="quiz"] .music-switch:has(input:not(:checked))::before {
    background-image: url("/static/assets/flash-choice/icon-sound-off.svg");
  }

  .game-window[data-active-game="quiz"] #gameHelpButton {
    grid-column: 4;
    grid-row: 1;
  }

  .game-window[data-active-game="quiz"] #gameHelpButton::before {
    content: "?";
    color: #f4f8fb;
    font-size: 1.45rem;
    font-weight: 900;
  }

  .game-window[data-active-game="quiz"] .game-window-hud {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
    background: rgba(7, 16, 30, .68);
  }

  .game-window[data-active-game="quiz"][data-window-mode="start"] .game-window-hud {
    display: none;
  }

  .game-window[data-active-game="quiz"] .game-window-hud span {
    min-height: 40px;
    justify-items: start;
    padding: 4px 5px 4px 30px;
    font-size: .62rem;
  }

  .game-window[data-active-game="quiz"] .game-window-hud span::before {
    left: 5px;
    width: 21px;
    height: 21px;
  }

  .game-window[data-active-game="quiz"] .game-window-hud small {
    font-size: .54rem;
  }

  .game-window[data-active-game="quiz"] .game-window-hud strong {
    font-size: .72rem;
  }

  .game-window[data-active-game="quiz"] #hudTimer small {
    display: none;
  }

  .game-window[data-active-game="quiz"] #hudTimer strong {
    font-size: .66rem;
  }

  .game-window .start-scene .quiz-arcade-start {
    min-height: calc(100dvh - 148px);
    align-content: start;
    gap: 12px;
    border-radius: 8px;
    padding: 76px 12px 12px;
    background-position: center bottom;
  }

  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt {
    min-height: 190px;
    align-content: center;
    padding: 44px 20px 22px;
    text-align: center;
  }

  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt img {
    display: none;
  }

  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt > div:last-child {
    justify-self: center;
  }

  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt p {
    position: relative;
    margin-top: 18px;
    padding: 0 32px;
    font-size: .86rem;
  }

  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt p::before,
  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt p::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 24px;
    height: 1px;
    background: #f4c766;
  }

  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt p::before {
    left: 0;
  }

  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt p::after {
    right: 0;
  }

  .game-window .start-scene .quiz-arcade-start .quiz-arcade-prompt strong {
    font-size: clamp(3.2rem, 16vw, 4.9rem);
  }

  .quiz-arcade-start-columns {
    gap: 8px;
  }

  .quiz-arcade-start-columns section {
    gap: 7px;
    min-height: 192px;
    padding: 12px 6px;
  }

  .quiz-arcade-start-columns img {
    width: 46px;
    height: 46px;
  }

  .quiz-arcade-start-columns strong {
    font-size: clamp(.66rem, 2.8vw, .78rem);
  }

  .quiz-arcade-start-columns span {
    padding: 7px 5px;
    font-size: .72rem;
  }

  .quiz-arcade-start-button {
    width: min(310px, 76vw);
    min-height: 58px;
    border-radius: 8px;
    font-size: 1.18rem;
  }

  .game-window[data-active-game="quiz"] .quiz-reference-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(7, 16, 30, .86);
  }

  .quiz-reference-nav button {
    display: grid;
    gap: 2px;
    min-height: 42px;
    place-items: center;
    border: 0;
    border-right: 1px solid rgba(255,255,255,.14);
    border-radius: 0;
    color: rgba(220, 229, 236, .64);
    background: transparent;
    font-size: .54rem;
    font-weight: 900;
  }

  .quiz-reference-nav button:last-child {
    border-right: 0;
  }

  .quiz-reference-nav button[aria-current="page"] {
    color: #f4c766;
  }

  .quiz-reference-nav span {
    position: relative;
    width: 22px;
    height: 18px;
  }

  .quiz-reference-nav [data-quiz-nav="quest-map"] span::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 18px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 2px;
    box-shadow: 6px 4px 0 -2px rgba(244, 198, 102, .7);
    transform: rotate(-8deg);
  }

  .quiz-reference-nav [data-quiz-nav="flash-choice"] span::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 50%;
    background:
      radial-gradient(circle at 50% 50%, currentColor 0 3px, transparent 4px),
      radial-gradient(circle at 50% 50%, transparent 0 8px, currentColor 9px 10px, transparent 11px);
    transform: translate(-50%, -50%);
  }

  .quiz-reference-nav [data-quiz-nav="progress"] span::before {
    content: "";
    position: absolute;
    left: 4px;
    bottom: 2px;
    width: 5px;
    height: 11px;
    border-radius: 2px;
    background: currentColor;
    box-shadow: 9px -5px 0 currentColor, 18px -11px 0 currentColor;
  }

  .game-window .quiz-scene .quiz-board.quiz-arcade-board {
    grid-template-rows: minmax(92px, auto) minmax(0, 1fr);
    gap: 5px;
    padding-top: 0;
  }

  .game-window .quiz-scene .quiz-arcade-board .form-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    align-items: start;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    scroll-padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .game-window[data-active-game="quiz"] .quiz-scene .quiz-arcade-board .form-column {
    min-height: 0;
    height: 100%;
    padding: 6px 5px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.015)),
      rgba(4, 13, 25, .54);
  }

  .game-window .quiz-scene .quiz-arcade-board .form-column header {
    min-height: 54px;
    gap: 3px;
    font-size: clamp(.5rem, 2.35vw, .64rem);
  }

  .game-window .quiz-scene .quiz-arcade-board .form-column header::before {
    width: 28px;
    height: 28px;
  }

  .game-window .quiz-scene .quiz-arcade-board .form-column::before {
    inset: 66px 5px 6px;
  }

  .game-window .quiz-scene .quiz-arcade-board .floating-options {
    grid-template-rows: repeat(6, minmax(32px, 1fr));
    height: calc(100% - 58px);
    max-height: none;
    gap: 4px;
    padding: 4px 0 6px;
    overflow: hidden;
    overscroll-behavior: contain;
    scroll-padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .game-window .quiz-scene .quiz-arcade-board .floating-option {
    min-height: 32px;
    padding: 3px 4px;
  }

  .game-window .quiz-scene .quiz-arcade-board .floating-option span {
    font-size: clamp(.52rem, 2.5vw, .72rem);
  }

  .quiz-arcade-prompt {
    min-height: 92px;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 6px;
    padding: 30px 10px 10px;
    text-align: center;
  }

  .quiz-arcade-prompt img {
    width: 46px;
    height: 46px;
  }

  .quiz-arcade-prompt p {
    margin-top: 8px;
    font-size: .68rem;
    line-height: 1.1;
  }

  .quiz-arcade-prompt strong {
    font-size: clamp(1.45rem, 10vw, 2.2rem);
  }

  .game-window[data-active-game="quiz"] {
    overflow: hidden;
  }

  .game-window[data-active-game="quiz"] .game-window-shell {
    height: calc(100dvh - 16px);
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .game-window[data-active-game="quiz"] .game-stage,
  .game-window[data-active-game="quiz"] .quiz-scene,
  .game-window[data-active-game="quiz"] .quiz-scene .scene-content,
  .game-window[data-active-game="quiz"] .quiz-scene .quiz-board {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .game-window[data-active-game="quiz"] .game-stage {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .game-window[data-active-game="quiz"] .scene-frame.quiz-scene {
    background: transparent;
  }

  .game-window[data-active-game="quiz"] .quiz-scene .scene-content {
    padding: 6px 4px 0;
  }

  .game-window[data-active-game="quiz"] .quiz-scene .quiz-board {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .game-window[data-active-game="quiz"] .quiz-scene .quiz-board-no-stimulus {
    grid-template-rows: minmax(0, 1fr);
  }

  .game-window[data-active-game="quiz"] .quiz-scene .form-columns {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-right: 2px;
  }

  .game-window[data-active-game="quiz"] .quiz-scene .form-column {
    min-height: 300px;
  }

  .game-window[data-window-mode="start"] {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .game-window[data-active-game="quiz"][data-window-mode="start"] .game-window-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .game-window[data-active-game="quiz"][data-window-mode="start"] .game-stage,
  .game-window[data-active-game="quiz"][data-window-mode="start"] .start-scene,
  .game-window[data-active-game="quiz"][data-window-mode="start"] .start-scene .scene-content {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .game-window[data-window-mode="start"] .start-screen {
    padding-bottom: max(120px, calc(120px + env(safe-area-inset-bottom)));
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .game-window-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .game-stage,
  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-end-scene,
  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-end-scene .scene-content,
  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-end-game {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-end-scene .scene-content {
    grid-template-rows: auto auto;
    padding-bottom: max(112px, calc(112px + env(safe-area-inset-bottom)));
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-end-game {
    grid-template-rows: auto minmax(160px, auto);
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-end-card {
    grid-template-rows: auto auto auto auto auto auto;
    overflow: visible;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-answer-list {
    max-height: none;
    overflow: visible;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-result-row {
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-areas:
      "index infinitive"
      "index preterite"
      "index participle";
    gap: 5px 10px;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-result-row span {
    grid-area: index;
    align-self: center;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-result-row strong {
    grid-area: infinitive;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-result-row em:first-of-type {
    grid-area: preterite;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-result-row em:last-of-type {
    grid-area: participle;
  }

  .game-window[data-active-game="quiz"][data-window-mode="result"] .quiz-result-row em {
    color: rgba(255,255,255,.84);
    font-size: .95rem;
  }
}

@media (max-width: 760px) {
  .quest-appbar-actions {
    gap: 4px;
  }

  .quest-appbar-actions select {
    width: 96px;
    padding: 0 8px;
  }

  .quest-sticky-action .quest-primary-action {
    min-width: 104px;
  }

  .quest-continue-icon {
    width: 54px;
    height: 54px;
  }

  .game-window[data-active-game="quiz"] .game-window-shell {
    height: 100dvh;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .game-window[data-active-game="quiz"][data-window-mode="start"] .game-window-shell {
    height: auto;
  }
}

.game-window[data-active-game] {
  --wf-game-logo: url("/static/assets/quest-games/quiz.png?v=quest-game-icons-1");
  --wf-game-accent: #65dcc8;
  --wf-game-accent-soft: rgba(101, 220, 200, .18);
  --wf-game-warm: #f4c766;
  --wf-game-panel: rgba(7, 16, 30, .9);
  --wf-game-panel-2: rgba(12, 29, 42, .86);
}
.game-window[data-active-game="quiz"] { --wf-game-logo: url("/static/assets/quest-games/quiz.png?v=quest-game-icons-1"); --wf-game-accent: #65dcc8; --wf-game-accent-soft: rgba(101, 220, 200, .2); }
.game-window[data-active-game="letter_lift"] { --wf-game-logo: url("/static/assets/quest-games/letter_lift.png?v=quest-game-icons-1"); --wf-game-accent: #8fded0; --wf-game-accent-soft: rgba(143, 222, 208, .2); }
.game-window[data-active-game="whac_mole"] { --wf-game-logo: url("/static/assets/quest-games/whac_mole.png?v=quest-game-icons-1"); --wf-game-accent: #9fd88a; --wf-game-accent-soft: rgba(159, 216, 138, .18); }
.game-window[data-active-game="balloons"] { --wf-game-logo: url("/static/assets/quest-games/balloons.png?v=quest-game-icons-1"); --wf-game-accent: #74d7ff; --wf-game-accent-soft: rgba(116, 215, 255, .18); }
.game-window[data-active-game="memory"] { --wf-game-logo: url("/static/assets/quest-games/memory.png?v=quest-game-icons-1"); --wf-game-accent: #bca7ff; --wf-game-accent-soft: rgba(188, 167, 255, .18); }
.game-window[data-active-game="crossword"] { --wf-game-logo: url("/static/assets/quest-games/crossword.png?v=quest-game-icons-1"); --wf-game-accent: #8fded0; --wf-game-accent-soft: rgba(143, 222, 208, .18); }
.game-window[data-active-game="maze"] { --wf-game-logo: url("/static/assets/quest-games/maze.png?v=quest-game-icons-1"); --wf-game-accent: #f4c766; --wf-game-accent-soft: rgba(244, 199, 102, .18); }
.game-window[data-active-game="maze_trial"] { --wf-game-logo: url("/static/assets/quest-games/maze.png?v=quest-game-icons-1"); --wf-game-accent: #8fded0; --wf-game-accent-soft: rgba(143, 222, 208, .18); }
.game-window[data-active-game="arcane_explorer"] { --wf-game-logo: url("/static/assets/quest-games/arcane_explorer.png?v=quest-game-icons-1"); --wf-game-accent: #65dcc8; --wf-game-accent-soft: rgba(101, 220, 200, .18); }
.game-window[data-active-game="story"] { --wf-game-logo: url("/static/assets/quest-games/story.png?v=quest-game-icons-1"); --wf-game-accent: #d6b3ff; --wf-game-accent-soft: rgba(214, 179, 255, .18); }
.game-window[data-active-game="puzzle"] { --wf-game-logo: url("/static/assets/quest-games/puzzle.png?v=quest-game-icons-1"); --wf-game-accent: #65dcc8; --wf-game-accent-soft: rgba(101, 220, 200, .18); }
.game-window[data-active-game="taquin"] { --wf-game-logo: url("/static/assets/quest-games/taquin.png?v=quest-game-icons-1"); --wf-game-accent: #74d7ff; --wf-game-accent-soft: rgba(116, 215, 255, .18); }
.game-window[data-active-game="vases"] { --wf-game-logo: url("/static/assets/quest-games/vases.png?v=quest-game-icons-1"); --wf-game-accent: #f0b177; --wf-game-accent-soft: rgba(240, 177, 119, .18); }
.game-window[data-active-game="runner"] { --wf-game-logo: url("/static/assets/quest-games/runner.png?v=quest-game-icons-1"); --wf-game-accent: #65dcc8; --wf-game-accent-soft: rgba(101, 220, 200, .18); }
.game-window[data-active-game] .game-window-shell {
  border-color: rgba(244, 199, 102, .36);
  background:
    radial-gradient(circle at 18% 0%, var(--wf-game-accent-soft), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(244,199,102,.12), transparent 24%),
    linear-gradient(180deg, rgba(5, 13, 23, .50), rgba(3, 9, 17, .68)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
  box-shadow: 0 28px 80px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.06);
}
.game-window[data-active-game] .game-window-toolbar {
  border-color: rgba(244, 199, 102, .24);
  background:
    linear-gradient(180deg, #0b1826, #050d17);
  color: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.game-window[data-active-game] .game-window-toolbar > div:first-child {
  position: relative;
  min-width: 0;
  padding-left: 58px;
}
.game-window[data-active-game] .game-window-toolbar > div:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 46px;
  height: 46px;
  background: var(--wf-game-logo) center / contain no-repeat;
  transform: translateY(-50%);
}
.game-window[data-active-game] .game-window-toolbar .eyebrow {
  color: var(--wf-game-accent);
}
.game-window[data-active-game] .game-window-toolbar h2 {
  color: #fffdf8;
}
.game-window[data-active-game] .game-window-hud {
  border: 1px solid rgba(244, 199, 102, .18);
  border-radius: 8px;
  padding: 6px;
  background: rgba(3, 9, 17, .6);
}
.game-window[data-active-game] .game-window-hud span {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)),
    var(--wf-game-panel);
  color: #f7fbff;
  box-shadow: none;
}
.game-window[data-active-game] .game-stage {
  border-color: rgba(244, 199, 102, .2);
  background:
    radial-gradient(circle at 50% 0%, var(--wf-game-accent-soft), transparent 30%),
    linear-gradient(180deg, rgba(3,9,17,.46), rgba(3,9,17,.64)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.game-window[data-active-game] .scene-frame,
.game-window[data-active-game] .start-screen:not(.quiz-arcade-start),
.game-window[data-active-game] .quest-launch-card,
.game-window[data-active-game] .stimulus-card,
.game-window[data-active-game] .scene-titlebar,
.game-window[data-active-game] .form-column,
.game-window[data-active-game] .crossword-row,
.game-window[data-active-game] .maze-scene,
.game-window[data-active-game] .story-book,
.game-window[data-active-game] .puzzle-form-card,
.game-window[data-active-game] .taquin-form-card,
.game-window[data-active-game] .mole-feedback,
.game-window[data-active-game] .mole-end-card,
.game-window[data-active-game] .vase-grid button,
.game-window[data-active-game] .runner-lane {
  border-color: rgba(244, 199, 102, .22);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)),
    linear-gradient(180deg, rgba(3,9,17,.58), rgba(3,9,17,.72)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat,
    var(--wf-game-panel-2);
  color: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.game-window[data-active-game] .scene-titlebar span,
.game-window[data-active-game] .stimulus-card .eyebrow,
.game-window[data-active-game] .quest-launch-card-head span {
  color: var(--wf-game-accent);
}
.game-window[data-active-game] .stage-title,
.game-window[data-active-game] .scene-titlebar strong,
.game-window[data-active-game] .quest-launch-card-head strong {
  color: #fffdf8;
}
.game-window[data-active-game] .stage-subtitle,
.game-window[data-active-game] .quest-launch-card p,
.game-window[data-active-game] .quest-launch-meta dt,
.game-window[data-active-game] .quest-launch-meta dd {
  color: rgba(217, 227, 234, .78);
}
.game-window[data-active-game] .floating-option,
.game-window[data-active-game] .maze-options button,
.game-window[data-active-game] .puzzle-tile,
.game-window[data-active-game] .taquin-tile,
.game-window[data-active-game] .runner-gate,
.game-window[data-active-game] .story-cue,
.game-window[data-active-game] .story-blank,
.game-window[data-active-game] .crossword-row input {
  border-color: rgba(255,255,255,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)),
    rgba(5, 13, 23, .68);
  color: #fffdf8;
}
.game-window[data-active-game] .floating-option:hover,
.game-window[data-active-game] .floating-option:focus-visible,
.game-window[data-active-game] .maze-options button:hover,
.game-window[data-active-game] .maze-options button:focus-visible,
.game-window[data-active-game] .puzzle-tile:hover,
.game-window[data-active-game] .taquin-tile:hover {
  border-color: rgba(244,199,102,.5);
  box-shadow: 0 0 0 3px var(--wf-game-accent-soft);
}
.game-window[data-active-game] .start-screen:not(.quiz-arcade-start) {
  place-items: center;
  min-height: min(640px, 100%);
  padding: 24px;
  text-align: center;
}
.game-start-emblem {
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 8px;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,.34));
}
.game-window[data-active-game] .big-start,
.game-window[data-active-game] #stageStartButton {
  border-color: rgba(244,199,102,.38);
  background:
    linear-gradient(180deg, #fff0a8, #f4c766 58%, #b9822f);
  color: #102537;
  box-shadow: 0 12px 28px rgba(244,199,102,.22);
}
.game-window[data-active-game] #gameStartButton {
  border-color: rgba(244,199,102,.42);
  background:
    linear-gradient(180deg, #fff0a8, #f4c766 58%, #b9822f);
  color: #102537;
  font-weight: 950;
}
.game-window[data-active-game="balloons"] .balloon {
  color: transparent;
}
.game-window[data-active-game="balloons"] .balloon-label {
  border: 1px solid rgba(244,199,102,.34);
  border-radius: 999px;
  padding: 5px 8px;
  max-width: none;
  background: #020617;
  color: #fffdf8;
  font-size: clamp(.78rem, 3.2vw, .96rem);
  line-height: 1.05;
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
  text-shadow: none;
  box-shadow: 0 8px 18px rgba(2,6,23,.22);
}
.game-window[data-active-game="memory"] .memory-card-front small,
.game-window[data-active-game="memory"] .memory-card.type-preterite .memory-card-front small,
.game-window[data-active-game="memory"] .memory-card.type-participle .memory-card-front small {
  color: #fff7df;
  text-shadow: 0 2px 7px rgba(2,6,23,.82);
}
.game-window[data-active-game="whac_mole"] .mole-sign {
  color: #102537;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.game-window[data-active-game="maze"] .maze-solution-button {
  border-color: rgba(244,199,102,.4);
  background:
    linear-gradient(180deg, rgba(255,248,223,.98), rgba(244,199,102,.92));
  color: #102537;
  font-weight: 950;
}
.game-window[data-active-game="story"] .story-cue-card {
  background:
    linear-gradient(180deg, rgba(7,16,30,.86), rgba(3,9,17,.9)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
  color: #f7fbff;
}
.game-window[data-active-game="story"] .story-cue-card strong {
  color: #fffdf8;
}
.game-window[data-active-game="story"] .story-cue-card small {
  color: rgba(217,227,234,.82);
}
.game-window[data-active-game="story"] .story-cue-card b {
  background: #f4c766;
  color: #102537;
}
.game-window[data-active-game="story"] .story-book:not(.story-summary) .story-page,
.game-window[data-active-game="story"] .story-book.story-summary .story-page {
  color: #3b2415;
}
.game-window[data-active-game="story"] .story-book .story-page-heading {
  color: #3b2415;
}
.game-window[data-active-game="story"] .story-book .story-page-heading span,
.game-window[data-active-game="story"] .story-book .story-page-controls span,
.game-window[data-active-game="story"] .story-book .story-end-label {
  color: #7f1d1d;
}
.game-window[data-active-game="story"] .story-book .story-page-heading strong,
.game-window[data-active-game="story"] .story-book .story-page-reader,
.game-window[data-active-game="story"] .story-book .story-page-paragraph,
.game-window[data-active-game="story"] .story-book .story-line p {
  color: #3b2415;
}
.game-window[data-active-game="story"] .story-book .story-dropcap {
  border-color: rgba(255,248,223,.26);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.18), transparent 30%),
    linear-gradient(135deg, #7f1d1d, #2b150f);
  color: #fff8df;
}
.game-window[data-active-game="story"] .story-book .story-page-turn-button {
  border-color: rgba(127,29,29,.22);
  background: rgba(255,255,255,.78);
  color: #3b2415;
}
.game-window[data-active-game="story"] .story-book .story-blank {
  color: #3b2415;
}
.game-window[data-active-game="puzzle"] .puzzle-tile {
  color: #07101a;
}
.game-window[data-active-game="taquin"] .taquin-board:not(.solved) .verb-poster-row > span,
.game-window[data-active-game="taquin"] .taquin-board:not(.solved) .verb-poster-row > strong {
  visibility: hidden;
}
.game-window[data-active-game="taquin"] .taquin-board:not(.solved) .verb-poster-row::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,253,248,.36);
  box-shadow: 0 18px 0 rgba(255,253,248,.18), 0 -18px 0 rgba(255,253,248,.18);
  transform: translateY(-50%);
}
.game-window[data-active-game="taquin"] .taquin-board:not(.solved) .verb-poster-row::after {
  left: 16%;
  right: 16%;
  height: 10px;
  background:
    linear-gradient(90deg, rgba(255,248,223,.34), rgba(255,248,223,.56), rgba(255,248,223,.24));
  box-shadow:
    0 22px 0 rgba(96,165,250,.25),
    0 -22px 0 rgba(244,199,102,.16),
    inset 0 0 0 1px rgba(255,255,255,.16);
  transform: translateY(-50%);
}
.game-window[data-active-game="puzzle"] .verb-poster-row,
.game-window[data-active-game="taquin"] .verb-poster-row {
  background: rgba(2,6,23,.84);
}
.game-window[data-active-game="puzzle"] .verb-poster-row span,
.game-window[data-active-game="taquin"] .verb-poster-row span {
  color: #f8fafc;
}
.game-window[data-active-game="puzzle"] .verb-poster-row.poster-row-2 strong,
.game-window[data-active-game="taquin"] .verb-poster-row.poster-row-2 strong {
  color: #fff8df;
}
.game-window[data-active-game="vases"] .vase {
  color: #07101a;
}
.game-window[data-active-game="vases"] .vase-label {
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(2,6,23,.74);
  color: #fffdf8;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.game-window[data-active-game] .scene-bg {
  background:
    radial-gradient(circle at 50% 22%, rgba(244,199,102,.2), transparent 26%),
    linear-gradient(180deg, rgba(3,9,17,.2), rgba(3,9,17,.58)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.game-window[data-active-game] .mole-field,
.game-window[data-active-game] .balloon-sky,
.game-window[data-active-game] .memory-table,
.game-window[data-active-game] .crossword-board,
.game-window[data-active-game] .maze-scene,
.game-window[data-active-game] .puzzle-board,
.game-window[data-active-game] .taquin-board,
.game-window[data-active-game] .vase-grid,
.game-window[data-active-game] .runner-course,
.game-window[data-active-game] #phaserLetterLiftRoot {
  background:
    radial-gradient(circle at 50% 18%, rgba(244,199,102,.16), transparent 28%),
    linear-gradient(180deg, rgba(3,9,17,.26), rgba(3,9,17,.64)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.game-window[data-active-game="quiz"][data-window-mode="play"] .quiz-board {
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(101,220,200,.16), transparent 28%),
    linear-gradient(180deg, rgba(3,9,17,.18), rgba(3,9,17,.5)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.game-window[data-active-game] .puzzle-piece-art,
.game-window[data-active-game] .verb-poster,
.game-window[data-active-game] .taquin-piece-art {
  background:
    linear-gradient(135deg, rgba(20,184,166,.34), rgba(244,63,94,.26)),
    linear-gradient(180deg, rgba(3,9,17,.2), rgba(3,9,17,.58)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.game-window[data-active-game] .verb-image-poster.puzzle-image-forge {
  background:
    linear-gradient(145deg, rgba(106,48,20,.55), rgba(14,93,79,.42)),
    linear-gradient(180deg, rgba(255,246,199,.18), rgba(3,9,17,.76)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.verb-image-poster.puzzle-image-forge::before {
  clip-path: polygon(18% 13%, 83% 13%, 91% 54%, 52% 88%, 11% 56%);
  background:
    repeating-linear-gradient(90deg, rgba(255,209,102,.22) 0 10px, rgba(20,184,166,.12) 10px 20px),
    linear-gradient(135deg, rgba(255,248,223,.08), rgba(3,9,17,.18));
}
.verb-image-poster.puzzle-image-forge .mark-a {
  border: 10px solid rgba(255,209,102,.66);
  border-bottom-width: 3px;
  transform: rotate(8deg);
}
.verb-image-poster.puzzle-image-forge .mark-b {
  border-top: 12px solid rgba(244,199,102,.72);
  border-bottom: 4px solid rgba(255,248,223,.32);
}
.verb-image-poster.puzzle-image-forge .mark-c {
  border-left: 8px solid rgba(101,220,200,.64);
  border-right: 8px solid rgba(101,220,200,.18);
  transform: skewY(-12deg);
}
.game-window[data-active-game] .verb-image-poster.puzzle-image-library {
  background:
    linear-gradient(120deg, rgba(57,42,92,.62), rgba(18,75,97,.42)),
    linear-gradient(180deg, rgba(255,248,223,.2), rgba(3,9,17,.72)),
    url("/static/assets/quest-map-background.png") 38% center / cover no-repeat;
}
.verb-image-poster.puzzle-image-library::before {
  clip-path: polygon(10% 17%, 90% 17%, 90% 83%, 10% 83%);
  background:
    repeating-linear-gradient(90deg, rgba(255,248,223,.18) 0 8px, transparent 8px 18px),
    linear-gradient(180deg, rgba(96,165,250,.16), rgba(244,199,102,.1));
}
.verb-image-poster.puzzle-image-library .mark-a,
.verb-image-poster.puzzle-image-library .mark-b,
.verb-image-poster.puzzle-image-library .mark-c {
  border: 2px solid rgba(255,248,223,.34);
  background: rgba(3,9,17,.24);
}
.verb-image-poster.puzzle-image-library .mark-a { transform: rotate(4deg); }
.verb-image-poster.puzzle-image-library .mark-b { transform: rotate(-5deg); }
.verb-image-poster.puzzle-image-library .mark-c { transform: rotate(10deg); }
.game-window[data-active-game] .verb-image-poster.puzzle-image-observatory {
  background:
    linear-gradient(135deg, rgba(24,42,92,.66), rgba(112,66,20,.34)),
    linear-gradient(180deg, rgba(101,220,200,.16), rgba(3,9,17,.78)),
    url("/static/assets/quest-map-background.png") 60% center / cover no-repeat;
}
.verb-image-poster.puzzle-image-observatory::before {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(255,248,223,.28) 43% 45%, transparent 46%),
    conic-gradient(from 18deg, rgba(255,209,102,.28), transparent 18% 28%, rgba(101,220,200,.22) 31% 39%, transparent 42% 100%);
}
.verb-image-poster.puzzle-image-observatory .mark-a {
  border: 3px solid rgba(255,248,223,.46);
  border-radius: 50%;
}
.verb-image-poster.puzzle-image-observatory .mark-b {
  height: 2px;
  background: rgba(255,209,102,.72);
  transform: rotate(-12deg);
}
.verb-image-poster.puzzle-image-observatory .mark-c {
  width: 2px;
  background: rgba(101,220,200,.74);
  transform: rotate(18deg);
}
.game-window[data-active-game] .verb-image-poster.puzzle-image-sanctum {
  background:
    linear-gradient(140deg, rgba(31,85,71,.56), rgba(87,37,88,.42)),
    linear-gradient(180deg, rgba(255,248,223,.17), rgba(3,9,17,.78)),
    url("/static/assets/quest-map-background.png") 48% center / cover no-repeat;
}
.verb-image-poster.puzzle-image-sanctum::before {
  clip-path: polygon(50% 6%, 86% 27%, 86% 74%, 50% 94%, 14% 74%, 14% 27%);
  background:
    linear-gradient(90deg, transparent 49%, rgba(255,248,223,.34) 50%, transparent 51%),
    linear-gradient(180deg, rgba(244,199,102,.18), rgba(101,220,200,.12));
}
.verb-image-poster.puzzle-image-sanctum .mark-a,
.verb-image-poster.puzzle-image-sanctum .mark-b,
.verb-image-poster.puzzle-image-sanctum .mark-c {
  border: 2px solid rgba(101,220,200,.48);
  transform: rotate(45deg);
}
.game-window[data-active-game] .verb-image-poster.puzzle-image-grove {
  background:
    linear-gradient(128deg, rgba(42,91,49,.58), rgba(25,71,104,.45)),
    linear-gradient(180deg, rgba(255,248,223,.16), rgba(3,9,17,.74)),
    url("/static/assets/quest-map-background.png") 56% center / cover no-repeat;
}
.verb-image-poster.puzzle-image-grove::before {
  clip-path: polygon(50% 7%, 74% 34%, 66% 86%, 34% 86%, 26% 34%);
  background:
    repeating-linear-gradient(45deg, rgba(101,220,200,.18) 0 8px, rgba(255,209,102,.08) 8px 18px),
    linear-gradient(180deg, rgba(42,91,49,.18), rgba(3,9,17,.08));
}
.verb-image-poster.puzzle-image-grove .mark-a,
.verb-image-poster.puzzle-image-grove .mark-b,
.verb-image-poster.puzzle-image-grove .mark-c {
  border-left: 12px solid rgba(101,220,200,.46);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.game-window[data-active-game] .verb-image-poster.taquin-image-harbor {
  background:
    linear-gradient(140deg, rgba(16,82,111,.58), rgba(83,61,35,.38)),
    linear-gradient(180deg, rgba(244,199,102,.16), rgba(3,9,17,.78)),
    url("/static/assets/quest-map-background.png") 28% center / cover no-repeat;
}
.verb-image-poster.taquin-image-harbor::before {
  clip-path: polygon(7% 64%, 35% 45%, 62% 59%, 92% 40%, 92% 78%, 7% 78%);
  background:
    repeating-linear-gradient(0deg, rgba(255,248,223,.24) 0 4px, transparent 4px 12px),
    linear-gradient(90deg, rgba(96,165,250,.28), rgba(101,220,200,.16));
}
.verb-image-poster.taquin-image-harbor .mark-a,
.verb-image-poster.taquin-image-harbor .mark-b,
.verb-image-poster.taquin-image-harbor .mark-c {
  border-top: 6px solid rgba(244,199,102,.62);
  border-bottom: 6px solid rgba(101,220,200,.32);
}
.game-window[data-active-game] .verb-image-poster.taquin-image-clocktower {
  background:
    linear-gradient(135deg, rgba(64,42,94,.58), rgba(98,65,23,.36)),
    linear-gradient(180deg, rgba(255,248,223,.18), rgba(3,9,17,.78)),
    url("/static/assets/quest-map-background.png") 72% center / cover no-repeat;
}
.verb-image-poster.taquin-image-clocktower::before {
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255,248,223,.3) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(255,248,223,.24) 49% 51%, transparent 52%),
    radial-gradient(circle at 50% 50%, transparent 0 46%, rgba(244,199,102,.32) 47% 49%, transparent 50%);
}
.verb-image-poster.taquin-image-clocktower .mark-a,
.verb-image-poster.taquin-image-clocktower .mark-b,
.verb-image-poster.taquin-image-clocktower .mark-c {
  border: 2px solid rgba(244,199,102,.42);
  border-radius: 50%;
}
.game-window[data-active-game] .verb-image-poster.taquin-image-vault {
  background:
    linear-gradient(135deg, rgba(23,65,98,.6), rgba(26,93,72,.4)),
    linear-gradient(180deg, rgba(255,248,223,.15), rgba(3,9,17,.78)),
    url("/static/assets/quest-map-background.png") 45% center / cover no-repeat;
}
.verb-image-poster.taquin-image-vault::before {
  clip-path: polygon(16% 28%, 84% 28%, 84% 79%, 16% 79%);
  background:
    linear-gradient(90deg, transparent 12%, rgba(255,248,223,.24) 13% 16%, transparent 17% 83%, rgba(255,248,223,.24) 84% 87%, transparent 88%),
    repeating-linear-gradient(0deg, rgba(255,248,223,.1) 0 10px, rgba(3,9,17,.05) 10px 20px);
}
.verb-image-poster.taquin-image-vault .mark-a,
.verb-image-poster.taquin-image-vault .mark-b,
.verb-image-poster.taquin-image-vault .mark-c {
  border: 3px double rgba(101,220,200,.48);
}
.game-window[data-active-game] .verb-image-poster.taquin-image-garden {
  background:
    linear-gradient(128deg, rgba(35,88,66,.58), rgba(45,47,102,.42)),
    linear-gradient(180deg, rgba(244,199,102,.14), rgba(3,9,17,.76)),
    url("/static/assets/quest-map-background.png") 55% center / cover no-repeat;
}
.verb-image-poster.taquin-image-garden::before {
  clip-path: polygon(50% 8%, 61% 38%, 93% 38%, 67% 57%, 77% 88%, 50% 69%, 23% 88%, 33% 57%, 7% 38%, 39% 38%);
  background: linear-gradient(135deg, rgba(101,220,200,.22), rgba(244,199,102,.16));
}
.verb-image-poster.taquin-image-garden .mark-a,
.verb-image-poster.taquin-image-garden .mark-b,
.verb-image-poster.taquin-image-garden .mark-c {
  border-bottom: 12px solid rgba(101,220,200,.4);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}
.game-window[data-active-game] .verb-image-poster.taquin-image-citadel {
  background:
    linear-gradient(135deg, rgba(79,52,42,.54), rgba(21,81,101,.44)),
    linear-gradient(180deg, rgba(255,248,223,.16), rgba(3,9,17,.78)),
    url("/static/assets/quest-map-background.png") 63% center / cover no-repeat;
}
.verb-image-poster.taquin-image-citadel::before {
  clip-path: polygon(14% 81%, 14% 34%, 28% 34%, 28% 19%, 41% 19%, 41% 34%, 59% 34%, 59% 19%, 72% 19%, 72% 34%, 86% 34%, 86% 81%);
  background:
    repeating-linear-gradient(90deg, rgba(255,248,223,.18) 0 8px, rgba(3,9,17,.08) 8px 18px),
    linear-gradient(180deg, rgba(244,199,102,.2), rgba(15,23,42,.16));
}
.verb-image-poster.taquin-image-citadel .mark-a,
.verb-image-poster.taquin-image-citadel .mark-b,
.verb-image-poster.taquin-image-citadel .mark-c {
  border-top: 11px solid rgba(255,248,223,.38);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}
.game-window[data-active-game] .runner-lane {
  background:
    linear-gradient(90deg, rgba(255,255,255,.2), transparent 14% 86%, rgba(255,255,255,.2)),
    linear-gradient(180deg, rgba(15,23,42,.4), rgba(3,9,17,.86)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.game-window[data-active-game] :where(.stimulus-card, .scene-titlebar, .quest-launch-card, .mole-feedback) {
  text-shadow: 0 2px 10px rgba(0,0,0,.58);
}
.game-window[data-active-game] :where(.stage-title, .scene-titlebar strong, .stimulus-card strong) {
  overflow-wrap: anywhere;
}
.game-window[data-active-game="balloons"] .balloon-sky {
  background:
    linear-gradient(180deg, rgba(34, 95, 143, .30), rgba(4, 13, 27, .62)),
    radial-gradient(circle at 50% 20%, rgba(244,199,102,.18), transparent 28%),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}
.game-window[data-active-game="balloons"] .cloud {
  z-index: 1;
  width: 154px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.38);
  background: linear-gradient(180deg, rgba(248,253,255,.90), rgba(186,222,239,.62));
  opacity: .54;
  filter: drop-shadow(0 12px 18px rgba(2,6,23,.26));
  pointer-events: none;
}
.game-window[data-active-game="balloons"] .cloud::before {
  content: "";
  position: absolute;
  left: 20px;
  top: -24px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(252,254,255,.92), rgba(204,231,243,.66));
  box-shadow:
    42px -9px 0 9px rgba(239,249,254,.78),
    86px 5px 0 -4px rgba(210,235,246,.66);
}
.game-window[data-active-game="balloons"] .cloud::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 4px;
  height: 9px;
  border-radius: 999px;
  background: rgba(116,162,185,.22);
  filter: blur(4px);
}
.game-window[data-active-game="balloons"] .cloud-a { width: 162px; top: 48px; }
.game-window[data-active-game="balloons"] .cloud-b { width: 138px; top: 132px; opacity: .48; }
.game-window[data-active-game="balloons"] .cloud-c { width: 122px; height: 40px; opacity: .42; }
.game-window[data-active-game="crossword"] .crossword-row {
  border-color: rgba(244,199,102,.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.045)),
    rgba(3, 9, 17, .88);
  color: #fffdf8;
}
.game-window[data-active-game="crossword"] .crossword-row strong {
  color: #fffdf8;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,.56);
}
.game-window[data-active-game="crossword"] .crossword-row input {
  border-color: rgba(244,199,102,.34);
  background: rgba(255,253,248,.96);
  color: #07101a;
  font-weight: 950;
}
.game-window[data-active-game="crossword"] .crossword-cell-input {
  color: #07101a;
  text-shadow: none;
}
.game-window[data-active-game="runner"] .runner-target {
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04)),
    rgba(3, 9, 17, .86);
}
.game-window[data-active-game="runner"] .runner-target strong {
  border: 1px solid rgba(244,199,102,.42);
  border-radius: 8px;
  padding: 5px 10px;
  background: rgba(255,253,248,.96);
  color: #07101a;
  line-height: 1.05;
  text-shadow: none;
}
.game-window[data-active-game="runner"] .runner-gate {
  border-color: rgba(255,248,220,.86);
  background:
    linear-gradient(180deg, #fff6c7, #f4c766 62%, #c48732);
  color: #07101a;
  font-size: clamp(1.22rem, 2.35vw, 1.82rem);
  line-height: 1;
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.52);
  box-shadow:
    0 18px 34px rgba(0,0,0,.32),
    inset 0 0 0 1px rgba(255,255,255,.34);
}
.game-window[data-active-game="runner"] .runner-gate.runner-gate-long {
  font-size: clamp(1rem, 1.9vw, 1.38rem);
}
.game-window[data-active-game="runner"] .runner-gate.runner-gate-very-long {
  font-size: clamp(.84rem, 1.6vw, 1.12rem);
}
.game-window[data-active-game="runner"] .runner-lane.correct .runner-gate {
  background: linear-gradient(180deg, #dcfce7, #86efac 60%, #16a34a);
  color: #052e16;
}
.game-window[data-active-game="runner"] .runner-lane.wrong .runner-gate {
  background: linear-gradient(180deg, #fee2e2, #fca5a5 58%, #dc2626);
  color: #450a0a;
}

@media (max-width: 760px) {
  .game-window:not([data-active-game="quiz"]) .game-window-toolbar {
    position: relative;
    top: auto;
  }
}

.app-layout {
  align-items: start;
}
.panel {
  border-color: rgba(244,199,102,.18);
  background:
    radial-gradient(circle at 18% 0%, rgba(101,220,200,.12), transparent 28%),
    linear-gradient(180deg, rgba(8, 24, 36, .96), rgba(5, 13, 23, .95));
  color: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 18px 48px rgba(3,7,18,.28);
}
.panel.active {
  display: grid;
  gap: 14px;
}
.panel-head {
  margin-bottom: 0;
}
.panel-head h1 {
  color: #fffdf8;
  text-shadow: none;
}
.panel .eyebrow {
  color: #8fded0;
}
.panel input,
.panel select {
  border-color: rgba(255,255,255,.16);
  color: #f7fbff;
  background: rgba(3, 9, 17, .58);
}
.panel .ghost {
  border-color: rgba(255,255,255,.16);
  color: #f7fbff;
  background: rgba(255,255,255,.07);
}
.panel .primary {
  border: 1px solid rgba(244,199,102,.34);
  background: linear-gradient(180deg, #fff0a8, #f4c766 58%, #b9822f);
  color: #102537;
}
#panel-games .panel-head { order: 1; }
#panel-games .game-grid { order: 2; }
#panel-games .game-discovery { order: 3; }
#panel-games .next-gen-hub { order: 4; }
#panel-games .scoring-guide { order: 5; }
.scoring-guide {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.045);
  color: #f7fbff;
}
.scoring-guide strong,
.scoring-guide dt {
  color: #fffdf8;
}
.scoring-guide dd,
.scoring-guide span {
  color: rgba(217,227,234,.72);
}

@media (max-width: 760px) {
  .arena-summary-metrics,
  .arena-challenge-metrics,
  .arena-flow,
  .arena-mode-grid {
    grid-template-columns: 1fr;
  }

  .arena-challenge-card > header,
  .arena-public-lobby > header,
  .arena-mode-picker > header,
  .arena-lobby-card > header,
  .arena-lobby-meta,
  .arena-private-code-card,
  .arena-mode-card footer,
  .arena-challenge-card footer,
  .arena-challenge-list > header,
  .arena-results header {
    align-items: stretch;
    flex-direction: column;
  }

  .arena-result-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .arena-duel-line {
    grid-template-columns: 1fr;
  }

  .arena-duel-stage .arena-duel-line {
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    gap: 4px;
  }

  .arena-duel-vs {
    justify-self: center;
    width: 30px;
    height: 30px;
  }

  .arena-duel-stage .arena-duel-vs {
    width: 28px;
    height: 28px;
    font-size: .58rem;
  }

  .arena-duel-player {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .arena-duel-stage .arena-duel-player {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 32px;
    padding: 3px 5px;
  }

  .arena-duel-player .quest-avatar-portrait.compact,
  .arena-avatar-placeholder {
    width: 34px;
    height: 34px;
  }

  .arena-duel-stage .arena-duel-player .quest-avatar-portrait.compact,
  .arena-duel-stage .arena-avatar-placeholder {
    width: 28px;
    height: 28px;
  }

  .arena-duel-player b {
    grid-column: 2;
    justify-self: start;
  }

  .arena-duel-stage .arena-duel-player b {
    grid-column: auto;
  }

  .arena-profile-body {
    grid-template-columns: 1fr;
  }

  .arena-profile-figure {
    min-height: 320px;
  }

  .arena-profile-figure .quest-avatar-full-display {
    min-height: 320px;
  }

  .arena-profile-figure .quest-avatar-full-figure {
    width: min(330px, 98vw);
  }

  .arena-profile-metrics {
    grid-template-columns: 1fr;
  }

  .arena-profile-score-list > span {
    grid-template-columns: 1fr;
  }

  .arena-result-row > span:nth-child(3) {
    grid-column: 2;
  }

  .topbar {
    border-bottom-color: rgba(244,199,102,.16);
    background: rgba(4, 10, 19, .94);
  }

  .brand-lockup {
    justify-content: flex-start;
    gap: 8px;
  }

  .brand-lockup span {
    font-size: .98rem;
  }

  .top-actions {
    grid-template-columns: minmax(78px, .68fr) minmax(0, 1fr) minmax(72px, .62fr);
  }

  .top-actions select,
  .top-actions button,
  .account-pill {
    min-height: 40px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 850;
  }

  .app-layout {
    gap: 8px;
    padding: 8px;
  }

  .side-nav {
    top: 0;
    margin: 0 -8px;
    padding: 7px 8px;
    background: rgba(4, 10, 19, .92);
  }

  .nav-button {
    min-width: 92px;
    min-height: 38px;
    border-color: rgba(255,255,255,.18);
    border-radius: 8px;
    padding: 0 10px;
    background: rgba(255,255,255,.07);
    color: rgba(247,251,255,.82);
    font-size: .78rem;
    white-space: nowrap;
  }

  .nav-button.active {
    border-color: rgba(244,199,102,.42);
    background: linear-gradient(180deg, rgba(244,199,102,.24), rgba(101,220,200,.14));
    color: #fffdf8;
  }

  .panel {
    border-radius: 8px;
    padding: 12px;
  }

  .panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .panel-head h1 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .game-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .game-controls select,
  .game-controls button {
    flex: none;
    min-width: 0;
  }

  #panel-games .next-gen-hub {
    display: none;
  }

  #panel-games .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #panel-games .game-card {
    min-height: 210px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 6px 8px;
    padding: 10px;
  }

  #panel-games .game-mini-icon {
    width: 42px;
    height: 42px;
  }

  #panel-games .game-card-title {
    font-size: .9rem;
    line-height: 1.08;
  }

  #panel-games .game-card small {
    grid-column: 1 / -1;
    justify-self: stretch;
    min-height: 26px;
    padding: 4px 6px;
    font-size: .66rem;
    line-height: 1.15;
  }

  #panel-games .game-ratings {
    grid-template-columns: 1fr;
  }

  #panel-games .game-guidance-tags span {
    font-size: .62rem;
  }

  #panel-games .game-discovery {
    padding: 10px;
  }

  #panel-games .game-discovery-grid {
    grid-template-columns: 1fr;
  }

  #panel-games .game-discovery-list button {
    grid-template-columns: 24px minmax(0, 1fr) minmax(64px, auto);
  }

  .game-window[data-active-game] .game-profile-card {
    gap: 6px;
    padding: 8px;
    font-size: .84rem;
  }

  .game-window[data-active-game] .game-profile-ratings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .game-window[data-active-game] .start-screen:not(.quiz-arcade-start) {
    align-content: start;
    place-items: stretch center;
    min-height: 0;
    padding: 10px 8px;
    gap: 8px;
  }

  .game-window[data-active-game] .start-screen:not(.quiz-arcade-start) .game-start-emblem {
    width: 52px;
    height: 52px;
    margin-bottom: 0;
  }

  .game-window[data-active-game] .start-screen:not(.quiz-arcade-start) .stage-title {
    margin: 0;
    font-size: clamp(1.35rem, 6vw, 1.8rem);
    line-height: 1.08;
  }

  .game-window[data-active-game] .start-screen:not(.quiz-arcade-start) .stage-subtitle {
    margin: 0;
    font-size: .76rem;
    line-height: 1.25;
  }

  .game-window[data-active-game] .game-profile-card header {
    gap: 8px;
  }

  .game-window[data-active-game] .game-profile-card header span {
    font-size: .58rem;
  }

  .game-window[data-active-game] .game-profile-card header strong {
    font-size: .9rem;
  }

  .game-window[data-active-game] .game-profile-card .game-mini-icon {
    width: 34px;
    height: 34px;
  }

  .game-window[data-active-game] .game-profile-card p {
    font-size: .68rem;
    line-height: 1.2;
  }

  .game-window[data-active-game] .game-profile-card p + p {
    display: none;
  }

  .game-window[data-active-game] .start-screen:not(.quiz-arcade-start) .big-start,
  .game-window[data-active-game] .start-screen:not(.quiz-arcade-start) #stageStartButton {
    width: min(240px, 100%);
    min-height: 48px;
    font-size: 1rem;
  }

  .progress-dashboard {
    gap: 10px;
  }

  .progress-dashboard-hero {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    gap: 12px;
    padding: 12px;
    text-align: left;
  }

  .progress-dashboard-ring {
    width: 82px;
    height: 82px;
  }

  .progress-dashboard-ring strong {
    font-size: 1.25rem;
  }

  .progress-dashboard-ring span {
    font-size: .58rem;
  }

  .progress-dashboard-hero h3 {
    font-size: 1.3rem;
  }

  .progress-dashboard-hero p:not(.eyebrow) {
    font-size: .78rem;
    line-height: 1.3;
  }

  .progress-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .progress-metric-card {
    padding: 10px;
  }

  .progress-metric-card strong {
    font-size: 1.45rem;
  }

  .progress-dashboard-columns {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .progress-game-list article,
  .progress-skill-list article,
  .progress-verb-review article {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .quest-utility-panel {
    gap: 8px;
    padding: 10px;
  }

  .quest-utility-head strong {
    font-size: 1.35rem;
    line-height: 1.05;
  }

  .quest-utility-section > p {
    font-size: .78rem;
  }

  .quest-progress-hero-detail {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    gap: 10px;
    padding: 10px;
    text-align: left;
  }

  .quest-progress-orbit {
    width: 82px;
    height: 82px;
  }

  .quest-progress-orbit strong {
    font-size: 1.25rem;
  }

  .quest-progress-orbit span {
    font-size: .58rem;
  }

  .quest-progress-hero-detail > div:last-child strong {
    font-size: 1.12rem;
  }

  .quest-progress-hero-detail > div:last-child small {
    font-size: .68rem;
  }

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

  .quest-progress-detail-grid div {
    padding: 9px;
  }

  .quest-progress-detail-grid strong {
    font-size: 1.1rem;
  }

  .quest-progress-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .game-result-experience {
    grid-template-columns: 1fr;
    width: calc(100% - 16px);
    padding: 13px;
  }

  .game-result-emblem {
    width: 48px;
    height: 48px;
    font-size: 1.45rem;
  }

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

  .game-result-experience .primary {
    justify-self: stretch;
  }

  .quest-result-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quest-result-toast {
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
  }
}

.public-home-body {
  color: #161a1f;
  background: #f7fbf7;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 12px max(18px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid rgba(18, 20, 23, .1);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
}

.public-brand,
.public-nav-actions,
.public-hero-actions {
  display: flex;
  align-items: center;
}

.public-brand {
  gap: 10px;
  min-width: 0;
  color: #11151a;
  text-decoration: none;
  font-weight: 950;
}

.public-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.public-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-nav-actions {
  gap: 10px;
  flex: 0 0 auto;
}

.public-language select {
  min-height: 38px;
  width: 112px;
  border: 1px solid rgba(18, 20, 23, .12);
  border-radius: 8px;
  padding: 0 10px;
  color: #11151a;
  background: white;
  font-weight: 850;
}

.public-link,
.public-secondary-cta {
  color: inherit;
  text-decoration: none;
  font-weight: 900;
}

.public-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 10px;
}

.public-cta-small {
  min-height: 38px;
  background: #11151a;
}

.public-home {
  display: grid;
  gap: 0;
}

.public-hero {
  position: relative;
  display: grid;
  min-height: 76vh;
  align-items: center;
  padding: 72px max(18px, calc((100% - 1180px) / 2)) 96px;
  color: white;
  background:
    linear-gradient(90deg, rgba(13, 18, 28, .84), rgba(13, 18, 28, .42) 54%, rgba(13, 18, 28, .16)),
    url("/static/assets/quest-map-background.png") center / cover no-repeat;
}

.public-hero-content {
  display: grid;
  gap: 20px;
  width: min(760px, 100%);
  text-shadow: 0 3px 18px rgba(0, 0, 0, .42);
}

.public-kicker {
  margin: 0;
  color: #00d4b6;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.public-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: 5.4rem;
  line-height: .92;
  letter-spacing: 0;
}

.public-hero-copy {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, .92);
  font-size: 1.22rem;
  line-height: 1.55;
  font-weight: 760;
}

.public-hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.public-main-cta {
  min-height: 48px;
  background: linear-gradient(135deg, #00b894, #3a86ff);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.public-secondary-cta {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 8px;
  padding: 0 16px;
  color: white;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(8px);
}

.public-beta-note {
  max-width: 620px;
  margin: 0;
  border-left: 5px solid #00d4b6;
  border-radius: 8px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, .95);
  background: rgba(0, 0, 0, .3);
  font-weight: 850;
  line-height: 1.45;
}

.public-section {
  width: 100%;
  padding: 64px max(18px, calc((100% - 1180px) / 2));
}

.public-section-head {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-bottom: 24px;
}

.public-section h2,
.public-final-cta h2 {
  margin: 0;
  color: #121417;
  font-size: 2.5rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.public-game-strip {
  background: #fffdf8;
}

.public-game-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.public-game-card,
.public-proof-grid article {
  border: 1px solid rgba(18, 20, 23, .1);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 48px rgba(18, 20, 23, .08);
}

.public-game-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
}

.public-game-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
  background: #edf5f8;
}

.public-game-card h3,
.public-proof-grid h2 {
  margin: 0;
  color: #121417;
  letter-spacing: 0;
}

.public-game-card p,
.public-proof-grid p,
.public-learning-band li,
.public-final-cta p {
  margin: 0;
  color: #4d5965;
  line-height: 1.55;
  font-weight: 700;
}

.public-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  background: linear-gradient(135deg, #eef9f5, #fff4f5);
}

.public-proof-grid article {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.public-proof-grid span {
  color: #ef476f;
  font-size: 3rem;
  line-height: 1;
  font-weight: 950;
}

.public-learning-band {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
  background: #ffffff;
}

.public-learning-band ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-learning-band li {
  border-left: 5px solid #3a86ff;
  border-radius: 8px;
  padding: 13px 14px;
  background: #f4f8ff;
}

.public-learning-band li:nth-child(2) { border-left-color: #00b894; background: #effbf7; }
.public-learning-band li:nth-child(3) { border-left-color: #ffd166; background: #fff8e7; }
.public-learning-band li:nth-child(4) { border-left-color: #ef476f; background: #fff1f5; }

.public-final-cta {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 68px 18px 76px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(18, 20, 23, .84), rgba(18, 20, 23, .7)),
    url("/static/assets/flash-choice/arcade-bg.png") center / cover no-repeat;
}

.public-final-cta h2,
.public-final-cta p {
  max-width: 760px;
  color: white;
}

@media (max-width: 920px) {
  .public-hero h1 {
    font-size: 4.1rem;
  }

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

  .public-learning-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .public-nav {
    align-items: stretch;
    padding: 10px 12px;
  }

  .public-brand span {
    display: none;
  }

  .public-nav-actions {
    gap: 7px;
  }

  .public-language select {
    width: 86px;
    padding: 0 7px;
  }

  .public-link {
    padding: 0 6px;
  }

  .public-cta-small {
    padding-inline: 12px;
  }

  .public-hero {
    min-height: 72vh;
    padding: 48px 16px 72px;
    background-position: 56% center;
  }

  .public-hero h1 {
    font-size: 3.2rem;
  }

  .public-hero-copy {
    font-size: 1rem;
  }

  .public-main-cta,
  .public-secondary-cta {
    width: 100%;
    justify-content: center;
  }

  .public-section {
    padding: 44px 14px;
  }

  .public-section h2,
  .public-final-cta h2 {
    font-size: 2rem;
  }

  .public-game-cards,
  .public-proof-grid {
    grid-template-columns: 1fr;
  }
}
