:root {
  --accent: #ffcc47;
  --text-main: #f5efdc;
  --text-muted: #bab7a8;
  --bg-glass: rgba(19, 25, 24, 0.83);
  --bg-glass-strong: #1b211f;
  --border-glass: #ffffff30;
  --display:
    Impact, Haettenschweiler, 'Arial Narrow Bold', 'Arial Narrow', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #fff0a0;
  outline-offset: 3px;
}
.top-bar {
  left: 3.8vw;
  right: 3.8vw;
  top: 25px;
}
.brand {
  font: 800 13px var(--mono);
  letter-spacing: 0.13em;
  color: #fff5d9;
}
.brand-mark {
  display: inline-flex;
  gap: 3px;
  transform: skewX(-22deg);
  margin-right: 4px;
}
.brand-mark i {
  width: 5px;
  height: 17px;
  background: var(--accent);
}
.brand-mark i:first-child {
  width: 3px;
}
.brand-city {
  font-size: 18px;
  letter-spacing: 0;
}
.pill-btn,
.btn-primary,
.btn-secondary,
.glass,
.text-input,
.modal-card,
.car-btn {
  border-radius: 2px;
}
.pill-btn {
  font: 700 10px var(--mono);
  background: #131b19d9;
}
#landing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 86px 5.4vw 115px;
  overflow-y: auto;
  background-color: #20211e;
  background-image:
    linear-gradient(
      0deg,
      rgba(7, 14, 13, 0.72),
      transparent 26%,
      transparent 87%,
      rgba(10, 14, 12, 0.45)
    ),
    linear-gradient(
      90deg,
      rgba(6, 16, 15, 0.69),
      rgba(8, 16, 16, 0.16) 43%,
      transparent 62%
    ),
    url('/art/bypass.jpg');
  background-size: cover;
  background-position: center;
}
.hero-left {
  width: min(375px, 100%);
  max-width: none;
}
.event-line,
.run-strip span,
.hud-kicker,
.boost-head,
.landmark-head,
.cp-index,
.modal-eyebrow {
  font: 700 10px var(--mono);
  letter-spacing: 0.15em;
}
.event-line {
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.checker {
  display: inline-block;
  width: 31px;
  height: 12px;
  background: repeating-conic-gradient(var(--accent) 0% 25%, transparent 0% 50%)
    0 0 / 12px 12px;
  transform: skewX(-12deg);
}
.race-title {
  font: normal clamp(82px, min(10.4vw, 15vh), 162px) / 0.84 var(--display);
  letter-spacing: -0.042em;
  transform: skewX(-9deg);
  transform-origin: bottom left;
  margin: 0 0 18px;
  color: #fff3d8;
  text-shadow: 0 3px 0 #372f24;
}
.race-title span {
  display: block;
  color: var(--accent);
}
.run-route {
  font-size: clamp(17px, 1.5vw, 24px);
  letter-spacing: -0.025em;
  font-weight: 650;
  color: #fff3db;
}
.run-route b {
  font-weight: 400;
  color: var(--accent);
  padding: 0 5px;
}
.race-menu {
  width: min(345px, 100%);
  margin-top: 26px;
}
.launch {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  font: 800 14px var(--mono);
  letter-spacing: 0.07em;
  color: #1e241f;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 9px),
    calc(100% - 9px) 100%,
    0 100%
  );
}
.launch span {
  font: 900 21px/1 sans-serif;
}
.dual-menu {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  margin-top: 8px;
  background: #141c1bea;
  border: 1px solid #ffedd13b;
}
.dual-menu button {
  background: transparent;
  border: 0;
  flex: auto;
  padding: 12px 4px;
  color: #f3e7d2;
  cursor: pointer;
  text-transform: uppercase;
  font: 700 10px var(--mono);
  letter-spacing: 0.02em;
}
.dual-menu button + button {
  border-left: 1px solid #ffedd126;
}
.dual-menu button:hover {
  background: #444335;
  color: #ffe4a8;
}
.join-inline {
  margin-top: 8px;
}
.race-menu .error-banner {
  margin-top: 7px;
}
.run-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 4.4vw;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 4vw;
  background: #141b19ee;
  border-top: 1px solid #c5c2a34d;
}
.run-strip span {
  display: block;
  font-size: 9px;
  color: #bcb8a7;
  margin-bottom: 8px;
}
.distance strong {
  font: italic 32px/0.9 var(--display);
  color: var(--accent);
}
.distance small {
  font: 700 12px var(--mono);
}
.route-strip {
  flex: 1;
  border-inline: 1px solid #f1e9cd31;
  padding-inline: 3.8vw;
}
.stops {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stops b {
  font: 650 clamp(10px, 1vw, 14px) system-ui;
  color: #eadfc7;
  white-space: nowrap;
}
.stops i {
  min-width: 6px;
  max-width: 65px;
  flex: 1;
  height: 1px;
  background: #aaa492;
  position: relative;
}
.stops i:after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-top: 1px solid #aaa492;
  border-right: 1px solid #aaa492;
  transform: rotate(45deg);
  right: 0;
  top: -2px;
}
.keys-note div {
  color: #eddfc5;
  font-size: 12px;
}
kbd {
  font: 600 10px var(--mono);
  display: inline-block;
  border: 1px solid #9e9b8d;
  padding: 2px 5px;
  margin-right: 3px;
  border-radius: 2px;
}
kbd:last-child {
  margin-left: 10px;
}
body:has(#landing.hidden) .top-bar {
  left: 18px;
  right: 18px;
  top: 14px;
}
body:has(#landing.hidden) .brand {
  background: #172020df;
  border-left: 3px solid var(--accent);
  padding: 7px 11px;
  font-size: 10px;
}
body:has(#landing.hidden) .brand-city {
  font-size: 13px;
}
#race-hud {
  background: linear-gradient(
    0deg,
    #080f124d,
    transparent 20%,
    transparent 83%,
    #151b174d
  );
}
.pos-value,
.speed-num,
.gear-num,
.time-value,
.points-val,
.countdown-num,
.modal-title {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.015em;
}
.speed-num {
  font-size: 65px;
  font-style: italic;
}
.pos-value {
  font-size: 44px;
}
.speed-cluster,
.pos-time-row {
  background: #17201ee0;
  border-left: 3px solid var(--accent);
  padding: 9px 14px;
  width: fit-content;
}
.speed-cluster {
  align-items: center;
  gap: 16px;
}
.boost-points {
  min-width: 112px;
}
.time-value {
  font-size: 27px;
}
.hud-bottom-right {
  align-items: flex-end;
}
.hud-top-center {
  background: #19201ecf;
  padding: 7px 14px;
  border-bottom: 1px solid #ffcc4780;
}
.cp-name {
  font-size: 15px;
}
.cp-index {
  font-size: 9px;
}
.boost-bar {
  border-radius: 0;
}
.boost-fill {
  background: repeating-linear-gradient(90deg, #ffcc47 0 8px, #cc9e44 8px 10px);
}
#slipstream {
  font: 800 10px var(--mono);
  color: #83e3d3;
}
.countdown-sub {
  background: #1d2524d9;
  padding: 6px 12px;
}
.modal-card {
  border-top: 3px solid var(--accent);
  max-height: 90dvh;
  overflow: auto;
}
.modal-title {
  font-size: 38px;
}
.modal-eyebrow {
  color: var(--accent);
}
#touch-drive {
  display: none;
}
@media (max-width: 820px) {
  .keys-note {
    display: none;
  }
  .route-strip {
    border-right: 0;
  }
  .run-strip {
    gap: 18px;
    padding: 14px 20px;
  }
  .hero-left {
    width: 310px;
  }
  .race-menu {
    width: 100%;
  }
  .top-bar {
    left: 20px;
    right: 20px;
  }
  .brand {
    font-size: 10px;
  }
  .top-controls {
    gap: 4px;
  }
  .pill-btn {
    padding: 7px;
  }
  .hud-top-center {
    width: 210px;
  }
  .hud-top-left {
    top: 74px;
  }
  .brand-city,
  .brand-sep {
    display: none;
  }
}
@media (max-width: 600px) {
  #landing {
    justify-content: flex-end;
    padding: 86px 22px 94px;
    background-position: 66% center;
    background-image:
      linear-gradient(0deg, #101817 6%, #101817e0 32%, transparent 76%),
      url('/art/bypass.jpg');
  }
  .race-title {
    font-size: 76px;
  }
  .race-title span {
    display: inline;
    margin-left: 9px;
  }
  .hero-left {
    width: 100%;
  }
  .event-line {
    margin-bottom: 10px;
  }
  .race-menu {
    margin-top: 16px;
    width: 100%;
  }
  .run-strip {
    min-height: 61px;
  }
  .run-strip span {
    font-size: 8px;
  }
  .distance strong {
    font-size: 22px;
  }
  .route-strip {
    padding-left: 12px;
    padding-right: 0;
  }
  .stops {
    gap: 4px;
  }
  .stops b {
    font-size: 9px;
  }
  .top-bar {
    top: 14px;
  }
  .hud-top-center {
    top: 43px;
    right: 10px;
    left: auto;
    transform: none;
    width: 150px;
  }
  .landmark-card {
    width: 150px;
  }
  .hud-top-left {
    top: 44px;
    left: 8px;
  }
  .landmark-name {
    font-size: 11px;
  }
  .action-pad {
    display: none;
  }
  .hud-bottom-left {
    left: 8px;
    bottom: 60px;
  }
  .speed-cluster {
    gap: 10px;
    padding: 6px 10px;
  }
  .speed-num {
    font-size: 37px;
  }
  .pos-value {
    font-size: 26px;
  }
  .time-value {
    font-size: 17px;
  }
  .pos-time-row {
    gap: 10px;
  }
  .hud-rem {
    font-size: 10px;
  }
  .lobby-players {
    grid-template-columns: 1fr 1fr;
  }
  .split-controls-hint {
    font-size: 7px;
    max-width: 46%;
  }
  .split-pane-hud {
    gap: 5px;
    padding: 5px;
  }
  .split-pane-hud.p1 {
    left: 4px;
  }
  .split-pane-hud.p2 {
    right: 4px;
  }
}
@media (pointer: coarse) {
  body:has(#race-hud:not(.hidden)) #touch-drive {
    display: flex;
    position: fixed;
    bottom: 10px;
    left: 3%;
    right: 3%;
    z-index: 16;
    gap: 8px;
  }
  #touch-drive button {
    touch-action: none;
    padding: 11px 14px;
    color: white;
    background: #1a2525db;
    border: 1px solid #c8c1a5;
    border-radius: 3px;
    font-weight: 700;
  }
  #touch-drive button:nth-child(3) {
    margin-left: auto;
  }
  .hud-bottom-left,
  .hud-bottom-right {
    bottom: 65px;
  }
}
@media (max-height: 570px) {
  #landing {
    padding: 60px 4vw 65px;
  }
  .run-strip {
    padding-block: 8px;
    min-height: 50px;
  }
  .race-title {
    font-size: 62px;
  }
  .event-line {
    margin-bottom: 8px;
  }
  .race-menu {
    margin-top: 10px;
  }
  .run-route {
    font-size: 16px;
  }
  .top-bar {
    top: 9px;
  }
  .race-title span {
    display: inline;
    margin-left: 10px;
  }
}
@media (max-height: 420px) {
  #landing {
    justify-content: flex-start;
  }
  .run-strip {
    position: static;
    margin-top: 12px;
    width: 100%;
  }
  .hero-left {
    flex: none;
  }
  .race-title {
    font-size: 48px;
  }
}
#lobby-modal {
  background:
    linear-gradient(#121815c9, #121815ed),
    url('/art/bypass.jpg') center/cover;
}
#patrol-hud {
  width: 235px;
  background: #172229ef;
  border-left: 3px solid #6ac5ef;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  font: 700 10px var(--mono);
}
#patrol-hud strong {
  color: #86d2f4;
  font-size: 9px;
}
#patrol-hud small {
  grid-column: 1/-1;
  color: #e7dfcc;
  font-size: 9px;
}
#patrol-hud:not(.hidden) + #hud-rival-gap {
  display: none;
}
@media (max-width: 600px) {
  #patrol-hud {
    width: 155px;
    grid-template-columns: 1fr;
  }
}
@media (pointer: coarse) and (max-width: 440px) {
  #touch-drive {
    gap: 4px;
  }
  #touch-drive button {
    padding: 11px 8px;
    flex: 1;
  }
}
.roam-entry{margin-top:6px;display:flex;align-items:center;justify-content:space-between;border:1px solid #b6d7ca90;background:#193a34e8;color:#fff1d1;padding:12px 16px;text-transform:uppercase;text-decoration:none;font:800 13px var(--mono);letter-spacing:.05em}.roam-entry small{color:#a8dcc7;font:700 9px var(--mono);letter-spacing:.09em}.roam-entry:hover,.roam-entry:focus-visible{border-color:#f2ce73;background:#265045}
@media(max-height:530px){.roam-entry{padding-block:7px}}
.duel-entry{background:#493b23ed;border-color:#cfab6680}.duel-entry small{color:#f5cc76}.duel-entry:hover{background:#59492d}
