:root {
  --cyan: #27f3ff;
  --cyan-soft: rgba(39, 243, 255, 0.42);
  --pink: #ff2bcc;
  --pink-soft: rgba(255, 43, 204, 0.36);
  --amber: #ffd166;
  --ink: #03040b;
  --panel: rgba(5, 10, 21, 0.7);
  --line: rgba(80, 240, 255, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #02030a;
  color: #f4fbff;
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

button,
kbd {
  font-family: inherit;
}

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, #091124 0%, #03040b 45%, #010207 100%);
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

.screen-fx {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.scanlines {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.32) 4px
  );
  mix-blend-mode: multiply;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 38%, rgba(0, 0, 0, 0.42) 78%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(to bottom, rgba(0, 4, 12, 0.3), transparent 22%, transparent 75%, rgba(0, 2, 8, 0.4));
}

#speed-vignette {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(24, 209, 255, 0.1) 72%, rgba(16, 116, 255, 0.16) 100%);
  transition: opacity 0.2s linear;
}

#hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease 0.15s;
}

#hud.on {
  opacity: 1;
}

.panel {
  position: absolute;
  background:
    linear-gradient(135deg, rgba(11, 21, 37, 0.86), rgba(4, 7, 15, 0.76)),
    repeating-linear-gradient(0deg, transparent 0, transparent 5px, rgba(255, 255, 255, 0.015) 6px);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 0 24px rgba(26, 218, 255, 0.035),
    0 12px 45px rgba(0, 0, 0, 0.32),
    0 0 35px rgba(0, 215, 255, 0.035);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.panel::before {
  left: -1px;
  top: -1px;
}

.panel::after {
  right: -1px;
  bottom: -1px;
}

.score-panel {
  top: 26px;
  left: 28px;
  width: 292px;
  padding: 17px 18px 14px;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.panel-kicker {
  color: rgba(160, 231, 255, 0.56);
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.score-value {
  margin-top: 3px;
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 35px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-shadow:
    0 0 8px rgba(39, 243, 255, 0.65),
    0 0 28px rgba(39, 243, 255, 0.28);
  font-variant-numeric: tabular-nums;
}

.score-value.bank-pulse {
  animation: bankPulse 0.45s ease-out;
}

@keyframes bankPulse {
  0% { color: var(--amber); transform: scale(1.04); text-shadow: 0 0 26px var(--amber); }
  100% { color: #fff; transform: scale(1); }
}

.drift-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(94, 226, 255, 0.13);
}

.drift-status {
  color: rgba(163, 215, 235, 0.58);
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.drift-status.sliding {
  color: var(--pink);
  text-shadow: 0 0 12px var(--pink);
  animation: livePulse 0.72s ease-in-out infinite alternate;
}

.drift-mult {
  margin-left: auto;
  padding: 1px 7px;
  color: var(--amber);
  border: 1px solid rgba(255, 209, 102, 0.25);
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.drift-points {
  min-width: 73px;
  margin-left: 9px;
  color: var(--pink);
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  text-shadow: 0 0 12px rgba(255, 43, 204, 0.55);
  font-variant-numeric: tabular-nums;
}

.drift-meter {
  height: 3px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(111, 210, 235, 0.11);
}

.drift-meter i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--amber));
  box-shadow: 0 0 10px var(--pink);
  transition: width 0.08s linear;
}

.score-sub {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: rgba(140, 188, 211, 0.45);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.score-sub span:last-child {
  color: rgba(39, 243, 255, 0.6);
}

.lap-panel {
  top: 26px;
  left: 50%;
  width: 282px;
  padding: 13px 18px 12px;
  transform: translateX(-50%);
  text-align: center;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

.lap-heading {
  display: flex;
  justify-content: center;
  gap: 14px;
  color: rgba(149, 218, 241, 0.55);
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.live-dot {
  color: var(--pink);
  font-size: 8px;
}

.live-dot::before {
  content: "● ";
  animation: livePulse 0.8s ease-in-out infinite alternate;
}

@keyframes livePulse {
  from { opacity: 0.38; }
  to { opacity: 1; }
}

.lap-time {
  margin: 2px 0 4px;
  color: #f9fdff;
  font-family: "Orbitron", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-shadow: 0 0 16px rgba(39, 243, 255, 0.34);
  font-variant-numeric: tabular-nums;
}

.lap-splits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(94, 226, 255, 0.13);
  padding-top: 7px;
  gap: 8px;
}

.lap-splits div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.lap-splits span {
  color: rgba(139, 193, 216, 0.44);
  font-weight: 700;
}

.lap-splits b {
  color: rgba(189, 238, 255, 0.83);
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.speed-panel {
  position: absolute;
  bottom: 31px;
  left: 30px;
  width: 258px;
  padding: 16px 18px 13px;
  border-left: 2px solid var(--cyan);
  background: linear-gradient(90deg, rgba(4, 12, 23, 0.78), rgba(4, 8, 16, 0.16));
  filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.07));
}

.speed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gear {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--amber);
  border: 1px solid rgba(255, 209, 102, 0.4);
  font-family: "Orbitron", sans-serif;
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 0 12px rgba(255, 209, 102, 0.09);
}

.speed-unit {
  color: rgba(173, 234, 249, 0.53);
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.speed-value {
  margin-top: -2px;
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 61px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow:
    0 0 14px rgba(39, 243, 255, 0.48),
    0 0 44px rgba(39, 243, 255, 0.12);
  font-variant-numeric: tabular-nums;
}

.speed-track {
  height: 3px;
  margin-top: 8px;
  background: rgba(123, 214, 240, 0.12);
}

.speed-track i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #d9fcff 55%, var(--pink));
  box-shadow: 0 0 9px var(--cyan);
  transition: width 0.1s linear;
}

.speed-caption {
  margin-top: 7px;
  color: rgba(124, 181, 204, 0.4);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.map-panel {
  right: 28px;
  bottom: 31px;
  width: 218px;
  padding: 11px 12px 9px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.map-heading,
.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(145, 206, 231, 0.55);
  font-family: "Orbitron", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.map-beacon {
  color: var(--pink);
  text-shadow: 0 0 10px var(--pink);
  animation: livePulse 1s ease-in-out infinite alternate;
}

.map-frame {
  position: relative;
  margin: 5px 0 6px;
  border: 1px solid rgba(55, 239, 255, 0.11);
  background:
    radial-gradient(circle at 50% 48%, rgba(17, 57, 83, 0.18), transparent 72%),
    linear-gradient(rgba(43, 193, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 193, 255, 0.025) 1px, transparent 1px);
  background-size: auto, 20px 20px, 20px 20px;
}

#minimap {
  display: block;
  width: 192px;
  height: 192px;
}

.map-footer {
  color: rgba(126, 183, 206, 0.36);
  font-size: 7px;
}

.toast {
  position: absolute;
  top: 140px;
  left: 50%;
  padding: 7px 23px;
  color: var(--amber);
  border-top: 1px solid rgba(255, 209, 102, 0.32);
  border-bottom: 1px solid rgba(255, 209, 102, 0.24);
  background: linear-gradient(90deg, transparent, rgba(9, 17, 31, 0.86) 18%, rgba(9, 17, 31, 0.86) 82%, transparent);
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  text-shadow: 0 0 15px rgba(255, 209, 102, 0.5);
  transform: translate(-50%, 8px);
  opacity: 0;
  white-space: nowrap;
}

.toast.show {
  animation: toastIn 1.75s ease forwards;
}

.toast.pink {
  color: var(--pink);
  border-color: rgba(255, 43, 204, 0.28);
  text-shadow: 0 0 15px rgba(255, 43, 204, 0.65);
}

@keyframes toastIn {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  76% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}

.warning {
  position: absolute;
  top: 245px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 28px;
  border: 1px solid rgba(255, 43, 204, 0.28);
  background: rgba(8, 3, 15, 0.8);
  box-shadow: 0 0 32px rgba(255, 43, 204, 0.12);
  transform: translate(-50%, 0);
  opacity: 0;
  transition: opacity 0.2s;
}

.warning.show {
  opacity: 1;
  animation: warningFlash 0.68s ease-in-out infinite alternate;
}

.warning strong {
  color: var(--pink);
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  letter-spacing: 0.23em;
  text-shadow: 0 0 12px var(--pink);
}

.warning span {
  color: rgba(255, 184, 235, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

@keyframes warningFlash {
  from { border-color: rgba(255, 43, 204, 0.2); }
  to { border-color: rgba(255, 43, 204, 0.6); }
}

.control-hints {
  position: absolute;
  bottom: 20px;
  left: 50%;
  display: flex;
  gap: 22px;
  transform: translateX(-50%);
  color: rgba(144, 194, 216, 0.35);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.control-hints kbd {
  padding: 2px 5px;
  color: rgba(191, 241, 255, 0.63);
  border: 1px solid rgba(104, 212, 236, 0.15);
  background: rgba(8, 18, 33, 0.5);
  font-size: 8px;
}

#title-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(8, 24, 43, 0.2) 0%, rgba(3, 5, 14, 0.7) 48%, rgba(1, 2, 7, 0.94) 100%);
  transition: opacity 0.75s ease, visibility 0.75s;
  cursor: pointer;
}

#title-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#title-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 43, 204, 0.035), transparent 30%, transparent 70%, rgba(39, 243, 255, 0.04));
  mix-blend-mode: screen;
}

.title-grid {
  position: absolute;
  left: -40%;
  right: -40%;
  bottom: -30%;
  height: 95%;
  transform: perspective(500px) rotateX(63deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(32, 235, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 235, 255, 0.105) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 80%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 80%);
  opacity: 0.55;
  animation: gridRun 5s linear infinite;
}

@keyframes gridRun {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 64px, 0 0; }
}

.title-glow {
  position: absolute;
  top: 43%;
  left: 50%;
  width: 92vw;
  height: 26vw;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse, rgba(255, 43, 204, 0.18), transparent 52%),
    radial-gradient(ellipse at 35% 55%, rgba(39, 243, 255, 0.17), transparent 50%);
  filter: blur(36px);
  pointer-events: none;
  animation: glowBreathe 4.5s ease-in-out infinite alternate;
}

@keyframes glowBreathe {
  from { opacity: 0.58; transform: translate(-50%, -50%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}

.title-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(43, 247, 255, 0.035) 49.8%, rgba(43, 247, 255, 0.12) 50%, transparent 50.4%);
  background-size: 100% 12px;
  opacity: 0.5;
  animation: scanMove 7s linear infinite;
}

@keyframes scanMove {
  from { background-position-y: 0; }
  to { background-position-y: 120px; }
}

.title-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  text-align: center;
  animation: titleEnter 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes titleEnter {
  from { opacity: 0; transform: translateY(18px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(169, 235, 255, 0.63);
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(39, 243, 255, 0.75));
}

.eyebrow span:last-child {
  background: linear-gradient(90deg, rgba(39, 243, 255, 0.75), transparent);
}

.logo {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 12px 0 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(66px, 12.5vw, 196px);
  font-weight: 900;
  line-height: 0.77;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  transform: skewX(-5deg);
}

.logo-neon {
  position: relative;
  color: #f6ffff;
  text-shadow:
    0 0 5px #fff,
    0 0 14px rgba(39, 243, 255, 0.95),
    0 0 38px rgba(39, 243, 255, 0.58),
    8px 0 0 rgba(255, 43, 204, 0.16);
}

.logo-drift {
  position: relative;
  margin-right: -0.24em;
  color: transparent;
  -webkit-text-stroke: 2px var(--pink);
  text-shadow:
    0 0 12px rgba(255, 43, 204, 0.9),
    0 0 44px rgba(255, 43, 204, 0.42);
}

.logo-drift::after {
  content: "DRIFT";
  position: absolute;
  inset: 0;
  color: rgba(255, 43, 204, 0.14);
  -webkit-text-stroke: 0;
  transform: translate(5px, 2px);
  z-index: -1;
}

.tagline {
  margin: 24px 0 0;
  color: rgba(195, 240, 255, 0.58);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(8px, 0.9vw, 11px);
  font-weight: 500;
  letter-spacing: 0.52em;
}

.start-prompt {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 46px;
}

.prompt-line {
  width: clamp(30px, 8vw, 92px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(89, 237, 255, 0.45));
}

.prompt-line:last-child {
  background: linear-gradient(90deg, rgba(89, 237, 255, 0.45), transparent);
}

.keycap {
  position: relative;
  padding: 12px 25px;
  color: #041017;
  background: var(--cyan);
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  box-shadow:
    0 0 18px rgba(39, 243, 255, 0.55),
    0 0 52px rgba(39, 243, 255, 0.2);
  animation: keyPulse 1.8s ease-in-out infinite;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

@keyframes keyPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(39, 243, 255, 0.4), 0 0 40px rgba(39, 243, 255, 0.12); }
  50% { box-shadow: 0 0 30px rgba(39, 243, 255, 0.8), 0 0 75px rgba(39, 243, 255, 0.3); }
}

.prompt-or {
  color: rgba(172, 226, 246, 0.5);
  font-family: "Orbitron", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 18px 25px;
  margin-top: 41px;
}

.controls-grid div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.controls-grid kbd {
  padding: 5px 9px;
  color: rgba(190, 241, 255, 0.85);
  border: 1px solid rgba(92, 227, 255, 0.24);
  background: rgba(7, 17, 31, 0.62);
  font-family: "Orbitron", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
  box-shadow: inset 0 0 14px rgba(33, 215, 255, 0.04);
}

.controls-grid span {
  color: rgba(142, 192, 213, 0.4);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.title-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: flex;
  gap: 14px;
  transform: translateX(-50%);
  color: rgba(128, 180, 201, 0.26);
  font-family: "Orbitron", sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.footer-sep {
  color: rgba(39, 243, 255, 0.23);
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: #02030a;
  color: rgba(136, 229, 255, 0.58);
  font-family: "Orbitron", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.28em;
  transition: opacity 0.55s ease, visibility 0.55s;
}

.loading.done {
  opacity: 0;
  visibility: hidden;
}

.loading-bar {
  width: 190px;
  height: 2px;
  overflow: hidden;
  background: rgba(39, 243, 255, 0.12);
}

.loading-bar i {
  display: block;
  width: 46%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: loadSlide 1s ease-in-out infinite;
}

@keyframes loadSlide {
  from { transform: translateX(-105%); }
  to { transform: translateX(225%); }
}

@media (max-width: 860px) {
  .score-panel { left: 14px; top: 14px; width: 224px; padding: 12px 14px 11px; }
  .score-value { font-size: 27px; }
  .lap-panel { top: 14px; width: 220px; padding: 10px 12px 9px; }
  .lap-time { font-size: 24px; }
  .map-panel { right: 14px; bottom: 18px; width: 168px; }
  #minimap { width: 142px; height: 142px; }
  .speed-panel { left: 14px; bottom: 18px; width: 205px; }
  .speed-value { font-size: 47px; }
  .control-hints { display: none; }
  .toast { top: 124px; }
  .warning { top: 194px; }
  .controls-grid { gap: 13px 16px; }
  .title-footer { font-size: 6px; }
}

@media (max-height: 680px) {
  .title-content { padding: 16px; }
  .logo { font-size: clamp(54px, 9vw, 124px); }
  .eyebrow { font-size: 7px; }
  .tagline { margin-top: 14px; }
  .start-prompt { margin-top: 24px; }
  .controls-grid { margin-top: 24px; }
  .title-footer { bottom: 12px; }
}

@media (max-width: 560px) {
  .score-panel { width: 184px; }
  .score-value { font-size: 21px; }
  .lap-panel { width: 184px; left: auto; right: 12px; transform: none; top: 94px; }
  .lap-time { font-size: 19px; }
  .lap-splits { display: none; }
  .map-panel { width: 138px; }
  #minimap { width: 112px; height: 112px; }
  .speed-panel { width: 174px; }
  .speed-value { font-size: 42px; }
  .speed-caption { display: none; }
  .start-prompt { gap: 8px; }
  .prompt-or { display: none; }
  .prompt-line { width: 20px; }
  .controls-grid { grid-template-columns: repeat(2, auto); }
  .title-footer { display: none; }
}
