:root {
  color-scheme: dark;
  --acid: #ddff52;
  --ink: #121615;
  --line: rgba(222, 232, 224, 0.18);
  --muted: #aab4ae;
  --display: 'Barlow Condensed', 'Arial Narrow', Impact, Haettenschweiler, 'Arial Black', sans-serif;
  --body: 'Inter', 'Segoe UI', Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body,
#game {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: #101412;
  color: #f7f8f2;
  font: 15px var(--body);
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}
button {
  -webkit-user-select: none;
  user-select: none;
}
button:active:not(:disabled) {
  filter: brightness(0.88);
}
[hidden] {
  display: none !important;
}
#game,
#menu,
#hud {
  position: relative;
}
#world,
#menu,
#hud,
#overlay,
#keyart,
.shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#world {
  display: block;
  background: linear-gradient(#8db6ce, #a3b8ad);
}
#menu {
  isolation: isolate;
  display: grid;
  grid-template-rows: 80px minmax(0, 1fr) auto;
  --gutter: clamp(22px, 4.2vw, 86px);
}
#keyart {
  z-index: -3;
  background: #38413f url(assets/corniche.jpg) center 46% / cover no-repeat;
}
.shade {
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      rgba(8, 15, 17, 0.83) 0%,
      rgba(9, 16, 19, 0.62) 19%,
      rgba(10, 17, 19, 0.16) 49%,
      transparent 77%
    ),
    linear-gradient(
      0deg,
      #0b100f 0%,
      rgba(12, 17, 16, 0.91) 12%,
      rgba(12, 17, 16, 0.34) 27%,
      transparent 46%
    ),
    linear-gradient(180deg, rgba(7, 12, 16, 0.42), transparent 25%);
}
.topbar {
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  gap: clamp(32px, 5vw, 110px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(12, 17, 18, 0.26);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
}
.emblem {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  transform: skewX(-23deg);
  height: 29px;
}
.emblem i {
  display: block;
  width: 8px;
  background: var(--acid);
}
.emblem i:nth-child(1) {
  height: 13px;
}
.emblem i:nth-child(2) {
  height: 22px;
}
.emblem i:nth-child(3) {
  height: 29px;
}
.wordmark {
  font: italic 950 27px/0.83 var(--body);
  letter-spacing: -1.6px;
}
.wordmark small {
  display: block;
  font: 800 9px/1.05 var(--body);
  letter-spacing: 3.1px;
  margin: 5px 0 0 2px;
}
.topbar nav {
  display: flex;
  align-self: stretch;
  gap: 30px;
}
.nav,
.iconbtn,
.stepbtn,
.selectbtn,
.outline,
.subtle,
.swatch,
.key,
.model,
.tabs button {
  border: 1px solid transparent;
  background: none;
}
.nav {
  position: relative;
  color: #d4d8d5;
  font-weight: 600;
  padding: 0 2px;
}
.nav:hover,
.nav.active {
  color: #fff;
}
.nav.active:after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--acid);
}
.tools,
.actions,
.rail-controls,
.rail-head,
.race-top,
.dialog-head,
.row,
.inline {
  display: flex;
  align-items: center;
}
.tools {
  margin-left: auto;
  gap: 9px;
}
.iconbtn,
.stepbtn {
  display: grid;
  place-items: center;
  background: rgba(18, 25, 24, 0.57);
  border: 1px solid rgba(238, 247, 237, 0.25);
  border-radius: 7px;
}
.iconbtn {
  width: 38px;
  height: 38px;
}
.iconbtn:hover,
.stepbtn:hover,
.selectbtn:hover,
.outline:hover {
  background: #48504766;
  border-color: #cdd8ac;
}
.ico {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.selection {
  align-self: center;
  padding: 0 var(--gutter);
  margin-top: 5px;
  max-width: 750px;
}
.eyebrow,
.rail-title,
.rail-controls b,
.facts span,
.tile-sub,
.kicker,
.hudpanel label,
.dial span,
.micro,
.caps {
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--acid);
  font-size: 11px;
}
.accent-line {
  height: 2px;
  width: 28px;
  background: var(--acid);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-family: var(--display);
  font-weight: 950;
  line-height: 0.89;
  letter-spacing: -0.043em;
  font-size: clamp(68px, min(7.7vw, 12vh), 146px);
  font-style: italic;
  text-transform: uppercase;
  margin: 15px 0 22px -4px;
  text-shadow: 0 3px 25px #10171444;
}
h1.long {
  font-size: clamp(55px, min(6.6vw, 10vh), 112px);
}
.facts {
  display: flex;
  align-items: center;
  gap: 0;
}
.facts > div {
  padding: 0 20px;
  border-left: 1px solid #e1e9e15c;
}
.facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.facts span {
  display: block;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #c5ccc6;
  margin-bottom: 4px;
}
.facts strong {
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.actions {
  gap: 10px;
  margin-top: 27px;
}
.primary,
.outline,
.selectbtn {
  min-height: 43px;
  border-radius: 5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}
.primary {
  background: var(--acid);
  color: #182009;
  padding: 0 22px;
  border: 1px solid var(--acid);
  box-shadow: 0 3px 20px #0002;
}
.primary:hover {
  background: #e8ff86;
}
.play {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.selectbtn,
.outline {
  padding: 0 14px;
  border: 1px solid #e2e8dd55;
  background: #17201eb5;
  color: #f4f6ed;
}
.selectbtn {
  font-size: 13px;
  font-weight: 560;
}
.selectbtn .ico {
  width: 16px;
}
.track-rail {
  min-width: 0;
  padding: 0 var(--gutter) clamp(17px, 3.8vh, 44px);
}
.rail-head {
  justify-content: space-between;
  margin-bottom: 12px;
}
.rail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 2px;
}
.stripe {
  width: 5px;
  height: 11px;
  background: var(--acid);
  transform: skew(-22deg);
}
.rail-controls {
  gap: 6px;
}
.rail-controls b {
  letter-spacing: 1.3px;
  font-size: 11px;
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}
.rail-controls b span {
  color: #a5aea7;
}
.stepbtn {
  width: 29px;
  height: 25px;
  border-radius: 4px;
  font: 22px/1 Arial;
}
.stepbtn:not(:disabled):hover {
  color: var(--acid);
}
#track-list {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding: 2px 1px 3px;
}
#track-list::-webkit-scrollbar {
  display: none;
}
.tile {
  position: relative;
  isolation: isolate;
  flex: 0 0 calc((100% - 30px) / 4);
  min-width: 0;
  height: 98px;
  text-align: left;
  border: 1px solid #cad4c032;
  border-radius: 6px;
  background: linear-gradient(112deg, #25302bfa, #18221eee);
  overflow: hidden;
  padding: 15px 13px 15px 17px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  scroll-snap-align: start;
}
.tile:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(130deg, transparent 0 10px, #bccfbd07 11px, transparent 12px 24px);
  mask-image: linear-gradient(90deg, transparent, #000);
}
.tile:hover {
  background-color: #384137;
}
.tile.chosen {
  border-color: var(--acid);
  box-shadow: inset 3px 0 0 var(--acid);
  background: linear-gradient(111deg, #333d26, #20291c);
}
.tile-no {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #b1bbb2;
}
.tile.chosen .tile-no,
.tile.chosen .tile-sub {
  color: var(--acid);
}
.tile-name {
  font-weight: 700;
  font-size: clamp(13px, 1.15vw, 19px);
  margin-top: auto;
  line-height: 1.15;
  z-index: 1;
  max-width: 74%;
  text-shadow: 0 1px 5px #121915;
}
.tile-sub {
  font-size: 8px;
  letter-spacing: 1.2px;
  margin-top: 5px;
  color: #a6b0a7;
  z-index: 1;
}
.tile canvas {
  position: absolute;
  right: 5%;
  top: 10%;
  width: 32%;
  height: 63%;
  opacity: 0.8;
  z-index: -1;
}
.tile.chosen canvas {
  opacity: 1;
}
#overlay {
  background: #080e11a6;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 22px;
  backdrop-filter: blur(8px);
}
#dialog {
  width: min(100%, 650px);
  max-height: 92dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: linear-gradient(145deg, #242d29, #151d1a 72%);
  box-shadow: 0 24px 90px #0008;
  border: 1px solid #c0cfb93e;
  border-radius: 12px;
  padding: 26px;
  scrollbar-color: #606e5f transparent;
}
.dialog-head {
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 19px;
}
.kicker {
  color: var(--acid);
  font-size: 9px;
  margin-bottom: 6px;
}
.dialog-head h2,
#dialog h2.big {
  font: 800 italic clamp(28px, 4vw, 47px)/0.99 var(--display);
  letter-spacing: -1.4px;
  text-transform: uppercase;
}
.dialog-head .iconbtn {
  flex: none;
}
.dialog-body {
  display: grid;
  gap: 15px;
}
.muted {
  color: #b4beb7;
  line-height: 1.5;
  font-size: 14px;
}
.row {
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e4efd617;
  padding: 8px 0;
}
.row strong {
  font-size: 14px;
}
.inline {
  gap: 9px;
  flex-wrap: wrap;
}
.wide {
  width: 100%;
}
.tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 6px;
  background: #09110f75;
}
.tabs button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 4px;
  color: #bdc7be;
  font-weight: 650;
  font-size: 13px;
}
.tabs button.on {
  background: #3a453c;
  color: #f6faee;
}
.control,
select,
.key {
  background: #0d1513;
  color: #f1f5ea;
  border: 1px solid #59655a;
  border-radius: 5px;
  padding: 8px 11px;
}
.control {
  width: 100%;
  min-width: 0;
}
.control:focus,
select:focus {
  border-color: var(--acid);
}
.key {
  min-width: 86px;
  text-align: center;
  font-size: 12px;
}
.key.listening {
  color: var(--acid);
  border-color: var(--acid);
}
.keys-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.small {
  font-size: 12px;
}
.callout {
  border-left: 3px solid var(--acid);
  background: #d6ff5510;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.swatches {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.swatch {
  width: 27px;
  height: 27px;
  border: 3px solid #202620;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #88938170;
}
.swatch.on {
  box-shadow: 0 0 0 2px var(--acid);
}
.garage-layout #menu {
  visibility: hidden;
}
.garage-layout #overlay {
  place-items: center start;
  background: linear-gradient(90deg, #0b1318ad, transparent 78%);
  backdrop-filter: none;
  padding: var(--garage-margin, 4vw);
}
.garage-layout #dialog {
  width: min(415px, 94vw);
  background: #15201cf2;
}
.models {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.model {
  text-align: left;
  padding: 9px;
  border-radius: 5px;
  border-color: #aab7a43a;
  background: #0d15126b;
  font-weight: 650;
}
.model.on {
  border-color: var(--acid);
  color: var(--acid);
}
.specs {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.specs div {
  display: grid;
  gap: 3px;
}
.specs span,
.field-label {
  font-size: 11px;
  color: var(--muted);
}
.field-label {
  display: block;
  margin-bottom: 5px;
}
.car-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}
.tables {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tables th,
.tables td {
  text-align: left;
  border-bottom: 1px solid #d5e0d320;
  padding: 9px 5px;
}
.tables th {
  color: #afbbae;
  font-weight: 550;
  font-size: 11px;
}
.tables td:last-child,
.tables th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tables tr.me {
  color: var(--acid);
}
.subtle {
  padding: 7px 5px;
  color: #d1d9cb;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pill {
  font-size: 10px;
  font-weight: 650;
  border-radius: 3px;
  padding: 3px 6px;
  background: #ccedaa1c;
  color: #dce8c9;
}
.delta-good {
  color: #adff97;
}
.delta-bad {
  color: #ffb899;
}
#toast {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 15px);
  background: #111b17ef;
  border: 1px solid #aeb9a85c;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 13px;
  opacity: 0;
  transition: 0.18s;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#hud {
  pointer-events: none;
  text-shadow: 0 2px 9px #0009;
  background: linear-gradient(#07101144, transparent 16%, transparent 76%, #09101466);
}
.race-top {
  position: absolute;
  top: 3.5%;
  left: 3%;
  right: 3%;
  align-items: flex-start;
  gap: 9px;
}
.hudpanel,
.mapbox,
.dial {
  border: 1px solid #b2c2ad60;
  background: #0c1715ce;
  border-radius: 6px;
}
.hudpanel {
  padding: 8px 14px;
  min-width: 83px;
  display: grid;
}
.hudpanel label {
  color: #c6d1c7;
  font-size: 9px;
}
.hudpanel strong {
  font: italic 750 26px/1.15 var(--display);
  font-variant-numeric: tabular-nums;
}
.clock-panel {
  margin-left: auto;
  min-width: 141px;
}
.clock-panel small {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.race-top button,
#touch button {
  pointer-events: auto;
}
.mapbox {
  position: absolute;
  bottom: 4%;
  left: 3%;
  width: clamp(128px, 15vw, 220px);
  padding: 8px 8px 10px;
  text-align: center;
}
.mapbox canvas {
  display: block;
  width: 100%;
  height: auto;
}
.mapbox div {
  font-weight: 650;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dial {
  right: 3%;
  bottom: 4%;
  position: absolute;
  padding: 10px 15px;
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 5px 10px;
  align-items: center;
}
.gear {
  display: grid;
  justify-items: center;
  gap: 2px;
}
.gear span,
.dial-main span {
  font-size: 8px;
  letter-spacing: 1px;
}
.gear b {
  font: italic 800 24px/1 var(--display);
  color: var(--acid);
}
.dial-main strong {
  font: italic 800 clamp(35px, 5vw, 71px)/0.95 var(--display);
  font-variant-numeric: tabular-nums;
}
.dial-main span {
  display: block;
  text-align: right;
}
.rpm {
  grid-column: span 2;
  height: 4px;
  background: #6c776c77;
}
.rpm i {
  display: block;
  height: 100%;
  background: var(--acid);
  width: 10%;
}
#race-message,
#countdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
#countdown {
  top: 26%;
  font: italic 900 clamp(65px, 12vw, 180px)/1 var(--display);
  color: var(--acid);
  text-shadow: 0 5px 30px #15271999;
}
#race-message {
  top: 17%;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  background: #101c17c9;
}
#race-message:empty {
  display: none;
}
#touch {
  display: none;
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 2%;
  justify-content: space-between;
}
#touch div {
  display: flex;
  gap: 6px;
}
#touch button {
  height: 50px;
  min-width: 52px;
  border: 1px solid #dce5d16e;
  background: #101a15bf;
  border-radius: 8px;
  color: white;
  touch-action: none;
}
.neturls {
  display: grid;
  gap: 5px;
}
.neturls code {
  font:
    600 14px ui-monospace,
    monospace;
  color: var(--acid);
  overflow-wrap: anywhere;
}
.rank-hero {
  font: bold italic 52px/1 var(--display);
  color: var(--acid);
}
#dialog .error {
  color: #ffc3a9;
  font-size: 13px;
}
@media (min-width: 1650px) {
  #menu {
    grid-template-rows: 96px minmax(0, 1fr) auto;
  }
  .tile {
    height: 125px;
  }
}
@media (max-width: 900px) {
  .tile {
    flex-basis: calc((100% - 20px) / 3);
  }
  .topbar {
    gap: 27px;
  }
  .topbar nav {
    gap: 16px;
  }
  .tile {
    height: 86px;
  }
  .selection {
    max-width: 620px;
  }
  .actions {
    margin-top: 19px;
  }
}
@media (max-height: 650px) and (min-width: 651px) {
  #menu {
    grid-template-rows: 53px minmax(0, 1fr) auto;
  }
  .track-rail {
    padding-bottom: 12px;
  }
  .tile {
    height: 70px;
    padding: 8px 12px;
  }
  .rail-head {
    margin-bottom: 5px;
  }
  h1 {
    font-size: clamp(47px, 11vh, 75px);
    margin: 7px 0 13px;
  }
  .actions {
    margin-top: 12px;
  }
  .selection {
    margin: 0;
  }
  .primary,
  .selectbtn {
    min-height: 36px;
  }
}
@media (max-width: 650px) {
  #menu {
    --gutter: 18px;
    grid-template-rows: 62px minmax(0, 1fr) auto;
  }
  .topbar {
    gap: 18px;
  }
  .brand {
    gap: 7px;
  }
  .wordmark {
    font-size: 20px;
  }
  .wordmark small {
    font-size: 7px;
    letter-spacing: 2.4px;
  }
  .emblem {
    gap: 2px;
    height: 23px;
  }
  .emblem i {
    width: 5px;
  }
  .emblem i:nth-child(1) {
    height: 9px;
  }
  .emblem i:nth-child(2) {
    height: 16px;
  }
  .emblem i:nth-child(3) {
    height: 22px;
  }
  .topbar nav {
    gap: 12px;
  }
  .nav {
    font-size: 12px;
  }
  .tools {
    gap: 4px;
  }
  .tools .iconbtn {
    width: 29px;
    height: 30px;
  }
  .tools .ico {
    width: 15px;
  }
  .selection {
    align-self: end;
    margin-bottom: 32px;
  }
  .shade {
    background:
      linear-gradient(0deg, #0b1110 1%, #0d1516dc 28%, #10181785 54%, transparent 78%),
      linear-gradient(180deg, #06101085, transparent 30%);
  }
  #keyart {
    background-position: 66% 38%;
  }
  .tile {
    flex-basis: calc((100% - 10px) / 2);
    height: 83px;
  }
  .facts > div {
    padding: 0 11px;
  }
  .facts strong {
    font-size: 14px;
  }
  .actions {
    gap: 7px;
  }
  .primary,
  .selectbtn {
    font-size: 12px;
    padding: 0 12px;
  }
  .rail-head {
    margin-bottom: 7px;
  }
  .track-rail {
    padding-bottom: 17px;
  }
  h1 {
    font-size: clamp(57px, 10vh, 88px);
    margin: 10px 0 17px;
  }
  h1.long {
    font-size: clamp(47px, 8vh, 70px);
  }
  .eyebrow {
    font-size: 9px;
  }
  .keys-grid {
    grid-template-columns: 1fr;
  }
  .garage-layout #overlay {
    place-items: end center;
    padding: 8px;
  }
  .garage-layout #dialog {
    max-height: 58dvh;
  }
  .dialog-head {
    margin-bottom: 12px;
  }
  #dialog {
    padding: 19px;
  }
  .hudpanel {
    min-width: 54px;
    padding: 6px 8px;
  }
  .hudpanel strong {
    font-size: 20px;
  }
  .clock-panel {
    min-width: 100px;
  }
  .race-top {
    gap: 4px;
  }
  .mapbox {
    width: 105px;
  }
}
@media (max-width: 390px) {
  .topbar {
    gap: 9px;
  }
  .topbar nav {
    gap: 6px;
  }
  .tools {
    gap: 2px;
  }
  .tools .iconbtn {
    width: 25px;
  }
  .facts span {
    letter-spacing: 1px;
  }
  .tile-name {
    max-width: 90%;
  }
}
@media (pointer: coarse) {
  #touch {
    display: flex;
  }
  .mapbox,
  .dial {
    bottom: calc(3% + 56px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
#menu {
  grid-template-columns: minmax(0, 1fr);
}
.topbar,
.selection,
.track-rail {
  min-width: 0;
}
@media (max-width: 650px) {
  #menu .selection h1 {
    font-size: clamp(43px, min(15.2vw, 10vh), 80px);
  }
  #menu .selection h1.long {
    font-size: clamp(37px, min(12.5vw, 8vh), 64px);
  }
}
