@font-face {
  font-family: "Arcade Game";
  src: url("assets/fonts/Arcade-Wide.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #0c0b15;
  --panel: #13121f;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f9f7ff;
  --muted: #aaa5bd;
  --pink: #ff5ca8;
  --purple: #9f70ff;
  --cyan: #52e7ff;
  --red: #ff526b;
  --deep-purple: #211638;
  --glass: rgba(255, 255, 255, 0.075);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

html {
  background: #09030f;
}

body {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 22px;
  overflow: hidden;
  color: var(--text);
  font-family: "Arcade Game", monospace;
  font-weight: 700;
  letter-spacing: 0.025em;
  word-spacing: 0.04em;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(244, 142, 255, 0.32), transparent 38%),
    radial-gradient(ellipse at 15% 42%, rgba(82, 231, 255, 0.13), transparent 30%),
    radial-gradient(ellipse at 85% 42%, rgba(159, 112, 255, 0.2), transparent 32%),
    linear-gradient(180deg, #3a1c4d 0, #24102f 48%, #09030f 49%, #040106 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  top: 49%;
  z-index: 0;
  opacity: 0.7;
  background-image:
    linear-gradient(rgba(210, 82, 255, 0.62) 2px, transparent 2px),
    linear-gradient(90deg, rgba(210, 82, 255, 0.58) 2px, transparent 2px);
  background-size: 62px 42px;
  box-shadow: inset 0 28px 55px #09030f;
  transform: perspective(360px) rotateX(58deg) scale(1.7);
  transform-origin: center top;
  animation: arcade-floor 8s linear infinite;
}

body::after {
  z-index: 1000;
  opacity: 1;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.012) 0,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(ellipse 72% 24% at 44% -2%, rgba(255, 255, 255, 0.085), transparent 68%),
    linear-gradient(90deg, rgba(255, 44, 150, 0.14), transparent 5.5% 94.5%, rgba(52, 220, 255, 0.13)),
    radial-gradient(ellipse 62% 62% at 50% 50%, transparent 0 66%, rgba(5, 1, 9, 0.18) 79%, rgba(0, 0, 0, 0.82) 100%);
  box-shadow:
    inset 0 0 0 clamp(3px, 0.42vw, 8px) rgba(2, 0, 5, 0.78),
    inset 0 0 clamp(55px, 8vw, 150px) clamp(5px, 1vw, 18px) rgba(0, 0, 0, 0.38),
    inset 24px 0 52px -26px rgba(255, 62, 164, 0.28),
    inset -24px 0 52px -26px rgba(65, 221, 255, 0.24);
}

@keyframes arcade-floor {
  to {
    background-position: 0 42px, 62px 0;
  }
}

button {
  font: inherit;
}

.game-shell {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(1180px, 100%);
  min-width: 0;
}

.cabinet-marquee {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-disc {
  width: 31px;
  height: 31px;
  position: relative;
  border: 7px solid transparent;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--page) 0 42%, transparent 44%),
    conic-gradient(from 35deg, #fff, var(--pink) 18%, var(--purple) 52%, var(--cyan) 77%, #fff);
  box-shadow:
    0 0 0 4px rgba(255, 92, 168, 0.14),
    0 0 25px rgba(255, 92, 168, 0.4),
    inset 0 0 9px rgba(255, 255, 255, 0.65);
  animation: brand-shader 4s linear infinite;
}

@keyframes brand-shader {
  to {
    filter: hue-rotate(28deg) drop-shadow(0 0 8px rgba(82, 231, 255, 0.35));
    transform: rotate(360deg);
  }
}

.brand p,
.brand h1 {
  margin: 0;
}

.brand p {
  margin-bottom: 1px;
  color: var(--pink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.brand h1 {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  letter-spacing: 0.04em;
}

.xp-counter {
  flex: 0 0 auto;
  min-width: 5ch;
  text-align: right;
}

.xp-counter strong {
  display: block;
  min-width: 4ch;
  color: #000;
  font-family: "Arcade Game", monospace;
  font-size: clamp(2.8rem, 5.8vw, 5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 0.8;
  text-align: right;
  -webkit-text-stroke: 3px #b9b6c1;
  paint-order: stroke fill;
  text-shadow:
    4px 4px 0 #57535e,
    0 0 12px rgba(224, 221, 230, 0.2);
  transform: scaleX(1.16);
  transform-origin: right center;
}

.xp-counter strong.is-counting {
  animation: xp-counter-tick 96ms steps(2, end) infinite;
}

@keyframes xp-counter-tick {
  0%,
  100% {
    filter: brightness(1);
    transform: scaleX(1.16) scale(1);
  }
  50% {
    filter: brightness(1.16);
    transform: scaleX(1.16) scale(1.055);
  }
}

.game-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: var(--panel);
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(159, 112, 255, 0.08),
    0 0 55px rgba(159, 112, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.game-card::after {
  content: "";
  position: absolute;
  z-index: 50;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    inset 0 0 65px rgba(0, 0, 0, 0.16);
}

.game-field {
  --pulse-x: 50%;
  --pulse-y: 50%;
  --pulse-color: rgba(82, 231, 255, 0.24);
  position: relative;
  height: clamp(470px, 68dvh, 680px);
  overflow: hidden;
  isolation: isolate;
  cursor: crosshair;
  touch-action: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(159, 112, 255, 0.09), transparent 52%),
    linear-gradient(135deg, rgba(255, 92, 168, 0.025), transparent 38%, rgba(82, 231, 255, 0.025)),
    #0f0e19;
}

.game-field::before,
.game-field::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.game-field::before {
  z-index: 1;
  opacity: 0.7;
  background:
    radial-gradient(ellipse at 25% 10%, rgba(255, 92, 168, 0.09), transparent 42%),
    radial-gradient(ellipse at 78% 95%, rgba(82, 231, 255, 0.075), transparent 46%),
    conic-gradient(from 100deg at 50% 50%, transparent, rgba(159, 112, 255, 0.028), transparent 35%);
  mix-blend-mode: screen;
  animation: field-aurora 9s ease-in-out infinite alternate;
}

.game-field::after {
  z-index: 24;
  opacity: 0.12;
  background:
    radial-gradient(circle at var(--pulse-x) var(--pulse-y), var(--pulse-color) 0, transparent 28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
  background-blend-mode: screen, soft-light, normal;
  mix-blend-mode: screen;
}

.game-field.hit-pulse {
  --pulse-color: rgba(82, 231, 255, 0.55);
}

.game-field.miss-pulse {
  --pulse-color: rgba(255, 82, 107, 0.55);
}

.game-field.hit-pulse::after,
.game-field.miss-pulse::after {
  animation: field-impact 460ms ease-out;
}

@keyframes field-aurora {
  to {
    transform: scale(1.08) rotate(2deg);
    filter: hue-rotate(14deg);
  }
}

@keyframes field-impact {
  0% { opacity: 0.72; }
  100% { opacity: 0.12; }
}

.field-grid {
  z-index: 2;
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle, black 20%, transparent 82%);
  animation: grid-drift 18s linear infinite;
}

@keyframes grid-drift {
  to { background-position: 54px 54px; }
}

.ambient {
  z-index: 0;
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(159, 112, 255, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(159, 112, 255, 0.055), transparent 65%);
  filter: blur(0.2px);
  animation: ambient-float 8s ease-in-out infinite alternate;
}

.ambient-one {
  top: -180px;
  right: -80px;
  box-shadow: 0 0 100px rgba(159, 112, 255, 0.05) inset;
}

.ambient-two {
  bottom: -230px;
  left: -40px;
  width: 440px;
  height: 440px;
  border-color: rgba(82, 231, 255, 0.07);
  animation-delay: -4s;
}

@keyframes ambient-float {
  to {
    transform: translate3d(24px, -16px, 0) scale(1.08);
    opacity: 0.6;
  }
}

.target-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
}

.combo-counter {
  position: fixed;
  z-index: 1100;
  width: max-content;
  margin: 0;
  color: #000;
  font-family: "Arcade Game", monospace;
  font-size: clamp(2.8rem, 5.8vw, 5rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  -webkit-text-stroke: 4px #e8e5ef;
  paint-order: stroke fill;
  text-shadow:
    4px 4px 0 #66616d,
    0 0 7px rgba(255, 255, 255, 0.62),
    0 0 20px rgba(224, 221, 230, 0.44);
  transform-origin: left bottom;
}

.combo-slot {
  flex: 0 0 auto;
  pointer-events: none;
}

.combo-counter.is-bumping {
  animation: combo-bump 170ms steps(3, end);
}

@keyframes combo-bump {
  45% {
    filter: brightness(1.2);
    transform: scale(1.16);
  }
}

.aim-cursor,
.aim-trail-canvas {
  display: none;
  position: absolute;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .game-field {
    cursor: none;
  }

  .overlay {
    cursor: default;
  }

  .aim-cursor {
    z-index: 27;
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    opacity: 0;
    filter: drop-shadow(0 0 8px rgba(159, 112, 255, 0.82));
    transform: translate(-50%, -50%);
    transition: opacity 100ms ease;
  }

  .aim-cursor::before,
  .aim-cursor::after {
    content: "";
    position: absolute;
    border-radius: 50%;
  }

  .aim-cursor::before {
    inset: 0;
    border: 2px solid rgba(188, 160, 255, 0.98);
    background: radial-gradient(
      circle,
      rgba(159, 112, 255, 0.18),
      rgba(159, 112, 255, 0.04) 52%,
      transparent 70%
    );
    box-shadow:
      0 0 0 2px rgba(159, 112, 255, 0.2),
      0 0 15px rgba(159, 112, 255, 0.84),
      inset 0 0 10px rgba(159, 112, 255, 0.38);
    animation: aim-breathe 900ms ease-in-out infinite alternate;
    transition: border-color 80ms ease, transform 80ms ease;
  }

  .aim-cursor::after {
    inset: 50% auto auto 50%;
    width: 5px;
    height: 5px;
    background: var(--purple);
    box-shadow: 0 0 9px var(--purple), 0 0 17px rgba(159, 112, 255, 0.95);
    transform: translate(-50%, -50%);
  }

  .aim-cursor.is-visible {
    opacity: 1;
  }

  .aim-cursor.is-pressed::before {
    border-color: #d8c8ff;
    animation: none;
    transform: scale(0.72);
  }

  .aim-trail-canvas {
    z-index: 26;
    display: block;
    inset: 0;
    width: 100%;
    height: 100%;
  }
}

@keyframes aim-breathe {
  to {
    box-shadow:
      0 0 0 4px rgba(159, 112, 255, 0.1),
      0 0 20px rgba(159, 112, 255, 0.92),
      inset 0 0 13px rgba(159, 112, 255, 0.46);
    transform: scale(1.08);
  }
}

.hit-circle,
.slider-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 5px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.85) 0 4%, rgba(255, 255, 255, 0.24) 5% 15%, transparent 23%),
    radial-gradient(circle at 68% 76%, rgba(22, 10, 42, 0.42), transparent 46%),
    conic-gradient(from 215deg, color-mix(in srgb, var(--accent, var(--pink)) 72%, #fff), var(--accent, var(--pink)) 42%, color-mix(in srgb, var(--accent, var(--pink)) 66%, #241335) 78%, color-mix(in srgb, var(--accent, var(--pink)) 80%, #fff));
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--accent, var(--pink)) 26%, transparent),
    0 0 28px color-mix(in srgb, var(--accent, var(--pink)) 42%, transparent),
    inset 0 1px 7px rgba(255, 255, 255, 0.6),
    inset 0 -13px 22px rgba(28, 18, 39, 0.32),
    inset 0 0 0 5px rgba(28, 18, 39, 0.15);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 100ms ease, transform 100ms ease;
  user-select: none;
}

.hit-circle::before,
.slider-node::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.19), transparent 42%);
  box-shadow:
    inset 2px 3px 5px rgba(255, 255, 255, 0.09),
    inset -3px -5px 8px rgba(17, 7, 31, 0.14);
  pointer-events: none;
}

.hit-circle > span:last-child,
.slider-node > span:last-child {
  position: relative;
  z-index: 2;
  text-shadow:
    0 2px 0 rgba(27, 12, 46, 0.7),
    0 0 10px rgba(255, 255, 255, 0.35);
}

.hit-circle.is-visible,
.slider-target.is-visible .slider-node {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.approach-ring {
  z-index: 0;
  position: absolute;
  inset: -9px;
  border: 4px solid var(--accent, var(--pink));
  border-radius: 50%;
  opacity: 0.72;
  box-shadow:
    0 0 8px color-mix(in srgb, var(--accent, var(--pink)) 60%, transparent),
    inset 0 0 8px color-mix(in srgb, var(--accent, var(--pink)) 35%, transparent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent, var(--pink)) 60%, transparent));
  animation: approach var(--lifetime) linear forwards;
}

@keyframes approach {
  from {
    opacity: 0.2;
    transform: scale(2.15);
  }
  80% {
    opacity: 0.8;
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hit-circle.is-hit,
.slider-target.is-hit .slider-node {
  animation: target-hit 180ms ease-out forwards;
}

.hit-circle.is-missed,
.slider-target.is-missed .slider-node {
  animation: target-miss 260ms ease-out forwards;
}

@keyframes target-hit {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
    filter: brightness(1.5);
  }
}

@keyframes target-miss {
  35% {
    filter: saturate(0) brightness(1.6);
    transform: translate(-50%, -50%) scale(0.92);
  }
  to {
    opacity: 0;
    filter: saturate(0);
    transform: translate(-50%, -50%) scale(0.7);
  }
}

.slider-target {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 100ms ease;
}

.slider-target.is-visible {
  opacity: 1;
}

.slider-path-svg {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.slider-path-svg polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.slider-path-outline {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 68px;
  filter:
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.38))
    drop-shadow(0 0 17px rgba(159, 112, 255, 0.34));
}

.slider-path-core {
  stroke: #2d2347;
  stroke-width: 54px;
  filter:
    drop-shadow(0 5px 5px rgba(0, 0, 0, 0.4))
    drop-shadow(0 -2px 3px rgba(255, 255, 255, 0.11));
}

.slider-path-progress {
  stroke: var(--cyan);
  stroke-width: 42px;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 9px rgba(82, 231, 255, 0.62));
  transition: stroke-dashoffset 25ms linear;
}

.slider-node {
  z-index: 2;
  width: 78px;
  height: 78px;
  font-size: 1.15rem;
}

.slider-ball {
  position: absolute;
  z-index: 4;
  width: 28px;
  height: 28px;
  border: 4px solid #fff;
  border-radius: 50%;
  opacity: 0;
  background:
    radial-gradient(circle at 32% 25%, #fff 0 7%, rgba(255, 255, 255, 0.42) 8% 18%, transparent 25%),
    radial-gradient(circle at 62% 70%, #258ca6, var(--cyan) 55%, #bdf8ff);
  box-shadow:
    0 0 7px #fff,
    0 0 25px rgba(82, 231, 255, 0.82),
    inset 0 -7px 10px rgba(20, 80, 110, 0.44);
  transform: translate(-50%, -50%);
}

.slider-target.is-sliding .slider-ball {
  opacity: 1;
  animation: slider-ball-glow 700ms ease-in-out infinite alternate;
}

@keyframes slider-ball-glow {
  to {
    filter: brightness(1.2);
    box-shadow: 0 0 9px #fff, 0 0 38px rgba(82, 231, 255, 0.95);
  }
}

.slider-target.is-hit .slider-path-svg {
  animation: slider-path-hit 180ms ease-out forwards;
}

.slider-target.is-missed .slider-path-svg {
  animation: slider-path-miss 260ms ease-out forwards;
}

@keyframes slider-path-hit {
  to {
    opacity: 0;
    filter: brightness(1.6);
  }
}

@keyframes slider-path-miss {
  to {
    opacity: 0;
    filter: saturate(0);
  }
}

.hit-feedback {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  font-family: "Arcade Game", monospace;
  transform: translate(-50%, -50%) rotate(var(--sticker-tilt, -3deg));
}

.hit-feedback.show {
  animation: sticker-fade 980ms cubic-bezier(0.22, 0.7, 0.25, 1);
}

.sticker-text {
  display: block;
  min-width: max-content;
  color: var(--cyan);
  font-size: clamp(1.35rem, 4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: lowercase;
  -webkit-text-stroke: 5px #fff;
  paint-order: stroke fill;
  filter:
    drop-shadow(5px 6px 0 #241933)
    drop-shadow(0 9px 18px rgba(0, 0, 0, 0.3));
}

.hit-feedback.good .sticker-text {
  color: var(--cyan);
}

.hit-feedback.bad .sticker-text {
  color: #ffb84d;
}

.xp-popup {
  position: absolute;
  z-index: 22;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: xp-popup-rise 900ms cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

.xp-popup span {
  display: block;
  min-width: max-content;
  color: #f3f0e8;
  font-family: "Arcade Game", monospace;
  font-size: clamp(1rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  -webkit-text-stroke: 1.5px #292530;
  paint-order: stroke fill;
  text-shadow:
    2px 3px 0 #070708,
    0 0 8px rgba(255, 255, 255, 0.2);
}

@keyframes xp-popup-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.22);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -58%) scale(1.38);
  }
  38% {
    transform: translate(-50%, -72%) scale(0.96);
  }
  68% {
    opacity: 1;
    transform: translate(-50%, -98%) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -155%) scale(1.16);
  }
}

@keyframes sticker-fade {
  0% {
    opacity: 0;
    transform: translate(-50%, -34%) rotate(var(--sticker-tilt, -3deg)) scale(0.82);
    filter: blur(5px);
  }
  28% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--sticker-tilt, -3deg)) scale(1);
    filter: blur(0);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -55%) rotate(var(--sticker-tilt, -3deg)) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -78%) rotate(var(--sticker-tilt, -3deg)) scale(0.96);
    filter: blur(2px);
  }
}

.overlay {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 42%, rgba(159, 112, 255, 0.13), transparent 38%),
    rgba(12, 11, 21, 0.82);
  backdrop-filter: blur(12px) saturate(1.18);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  width: min(440px, 100%);
  text-align: center;
}

.start-menu {
  width: min(440px, 100%);
}

.start-panel {
  min-width: 0;
}

.demo-target {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 27px;
  border: 5px solid #fff;
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 700;
  background:
    radial-gradient(circle at 34% 24%, #fff 0 5%, rgba(255, 255, 255, 0.3) 6% 17%, transparent 24%),
    radial-gradient(circle at 68% 75%, #8b215d, var(--pink) 62%, #ffa5d1);
  box-shadow:
    0 0 0 13px rgba(255, 92, 168, 0.15),
    0 0 34px rgba(255, 92, 168, 0.45),
    inset 0 1px 7px rgba(255, 255, 255, 0.55),
    inset 0 -12px 20px rgba(73, 12, 52, 0.3);
}

.demo-target::after {
  content: "";
  position: absolute;
  inset: -19px;
  border: 3px solid var(--pink);
  border-radius: 50%;
  animation: demo-pulse 1.4s ease-in-out infinite;
}

@keyframes demo-pulse {
  50% {
    opacity: 0.25;
    transform: scale(1.35);
  }
}

.overlay-kicker {
  margin: 0 0 9px;
  color: var(--pink);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.overlay h2 {
  margin: 0 0 13px;
  font-size: clamp(2.3rem, 8vw, 4rem);
  letter-spacing: 0.035em;
}

.overlay p:not(.overlay-kicker) {
  max-width: 42ch;
  margin: 0 auto 25px;
  color: var(--muted);
  line-height: 1.55;
}

.player-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  width: min(390px, 100%);
  margin: 0 auto;
}

.player-form label {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.player-input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.045em;
  background: rgba(8, 8, 16, 0.7);
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.3);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.player-input:focus {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 3px rgba(82, 231, 255, 0.15),
    inset 0 1px 8px rgba(0, 0, 0, 0.3);
}

.player-input:user-invalid {
  border-color: var(--red);
}

.leaderboard-menu-button {
  margin-top: 18px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  background: transparent;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.leaderboard-menu-button:hover,
.leaderboard-menu-button:focus-visible {
  border-color: var(--cyan);
  color: var(--text);
}

.leaderboard-overlay {
  z-index: 40;
  background: rgba(7, 7, 15, 0.62);
  backdrop-filter: blur(9px) saturate(1.15);
}

.leaderboard {
  min-width: 0;
  text-align: left;
}

.leaderboard-modal {
  position: relative;
  width: min(500px, 100%);
  max-height: 100%;
  padding: 32px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 42%),
    rgba(19, 18, 31, 0.82);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.overlay-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  color: var(--muted);
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.overlay-close-button:hover,
.overlay-close-button:focus-visible {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(82, 231, 255, 0.1);
}

.leaderboard-heading {
  margin-bottom: 15px;
}

.leaderboard-heading .overlay-kicker {
  margin-bottom: 5px;
}

.leaderboard h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.045em;
}

.leaderboard-list {
  display: grid;
  gap: 6px;
  min-height: 258px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px 6px 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.leaderboard-row.is-current {
  border-color: rgba(82, 231, 255, 0.35);
  color: var(--text);
  background: rgba(82, 231, 255, 0.08);
}

.leaderboard-rank {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #d9d5e5;
  font-size: 0.69rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.leaderboard-row:nth-child(1) .leaderboard-rank {
  color: #241900;
  background: #ffd45a;
}

.leaderboard-row:nth-child(2) .leaderboard-rank {
  color: #20202a;
  background: #d8dbe8;
}

.leaderboard-row:nth-child(3) .leaderboard-rank {
  color: #2e1608;
  background: #db9166;
}

.leaderboard-name {
  overflow: hidden;
  font-size: 0.83rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  color: var(--text);
  font-size: 0.91rem;
}

.leaderboard-empty {
  display: grid;
  place-items: center;
  min-height: 258px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.start-button {
  position: relative;
  overflow: hidden;
  min-width: 154px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 48%),
    linear-gradient(110deg, var(--pink), var(--purple));
  box-shadow:
    0 12px 34px rgba(255, 92, 168, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -4px 9px rgba(63, 18, 92, 0.28);
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

.start-button:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.start-button:active {
  transform: translateY(1px);
}

.game-over-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.secondary-button {
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  background: transparent;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--cyan);
  color: var(--text);
}

.impact-wave {
  position: absolute;
  z-index: 18;
  width: 28px;
  height: 28px;
  border: 4px solid var(--wave-color, var(--cyan));
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    0 0 13px var(--wave-color, var(--cyan)),
    inset 0 0 13px var(--wave-color, var(--cyan));
  transform: translate(-50%, -50%) scale(0.45);
  animation: impact-wave 520ms ease-out forwards;
}

.impact-wave::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #fff;
  border-radius: 50%;
  opacity: 0.75;
}

@keyframes impact-wave {
  8% { opacity: 0.95; }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4.4);
    filter: blur(1px);
  }
}

/* Desktop arcade cabinet. */
@media (min-width: 901px) and (hover: hover) {
  body {
    padding: 0;
  }

  .game-shell {
    display: flex;
    flex-direction: column;
    width: min(1440px, 100vw);
    max-width: 1440px;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    margin-inline: auto;
    padding: 88px clamp(34px, 4vw, 70px) 20px;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 7% 93%, rgba(255, 255, 255, 0.055)),
      linear-gradient(145deg, #241a33 0, #100b18 28%, #08070d 68%, #1a1025 100%);
    box-shadow:
      -18px 0 34px rgba(0, 0, 0, 0.48),
      18px 0 34px rgba(0, 0, 0, 0.48),
      inset 28px 0 48px rgba(0, 0, 0, 0.48),
      inset -28px 0 48px rgba(0, 0, 0, 0.48),
      inset 0 0 80px rgba(159, 112, 255, 0.09);
  }

  .game-shell::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 7px 12px 10px;
    border: 2px solid rgba(255, 255, 255, 0.065);
    pointer-events: none;
    box-shadow:
      inset 24px 0 34px rgba(135, 62, 190, 0.12),
      inset -24px 0 34px rgba(82, 231, 255, 0.055);
  }

  .game-shell::after {
    content: "";
    position: absolute;
    z-index: 3;
    right: 76px;
    bottom: 24px;
    width: 146px;
    height: 32px;
    pointer-events: none;
    background:
      radial-gradient(circle at 16px 16px, #fff 0 2px, #ff75bb 3px 7px, #721a51 8px 11px, transparent 12px),
      radial-gradient(circle at 58px 16px, #fff 0 2px, #59eeff 3px 7px, #165a72 8px 11px, transparent 12px),
      radial-gradient(circle at 100px 16px, #fff 0 2px, #b997ff 3px 7px, #4e287e 8px 11px, transparent 12px),
      radial-gradient(circle at 137px 16px, #ffd86b 0 3px, #8d6320 4px 7px, transparent 8px);
    filter: drop-shadow(0 0 8px rgba(255, 112, 220, 0.36));
  }

  .cabinet-marquee,
  .topbar,
  .game-card {
    position: relative;
    z-index: 2;
  }

  .cabinet-marquee {
    position: absolute;
    top: 13px;
    right: 22%;
    left: 22%;
    display: grid;
    place-items: center;
    height: 64px;
    overflow: hidden;
    border: 3px solid #34203e;
    border-radius: 9px 9px 16px 16px;
    color: #fff4ff;
    font-size: clamp(2.1rem, 4vw, 3.65rem);
    letter-spacing: 0.14em;
    line-height: 1;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 28% 70%, rgba(0, 0, 0, 0.28)),
      linear-gradient(100deg, #4d1760, #92217f 46%, #5d176e);
    box-shadow:
      inset 0 0 20px rgba(255, 177, 255, 0.32),
      0 0 22px rgba(229, 98, 255, 0.42),
      0 8px 0 #07050a;
    text-shadow:
      0 0 5px #fff,
      0 0 13px #ffb4ff,
      0 0 25px #e44eff;
    animation: marquee-glow 2.4s ease-in-out infinite alternate;
  }

  .topbar {
    flex: 0 0 auto;
    min-height: 64px;
    margin-bottom: 14px;
    padding: 10px 18px;
    border: 2px solid #272030;
    border-radius: 13px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 42%),
      #09070d;
    box-shadow:
      inset 0 -8px 18px rgba(0, 0, 0, 0.56),
      0 8px 15px rgba(0, 0, 0, 0.54);
  }

  .game-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border: 17px solid #0a090e;
    border-radius: 52px / 68px;
    outline: 3px solid #2e2735;
    background: #050407;
    box-shadow:
      0 0 0 7px #16121c,
      0 22px 42px rgba(0, 0, 0, 0.72),
      0 0 35px rgba(159, 112, 255, 0.18),
      inset 20px 0 34px -22px rgba(255, 72, 173, 0.24),
      inset -20px 0 34px -22px rgba(82, 231, 255, 0.2),
      inset 0 0 24px #000;
  }

  .game-card::before {
    content: "";
    position: absolute;
    z-index: 52;
    inset: 0;
    border-radius: 34px / 48px;
    pointer-events: none;
    opacity: 0.58;
    background:
      linear-gradient(116deg, rgba(255, 255, 255, 0.2), transparent 11% 76%, rgba(160, 116, 255, 0.06)),
      radial-gradient(ellipse 82% 28% at 46% -4%, rgba(255, 255, 255, 0.2), transparent 66%),
      radial-gradient(ellipse 42% 78% at 0% 48%, rgba(255, 87, 180, 0.1), transparent 68%),
      radial-gradient(ellipse 42% 78% at 100% 52%, rgba(76, 224, 255, 0.08), transparent 68%);
    mix-blend-mode: screen;
  }

  .game-card::after {
    z-index: 51;
    inset: 0;
    border-radius: 34px / 48px;
    opacity: 0.42;
    background:
      repeating-linear-gradient(0deg, rgba(5, 2, 8, 0.45) 0 1px, transparent 1px 4px),
      repeating-linear-gradient(
        90deg,
        rgba(255, 60, 100, 0.035) 0 1px,
        rgba(80, 255, 160, 0.018) 1px 2px,
        rgba(90, 110, 255, 0.035) 2px 3px
      ),
      radial-gradient(ellipse 104% 126% at 50% 50%, transparent 46%, rgba(3, 1, 7, 0.28) 72%, rgba(0, 0, 0, 0.92) 100%),
      linear-gradient(90deg, rgba(255, 47, 150, 0.12), transparent 8% 92%, rgba(52, 220, 255, 0.11));
    box-shadow:
      inset 0 0 0 2px rgba(220, 210, 255, 0.1),
      inset 0 0 48px rgba(176, 126, 255, 0.12),
      inset 0 0 108px rgba(0, 0, 0, 0.9);
    animation: crt-flicker 4.8s steps(2, end) infinite;
  }

  .game-field {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    border-radius: 34px / 48px;
  }

  .combo-counter {
    left: calc(max(0px, (100vw - 1440px) / 2) + clamp(34px, 4vw, 70px) + 20px);
    bottom: 44px;
  }

  .combo-slot {
    flex-basis: calc(clamp(2.8rem, 5.8vw, 5rem) + 37px);
  }
}

@keyframes marquee-glow {
  to {
    filter: brightness(1.13);
    text-shadow:
      0 0 7px #fff,
      0 0 18px #ffb4ff,
      0 0 34px #e44eff;
  }
}

@keyframes crt-flicker {
  0%,
  96%,
  100% {
    opacity: 0.3;
  }
  97% {
    opacity: 0.23;
  }
  98% {
    opacity: 0.36;
  }
}

@media (min-width: 901px) and (max-height: 850px) and (hover: hover) {
  .overlay {
    padding: 12px 20px;
  }

  .start-menu .demo-target {
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    border-width: 4px;
  }

  .overlay h2 {
    margin-bottom: 8px;
    font-size: 2.45rem;
  }

  .overlay p:not(.overlay-kicker) {
    margin-bottom: 12px;
    line-height: 1.35;
  }

  .player-input,
  .start-button {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .leaderboard-menu-button {
    margin-top: 8px;
  }
}

/* Full-bleed layout for phones, tablets and mobile landscape. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    padding: 0;
  }

  .game-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-right: 7px;
    padding-left: 7px;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent 10% 90%, rgba(255, 255, 255, 0.05)),
      linear-gradient(145deg, #241a33 0, #0d0913 35%, #07060b 70%, #1a1025 100%);
    box-shadow:
      inset 7px 0 15px rgba(159, 112, 255, 0.13),
      inset -7px 0 15px rgba(82, 231, 255, 0.07);
  }

  .game-shell::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 2px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    pointer-events: none;
  }

  .game-shell::after {
    content: "";
    position: absolute;
    z-index: 4;
    right: calc(13px + env(safe-area-inset-right));
    bottom: calc(13px + env(safe-area-inset-bottom));
    width: 82px;
    height: 18px;
    pointer-events: none;
    background:
      radial-gradient(circle at 9px 9px, #fff 0 1px, #ff75bb 2px 5px, transparent 6px),
      radial-gradient(circle at 35px 9px, #fff 0 1px, #59eeff 2px 5px, transparent 6px),
      radial-gradient(circle at 61px 9px, #fff 0 1px, #b997ff 2px 5px, transparent 6px),
      radial-gradient(circle at 79px 9px, #ffd86b 0 2px, transparent 3px);
    filter: drop-shadow(0 0 5px rgba(255, 112, 220, 0.32));
  }

  .cabinet-marquee,
  .topbar,
  .game-card {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
  }

  .cabinet-marquee {
    display: grid;
    flex: 0 0 calc(42px + env(safe-area-inset-top));
    place-items: end center;
    padding: env(safe-area-inset-top) 10px 5px;
    border: 2px solid #34203e;
    border-top: 0;
    border-radius: 0 0 11px 11px;
    color: #fff4ff;
    font-size: clamp(1.25rem, 7vw, 1.85rem);
    letter-spacing: 0.13em;
    line-height: 1;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 36%),
      linear-gradient(100deg, #49145b, #8c1f7a 48%, #551363);
    box-shadow:
      inset 0 0 12px rgba(255, 177, 255, 0.25),
      0 0 13px rgba(229, 98, 255, 0.28);
    text-shadow:
      0 0 4px #fff,
      0 0 10px #ff9fff;
    animation: marquee-glow 2.4s ease-in-out infinite alternate;
  }

  .topbar {
    flex: 0 0 auto;
    margin: 0;
    padding:
      8px
      calc(12px + env(safe-area-inset-right))
      8px
      calc(12px + env(safe-area-inset-left));
    border-bottom: 2px solid #292230;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 45%),
      #08070c;
    box-shadow: inset 0 -7px 14px rgba(0, 0, 0, 0.52);
  }

  .game-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    border: 7px solid #09080d;
    border-radius: 25px / 34px;
    outline: 2px solid #292330;
    background: #050407;
    box-shadow:
      0 0 0 3px #15111b,
      inset 0 0 16px #000;
  }

  .game-card::before {
    content: "";
    position: absolute;
    z-index: 52;
    inset: 0;
    display: block;
    border-radius: 16px / 24px;
    pointer-events: none;
    opacity: 0.45;
    background:
      linear-gradient(116deg, rgba(255, 255, 255, 0.16), transparent 13% 77%, rgba(160, 116, 255, 0.05)),
      radial-gradient(ellipse 86% 24% at 44% 0%, rgba(255, 255, 255, 0.15), transparent 66%),
      radial-gradient(ellipse 40% 82% at 0% 50%, rgba(255, 87, 180, 0.08), transparent 70%),
      radial-gradient(ellipse 40% 82% at 100% 50%, rgba(76, 224, 255, 0.07), transparent 70%);
    mix-blend-mode: screen;
  }

  .game-card::after {
    display: block;
    z-index: 51;
    inset: 0;
    border-radius: 16px / 24px;
    opacity: 0.38;
    background:
      repeating-linear-gradient(0deg, rgba(5, 2, 8, 0.42) 0 1px, transparent 1px 4px),
      repeating-linear-gradient(
        90deg,
        rgba(255, 60, 100, 0.03) 0 1px,
        rgba(80, 255, 160, 0.015) 1px 2px,
        rgba(90, 110, 255, 0.03) 2px 3px
      ),
      radial-gradient(ellipse 108% 124% at 50% 50%, transparent 45%, rgba(3, 1, 7, 0.28) 73%, rgba(0, 0, 0, 0.88) 100%),
      linear-gradient(90deg, rgba(255, 47, 150, 0.09), transparent 10% 90%, rgba(52, 220, 255, 0.08));
    box-shadow:
      inset 0 0 0 1px rgba(220, 210, 255, 0.08),
      inset 0 0 58px rgba(0, 0, 0, 0.82);
    animation: crt-flicker 4.8s steps(2, end) infinite;
  }

  .game-field {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    border-radius: 16px / 24px;
  }

  .combo-counter {
    left: calc(19px + env(safe-area-inset-left));
    bottom: calc(8px + env(safe-area-inset-bottom));
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .combo-slot {
    flex-basis: calc(clamp(2.1rem, 11vw, 3.25rem) + 16px + env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 48%),
      #08070c;
    box-shadow: inset 0 7px 13px rgba(0, 0, 0, 0.46);
  }
}

@media (max-width: 640px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .brand {
    min-width: 0;
    gap: 7px;
  }

  .brand h1 {
    font-size: clamp(0.72rem, 3.3vw, 1rem);
  }

  .brand p {
    font-size: 0.43rem;
  }

  .xp-counter {
    align-self: center;
    flex: 0 1 auto;
    min-width: 0;
  }

  .brand-disc {
    width: 23px;
    height: 23px;
    border-width: 5px;
  }

  .xp-counter strong {
    min-width: 0;
    font-size: clamp(1.05rem, 5.1vw, 1.5rem);
    letter-spacing: 0.025em;
    -webkit-text-stroke-width: 1px;
    text-shadow:
      1px 1px 0 #57535e,
      0 0 7px rgba(224, 221, 230, 0.18);
    transform: none;
  }

  .game-card {
    border-radius: 0;
  }

  .game-field {
    height: auto;
    min-height: 0;
  }

  .overlay {
    place-items: start center;
    padding: 18px 14px;
  }

  .overlay-card,
  .start-menu,
  .start-panel,
  .player-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .overlay p:not(.overlay-kicker) {
    width: 100%;
    overflow-wrap: anywhere;
  }

  .start-menu {
    width: min(440px, 100%);
  }

  .start-menu .demo-target {
    width: 62px;
    height: 62px;
    margin-bottom: 21px;
  }

  .start-menu h2 {
    font-size: 2.5rem;
  }

  .leaderboard-modal {
    padding: 28px 18px 20px;
  }

  .leaderboard-list,
  .leaderboard-empty {
    min-height: 0;
  }

  .player-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .player-form label {
    grid-column: auto;
  }

  .player-form .start-button {
    width: 100%;
    min-width: 0;
  }

  .hit-circle {
    width: 68px;
    height: 68px;
  }

  .combo-counter {
    font-size: clamp(2.1rem, 11vw, 3.25rem);
    -webkit-text-stroke-width: 3px;
  }
}

@media (max-height: 520px) and (pointer: coarse) {
  .cabinet-marquee {
    display: none;
  }

  .topbar {
    padding-top: max(6px, env(safe-area-inset-top));
    padding-bottom: 6px;
  }

  .brand p {
    display: none;
  }

  .combo-counter {
    padding-top: 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .overlay {
    place-items: start center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .demo-target {
    display: none;
  }

  .overlay h2 {
    margin-bottom: 8px;
    font-size: 2rem;
  }

  .overlay p:not(.overlay-kicker) {
    margin-bottom: 12px;
    line-height: 1.35;
  }

  .leaderboard-menu-button {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient,
  .field-grid,
  .aim-trail-canvas {
    display: none;
  }

  body::before,
  .cabinet-marquee,
  .game-card::after,
  .brand-disc,
  .aim-cursor::before {
    animation: none;
  }
}
