:root {
  --paper: #fbf7f1;
  --paper-deep: #f4eee3;
  --ink: #1a3a5c;
  --text: #26384a;
  --muted: #7c8b99;
  --line: #eadfcb;
  --soft-line: #f1e9da;
  --white: #fff;
  --orange: #f4a228;
  --orange-dark: #e0901a;
  --blue-mid: #407fa9;
  --blue-dark: #102c48;
  --good: #2f9f76;
  --bad: #c75d4f;
  --shadow: 0 1px 2px rgba(26, 58, 92, 0.04), 0 10px 34px rgba(26, 58, 92, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(244, 162, 40, 0.12), transparent 30%),
    radial-gradient(circle at 96% 4%, rgba(26, 58, 92, 0.08), transparent 26%),
    linear-gradient(180deg, var(--paper), var(--paper-deep));
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.nk-app {
  width: min(1180px, calc(100vw - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 44px;
}

.nk-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border: 1px solid var(--soft-line);
  border-radius: 18px;
  background: rgba(251, 247, 241, 0.9);
  box-shadow: 0 1px 2px rgba(26, 58, 92, 0.04), 0 4px 14px rgba(26, 58, 92, 0.05);
  backdrop-filter: saturate(140%) blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

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

.primary-button,
.ghost-button {
  min-height: 40px;
  border-radius: 999px;
  font-family: "Quicksand", sans-serif;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
}

.primary-button {
  padding: 9px 16px;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(244, 162, 40, 0.3);
}

.primary-button:hover {
  border-color: var(--orange-dark);
  background: var(--orange-dark);
}

.ghost-button {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.ghost-button:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.is-hidden {
  display: none !important;
}

.primary-button:active,
.ghost-button:active,
.move-button:active,
.mode-chip:active,
.game-tab:active,
.option-chip:active,
.game-hook:active {
  transform: translateY(1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 28px 2px 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--orange-dark);
  font-family: "Quicksand", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow > span:first-child {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
}

h1 {
  margin-top: 6px;
  font-size: clamp(38px, 8vw, 82px);
  line-height: 0.94;
}

h1 span {
  color: var(--orange);
}

.hero p {
  max-width: 650px;
  margin: 12px 0 0;
  color: #40556a;
  font-size: 17px;
  line-height: 1.55;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 112px);
  gap: 10px;
}

.score-box {
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 14px rgba(26, 58, 92, 0.05);
  text-align: center;
}

.score-box span,
.panel-section h2,
.game-head h2 {
  display: block;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.score-box span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.score-box strong {
  color: var(--ink);
  font-size: 25px;
  font-weight: 900;
}

.accent-score {
  background: #fff7ec;
  border-color: rgba(244, 162, 40, 0.45);
}

.accent-score strong {
  color: var(--orange-dark);
}

.nk-grid {
  display: grid;
  grid-template-columns: minmax(270px, 358px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.setup-panel,
.game-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.setup-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 18px 22px;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-section + .panel-section {
  padding-top: 18px;
  border-top: 1px solid var(--soft-line);
}

.game-picker {
  display: grid;
  gap: 9px;
}

.game-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px auto;
  gap: 7px;
}

.game-search {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.game-search:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 162, 40, 0.16);
}

.picker-icon {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
}

.picker-icon:hover,
.picker-icon.active {
  border-color: var(--orange);
  background: #fff3dc;
  color: var(--orange-dark);
}

.picker-random {
  min-height: 42px;
  min-width: 78px;
  padding: 8px 12px;
  border-radius: 13px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-chip,
.recent-game-chip {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
}

.category-chip:hover,
.recent-game-chip:hover {
  border-color: var(--orange);
}

.category-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.game-hooks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.game-hook {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid rgba(26, 58, 92, 0.1);
  border-radius: 13px;
  background: linear-gradient(135deg, #fff8e9, #ffe4ad);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.08;
  text-align: left;
  box-shadow: inset 0 -1px 0 rgba(26, 58, 92, 0.08);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, filter 0.15s;
}

.game-hook:nth-child(2) {
  background: linear-gradient(135deg, #f3fbf7, #ccebdd);
}

.game-hook:nth-child(3) {
  background: linear-gradient(135deg, #eef7ff, #c9e0f0);
}

.game-hook:nth-child(4) {
  background: linear-gradient(135deg, #fff2ee, #ffd0c3);
}

.game-hook:hover {
  border-color: var(--orange);
  box-shadow: inset 0 -1px 0 rgba(26, 58, 92, 0.08), 0 7px 18px rgba(26, 58, 92, 0.1);
  filter: saturate(1.04);
}

.game-hook:active {
  transform: translateY(1px);
}

.game-hook span {
  display: block;
  max-width: 100%;
  color: rgba(26, 58, 92, 0.72);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.game-picker-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recent-games {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.recent-games.is-empty {
  display: none;
}

.recent-game-chip {
  min-height: 28px;
  padding: 5px 8px;
  border-color: var(--soft-line);
  background: #fff8e9;
  color: var(--orange-dark);
  font-size: 10px;
}

.game-tabs,
.option-grid {
  display: grid;
  gap: 7px;
}

.game-tabs {
  grid-template-columns: 1fr;
  max-height: min(48vh, 520px);
  overflow: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

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

.option-grid[data-count="1"] {
  grid-template-columns: 1fr;
}

.game-tab,
.option-chip,
.mode-chip {
  min-height: 52px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.12;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
}

.game-tab {
  position: relative;
  min-height: 44px;
  padding-right: 34px;
  text-align: left;
}

.game-tab.is-filtered-out {
  display: none;
}

.game-tab.is-favorite::after {
  content: "★";
  position: absolute;
  top: 50%;
  right: 11px;
  color: var(--orange-dark);
  transform: translateY(-50%);
}

.game-tab.is-recent:not(.is-favorite)::after {
  content: "•";
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--blue-mid);
  font-size: 20px;
  transform: translateY(-50%);
}

.game-tab.active::after {
  color: var(--orange);
}

.option-chip span,
.mode-chip span {
  color: var(--orange-dark);
  font-size: 15px;
}

.game-tab:hover,
.option-chip:hover,
.mode-chip:hover {
  border-color: var(--orange);
}

.game-tab.active,
.option-chip.active,
.mode-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.option-chip.active span,
.mode-chip.active span {
  color: var(--orange);
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-areas:
    ". up ."
    "left down right";
  justify-content: center;
  gap: 10px;
}

.move-button {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 28px;
  font-weight: 700;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
}

.move-button:hover {
  border-color: var(--orange);
  background: #fff7ec;
  color: var(--orange-dark);
}

.up { grid-area: up; }
.left { grid-area: left; }
.down { grid-area: down; }
.right { grid-area: right; }

.tip-panel p {
  margin: 0;
  color: #5c6b7a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.game-card {
  padding: 24px;
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.game-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.wide {
  min-width: 126px;
}

#keep-playing {
  display: none;
}

#keep-playing.visible {
  display: inline-grid;
}

.board-wrap {
  position: relative;
  width: min(100%, 640px);
  margin: 0 auto;
}

.game-board {
  touch-action: none;
  user-select: none;
  transform: translateZ(0);
}

.game-board button,
.game-board [class*="-cell"],
.game-board [class*="-card"],
.game-board [class*="-token"],
.game-board [class*="-choice"] {
  backface-visibility: hidden;
  contain: paint;
  transition:
    transform 150ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    opacity 150ms ease;
}

.game-board :is(.good, .found, .matched):not(.snake-cell):not(.tile) {
  animation: state-confirm 170ms ease both;
}

.game-board :is(.selected, .filled):not(.snake-cell):not(.tile) {
  animation: state-settle 130ms ease both;
}

@keyframes state-confirm {
  0% { transform: scale(0.985); }
  70% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

@keyframes state-settle {
  0% { transform: scale(0.99); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .game-board *,
  .primary-button,
  .ghost-button,
  .move-button,
  .game-tab,
  .option-chip,
  .game-hook {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

.board-2048 {
  --gap: 12px;
  --pad: 12px;
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.grid-cells,
.tile-layer {
  position: absolute;
  inset: var(--pad);
}

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

.tile-layer {
  pointer-events: none;
}

.grid-cell {
  min-width: 0;
  min-height: 0;
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.42);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.07);
}

.tile {
  position: absolute;
  display: grid;
  place-items: center;
  width: calc((100% - (var(--gap) * 3)) / 4);
  height: calc((100% - (var(--gap) * 3)) / 4);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.42);
  color: var(--white);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 7vw, 64px);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.10);
  transform: translate(
    calc(var(--col) * (100% + var(--gap))),
    calc(var(--row) * (100% + var(--gap)))
  );
  transition: transform 210ms ease;
  will-change: transform;
}

.tile-new {
  animation: tile-pop 140ms ease both;
}

.tile-removed {
  z-index: 1;
}

.tile-survivor {
  z-index: 3;
}

.tile[data-value="1"] { background: #ffffff; color: var(--ink); }
.tile[data-value="2"] { background: #fffdf8; color: var(--ink); }
.tile[data-value="4"] { background: #fff3dc; color: var(--ink); }
.tile[data-value="8"] { background: #ffd58b; color: #5b3900; }
.tile[data-value="16"] { background: #f7bb5f; color: #4a2e00; }
.tile[data-value="32"] { background: #f4a228; color: var(--white); }
.tile[data-value="64"] { background: #e0901a; color: var(--white); }
.tile[data-value="128"] { background: #6ea6c8; color: var(--white); font-size: clamp(24px, 6vw, 54px); }
.tile[data-value="256"] { background: #407fa9; color: var(--white); font-size: clamp(24px, 6vw, 54px); }
.tile[data-value="512"] { background: #1a5e8b; color: var(--white); font-size: clamp(24px, 6vw, 54px); }
.tile[data-value="1024"] { background: #1a3a5c; color: var(--white); font-size: clamp(20px, 5vw, 46px); }
.tile[data-value="2048"] { background: #102c48; color: #ffd58b; font-size: clamp(20px, 5vw, 46px); }
.tile.super { background: #0d2238; color: #ffd58b; font-size: clamp(18px, 4.6vw, 42px); }

@keyframes tile-pop {
  0% { scale: 0.94; }
  100% { opacity: 1; scale: 1; }
}

.match-board,
.path-board,
.memory-board,
.fraction-board,
.clock-board,
.hunt-board,
.merge-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
  aspect-ratio: 1;
  width: 100%;
  padding: 12px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.memory-board,
.fraction-board,
.clock-board {
  grid-template-columns: repeat(4, 1fr);
}

.match-cell,
.path-cell,
.memory-card,
.fraction-card,
.clock-card,
.hunt-cell,
.merge-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border-radius: 13px;
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  line-height: 1;
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease, opacity 130ms ease;
}

.match-cell {
  border: 2px solid transparent;
  background: #fffdf8;
  color: var(--ink);
  font-size: clamp(24px, 6vw, 54px);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.match-cell:hover,
.path-cell:hover,
.merge-cell:hover {
  transform: translateY(-1px);
}

.match-cell.selected {
  border-color: var(--orange);
  background: #fff3dc;
  box-shadow: 0 0 0 3px rgba(244, 162, 40, 0.18), inset 0 -4px 0 rgba(26, 58, 92, 0.06);
}

.match-cell.good {
  border-color: var(--good);
  background: #e5f6ef;
}

.match-cell.bad {
  border-color: var(--bad);
  background: #fff0ee;
}

.match-cell.matched {
  opacity: 0.18;
  color: transparent;
  pointer-events: none;
}

.path-cell {
  position: relative;
  border: 2px solid transparent;
  background: #fffdf8;
  color: var(--ink);
  font-size: clamp(20px, 5vw, 46px);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.path-cell.hint {
  border-color: rgba(244, 162, 40, 0.38);
  background: #fff7ec;
}

.path-cell.current {
  outline: 3px solid rgba(26, 58, 92, 0.16);
  outline-offset: -3px;
}

.path-cell.done {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.path-cell.wrong {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.line-hop-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.line-hop-prompt,
.line-hop-result {
  display: grid;
  place-items: center;
  min-height: 116px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.line-hop-result {
  min-height: 96px;
  background: #e9f3f8;
}

.line-hop-prompt span,
.line-hop-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.line-hop-prompt strong,
.line-hop-result strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(42px, 8vw, 78px);
  font-weight: 800;
  line-height: 0.95;
}

.line-hop-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--line-count), minmax(0, 1fr));
  gap: 6px;
  min-height: 164px;
  padding: 52px 10px 12px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.line-hop-track::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 42px;
  height: 6px;
  border-radius: 999px;
  background: rgba(26, 58, 92, 0.24);
}

.line-hop-tick {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 82px;
  padding: 7px 3px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(15px, 3.5vw, 32px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.line-hop-tick::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: rgba(26, 58, 92, 0.44);
  transform: translateX(-50%);
}

.line-hop-tick:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.line-hop-tick.start {
  border-color: rgba(26, 58, 92, 0.32);
  background: #e9f3f8;
}

.line-hop-tick.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.line-hop-tick.target,
.line-hop-tick.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.line-hop-tick.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.line-hop-board.good .line-hop-result {
  background: #e5f6ef;
}

.line-hop-board.bad .line-hop-result {
  background: #fff0ee;
}

.coordinate-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.coordinate-prompt,
.coordinate-result {
  display: grid;
  place-items: center;
  min-height: 104px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.coordinate-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.coordinate-prompt strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(44px, 9vw, 82px);
  font-weight: 800;
  line-height: 0.95;
}

.coordinate-grid {
  display: grid;
  grid-template-columns: 42px repeat(var(--coord-size), minmax(0, 1fr));
  grid-template-rows: repeat(var(--coord-size), minmax(0, 1fr)) 42px;
  gap: 7px;
  min-height: 292px;
  padding: 12px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.coordinate-axis,
.coordinate-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  font-family: "Quicksand", sans-serif;
  font-weight: 800;
  line-height: 1;
}

.coordinate-axis {
  background: #e9f3f8;
  color: var(--ink);
  font-size: clamp(15px, 3vw, 24px);
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.06);
}

.coordinate-corner {
  background: var(--ink);
  color: #fffdf8;
}

.coordinate-cell {
  border: 2px solid transparent;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.coordinate-cell::after {
  content: "";
  width: clamp(14px, 3vw, 24px);
  height: clamp(14px, 3vw, 24px);
  border-radius: 50%;
  background: rgba(26, 58, 92, 0.22);
}

.coordinate-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.coordinate-cell.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.coordinate-cell.target,
.coordinate-cell.good {
  border-color: var(--good);
  background: #e5f6ef;
}

.coordinate-cell.target::after,
.coordinate-cell.good::after {
  background: #1f6f53;
}

.coordinate-cell.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.coordinate-cell.bad::after {
  background: var(--bad);
}

.coordinate-result {
  min-height: 62px;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 800;
  text-align: center;
}

.coordinate-board.good .coordinate-result {
  background: #e5f6ef;
  color: #1f6f53;
}

.coordinate-board.bad .coordinate-result {
  background: #fff0ee;
  color: var(--bad);
}

.data-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.data-prompt {
  display: grid;
  place-items: center;
  min-height: 104px;
  padding: 12px;
  border-radius: 16px;
  background: #fffdf8;
  text-align: center;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.data-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-prompt strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 800;
  line-height: 1.05;
}

.data-chart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 252px;
  padding: 14px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.data-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  min-width: 0;
  height: 100%;
  gap: 8px;
}

.data-bar-fill {
  display: grid;
  place-items: start center;
  align-self: end;
  min-height: 18px;
  height: calc((var(--bar-value) / var(--data-max)) * 100%);
  padding-top: 8px;
  border-radius: 13px 13px 8px 8px;
  background: linear-gradient(180deg, #ffd58b, #f4a228);
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.10), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: background 130ms ease, transform 130ms ease;
}

.data-bar-fill strong {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(16px, 3.5vw, 28px);
  font-weight: 800;
  line-height: 1;
}

.data-bar em {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 5px 4px;
  border-radius: 11px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(14px, 3vw, 22px);
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.06);
}

.data-bar.highlight .data-bar-fill {
  background: linear-gradient(180deg, #8ed6bc, #2f9f76);
}

.data-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.data-choice {
  min-width: 0;
  min-height: 76px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(18px, 4.4vw, 38px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.data-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.data-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.data-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.data-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.data-board.good .data-prompt {
  background: #e5f6ef;
}

.data-board.bad .data-prompt {
  background: #fff0ee;
}

.mirror-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.mirror-prompt,
.mirror-counter {
  display: grid;
  place-items: center;
  min-height: 86px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.mirror-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mirror-prompt strong,
.mirror-counter {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 6vw, 56px);
  font-weight: 800;
  line-height: 1;
}

.mirror-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 7px;
  aspect-ratio: 1;
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.mirror-grid::before {
  content: "";
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 0 5px rgba(255, 253, 248, 0.72);
  pointer-events: none;
}

.mirror-grid.vertical::before {
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 5px;
  transform: translateX(-50%);
}

.mirror-grid.horizontal::before {
  left: 12px;
  right: 12px;
  top: 50%;
  height: 5px;
  transform: translateY(-50%);
}

.mirror-cell {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.mirror-cell::after {
  content: "";
  width: clamp(16px, 3.5vw, 30px);
  height: clamp(16px, 3.5vw, 30px);
  border-radius: 50%;
  background: transparent;
}

.mirror-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.mirror-cell.source {
  border-color: rgba(26, 58, 92, 0.24);
  background: #e9f3f8;
}

.mirror-cell.source::after {
  background: var(--ink);
}

.mirror-cell.found {
  border-color: var(--good);
  background: #e5f6ef;
}

.mirror-cell.found::after {
  background: #1f6f53;
}

.mirror-cell.wrong {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.mirror-cell.wrong::after {
  background: var(--bad);
}

.mirror-board.good .mirror-counter {
  background: #e5f6ef;
  color: #1f6f53;
}

.mirror-board.bad .mirror-counter {
  background: #fff0ee;
  color: var(--bad);
}

.prime-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.prime-prompt,
.prime-counter {
  display: grid;
  place-items: center;
  min-height: 86px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.prime-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prime-prompt strong,
.prime-counter {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(30px, 6.4vw, 58px);
  font-weight: 800;
  line-height: 1;
}

.prime-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  aspect-ratio: 1;
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.prime-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 2px solid transparent;
  border-radius: 13px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(20px, 4.8vw, 44px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease, opacity 130ms ease;
}

.prime-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.prime-cell.found {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
  opacity: 0.72;
}

.prime-cell.wrong {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.prime-board.good .prime-counter {
  background: #e5f6ef;
  color: #1f6f53;
}

.prime-board.bad .prime-counter {
  background: #fff0ee;
  color: var(--bad);
}

.angle-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.angle-prompt {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 12px;
  border-radius: 16px;
  background: #fffdf8;
  text-align: center;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.angle-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.angle-prompt strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(30px, 6vw, 58px);
  font-weight: 800;
  line-height: 1.05;
}

.angle-figure {
  position: relative;
  min-height: 246px;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(26, 58, 92, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(26, 58, 92, 0.06) 1px, transparent 1px),
    #fff8e9;
  background-size: 34px 34px;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.angle-ray {
  position: absolute;
  left: 50%;
  bottom: 54px;
  width: min(39%, 210px);
  height: 9px;
  border-radius: 999px;
  background: var(--ink);
  transform-origin: 0 50%;
  box-shadow: 0 5px 12px rgba(26, 58, 92, 0.15);
}

.angle-ray.base {
  transform: rotate(0deg);
}

.angle-ray.moving {
  background: var(--orange);
  transform: rotate(var(--angle-negative));
}

.angle-vertex {
  position: absolute;
  left: 50%;
  bottom: 45px;
  width: 27px;
  height: 27px;
  border: 5px solid #fffdf8;
  border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%);
  box-shadow: 0 6px 14px rgba(26, 58, 92, 0.16);
}

.angle-arc {
  position: absolute;
  left: 50%;
  bottom: 54px;
  width: 88px;
  height: 88px;
  border: 4px solid rgba(244, 162, 40, 0.36);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: translate(-2px, 50%) rotate(var(--half-angle));
  transform-origin: 0 50%;
}

.angle-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.angle-choice {
  min-width: 0;
  min-height: 78px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(18px, 4.2vw, 36px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.angle-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.angle-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.angle-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.angle-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.angle-board.good .angle-prompt {
  background: #e5f6ef;
}

.angle-board.bad .angle-prompt {
  background: #fff0ee;
}

.factor-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.factor-machine {
  display: grid;
  grid-template-columns: minmax(142px, 0.65fr) 1fr;
  gap: 12px;
  min-height: 226px;
}

.factor-target,
.factor-slots,
.factor-equation {
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.factor-target {
  display: grid;
  place-items: center;
  grid-row: span 2;
  padding: 14px;
  background: var(--ink);
  color: #fffdf8;
  text-align: center;
}

.factor-target span {
  color: rgba(255, 253, 248, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.factor-target strong {
  font-family: "Quicksand", sans-serif;
  font-size: clamp(48px, 10vw, 90px);
  font-weight: 800;
  line-height: 0.95;
}

.factor-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.factor-slot {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 106px;
  border: 3px solid rgba(255, 255, 255, 0.52);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(36px, 7vw, 68px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06);
}

.factor-slot.filled {
  border-color: rgba(244, 162, 40, 0.52);
  background: #fff3dc;
}

.factor-slot.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.factor-slot.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
}

.factor-equation {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: 10px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 5.8vw, 54px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.factor-tokens {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.factor-token {
  min-width: 0;
  min-height: 70px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.factor-token:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.factor-token.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.factor-token.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.factor-token.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.factor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.factor-board.good .factor-machine {
  filter: saturate(1.04);
}

.factor-board.bad .factor-equation {
  background: #fff0ee;
  color: var(--bad);
}

.measure-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.measure-prompt,
.measure-scene {
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.measure-prompt {
  min-height: 116px;
  padding: 12px;
  text-align: center;
}

.measure-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.measure-prompt strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(30px, 6.2vw, 60px);
  font-weight: 800;
  line-height: 1.05;
}

.measure-scene {
  gap: 16px;
  min-height: 178px;
  padding: 18px;
  background: #fff8e9;
}

.measure-ruler {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: end;
  width: min(100%, 520px);
  min-height: 68px;
  padding: 10px 12px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffd58b, #f4a228);
  box-shadow: inset 0 -6px 0 rgba(26, 58, 92, 0.13), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.measure-ruler span {
  display: block;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: var(--ink);
}

.measure-ruler span:nth-child(odd) {
  height: 40px;
}

.measure-note {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(16px, 3.4vw, 28px);
  font-weight: 800;
  text-align: center;
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.06);
}

.measure-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.measure-choice {
  min-width: 0;
  min-height: 78px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(18px, 4.4vw, 38px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.measure-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.measure-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.measure-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.measure-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.measure-board.good .measure-prompt {
  background: #e5f6ef;
}

.measure-board.bad .measure-prompt {
  background: #fff0ee;
}

.decimal-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.decimal-prompt {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 12px;
  border-radius: 16px;
  background: #fffdf8;
  text-align: center;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.decimal-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.decimal-prompt strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(34px, 7vw, 68px);
  font-weight: 800;
  line-height: 1;
}

.decimal-hundred-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  aspect-ratio: 1;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 12px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.decimal-cell {
  min-width: 0;
  min-height: 0;
  border-radius: 6px;
  background: #fffdf8;
  box-shadow: inset 0 -2px 0 rgba(26, 58, 92, 0.04);
}

.decimal-cell.filled {
  background: linear-gradient(180deg, #ffd58b, #f4a228);
}

.decimal-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.decimal-choice {
  min-width: 0;
  min-height: 76px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(20px, 4.8vw, 42px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.decimal-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.decimal-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.decimal-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.decimal-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.decimal-board.good .decimal-prompt {
  background: #e5f6ef;
}

.decimal-board.bad .decimal-prompt {
  background: #fff0ee;
}

.memory-card,
.fraction-card,
.clock-card {
  border: 2px solid rgba(255, 255, 255, 0.42);
  background: var(--ink);
  color: #fff;
  font-size: clamp(18px, 4.8vw, 40px);
  min-height: 0;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.memory-card:hover,
.fraction-card:hover,
.clock-card:hover {
  transform: translateY(-1px);
}

.memory-card.revealed,
.fraction-card.revealed,
.clock-card.revealed {
  background: #fffdf8;
  color: var(--ink);
  border-color: var(--orange);
}

.memory-card.task {
  background: #fff3dc;
}

.memory-card.answer {
  background: #e9f3f8;
}

.memory-card.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.memory-card.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.memory-card.matched {
  opacity: 0.42;
  pointer-events: none;
}

.fraction-card {
  font-size: clamp(18px, 4.6vw, 38px);
}

.fraction-card.fraction-value {
  background: #fff8e9;
}

.fraction-card.fraction-text {
  background: #e9f3f8;
}

.fraction-card.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.fraction-card.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.fraction-card.matched {
  opacity: 0.42;
  pointer-events: none;
}

.fraction-stack {
  display: grid;
  grid-template-rows: 1fr 3px 1fr;
  align-items: center;
  justify-items: center;
  min-width: 44px;
  line-height: 0.9;
}

.fraction-stack i {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.fraction-plain {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  min-height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  padding: 0 8px;
  line-height: 1;
}

.fraction-bars-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.fraction-bars-prompt {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.fraction-bars-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fraction-bars-prompt strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.95;
}

.fraction-bar {
  display: grid;
  grid-template-columns: repeat(var(--bar-parts), minmax(0, 1fr));
  gap: 6px;
  min-height: 132px;
  padding: 16px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.fraction-bars-board.good .fraction-bar {
  background: #e5f6ef;
}

.fraction-bars-board.bad .fraction-bar {
  background: #fff0ee;
}

.fraction-bar-part {
  min-width: 0;
  border-radius: 11px;
  background: #fffdf8;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06);
}

.fraction-bar-part.filled {
  background: linear-gradient(180deg, #ffd58b, #f4a228);
}

.fraction-bar-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.fraction-bar-choice {
  display: grid;
  place-items: center;
  min-height: 78px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(22px, 5vw, 44px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.fraction-bar-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.fraction-bar-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.fraction-bar-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.fraction-bar-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.fraction-compare-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.fraction-compare-prompt {
  display: grid;
  place-items: center;
  min-height: 96px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.fraction-compare-prompt span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fraction-compare-prompt strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(44px, 9vw, 82px);
  font-weight: 800;
  line-height: 0.95;
}

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

.fraction-compare-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-width: 0;
  min-height: 236px;
  padding: 14px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.fraction-compare-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fraction-compare-card strong {
  display: grid;
  place-items: center;
  min-height: 66px;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 5.6vw, 54px);
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06);
}

.fraction-compare-bar {
  display: grid;
  grid-template-columns: repeat(var(--bar-parts), minmax(0, 1fr));
  gap: 4px;
  min-height: 108px;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 15px;
  background: #fffdf8;
}

.fraction-compare-part {
  min-width: 0;
  border-radius: 8px;
  background: #f3ead8;
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.05);
}

.fraction-compare-part.filled {
  background: linear-gradient(180deg, #ffd58b, #f4a228);
}

.fraction-compare-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.fraction-compare-choice {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(34px, 8vw, 72px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.fraction-compare-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.fraction-compare-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.fraction-compare-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.fraction-compare-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.fraction-compare-board.good .fraction-compare-prompt {
  background: #e5f6ef;
}

.fraction-compare-board.bad .fraction-compare-prompt {
  background: #fff0ee;
}

.clock-card {
  font-size: clamp(18px, 4.8vw, 40px);
}

.clock-card.clock-analog {
  background: #fff8e9;
}

.clock-card.clock-text {
  background: #e9f3f8;
}

.clock-card.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.clock-card.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.clock-card.matched {
  opacity: 0.42;
  pointer-events: none;
}

.clock-face {
  position: relative;
  display: block;
  width: min(76%, 96px);
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at center, #fffdf8 0 58%, #fff3dc 59% 100%);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.08);
}

.clock-mark,
.clock-hand,
.clock-pin {
  position: absolute;
  display: block;
}

.clock-mark {
  width: 5px;
  height: 11px;
  border-radius: 999px;
  background: rgba(26, 58, 92, 0.62);
}

.clock-mark.mark-12 {
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
}

.clock-mark.mark-3 {
  top: 50%;
  right: 7px;
  transform: translateY(-50%) rotate(90deg);
}

.clock-mark.mark-6 {
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
}

.clock-mark.mark-9 {
  top: 50%;
  left: 7px;
  transform: translateY(-50%) rotate(90deg);
}

.clock-hand {
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  border-radius: 999px;
  background: var(--ink);
}

.clock-hand.hour {
  width: 7px;
  height: 28%;
  transform: translateX(-50%) rotate(var(--hour-angle));
}

.clock-hand.minute {
  width: 5px;
  height: 38%;
  background: var(--orange-dark);
  transform: translateX(-50%) rotate(var(--minute-angle));
}

.clock-pin {
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #fffdf8;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.clock-digital {
  display: inline-grid;
  place-items: center;
  min-width: 82px;
  min-height: 58px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-size: clamp(22px, 5vw, 44px);
  line-height: 1;
}

.place-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.place-target {
  display: grid;
  place-items: center;
  min-height: 124px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.place-target span,
.place-slot span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.place-target strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(56px, 11vw, 104px);
  line-height: 0.95;
}

.place-slots {
  display: grid;
  grid-template-columns: repeat(var(--place-count), minmax(0, 1fr));
  gap: 10px;
}

.place-slot {
  display: grid;
  grid-template-rows: auto 74px 1fr;
  gap: 9px;
  min-width: 0;
  min-height: 244px;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 15px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: background 130ms ease, border-color 130ms ease;
}

.place-slot > strong {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1;
}

.place-slot.selected {
  border-color: rgba(244, 162, 40, 0.52);
}

.place-slot.good {
  border-color: var(--good);
  background: #e5f6ef;
}

.place-slot.bad {
  border-color: var(--bad);
  background: #fff0ee;
}

.place-options {
  display: grid;
  gap: 7px;
}

.place-option {
  min-height: 42px;
  border: 2px solid transparent;
  border-radius: 11px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(18px, 4.4vw, 34px);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.06);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.place-option:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.place-option.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.place-option.good {
  border-color: var(--good);
  background: #d7f0e6;
  color: #1f6f53;
}

.place-option.bad {
  border-color: var(--bad);
  background: #ffe6e2;
  animation: block-nope 180ms ease;
}

.place-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.place-clear {
  min-width: 150px;
}

.equation-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.equation-target {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.equation-target span,
.equation-group > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.equation-target strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(52px, 10vw, 92px);
  line-height: 0.95;
}

.equation-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  min-height: 88px;
  padding: 12px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.equation-board.good .equation-line {
  background: #e5f6ef;
}

.equation-board.bad .equation-line {
  background: #fff0ee;
}

.equation-slot,
.equation-result {
  display: grid;
  place-items: center;
  min-width: 70px;
  min-height: 58px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(30px, 6.4vw, 58px);
  line-height: 1;
}

.equation-slot[data-slot="op"] {
  min-width: 58px;
  color: var(--orange-dark);
}

.equation-spacer {
  min-width: 18px;
  color: var(--muted);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  text-align: center;
}

.equation-result {
  background: var(--ink);
  color: #fffdf8;
}

.equation-groups {
  display: grid;
  grid-template-columns: 1fr minmax(92px, 0.55fr) 1fr;
  gap: 10px;
}

.equation-group {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 15px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.equation-group[data-slot="op"] {
  background: #e9f3f8;
}

.equation-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.equation-ops {
  display: grid;
  gap: 7px;
}

.equation-token {
  min-width: 0;
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: 11px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(20px, 4.8vw, 36px);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.06);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.equation-token:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.equation-token.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.equation-token.good {
  border-color: var(--good);
  background: #d7f0e6;
  color: #1f6f53;
}

.equation-token.bad {
  border-color: var(--bad);
  background: #ffe6e2;
  animation: block-nope 180ms ease;
}

.op-token {
  min-height: 52px;
  color: var(--orange-dark);
  font-size: clamp(26px, 5.8vw, 48px);
}

.equation-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.equation-clear {
  min-width: 124px;
}

.pattern-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.pattern-target {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.pattern-target span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pattern-target strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(52px, 10vw, 92px);
  line-height: 0.95;
}

.pattern-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  min-height: 138px;
  padding: 18px 12px 22px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.pattern-track::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 24px;
  height: 5px;
  border-radius: 999px;
  background: rgba(26, 58, 92, 0.24);
}

.pattern-car {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 84px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(22px, 4.8vw, 44px);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: background 130ms ease, border-color 130ms ease;
}

.pattern-car::before,
.pattern-car::after {
  content: "";
  position: absolute;
  bottom: -13px;
  width: 14px;
  height: 14px;
  border: 3px solid #d7c8af;
  border-radius: 50%;
  background: var(--ink);
}

.pattern-car::before {
  left: 18%;
}

.pattern-car::after {
  right: 18%;
}

.pattern-car.missing {
  border-color: rgba(244, 162, 40, 0.52);
  background: #e9f3f8;
  color: var(--orange-dark);
}

.pattern-car.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.pattern-car.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.pattern-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.pattern-choice {
  min-height: 72px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.pattern-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.pattern-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.pattern-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.pattern-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.money-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.money-target,
.money-wallet {
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.money-target {
  min-height: 112px;
}

.money-wallet {
  min-height: 94px;
  background: #fff8e9;
}

.money-target span,
.money-wallet span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.money-target strong,
.money-wallet strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  line-height: 0.95;
}

.money-target strong {
  font-size: clamp(52px, 10vw, 92px);
}

.money-wallet strong {
  font-size: clamp(34px, 7vw, 64px);
}

.money-wallet em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.money-board.good .money-wallet {
  background: #e5f6ef;
}

.money-board.bad .money-wallet {
  background: #fff0ee;
}

.money-tray {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.money-token {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 76px;
  border: 2px solid rgba(255, 255, 255, 0.44);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.08), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.money-token:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.5);
}

.money-token.coin {
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff7d8 0 22%, #ffd58b 23% 58%, #f4a228 59% 100%);
}

.money-token.note {
  border-radius: 13px;
  background: linear-gradient(135deg, #e9f3f8, #fffdf8);
}

.money-token span {
  font-size: clamp(24px, 5.5vw, 46px);
}

.money-token small {
  margin-top: -8px;
  color: rgba(26, 58, 92, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.money-token.bad {
  border-color: var(--bad);
}

.money-picked {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 58px;
  padding: 10px;
  overflow-x: auto;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.76);
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.05);
}

.money-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.money-chip {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff3dc;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.money-chip.note {
  border-radius: 10px;
  background: #e9f3f8;
}

.money-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.array-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.array-target {
  display: grid;
  place-items: center;
  min-height: 104px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.array-target span,
.array-group > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.array-target strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(52px, 10vw, 92px);
  line-height: 0.95;
}

.array-preview {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 214px;
  padding: 12px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.array-equation {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1;
  text-align: center;
}

.array-dots {
  display: grid;
  grid-template-columns: repeat(var(--array-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--array-rows), minmax(0, 1fr));
  gap: 5px;
  min-height: 188px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
}

.array-dot {
  align-self: center;
  justify-self: center;
  width: min(100%, 18px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.12);
}

.array-dot.placeholder {
  opacity: 0.26;
  background: var(--ink);
}

.array-board.good .array-preview {
  background: #e5f6ef;
}

.array-board.bad .array-preview {
  background: #fff0ee;
}

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

.array-group {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 15px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.array-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.array-option {
  min-width: 0;
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 11px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(22px, 5vw, 40px);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.06);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.array-option:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.array-option.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.array-option.good {
  border-color: var(--good);
  background: #d7f0e6;
  color: #1f6f53;
}

.array-option.bad {
  border-color: var(--bad);
  background: #ffe6e2;
  animation: block-nope 180ms ease;
}

.array-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.array-clear {
  min-width: 124px;
}

.area-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.area-target {
  display: grid;
  place-items: center;
  min-height: 104px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.area-target span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.area-target strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(44px, 9vw, 84px);
  line-height: 0.95;
}

.area-stage {
  display: grid;
  place-items: center;
  min-height: 236px;
  padding: 16px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.area-board.good .area-stage {
  background: #e5f6ef;
}

.area-board.bad .area-stage {
  background: #fff0ee;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(var(--area-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--area-rows), minmax(0, 1fr));
  gap: 4px;
  width: min(100%, calc(var(--area-w) * 34px));
  max-width: 360px;
  aspect-ratio: var(--area-cols) / var(--area-rows);
  min-height: 78px;
  max-height: 190px;
  padding: 10px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07);
}

.area-tile {
  display: block;
  min-width: 0;
  min-height: 0;
  border-radius: 6px;
  background: #ffd58b;
  box-shadow: inset 0 -2px 0 rgba(26, 58, 92, 0.08);
}

.area-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.area-choice {
  min-height: 72px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.area-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.area-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.area-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.area-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.perimeter-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.perimeter-target {
  display: grid;
  place-items: center;
  min-height: 104px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.perimeter-target span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.perimeter-target strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(44px, 9vw, 84px);
  line-height: 0.95;
}

.perimeter-stage {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 24px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.perimeter-board.good .perimeter-stage {
  background: #e5f6ef;
}

.perimeter-board.bad .perimeter-stage {
  background: #fff0ee;
}

.perimeter-shape {
  position: relative;
  width: min(76%, calc(var(--rect-w) * 28px));
  height: min(150px, max(82px, calc(var(--rect-h) * 22px)));
  min-width: 160px;
  border: 5px solid var(--ink);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.06);
}

.side-label {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf8;
  font-family: "Quicksand", sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.side-label.top {
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
}

.side-label.bottom {
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
}

.side-label.left {
  left: -22px;
  top: 50%;
  transform: translate(-50%, -50%);
}

.side-label.right {
  right: -22px;
  top: 50%;
  transform: translate(50%, -50%);
}

.perimeter-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.perimeter-choice {
  min-height: 72px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.perimeter-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.perimeter-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.perimeter-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.perimeter-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.rocket-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.rocket-mission {
  display: grid;
  place-items: center;
  min-height: 126px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.rocket-mission span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rocket-mission strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(58px, 12vw, 110px);
  line-height: 0.95;
}

.rocket-runway {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #e9f3f8 0%, #fff8e9 72%);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.rocket-runway::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 28px;
  height: 6px;
  border-radius: 999px;
  background: rgba(26, 58, 92, 0.2);
}

.rocket-ship {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 94px;
  border-radius: 32px 32px 18px 18px;
  background: var(--ink);
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.16);
  transform: rotate(32deg);
}

.rocket-ship::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 13px;
  width: 23px;
  height: 23px;
  border: 4px solid #fffdf8;
  border-radius: 50%;
  background: #e9f3f8;
  transform: translateX(-50%);
}

.rocket-ship::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 30px;
  height: 34px;
  border-radius: 50% 50% 999px 999px;
  background: linear-gradient(180deg, #f4a228, #ffd58b);
  transform: translateX(-50%);
}

.rocket-smoke {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 138px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  transform: translateX(-50%);
}

.rocket-board.good .rocket-runway {
  background: linear-gradient(180deg, #e5f6ef 0%, #fffdf8 78%);
}

.rocket-board.bad .rocket-runway {
  background: linear-gradient(180deg, #fff0ee 0%, #fffdf8 78%);
}

.rocket-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.rocket-choice {
  min-height: 72px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.rocket-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.rocket-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.rocket-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.rocket-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.compare-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.compare-equation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  gap: 12px;
  min-height: 260px;
  padding: 14px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.compare-board.good .compare-equation {
  background: #e5f6ef;
}

.compare-board.bad .compare-equation {
  background: #fff0ee;
}

.compare-side,
.compare-sign-slot {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.compare-side {
  grid-template-rows: auto 1fr;
  padding: 16px;
}

.compare-side span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compare-side strong {
  display: grid;
  place-items: center;
  min-width: 0;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.compare-sign-slot {
  color: var(--orange-dark);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(52px, 10vw, 94px);
  font-weight: 800;
  line-height: 1;
}

.compare-sign-slot.good {
  background: #d7f0e6;
  color: #1f6f53;
}

.compare-sign-slot.bad {
  background: #ffe6e2;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.compare-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.compare-choice {
  min-height: 88px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(44px, 9vw, 82px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.compare-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.compare-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.compare-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.compare-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.ten-frame-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.ten-target {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.ten-target span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ten-target strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(58px, 12vw, 110px);
  line-height: 0.95;
}

.ten-frames {
  display: grid;
  grid-template-columns: repeat(var(--frame-count, 2), minmax(0, 1fr));
  gap: 12px;
}

.ten-frames[data-frames="1"] {
  --frame-count: 1;
}

.ten-frames[data-frames="2"] {
  --frame-count: 2;
}

.ten-frame {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  aspect-ratio: 5 / 2;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.ten-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 2px solid rgba(26, 58, 92, 0.18);
  border-radius: 12px;
  background: #fffdf8;
  transition: background 130ms ease, border-color 130ms ease, transform 130ms ease;
}

.ten-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.48);
}

.ten-cell::after {
  content: "";
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  transition: background 130ms ease;
}

.ten-cell.filled::after {
  background: var(--orange);
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.12);
}

.ten-cell.fixed {
  background: #e9f3f8;
}

.ten-cell.fixed::after {
  background: var(--ink);
}

.ten-cell.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.ten-frame-board.good .ten-target {
  background: #e5f6ef;
}

.ten-frame-board.bad .ten-target {
  background: #fff0ee;
}

.ten-counter {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 800;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.ten-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.ten-clear {
  min-width: 170px;
}

.bonds-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.bonds-diagram {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-height: 238px;
  padding: 16px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.bond-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
  width: min(100%, 420px);
}

.bond-circle {
  display: grid;
  place-items: center;
  width: clamp(104px, 19vw, 150px);
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(34px, 7vw, 66px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.bond-circle.whole {
  background: var(--ink);
  color: #fffdf8;
}

.bond-circle.whole span {
  color: rgba(255, 253, 248, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bond-circle.whole strong {
  font-size: clamp(42px, 9vw, 82px);
}

.bond-circle.part.filled {
  border-color: rgba(244, 162, 40, 0.52);
  background: #fff3dc;
}

.bond-circle.part.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.bond-circle.part.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
}

.bonds-board.good .bonds-diagram {
  background: #e5f6ef;
}

.bonds-board.bad .bonds-diagram {
  background: #fff0ee;
}

.bond-tokens {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.bond-token {
  min-height: 62px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.bond-token:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.bond-token.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.bond-token.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.bond-token.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.bond-counter {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 800;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.bond-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.fact-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.fact-house {
  display: grid;
  gap: 0;
}

.fact-roof {
  display: grid;
  place-items: center;
  width: min(82%, 480px);
  min-height: 62px;
  margin: 0 auto -4px;
  border-radius: 18px 18px 8px 8px;
  background: var(--ink);
  color: #fffdf8;
  font-family: "Quicksand", sans-serif;
  font-size: clamp(18px, 3.4vw, 30px);
  font-weight: 800;
  text-align: center;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.12), 0 8px 18px rgba(26, 58, 92, 0.10);
}

.fact-rooms {
  display: grid;
  grid-template-columns: minmax(150px, 0.78fr) 1fr;
  gap: 10px;
  min-height: 188px;
  padding: 16px;
  border-radius: 18px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.fact-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fact-number {
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 142px;
  padding: 12px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07);
}

.fact-number.whole {
  background: #e9f3f8;
}

.fact-number span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.fact-number strong {
  align-self: center;
  font-family: "Quicksand", sans-serif;
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  line-height: 0.95;
}

.fact-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 10px 16px;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.fact-progress span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-progress strong {
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
}

.fact-equations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.fact-equation {
  min-width: 0;
  min-height: 66px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(20px, 4.7vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.fact-equation:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.fact-equation.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.fact-equation.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.fact-equation.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.fact-board.good .fact-rooms {
  background: #e5f6ef;
}

.fact-board.bad .fact-rooms {
  background: #fff0ee;
}

.shares-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.shares-target {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.shares-target span,
.share-group span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shares-target strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(46px, 9vw, 86px);
  line-height: 0.95;
}

.shares-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  min-height: 206px;
  padding: 12px;
  border-radius: 16px;
  background: #fff8e9;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.shares-board.good .shares-groups {
  background: #e5f6ef;
}

.shares-board.bad .shares-groups {
  background: #fff0ee;
}

.share-group {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
  min-height: 128px;
  padding: 10px;
  border-radius: 14px;
  background: #fffdf8;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.share-dots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16px, 1fr));
  align-content: center;
  gap: 6px;
  min-height: 72px;
}

.share-dots i {
  justify-self: center;
  width: min(100%, 18px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: inset 0 -3px 0 rgba(26, 58, 92, 0.12);
}

.shares-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.shares-choice {
  min-height: 72px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.shares-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.shares-choice.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.shares-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.shares-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.missing-board {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 500px;
  width: 100%;
  padding: 16px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.missing-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 190px;
  padding: 18px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
}

.missing-part,
.missing-gap {
  display: grid;
  place-items: center;
  min-width: 68px;
  min-height: 68px;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(34px, 7vw, 72px);
  font-weight: 700;
  line-height: 1;
}

.missing-gap {
  border: 3px solid rgba(244, 162, 40, 0.52);
  border-radius: 16px;
  background: #fff3dc;
  color: var(--orange-dark);
}

.missing-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.missing-choice {
  min-height: 82px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 700;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.missing-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.missing-choice.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.missing-choice.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.hunt-cell {
  border: 2px solid transparent;
  background: #fffdf8;
  color: var(--ink);
  font-size: clamp(20px, 5vw, 46px);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.hunt-cell:hover {
  transform: translateY(-1px);
}

.hunt-cell.found {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
  pointer-events: none;
}

.hunt-cell.wrong {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.hunt-cell.missed {
  border-color: var(--orange);
  background: #fff3dc;
}

.snake-board {
  display: grid;
  grid-template-columns: repeat(var(--snake-grid), minmax(0, 1fr));
  grid-template-rows: repeat(var(--snake-grid), minmax(0, 1fr));
  gap: 0;
  aspect-ratio: 1;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #173654;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.10) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 253, 248, 0.10) 1px, transparent 1px),
    #173654;
  background-size: calc(100% / var(--snake-grid)) calc(100% / var(--snake-grid));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 28px rgba(26, 58, 92, 0.14);
}

.snake-cell {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(13px, 3.2vw, 25px);
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.snake-cell::before {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 9px;
  opacity: 0;
  background: transparent;
  box-shadow: none;
}

.snake-cell.snake-body::before {
  opacity: 1;
  background: #407fa9;
  box-shadow: inset 0 -3px 0 rgba(16, 44, 72, 0.18), 0 5px 10px rgba(26, 58, 92, 0.10);
}

.snake-cell.snake-head::before {
  inset: 8%;
  opacity: 1;
  background: var(--ink);
}

.snake-cell.snake-head::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36%;
  height: 36%;
  border-radius: 50%;
  background: var(--orange);
  transform: translate(-50%, -50%);
}

.snake-food-label {
  position: absolute;
  inset: 10%;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgba(244, 162, 40, 0.58);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  white-space: nowrap;
  box-shadow: 0 5px 12px rgba(26, 58, 92, 0.12);
}

.snake-cell.snake-food {
  background: transparent;
}

.snake-cell.snake-food .snake-food-label {
  opacity: 1;
}

.snake-cell.snake-bad {
  color: var(--bad);
  animation: block-nope 180ms ease;
}

.snake-cell.snake-bad .snake-food-label,
.snake-cell.snake-bad::before {
  border-color: var(--bad);
  background: #fff0ee;
  color: var(--bad);
}

.tower-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.tower-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06);
}

.tower-next span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tower-next strong {
  font-family: "Quicksand", sans-serif;
  font-size: 34px;
}

.tower-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  aspect-ratio: 1;
}

.tower-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.42);
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(18px, 4.6vw, 40px);
  font-weight: 700;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.05);
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
}

.tower-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 162, 40, 0.45);
}

.tower-cell.filled {
  background: #fffdf8;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.tower-cell.clear {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.tower-cell.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.balance-board {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 560px;
  width: 100%;
  padding: 18px;
  border: 1px solid #d6c8af;
  border-radius: 18px;
  background: #d7c8af;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.balance-scale {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  min-height: 220px;
}

.balance-pan {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 168px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: inset 0 -5px 0 rgba(26, 58, 92, 0.07), 0 8px 18px rgba(26, 58, 92, 0.08);
  text-align: center;
}

.balance-pan span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.balance-pan strong {
  margin-top: 8px;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1;
}

.balance-pan em {
  margin-top: 8px;
  color: var(--orange-dark);
  font-style: normal;
  font-weight: 800;
}

.balance-center {
  display: grid;
  justify-items: center;
  align-items: end;
  min-height: 168px;
}

.balance-beam {
  --tilt: 0deg;
  width: 116px;
  height: 12px;
  margin-bottom: -3px;
  border-radius: 999px;
  background: var(--ink);
  transform: rotate(var(--tilt));
  transform-origin: 50% 50%;
  transition: transform 180ms ease;
}

.balance-post {
  width: 13px;
  height: 92px;
  border-radius: 999px 999px 0 0;
  background: var(--ink);
}

.balance-base {
  width: 86px;
  height: 12px;
  border-radius: 999px;
  background: var(--ink);
}

.balance-tokens {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.balance-token {
  min-height: 66px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(22px, 5vw, 42px);
  font-weight: 700;
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.06), 0 7px 16px rgba(26, 58, 92, 0.08);
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease;
}

.balance-token:hover {
  transform: translateY(-1px);
}

.balance-token.selected {
  border-color: var(--orange);
  background: #fff3dc;
}

.balance-token.good {
  border-color: var(--good);
  background: #e5f6ef;
  color: #1f6f53;
}

.balance-token.bad {
  border-color: var(--bad);
  background: #fff0ee;
  animation: block-nope 180ms ease;
}

.balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.merge-cell {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  font-size: clamp(18px, 4.8vw, 42px);
  box-shadow: inset 0 -4px 0 rgba(26, 58, 92, 0.12), 0 7px 16px rgba(26, 58, 92, 0.08);
}

.merge-cell.preview {
  outline: 3px solid rgba(244, 162, 40, 0.35);
  outline-offset: -3px;
}

.merge-cell.flash {
  animation: block-flash 180ms ease;
}

.merge-cell.invalid {
  animation: block-nope 180ms ease;
}

.merge-cell.new-block {
  animation: tile-pop 140ms ease both;
}

.merge-cell[data-value="2"] { background: #fffdf8; color: var(--ink); }
.merge-cell[data-value="4"] { background: #fff3dc; color: var(--ink); }
.merge-cell[data-value="8"] { background: #ffd58b; color: #5b3900; }
.merge-cell[data-value="16"] { background: #f7bb5f; color: #4a2e00; }
.merge-cell[data-value="32"] { background: #f4a228; color: var(--white); }
.merge-cell[data-value="64"] { background: #e0901a; color: var(--white); }
.merge-cell[data-value="128"] { background: #6ea6c8; color: var(--white); }
.merge-cell[data-value="256"] { background: #407fa9; color: var(--white); }
.merge-cell[data-value="512"] { background: #1a5e8b; color: var(--white); }
.merge-cell[data-value="1024"] { background: #102c48; color: #ffd58b; }

@keyframes block-flash {
  0% { scale: 1; }
  45% { scale: 1.04; }
  100% { scale: 1; }
}

@keyframes block-nope {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

.message {
  position: absolute;
  inset: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.92);
  text-align: center;
  backdrop-filter: blur(3px);
}

.message strong {
  color: var(--ink);
  font-family: "Quicksand", sans-serif;
  font-size: clamp(28px, 6vw, 54px);
  line-height: 1;
}

.message span {
  max-width: 360px;
  color: #5c6b7a;
  font-weight: 700;
  line-height: 1.35;
}

.hidden {
  display: none;
}

@media (max-width: 920px) {
  .hero,
  .nk-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .nk-app {
    width: min(100vw - 20px, 560px);
    padding-top: 10px;
  }

  .nk-topbar,
  .game-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .game-head .ghost-button {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .score-row,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .game-search-row {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .picker-random {
    grid-column: 1 / -1;
    width: 100%;
  }

  .game-picker-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .recent-games {
    justify-content: flex-start;
  }

  .game-tabs {
    max-height: 320px;
  }

  .game-card {
    padding: 12px;
  }

  .board-2048 {
    --gap: 8px;
    --pad: 8px;
    border-radius: 14px;
  }

  .match-board,
  .path-board,
  .memory-board,
  .fraction-board,
  .clock-board,
  .hunt-board,
  .snake-board,
  .tower-board,
  .merge-board {
    gap: 7px;
    padding: 8px;
    border-radius: 14px;
  }

  .grid-cell,
  .tile,
  .match-cell,
  .path-cell,
  .memory-card,
  .fraction-card,
  .clock-card,
  .hunt-cell,
  .snake-cell,
  .tower-cell,
  .balance-token,
  .merge-cell {
    border-radius: 10px;
  }

  .snake-board {
    gap: 0;
    padding: 8px;
  }

  .snake-cell {
    border-radius: 0;
  }

  .snake-cell::before {
    inset: 12%;
    border-radius: 7px;
  }

  .snake-cell.snake-head::before {
    inset: 9%;
  }

  .snake-food-label {
    inset: 7%;
    font-size: clamp(11px, 3vw, 20px);
  }

  .line-hop-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .line-hop-prompt,
  .line-hop-result {
    min-height: 82px;
    border-radius: 14px;
  }

  .line-hop-track {
    gap: 4px;
    min-height: 126px;
    padding: 42px 6px 9px;
    border-radius: 14px;
  }

  .line-hop-track::before {
    left: 14px;
    right: 14px;
    top: 34px;
    height: 5px;
  }

  .line-hop-tick {
    min-height: 66px;
    border-radius: 10px;
  }

  .line-hop-tick::before {
    top: -19px;
    height: 19px;
  }

  .coordinate-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .coordinate-prompt {
    min-height: 82px;
    border-radius: 14px;
  }

  .coordinate-result {
    min-height: 54px;
    border-radius: 14px;
  }

  .coordinate-grid {
    grid-template-columns: 32px repeat(var(--coord-size), minmax(0, 1fr));
    grid-template-rows: repeat(var(--coord-size), minmax(0, 1fr)) 32px;
    gap: 5px;
    min-height: 238px;
    padding: 8px;
    border-radius: 14px;
  }

  .coordinate-axis,
  .coordinate-cell {
    border-radius: 9px;
  }

  .data-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .data-prompt {
    min-height: 82px;
    border-radius: 14px;
  }

  .data-chart {
    gap: 7px;
    min-height: 210px;
    padding: 10px;
    border-radius: 14px;
  }

  .data-bar {
    gap: 6px;
  }

  .data-bar-fill {
    border-radius: 10px 10px 7px 7px;
  }

  .data-bar em {
    min-height: 34px;
    border-radius: 9px;
  }

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

  .data-choice {
    min-height: 62px;
    border-radius: 12px;
  }

  .mirror-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .mirror-prompt,
  .mirror-counter {
    min-height: 66px;
    border-radius: 14px;
  }

  .mirror-grid {
    gap: 5px;
    padding: 8px;
    border-radius: 14px;
  }

  .mirror-grid.vertical::before {
    top: 8px;
    bottom: 8px;
    width: 4px;
  }

  .mirror-grid.horizontal::before {
    left: 8px;
    right: 8px;
    height: 4px;
  }

  .mirror-cell {
    border-radius: 9px;
  }

  .prime-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .prime-prompt,
  .prime-counter {
    min-height: 66px;
    border-radius: 14px;
  }

  .prime-grid {
    gap: 5px;
    padding: 8px;
    border-radius: 14px;
  }

  .prime-cell {
    border-radius: 9px;
  }

  .angle-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .angle-prompt {
    min-height: 78px;
    border-radius: 14px;
  }

  .angle-figure {
    min-height: 198px;
    border-radius: 14px;
    background-size: 26px 26px;
  }

  .angle-ray {
    bottom: 42px;
    height: 7px;
    width: min(41%, 160px);
  }

  .angle-vertex {
    bottom: 34px;
    width: 23px;
    height: 23px;
    border-width: 4px;
  }

  .angle-arc {
    bottom: 42px;
    width: 68px;
    height: 68px;
    border-width: 3px;
  }

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

  .angle-choice {
    min-height: 62px;
    border-radius: 12px;
  }

  .factor-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .factor-machine {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 10px;
  }

  .factor-target {
    grid-row: auto;
    min-height: 108px;
    border-radius: 14px;
  }

  .factor-slots {
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
  }

  .factor-slot {
    min-height: 82px;
    border-radius: 12px;
  }

  .factor-equation {
    min-height: 62px;
    border-radius: 14px;
  }

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

  .factor-token {
    min-height: 62px;
    border-radius: 12px;
  }

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

  .measure-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .measure-prompt {
    min-height: 82px;
    border-radius: 14px;
  }

  .measure-scene {
    min-height: 142px;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
  }

  .measure-ruler {
    min-height: 54px;
    border-width: 3px;
    border-radius: 12px;
  }

  .measure-ruler span {
    height: 18px;
  }

  .measure-ruler span:nth-child(odd) {
    height: 30px;
  }

  .measure-note {
    min-height: 40px;
  }

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

  .measure-choice {
    min-height: 62px;
    border-radius: 12px;
  }

  .decimal-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .decimal-prompt {
    min-height: 78px;
    border-radius: 14px;
  }

  .decimal-hundred-grid {
    gap: 3px;
    padding: 8px;
    border-width: 3px;
    border-radius: 14px;
  }

  .decimal-cell {
    border-radius: 4px;
  }

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

  .decimal-choice {
    min-height: 62px;
    border-radius: 12px;
  }

  .fraction-bars-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .fraction-bar {
    min-height: 104px;
    gap: 4px;
    padding: 10px;
    border-radius: 14px;
  }

  .fraction-bar-part {
    border-radius: 8px;
  }

  .fraction-bar-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .fraction-compare-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .fraction-compare-prompt {
    min-height: 78px;
    border-radius: 14px;
  }

  .fraction-compare-pair {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .fraction-compare-card {
    min-height: 188px;
    padding: 12px;
    border-radius: 14px;
  }

  .fraction-compare-bar {
    min-height: 86px;
    gap: 4px;
    padding: 8px;
    border-radius: 13px;
  }

  .fraction-compare-choice {
    min-height: 68px;
    border-radius: 12px;
  }

  .missing-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .place-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .place-slots {
    grid-template-columns: 1fr;
  }

  .place-slot {
    min-height: auto;
    grid-template-rows: auto 62px auto;
    border-radius: 12px;
  }

  .place-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .place-clear {
    width: 100%;
  }

  .equation-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .equation-line {
    min-height: 78px;
    gap: 7px;
  }

  .equation-slot,
  .equation-result {
    min-width: 52px;
    min-height: 50px;
  }

  .equation-groups {
    grid-template-columns: 1fr;
  }

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

  .equation-clear {
    width: 100%;
  }

  .pattern-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .pattern-track {
    gap: 6px;
    min-height: 104px;
    padding: 14px 8px 18px;
    border-radius: 14px;
  }

  .pattern-track::before {
    left: 12px;
    right: 12px;
    bottom: 19px;
  }

  .pattern-car {
    min-height: 64px;
    border-radius: 10px;
  }

  .pattern-car::before,
  .pattern-car::after {
    bottom: -11px;
    width: 11px;
    height: 11px;
    border-width: 2px;
  }

  .pattern-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .money-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

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

  .money-token {
    min-height: 68px;
  }

  .money-picked {
    min-height: 54px;
  }

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

  .array-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .array-preview {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .array-equation {
    min-height: 72px;
  }

  .array-dots {
    min-height: 156px;
    gap: 4px;
  }

  .array-groups {
    grid-template-columns: 1fr;
  }

  .array-option {
    min-height: 44px;
  }

  .array-clear {
    width: 100%;
  }

  .area-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .area-stage {
    min-height: 190px;
    padding: 12px;
  }

  .area-grid {
    max-height: 156px;
    gap: 3px;
    padding: 8px;
    border-radius: 12px;
  }

  .area-tile {
    border-radius: 4px;
  }

  .area-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .perimeter-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .perimeter-stage {
    min-height: 196px;
    padding: 22px 16px;
  }

  .perimeter-shape {
    width: min(82%, calc(var(--rect-w) * 22px));
    min-width: 130px;
    height: min(128px, max(72px, calc(var(--rect-h) * 18px)));
  }

  .side-label {
    min-width: 34px;
    min-height: 28px;
    font-size: 18px;
  }

  .perimeter-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .rocket-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .rocket-mission {
    min-height: 110px;
  }

  .rocket-runway {
    min-height: 128px;
  }

  .rocket-ship {
    width: 50px;
    height: 78px;
  }

  .rocket-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .compare-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .compare-equation {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 8px;
    padding: 10px;
  }

  .compare-side {
    min-height: 118px;
    border-radius: 12px;
  }

  .compare-sign-slot {
    min-height: 72px;
    border-radius: 12px;
  }

  .compare-choice {
    min-height: 74px;
  }

  .ten-frame-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .ten-frames {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ten-frame {
    gap: 6px;
    padding: 9px;
    border-radius: 12px;
  }

  .ten-cell {
    border-radius: 9px;
  }

  .ten-clear {
    width: 100%;
  }

  .bonds-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .bonds-diagram {
    min-height: auto;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
  }

  .bond-parts {
    gap: 12px;
  }

  .bond-circle {
    width: min(36vw, 126px);
  }

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

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

  .fact-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .fact-roof {
    width: min(88%, 360px);
    min-height: 54px;
    border-radius: 15px 15px 8px 8px;
  }

  .fact-rooms {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .fact-number {
    min-height: 104px;
    border-radius: 12px;
  }

  .fact-parts {
    gap: 8px;
  }

  .fact-equations {
    grid-template-columns: 1fr;
  }

  .fact-equation {
    min-height: 58px;
  }

  .shares-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .shares-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: auto;
    padding: 10px;
  }

  .share-group {
    min-height: 118px;
    border-radius: 12px;
  }

  .shares-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .missing-equation {
    min-height: 144px;
  }

  .missing-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .balance-board {
    min-height: auto;
    padding: 12px;
    border-radius: 14px;
  }

  .balance-scale {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .balance-center {
    display: none;
  }

  .balance-tokens {
    grid-template-columns: repeat(2, 1fr);
  }

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