:root {
  --bg-0: #03070d;
  --bg-1: #08111b;
  --bg-2: #0d1824;
  --bg-3: #112235;
  --surface: rgba(12, 21, 33, 0.78);
  --surface-strong: rgba(15, 25, 39, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text-strong: #f7f8fb;
  --text-body: #c9d3df;
  --text-muted: #8e9cad;
  --accent-current: #ff835e;
  --accent-glow: rgba(255, 131, 94, 0.34);
  --accent-alt: #49d3c1;
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --board-max: min(82vw, 760px);
}

.page--play {
  --board-max: min(96vw, 920px);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: "Segoe UI Variable Text", "Aptos", "Segoe UI", sans-serif;
  color: var(--text-body);
  background:
    radial-gradient(circle at top left, rgba(255, 129, 92, 0.12), transparent 25%),
    radial-gradient(circle at 82% 12%, rgba(73, 211, 193, 0.12), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(108, 132, 255, 0.08), transparent 28%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 30%, var(--bg-2) 72%, var(--bg-3) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.8), transparent 80%);
  pointer-events: none;
  opacity: 0.34;
}

a,
button,
select {
  font: inherit;
}

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

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
  opacity: 0.22;
}

.ambient--one {
  top: -120px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 131, 94, 0.8), transparent 72%);
  animation: driftA 18s ease-in-out infinite;
}

.ambient--two {
  top: 22%;
  right: -110px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(73, 211, 193, 0.7), transparent 72%);
  animation: driftB 22s ease-in-out infinite;
}

.ambient--three {
  bottom: -120px;
  left: 42%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(124, 169, 255, 0.6), transparent 72%);
  animation: driftC 20s ease-in-out infinite;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.shell--wide {
  width: min(1420px, calc(100% - 28px));
}

.shell--narrow {
  width: min(980px, calc(100% - 28px));
}

.shell--spaced {
  padding-top: 26px;
  padding-bottom: 42px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 0;
}

.page--play .site-header {
  padding-top: 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 12, 20, 0.72);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.page--play .brand-mark {
  padding: 10px 14px;
  background: rgba(6, 12, 20, 0.54);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.page--play .brand-mark span span {
  display: none;
}

.brand-mark strong,
.top-nav a[aria-current="page"],
.hero-panel h1,
.status-strip h1,
.panel-head h2,
.board-panel__head h2 {
  color: var(--text-strong);
}

.brand-mark span span {
  display: block;
  margin-top: 3px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.brand-mark__pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-current);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2.2s ease-in-out infinite;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 12, 20, 0.66);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.page--play .top-nav {
  padding: 4px;
  background: rgba(6, 12, 20, 0.42);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.top-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-strong);
  outline: none;
}

.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: transform 420ms ease, opacity 420ms ease;
}

body.is-ready .reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-panel,
.surface-panel,
.status-strip,
.board-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--surface);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.hero-panel--compact {
  grid-template-columns: 1fr;
}

.eyebrow,
.section-kicker {
  margin: 0;
  font-family: "Bahnschrift", "Trebuchet MS", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f8b58f;
}

.hero-panel h1,
.status-strip h1 {
  margin: 10px 0 14px;
  font-family: "Bahnschrift", "Trebuchet MS", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.page--play .status-strip h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  letter-spacing: -0.03em;
}

.hero-panel__lede,
.status-strip p,
.feature-list p,
.log-entry p {
  margin: 0;
  line-height: 1.62;
  color: var(--text-body);
}

.hero-panel__actions,
.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-panel__visual {
  display: grid;
  gap: 18px;
  align-content: center;
}

.board-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.2);
}

.board-preview__cell {
  aspect-ratio: 1;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.14), transparent 32%),
    rgba(8, 15, 24, 0.86);
  position: relative;
  overflow: hidden;
}

.board-preview__cell::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--preview-color, rgba(255, 255, 255, 0.28)), transparent 68%);
  animation: previewPulse 2.4s ease-in-out infinite;
}

.board-preview__cell--hot {
  --preview-color: rgba(255, 131, 94, 0.72);
}

.board-preview__cell--cool {
  --preview-color: rgba(73, 211, 193, 0.72);
}

.board-preview__cell--gold {
  --preview-color: rgba(255, 209, 102, 0.72);
}

.hero-facts,
.status-strip__stats {
  display: grid;
  gap: 12px;
}

.hero-fact,
.summary-stat,
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
}

.hero-fact span,
.summary-stat span,
.choice-chip span,
.player-chip span span,
.roster-card__footer,
.roster-card__stats span {
  color: var(--text-muted);
}

.hero-fact strong,
.summary-stat strong,
.choice-chip strong,
.player-chip strong,
.score-row strong,
.roster-card__stats strong {
  color: var(--text-strong);
}

.lobby-grid,
.rules-stack {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

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

.surface-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.page--play .surface-panel {
  padding: 16px;
}

.surface-panel:nth-child(1),
.surface-panel:nth-child(2),
.surface-panel:nth-child(4),
.surface-panel:nth-child(5) {
  grid-column: span 6;
}

.surface-panel--wide,
.rules-stack .surface-panel {
  grid-column: 1 / -1;
}

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

.panel-head h2,
.board-panel__head h2 {
  margin: 8px 0 0;
  font-size: 1.45rem;
}

.choice-row,
.player-type-list,
.scoreboard-preview,
.player-roster,
.move-log,
.feature-list {
  display: grid;
  gap: 12px;
}

.choice-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.choice-chip,
.player-type-item,
.roster-card,
.log-entry {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.choice-chip {
  display: grid;
  gap: 6px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.choice-chip.is-active,
.choice-chip:hover,
.choice-chip:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22), 0 0 24px rgba(255, 255, 255, 0.04);
  outline: none;
}

.choice-chip.is-active {
  background: linear-gradient(180deg, rgba(255, 131, 94, 0.12), rgba(255, 255, 255, 0.03));
}

.player-type-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.player-type-item select {
  min-width: 110px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(4, 9, 14, 0.84);
  color: var(--text-strong);
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.player-chip__swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 22px var(--player-glow, rgba(255, 255, 255, 0.18));
}

.score-row {
  padding-block: 12px;
}

.status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-xl);
}

.page--play .status-strip {
  padding: 18px 20px;
}

.status-pill,
.action-button,
.action-button--ghost {
  border-radius: 999px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-strong);
  font-weight: 700;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 320px);
  gap: 20px;
  margin-top: 20px;
}

.board-panel {
  padding: 20px;
  border-radius: var(--radius-xl);
}

.page--play .board-panel {
  padding: 16px;
}

.board-panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page--play .board-panel__head {
  margin-bottom: 12px;
}

.board-hints {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-hints span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.page--play .board-hints span {
  padding: 7px 10px;
  font-size: 0.82rem;
}

.board-shell {
  position: relative;
  padding: 12px;
  border-radius: calc(var(--radius-xl) - 6px);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.04), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.board-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.03));
  pointer-events: none;
}

.side-rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.page--play .side-rail {
  gap: 14px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-current) 76%, #fff 24%), var(--accent-current));
  color: #08111b;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 20px 42px var(--accent-glow);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.action-button:hover,
.action-button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.action-button:disabled,
.action-button.is-disabled {
  opacity: 0.42;
  pointer-events: none;
  box-shadow: none;
}

.action-button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-strong);
  box-shadow: none;
}

.board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols, 9), minmax(0, 1fr));
  gap: 10px;
  width: min(100%, var(--board-max));
  margin: 0 auto;
}

.cell {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.008)),
    rgba(7, 13, 21, 0.88);
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
  touch-action: manipulation;
  will-change: transform, box-shadow;
}

.cell:hover,
.cell:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.2);
  outline: none;
}

.cell--playable:hover,
.cell--playable:focus-visible {
  border-color: var(--player-color, rgba(255, 255, 255, 0.25));
  box-shadow:
    0 18px 28px rgba(0, 0, 0, 0.24),
    0 0 24px var(--player-glow, rgba(255, 255, 255, 0.16));
}

.cell--owned {
  border-color: color-mix(in srgb, var(--player-color, #ffffff) 45%, rgba(255, 255, 255, 0.05));
}

.cell--placed {
  animation: placedImpact 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cell--critical {
  animation: cellCharge 1.24s ease-in-out infinite;
}

.cell--unstable {
  animation: unstableSnap 280ms ease-in-out 2;
}

.cell--invalid {
  animation: invalidShake 320ms ease;
}

.cell__inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  overflow: hidden;
}

.cell__burst {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--player-color, rgba(255, 255, 255, 0.24)), transparent 70%);
  opacity: 0.1;
}

.cell__shock {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--player-color, #ffffff) 62%, rgba(255, 255, 255, 0.18));
  opacity: 0;
  transform: scale(0.3);
}

.cell--placed .cell__shock {
  animation: shockRing 380ms ease-out;
}

.cell--placed .cell__burst {
  animation: burstBloom 340ms ease-out;
}

.orb-cluster {
  position: relative;
  width: 70%;
  height: 70%;
}

.orb {
  position: absolute;
  width: clamp(12px, 20%, 20px);
  height: clamp(12px, 20%, 20px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.95), transparent 30%),
    color-mix(in srgb, var(--player-color, #ffffff) 80%, #fff 20%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 18px var(--player-glow, rgba(255, 255, 255, 0.22));
  transform: translate(-50%, -50%);
  animation: orbPulse 1.6s ease-in-out infinite;
}

.cell__count,
.cell__critical {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(3, 8, 14, 0.78);
  color: var(--text-strong);
}

.cell__count {
  right: 8px;
  bottom: 8px;
}

.cell__critical {
  left: 8px;
  top: 8px;
  color: #ffd7b4;
}

.roster-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.roster-card.is-active {
  border-color: color-mix(in srgb, var(--player-color) 55%, rgba(255, 255, 255, 0.1));
  box-shadow: 0 0 24px var(--player-glow);
}

.roster-card.is-eliminated {
  opacity: 0.5;
}

.roster-card__head,
.roster-card__stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.move-log {
  max-height: 360px;
  overflow: auto;
}

.log-entry {
  padding: 14px;
}

.log-entry strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-strong);
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 131, 94, 0.32);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 131, 94, 0);
  }
}

@keyframes previewPulse {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes orbPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.96);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes placedImpact {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  45% {
    transform: scale(1.03);
    box-shadow:
      0 0 26px var(--player-glow, rgba(255, 255, 255, 0.24)),
      0 16px 28px rgba(0, 0, 0, 0.22);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shockRing {
  0% {
    opacity: 0.72;
    transform: scale(0.28);
  }
  100% {
    opacity: 0;
    transform: scale(1.26);
  }
}

@keyframes burstBloom {
  0% {
    opacity: 0.42;
    transform: scale(0.62);
  }
  100% {
    opacity: 0.06;
    transform: scale(1.16);
  }
}

@keyframes cellCharge {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 20px var(--player-glow, rgba(255, 255, 255, 0.18));
  }
}

@keyframes unstableSnap {
  0%,
  100% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.94);
  }
  70% {
    transform: scale(1.02);
  }
}

@keyframes invalidShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

@keyframes driftA {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(40px, 22px, 0);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-32px, 30px, 0);
  }
}

@keyframes driftC {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(20px, -28px, 0);
  }
}

@media (max-width: 1180px) {
  .play-layout,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }
}

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

  .surface-panel:nth-child(1),
  .surface-panel:nth-child(2),
  .surface-panel:nth-child(4),
  .surface-panel:nth-child(5) {
    grid-column: auto;
  }

  .site-header {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }

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

@media (max-width: 720px) {
  .board {
    gap: 8px;
  }

  .board-panel,
  .surface-panel,
  .status-strip,
  .hero-panel {
    padding: 18px;
  }

  .board-panel__head,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .choice-row {
    grid-template-columns: 1fr;
  }

  .page--play .site-header {
    flex-direction: row;
    align-items: center;
    padding-top: 8px;
  }

  .page--play .brand-mark {
    padding: 8px 10px;
  }

  .page--play .brand-mark strong {
    font-size: 0.92rem;
  }

  .page--play .top-nav {
    gap: 6px;
  }

  .page--play .top-nav a {
    padding: 8px 10px;
    font-size: 0.88rem;
  }

  .page--play .status-strip {
    padding: 12px 14px;
    gap: 10px;
    border-radius: 20px;
  }

  .page--play .status-strip__stats,
  .page--play .board-hints {
    display: none;
  }

  .page--play .status-strip p {
    font-size: 0.92rem;
  }

  .page--play .play-layout {
    margin-top: 10px;
    gap: 12px;
  }

  .page--play .board-panel {
    padding: 10px;
    border-radius: 22px;
  }

  .page--play .board-panel__head {
    margin-bottom: 8px;
  }

  .page--play .board-shell {
    padding: 6px;
    border-radius: 18px;
  }

  .page--play .side-rail {
    gap: 10px;
  }

  .page--play .side-rail .surface-panel {
    padding: 12px;
  }
}

@media (max-width: 540px) {
  .shell,
  .shell--wide,
  .shell--narrow {
    width: min(100% - 16px, 100%);
  }

  .hero-panel__actions,
  .play-actions {
    flex-direction: column;
  }

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

  .board {
    gap: 6px;
  }

  .cell {
    border-radius: 14px;
  }

  .cell__count,
  .cell__critical {
    min-width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }

  .page--play .shell,
  .page--play .shell--wide {
    width: min(100% - 8px, 100%);
  }

  .page--play .shell--spaced {
    padding-top: 8px;
  }

  .page--play .site-header {
    gap: 8px;
  }

  .page--play .brand-mark {
    padding: 6px 9px;
  }

  .page--play .brand-mark__pulse {
    width: 10px;
    height: 10px;
  }

  .page--play .status-strip {
    padding: 10px 12px;
    margin-bottom: 0;
  }

  .page--play .board-panel {
    padding: 8px;
  }

  .page--play .board-shell {
    padding: 4px;
  }

  .page--play .board {
    gap: 4px;
    width: 100%;
  }

  .page--play .play-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  .page--play .play-actions .action-button,
  .page--play .play-actions .action-button--ghost {
    width: 100%;
    min-height: 42px;
    padding: 0 8px;
    font-size: 0.86rem;
  }

  .page--play .side-rail .surface-panel:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
