/* GlobeTint — Toybox Explorer (Board Game Edition) */
:root {
  color-scheme: light;
  /* Core 9-color Toybox Explorer palette */
  --bg: #f7f1e8;
  --surface: #fffaf2;
  --ink: #2b2118;
  --muted: #6b5b4b;
  --primary: #b54822;
  --accent: #e0a03a;
  --emerald: #1f7a4c;
  --ocean: #7ac7d2;
  --land: #ebd8b7;

  /* Derived shades via color-mix */
  --surface-warm: color-mix(in srgb, var(--bg), var(--land) 45%);
  --primary-hover: color-mix(in srgb, var(--primary), var(--ink) 18%);
  --accent-soft: color-mix(in srgb, var(--accent), var(--surface) 38%);
  --emerald-bright: color-mix(in srgb, var(--emerald), var(--accent) 20%);
  --emerald-dark: color-mix(in srgb, var(--emerald), var(--ink) 28%);
  --ocean-top: color-mix(in srgb, var(--ocean), var(--surface) 34%);
  --land-dim: color-mix(in srgb, var(--land), var(--ocean) 54%);
  --line: color-mix(in srgb, var(--bg), var(--muted) 34%);
  --rail-a: color-mix(in srgb, var(--ink), var(--muted) 26%);
  --rail-b: color-mix(in srgb, var(--ink), var(--muted) 12%);
  --warn: color-mix(in srgb, var(--primary), var(--ink) 8%);
  --dot-bg: color-mix(in srgb, var(--muted) 15%, transparent);
  --grid-line: color-mix(in srgb, var(--surface) 30%, transparent);
  --backdrop: color-mix(in srgb, var(--ink) 62%, transparent);
  --sea-blue: color-mix(in srgb, var(--ocean), var(--ink) 56%);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 0 var(--ink);
  --shadow-card: 0 4px 0 var(--ink);
  --font-display: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden], dialog:not([open]) { display: none !important; }
html { scroll-padding-top: 16px; overflow-x: clip; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot-bg) 1px, transparent 1px);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  overflow-x: clip;
}
h1, h2, h3 { font-family: 'Baloo 2', ui-rounded, system-ui, sans-serif; }
button, input { font-family: inherit; font-size: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; top: 12px; left: 12px; z-index: 20;
  background: var(--surface); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: var(--radius-sm);
  padding: 8px 14px; font-weight: 800; box-shadow: var(--shadow-sm);
}
.ui-icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; pointer-events: none; }

/* Header */
.hdr { padding: 14px 0 8px; }
.hdr-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); }
.brand-badge {
  display: grid; place-items: center; width: 38px; height: 38px;
  transition: transform .2s ease;
}
.brand-badge svg { width: 38px; height: 38px; }
.brand:hover .brand-badge { transform: rotate(-8deg) scale(1.06); }
.brand-tint { color: var(--primary); }

.nav-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.nav-pill a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 6px 14px;
  border-radius: 999px; border: 2px solid transparent;
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 14.5px; line-height: 1.1; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .12s;
}
.nav-pill a:hover { background: var(--surface-warm); color: var(--ink); }
.nav-pill a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Hero (compact, above-the-fold board priority) */
.hero { padding: 10px 0 14px; text-align: center; }
.hero-in { display: flex; flex-direction: column; align-items: center; }
.crumbs {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 6px; padding: 3px 12px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted);
}
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.hero-title-row {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 4vw, 44px); line-height: 1.15;
  letter-spacing: -0.02em; color: var(--ink);
  text-wrap: balance;
}
.title-seal {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  transform: rotate(8deg);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.title-seal svg { width: 42px; height: 42px; }
.title-seal.is-pop { animation: seal-pop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes seal-pop {
  0% { transform: rotate(8deg) scale(1); }
  45% { transform: rotate(-14deg) scale(1.25); }
  100% { transform: rotate(8deg) scale(1); }
}
.lede {
  margin: 6px auto 0; max-width: 66ch;
  color: var(--muted); font-size: 16px; font-weight: 700; line-height: 1.45;
}
.hero-sub { padding: 20px 0 24px; }

/* Game Board Shell */
.board {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 48px;
}
html:has(.board.is-fullscreen) { overflow: hidden; }
.board.is-fullscreen {
  position: fixed; inset: 0; z-index: 50;
}
.board.is-fullscreen,
.board:fullscreen {
  width: 100%; max-width: none; height: 100dvh; margin: 0;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: var(--bg); overflow: auto;
}
.board.is-fullscreen .stage,
.board:fullscreen .stage { min-height: calc(100dvh - 24px); align-items: stretch; }
.board.is-fullscreen .playfield,
.board:fullscreen .playfield { display: flex; flex-direction: column; }
.board.is-fullscreen .mapwrap,
.board:fullscreen .mapwrap { flex: 1; height: auto; min-height: 280px; }

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 16px;
  align-items: start;
}

.playfield,
.passport-card {
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.board[data-fever="high"] .playfield {
  box-shadow: 0 4px 0 var(--ink), 0 0 0 3px var(--accent);
}
.board[data-fever="max"] .playfield {
  box-shadow: 0 4px 0 var(--ink), 0 0 0 4px var(--primary);
}

/* Playfield Top Toolbar */
.playfield {
  padding: 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.playbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.playbar-left { display: inline-flex; align-items: center; gap: 10px; }
.map-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.15;
  color: var(--ink); letter-spacing: -0.015em;
}
.quiz-clock {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  background: var(--accent-soft);
  border: 2px solid var(--ink); border-radius: 999px;
  font-size: 13px; font-weight: 800; color: var(--ink);
}
.quiz-clock b {
  font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.quiz-clock.is-urgent {
  background: var(--primary); color: var(--surface);
  animation: clock-pulse .85s ease-in-out infinite;
}
@keyframes clock-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.view-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px;
  background: var(--surface-warm);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.view-switch button {
  min-height: 32px; padding: 4px 14px;
  border: 2px solid transparent; border-radius: 999px;
  background: transparent; color: var(--muted);
  font-weight: 800; font-size: 14px; line-height: 1;
  transition: background-color .15s, color .15s, border-color .15s;
}
.view-switch button:hover { color: var(--ink); }
.view-switch button[aria-pressed="true"] {
  background: var(--surface); color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

.hud { display: inline-flex; align-items: center; gap: 6px; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 36px; padding: 5px 11px;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius-sm);
  font-weight: 800; font-size: 14px; line-height: 1;
  box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .12s, background-color .15s;
}
.tool-icon-only { width: 36px; padding: 0; }
.tool-btn:hover { background: var(--surface-warm); transform: translateY(-1px); }
.tool-btn:active { transform: translateY(2px); box-shadow: none; }
.snd .snd-off { display: none; }
.snd[aria-pressed="false"] .snd-on { display: none; }
.snd[aria-pressed="false"] .snd-off { display: inline-block; color: var(--muted); }
.snd[aria-pressed="false"] { color: var(--muted); background: var(--bg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 18px;
  border: 2.5px solid var(--ink); border-radius: 12px;
  font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.1;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s, background-color .15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary {
  background: var(--primary); color: var(--surface);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-ghost {
  background: var(--surface); color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-warm); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-width: 2px; box-shadow: var(--shadow-sm); }

/* Answer Form & Target Card */
.answer { display: flex; gap: 10px; align-items: stretch; }
.typer {
  flex: 1; min-width: 0; min-height: 48px;
  padding: 10px 14px;
  background: var(--surface); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 12px;
  font-weight: 700; font-size: 16px; line-height: 1.2;
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--ink) 8%, transparent);
  transition: border-color .15s, background-color .15s;
}
.typer::placeholder { color: var(--muted); font-weight: 600; }
.typer.is-shake {
  border-color: var(--warn);
  background: color-mix(in srgb, var(--surface), var(--primary) 10%);
  animation: input-shake .34s ease-in-out;
}
@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-6px); }
  45% { transform: translateX(6px); }
  68% { transform: translateX(-4px); }
  85% { transform: translateX(3px); }
}
.answer .btn-primary { min-width: 124px; white-space: nowrap; font-size: 17px; }

.target-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  min-height: 48px; padding: 8px 10px 8px 14px;
  background: var(--accent-soft);
  border: 2.5px solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.target-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 800; color: var(--ink);
  text-transform: uppercase; letter-spacing: .04em;
}
.target-card strong {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(18px, 2.2vw, 24px); line-height: 1.1;
  color: var(--ink); overflow-wrap: anywhere;
}

.feedback {
  margin: -2px 2px 0; min-height: 22px;
  font-size: 14px; font-weight: 800; line-height: 1.35;
  color: var(--muted);
}
.feedback[data-kind="ok"] { color: var(--emerald-dark); }
.feedback[data-kind="ok"]::before { content: '✓ '; }
.feedback[data-kind="bad"] { color: var(--warn); }
.feedback[data-kind="bad"]::before { content: '! '; }

/* Map Canvas */
.mapwrap {
  position: relative;
  height: clamp(320px, 50vh, 490px);
  overflow: hidden; isolation: isolate;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background-color: var(--ocean);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(160deg, var(--ocean-top), var(--ocean));
  background-size: 36px 36px, 36px 36px, 100% 100%;
  background-position: center;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--surface) 24%, transparent);
}
.board[data-active-view="globe"] .mapwrap {
  touch-action: none;
  background-image:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--surface) 25%, transparent), transparent 64%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(160deg, var(--ocean-top), var(--ocean));
  background-size: 100% 100%, 36px 36px, 36px 36px, 100% 100%;
}
.map { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.map:focus-visible { outline-offset: -4px; }
.board[data-active-mode="locate"] .map { cursor: crosshair; }
.board .map:is(.is-dragging, :active) { cursor: grabbing; }

.map-country, .map-territory {
  fill: var(--land);
  stroke: var(--muted);
  stroke-width: 0.72;
  vector-effect: non-scaling-stroke;
  transition: fill .18s ease, stroke .18s ease;
}
.map-country[data-atlas-region="EU"] { fill: color-mix(in srgb, var(--land), var(--surface) 18%); }
.map-country[data-atlas-region="AF"] { fill: color-mix(in srgb, var(--land), var(--accent) 12%); }
.map-country[data-atlas-region="AS"] { fill: color-mix(in srgb, var(--land), var(--surface) 12%); }
.map-country[data-atlas-region="AM"] { fill: var(--land); }
.map-country[data-atlas-region="OC"] { fill: color-mix(in srgb, var(--land), var(--surface) 24%); }
.map-territory, .map-country.out-of-region {
  fill: var(--land-dim); stroke: color-mix(in srgb, var(--ocean), var(--ink) 28%);
}
.map-territory[data-disputed-area] {
  stroke: var(--muted); stroke-dasharray: 2.5 2.5;
}
.map-country.is-found {
  fill: var(--emerald-bright);
  stroke: var(--emerald-dark);
}
.map-country.just-found {
  fill: var(--accent-soft);
  stroke: var(--ink);
  stroke-width: 1.8;
}
.map-country.is-miss {
  fill: var(--warn);
  stroke: var(--ink);
  stroke-width: 1.3;
}
@media (hover: hover) {
  .board[data-active-mode="locate"] .map-country:hover:not(.is-found, .is-miss, .out-of-region) {
    fill: var(--accent-soft);
    stroke: var(--ink);
    stroke-width: 1.3;
  }
}

.globe-grid { fill: none; stroke: color-mix(in srgb, var(--ink) 22%, transparent); pointer-events: none; }
.globe-disc { filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--ink) 24%, transparent)); }
.globe-rim { stroke: var(--ink); stroke-width: 3; pointer-events: none; }
.globe .map-country.just-found { animation: globe-answer .75s ease-out both; }
@keyframes globe-answer {
  0%, 100% { stroke-width: 1.5; }
  30% { fill: var(--accent-soft); stroke-width: 3.2; }
}

.chart-rose {
  position: absolute; left: 12px; bottom: 10px;
  width: 58px; height: 58px;
  pointer-events: none; z-index: 2;
}
.chart-rose svg { width: 100%; height: 100%; }

.mapctl {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  display: grid; gap: 6px;
}
.mapbtn {
  width: 34px; height: 34px; padding: 0;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 9px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1;
  box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .12s, background-color .15s;
}
.mapbtn:hover:not(:disabled) { background: var(--accent-soft); transform: translateY(-1px); }
.mapbtn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.mapbtn:disabled { background: var(--surface-warm); box-shadow: none; }

.mapload, .maperr {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-wrap: wrap; align-content: center;
  align-items: center; justify-content: center; gap: 10px;
  padding: 18px; text-align: center; font-weight: 800;
  background: color-mix(in srgb, var(--ocean-top) 92%, transparent); color: var(--ink);
}
.maperr p { width: 100%; margin: 0; }
.spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-top-color: var(--primary);
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

/* Floating Score, Combo Banner & Confetti Particles */
.floaters { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.floater {
  position: absolute; left: 50%; bottom: 18%;
  padding: 6px 14px;
  background: var(--accent-soft); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1;
  box-shadow: 0 3px 0 var(--ink);
  animation: points-pop .92s cubic-bezier(.22,1,.36,1) both;
}
.floater-globe { top: calc(50% - 48px); bottom: auto; }
@keyframes points-pop {
  0% { transform: translate(-50%, 14px) scale(.72); opacity: 0; }
  20% { transform: translate(-50%, 0) scale(1.1); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(-50%, -34px) scale(.96); opacity: 0; }
}
.combo-pop {
  position: absolute; left: 50%; top: 14px;
  padding: 7px 16px;
  background: var(--primary); color: var(--surface);
  border: 2.5px solid var(--ink); border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1;
  letter-spacing: .02em;
  box-shadow: 0 3px 0 var(--ink); white-space: nowrap;
  animation: combo-ticket 1.15s cubic-bezier(.22,1,.36,1) both;
}
@keyframes combo-ticket {
  0% { transform: translate(-50%, -22px) rotate(-5deg) scale(.68); opacity: 0; }
  20%, 75% { transform: translate(-50%, 0) rotate(-2deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -10px) rotate(-2deg) scale(.95); opacity: 0; }
}
.confetti-dot {
  position: absolute; width: 9px; height: 9px;
  border-radius: 2px; border: 1.5px solid var(--ink);
  animation: confetti-burst .85s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes confetti-burst {
  0% { transform: translate(0, 0) scale(.6) rotate(0deg); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); opacity: 0; }
}

.map-key {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.map-key > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.key-chip {
  display: inline-block; width: 12px; height: 12px;
  border: 1.5px solid var(--emerald-dark); border-radius: 3px;
  background: var(--emerald-bright);
}
.key-chip-disputed { border: 1.5px dashed var(--muted); background: var(--land-dim); }
.map-key a { color: var(--ink); }
.map-instruction { margin: 0 0 0 auto; font: inherit; color: var(--muted); }


/* Right Sidebar: My Passport Console */
.passport-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.passport-section { display: flex; flex-direction: column; gap: 10px; }
.passport-section + .passport-section {
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}
.passport-head h2 {
  margin: 0; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1;
  color: var(--ink);
}
.progress-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.run-count {
  margin: 0; color: var(--muted);
  font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.run-count b {
  color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1;
  letter-spacing: -0.03em;
}
.rank-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px;
  background: var(--accent); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 800; font-size: 13px; line-height: 1.1;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease;
}
.rank-pill.is-levelup {
  animation: rank-pop .55s cubic-bezier(.34,1.56,.64,1);
}
@keyframes rank-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.22) rotate(-4deg); background: var(--primary); color: var(--surface); }
  100% { transform: scale(1); }
}

.rail {
  height: 14px;
  background: repeating-linear-gradient(
    -55deg,
    var(--rail-a) 0 8px,
    var(--rail-b) 8px 16px
  );
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  padding: 1px;
}
.rail-fill {
  display: block; width: 0; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--emerald-bright));
  transition: width .38s cubic-bezier(.16,1,.3,1);
}
.rail.complete .rail-fill { background: var(--emerald-bright); }

.run-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.metric-box {
  padding: 9px 10px;
  background: var(--surface-warm);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 0;
}
.metric-label {
  font-size: 13px; font-weight: 800; color: var(--muted); line-height: 1.1;
}
.metric-box b {
  font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.combo-head {
  display: inline-flex; align-items: baseline; gap: 5px;
}
.combo-box[data-hot="1"] { background: var(--accent-soft); }
.combo-box[data-hot="2"] {
  background: color-mix(in srgb, var(--accent), var(--surface) 22%);
  border-color: var(--primary);
}
.combo-box[data-hot="1"] b,
.combo-box[data-hot="2"] b { color: var(--primary); }

.combo-pips {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
}
.combo-pips i {
  display: block; width: 13px; height: 13px; border-radius: 50%;
  background: var(--rail-a); border: 1.8px solid var(--ink);
  transition: background-color .18s, transform .22s cubic-bezier(.34,1.56,.64,1);
}
.combo-pips i.is-lit {
  background: var(--accent);
  transform: scale(1.1);
}
.combo-pips.is-max i.is-lit {
  background: var(--primary);
}

.side-k {
  margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.15;
  color: var(--ink);
}

/* Region Filter Grid */
.regions {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
}
.region {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 38px; padding: 5px 4px;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 10px;
  font-weight: 800; font-size: 13px; line-height: 1.1;
  box-shadow: var(--shadow-sm);
  transition: transform .12s, background-color .15s, box-shadow .12s;
}
.region:hover { background: var(--surface-warm); transform: translateY(-1px); }
.region:active { transform: translateY(2px); box-shadow: none; }
.region[aria-pressed="true"] {
  background: var(--accent); color: var(--ink);
}
.region-size {
  font-size: 12px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.region[aria-pressed="true"] .region-size { color: var(--ink); opacity: .85; }

/* Latest Stamps Feed */
.feed {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 7px;
  max-block-size: 13.5rem; overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.feed:empty::before {
  content: 'Your first passport stamp appears here.';
  display: block; text-align: center; padding: 14px 10px;
  background: var(--bg); color: var(--muted);
  border: 2px dashed var(--line); border-radius: 10px;
  font-size: 13px; font-weight: 700;
}
.feed li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 10px;
  padding: 6px 10px;
  background: var(--surface-warm);
  border: 2px solid var(--ink); border-radius: 11px;
  font-size: 14px; font-weight: 800; color: var(--ink);
}
.feed li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed li b {
  font-family: var(--font-display); font-weight: 800; font-size: 14px; line-height: 1;
  color: var(--emerald-dark); font-variant-numeric: tabular-nums;
}
.feed li:first-child .country-seal { animation: ink-stamp .38s cubic-bezier(.22,1,.36,1) both; }

.country-seal {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 12px; line-height: 1;
  letter-spacing: .04em;
  background: var(--surface);
  border: 3px double var(--emerald);
  color: var(--emerald-dark);
  transform: rotate(-8deg);
  font-style: normal;
}
.feed li:nth-child(even) .country-seal { transform: rotate(6deg); }
.feed li[data-atlas-region="AS"] .country-seal { border-color: var(--primary); color: var(--primary); }
.feed li[data-atlas-region="EU"] .country-seal { border-color: var(--sea-blue); color: var(--sea-blue); }
.feed li[data-atlas-region="AM"] .country-seal { border-color: var(--emerald); color: var(--emerald-dark); }
.feed li[data-atlas-region="AF"] .country-seal { border-color: var(--accent); color: var(--ink); }
.feed li[data-atlas-region="OC"] .country-seal { border-color: var(--muted); color: var(--ink); }
@keyframes ink-stamp {
  0% { opacity: 0; transform: scale(1.65) rotate(-24deg); }
  65% { opacity: 1; transform: scale(.88) rotate(-6deg); }
  100% { transform: scale(1) rotate(-8deg); }
}

.passport-footer { display: flex; flex-direction: column; gap: 8px; }
.missed-toggle { width: 100%; }
.missed {
  list-style: none; padding: 10px 12px; margin: 0;
  max-height: 200px; overflow: auto;
  background: var(--bg); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 10px;
  font-size: 14px; font-weight: 700;
}
.missed li + li { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }

/* Modals */
.endcard {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px); overflow: auto;
  padding: 26px 24px;
  background: var(--surface); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 20px;
  box-shadow: 0 8px 0 var(--ink); text-align: center;
}
.endcard::backdrop { background: var(--backdrop); }
.end-medal {
  margin: 0 auto 12px; width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); border: 3px solid var(--ink);
  box-shadow: var(--shadow-card); transform: rotate(-6deg);
}
.end-medal svg { width: 38px; height: 38px; color: var(--ink); }
.end-k { margin: 0 0 4px; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.15; }
.end-rank {
  display: inline-block; margin: 4px 0 8px; padding: 3px 12px;
  background: var(--surface-warm); border: 2px solid var(--ink);
  border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--ink);
}
.end-rank:empty { display: none; }
.end-score { margin: 6px 0 18px; }
.end-score b {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(38px, 9vw, 56px); line-height: 1;
  color: var(--primary); font-variant-numeric: tabular-nums;
}
.end-score span { margin-left: 6px; font-weight: 800; color: var(--muted); }
.end-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.end-stats div {
  padding: 10px; background: var(--surface-warm);
  border: 2px solid var(--ink); border-radius: 12px;
}
.end-stats dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.end-stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.1;
  color: var(--ink);
}
.end-best { margin: 14px 0 8px; font-weight: 800; color: var(--emerald-dark); }
.endcard .btn { width: 100%; margin-top: 8px; }
.switch-dialog p { margin: 12px 0 20px; color: var(--muted); font-weight: 600; }
.switch-dialog form { display: flex; gap: 10px; }
.switch-dialog .btn { flex: 1; margin: 0; }

/* Bottom Field Guide (SEO Prose) */
.guide-shell { margin-bottom: 56px; }
.field-guide {
  max-width: 860px; margin-inline: auto;
  padding: 32px 36px;
  background: var(--surface);
  border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: var(--shadow-card);
  color: var(--ink);
}
.field-guide > :first-child { margin-top: 0; }
.field-guide p, .field-guide li { max-width: 70ch; color: var(--muted); font-size: 16px; line-height: 1.65; }
.field-guide strong { color: var(--ink); font-weight: 800; }
.field-guide h2 {
  margin: 40px 0 12px; padding-bottom: 8px;
  border-bottom: 2px dashed var(--line);
  font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.2;
  color: var(--ink);
}
.field-guide h3 {
  margin: 26px 0 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.25;
  color: var(--ink);
}
.field-guide ol {
  counter-reset: step; list-style: none; padding: 0; margin: 16px 0 20px;
  display: grid; gap: 10px;
}
.field-guide ol li {
  counter-increment: step; position: relative;
  padding: 12px 16px 12px 50px;
  background: var(--bg); border: 2px solid var(--line); border-radius: 12px;
  max-width: none;
}
.field-guide ol li::before {
  content: counter(step);
  position: absolute; left: 14px; top: 12px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 14px; line-height: 1;
}
.field-guide ul:not(.country-list) {
  padding-left: 20px; margin: 14px 0 18px; display: grid; gap: 8px;
}
.field-guide details {
  margin-top: 10px;
  background: var(--bg);
  border: 2px solid var(--ink); border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.field-guide summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  font-weight: 800; font-size: 16px; line-height: 1.35; color: var(--ink);
}
.field-guide summary::-webkit-details-marker { display: none; }
.field-guide summary::after {
  content: '+'; flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1;
}
.field-guide details[open] summary::after { content: '−'; background: var(--accent); }
.field-guide details p {
  margin: 0; padding: 0 16px 14px; max-width: 70ch;
}

/* Country Index (/name-all-countries) */
.country-index {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px;
}
.country-index a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px;
  background: var(--surface-warm); color: var(--ink); text-decoration: none;
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 800; font-size: 14px; line-height: 1; box-shadow: var(--shadow-sm);
}
.country-index a:hover { background: var(--accent); color: var(--ink); }
.field-guide .country-list {
  columns: 11rem; column-gap: 24px;
  padding-left: 18px; margin: 12px 0 24px; max-width: none;
}
.country-list li { break-inside: avoid; margin-bottom: 4px; }
.country-list + h2 { scroll-margin-top: 16px; }

/* Footer */
.ftr {
  background: var(--surface-warm);
  border-top: 3px solid var(--ink);
  padding: 22px 0 28px;
}
.ftr-in {
  display: flex; flex-wrap: wrap; gap: 12px 20px;
  align-items: center; justify-content: space-between;
}
.ftr-brand { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.ftr-brand strong { color: var(--ink); }
.ftr nav { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; font-weight: 700; }
.ftr nav a { color: var(--ink); text-decoration: none; }
.ftr nav a:hover { color: var(--primary); text-decoration: underline; }

/* Tablet & Mobile Responsive */
@media (max-width: 920px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .passport-card {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start;
  }
  .passport-section + .passport-section { border-top: 0; padding-top: 0; }
  .log-card, .passport-footer { grid-column: 1 / -1; padding-top: 12px; border-top: 2px dashed var(--line); }
  .mapwrap { height: clamp(280px, 56vw, 440px); }
}

@media (max-width: 640px) {
  .wrap, .board { width: calc(100% - 20px); }
  .board { margin-bottom: 32px; }
  .hdr { padding: 8px 0 4px; }
  .hdr-in { justify-content: center; gap: 8px; }
  .brand { font-size: 20px; gap: 7px; }
  .brand-badge, .brand-badge svg { width: 32px; height: 32px; }
  .nav-pill {
    width: 100%; padding: 4px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    border-radius: 14px;
  }
  .nav-pill a { min-height: 34px; padding: 5px 6px; font-size: 12.5px; text-align: center; white-space: normal; }
  .hero { padding: 4px 0 10px; }
  .hero-sub { padding: 12px 0 14px; }
  .crumbs { margin-bottom: 4px; font-size: 12px; }
  .hero-title-row { gap: 8px; }
  .hero h1 { font-size: 26px; }
  .title-seal, .title-seal svg { width: 28px; height: 28px; }
  .lede { font-size: 13.5px; line-height: 1.38; margin-top: 4px; }

  .playfield { padding: 10px; gap: 8px; border-radius: 14px; }
  .playbar { gap: 6px 8px; }
  .playbar-left { gap: 6px; flex: 1 1 auto; min-width: 0; }
  .map-title { font-size: 18px; }
  .quiz-clock { padding: 2px 8px; font-size: 12px; }
  .quiz-clock b { font-size: 14px; }
  .hud { order: 2; gap: 5px; }
  .view-switch, .shape-bar-mid { order: 3; width: 100%; }
  .view-switch { display: grid; grid-template-columns: 1fr 1fr; }
  .view-switch button { min-height: 34px; padding: 4px 8px; font-size: 13px; }
  .tool-btn span { display: none; }
  .tool-btn { width: 36px; height: 36px; padding: 0; }

  /* Keep input + submit compact on one line for soft keyboard comfort */
  .answer { flex-direction: row; gap: 6px; }
  .typer { min-height: 44px; padding: 8px 11px; font-size: 16px; }
  .answer .btn { min-height: 44px; padding: 8px 12px; font-size: 15px; }
  .answer .btn-primary { min-width: 92px; width: auto; }
  .target-card { grid-template-columns: 1fr auto; gap: 6px 10px; padding: 7px 9px 7px 12px; }
  .target-label { grid-column: 1 / -1; font-size: 12px; }
  .target-card strong { font-size: 19px; }
  .feedback { font-size: 13px; }

  .mapwrap { height: clamp(235px, 64vw, 360px); }
  .chart-rose { width: 40px; height: 40px; left: 8px; bottom: 8px; }
  .mapctl { grid-auto-flow: column; right: 8px; bottom: 8px; gap: 5px; }
  .mapbtn { width: 38px; height: 38px; font-size: 19px; }
  .map-key { font-size: 12px; gap: 4px 10px; }
  .map-instruction { font-size: 12px; }

  .passport-card {
    padding: 12px; border-radius: 14px;
    grid-template-columns: minmax(0, 1fr); gap: 12px;
  }
  .passport-section + .passport-section { border-top: 2px dashed var(--line); padding-top: 10px; }
  .run-count b { font-size: 28px; }
  .region { min-height: 40px; font-size: 12.5px; }
  .feed { max-block-size: 12rem; }
  .endcard { padding: 20px 16px; }
  .end-k { font-size: 24px; }
  .switch-dialog form { flex-direction: column; }

  .field-guide { padding: 20px 16px; border-radius: 14px; }
  .field-guide h2 { font-size: 22px; margin-top: 30px; }
  .field-guide h3 { font-size: 18px; }
  .field-guide ol li { padding: 10px 12px 10px 44px; font-size: 15px; }
  .field-guide ol li::before { left: 10px; top: 10px; width: 24px; height: 24px; font-size: 13px; }
  .field-guide .country-list { columns: 8.5rem; column-gap: 16px; }
  .ftr { padding: 18px 0 24px; }
  .ftr-in { justify-content: center; text-align: center; }
  .ftr nav { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
}


/* Country Shape Quiz — Silhouette Sprint Mode */
.feedback-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; min-height: 26px;
}
.feedback-row .feedback { margin: 0; }

.shape-q-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px;
  background: var(--surface-warm); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px;
  font-family: var(--font-display); font-weight: 800; font-size: 14px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.shape-bar-mid { display: inline-flex; align-items: center; gap: 6px; }
.hint-btn {
  background: var(--accent-soft); color: var(--ink);
}
.hint-btn:hover:not(:disabled) { background: var(--accent); }
.hint-btn[aria-pressed="true"] {
  background: var(--surface-warm); color: var(--muted); box-shadow: none;
}

.shape-timer-track {
  position: absolute; top: 0; left: 0; right: 0; height: 7px; z-index: 3;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  pointer-events: none;
}
.shape-timer-bar {
  display: block; height: 100%; width: 100%;
  background: var(--emerald-bright);
  transform-origin: left center;
  transition: width .12s linear, background-color .2s ease;
}
.shape-timer-bar[data-warn="mid"] { background: var(--accent); }
.shape-timer-bar[data-warn="low"] { background: var(--primary); }

/* Silhouette vs Neighbors Reveal */
.board[data-shape-reveal="silhouette"] .mapwrap {
  background-color: var(--bg);
  background-image:
    linear-gradient(color-mix(in srgb, var(--muted) 14%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--muted) 14%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}
.board[data-shape-reveal="silhouette"] .chart-rose { opacity: .28; }
.board[data-shape-reveal="silhouette"] .map-country,
.board[data-shape-reveal="silhouette"] .map-territory {
  opacity: 0; pointer-events: none;
  transition: opacity .32s ease, fill .2s ease;
}
.board[data-shape-reveal="neighbors"] .map-country,
.board[data-shape-reveal="neighbors"] .map-territory {
  opacity: 1;
  transition: opacity .35s ease, fill .2s ease;
}
.board[data-active-mode="shape"] .map-country.is-shape-target {
  opacity: 1 !important;
  fill: var(--accent-soft);
  stroke: var(--ink);
  stroke-width: 1.8;
}
.board[data-active-mode="shape"] .map-country.is-shape-target.is-shape-ok {
  fill: var(--emerald-bright);
  stroke: var(--emerald-dark);
}
.board[data-active-mode="shape"] .map-country.is-shape-target.is-shape-bad {
  fill: var(--primary);
  stroke: var(--ink);
}

.shape-beacon {
  fill: none; stroke: var(--primary); stroke-width: 2.2;
  vector-effect: non-scaling-stroke; pointer-events: none;
  animation: beacon-ring 1.2s ease-out infinite;
  transform-box: fill-box; transform-origin: center;
}
@keyframes beacon-ring {
  0% { opacity: .95; transform: scale(.7); }
  100% { opacity: 0; transform: scale(2.1); }
}

/* Pre-game Mode Selector Overlay */
.shape-start {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center; padding: 12px;
  overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}
.shape-start-card {
  width: min(460px, 100%);
  padding: 20px;
  background: var(--surface);
  border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: var(--shadow-card);
  text-align: center;
  display: flex; flex-direction: column; gap: 12px;
}
.shape-start-k {
  margin: 0;
  font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.15;
  color: var(--ink);
}
.shape-start-sub {
  margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.4;
}
.shape-pick {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.shape-pick-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-height: 68px; padding: 10px 12px;
  background: var(--bg); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s, background-color .15s, box-shadow .12s;
}
.shape-pick-btn strong {
  font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1.15;
}
.shape-pick-btn span {
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.shape-pick-btn:hover { background: var(--surface-warm); transform: translateY(-1px); }
.shape-pick-btn[aria-pressed="true"] {
  background: var(--accent); color: var(--ink);
}
.shape-pick-btn[aria-pressed="true"] span { color: var(--ink); opacity: .88; }
.shape-go { width: 100%; font-size: 18px; }

/* Multiple Choice Grid */
.choices {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.choice-btn {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 8px 14px;
  background: var(--surface); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 12px;
  font-weight: 800; font-size: 15px; line-height: 1.2; text-align: left;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s, background-color .15s;
}
.choice-btn:hover:not(:disabled) { background: var(--surface-warm); transform: translateY(-1px); }
.choice-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.choice-key {
  flex: none; width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--surface-warm); color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 13px; line-height: 1;
}
.choice-btn.is-right {
  background: var(--emerald); color: var(--surface);
  opacity: 1;
}
.choice-btn.is-right .choice-key { background: var(--surface); color: var(--emerald-dark); }
.choice-btn.is-wrong {
  background: var(--primary); color: var(--surface);
  opacity: 1;
}
.choice-btn.is-wrong .choice-key { background: var(--surface); color: var(--primary); }

.feed li.is-failed { background: var(--bg); opacity: .86; }
.feed li.is-failed b { color: var(--warn); }

@media (max-width: 640px) {
  /* Shape Quiz mobile ergonomics: map silhouette above 2x2 thumb choices */
  .board[data-active-mode="shape"] .playbar { order: 1; }
  .board[data-active-mode="shape"] .mapwrap {
    order: 2; height: clamp(255px, 68vw, 340px); min-height: 255px;
  }
  .board[data-active-mode="shape"] .feedback-row { order: 3; }
  .board[data-active-mode="shape"] .choices,
  .board[data-active-mode="shape"] .answer { order: 4; }
  .board[data-active-mode="shape"] .map-key { order: 5; }

  .shape-bar-mid .hint-btn { width: 100%; height: 36px; padding: 5px 10px; }
  .hint-btn span { display: inline; font-size: 13px; }
  .shape-start { padding: 8px; }
  .shape-start-card { padding: 12px; gap: 8px; border-radius: 14px; }
  .shape-start-k { font-size: 19px; }
  .shape-start-sub { font-size: 12.5px; line-height: 1.3; }
  .shape-pick { grid-template-columns: 1fr 1fr; gap: 8px; }
  .shape-pick-btn { min-height: 54px; padding: 7px 6px; gap: 2px; }
  .shape-pick-btn strong { font-size: 14px; }
  .shape-pick-btn span { font-size: 12px; line-height: 1.15; }
  .shape-go { min-height: 44px; font-size: 16px; }

  .choices { grid-template-columns: 1fr 1fr; gap: 7px; }
  .choice-btn {
    min-height: 46px; padding: 7px 10px;
    font-size: 13.5px; justify-content: center; text-align: center;
  }
  .choice-key { display: none; }
}
