:root {
  --ink: #15171c;
  --ink-soft: #2d3038;
  --paper: #fffdf7;
  --cream: #f6f0e4;
  --line: #dfd7c8;
  --muted: #626877;
  --lime: #b8ff46;
  --mint: #45e6c8;
  --blue: #26b8ff;
  --coral: #ff7043;
  --gold: #ffb13b;
  --violet: #9a7cff;
  --shadow: 0 8px 0 var(--ink);
  --soft-shadow: 0 18px 45px rgba(21, 23, 28, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(184, 255, 70, 0.24), transparent 28rem),
    radial-gradient(circle at 96% 12%, rgba(38, 184, 255, 0.18), transparent 24rem),
    linear-gradient(180deg, #fffdf7 0%, #f4eddf 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
canvas,
iframe {
  max-width: 100%;
}

.app-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 60px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 10px 14px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(255, 248, 232, 0.9));
  backdrop-filter: blur(18px);
  border: 2px solid rgba(21, 23, 28, 0.14);
  border-radius: 30px;
  box-shadow: 0 6px 0 rgba(21, 23, 28, 0.12);
}

.topbar > * {
  min-width: 0;
}

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

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.brand-word {
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-word span {
  color: #168f79;
}

.search-wrap {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  width: min(520px, 100%);
  justify-self: center;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--ink);
}

.search-icon {
  font-weight: 950;
  color: var(--coral);
}

.search-wrap input {
  min-width: 0;
  min-height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
}

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

.topnav a,
.tab,
.primary-btn,
.secondary-btn,
.icon-btn {
  min-height: 42px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 15px;
  font-weight: 900;
  box-shadow: 0 4px 0 var(--ink);
}

.topnav a:hover,
.secondary-btn:hover,
.tab:hover,
.icon-btn:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr);
  gap: 34px;
  align-items: center;
  padding: 50px 0 28px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: #168f79;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(46px, 7vw, 88px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.08;
}

.hero-lede,
.section-head p {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.48;
  font-weight: 650;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-btn {
  background: var(--lime);
}

.secondary-btn {
  background: var(--paper);
}

.daily-console {
  border: 3px solid var(--ink);
  border-radius: 30px;
  background: #fff8e8;
  padding: 18px;
  box-shadow: 0 18px 0 var(--ink);
  transform: rotate(1deg);
}

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

.console-top strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
}

.mini-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.streak-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 13px;
  font-weight: 950;
}

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

.daily-card,
.game-card,
.category-shelves article,
.category-shelves a,
.hub-game-card,
.answer-box {
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 6px 0 var(--ink);
}

.daily-card {
  min-height: 152px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.daily-card:nth-child(1) {
  background: #efffd1;
}

.daily-card:nth-child(2) {
  background: #dff8ff;
}

.daily-card:nth-child(3) {
  background: #fff0d7;
}

.daily-card:nth-child(4) {
  background: #ffe8de;
}

.game-glyph {
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--paper);
  font-weight: 950;
}

.daily-card strong,
.game-card strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
  line-height: 1.05;
}

.daily-card span,
.game-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.32;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 50px;
}

.quick-stats div {
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--ink);
  color: var(--paper);
  padding: 16px;
}

.quick-stats strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.quick-stats span {
  display: block;
  margin-top: 6px;
  color: #d9ded9;
  font-weight: 700;
}

.section-head {
  margin: 64px 0 18px;
}

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

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

.tab.active {
  background: var(--lime);
}

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

.game-card {
  position: relative;
  min-height: 226px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.game-card::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -42px;
  width: 128px;
  height: 128px;
  border: 18px solid rgba(21, 23, 28, 0.08);
  border-radius: 42px;
  transform: rotate(21deg);
}

.game-card[data-tone="lime"] {
  background: #efffd1;
}

.game-card[data-tone="blue"] {
  background: #dff8ff;
}

.game-card[data-tone="gold"] {
  background: #fff0d7;
}

.game-card[data-tone="coral"] {
  background: #ffe8de;
}

.game-card[data-tone="mint"] {
  background: #e8fff7;
}

.game-card[data-tone="violet"] {
  background: #f1edff;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag {
  border: 1.5px solid rgba(21, 23, 28, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  padding: 5px 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 850;
}

.play-card-btn {
  align-self: flex-start;
  min-height: 40px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  padding: 9px 14px;
  font-weight: 950;
}

.play-stage {
  display: none;
  margin-top: 28px;
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.play-stage.active {
  display: block;
}

body.embed-mode {
  background: var(--paper);
}

body.embed-mode .app-shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

body.embed-mode .topbar,
body.embed-mode .hero-grid,
body.embed-mode .quick-stats,
body.embed-mode > .app-shell > main > .section-head,
body.embed-mode .game-wall,
body.embed-mode .category-shelves,
body.embed-mode .trust-band,
body.embed-mode .seo-panel {
  display: none;
}

body.embed-mode .play-stage {
  display: block;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.embed-mode .stage-head {
  padding: 16px;
}

body.embed-mode .stage-body {
  min-height: 0;
  padding: 16px;
}

.stage-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 20px;
  border-bottom: 2px solid var(--ink);
  background: #fff8e8;
}

.stage-head h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.stage-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
}

.stage-body {
  min-height: 420px;
  padding: 20px;
}

.empty-stage {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.seo-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 20px;
  padding: 20px;
  border-top: 2px solid var(--ink);
  background: #f8f2e7;
}

.seo-panel h3 {
  margin-bottom: 8px;
}

.seo-panel p,
.seo-panel li {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.seo-panel ul {
  margin: 0;
  padding-left: 18px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, 0.42fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.game-board,
.game-side {
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: #fff8e8;
  padding: 16px;
}

.game-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.metric {
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  padding: 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1;
}

.message {
  min-height: 44px;
  border: 2px solid rgba(21, 23, 28, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  padding: 10px 12px;
  color: var(--ink-soft);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.small-btn,
.answer-btn,
.keyboard button {
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 950;
  box-shadow: 0 3px 0 var(--ink);
}

.small-btn.primary {
  background: var(--lime);
}

.word-grid {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 8px;
  width: min(100%, 390px);
  margin: 0 auto 16px;
}

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

.word-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--paper);
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 950;
  text-transform: uppercase;
}

.word-cell.correct {
  background: var(--lime);
}

.word-cell.present {
  background: var(--gold);
}

.word-cell.miss {
  background: #d9d5cb;
}

.guess-form,
.typing-form {
  display: flex;
  gap: 8px;
}

.guess-form input,
.typing-form input {
  min-width: 0;
  flex: 1;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  padding: 12px 14px;
  font-weight: 900;
}

.tile-2048 {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 2px solid rgba(21, 23, 28, 0.15);
  background: #eee5d5;
  color: var(--ink);
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 950;
}

.grid-2048 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
  padding: 12px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: var(--ink);
}

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

.link-tile {
  min-height: 76px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  padding: 8px;
  font-weight: 950;
  box-shadow: 0 3px 0 var(--ink);
}

.link-tile.selected {
  background: var(--lime);
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.link-tile.solved {
  background: var(--mint);
}

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

.math-question {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--lime);
  font-size: clamp(44px, 10vw, 92px);
  font-weight: 950;
}

.typing-prompt {
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: var(--paper);
  padding: 18px;
  font-size: clamp(22px, 4vw, 36px);
  line-height: 1.28;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.typing-prompt .done {
  color: #168f79;
}

.typing-prompt .current {
  background: var(--gold);
  border-radius: 6px;
}

.runner-wrap {
  display: grid;
  gap: 12px;
}

.arcade-canvas-wrap {
  display: grid;
  gap: 12px;
}

#runner-canvas {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  display: block;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--ink);
}

.game-canvas {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  display: block;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--ink);
  box-shadow: 0 6px 0 var(--ink);
}

.game-canvas.square-canvas {
  max-width: 560px;
  aspect-ratio: 1 / 1;
}

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

.dpad-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.dpad-row .small-btn {
  min-width: 88px;
}

.memory-grid,
.pattern-grid,
.quiz-options,
.wordfind-grid,
.sudoku-grid {
  display: grid;
  gap: 10px;
}

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

.memory-card {
  min-height: 82px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px;
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 950;
  box-shadow: 0 4px 0 rgba(21, 23, 28, 0.45);
}

.memory-card.open {
  background: var(--lime);
  color: var(--ink);
}

.quiz-card {
  min-height: 320px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  padding: 18px;
}

.quiz-card h3 {
  margin-bottom: 18px;
  font-size: clamp(26px, 4vw, 42px);
}

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

.quiz-visual {
  margin: 4px 0 16px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #fff8e8;
  padding: 12px;
}

.clock-visual {
  position: relative;
  width: min(250px, 76vw);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 999px;
  background: radial-gradient(circle, var(--paper) 0 58%, #fff0d7 59% 100%);
}

.clock-visual span {
  position: absolute;
  inset: 13px;
  display: grid;
  place-items: start center;
  transform: rotate(var(--tick));
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 950;
}

.clock-visual span::first-letter {
  transform: rotate(calc(-1 * var(--tick)));
}

.clock-hand {
  position: absolute;
  left: calc(50% - 3px);
  bottom: 50%;
  width: 6px;
  border-radius: 999px;
  background: var(--ink);
  transform: rotate(var(--angle));
  transform-origin: bottom center;
}

.clock-hand.hour {
  height: 26%;
}

.clock-hand.minute {
  height: 36%;
  background: var(--coral);
}

.clock-visual b {
  position: absolute;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  padding: 5px 10px;
  font-size: 14px;
}

.coin-strip,
.prompt-visual,
.cycle-visual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.coin {
  width: 72px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 3px 0 var(--ink);
}

.coin.dime {
  width: 58px;
  background: #e8eef2;
}

.coin.nickel {
  width: 64px;
  background: #d6dde2;
}

.coin.penny {
  width: 52px;
  background: #d88b56;
}

.coin-strip strong {
  width: 100%;
  text-align: center;
  font-size: 24px;
}

.number-line-track {
  position: relative;
  height: 12px;
  margin: 30px 14px 12px;
  border-radius: 999px;
  background: var(--ink);
}

.number-line-track::before,
.number-line-track::after,
.number-line-track i {
  content: "";
  position: absolute;
  top: 50%;
  width: 4px;
  height: 34px;
  border-radius: 999px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.number-line-track::before {
  left: 0;
}

.number-line-track::after {
  left: 100%;
}

.number-line-track i {
  background: var(--coral);
}

.number-line-labels {
  display: flex;
  justify-content: space-between;
  font-weight: 950;
}

.number-line-labels strong {
  color: var(--coral);
}

.coordinate-grid-visual {
  position: relative;
  width: min(270px, 76vw);
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(21, 23, 28, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(21, 23, 28, 0.16) 1px, transparent 1px),
    #f7fff0;
  background-size: 10% 10%;
}

.coordinate-grid-visual .x-axis,
.coordinate-grid-visual .y-axis {
  position: absolute;
  background: var(--ink);
}

.coordinate-grid-visual .x-axis {
  left: 0;
  right: 0;
  top: calc(50% - 1px);
  height: 2px;
}

.coordinate-grid-visual .y-axis {
  top: 0;
  bottom: 0;
  left: calc(50% - 1px);
  width: 2px;
}

.coordinate-grid-visual b {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--coral);
  transform: translate(-50%, -50%);
}

.coordinate-visual strong {
  display: block;
  text-align: center;
}

.cycle-visual span,
.prompt-visual span {
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  padding: 10px 12px;
  font-weight: 950;
}

.cycle-visual span.active,
.prompt-visual span:first-child {
  background: var(--lime);
}

.reaction-pad {
  position: relative;
  min-height: 360px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(21, 23, 28, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(21, 23, 28, 0.08) 1px, transparent 1px),
    #fff8e8;
  background-size: 34px 34px;
  overflow: hidden;
}

.reaction-target {
  position: absolute;
  left: 44%;
  top: 44%;
  width: 78px;
  height: 78px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--coral);
  color: var(--paper);
  font-weight: 950;
  box-shadow: 0 6px 0 var(--ink);
}

.pattern-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 420px;
  margin: 0 auto;
}

.pattern-btn {
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 6px 0 var(--ink);
}

.pattern-btn.lime {
  background: var(--lime);
}

.pattern-btn.blue {
  background: var(--blue);
}

.pattern-btn.coral {
  background: var(--coral);
}

.pattern-btn.gold {
  background: var(--gold);
}

.pattern-btn.flash {
  filter: brightness(1.22);
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--ink);
}

.scramble-word {
  display: grid;
  place-items: center;
  min-height: 170px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--lime);
  font-size: clamp(36px, 8vw, 78px);
  font-weight: 950;
  letter-spacing: 0.08em;
}

.wordfind-grid {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  max-width: 520px;
  margin: 0 auto 16px;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: var(--ink);
}

.wordfind-grid span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--paper);
  font-weight: 950;
}

.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-list span {
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  padding: 8px 10px;
  font-weight: 900;
}

.word-list span.found {
  background: var(--lime);
  text-decoration: line-through;
}

.sudoku-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 420px;
  margin: 0 auto;
  padding: 10px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--ink);
}

.sudoku-cell {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  font-size: clamp(30px, 8vw, 56px);
  font-weight: 950;
}

.sudoku-cell.given {
  background: var(--lime);
}

.category-shelves {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.category-shelves article,
.category-shelves a {
  display: block;
  min-height: 180px;
  padding: 18px;
}

.category-shelves span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--lime);
  font-weight: 950;
}

.category-shelves p {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.category-shelves a:hover,
.hub-game-card:hover,
.hub-link-list a:hover {
  transform: translateY(1px);
  box-shadow: 0 4px 0 var(--ink);
}

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

.hub-nav {
  justify-content: center;
}

.hub-nav a[aria-current="page"] {
  background: var(--lime);
}

.hub-hero {
  display: grid;
  gap: 20px;
  padding: 56px 0 30px;
}

.hub-hero h1 {
  max-width: 980px;
}

.hub-hero > p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
}

.compact-hero {
  padding-bottom: 10px;
}

.answer-box {
  max-width: 900px;
  padding: 18px;
  background: #eefed5;
}

.answer-box p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 750;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.breadcrumb a {
  color: var(--ink);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.hub-section {
  margin-top: 38px;
}

.hub-section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

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

.hub-game-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  min-height: 168px;
  padding: 16px;
}

.hub-game-card p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.hub-game-card small {
  color: #168f79;
  font-weight: 900;
}

.hub-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 44px;
}

.hub-copy-grid article,
.hub-faq {
  border-top: 3px solid var(--ink);
  padding-top: 18px;
}

.hub-copy-grid p,
.hub-faq p,
.policy-page p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
  font-weight: 650;
}

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

.hub-link-list.compact {
  grid-template-columns: 1fr;
}

.hub-link-list a {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--ink);
  font-weight: 950;
}

.hub-link-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.hub-faq {
  margin-top: 46px;
}

.hub-faq h3 {
  margin-top: 20px;
}

.live-sports-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 52px;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: #e8fff7;
  padding: 24px 0;
}

.live-sports-strip h2 {
  max-width: 780px;
}

.live-sports-strip p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.52;
  font-weight: 700;
}

.live-sports-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sports-page .sports-hero h1 {
  max-width: 920px;
}

.sports-alert {
  margin-top: 26px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff1d8;
  box-shadow: 0 6px 0 var(--ink);
  padding: clamp(22px, 4vw, 34px);
}

.sports-alert h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  margin: 0;
}

.sports-alert p {
  max-width: 920px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.56;
  font-weight: 750;
  margin-top: 14px;
}

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

.sports-event-card {
  display: grid;
  gap: 10px;
  min-height: 248px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 6px 0 var(--ink);
  padding: 16px;
}

.sports-event-card > span {
  justify-self: start;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.sports-event-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 700;
}

.source-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.source-buttons a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 3px 0 var(--ink);
}

.source-buttons a:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--ink);
}

.sports-article-card {
  background: #eefed5;
}

.sports-table-wrap {
  margin-top: 30px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sports-table-wrap h2,
.long-content-section h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.sports-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 6px 0 var(--ink);
}

.sports-table th,
.sports-table td {
  border: 2px solid var(--ink);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.sports-table th {
  width: 190px;
  background: #e8fff7;
  font-weight: 950;
}

.sports-table td {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.long-content-section {
  margin-top: 34px;
  border-top: 3px solid var(--ink);
  padding-top: 18px;
}

.long-content-section p {
  max-width: 930px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 650;
}

.match-center-cta,
.match-player-shell {
  margin-top: 30px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: #e8fff7;
  box-shadow: 0 8px 0 var(--ink);
  padding: 20px;
}

.match-center-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.match-center-cta p:not(.eyebrow),
.match-player-head p,
.match-card p,
.verification-grid p,
.verification-grid li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 700;
}

.match-player-shell {
  background: var(--paper);
}

.match-player-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.match-player-frame,
.match-player-placeholder {
  margin-top: 18px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: var(--ink);
  overflow: hidden;
}

.match-player-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.match-player-placeholder {
  display: grid;
  min-height: 360px;
  align-content: center;
  gap: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    var(--ink);
  background-size: 34px 34px;
  color: var(--paper);
  padding: 24px;
}

.match-player-placeholder span {
  justify-self: start;
  border: 2px solid var(--lime);
  border-radius: 999px;
  color: var(--lime);
  padding: 8px 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.match-player-placeholder h2 {
  max-width: 760px;
  color: var(--paper);
}

.match-player-placeholder p {
  max-width: 740px;
  color: #e5e8df;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 750;
}

.match-card-grid,
.verification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.verification-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  margin-top: 44px;
}

.match-card,
.verification-grid article {
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 6px 0 var(--ink);
  padding: 16px;
}

.match-card {
  display: grid;
  gap: 10px;
}

.match-card > span {
  justify-self: start;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.verification-grid ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 52px;
  padding: 18px 0 0;
  border-top: 2px solid rgba(21, 23, 28, 0.14);
}

.site-footer a {
  min-height: 38px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 900;
  box-shadow: 0 3px 0 var(--ink);
}

.trust-band {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1fr);
  gap: 24px;
  margin-top: 52px;
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: var(--ink);
  color: var(--paper);
  padding: 24px;
}

.trust-band .eyebrow {
  color: var(--lime);
}

.trust-band ul {
  margin: 0;
  padding-left: 20px;
  color: #e5e8df;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 750;
}

.seo-game-page .topbar {
  grid-template-columns: auto auto;
  justify-content: space-between;
}

.seo-play-box {
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.seo-play-box iframe {
  display: block;
  width: 100%;
  height: 760px;
  min-height: 620px;
  max-height: 88svh;
  border: 0;
}

.static-seo-panel {
  margin-top: 22px;
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 100;
}

.confetti i {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 3px;
  animation: fall 980ms linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(105vh) rotate(420deg);
    opacity: 0.3;
  }
}

@media (max-width: 980px) {
  .topbar,
  .hub-topbar,
  .hero-grid,
  .game-layout,
  .seo-panel,
  .trust-band,
  .hub-copy-grid,
  .live-sports-strip,
  .match-center-cta,
  .match-player-head,
  .verification-grid {
    grid-template-columns: 1fr;
  }

  .search-wrap {
    justify-self: stretch;
  }

  .topnav {
    justify-content: flex-start;
  }

  .hub-nav {
    justify-content: flex-start;
  }

  .daily-console {
    transform: none;
  }

  .game-cards,
  .category-shelves,
  .hub-game-grid,
  .hub-link-list,
  .sports-event-grid,
  .match-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 16px;
    padding: 12px 16px;
    border-radius: 28px;
  }

  .brand-lockup {
    grid-column: 1;
  }

  .search-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
  }

  .topnav {
    grid-column: 2;
    justify-self: end;
    justify-content: flex-end;
  }

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

  .hub-nav {
    justify-self: end;
    justify-content: flex-end;
  }

  .hero-grid {
    gap: 26px;
    padding-top: 38px;
  }

  .daily-console {
    width: min(100%, 720px);
    justify-self: center;
  }

  .game-layout {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
    gap: 16px;
  }

  .seo-panel {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  }

  .stage-body,
  body.embed-mode .stage-body {
    padding: 18px;
  }

  .game-board,
  .game-side {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: calc(100% - 24px);
    max-width: none;
    margin: 0 auto;
    padding-top: 12px;
    padding-bottom: 48px;
  }

  .topbar {
    position: static;
    gap: 14px;
    border-radius: 24px;
    padding: 12px;
  }

  .topnav {
    width: 100%;
  }

  .topnav a {
    flex: 1 1 calc(50% - 8px);
    padding-inline: 10px;
    text-align: center;
  }

  .search-wrap {
    width: 100%;
  }

  .brand-word {
    font-size: 22px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .hero-grid {
    padding-top: 30px;
  }

  h1 {
    font-size: 34px;
    line-height: 1;
  }

  .hero-lede,
  .section-head p {
    font-size: 17px;
  }

  .daily-console {
    padding: 14px;
    box-shadow: 0 8px 0 var(--ink);
  }

    .search-wrap,
    .daily-console,
    .game-card,
    .category-shelves article,
    .category-shelves a,
    .hub-game-card,
    .answer-box,
    .play-stage,
    .trust-band,
    .seo-play-box,
  .static-seo-panel {
    max-width: 100%;
  }

  .console-top {
    flex-wrap: wrap;
  }

  .daily-grid,
  .quick-stats,
    .game-cards,
    .category-shelves,
    .hub-game-grid,
    .hub-link-list,
    .sports-event-grid,
    .match-card-grid,
    .quiz-options {
    grid-template-columns: 1fr;
  }

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

  .hero-actions,
  .guess-form,
  .typing-form {
    flex-direction: column;
  }

  .hero-actions button,
  .guess-form button,
  .typing-form button,
  .primary-btn,
  .secondary-btn,
  .site-footer a,
  .source-buttons a,
  .live-sports-actions,
  .live-sports-actions a {
    width: 100%;
  }

  .live-sports-actions {
    justify-content: stretch;
  }

  .stage-head {
    flex-direction: column;
    padding: 16px;
  }

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

  .icon-btn {
    width: 100%;
  }

  .stage-body,
  body.embed-mode .stage-body {
    padding: 12px;
  }

  .game-board,
  .game-side {
    border-radius: 18px;
    padding: 12px;
  }

  .metric-row,
  .answers {
    grid-template-columns: 1fr;
  }

  .hub-game-card {
    grid-template-columns: 1fr;
  }

  .hub-hero {
    padding-top: 30px;
  }

  .hub-hero > p,
  .hub-copy-grid p,
  .hub-faq p,
  .policy-page p,
  .sports-alert p,
  .long-content-section p,
  .live-sports-strip p:not(.eyebrow),
  .match-center-cta p:not(.eyebrow),
  .match-player-head p,
  .match-card p,
  .verification-grid p,
  .verification-grid li {
    font-size: 16px;
  }

  .sports-table {
    min-width: 480px;
  }

  .match-player-placeholder {
    min-height: 300px;
    padding: 18px;
  }

  .game-canvas,
  #runner-canvas {
    border-radius: 18px;
    box-shadow: 0 4px 0 var(--ink);
  }

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

  .dpad-row .small-btn {
    min-width: 0;
    width: 100%;
  }

  .link-tile {
    min-height: 64px;
    font-size: 14px;
  }

  .memory-card {
    min-height: 72px;
  }

  .wordfind-grid {
    gap: 4px;
    padding: 6px;
    border-radius: 16px;
  }

  .wordfind-grid span {
    border-radius: 6px;
    font-size: 12px;
  }

  .quiz-card {
    min-height: 260px;
    padding: 14px;
  }

  .reaction-pad {
    min-height: 280px;
  }

  .math-question {
    min-height: 140px;
  }

  .scramble-word {
    min-height: 130px;
    letter-spacing: 0.04em;
  }

  .typing-prompt {
    padding: 14px;
  }

  .seo-play-box iframe {
    height: 680px;
    min-height: 560px;
    max-height: 88svh;
  }
}

body.embed-mode .app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.embed-mode .play-stage {
  width: 100%;
}

@media (max-width: 380px) {
  h1 {
    font-size: 30px;
  }

  .brand-word {
    font-size: 20px;
  }

  .topnav a {
    flex-basis: 100%;
  }

  .topbar {
    border-radius: 20px;
  }

  .game-card,
  .daily-card,
  .hub-game-card,
  .sports-event-card,
  .match-card {
    border-radius: 16px;
    padding: 14px;
  }

  .wordfind-grid span {
    font-size: 11px;
  }

  .sports-table {
    min-width: 440px;
  }
}
