:root {
  --night: #00151d;
  --ink: #013f43;
  --ink-light: #075e63;
  --cyan: #1cd4de;
  --cyan-pale: #d2f6f8;
  --lime: #c9ef70;
  --amber: #ffc95b;
  --coral: #ff654f;
  --red: #ff334e;
  --paper: #f4f7f6;
  --white: #fff;
  --muted: #8fb8ba;
  --panel: rgba(0, 29, 38, .88);
  --arcade-shadow: 0 34px 80px rgba(0, 15, 22, .38);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--white);
  background:
    radial-gradient(circle at 15% 30%, rgba(28, 212, 222, .12), transparent 28rem),
    radial-gradient(circle at 88% 67%, rgba(255, 101, 79, .09), transparent 28rem),
    linear-gradient(180deg, #001b24, var(--night));
  font-family: "Segoe UI", "Avenir Next", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 7px;
  color: var(--night);
  background: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 17px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(28, 212, 222, .18);
  background: rgba(1, 63, 67, .92);
  backdrop-filter: blur(14px);
}

.brand,
.brand img {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 26px;
}

.games-link {
  color: var(--cyan-pale);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.games-link:hover {
  color: var(--white);
}

.emergency-link {
  text-align: right;
  text-decoration: none;
}

.emergency-link span,
.emergency-link strong {
  display: block;
}

.emergency-link span {
  color: var(--cyan);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.emergency-link strong {
  font-size: 1rem;
}

.game-page {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 58px) clamp(14px, 4vw, 44px) 48px;
}

.title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--cyan);
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-weight: 900;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: .82;
  text-shadow: 0 0 30px rgba(28, 212, 222, .12);
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 2px var(--cyan);
  text-shadow: 0 0 20px rgba(28, 212, 222, .22);
}

h1 em {
  display: inline-grid;
  width: .78em;
  height: .78em;
  place-items: center;
  border-radius: 10px;
  color: var(--night);
  background: var(--amber);
  box-shadow: 5px 5px 0 var(--coral);
  font-size: .52em;
  font-style: normal;
  transform: rotate(5deg) translateY(-.18em);
}

.tagline {
  max-width: 440px;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.5;
  text-align: right;
}

.arcade-shell {
  position: relative;
  border: 1px solid rgba(28, 212, 222, .27);
  border-radius: 24px 24px 16px 16px;
  background:
    linear-gradient(145deg, rgba(7, 94, 99, .78), rgba(0, 29, 38, .96) 27% 75%, rgba(1, 63, 67, .8)),
    var(--ink);
  box-shadow: var(--arcade-shadow), inset 0 1px rgba(255,255,255,.08);
  overflow: hidden;
}

.arcade-shell::before,
.arcade-shell::after {
  content: "";
  position: absolute;
  z-index: 10;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(210, 246, 248, .25);
  border-radius: 50%;
  background: var(--night);
}

.arcade-shell::before {
  top: 13px;
  left: 15px;
}

.arcade-shell::after {
  top: 13px;
  right: 15px;
}

.cabinet-top {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 11px 28px 9px;
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: .63rem;
  letter-spacing: .27em;
  text-align: center;
}

.cabinet-top span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(28,212,222,.38));
}

.cabinet-top span:last-child {
  transform: scaleX(-1);
}

.game-hud {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 1px;
  margin: 0 16px;
  border: 1px solid rgba(28, 212, 222, .24);
  border-radius: 11px 11px 0 0;
  background: rgba(28,212,222,.18);
  overflow: hidden;
}

.hud-stat {
  position: relative;
  min-height: 75px;
  padding: 9px 15px;
  background: rgba(0, 21, 29, .87);
}

.hud-stat > span,
.hud-stat > strong,
.hud-stat > small {
  display: block;
}

.hud-stat > span {
  margin-bottom: 1px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hud-stat > strong {
  color: var(--cyan);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  letter-spacing: .05em;
  line-height: 1;
  text-shadow: 0 0 15px rgba(28, 212, 222, .38);
}

.hud-stat > small {
  margin-top: 4px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: .58rem;
}

.hud-stat small b {
  color: var(--cyan-pale);
}

.combo-stat > strong {
  color: var(--amber);
  text-shadow: 0 0 15px rgba(255, 201, 91, .4);
}

.flood-stat > strong {
  color: var(--coral);
}

.flood-track {
  position: relative;
  height: 6px;
  margin-top: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}

.flood-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--amber) 65%, var(--red));
  box-shadow: 0 0 10px var(--coral);
  transition: width .15s linear;
}

.viewport-wrap {
  position: relative;
  height: min(68vh, 690px);
  min-height: 520px;
  margin: 0 16px;
  border-right: 1px solid rgba(28, 212, 222, .24);
  border-bottom: 1px solid rgba(28, 212, 222, .24);
  border-left: 1px solid rgba(28, 212, 222, .24);
  background: #00141b;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scanlines,
.screen-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.scanlines {
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 10, 15, .15) 3px 4px);
  opacity: .42;
  mix-blend-mode: multiply;
}

.screen-vignette {
  box-shadow: inset 0 0 75px 18px rgba(0, 5, 10, .6);
}

.corner-status {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  top: 14px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: .58rem;
  letter-spacing: .12em;
}

.corner-status span {
  color: var(--cyan);
}

.corner-status b {
  color: var(--cyan-pale);
}

.corner-status.top-left {
  left: 14px;
}

.corner-status.top-right {
  right: 14px;
}

.crosshair {
  position: absolute;
  z-index: 3;
  display: none;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(28,212,222,.75);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.crosshair::before,
.crosshair::after {
  content: "";
  position: absolute;
  background: var(--cyan);
}

.crosshair::before {
  top: 16px;
  left: -5px;
  width: 42px;
  height: 1px;
}

.crosshair::after {
  top: -5px;
  left: 16px;
  width: 1px;
  height: 42px;
}

.crosshair i {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.viewport-wrap.has-pointer .crosshair {
  display: block;
}

.floating-message {
  position: absolute;
  z-index: 8;
  display: none;
  padding: 7px 10px;
  border: 1px solid currentColor;
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(0,21,29,.9);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.05rem;
  letter-spacing: .06em;
  pointer-events: none;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
}

.floating-message.is-visible {
  display: block;
  animation: score-rise .8s ease-out forwards;
}

.floating-message.is-miss {
  color: var(--coral);
}

.load-screen,
.game-overlay,
.pause-panel,
.webgl-error {
  position: absolute;
  inset: 0;
  z-index: 12;
}

.load-screen {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  background: var(--night);
  font-family: Consolas, monospace;
  letter-spacing: .12em;
  text-align: center;
  transition: opacity .45s, visibility .45s;
}

.load-screen.is-loaded {
  visibility: hidden;
  opacity: 0;
}

.load-screen strong {
  color: var(--cyan);
  font-size: .78rem;
}

.load-screen span {
  color: var(--muted);
  font-size: .63rem;
}

.loader-ring {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(28,212,222,.18);
  border-top-color: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(28,212,222,.2);
  animation: spin .9s linear infinite;
}

.game-overlay {
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: clamp(22px, 5vw, 56px);
  color: var(--white);
  background:
    radial-gradient(circle at 50% 25%, rgba(28,212,222,.12), transparent 25rem),
    rgba(0, 21, 29, .9);
  backdrop-filter: blur(8px);
  opacity: 0;
  text-align: center;
  transition: opacity .35s, visibility .35s;
}

.game-overlay.is-visible {
  visibility: visible;
  opacity: 1;
}

.overlay-badge,
.overlay-kicker {
  margin: 0 0 11px;
  padding: 6px 9px;
  border: 1px solid rgba(28,212,222,.4);
  border-radius: 5px;
  color: var(--cyan);
  background: rgba(28,212,222,.07);
  font-family: Consolas, monospace;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.game-overlay h2 {
  max-width: 750px;
  font-size: clamp(2.25rem, 6vw, 5.4rem);
  line-height: .9;
  text-shadow: 0 0 35px rgba(28,212,222,.2);
}

.game-overlay h2 span {
  color: var(--cyan);
}

.game-overlay > p:not(.overlay-kicker) {
  max-width: 560px;
  margin: 17px 0;
  color: var(--cyan-pale);
  font-size: clamp(.86rem, 1.6vw, 1rem);
  line-height: 1.55;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(540px, 100%);
  margin: 5px 0 22px;
}

.control-grid div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(28,212,222,.17);
  border-radius: 7px;
  background: rgba(0, 15, 22, .55);
  text-align: left;
}

kbd {
  display: grid;
  min-width: 38px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(210,246,248,.3);
  border-radius: 5px;
  color: var(--amber);
  background: rgba(255,255,255,.05);
  box-shadow: inset 0 -2px rgba(0,0,0,.3);
  font: 800 .68rem Consolas, monospace;
}

.control-grid span {
  color: var(--muted);
  font-size: .68rem;
}

.arcade-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-width: 220px;
  min-height: 58px;
  padding: 10px 22px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transform: skewX(-4deg);
  transition: transform .18s, filter .18s;
}

.arcade-button:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: skewX(-4deg) translateY(-3px);
}

.arcade-button:active:not(:disabled) {
  transform: skewX(-4deg) translateY(1px);
}

.arcade-button:disabled {
  cursor: wait;
  filter: grayscale(.7);
  opacity: .5;
}

.arcade-button.primary {
  color: var(--night);
  background: linear-gradient(135deg, var(--cyan), #63edf2);
  box-shadow: 6px 6px 0 #087982, 0 0 25px rgba(28,212,222,.25);
}

.arcade-button.secondary {
  color: var(--cyan);
  border: 1px solid var(--cyan);
  background: rgba(28,212,222,.07);
}

.arcade-button span,
.arcade-button b {
  transform: skewX(4deg);
}

.arcade-button span {
  font: 700 .55rem Consolas, monospace;
  letter-spacing: .14em;
}

.arcade-button b {
  margin-top: 2px;
  font: 900 .89rem "Arial Black", sans-serif;
  letter-spacing: .04em;
}

.intro-overlay > small {
  margin-top: 16px;
  color: var(--muted);
  font-size: .66rem;
}

.tip-overlay {
  background:
    radial-gradient(circle at 20% 15%, rgba(201,239,112,.12), transparent 20rem),
    rgba(0, 21, 29, .94);
}

.tip-overlay h2 {
  color: var(--lime);
  font-size: clamp(2.3rem, 5vw, 4.5rem);
}

.tip-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  width: min(600px, 100%);
  margin: 18px 0 12px;
  padding: 17px;
  border: 1px solid rgba(201,239,112,.38);
  border-radius: 10px;
  background: rgba(201,239,112,.06);
  text-align: left;
}

.tip-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 9px;
  color: var(--night);
  background: var(--lime);
  font-size: 1.8rem;
}

.tip-card strong {
  color: var(--lime);
  font-size: 1.02rem;
}

.tip-card p {
  margin: 5px 0 0;
  color: var(--cyan-pale);
  font-size: .85rem;
  line-height: 1.5;
}

.wave-score {
  margin: 3px 0 18px;
  font-family: Consolas, monospace;
}

.wave-score span {
  margin-right: 8px;
  color: var(--muted);
  font-size: .67rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.wave-score strong {
  color: var(--amber);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(570px, 100%);
  margin: 2px 0 15px;
}

.result-grid div {
  padding: 11px 12px;
  border: 1px solid rgba(28,212,222,.18);
  border-radius: 7px;
  background: rgba(0,15,22,.65);
}

.result-grid span,
.result-grid strong {
  display: block;
}

.result-grid span {
  color: var(--muted);
  font: 700 .59rem Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-grid strong {
  margin-top: 3px;
  color: var(--cyan);
  font-family: "Arial Black", sans-serif;
  font-size: 1.4rem;
}

.real-emergency {
  width: min(570px, 100%);
  margin-bottom: 18px;
  padding: 10px 13px;
  border-left: 3px solid var(--coral);
  color: var(--cyan-pale);
  background: rgba(255,101,79,.08);
  font-size: .78rem;
  text-align: left;
}

.real-emergency span {
  color: var(--coral);
  font-weight: 900;
}

.end-actions {
  display: flex;
  gap: 13px;
}

.leaderboard-form {
  display: grid;
  gap: 10px;
  margin: 4px 0 2px;
  padding: 14px;
  border: 1px solid rgba(28, 212, 222, .28);
  border-radius: 14px;
  background: rgba(0, 29, 38, .55);
  text-align: left;
}

.leaderboard-form[hidden] {
  display: none;
}

.leaderboard-kicker {
  margin: 0;
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.leaderboard-form label {
  display: grid;
  gap: 4px;
  font-size: .78rem;
  color: var(--cyan-pale);
}

.leaderboard-form input[type="text"],
.leaderboard-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(28, 212, 222, .25);
  border-radius: 10px;
  color: var(--white);
  background: rgba(0, 15, 22, .65);
  font: inherit;
}

.leaderboard-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  grid-template-columns: none;
}

.leaderboard-check input {
  margin-top: 2px;
  accent-color: var(--cyan);
}

.leaderboard-form .hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.leaderboard-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--lime);
  font-size: .8rem;
  font-weight: 700;
}

.pause-panel {
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 21, 29, .78);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .2s, visibility .2s;
}

.pause-panel.is-visible {
  visibility: visible;
  opacity: 1;
}

.pause-panel strong {
  color: var(--amber);
  font: 900 3rem Impact, sans-serif;
  letter-spacing: .08em;
}

.pause-panel span {
  color: var(--muted);
}

.pause-panel button {
  margin-top: 8px;
  padding: 9px 18px;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(28,212,222,.08);
  font-weight: 800;
  cursor: pointer;
}

.webgl-error {
  padding: 80px 30px;
  color: var(--white);
  background: var(--night);
  text-align: center;
}

.cabinet-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 22px 17px;
}

.control-help {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: .68rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(28,212,222,.09), 0 0 15px var(--cyan);
  animation: pulse 1.5s ease-in-out infinite;
}

.control-actions {
  display: flex;
  gap: 9px;
}

.round-control {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(28,212,222,.28);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(0,21,29,.6);
  cursor: pointer;
}

.round-control:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.round-control svg {
  width: 19px;
  fill: currentColor;
}

.round-control .sound-wave,
.round-control .sound-off {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.round-control .sound-off {
  display: none;
}

.round-control[aria-pressed="false"] .sound-wave {
  display: none;
}

.round-control[aria-pressed="false"] .sound-off {
  display: block;
}

.after-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 15px 18px;
  border: 1px solid rgba(28,212,222,.15);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(1,63,67,.23);
  font-size: .78rem;
}

.after-game p {
  margin: 0;
}

.after-game strong {
  color: var(--cyan-pale);
}

.after-game a {
  flex: 0 0 auto;
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.games-room-back {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 16px 0 0;
}

.games-room-back-footer {
  margin: 0;
  padding: 22px clamp(20px, 5vw, 72px) 10px;
  background: #00151d;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 22px clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(28,212,222,.13);
  color: var(--muted);
  background: #001016;
  font-size: .67rem;
}

.site-footer p {
  max-width: 720px;
  margin: 0;
}

.site-footer strong {
  color: var(--white);
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  color: var(--cyan);
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  50% { opacity: .45; box-shadow: 0 0 0 3px rgba(28,212,222,.05), 0 0 8px var(--cyan); }
}

@keyframes score-rise {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(.9); }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 64px;
  }

  .brand img {
    width: 142px;
    height: auto;
  }

  .games-link {
    display: none;
  }

  .emergency-link span {
    display: none;
  }

  .emergency-link strong {
    font-size: .88rem;
  }

  .title-row {
    display: block;
  }

  .tagline {
    margin-top: 13px;
    text-align: left;
  }

  h1 {
    font-size: clamp(3.1rem, 14vw, 5.2rem);
  }

  .game-hud {
    grid-template-columns: repeat(4, 1fr);
  }

  .hud-stat {
    min-height: 64px;
    padding: 8px 7px;
    text-align: center;
  }

  .hud-stat > strong {
    font-size: clamp(1.1rem, 5vw, 1.55rem);
  }

  .hud-stat > small {
    font-size: .49rem;
  }

  .viewport-wrap {
    height: min(67vh, 620px);
    min-height: 500px;
  }

  .game-overlay {
    padding: 22px 16px;
  }

  .game-overlay h2 {
    font-size: clamp(2.3rem, 12vw, 4rem);
  }

  .control-grid {
    grid-template-columns: 1fr;
    width: min(300px, 100%);
  }

  .control-grid div {
    padding: 6px 8px;
  }

  .control-grid span {
    font-size: .64rem;
  }

  .tip-card {
    grid-template-columns: 45px 1fr;
    gap: 12px;
    padding: 13px;
  }

  .tip-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .end-actions {
    width: min(460px, 100%);
  }

  .end-actions > * {
    flex: 1;
    min-width: 0;
  }

  .after-game,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .game-page {
    padding-right: 8px;
    padding-left: 8px;
  }

  .title-row {
    padding: 0 7px;
  }

  .arcade-shell {
    border-radius: 16px 16px 11px 11px;
  }

  .cabinet-top {
    padding-right: 20px;
    padding-left: 20px;
    font-size: .53rem;
  }

  .game-hud,
  .viewport-wrap {
    margin-right: 7px;
    margin-left: 7px;
  }

  .hud-stat > span {
    font-size: .49rem;
  }

  .hud-stat > small {
    display: none;
  }

  .viewport-wrap {
    min-height: 480px;
  }

  .control-grid {
    margin-bottom: 15px;
  }

  .game-overlay > p:not(.overlay-kicker) {
    margin: 12px 0;
    font-size: .78rem;
  }

  .arcade-button {
    min-width: 190px;
  }

  .result-grid strong {
    font-size: 1.05rem;
  }

  .end-actions {
    flex-direction: column;
  }

  .cabinet-controls {
    padding: 12px 13px 14px;
  }

  .control-help {
    max-width: 230px;
    font-size: .58rem;
  }
}

@media (pointer: coarse) {
  .crosshair {
    display: none !important;
  }
}

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

  .scanlines {
    display: none;
  }
}
