:root {
  color-scheme: dark;
  --ink: #fff7d1;
  --muted: #b7c0c6;
  --line: #f6d75c;
  --panel: rgba(6, 8, 14, 0.94);
  --panel-deep: #080a12;
  --accent: #ffd84f;
  --accent-cyan: #42f2ff;
  --accent-pink: #ff4fb8;
  --danger: #ff4d5c;
  --ui-resolution-scale: 0.86;
  --menu-resolution-scale: 0.9;
}

* {
  box-sizing: border-box;
}

html,
body,
#shell {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #07080d;
  color: var(--ink);
  font-family:
    "Courier New", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    monospace;
  text-shadow: 1px 1px 0 #000;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(255, 78, 184, 0.05), rgba(66, 242, 255, 0.04));
  mix-blend-mode: screen;
}

button {
  font: inherit;
}

button,
select,
input {
  accent-color: var(--accent);
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#shell {
  position: relative;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  image-rendering: pixelated;
}

#game:focus {
  outline: none;
}

.hud {
  position: fixed;
  inset: 18px 18px auto 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
  transform: scale(var(--ui-resolution-scale));
  transform-origin: top left;
}

.hud__cluster {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.speed,
.telemetry,
#map,
.garage,
.status {
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow:
    5px 5px 0 #000,
    inset 0 0 0 2px rgba(66, 242, 255, 0.12);
  backdrop-filter: none;
}

.speed {
  width: 132px;
  min-height: 86px;
  padding: 10px 12px;
  display: grid;
  place-items: center;
  text-align: center;
}

.speed span {
  display: block;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 0.86;
  letter-spacing: 0;
  color: var(--accent);
  text-shadow:
    3px 3px 0 #000,
    -2px 0 0 rgba(255, 79, 184, 0.48),
    2px 0 0 rgba(66, 242, 255, 0.48);
}

.speed small {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.telemetry {
  min-width: 164px;
  min-height: 86px;
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

#map {
  width: 180px;
  height: 180px;
}

.garage {
  position: fixed;
  left: 50%;
  bottom: 18px;
  width: min(760px, calc(100vw - 32px));
  transform: translateX(-50%) scale(var(--ui-resolution-scale));
  transform-origin: bottom center;
  display: grid;
  grid-template-columns: minmax(172px, 250px) 1fr;
  gap: 12px;
  padding: 12px;
}

body[data-screen="countdown"] .garage,
body[data-screen="racing"] .garage,
body[data-screen="paused"] .garage,
body[data-screen="finished"] .garage,
body[data-screen="options"] .garage,
body[data-screen="motorway"] .garage {
  display: none;
}

.garage__meta {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.garage__meta span,
.garage__meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.garage__meta span {
  color: rgba(245, 241, 216, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.garage__meta strong {
  color: #fff8cb;
  font-size: 1.1rem;
}

.garage__buttons {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.garage__buttons button {
  min-width: 0;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background: #121725;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.garage__buttons button.is-active {
  border-color: var(--accent);
  background: #342600;
  color: #fff6bd;
}

.status {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 74px;
  padding: 8px 10px;
  color: rgba(245, 241, 216, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  transform: scale(var(--ui-resolution-scale));
  transform-origin: bottom right;
}

.countdown {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #fff3a8;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(4rem, 18vw, 11rem);
  line-height: 1;
  text-shadow:
    6px 6px 0 #151515,
    0 0 18px rgba(244, 211, 94, 0.45);
  transform: scale(var(--menu-resolution-scale));
}

.countdown:empty {
  display: none;
}

.motorway-toast {
  position: fixed;
  z-index: 24;
  left: 50%;
  bottom: clamp(28px, 8vh, 86px);
  width: min(390px, calc(100vw - 32px));
  padding: 12px 58px 12px 15px;
  border: 2px solid var(--accent-cyan);
  border-left: 7px solid var(--accent);
  background:
    linear-gradient(105deg, rgba(7, 27, 39, 0.98), rgba(13, 13, 25, 0.96)),
    #07131d;
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.88);
  color: #f6fdff;
  pointer-events: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  animation: motorway-toast-in 180ms steps(3, end) both;
}

.motorway-toast[hidden] {
  display: none;
}

.motorway-toast::after {
  content: ">>>";
  position: absolute;
  right: 14px;
  top: 50%;
  color: var(--accent-cyan);
  font-weight: 1000;
  letter-spacing: -0.14em;
  transform: translateY(-50%) skewX(-12deg);
}

.motorway-toast.is-postcard {
  border-color: var(--accent-pink);
  border-left-color: var(--accent-cyan);
}

.motorway-toast span,
.motorway-toast strong,
.motorway-toast small {
  display: block;
}

.motorway-toast span {
  color: var(--accent-cyan);
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.14em;
}

.motorway-toast strong {
  margin-top: 2px;
  color: #fff3ad;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.45rem;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1;
}

.motorway-toast small {
  margin-top: 4px;
  color: rgba(223, 245, 249, 0.72);
  font-size: 0.64rem;
  font-weight: 900;
}

@keyframes motorway-toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 78% 18%, rgba(66, 242, 255, 0.16), transparent 30%),
    linear-gradient(90deg, rgba(5, 6, 12, 0.96), rgba(5, 6, 12, 0.66)),
    rgba(5, 8, 10, 0.38);
}

.screen--active {
  display: flex;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 45%, rgba(66, 242, 255, 0.12), transparent 32%),
    linear-gradient(135deg, #060913, #11182b 52%, #05070e);
}

.intro-screen--active {
  display: flex;
  animation: intro-screen-fade 3s ease both;
}

.intro-screen__lockup {
  width: min(540px, 100%);
  border-top: 3px solid var(--accent-cyan);
  border-bottom: 3px solid var(--accent-pink);
  padding: 28px 16px;
  color: #f4f7ff;
  font-size: clamp(1.1rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.75;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}

.intro-screen__lockup p { margin: 0; }
.intro-screen__lockup strong { color: var(--accent-cyan); }
.intro-screen__lockup p + p strong { color: var(--accent-pink); }

@keyframes intro-screen-fade {
  0%, 12% { opacity: 0; }
  24%, 78% { opacity: 1; }
  100% { opacity: 0; }
}

#titleScreen.screen--active {
  pointer-events: none;
  justify-content: flex-start;
  overflow: hidden;
  background:
    linear-gradient(112deg, rgba(2, 8, 18, 0.96) 0 38%, rgba(5, 16, 28, 0.76) 58%, rgba(2, 5, 12, 0.28) 100%),
    repeating-linear-gradient(135deg, transparent 0 46px, rgba(77, 238, 255, 0.035) 46px 48px);
}

#titleScreen::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(180deg, var(--accent-cyan) 0 28%, #fff 28% 29%, var(--accent-pink) 29% 74%, var(--accent) 74%);
  box-shadow: 5px 0 0 rgba(0, 0, 0, 0.72);
}

#titleScreen::after {
  content: "RAVENWORKS // HIGH VELOCITY DIVISION";
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(194, 241, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

#titleScreen.screen--active .screen__panel {
  pointer-events: auto;
}

.screen__panel {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  overflow-x: hidden;
  border: 3px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(20, 24, 38, 0.96), rgba(6, 8, 14, 0.96)),
    var(--panel-deep);
  box-shadow:
    8px 8px 0 #000,
    inset 0 0 0 2px rgba(66, 242, 255, 0.24),
    inset 0 -14px 0 rgba(255, 79, 184, 0.08);
  padding: 22px;
  transform: scale(var(--menu-resolution-scale));
  transform-origin: center;
}

.screen__panel--title {
  margin: 0 0 0 clamp(24px, 5vw, 78px);
  width: min(900px, calc(100vw - 64px));
  border-width: 0 0 0 2px;
  border-color: rgba(85, 232, 255, 0.76);
  background: linear-gradient(90deg, rgba(8, 15, 28, 0.96), rgba(8, 15, 28, 0.78) 86%, transparent);
  box-shadow: -7px 0 0 rgba(255, 67, 171, 0.78), -12px 0 0 #050912;
  padding: 22px 34px 20px;
}

.title-lockup {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

.title-lockup__index {
  width: 62px;
  flex: 0 0 62px;
  display: grid;
  grid-template-rows: auto 1fr;
  border-right: 1px solid rgba(96, 231, 255, 0.46);
  color: var(--accent-cyan);
  line-height: 1;
}

.title-lockup__index span {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.title-lockup__index strong {
  align-self: end;
  color: rgba(218, 246, 255, 0.13);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 4.7rem;
  font-style: italic;
}

.title-lockup__wordmark { min-width: 0; }

.title-mark {
  position: relative;
  width: min(620px, 72vw);
  height: clamp(76px, 9vw, 116px);
  margin: -4px 0 0;
  isolation: isolate;
  filter: drop-shadow(7px 8px 0 rgba(0, 0, 0, 0.9));
}

.title-mark::before {
  content: "";
  position: absolute;
  z-index: -2;
  left: 1%;
  top: 12%;
  width: 86%;
  height: 70%;
  background: linear-gradient(110deg, #163c70 0 36%, #1dd6e4 36% 38%, #fe3a98 38% 40%, #142650 40% 100%);
  clip-path: polygon(0 25%, 83% 0, 100% 52%, 72% 100%, 8% 78%);
  opacity: 0.94;
}

.title-mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 22% 5% 14% 2%;
  border-top: 2px solid rgba(255, 255, 255, 0.7);
  border-bottom: 4px solid rgba(0, 0, 0, 0.6);
  transform: skewX(-18deg);
}

.title-mark__rvn {
  position: absolute;
  left: 4%;
  top: 0;
  color: #f8fbff;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(4.4rem, 8.4vw, 7.6rem);
  font-style: italic;
  letter-spacing: -0.09em;
  line-height: 0.9;
  transform: scaleY(1.08) skewX(-9deg);
  -webkit-text-stroke: 2px #071020;
  text-shadow: -4px 0 #fc3d9b, 4px 0 #34ecff, 6px 6px 0 #071020;
}

.title-mark__slash {
  position: absolute;
  left: 48%;
  top: 3%;
  width: 12px;
  height: 86%;
  background: var(--accent);
  border: 2px solid #071020;
  transform: rotate(24deg) skewY(-12deg);
}

.title-mark__circuit {
  position: absolute;
  left: 53%;
  top: 37%;
  color: var(--accent);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(2.15rem, 4.4vw, 4.1rem);
  font-style: italic;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
  transform: skewX(-12deg);
  -webkit-text-stroke: 1px #071020;
  text-shadow: 3px 3px 0 #071020;
}

.title-lockup__edition {
  margin: -2px 0 0 20%;
  color: rgba(194, 241, 255, 0.58);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.screen h1 {
  max-width: 11ch;
  color: #fff7ba;
  font-size: clamp(3.6rem, 10vw, 7.2rem);
  line-height: 0.86;
  overflow-wrap: anywhere;
  text-shadow:
    5px 5px 0 #000,
    -3px 0 0 var(--accent-pink),
    3px 0 0 var(--accent-cyan);
}

#titleScreen h1 {
  max-width: none;
  color: #f3fbff;
  font-size: clamp(3.2rem, 7.2vw, 6.6rem);
  font-style: italic;
  letter-spacing: -0.07em;
  line-height: 0.78;
  transform: skewX(-5deg);
  text-shadow: 5px 5px 0 #02050a, -3px 0 0 var(--accent-pink), 3px 0 0 var(--accent-cyan);
}

#titleScreen h1 span {
  color: var(--accent);
  font-size: 0.72em;
}

.track-select {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.track-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.62;
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(160, 206, 218, 0.36);
  background: #060b13 var(--track-image) center 48% / cover no-repeat;
  box-shadow: 3px 4px 0 #000;
  color: #fff;
  cursor: pointer;
  text-align: left;
  filter: saturate(0.7) brightness(0.62);
  transition: filter 90ms linear, transform 90ms linear, border-color 90ms linear;
}

.track-card::before {
  content: "";
  position: absolute;
  inset: 38% 0 0;
  background: linear-gradient(transparent, rgba(2, 5, 12, 0.95));
}

.track-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  pointer-events: none;
}

.track-card:hover,
.track-card.is-active {
  z-index: 1;
  border-color: var(--accent);
  filter: saturate(1.1) brightness(0.96);
  transform: translateY(-2px);
}

.track-card.is-active::after {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -5px 0 var(--accent);
}

.track-card__number,
.track-card strong,
.track-card small {
  position: absolute;
  z-index: 1;
  left: 8px;
  text-transform: uppercase;
}

.track-card__number {
  top: 7px;
  padding: 2px 5px;
  background: rgba(4, 9, 18, 0.78);
  color: var(--accent-cyan);
  font-size: 0.55rem;
  font-weight: 900;
}

.track-card strong {
  right: 6px;
  bottom: 20px;
  overflow: hidden;
  color: #fff;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(0.95rem, 1.55vw, 1.35rem);
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
}

.track-card small {
  right: 6px;
  bottom: 7px;
  overflow: hidden;
  color: var(--accent);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-divider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  color: rgba(199, 240, 255, 0.68);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu-divider i { height: 1px; background: linear-gradient(90deg, rgba(66, 242, 255, 0.5), transparent); }
.menu-divider b { color: var(--accent-pink); font-style: italic; }

.screen h2 {
  color: #fff4bd;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.92;
}

.screen__copy {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.screen__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.screen__actions button,
.race-setup__field select,
.race-setup__field input,
.option-row select {
  min-height: 44px;
  border: 2px solid rgba(255, 216, 79, 0.72);
  border-radius: 0;
  background: #101624;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow:
    4px 4px 0 #000,
    inset 0 0 0 1px rgba(66, 242, 255, 0.22);
}

.screen__actions button {
  min-width: 136px;
  padding: 0 16px;
}

#titleScreen .screen__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

#titleScreen .screen__actions button {
  position: relative;
  min-width: 0;
  min-height: 50px;
  padding: 16px 7px 5px;
  border: 1px solid rgba(137, 204, 221, 0.38);
  border-top: 3px solid rgba(137, 204, 221, 0.38);
  background: linear-gradient(145deg, rgba(26, 43, 58, 0.96), rgba(8, 14, 25, 0.98));
  box-shadow: 3px 3px 0 #000;
  color: #dceaf0;
  font-size: 0.72rem;
  line-height: 1;
}

#titleScreen .screen__actions button::before {
  position: absolute;
  top: 4px;
  left: 7px;
  color: var(--accent-cyan);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
}

#titleScreen .screen__actions button:nth-child(1)::before { content: "01 / RACE"; }
#titleScreen .screen__actions button:nth-child(2)::before { content: "02 / SOLO"; }
#titleScreen .screen__actions button:nth-child(3)::before { content: "03 / WATCH"; }

#titleScreen .screen__actions button:first-child {
  border-color: var(--accent);
  border-top-color: #fff5a7;
  background: linear-gradient(145deg, #735b08, #2f2503);
}

.screen__actions--compact {
  margin-top: 12px;
}

.screen__actions--compact button {
  min-width: 188px;
}

.screen__actions button:first-child {
  border-color: var(--accent);
  background: #352800;
  color: #fff6bd;
}

.screen__actions button:hover,
.garage__buttons button:hover,
.controls-overlay__close:hover,
.race-setup__field select:hover,
.race-setup__field input:hover,
.option-row select:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.race-setup {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(2, minmax(126px, 0.82fr));
  gap: 10px;
  margin-top: 18px;
}

.race-setup--conditions {
  grid-template-columns: repeat(3, minmax(118px, 160px));
  justify-content: end;
  margin-top: 9px;
}

.menu-mode-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(212px, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.menu-mode-section {
  --section-accent: var(--accent);
  position: relative;
  min-width: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--section-accent) 62%, transparent);
  border-left: 5px solid var(--section-accent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--section-accent) 9%, transparent), transparent 48%),
    rgba(5, 11, 20, 0.88);
  box-shadow: 3px 4px 0 #000, inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.menu-mode-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--section-accent), transparent 68%);
  opacity: 0.86;
}

.menu-mode-section--races {
  --section-accent: var(--accent-pink);
}

.menu-mode-section--motorway {
  --section-accent: var(--accent-cyan);
  display: flex;
  flex-direction: column;
}

.menu-mode-section__header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.menu-mode-section__header > div {
  min-width: 0;
}

.menu-mode-section__index {
  flex: 0 0 auto;
  color: var(--section-accent);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 2.2rem;
  font-style: italic;
  line-height: 0.86;
  opacity: 0.82;
}

.menu-mode-section__eyebrow {
  margin: 0 0 1px;
  color: rgba(218, 241, 247, 0.58);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.menu-mode-section h2 {
  color: #f7fbff;
  font-size: 1.55rem;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-shadow: 2px 2px 0 #000;
}

.menu-mode-section--motorway h2 {
  font-size: 1.08rem;
  letter-spacing: 0;
}

.menu-mode-section__badge {
  margin-left: auto;
  padding: 4px 6px;
  border: 1px solid rgba(255, 79, 184, 0.45);
  color: var(--accent-pink);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-mode-section--races .track-select {
  margin-top: 10px;
}

.menu-mode-section--races .race-setup--conditions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.menu-mode-section__copy {
  margin: 12px 0 0;
  color: rgba(216, 239, 245, 0.66);
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1.45;
  text-transform: uppercase;
}

.motorway-features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.motorway-features span {
  padding: 3px 5px;
  border: 1px solid rgba(66, 242, 255, 0.26);
  color: rgba(200, 248, 255, 0.75);
  font-size: 0.48rem;
  font-weight: 900;
  text-transform: uppercase;
}

.motorway-entry {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 82px;
  margin-top: auto;
  padding: 13px 48px 12px 12px;
  overflow: hidden;
  border: 1px solid rgba(66, 242, 255, 0.7);
  border-bottom: 5px solid var(--accent-cyan);
  background:
    repeating-linear-gradient(112deg, transparent 0 18px, rgba(66, 242, 255, 0.055) 18px 20px),
    linear-gradient(105deg, rgba(7, 39, 48, 0.98), rgba(7, 19, 29, 0.96)),
    #07131d;
  box-shadow: 3px 4px 0 #000;
  color: #e8fdff;
  cursor: pointer;
  text-align: left;
  text-transform: uppercase;
}

.motorway-entry::after {
  content: ">>>";
  position: absolute;
  right: 11px;
  top: 50%;
  color: var(--accent-cyan);
  font-size: 1.35rem;
  letter-spacing: -0.14em;
  transform: translateY(-50%) skewX(-12deg);
}

.motorway-entry:hover {
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  transform: translateY(-2px);
}

.motorway-entry__route,
.motorway-entry strong,
.motorway-entry small {
  display: block;
}

.motorway-entry__route {
  color: var(--accent-cyan);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.motorway-entry strong {
  margin-top: 2px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1;
}

.motorway-entry small {
  margin-top: 3px;
  color: rgba(210, 242, 247, 0.62);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.title-menu-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.title-menu-footer .screen__meta {
  flex: 1 1 auto;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.title-options-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid rgba(137, 204, 221, 0.38);
  background: linear-gradient(145deg, rgba(26, 43, 58, 0.96), rgba(8, 14, 25, 0.98));
  box-shadow: 3px 3px 0 #000;
  color: #dceaf0;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.title-options-button span {
  margin-right: 7px;
  color: var(--accent-cyan);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
}

.title-options-button:hover {
  border-color: var(--accent);
  color: #fff;
}

.race-setup__field--map {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.race-setup__field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.race-setup__field span {
  color: var(--accent-pink);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.race-setup__field select {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  background: #111827;
}

.race-setup__field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 2px solid rgba(255, 216, 79, 0.72);
  border-radius: 0;
  background: #111827;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow:
    4px 4px 0 #000,
    inset 0 0 0 1px rgba(66, 242, 255, 0.22);
}

.race-setup__field input::placeholder {
  color: rgba(245, 241, 216, 0.44);
}

#motorwayScreen {
  background:
    linear-gradient(118deg, rgba(3, 12, 20, 0.98), rgba(7, 15, 24, 0.86)),
    repeating-linear-gradient(135deg, transparent 0 46px, rgba(77, 238, 255, 0.035) 46px 48px);
}

.screen__panel--motorway {
  width: min(930px, calc(100vw - 32px));
  border-color: var(--accent-cyan);
  box-shadow:
    8px 8px 0 #000,
    inset 0 0 0 2px rgba(255, 79, 184, 0.2),
    inset 0 -14px 0 rgba(255, 216, 79, 0.06);
}

.motorway-menu__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.motorway-menu__header .screen__copy {
  max-width: 62ch;
  margin-bottom: 0;
}

.motorway-menu__counter {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(66, 242, 255, 0.58);
  background: rgba(5, 23, 32, 0.86);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.motorway-trip-select {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.motorway-trip-card {
  position: relative;
  min-width: 0;
  min-height: 130px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 13px;
  overflow: hidden;
  border: 2px solid rgba(227, 240, 245, 0.2);
  background:
    linear-gradient(145deg, rgba(17, 31, 48, 0.96), rgba(7, 11, 20, 0.98)),
    #0b101a;
  box-shadow: 4px 4px 0 #000;
  color: #eefaff;
  cursor: pointer;
  text-align: left;
  text-transform: uppercase;
}

.motorway-trip-card::after {
  content: attr(data-trip);
  position: absolute;
  right: -5px;
  bottom: -10px;
  color: rgba(66, 242, 255, 0.06);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 2.35rem;
  font-style: italic;
  line-height: 1;
  pointer-events: none;
}

.motorway-trip-card:hover {
  border-color: rgba(66, 242, 255, 0.72);
}

.motorway-trip-card.is-active {
  border-color: var(--accent);
  background:
    linear-gradient(145deg, rgba(42, 34, 7, 0.94), rgba(10, 18, 28, 0.98)),
    #12120b;
  box-shadow: 4px 4px 0 #000, inset 0 0 0 1px rgba(66, 242, 255, 0.42);
}

.motorway-trip-card span {
  color: var(--accent-cyan);
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.11em;
}

.motorway-trip-card strong {
  color: #fff2a7;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.4rem, 3.1vw, 2.1rem);
  font-style: italic;
  line-height: 1;
}

.motorway-trip-card small {
  color: rgba(228, 244, 248, 0.72);
  font-size: 0.68rem;
  font-weight: 900;
}

.motorway-trip-card em {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.3;
}

.motorway-route-setup {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) repeat(3, minmax(135px, 0.75fr));
  gap: 10px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(66, 242, 255, 0.28);
  background: rgba(5, 10, 18, 0.72);
}

.motorway-route-setup .race-setup__field > span small {
  margin-left: 4px;
  color: rgba(245, 241, 216, 0.42);
  font-size: 0.58rem;
}

.motorway-launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  padding: 12px 12px 12px 15px;
  border-left: 5px solid var(--accent-pink);
  background: linear-gradient(90deg, rgba(255, 79, 184, 0.1), rgba(66, 242, 255, 0.04));
}

.motorway-launch__summary span,
.motorway-launch__summary strong,
.motorway-launch__summary small {
  display: block;
}

.motorway-launch__summary span {
  color: var(--accent-pink);
  font-size: 0.65rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.motorway-launch__summary strong {
  margin-top: 2px;
  color: #fff4bd;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.motorway-launch__summary small {
  margin-top: 3px;
  color: rgba(224, 240, 246, 0.58);
  font-size: 0.63rem;
  font-weight: 800;
}

.motorway-launch__actions {
  display: flex;
  gap: 8px;
}

.motorway-launch__actions button {
  min-height: 46px;
  padding: 9px 14px;
  border: 2px solid rgba(255, 216, 79, 0.72);
  background: #111827;
  color: var(--ink);
  cursor: pointer;
  font-weight: 1000;
  text-transform: uppercase;
}

.motorway-launch__actions button:first-child {
  border-color: var(--accent);
  background: #392b00;
  color: #fff5bd;
}

.motorway-launch__actions button:nth-child(2) {
  border-color: rgba(66, 242, 255, 0.78);
  color: var(--accent-cyan);
}

.menu-divider--postcards {
  margin-top: 16px;
}

.motorway-postcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.motorway-postcard {
  min-width: 0;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--postcard-accent) 60%, #fff 8%);
  background: #eee1bf;
  box-shadow: 3px 3px 0 #000;
  color: #10131a;
  text-shadow: none;
  transform: rotate(var(--postcard-tilt, 0deg));
}

.motorway-postcard:nth-child(odd) { --postcard-tilt: -0.7deg; }
.motorway-postcard:nth-child(even) { --postcard-tilt: 0.7deg; }

.motorway-postcard__art {
  position: relative;
  min-height: 55px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--postcard-accent) 68%, #122 32%), #0b1520);
  color: rgba(255, 255, 255, 0.92);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.5rem;
  font-style: italic;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.72);
}

.motorway-postcard__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 255, 255, 0.08) 7px 8px),
    linear-gradient(130deg, transparent 0 57%, rgba(255, 255, 255, 0.12) 57% 61%, transparent 61%);
}

.motorway-postcard strong,
.motorway-postcard small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.motorway-postcard strong {
  margin-top: 6px;
  color: #17202b;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.motorway-postcard small {
  margin-top: 2px;
  color: #56606a;
  font-size: 0.5rem;
  font-weight: 900;
  text-transform: uppercase;
}

.motorway-postcard.is-locked {
  border-color: rgba(255, 255, 255, 0.12);
  background: #252b32;
  color: rgba(255, 255, 255, 0.3);
  filter: grayscale(1);
  opacity: 0.64;
}

.motorway-postcard.is-locked .motorway-postcard__art {
  background: #10151b;
  color: rgba(255, 255, 255, 0.24);
}

.motorway-postcard.is-locked strong,
.motorway-postcard.is-locked small {
  color: rgba(255, 255, 255, 0.34);
}

.screen__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  color: rgba(245, 241, 216, 0.62);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

#titleScreen .screen__meta {
  gap: 8px 16px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(92, 217, 240, 0.2);
}

#titleScreen .screen__meta b {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  margin-right: 4px;
  border: 1px solid rgba(222, 248, 255, 0.55);
  border-radius: 50%;
  color: var(--accent-cyan);
  font-size: 0.58rem;
}

body[data-mode="motorway"][data-screen="finished"] #resultsScreen.screen--active {
  justify-content: flex-start;
  background:
    linear-gradient(90deg, rgba(3, 7, 13, 0.96) 0 31%, rgba(3, 7, 13, 0.68) 45%, rgba(3, 7, 13, 0.14) 72%, transparent),
    linear-gradient(0deg, rgba(2, 5, 9, 0.24), transparent 48%);
}

body[data-mode="motorway"][data-screen="finished"] #resultsScreen .screen__panel {
  width: min(520px, calc(42vw - 32px));
  margin-left: clamp(12px, 3vw, 54px);
  border-color: rgba(99, 230, 247, 0.72);
  background:
    linear-gradient(180deg, rgba(16, 24, 35, 0.95), rgba(5, 9, 16, 0.92)),
    var(--panel-deep);
  box-shadow:
    8px 8px 0 rgba(0, 0, 0, 0.82),
    inset 0 0 0 2px rgba(66, 242, 255, 0.18),
    inset 0 -14px 0 rgba(255, 79, 184, 0.07);
  transform-origin: left center;
}

.results__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.results__summary span,
.results__list li,
.option-row {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 22, 36, 0.88);
}

.results__summary span {
  min-width: 0;
  padding: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.results__list {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style-position: inside;
}

.results__list li {
  padding: 9px 10px;
  color: rgba(245, 241, 216, 0.82);
  font-weight: 800;
}

.results__list li.is-player {
  border-color: rgba(244, 211, 94, 0.66);
  color: #fff6bd;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.option-row select {
  min-width: 190px;
  padding: 0 10px;
  background: #111827;
}

.controls-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(3, 6, 8, 0.56), rgba(3, 6, 8, 0.9)),
    rgba(5, 8, 10, 0.48);
}

.controls-overlay[hidden] {
  display: none;
}

.controls-overlay__panel {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 3px solid var(--line);
  border-radius: 0;
  background: rgba(8, 10, 18, 0.98);
  box-shadow:
    8px 8px 0 #000,
    inset 0 0 0 2px rgba(66, 242, 255, 0.18);
  padding: 20px;
  transform: scale(var(--menu-resolution-scale));
  transform-origin: center;
}

.controls-overlay__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.controls-overlay__header h2 {
  margin: 0;
  color: #fff4bd;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.controls-overlay__close {
  min-height: 40px;
  border: 2px solid rgba(255, 216, 79, 0.72);
  border-radius: 0;
  background: #101624;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.controls-visual {
  min-width: 0;
}

.keyboard-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.key-cluster {
  display: grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  gap: 8px;
  align-content: start;
}

.key-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.keycap {
  min-width: 0;
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 2px solid rgba(245, 241, 216, 0.28);
  border-bottom-width: 5px;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(245, 241, 216, 0.16), rgba(245, 241, 216, 0.05)),
    #191c20;
  color: #fff6bd;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.keycap small,
.pad-trigger small,
.pad-bumper small,
.pad-stick small,
.pad-dpad small,
.pad-menu small,
.pad-face small {
  display: block;
  margin-top: 5px;
  color: rgba(245, 241, 216, 0.68);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.05;
}

.keycap--empty {
  visibility: hidden;
}

.keycap--wide,
.keycap--space {
  min-height: 56px;
}

.gamepad-layout {
  display: grid;
  place-items: center;
  min-height: 360px;
}

.gamepad-frame {
  position: relative;
  width: min(700px, 100%);
  aspect-ratio: 1.82;
  border: 2px solid rgba(245, 241, 216, 0.28);
  border-radius: 42% 42% 34% 34% / 50% 50% 38% 38%;
  background:
    radial-gradient(circle at 25% 58%, rgba(244, 211, 94, 0.1), transparent 21%),
    radial-gradient(circle at 75% 58%, rgba(89, 168, 220, 0.14), transparent 21%),
    linear-gradient(180deg, #252a30, #13161a);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    0 22px 54px rgba(0, 0, 0, 0.36);
}

.pad-trigger,
.pad-bumper,
.pad-stick,
.pad-dpad,
.pad-menu,
.pad-face {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff6bd;
  font-size: clamp(0.66rem, 1.7vw, 0.82rem);
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.pad-trigger,
.pad-bumper {
  height: 13%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(245, 241, 216, 0.08);
}

.pad-trigger--left,
.pad-bumper--left {
  left: 10%;
}

.pad-trigger--right,
.pad-bumper--right {
  right: 10%;
}

.pad-trigger {
  top: -8%;
  width: 25%;
  border-radius: 8px 8px 4px 4px;
}

.pad-bumper {
  top: 9%;
  width: 23%;
  border-radius: 6px;
}

.pad-stick {
  width: 20%;
  aspect-ratio: 1;
  left: 17%;
  top: 45%;
  border: 10px solid #0e1014;
  border-radius: 50%;
  background:
    radial-gradient(circle, #4b535e 0 30%, #1a1e24 31% 100%);
}

.pad-dpad {
  left: 35%;
  top: 55%;
  width: 15%;
  aspect-ratio: 1;
  background:
    linear-gradient(90deg, transparent 0 34%, #0e1014 35% 65%, transparent 66% 100%),
    linear-gradient(0deg, transparent 0 34%, #0e1014 35% 65%, transparent 66% 100%);
}

.pad-menu {
  top: 42%;
  width: 10%;
  height: 8%;
  border-radius: 999px;
  background: rgba(245, 241, 216, 0.12);
}

.pad-menu--select {
  left: 43%;
}

.pad-menu--start {
  right: 43%;
}

.pad-face {
  width: 14%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(244, 211, 94, 0.28), rgba(244, 211, 94, 0.08));
}

.pad-face--north {
  right: 20%;
  top: 31%;
}

.pad-face--west {
  right: 31%;
  top: 47%;
}

.pad-face--east {
  right: 9%;
  top: 47%;
}

.pad-face--south {
  right: 20%;
  top: 62%;
}

@media (max-width: 760px) {
  .hud {
    inset: 10px 10px auto 10px;
  }

  .hud__cluster {
    flex-direction: column;
  }

  .speed {
    width: 108px;
    min-height: 72px;
  }

  .telemetry {
    min-width: 136px;
    min-height: auto;
    padding: 10px;
    font-size: 0.74rem;
  }

  #map {
    width: 128px;
    height: 128px;
  }

  .garage {
    bottom: 10px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .garage__buttons {
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    overflow-x: auto;
  }

  .garage__buttons button {
    min-height: 48px;
    padding: 6px;
    font-size: 0.66rem;
  }

  .status {
    right: 10px;
    bottom: 174px;
  }

  .screen {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 14px;
  }

  .screen__panel,
  .screen__panel--title {
    margin: 0;
    padding: 16px;
  }

  .screen__panel {
    width: min(100%, 420px);
  }

  body[data-mode="motorway"][data-screen="finished"] #resultsScreen.screen--active {
    justify-content: flex-start;
    background:
      linear-gradient(180deg, rgba(3, 7, 13, 0.58), rgba(3, 7, 13, 0.9)),
      rgba(3, 7, 13, 0.24);
  }

  body[data-mode="motorway"][data-screen="finished"] #resultsScreen .screen__panel {
    width: min(100%, 420px);
    margin-left: 0;
    transform-origin: top left;
  }

  .screen__panel--title {
    width: min(100%, 360px);
  }

  .title-mark {
    width: 100%;
    height: 78px;
  }

  .title-mark__rvn {
    font-size: 4.4rem;
  }

  .title-mark__circuit {
    font-size: 2.15rem;
  }

  .track-select {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .race-setup--conditions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-mode-grid {
    grid-template-columns: 1fr;
  }

  .motorway-entry {
    width: 100%;
    min-width: 0;
    margin-top: 12px;
  }

  .title-menu-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .title-options-button {
    width: 100%;
  }

  .screen h1 {
    max-width: 100%;
    font-size: clamp(2.65rem, 13.5vw, 3.35rem);
    line-height: 0.92;
  }

  .screen__copy {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .screen__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #titleScreen .screen__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #titleScreen .screen__actions button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .screen__actions button,
  .race-setup__field select,
  .race-setup__field input,
  .option-row select {
    width: 100%;
  }

  .race-setup {
    grid-template-columns: 1fr;
  }

  .screen__panel--motorway {
    width: min(100%, 520px);
  }

  .motorway-menu__header {
    display: grid;
    gap: 10px;
  }

  .motorway-menu__counter {
    justify-self: start;
  }

  .motorway-trip-select,
  .motorway-route-setup,
  .motorway-launch {
    grid-template-columns: 1fr;
  }

  .motorway-trip-card {
    min-height: 108px;
  }

  .motorway-launch__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .motorway-launch__actions button:last-child {
    grid-column: 1 / -1;
  }

  .motorway-postcard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screen__meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .results__summary {
    grid-template-columns: 1fr;
  }

  .option-row {
    align-items: stretch;
    flex-direction: column;
  }

  .keyboard-layout,
  .key-strip {
    grid-template-columns: 1fr;
  }

  .controls-overlay {
    align-items: flex-start;
    padding: 14px;
  }

  .controls-overlay__panel {
    padding: 16px;
  }

  .controls-overlay__header {
    align-items: stretch;
    flex-direction: column;
  }

  .controls-overlay__close {
    width: 100%;
  }

  .gamepad-layout {
    min-height: 260px;
  }

  .gamepad-frame {
    min-width: 440px;
  }

  .controls-visual--gamepad {
    overflow-x: auto;
    padding-bottom: 6px;
  }
}
