.grid-shell {
  width: min(1060px, calc(100% - 32px));
}

.game-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  padding: 30px 34px;
  border-bottom: 3px solid var(--ink);
}

.game-heading .eyebrow {
  margin-bottom: 10px;
}

.game-heading h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.94;
}

.lede {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.round-box {
  min-width: 154px;
  padding: 16px;
  border: 2px solid var(--line);
  background: #171220;
  text-align: center;
}

.round-box > span,
.stat > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.round-box strong {
  color: var(--gold);
  font-size: 1.6rem;
}

.game-card > .mode-panel {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 3px solid var(--ink);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 3px solid var(--ink);
}

.stat {
  min-width: 0;
  padding: 18px 20px;
  border-right: 2px solid var(--line);
  text-align: center;
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  color: var(--ink);
  font-size: clamp(1.05rem, 3vw, 1.65rem);
}

.game-stage {
  display: flex;
  min-height: 670px;
  flex-direction: column;
  align-items: center;
  padding: 36px 28px 30px;
  background:
    linear-gradient(rgba(247, 201, 72, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 201, 72, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 38%, #2a2039 0, transparent 52%);
  background-size: 24px 24px, 24px 24px, auto;
}

.stage-copy {
  min-height: 116px;
  text-align: center;
}

.stage-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.stage-copy h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.stage-copy > p:last-child {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.deadline-track {
  flex: none;
  margin: 4px auto 18px;
}

.reaction-grid {
  display: grid;
  width: min(456px, 92vw);
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 4px auto 22px;
}

.reaction-tile {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border: 3px solid var(--line);
  border-radius: 0;
  background: #211a2e;
  box-shadow: 6px 6px 0 var(--shadow);
  color: #777083;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 80ms ease, box-shadow 80ms ease, background 100ms ease, border-color 100ms ease;
  user-select: none;
}

.reaction-tile span {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 0.76rem;
  font-weight: 900;
}

.reaction-tile::before {
  position: absolute;
  inset: 29%;
  border: 2px solid currentColor;
  content: "";
}

.reaction-tile:hover {
  border-color: #61566f;
  background: #2d243b;
}

.reaction-tile:active,
.reaction-tile.is-pressed {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--shadow);
}

.reaction-tile:focus-visible {
  z-index: 2;
  outline: 4px solid var(--blue);
  outline-offset: 3px;
}

.reaction-tile.is-target {
  border-color: #fff2a3;
  background: var(--gold);
  box-shadow: 0 0 34px rgba(247, 201, 72, 0.58), 6px 6px 0 var(--shadow);
  color: #21190e;
  transform: scale(1.035);
}

.reaction-tile.is-correct {
  border-color: #b4ffd0;
  background: var(--green);
  color: #102719;
}

.reaction-tile.is-wrong {
  border-color: #ffadb4;
  background: var(--red);
  color: #2a0d12;
}

.feedback {
  display: flex;
  min-height: 48px;
  margin: 0 0 16px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.feedback[hidden] {
  display: none;
}

.feedback strong {
  color: var(--green);
  font-size: 1.35rem;
}

.feedback span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.game-stage[data-state="waiting"] .primary-button,
.game-stage[data-state="active"] .primary-button,
.game-stage[data-state="feedback"] .primary-button {
  visibility: hidden;
}

.game-stage[data-state="waiting"] .reaction-grid {
  animation: grid-wait 900ms steps(2, end) infinite;
}

.game-stage[data-state="wrong"],
.game-stage[data-state="early"],
.game-stage[data-state="game-over"] {
  background-color: #351521;
}

.game-stage[data-state="complete"] {
  background-color: #2d2515;
}

.control-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
}

.content-section {
  display: grid;
  grid-template-columns: 0.85fr 1.6fr;
  gap: 64px;
  padding: 76px 18px 58px;
}

.content-section h2,
.info-panel h2,
.faq-section h2,
.related-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.steps-list {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--line);
  list-style: none;
}

.steps-list li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 2px solid var(--line);
}

.steps-list span {
  color: var(--gold);
  font-weight: 800;
}

.steps-list p,
.info-panel p,
.faq-list p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.reading-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.info-panel {
  padding: 30px;
  border: 2px solid var(--line);
  background: var(--panel);
}

.info-panel h2 {
  margin-bottom: 22px;
}

.info-panel > p:not(.section-kicker) + p {
  margin-top: 16px;
}

.faq-section,
.related-section {
  padding: 72px 18px 0;
}

.faq-list {
  margin-top: 28px;
  border-top: 2px solid var(--line);
}

.faq-list details {
  border-bottom: 2px solid var(--line);
}

.faq-list summary {
  padding: 22px 44px 22px 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
}

.faq-list details p {
  max-width: 850px;
  padding: 0 0 24px;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.related-links a {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.related-links a:hover,
.related-links a:focus-visible {
  border-color: var(--gold);
  outline: 0;
}

.related-links small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

@keyframes grid-wait {
  0%, 49% { opacity: 0.76; }
  50%, 100% { opacity: 1; }
}

@media (max-width: 820px) {
  .game-heading {
    grid-template-columns: 1fr;
  }

  .round-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .round-box > span {
    margin: 0;
  }

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

@media (max-width: 620px) {
  .grid-shell {
    width: min(100% - 18px, 600px);
    padding-top: 10px;
  }

  .game-heading {
    gap: 20px;
    padding: 24px 18px;
  }

  .game-heading h1 {
    font-size: clamp(2.2rem, 12vw, 3.75rem);
  }

  .game-card > .mode-panel {
    padding-inline: 16px;
  }

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

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 2px solid var(--line);
  }

  .game-stage {
    min-height: 610px;
    padding: 30px 12px 24px;
  }

  .stage-copy {
    min-height: 125px;
  }

  .reaction-grid {
    width: min(390px, calc(100vw - 54px));
    gap: 9px;
  }

  .reaction-tile {
    border-width: 2px;
    box-shadow: 4px 4px 0 var(--shadow);
  }

  .reaction-tile.is-target {
    box-shadow: 0 0 26px rgba(247, 201, 72, 0.5), 4px 4px 0 var(--shadow);
  }

  .content-section,
  .reading-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    gap: 30px;
    padding: 58px 8px 44px;
  }

  .info-panel {
    padding: 24px 20px;
  }

  .faq-section,
  .related-section {
    padding: 58px 8px 0;
  }

  .related-links {
    grid-template-columns: 1fr;
  }

  .related-links a {
    min-height: 92px;
  }
}

@media (max-width: 390px) {
  .reaction-grid {
    width: min(326px, calc(100vw - 48px));
    gap: 7px;
  }

  .reaction-tile span {
    right: 7px;
    bottom: 5px;
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reaction-tile,
  .deadline-fill {
    transition: none !important;
  }

  .game-stage[data-state="waiting"] .reaction-grid {
    animation: none;
  }
}
