:root {
  --ink: #f6eaf0;
  --dim: rgba(246, 234, 240, 0.6);
  --panel: rgba(28, 18, 36, 0.66);
  --accent: #ff8a5c;
  --accent2: #ff4f7b;
  --ui: 1.35;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c1226; color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif; user-select: none; }
#app canvas { display: block; }
.dim { color: var(--dim); font-size: 12px; }
.off { display: none !important; }
.gone { display: none !important; }
.hud { text-shadow: 0 1px 3px #000a; transform: scale(var(--s, 1.35)); }
#hud-tl, #room, #telemetry { transform-origin: top left; }
#fps, #mapwrap { transform-origin: top right; }
#hud-br { transform-origin: bottom right; }
#hud-bl { transform-origin: bottom left; }
#errbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 60; max-width: 80vw; padding: 8px 16px; border-radius: 8px;
  background: rgba(120,10,30,.9); color: #fff; font: 13px/1.4 Consolas, monospace; }

#loading { position: fixed; inset: 0; overflow: hidden; z-index: 50; transition: opacity .5s;
  background: linear-gradient(180deg, #24103e 0%, #6b2a74 30%, #e0507a 52%, #ff9a5c 64%, #ffd08a 71%, #1c1226 71.2%); }
/* everything below is a CSS animation on transform/opacity, so it keeps moving while the page is busy building the world */
.ld-sun { position: absolute; left: 50%; top: 40%; width: 30vmin; height: 30vmin; margin-left: -15vmin; border-radius: 50%;
  background: linear-gradient(180deg, #fff1b0 0%, #ffb35c 45%, #ff4f7b 100%); box-shadow: 0 0 9vmin rgba(255,140,90,.7);
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 70%, transparent 70% 76%); mask: repeating-linear-gradient(180deg, #000 0 70%, transparent 70% 76%);
  -webkit-mask-size: 100% 100%; animation: ldSun 6s ease-in-out infinite alternate; }
@keyframes ldSun { from { transform: translateY(0); } to { transform: translateY(2.2vmin); } }
.ld-hills { position: absolute; left: 0; right: 0; top: 54%; height: 18%; background: linear-gradient(180deg, #3a1450, #1c0c2c);
  clip-path: polygon(0 100%, 0 60%, 7% 38%, 15% 58%, 27% 20%, 38% 55%, 50% 32%, 62% 60%, 74% 22%, 86% 54%, 94% 38%, 100% 52%, 100% 100%); }
.ld-road { position: absolute; left: 0; right: 0; bottom: 0; height: 28.8%; background: linear-gradient(180deg, #3a2f46, #1d1726 70%); }
.ld-road::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,200,140,.5); }
.ld-lines { position: absolute; left: 0; top: 52%; width: 200%; height: 1.1vmin; background: repeating-linear-gradient(90deg, #ffd27a 0 9vmin, transparent 9vmin 22vmin); animation: ldLines .9s linear infinite; }
@keyframes ldLines { from { transform: translateX(0); } to { transform: translateX(-22vmin); } }
.ld-lane { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; pointer-events: none; }
.ld-car { position: absolute; left: 0; bottom: calc(19% - 2.2vmin); width: 46vmin; aspect-ratio: 1240 / 500; will-change: transform; animation-duration: 8s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.ld-car::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 7%; height: 9%; background: radial-gradient(ellipse at center, rgba(0,0,0,.55), transparent 70%); z-index: -1; }
.ld-car.right { animation-name: ldRunR; animation-delay: -1.7s; }     /* already driving when the screen appears */
.ld-car.left { animation-name: ldRunL; }
@keyframes ldRunR { 0% { transform: translateX(-50vmin); } 46% { transform: translateX(calc(100vw + 4vmin)); } 100% { transform: translateX(calc(100vw + 4vmin)); } }
@keyframes ldRunL { 0%, 50% { transform: translateX(calc(100vw + 4vmin)) scaleX(-1); } 96% { transform: translateX(-50vmin) scaleX(-1); } 100% { transform: translateX(-50vmin) scaleX(-1); } }
.ld-flip { position: absolute; inset: 0; animation: ldBob .42s ease-in-out infinite alternate; }
@keyframes ldBob { from { transform: translateY(0); } to { transform: translateY(-.35vmin); } }
.ld-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ld-wh { position: absolute; aspect-ratio: 1; animation: ldSpin .34s linear infinite; }
@keyframes ldSpin { to { transform: rotate(360deg); } }
.ld-text { position: absolute; left: 0; right: 0; top: 12%; text-align: center; font-size: 3.2vmin; letter-spacing: 1.2vmin; font-weight: 300; color: #ffe9d6; text-shadow: 0 0 2vmin rgba(255,138,92,.8); }
.ld-text span { animation: ldDot 1.2s infinite; opacity: .2; } .ld-text span:nth-child(2) { animation-delay: .2s; } .ld-text span:nth-child(3) { animation-delay: .4s; }
@keyframes ldDot { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }
/* the studio credit fades in and out, quickly, over and over while the world builds (pure CSS, so it keeps animating while the page is busy) */
.ld-credit { position: absolute; left: 0; right: 0; top: 24%; text-align: center; font-size: 2.6vmin; letter-spacing: .9vmin; text-transform: uppercase; font-weight: 300; color: #ffe9d6; opacity: 0;
  text-shadow: 0 0 2vmin rgba(255,138,92,.8); animation: ldCredit 2.6s ease-in-out infinite; }
.ld-credit b { font-weight: 700; letter-spacing: 1.1vmin; color: #fff; }
@keyframes ldCredit { 0% { opacity: 0; transform: translateY(1vmin); } 24% { opacity: 1; transform: none; } 62% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-.6vmin); } }
#loading.hide { opacity: 0; pointer-events: none; }

/* ---------- start screen ---------- */
#start { position: fixed; inset: 0; display: grid; place-items: center; z-index: 40; overflow: auto;
  background: linear-gradient(180deg, rgba(28,18,38,.1), rgba(28,18,38,.45)); transition: opacity .5s; }
#start.hide { opacity: 0; pointer-events: none; }
#start .card { text-align: center; padding: 26px 40px; background: rgba(28, 18, 36, 0.86); border-radius: 14px; max-width: 96vw; }
#start h1 { margin: 0 0 8px; letter-spacing: 10px; font-weight: 300; }
#start p { margin: 6px 0; }
.startcols { display: flex; gap: 34px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.pad { max-width: 440px; } .pad svg { max-width: 100%; height: auto; }
.lobby { display: grid; gap: 10px; width: 280px; }
.lobby button, .lobby input { font: inherit; font-size: 15px; padding: 9px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: var(--ink); }
.lobby button { cursor: pointer; letter-spacing: 1px; }
.lobby button:hover { background: rgba(255,138,92,.25); }
.lobby button.primary { background: rgba(255,138,92,.35); border-color: rgba(255,138,92,.6); }
.lobby input { user-select: text; }
.lname { display: grid; gap: 4px; text-align: left; font-size: 12px; color: var(--dim); }
#lmsg { min-height: 18px; font-size: 13px; color: #ffc9a8; }

/* ---------- top-left: controller, room ---------- */
#hud-tl { position: fixed; top: 12px; left: 14px; font-size: 13px; color: var(--dim); }
#room { position: fixed; top: 44px; left: 14px; font-size: 13px; line-height: 1.6; background: var(--panel); padding: 8px 12px; border-radius: 8px; }
#room .rcode { letter-spacing: 1px; }
#room .rcode b { letter-spacing: 3px; color: #ffd9c8; font-size: 15px; }
#room .rp { color: #b9fff0; }
#room .rhost { margin-left: 6px; padding: 0 5px; font-size: 10px; letter-spacing: 2px; color: #ff5fd2; border: 1px solid rgba(255,95,210,.55); border-radius: 3px; vertical-align: 1px; }
#room .rp.dead { color: rgba(255,255,255,.35); text-decoration: line-through; }
@media (max-width: 600px) and (min-height: 501px) { #room { top: 250px; font-size: 12px; max-width: calc(100vw - 28px); } }   /* phone upright: the 230px minimap owns the top right, so the list sits under it */

/* ---------- top-center: combat ---------- */
#combat { position: fixed; top: 12px; left: 50%; transform: translateX(-50%) scale(var(--s, 1.35)); transform-origin: top center; text-align: center; }
#hp { display: flex; gap: 6px; justify-content: center; }
#hp i { width: 38px; height: 10px; border-radius: 3px; background: #ff5a6e; box-shadow: 0 0 8px #ff3a5a88; transition: background .2s, box-shadow .2s; }
#hp i.lost { background: rgba(255,255,255,.14); box-shadow: none; }
#hp i.x { background: #ffd24a; box-shadow: 0 0 8px #ffd24a99; }
#cstats { margin-top: 6px; font-size: 14px; letter-spacing: 1px; color: var(--dim); }
#wanted { margin-left: 6px; font-weight: 600; }
#wanted.w1 { color: #6ea8ff; text-shadow: 0 0 8px #2f6bff; }
#wanted.w2 { color: #ffb347; text-shadow: 0 0 8px #ff8a00; }
#wanted.w3 { color: #ff5a6e; text-shadow: 0 0 10px #ff1a3a; animation: blink .5s infinite alternate; }
#flip { margin-top: 8px; font-size: 16px; font-weight: 700; letter-spacing: 2px; color: #fff; background: rgba(200,20,50,.82); padding: 5px 14px; border-radius: 8px; animation: blink .45s infinite alternate; }
#cp { margin-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
#cptxt { font-size: 13px; letter-spacing: 2px; color: #b9fff0; }
@keyframes blink { from { opacity: .45; } to { opacity: 1; } }

/* ---------- top-right: minimap ---------- */
#mapwrap { position: fixed; top: 10px; right: 12px; width: 230px; height: 230px; }
#mapwrap .mapring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12), inset 0 0 40px rgba(255,138,92,.18); }

/* ---------- bottom-right: abilities, speed ---------- */
#hud-br { position: fixed; right: 20px; bottom: 16px; width: 270px; }
#abil { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 10px; }
.chip { position: relative; width: 82px; padding: 6px 4px 9px; border-radius: 10px; text-align: center; background: var(--panel);
  border: 1px solid rgba(255,255,255,.14); overflow: hidden; }
.chip .glyph { font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: 1px; }
.chip .nm { font-size: 10px; letter-spacing: 2px; color: var(--dim); }
.chip .cbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.1); }
.chip .cbar i { display: block; height: 100%; width: 0; background: rgba(255,255,255,.4); }
.chip.ready { border-color: rgba(120,255,160,.7); box-shadow: 0 0 14px rgba(120,255,160,.25); }
.chip.ready .cbar i { background: #7dffa6; }
.chip.cool .cbar i { background: #ffb347; }
.chip.on { border-color: #8ce6ff; box-shadow: 0 0 16px #8ce6ff88; }
.chip.on .cbar i { background: #8ce6ff; }
.chip.empty { opacity: .6; }
.chip.air { border-color: #8cc4ff; box-shadow: 0 0 16px #8cc4ff99, inset 0 0 12px #8cc4ff33; }
.chip.air .cbar i { background: #8cc4ff; }
.chip.air .nm { color: #cfe5ff; letter-spacing: 1px; }
#ch-rocket .glyph { color: #ffb08a; } #ch-boost .glyph { color: #ff8a9a; } #ch-jump .glyph { color: #8cc4ff; }
.speedrow { display: flex; align-items: flex-end; justify-content: flex-end; gap: 16px; }
.speedbox { text-align: right; }
#spd { font-size: 64px; font-weight: 200; line-height: 1; font-variant-numeric: tabular-nums; }
#unit { font-size: 11px; letter-spacing: 3px; color: var(--dim); }
.gearbox { text-align: center; padding-bottom: 4px; }
#gear { font-size: 34px; font-weight: 600; color: var(--accent); line-height: 1; }
.gtag { font-size: 9px; letter-spacing: 2px; color: var(--dim); }
.rpmbar { position: relative; height: 7px; margin-top: 8px; background: rgba(255,255,255,.14); border-radius: 3px; overflow: hidden; }
#rpmfill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ffd0b0, var(--accent)); }
#rpmfill.red { background: var(--accent2); }
#redzone { position: absolute; top: 0; bottom: 0; right: 0; background: rgba(255,60,90,.35); }
#rpmtxt { font-size: 11px; color: var(--dim); text-align: right; margin-top: 3px; font-variant-numeric: tabular-nums; }
.badges { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }
.badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.25); letter-spacing: 1px; }
.badge.on { color: var(--ink); border-color: rgba(255,255,255,.4); }
.badge.active { background: #ffb347; color: #201020; border-color: #ffb347; }

/* ---------- bottom-left: optional input readout ---------- */
#hud-bl { position: fixed; left: 18px; bottom: 20px; display: flex; gap: 14px; align-items: flex-end; }
.gmeter { position: relative; width: 70px; height: 70px; border-radius: 50%; background: rgba(20,12,28,.4); }
.gmeter .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); }
.gmeter .r2 { inset: 17px; }
#gdot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); left: 50%; top: 50%; }
.inputs { width: 150px; }
.hbar { position: relative; height: 8px; background: rgba(255,255,255,.12); border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.hbar.thin { height: 4px; }
.hbar .mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.4); }
#steerfill { position: absolute; top: 0; bottom: 0; background: #ffe0cf; }
#wheelfill { position: absolute; top: 0; bottom: 0; background: var(--accent); }
.pedals { display: flex; gap: 6px; align-items: flex-end; margin-top: 6px; }
.vbar { position: relative; width: 14px; height: 46px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
.vbar div { position: absolute; left: 0; right: 0; bottom: 0; }
.thr div { background: #8ef0b0; }
.brk div { background: var(--accent2); }
#hbk { font-size: 10px; padding: 2px 5px; border-radius: 3px; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.3); }
#hbk.on { background: #ffb347; color: #201020; }

/* ---------- toast, fps, telemetry ---------- */
#toast { position: fixed; top: 17%; left: 50%; transform: translateX(-50%) scale(var(--s, 1.35)); transform-origin: top center; padding: 11px 26px; border-radius: 26px;
  background: var(--panel); font-size: 21px; font-weight: 600; letter-spacing: 1px; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; }
#toast.show { opacity: 1; }
#fps { position: fixed; top: 330px; right: 16px; font: 12px/1.4 Consolas, monospace; color: var(--dim); text-align: right; display: none; }
#fps.show { display: block; }
#fpsgraph { display: block; margin-top: 4px; margin-left: auto; background: rgba(20,12,28,.5); border-radius: 4px; }
#telemetry { position: fixed; top: 60px; left: 14px; font: 12px/1.5 Consolas, monospace; background: var(--panel); padding: 8px 10px; border-radius: 8px; display: none; }
#telemetry.show { display: block; }
#telemetry td, #telemetry th { padding: 0 6px; text-align: right; }
#telemetry tr.hot td { color: #ffb347; }

/* ---------- help, menu ---------- */
#help { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(24,14,32,.9); padding: 22px 30px; border-radius: 12px; display: none; z-index: 30; font-size: 16px; }
#help.show { display: block; }
#help h2 { margin: 0 0 10px; font-weight: 300; letter-spacing: 4px; }
#help td, #help th { padding: 5px 16px 5px 0; font-size: 16px; text-align: left; }
#help th { color: var(--dim); font-weight: 400; }
#menu { position: fixed; right: 0; top: 0; bottom: 0; width: 480px; font-size: 15px; background: rgba(22,13,30,.92); padding: 16px 0;
  transform: translateX(105%); transition: transform .2s; z-index: 44; display: flex; flex-direction: column; }
#menu.show { transform: none; }
.menu-head { padding: 0 18px 10px; letter-spacing: 3px; font-size: 15px; }
.menu-head .dim { display: block; letter-spacing: 0; margin-top: 4px; }
#menu-list { overflow-y: auto; flex: 1; padding-bottom: 30px; }
.sec { padding: 12px 18px 4px; font-size: 11px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; }
.row { display: grid; grid-template-columns: 1fr 110px 90px; align-items: center; gap: 8px; padding: 6px 18px; font-size: 15px; cursor: pointer; }
.row.action { grid-template-columns: 1fr 70px; }
.row:not(:has(input)) { grid-template-columns: 1fr auto; }
.row.focus { background: rgba(255,138,92,.18); box-shadow: inset 3px 0 0 var(--accent); }
.row .val { text-align: right; font-variant-numeric: tabular-nums; color: #ffd9c8; }
.row input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- damage flash, end screens ---------- */
#hurt { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(255,20,40,.55) 100%); }
#hurt.on { opacity: 1; transition: none; }
#gameover { position: fixed; inset: 0; display: none; place-items: center; z-index: 25; background: rgba(30,6,14,.4); }
#gameover.show { display: grid; }
#gameover .card { position: relative; text-align: center; padding: 26px 56px; background: rgba(28, 18, 36, 0.86); border-radius: 14px; transform: scale(var(--s, 1.35)); }
#gameover h1 { margin: 0 0 8px; letter-spacing: 12px; font-weight: 300; color: #ff6a7a; }
#gameover.win { background: radial-gradient(circle at 50% 40%, rgba(60,255,200,.18), rgba(20,8,40,.55)); }
#gameover.win .card { border: 2px solid rgba(255,255,255,.2); box-shadow: 0 0 60px rgba(120,255,220,.35); animation: bob 1.6s ease-in-out infinite; }
#gameover.win h1 { font-weight: 900; letter-spacing: 8px; font-size: 44px;
  background: linear-gradient(90deg, #ff5a7a, #ffb347, #ffe14a, #54f0a0, #54b8ff, #b074ff, #ff5a7a); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: rainbow 2.2s linear infinite; }
#gofun { color: #ffe9a8; font-size: 15px; min-height: 20px; }
#confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@keyframes rainbow { to { background-position: 300% 0; } }
@keyframes bob { 0%, 100% { transform: scale(var(--s, 1.35)) translateY(0) rotate(-0.6deg); } 50% { transform: scale(var(--s, 1.35)) translateY(-8px) rotate(0.6deg); } }

/* ---------- crosshair (where the rocket goes) ---------- */
#xhair { position: fixed; left: 50%; top: 40%; width: var(--xs, 16px); height: var(--xs, 16px); transform: translate(-50%, -50%); pointer-events: none;
  border: 2px solid rgba(255,255,255,.8); border-radius: 50%; box-shadow: 0 0 6px #000a, inset 0 0 4px #0008; z-index: 5; }
#xhair::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #ff8a5c; }

.lobby button.focus, .lobby input.focus { outline: 2px solid var(--accent); outline-offset: 2px; background: rgba(255,138,92,.28); }

/* ---------- "click to begin" screen ---------- */
#ready { position: fixed; inset: 0; z-index: 42; display: grid; place-items: center; overflow: auto; background: radial-gradient(circle at 50% 40%, rgba(40,20,60,.5), rgba(14,8,24,.72)); }
#ready .card { background: rgba(18,10,28,.5); border-radius: 18px; backdrop-filter: blur(2px); }
#ready .card { text-align: center; padding: 20px 28px; max-width: 96vw; }
#ready h2 { margin: 0 0 6px; font-weight: 300; letter-spacing: 10px; }
#ready svg { max-width: 92vw; height: auto; filter: drop-shadow(0 8px 30px rgba(255,138,92,.25)); }
#ready .keyline { margin-top: 6px; }
#beginprompt { margin-top: 18px; font-size: 24px; letter-spacing: 4px; color: #ffe2cf; animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }

#xhair.danger { border-color: #ff4a4a; box-shadow: 0 0 10px #ff2a2a, inset 0 0 4px #0008; }
#xhair.danger::after { background: #ff4a4a; }

#reloadbar { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 55; padding: 10px 18px; border-radius: 10px; background: rgba(28,18,36,.88); font-size: 15px; text-align: center; letter-spacing: 1px; }
#reloadbar > div { margin-top: 8px; height: 6px; width: 220px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
#reloadfill { display: block; height: 100%; width: 0; background: #ff8a5c; }

/* developer quick menu */
#devmenu { position: fixed; left: 18px; top: 30%; width: 300px; padding: 10px 12px; border-radius: 12px; background: rgba(20,12,30,.86); border: 1px solid rgba(255,138,92,.5);
  font-size: 14px; transform-origin: top left; display: none; z-index: 45; }
#devmenu.show { display: block; }
#devmenu .dvh { font-weight: 700; letter-spacing: 3px; color: var(--accent); margin-bottom: 6px; }
#devmenu .dvh .dim { display: block; letter-spacing: 0; font-weight: 400; font-size: 11px; margin-top: 2px; }
#devmenu .dvr { display: flex; justify-content: space-between; gap: 10px; padding: 4px 8px; border-radius: 6px; }
#devmenu .dvr.f { background: rgba(255,138,92,.28); }
#devmenu .dvr b { color: #ffe0cf; font-weight: 600; }

/* a little arrow cursor in the game's colours (and none at all while you're on a controller) */
html, body, button, .row { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 2 L27 14 L15.5 17 L12 29 Z' fill='%23ff8a5c' stroke='%231c1226' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M7 7 L20 13.2 L13.6 14.9 Z' fill='%23ffd9c8' opacity='.7'/%3E%3C/svg%3E") 3 2, auto; }
button, .row, .lobby button, input[type=range], select { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 2 L27 14 L15.5 17 L12 29 Z' fill='%2345ffd0' stroke='%231c1226' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M7 7 L20 13.2 L13.6 14.9 Z' fill='%23ffffff' opacity='.7'/%3E%3C/svg%3E") 3 2, pointer; }
html.nocursor, html.nocursor *, html.nocursor body { cursor: none !important; }

/* the world dims behind menus and pause; shot changes dip through black */
#dim { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .45s; background: radial-gradient(ellipse at center, rgba(16,8,28,.2), rgba(16,8,28,.5)); }
#dim.on { opacity: 1; }
#dim.on.fight { opacity: .45; }      /* main menu: the rocket fight behind it should be easy to see */
#shotfade { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: #0c0714; transition: opacity .55s; z-index: 1; }
#shotfade.on { opacity: 1; }

#buff { margin-top: 8px; font-size: 16px; font-weight: 700; letter-spacing: 2px; color: #0c1a24; background: linear-gradient(90deg, #6ae8ff, #ffe14a); padding: 4px 14px; border-radius: 8px; box-shadow: 0 0 14px rgba(106,232,255,.6); }

body.nohud .hud:not(#toast), body.nohud #xhair { visibility: hidden !important; }

.ld-flip, .ld-wh, .ld-lines, .ld-sun { will-change: transform; }

#spec { margin-top: 8px; font-size: 14px; letter-spacing: 1px; padding: 6px 14px; border-radius: 10px; background: rgba(20,12,32,.7); color: #ffe9d6; max-width: 90vw; white-space: nowrap; }
body.watching #hud-br, body.watching #xhair, body.watching #hud-bl, body.watching #hp { display: none !important; }

.ld-hint { position: absolute; left: 0; right: 0; bottom: 5%; text-align: center; font-size: 2.4vmin; letter-spacing: .6vmin; color: #ffe9d6; opacity: 0; transition: opacity .6s; }
.ld-hint.show { opacity: .85; }

#xhair.lock { border-color: #ff3a3a; box-shadow: 0 0 12px #ff2020, inset 0 0 6px #ff2020aa; transform: translate(-50%, -50%) scale(1.25); }
#xhair.lock::after { background: #ff3a3a; width: 6px; height: 6px; margin: -3px; }
#lockmark { position: fixed; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 3px solid #ff3030; border-radius: 6px; transform: rotate(45deg); box-shadow: 0 0 14px #ff2020, inset 0 0 10px #ff202066;
  pointer-events: none; display: none; z-index: 6; animation: lockpulse .35s infinite alternate; }
@keyframes lockpulse { from { opacity: .55; transform: rotate(45deg) scale(1.0); } to { opacity: 1; transform: rotate(45deg) scale(0.88); } }

#cparrow { width: 120px; height: 86px; }   /* empty slot: the 3D arrow (main.js) is drawn into it */

#boomflash { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 7; background: radial-gradient(ellipse at center, rgba(255,246,220,.95), rgba(255,170,90,.55) 55%, rgba(255,90,30,.25)); }

#winbar { margin-top: 8px; font-size: 13px; letter-spacing: 1px; padding: 5px 12px; border-radius: 10px; background: rgba(20,12,32,.62); color: #ffe9d6; white-space: nowrap; }

#wanted.w0 { color: #9dffcf; text-shadow: 0 0 8px #2fff9a; animation: blink .9s infinite alternate; }

/* ---- garage (car select) ---- */
#garage { position: fixed; inset: 0; z-index: 46; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #3a1f4a, #0e0816); transition: opacity .25s; overflow: auto; }
#garage.off { opacity: 0; pointer-events: none; visibility: hidden; }
#garage .gcard { text-align: center; padding: 18px 28px; max-width: 96vw; color: #ffe9d6; }
#garage h2 { margin: 0 0 6px; letter-spacing: 8px; font-weight: 300; }
.gstage { display: flex; align-items: center; justify-content: center; gap: 12px; }
#gview { width: min(640px, 70vw); height: min(320px, 36vh); }
.gnav { font-size: 26px; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.gnav:hover { background: rgba(255,138,92,.35); }
#gname { font-size: 34px; letter-spacing: 3px; margin-top: 4px; }
#gname.swap { animation: gswap .35s ease-out; }
@keyframes gswap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#gdrive { color: #ff9a7a; letter-spacing: 3px; font-size: 14px; margin: 2px 0 6px; }
#gcolor { font-size: 13px; letter-spacing: 2px; opacity: .8; margin-bottom: 4px; }
#gblurb { max-width: 520px; margin: 4px auto 10px; opacity: .85; min-height: 40px; }
#gstats { width: 360px; max-width: 80vw; margin: 0 auto 10px; display: grid; gap: 6px; }
.grow { display: flex; align-items: center; gap: 10px; }
.glab { width: 82px; text-align: right; font-size: 12px; letter-spacing: 2px; opacity: .8; }
.gbar { flex: 1; height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.gbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff9a5a, #ff4f8a); transition: width .35s; }
#gdots { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.gdot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: transparent; cursor: pointer; padding: 0; }
.gdot.on { background: #ff8a5c; border-color: #ff8a5c; }
.gbtns { display: flex; gap: 12px; justify-content: center; margin: 6px 0; }
.gbtns button { font: inherit; font-size: 16px; padding: 9px 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; letter-spacing: 1px; }
.gbtns button.primary { background: rgba(255,138,92,.55); border-color: rgba(255,170,130,.6); }
.gbtns button:hover { background: rgba(255,138,92,.4); }

/* ---- drift score ---- */
#drift { position: fixed; left: 5.5%; bottom: 30%; z-index: 9; font-style: italic; font-weight: 800; letter-spacing: 2px; color: #fff; pointer-events: none;
  text-shadow: 0 0 14px rgba(255,140,90,.9), 0 2px 0 rgba(0,0,0,.45); transform-origin: left bottom; transition: opacity .25s; }
#drift.off { opacity: 0; }
#drift #dlabel { font-size: 15px; letter-spacing: 6px; color: #ffd7b5; }
#drift #dpts { font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
#drift #dmult { font-size: 28px; color: #ffb35a; margin-top: 2px; }
#drift.live #dpts { animation: dpulse .5s ease-in-out infinite alternate; }
@keyframes dpulse { from { transform: scale(1); } to { transform: scale(1.06); } }
#drift.m2 #dmult { color: #ffd23a; } #drift.m3 #dmult { color: #ff8a3a; } #drift.m4 #dmult { color: #ff4f7a; text-shadow: 0 0 16px #ff4f7a; } #drift.m5 #dmult { color: #c26bff; text-shadow: 0 0 18px #c26bff; }
#drift.stunt #dlabel { color: #7dffe0; text-shadow: 0 0 14px #2affc8; animation: dpulse .25s ease-in-out infinite alternate; }
#drift.lost #dpts, #drift.lost #dlabel { color: #ff5a5a; text-shadow: 0 0 12px #ff2a2a; }
#dtotal { position: fixed; left: 5.5%; bottom: 25%; z-index: 9; font-size: 13px; letter-spacing: 3px; color: #ffe9d6; opacity: .8; text-shadow: 0 1px 2px #000; pointer-events: none; }
body.nohud #drift, body.nohud #dtotal { display: none; }

/* ---- sun / moon optics: glow veil, rays, anamorphic streak, lens ghosts ---- */
#optics { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .3s; --sx: 50%; --sy: 30%; --a: 0; --r: 255; --g: 220; --b: 170; }
#optics.on { opacity: 1; }
#opt-veil { position: absolute; inset: 0; mix-blend-mode: screen;
  background: radial-gradient(circle at var(--sx) var(--sy), rgba(var(--r),var(--g),var(--b),calc(var(--a) * 0.62)) 0%, rgba(var(--r),calc(var(--g) - 40),calc(var(--b) - 50),calc(var(--a) * 0.28)) 22%, rgba(var(--r),calc(var(--g) - 60),calc(var(--b) - 80),calc(var(--a) * 0.08)) 48%, transparent 72%); }
#opt-rays { position: absolute; left: var(--sx); top: var(--sy); width: 230vmax; height: 230vmax; margin: -115vmax 0 0 -115vmax; mix-blend-mode: screen; opacity: calc(var(--a) * 0.55);
  background: repeating-conic-gradient(from 0deg, rgba(var(--r),var(--g),var(--b),.55) 0deg 0.9deg, rgba(var(--r),var(--g),var(--b),0) 0.9deg 3.1deg, rgba(var(--r),var(--g),var(--b),.3) 3.1deg 3.6deg, rgba(var(--r),var(--g),var(--b),0) 3.6deg 6.3deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.5) 7%, transparent 22%); mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.5) 7%, transparent 22%); }
#opt-streak { position: absolute; left: calc(var(--sx) - 40vw); top: calc(var(--sy) - 2px); width: 80vw; height: 4px; mix-blend-mode: screen; opacity: calc(var(--a) * 0.75); filter: blur(1.5px);
  background: linear-gradient(90deg, transparent, rgba(var(--r),var(--g),var(--b),.0) 8%, rgba(var(--r),var(--g),var(--b),.85) 50%, rgba(var(--r),var(--g),var(--b),.0) 92%, transparent); }
#opt-halo { position: absolute; left: var(--sx); top: var(--sy); width: 36vmin; height: 36vmin; margin: -18vmin 0 0 -18vmin; border-radius: 50%; mix-blend-mode: screen; opacity: 0;
  border: 2px solid rgba(200,215,255,.5); box-shadow: 0 0 22px rgba(190,205,255,.35), inset 0 0 22px rgba(190,205,255,.25); }
.opt-ghost { position: absolute; border-radius: 50%; mix-blend-mode: screen; opacity: 0; }

/* ---- drift tiers: the counter changes colour the longer one drift lasts ---- */
#drift.tier1 #dlabel { color: #ffe08a; } #drift.tier1 #dpts { text-shadow: 0 0 16px rgba(255,200,60,.95), 0 2px 0 rgba(0,0,0,.45); }
#drift.tier2 #dlabel { color: #ff9ac8; } #drift.tier2 #dpts { color: #ffd6ea; text-shadow: 0 0 20px rgba(255,60,150,1), 0 0 40px rgba(255,60,150,.6), 0 2px 0 rgba(0,0,0,.45); }
#drift.tier3 #dlabel { color: #9ff6ff; } #drift.tier3 #dpts { color: #d9fcff; text-shadow: 0 0 22px rgba(40,230,255,1), 0 0 46px rgba(40,230,255,.7), 0 2px 0 rgba(0,0,0,.45); transform-origin: left bottom; animation: dshake .12s linear infinite; }
#drift.tier4 #dlabel { animation: drainbow 1.2s linear infinite; font-size: 18px; }
#drift.tier4 #dpts { font-size: 58px; animation: drainbow 1.2s linear infinite, dshake .09s linear infinite; text-shadow: 0 0 24px currentColor, 0 2px 0 rgba(0,0,0,.5); }
#drift.tier4 #dmult { animation: drainbow 1.2s linear infinite; }
@keyframes drainbow { 0% { color: #ff4f4f; } 17% { color: #ffd23a; } 34% { color: #5dff7a; } 51% { color: #2affe8; } 68% { color: #5a8bff; } 85% { color: #d65aff; } 100% { color: #ff4f4f; } }
@keyframes dshake { 0% { transform: translate(0,0); } 25% { transform: translate(1.5px,-1px); } 50% { transform: translate(-1px,1.5px); } 75% { transform: translate(1px,1px); } 100% { transform: translate(0,0); } }

/* ---- over-the-top screen effects for long drifts (anime speed lines, halftone dots, comic stickers) ---- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
#fx-speed { position: absolute; inset: -20%; opacity: 0; transition: opacity .4s; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,0) 0deg 1.4deg, rgba(255,255,255,.75) 1.4deg 1.9deg, rgba(255,255,255,0) 1.9deg 4.6deg, rgba(255,255,255,.4) 4.6deg 4.9deg, rgba(255,255,255,0) 4.9deg 7.7deg);
  -webkit-mask-image: radial-gradient(circle, transparent 34%, rgba(0,0,0,.55) 52%, #000 80%); mask-image: radial-gradient(circle, transparent 34%, rgba(0,0,0,.55) 52%, #000 80%); animation: fxspin .09s steps(2) infinite; }
@keyframes fxspin { from { transform: rotate(0deg) scale(1); } to { transform: rotate(1.2deg) scale(1.01); } }
#fx-dots { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; mix-blend-mode: multiply;
  background: radial-gradient(circle, rgba(255,40,120,.9) 22%, transparent 25%) 0 0 / 16px 16px;
  -webkit-mask-image: radial-gradient(circle, transparent 45%, #000 100%); mask-image: radial-gradient(circle, transparent 45%, #000 100%); }
#fx-aura { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; box-shadow: inset 0 0 120px 20px rgba(255,255,255,.0); }
#fx.t2 #fx-speed { opacity: .22; } #fx.t3 #fx-speed { opacity: .5; } #fx.t4 #fx-speed { opacity: .8; }
#fx.t3 #fx-dots { opacity: .3; } #fx.t4 #fx-dots { opacity: .5; }
#fx.t4 #fx-aura { opacity: 1; animation: fxaura 1.6s linear infinite; }
@keyframes fxaura { 0% { box-shadow: inset 0 0 130px 30px rgba(255,60,90,.55); } 25% { box-shadow: inset 0 0 130px 30px rgba(255,210,60,.55); } 50% { box-shadow: inset 0 0 130px 30px rgba(60,255,160,.55); } 75% { box-shadow: inset 0 0 130px 30px rgba(80,140,255,.55); } 100% { box-shadow: inset 0 0 130px 30px rgba(255,60,90,.55); } }
.fx-sticker { position: absolute; transform: translate(-50%, -50%) rotate(var(--rot)) scale(0); font-family: Impact, 'Arial Black', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif; font-weight: 900; font-size: 46px; letter-spacing: 2px; color: #fff;
  -webkit-text-stroke: 7px #151018; paint-order: stroke fill; text-shadow: 4px 5px 0 var(--c), 0 0 18px var(--c); white-space: nowrap; animation: fxpop 1.9s cubic-bezier(.2,1.6,.4,1) forwards; }
.fx-sticker::before { content: ''; position: absolute; inset: -30px -44px; z-index: -1; background: var(--c); opacity: .9;
  clip-path: polygon(50% 0%, 61% 18%, 82% 6%, 78% 29%, 100% 32%, 84% 50%, 100% 68%, 78% 71%, 82% 94%, 61% 82%, 50% 100%, 39% 82%, 18% 94%, 22% 71%, 0% 68%, 16% 50%, 0% 32%, 22% 29%, 18% 6%, 39% 18%); }
.fx-sticker.big { font-size: 84px; -webkit-text-stroke: 10px #151018; animation-duration: 2.3s; }
@keyframes fxpop { 0% { transform: translate(-50%, -50%) rotate(var(--rot)) scale(0); opacity: 1; } 12% { transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.35); } 22% { transform: translate(-50%, -50%) rotate(calc(var(--rot) * -0.6)) scale(1); }
  70% { transform: translate(-50%, -58%) rotate(var(--rot)) scale(1.04); opacity: 1; } 100% { transform: translate(-50%, -80%) rotate(var(--rot)) scale(.9); opacity: 0; } }
body.nohud #fx { display: none; }

/* ---------- early-80s digital dash, the default HUD (body.hudb, off with ?hud=a; built by js/dashvfd.js): separate floating VFD pieces ---------- */
body.hudb #hud-br #abil, body.hudb #hud-br .speedrow, body.hudb #hud-br .rpmbar, body.hudb #rpmtxt, body.hudb #hud-br .badges { display: none; }
body.hudb #hud-br { width: 250px; }
#dashvfd, #vfd-bl { --vfd: #ff4fc8; --vfd-dim: rgba(255,79,200,.09); --amb: #ffb03a; --red: #ff3b4e; text-shadow: none;
  --cond: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif; }
#dashvfd { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
/* each piece is its own little smoked-glass display: grid printed on it, VFD dot mesh over it */
.vg { position: relative; overflow: hidden; border-radius: 4px;
  background: radial-gradient(ellipse at 50% 130%, rgba(52,16,58,.88), rgba(10,4,16,.86) 70%);
  box-shadow: inset 0 0 0 1px rgba(255,79,200,.14), 0 3px 10px rgba(0,0,0,.55); }
.vg::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, transparent 0 .6px, rgba(0,0,0,.35) .9px) 0 0 / 2px 2px,
    linear-gradient(rgba(255,79,200,.05) 1px, transparent 1px) 0 0 / 10px 10px, linear-gradient(90deg, rgba(255,79,200,.05) 1px, transparent 1px) 0 0 / 10px 10px; }
#dashvfd .cap { font: 700 8px/1 var(--cond); letter-spacing: 1.5px; color: var(--vfd); opacity: .75; margin-bottom: 3px; }
#dashvfd .cap small { font-size: 6.5px; letter-spacing: .5px; opacity: .8; }
#dashvfd .pair { display: flex; gap: 7px; align-items: stretch; }
#dashvfd .spdbox { width: 118px; padding: 6px 8px 5px; }
#dashvfd .spdsvg, #dashvfd .gearsvg, #dashvfd .tachsvg { width: 100%; display: block; }
#dashvfd .unit { font: 700 8px/1 var(--cond); letter-spacing: 2px; color: var(--amb); margin-top: 3px; text-align: right; }
#dashvfd .gearbox { width: 42px; padding: 6px 8px 5px; }
#dashvfd .d7 polygon { fill: rgba(255,176,58,.08); }
#dashvfd .d7.big polygon.on { fill: var(--amb); filter: drop-shadow(0 0 2.5px var(--amb)); }
#dashvfd .d7.red polygon { fill: rgba(255,59,78,.1); }
#dashvfd .d7.red polygon.on { fill: var(--red); filter: drop-shadow(0 0 2.5px var(--red)); }
#dashvfd .tach { width: 100%; padding: 6px 8px 4px; }
#dashvfd .tachsvg rect { fill: var(--vfd-dim); }
#dashvfd .tachsvg rect.red { fill: rgba(255,59,78,.12); }
#dashvfd .tachsvg rect.on { fill: var(--vfd); filter: drop-shadow(0 0 2px var(--vfd)); }
#dashvfd .tachsvg rect.on.red { fill: var(--red); filter: drop-shadow(0 0 2px var(--red)); }
#dashvfd .tachsvg text { fill: var(--vfd); opacity: .6; font: 600 8px var(--cond); text-anchor: middle; }
#dashvfd .lamps { display: flex; gap: 5px; }
#dashvfd .lamps i { font: normal 700 7.5px/1 var(--cond); letter-spacing: 1px; padding: 4px 6px; color: rgba(255,79,200,.25); }
#dashvfd .lamps i.on { color: var(--vfd); box-shadow: inset 0 0 0 1px rgba(255,79,200,.5), 0 0 6px rgba(255,79,200,.3); }
#dashvfd .lamps i.flash { color: #1a0d00; background: var(--amb); box-shadow: 0 0 8px var(--amb); }
#dashvfd .lamps i.warn { color: #fff; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink .25s infinite alternate; }
#vfd-bl { position: fixed; left: 18px; bottom: 18px; display: flex; gap: 9px; transform-origin: bottom left; }
body.watching #vfd-bl, body.touchui #vfd-bl { display: none !important; }
#vfd-bl .tile { width: 92px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; padding: 8px 8px 10px;
  color: rgba(255,79,200,.35); font: 700 8.5px/1 var(--cond); letter-spacing: 1.2px; }
#vfd-bl .tile .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
#vfd-bl .tile .tk { position: absolute; top: 4px; right: 6px; font-size: 8px; opacity: .85; }
#vfd-bl .tile .tb { position: absolute; left: 5px; right: 5px; bottom: 3px; height: 2px; background: rgba(255,79,200,.1); }
#vfd-bl .tile .tb u { display: block; height: 100%; width: 0; background: currentColor; }
#vfd-bl .tile.ready { color: var(--vfd); box-shadow: inset 0 0 0 1.5px var(--vfd), 0 0 10px rgba(255,79,200,.35); }
#vfd-bl .tile.ready .ic svg, #vfd-bl .tile.on .ic svg { filter: drop-shadow(0 0 2px currentColor); }
#vfd-bl .tile.cool { color: rgba(255,176,58,.75); box-shadow: inset 0 0 0 1px rgba(255,176,58,.35), 0 3px 10px rgba(0,0,0,.55); }
#vfd-bl .tile.on { color: #5ff2ff; box-shadow: inset 0 0 0 1.5px #5ff2ff, 0 0 12px rgba(95,242,255,.55); }
#vfd-bl .tile.air { color: #9fc8ff; box-shadow: inset 0 0 0 1.5px #9fc8ff, 0 0 12px rgba(140,190,255,.5); }
#vfd-bl .tile.empty { color: rgba(255,59,78,.65); box-shadow: inset 0 0 0 1px rgba(255,59,78,.35), 0 3px 10px rgba(0,0,0,.55); }
/* synthwave tach: bars run purple -> pink as revs climb (per-bar --t from dashvfd.js), redline stays sunset orange-red */
#dashvfd .tachsvg rect.on { fill: color-mix(in srgb, #ff4fc8 calc(var(--t) * 100%), #8a5cff); filter: drop-shadow(0 0 2px #ff4fc8); }
#dashvfd .tachsvg rect.on.red { fill: #ff6a3a; filter: drop-shadow(0 0 2.5px #ff6a3a); }
#dashvfd .tachsvg rect.red { fill: rgba(255,106,58,.12); }
#dashvfd .d7.red polygon.on { fill: #5ff2ff; filter: drop-shadow(0 0 2.5px #5ff2ff); }
#dashvfd .d7.red polygon { fill: rgba(95,242,255,.08); }
#dashvfd .cap { color: #ff9ae0; }
/* top centre: health as a pink VFD segment strip, kills / time as an amber readout, each on its own glass */
body.hudb #hp { gap: 3px; padding: 6px 8px; border-radius: 4px; background: radial-gradient(ellipse at 50% 130%, rgba(52,16,58,.88), rgba(10,4,16,.86) 70%);
  box-shadow: inset 0 0 0 1px rgba(255,79,200,.14), 0 3px 10px rgba(0,0,0,.55); }
body.hudb #hp i { width: 34px; height: 9px; border-radius: 1px; transform: skewX(-12deg); background: #ff4fc8; box-shadow: 0 0 6px #ff4fc8; }
body.hudb #hp i.lost { background: rgba(255,79,200,.1); box-shadow: none; }
body.hudb #hp i.x { background: #5ff2ff; box-shadow: 0 0 6px #5ff2ff; }
body.hudb #cstats { display: inline-block; margin-top: 5px; padding: 4px 10px; border-radius: 4px; text-shadow: 0 0 5px rgba(255,176,58,.7);
  font: 600 13px/1 "SF Mono", Menlo, Consolas, monospace; letter-spacing: 1.5px; color: #ffb03a;
  background: rgba(10,4,16,.8); box-shadow: inset 0 0 0 1px rgba(255,79,200,.14); }
/* minimap: a pink tube ring with a cyan inner line */
body.hudb #mapwrap .mapring { box-shadow: inset 0 0 0 2px rgba(255,79,200,.75), inset 0 0 0 5px rgba(10,4,16,.6), inset 0 0 0 6px rgba(95,242,255,.45), 0 0 14px rgba(255,79,200,.35), inset 0 0 30px rgba(255,79,200,.2); }
/* crosshair and lock-on in the dash colours (danger stays red) */
body.hudb #xhair { border-color: rgba(95,242,255,.9); box-shadow: 0 0 6px rgba(95,242,255,.6); }
body.hudb #xhair::after { background: #ff4fc8; }
body.hudb #xhair.lock { border-color: #ff4fc8; box-shadow: 0 0 12px #ff4fc8, inset 0 0 6px #ff4fc8aa; }
body.hudb #xhair.lock::after { background: #ff4fc8; }
body.hudb #lockmark { border-color: #ff4fc8; border-radius: 2px; box-shadow: 0 0 14px #ff4fc8, inset 0 0 10px #ff4fc866, 0 0 0 4px rgba(95,242,255,.35); }
body.hudb #xhair.danger { border-color: #ff4a4a; box-shadow: 0 0 10px #ff2a2a; } body.hudb #xhair.danger::after { background: #ff4a4a; }
body.hudb #hp { display: inline-flex; }
/* screen-edge arrows (js/dashvfd.js): pink = objective, cyan = friends, dim = friend wrecked */
#vfd-marks { position: fixed; inset: 0; pointer-events: none; z-index: 4; --c: #ff4fc8; }
#vfd-marks .mk { position: absolute; left: 0; top: 0; width: 0; height: 0; --c: #ff4fc8; }
#vfd-marks .mk.friend { --c: #5ff2ff; } #vfd-marks .mk.down { --c: rgba(95,242,255,.45); }
#vfd-marks .ar { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; }
#vfd-marks .ar::before { content: ""; position: absolute; inset: 0; background: var(--c); filter: drop-shadow(0 0 4px var(--c));
  clip-path: polygon(100% 50%, 15% 5%, 35% 50%, 15% 95%); }
#vfd-marks .dm { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border: 2px solid var(--c); transform: rotate(45deg);
  box-shadow: 0 0 6px var(--c), inset 0 0 4px var(--c); display: none; }
#vfd-marks .mk.vis .ar { display: none; } #vfd-marks .mk.vis .dm { display: block; }
#vfd-marks .tg { position: absolute; left: 0; top: 14px; transform: translateX(-50%); white-space: nowrap; padding: 3px 6px 3px; border-radius: 3px;
  background: rgba(10,4,16,.78); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); text-align: center; text-shadow: none; }
#vfd-marks .mk.edge .tg { top: 16px; }
#vfd-marks .tg em { display: block; font: normal 700 9px/1 "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif; letter-spacing: 1.5px; color: var(--c); }
#vfd-marks .tg u { display: block; margin-top: 2px; text-decoration: none; font: 600 9px/1 "SF Mono", Menlo, Consolas, monospace; color: #ffb03a; }
body.nohud #vfd-marks { display: none; }
/* minimap as a VFD screen: dot mesh + scanlines over the map inside the ring */
body.hudb #mapwrap .mapring { background: radial-gradient(circle, transparent 0 .6px, rgba(0,0,0,.4) .9px) 0 0 / 2px 2px,
  repeating-linear-gradient(180deg, rgba(255,79,200,.05) 0 1px, transparent 1px 3px); }

/* ---------- phone (touch, landscape) version of the dash: speed + gear only beside the map; touch buttons as VFD glass ---------- */
@media (max-height: 500px) {
  body.touchui.hudb #hud-br { --s: .62; top: 12px; right: calc(env(safe-area-inset-right, 0px) + 110px); }
  body.touchui.hudb #dashvfd .tach, body.touchui.hudb #dashvfd .lamps { display: none; }
  body.touchui.hudb #hud-br #dashvfd .gearbox { display: block !important; }
  body.touchui.hudb #combat { --s: .7; }
  body.touchui.hudb #vfd-marks .tg { transform: translateX(-50%) scale(.85); }
}
body.touchui.hudb #touch button { background: radial-gradient(ellipse at 50% 130%, rgba(52,16,58,.85), rgba(10,4,16,.82) 70%); border: 0;
  box-shadow: inset 0 0 0 1px rgba(255,79,200,.3), 0 3px 10px rgba(0,0,0,.5); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.touchui.hudb #touch .t-sys button { color: #ff9ae0; border-radius: 6px; }
body.touchui.hudb #touch .t-chip { border-radius: 6px; color: rgba(255,79,200,.45); }
body.touchui.hudb #touch .t-chip b, body.touchui.hudb #touch .t-chip span { color: currentColor !important; }
body.touchui.hudb #touch .t-chip i { left: 5px; right: 5px; bottom: 4px; height: 2px; background: rgba(255,79,200,.12); }
body.touchui.hudb #touch .t-chip u { background: currentColor !important; }
body.touchui.hudb #touch .t-chip.ready { color: #ff4fc8; box-shadow: inset 0 0 0 1.5px #ff4fc8, 0 0 12px rgba(255,79,200,.45); }
body.touchui.hudb #touch .t-chip.cool { color: rgba(255,176,58,.8); box-shadow: inset 0 0 0 1px rgba(255,176,58,.4); }
body.touchui.hudb #touch .t-chip.on { color: #5ff2ff; box-shadow: inset 0 0 0 1.5px #5ff2ff, 0 0 14px rgba(95,242,255,.55); }
body.touchui.hudb #touch .t-chip.air { color: #9fc8ff; box-shadow: inset 0 0 0 1.5px #9fc8ff, 0 0 14px rgba(140,190,255,.5); }
body.touchui.hudb #touch .t-chip.empty { color: rgba(255,59,78,.7); opacity: 1; }
body.touchui.hudb #touch .t-hand { border-radius: 6px; background: repeating-linear-gradient(-55deg, rgba(255,106,58,.85) 0 9px, rgba(24,8,30,.85) 9px 20px);
  box-shadow: inset 0 0 0 1.5px #ff4fc8, 0 0 14px rgba(255,79,200,.4); }
body.touchui.hudb #touch .t-hand span { background: rgba(10,4,16,.9); color: #ff9ae0; border-radius: 3px; }
body.touchui.hudb #touch .t-base { background: rgba(10,4,16,.5); border: 0; box-shadow: inset 0 0 0 1.5px rgba(255,79,200,.55), 0 0 12px rgba(255,79,200,.25); }
body.touchui.hudb #touch .t-base::before { border-right-color: rgba(95,242,255,.6); } body.touchui.hudb #touch .t-base::after { border-left-color: rgba(95,242,255,.6); }
body.touchui.hudb #touch .t-knob { background: radial-gradient(circle at 40% 35%, #ffb0ec, #ff4fc8 70%); box-shadow: 0 0 16px rgba(255,79,200,.7), inset 0 -3px 0 rgba(0,0,0,.25); }
body.touchui.hudb #touch .t-hint { color: #ff9ae0; }

/* ---------- synthwave VFD menus (same look as the dash: smoked glass, printed grid, dot mesh, pink/cyan/amber glow; off with ?hud=a) ---------- */
body.hudb { --vfd: #ff4fc8; --cyan: #5ff2ff; --amb: #ffb03a; --cond: "Avenir Next Condensed", "DIN Condensed", "Arial Narrow", sans-serif;
  --glass: radial-gradient(ellipse at 50% 130%, rgba(52,16,58,.9), rgba(10,4,16,.9) 70%);
  --mesh: radial-gradient(circle, transparent 0 .6px, rgba(0,0,0,.35) .9px) 0 0 / 2px 2px,
    linear-gradient(rgba(255,79,200,.05) 1px, transparent 1px) 0 0 / 10px 10px, linear-gradient(90deg, rgba(255,79,200,.05) 1px, transparent 1px) 0 0 / 10px 10px; }
body.hudb #start { background: radial-gradient(ellipse at 50% 110%, rgba(255,79,200,.22), transparent 60%), linear-gradient(180deg, rgba(14,6,24,.35), rgba(10,4,16,.8)); }
body.hudb #start .card, body.hudb #gameover .card { background: none; border-radius: 0; padding: 18px; }
body.hudb #start h1 { font: 700 clamp(40px, 9vw, 84px)/1 var(--cond); letter-spacing: .14em; margin: 0 0 14px; padding: 14px 26px 10px; display: inline-block; position: relative; overflow: hidden;
  background: var(--glass); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,79,200,.35), 0 0 28px rgba(255,79,200,.25), 0 3px 10px rgba(0,0,0,.55);
  color: var(--vfd); text-shadow: 0 0 10px rgba(255,79,200,.8), 0 0 28px rgba(255,79,200,.45); }
body.hudb #start h1::after, body.hudb .menu-pc::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--mesh); }
body.hudb #start p.dim, body.hudb #garage .dim, body.hudb #gameover .dim { font: 700 10px/1.5 var(--cond); letter-spacing: 2px; text-transform: uppercase; color: rgba(255,154,224,.6); }
body.hudb .lobby { width: min(320px, 86vw); gap: 8px; }
body.hudb .lname { font: 700 10px var(--cond); letter-spacing: 2px; text-transform: uppercase; color: var(--vfd); }
body.hudb .lobby button, body.hudb .lobby input, body.hudb .gbtns button, body.hudb .gnav { position: relative; font: 700 15px/1 var(--cond); letter-spacing: 2.5px; text-transform: uppercase; color: #ff9ae0;
  background: var(--mesh), var(--glass); border: 0; border-radius: 4px; padding: 13px 14px; box-shadow: inset 0 0 0 1px rgba(255,79,200,.25), 0 3px 10px rgba(0,0,0,.55); transition: none; }
body.hudb .lobby input { color: var(--amb); text-align: left; letter-spacing: 2px; box-shadow: inset 0 0 0 1px rgba(255,176,58,.35), 0 3px 10px rgba(0,0,0,.55); }
body.hudb .lobby button:hover, body.hudb .lobby button.focus, body.hudb .gbtns button:hover, body.hudb .gnav:hover { background: var(--mesh), var(--glass); color: #fff;
  box-shadow: inset 0 0 0 1.5px var(--vfd), 0 0 14px rgba(255,79,200,.5); text-shadow: 0 0 8px var(--vfd); }
body.hudb .lobby button.primary, body.hudb .gbtns button.primary { color: var(--vfd); box-shadow: inset 0 0 0 1.5px var(--vfd), 0 0 12px rgba(255,79,200,.3); text-shadow: 0 0 8px rgba(255,79,200,.7); }
body.hudb .lobby button b { color: var(--cyan); font-weight: 700; text-shadow: 0 0 8px rgba(95,242,255,.6); }
body.hudb #lmsg { font: 700 11px var(--cond); letter-spacing: 1.5px; color: var(--amb); }
/* garage */
body.hudb #garage { background: radial-gradient(ellipse at 50% 100%, rgba(255,79,200,.28), transparent 55%), linear-gradient(180deg, #1a0a2c, #0a0410); }
body.hudb #garage h2 { font: 700 14px var(--cond); letter-spacing: .5em; color: var(--vfd); text-shadow: 0 0 10px rgba(255,79,200,.7); }
body.hudb #gname { font: 700 clamp(30px, 6vw, 48px)/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--amb); text-shadow: 0 0 12px rgba(255,176,58,.55); }
body.hudb #gdrive { font: 700 12px var(--cond); letter-spacing: 3px; color: var(--cyan); text-shadow: 0 0 8px rgba(95,242,255,.5); }
body.hudb #gcolor { font: 700 11px var(--cond); letter-spacing: 3px; color: #ff9ae0; }
body.hudb #gblurb { opacity: 1; color: rgba(246,234,240,.75); }
body.hudb .gnav { width: 48px; height: 64px; font-size: 18px; padding: 0; }
body.hudb .glab { font: 700 10px var(--cond); letter-spacing: 2px; color: var(--vfd); opacity: .8; }
body.hudb .gbar { height: 8px; border-radius: 0; background: repeating-linear-gradient(90deg, rgba(255,79,200,.12) 0 6px, transparent 6px 8px); }
body.hudb .gbar i { background: repeating-linear-gradient(90deg, #ff4fc8 0 6px, transparent 6px 8px); filter: drop-shadow(0 0 3px #ff4fc8); }
body.hudb .gdot { border-radius: 0; width: 14px; height: 4px; border-color: rgba(255,79,200,.4); }
body.hudb .gdot.on { background: var(--vfd); border-color: var(--vfd); box-shadow: 0 0 8px var(--vfd); }
/* settings slide-out, help, game over */
body.hudb #menu, body.hudb #help { background: var(--mesh), var(--glass); border-radius: 0; box-shadow: inset 0 0 0 1px rgba(255,79,200,.3), 0 0 30px rgba(0,0,0,.6); }
body.hudb #help { border-radius: 4px; }
body.hudb .menu-head, body.hudb #help h2 { font: 700 14px var(--cond); letter-spacing: .4em; color: var(--vfd); text-shadow: 0 0 10px rgba(255,79,200,.6); }
body.hudb .sec { font: 700 10px var(--cond); letter-spacing: .3em; color: var(--cyan); border-top: 1px solid rgba(95,242,255,.18); margin-top: 6px; }
body.hudb .row { font: 600 14px var(--cond); letter-spacing: 1.5px; text-transform: uppercase; color: rgba(246,234,240,.8); }
body.hudb .row.focus { background: rgba(255,79,200,.12); box-shadow: inset 3px 0 0 var(--vfd); color: #fff; }
body.hudb .row .val { color: var(--amb); text-shadow: 0 0 6px rgba(255,176,58,.4); }
body.hudb .row input[type=range] { accent-color: var(--vfd); }
body.hudb #gameover h1 { font: 700 clamp(44px, 9vw, 84px)/1 var(--cond); letter-spacing: .16em; color: #ff6a3a; text-shadow: 0 0 14px rgba(255,106,58,.7); }
body.hudb #gameover.win h1 { background: none; color: var(--cyan); animation: none; -webkit-text-fill-color: currentColor; font-weight: 700; text-shadow: 0 0 14px rgba(95,242,255,.7); }
body.hudb #gameover.win .card { border: 0; box-shadow: none; animation: none; }
body.hudb #gofun { font: 700 14px var(--cond); letter-spacing: 3px; color: var(--amb); text-transform: uppercase; }
body.hudb .lobby button.focus, body.hudb .lobby input.focus { outline: 0; }
body.hudb .lobby button.focus { color: #fff; box-shadow: inset 0 0 0 2px var(--cyan), 0 0 16px rgba(95,242,255,.55); text-shadow: 0 0 8px var(--cyan); }
body.hudb #gameover h1 { display: inline-block; padding: 14px 30px 10px; background: var(--glass); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,106,58,.4), 0 0 28px rgba(255,106,58,.25); }
body.hudb #gameover.win h1 { box-shadow: inset 0 0 0 1px rgba(95,242,255,.4), 0 0 28px rgba(95,242,255,.25); }
@media (max-width: 600px) { body.hudb #gview { width: calc(100vw - 130px); height: 190px; } body.hudb .gnav { width: 40px; } }

/* ---- drift score as a VFD piece (hudb): glass box, pink label, amber digits, cyan multiplier; tiers climb pink -> cyan -> sunset ---- */
body.hudb #drift { overflow: hidden; border-radius: 4px; padding: 7px 14px 8px 10px; font-style: normal; font-weight: 700; font-family: var(--cond); letter-spacing: 2px; min-width: 150px;
  background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255,79,200,.3), 0 3px 10px rgba(0,0,0,.55); text-shadow: none; }
body.hudb #drift::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--mesh); }
body.hudb #drift #dlabel { font-size: 10px; letter-spacing: 4px; color: var(--vfd); opacity: .85; text-shadow: 0 0 6px rgba(255,79,200,.6); }
body.hudb #drift #dpts { font-size: 48px; color: var(--amb); text-shadow: 0 0 10px rgba(255,176,58,.6); animation: none; }
body.hudb #drift #dmult { font-size: 22px; color: var(--cyan); text-shadow: 0 0 8px rgba(95,242,255,.6); }
body.hudb #drift.m2 #dmult, body.hudb #drift.m3 #dmult { color: var(--cyan); }
body.hudb #drift.m4 #dmult { color: var(--vfd); text-shadow: 0 0 10px var(--vfd); } body.hudb #drift.m5 #dmult { color: #ff6a3a; text-shadow: 0 0 12px #ff6a3a; }
body.hudb #drift.tier1 { box-shadow: inset 0 0 0 1.5px var(--amb), 0 0 14px rgba(255,176,58,.35); }
body.hudb #drift.tier1 #dlabel { color: var(--amb); } body.hudb #drift.tier1 #dpts { text-shadow: 0 0 14px rgba(255,176,58,.9); }
body.hudb #drift.tier2 { box-shadow: inset 0 0 0 1.5px var(--vfd), 0 0 18px rgba(255,79,200,.5); }
body.hudb #drift.tier2 #dpts { color: #ffd0f0; text-shadow: 0 0 16px var(--vfd), 0 0 34px rgba(255,79,200,.6); }
body.hudb #drift.tier3 { box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 22px rgba(95,242,255,.55); }
body.hudb #drift.tier3 #dlabel { color: var(--cyan); } body.hudb #drift.tier3 #dpts { color: #dcfdff; text-shadow: 0 0 16px var(--cyan), 0 0 38px rgba(95,242,255,.6); }
body.hudb #drift.tier4 { animation: dshake .09s linear infinite; box-shadow: inset 0 0 0 2px #ff6a3a, 0 0 26px rgba(255,106,58,.7), 0 0 50px rgba(255,79,200,.4); }
body.hudb #drift.tier4 #dlabel, body.hudb #drift.tier4 #dmult { animation: vfdhot .5s steps(2) infinite; font-size: 12px; }
body.hudb #drift.tier4 #dpts { font-size: 60px; animation: vfdhot .5s steps(2) infinite; color: #ff6a3a; text-shadow: 0 0 20px #ff6a3a, 0 0 40px rgba(255,79,200,.6); }
@keyframes vfdhot { 0% { color: #ff6a3a; } 50% { color: #ff4fc8; } }
body.hudb #drift.stunt #dlabel { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
body.hudb #drift.lost { box-shadow: inset 0 0 0 1.5px var(--red, #ff3b4e), 0 0 14px rgba(255,59,78,.5); }
body.hudb #drift.lost #dpts, body.hudb #drift.lost #dlabel { color: #ff3b4e; text-shadow: 0 0 10px #ff3b4e; }
body.hudb #dtotal { font: 700 11px var(--cond); letter-spacing: 3px; color: rgba(255,154,224,.75); text-shadow: 0 0 6px rgba(255,79,200,.4); }
/* long-drift screen effects: the rainbow aura becomes pink / cyan / sunset */
body.hudb #fx-dots { background: radial-gradient(circle, rgba(255,79,200,.9) 22%, transparent 25%) 0 0 / 16px 16px; }
body.hudb #fx.t4 #fx-aura { animation: fxaurasw 1.6s linear infinite; }
@keyframes fxaurasw { 0%, 100% { box-shadow: inset 0 0 130px 30px rgba(255,79,200,.55); } 33% { box-shadow: inset 0 0 130px 30px rgba(95,242,255,.5); } 66% { box-shadow: inset 0 0 130px 30px rgba(255,106,58,.55); } }

/* ---------- control hints follow the input in use: body[data-in] = key | pad | touch (set by ui.js); [data-d="pad key"] marks who a hint is for ---------- */
body[data-in=key] [data-d]:not([data-d~=key]), body[data-in=pad] [data-d]:not([data-d~=pad]), body[data-in=touch] [data-d]:not([data-d~=touch]) { display: none !important; }

/* first-run Controls card in the VFD look: keycaps are separate glass pieces */
body.hudb #ready { background: radial-gradient(ellipse at 50% 110%, rgba(255,79,200,.2), transparent 60%), rgba(10,4,16,.78); }
body.hudb #ready .card { background: none; backdrop-filter: none; border-radius: 0; }
body.hudb #ready h2 { font: 700 14px var(--cond); letter-spacing: .5em; color: var(--vfd); text-shadow: 0 0 10px rgba(255,79,200,.7); }
body.hudb #ready svg { filter: drop-shadow(0 0 22px rgba(255,79,200,.3)); }
body.hudb #ready .keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; width: min(560px, 92vw); margin: 18px auto 6px; text-align: left; }
body.hudb #ready .kc { display: flex; align-items: center; gap: 12px; }
body.hudb #ready .kc kbd { position: relative; overflow: hidden; min-width: 84px; padding: 11px 10px 9px; text-align: center; font: 700 16px/1 var(--cond); letter-spacing: 2px; text-transform: uppercase; color: var(--vfd);
  background: var(--mesh), var(--glass); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,79,200,.4), 0 0 10px rgba(255,79,200,.2), 0 3px 10px rgba(0,0,0,.55); text-shadow: 0 0 8px rgba(255,79,200,.7); }
body.hudb #ready .kc span { font: 700 12px var(--cond); letter-spacing: 2px; text-transform: uppercase; color: rgba(246,234,240,.8); }
body.hudb #ready .keyline { font: 700 12px/1.6 var(--cond); letter-spacing: 1.5px; color: rgba(255,154,224,.8); }
body.hudb #beginprompt { font: 700 20px var(--cond); letter-spacing: .3em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 12px rgba(95,242,255,.7); }
@media (max-width: 520px) { body.hudb #ready .keys { grid-template-columns: 1fr; } }
body.hudb #help td, body.hudb #help th { font: 600 14px var(--cond); letter-spacing: 1.5px; text-transform: uppercase; color: rgba(246,234,240,.82); }
body.hudb #help th { color: var(--cyan); font-weight: 700; letter-spacing: 3px; }
body.hudb #help td[data-d] { color: var(--amb); }
body.hudb #ready .keyline { display: grid; gap: 7px; width: min(460px, 92vw); margin: 14px auto 4px; text-align: left; }
body.hudb #ready .keyline p { position: relative; overflow: hidden; margin: 0; display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 10px; padding: 9px 12px; background: var(--mesh), var(--glass); border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,79,200,.3), 0 3px 10px rgba(0,0,0,.55); }
body.hudb #ready .keyline b { font: 700 11px var(--cond); letter-spacing: 2px; text-transform: uppercase; color: var(--vfd); text-shadow: 0 0 8px rgba(255,79,200,.6); }
body.hudb #ready .keyline span { font: 700 12px var(--cond); letter-spacing: 1.5px; text-transform: uppercase; color: rgba(246,234,240,.85); }

/* ---------- toasts as VFD glass: pink readout, sunset red for danger (class .warn from ui.toast) ---------- */
body.hudb #toast { position: fixed; overflow: hidden; border-radius: 4px; padding: 10px 22px 8px; font: 700 20px/1.1 var(--cond); letter-spacing: 3px; text-transform: uppercase; color: var(--vfd); text-shadow: 0 0 10px rgba(255,79,200,.7);
  background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255,79,200,.45), 0 0 18px rgba(255,79,200,.25), 0 3px 10px rgba(0,0,0,.55); transition: none; max-width: 92vw; white-space: normal; text-align: center; }
body.hudb #toast::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--mesh); }
body.hudb #toast.warn { color: #ff6a3a; text-shadow: 0 0 10px rgba(255,106,58,.8); box-shadow: inset 0 0 0 1.5px #ff6a3a, 0 0 22px rgba(255,106,58,.4), 0 3px 10px rgba(0,0,0,.55); }
@media (max-height: 500px) { body.touchui.hudb #toast { --s: .8; font-size: 16px; padding: 8px 16px 6px; } }

/* touch screens taller than a landscape phone (portrait phone, tablet, ?touch on a desktop): same compact HUD as the landscape phone, dash stacked under the map, so the thumb buttons never sit on it */
@media (min-height: 501px) {
  body.touchui #mapwrap { --s: 1; width: 92px; height: 92px; top: 12px; right: calc(env(safe-area-inset-right, 0px) + 8px); }
  body.touchui #abil, body.touchui #hud-br .badges, body.touchui #hud-br .rpmbar, body.touchui #rpmtxt, body.touchui #hud-tl, body.touchui #hud-bl { display: none !important; }
  body.touchui.hudb #hud-br { --s: .62; top: 112px; bottom: auto; right: calc(env(safe-area-inset-right, 0px) + 8px); width: auto; transform-origin: top right; }
  body.touchui.hudb #dashvfd .tach, body.touchui.hudb #dashvfd .lamps { display: none; }
  body.touchui.hudb #hud-br #dashvfd .gearbox { display: block !important; }
  body.touchui #combat { --s: .62; top: 66px; left: calc(50% - 40px); }
  body.touchui.hudb #vfd-marks .tg { transform: translateX(-50%) scale(.85); }
}

/* lobby: name, a gap, then Car / Solo / Multiplayer / Settings. Everything else sits behind the dots, top-left (the minimap owns top-right) */
body.hudb .lname { margin-bottom: 16px; }
#more { position: fixed; z-index: 41; top: calc(env(safe-area-inset-top, 0px) + 14px); left: calc(env(safe-area-inset-left, 0px) + 14px); display: grid; justify-items: start; gap: 8px; }
body.hudb #more { width: auto; }
#start.hide ~ #more, #start.gone ~ #more { display: none; }
#bmore { width: 44px; height: 44px; padding: 0 !important; font-size: 24px !important; line-height: 1 !important; letter-spacing: 0 !important; }
#morelist { display: none; gap: 8px; }
#more.open #morelist { display: grid; }
#morelist button { white-space: nowrap; }
/* Wishlist note box in the settings menu */
.row.note { display: flex; flex-direction: column; align-items: stretch; gap: 8px; cursor: default; }
.row.note textarea { resize: vertical; background: rgba(0,0,0,.35); color: #ffe7da; border: 0; border-radius: 4px; padding: 10px; font: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,79,200,.4); outline: none; }
.row.note textarea:focus { box-shadow: inset 0 0 0 1.5px #ff4fc8, 0 0 16px rgba(255,79,200,.3); }
.row.note button { align-self: flex-end; padding: 8px 18px; border: 0; border-radius: 4px; background: #ff4fc8; color: #1a0820; font-family: inherit; font-weight: 700; font-size: 13px; letter-spacing: 2px; cursor: pointer; }
