:root {
  --red: #e0231d;
  --red-dark: #9e120e;
  --yellow: #f5c400;
  --grey: #a7a9b2;
  --ink: #1b1b26;
  --font: "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: radial-gradient(circle at 50% 30%, #2a2f45, #0d0f18 70%);
  font-family: var(--font);
  user-select: none; -webkit-user-select: none;
}
button { font-family: var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; padding: 0; border: none; background: none; color: inherit; }
.hidden { display: none !important; }

/* 1920x1080 stage, scaled to fit the window by main.js */
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  border-radius: 56px;
  background:
    radial-gradient(ellipse at 40% 0%, rgba(255,255,255,.16), transparent 50%),
    linear-gradient(180deg, #ee2b23 0%, #d71c16 50%, #b3140f 100%);
  box-shadow: inset 0 6px 0 rgba(255,255,255,.25), inset 0 -14px 30px rgba(0,0,0,.3), 0 30px 80px rgba(0,0,0,.6);
  overflow: hidden;
}

/* ================= VISOR + SCREEN ================= */
#visor {
  position: absolute; left: 20px; top: 14px; width: 1490px; height: 790px;
  border: 18px solid var(--grey); border-bottom: 0;
  border-radius: 80px 80px 20px 20px;
  background: linear-gradient(180deg, #2a3f8f 0%, #1b2a66 60%, #15204f 100%);
  box-shadow: inset 0 10px 24px rgba(0,0,0,.5), 0 -2px 0 #d4d6dc, 0 8px 0 rgba(0,0,0,.15);
  overflow: hidden;
}
#visor::before { /* grey hood lip highlight */
  content: ""; position: absolute; left: -18px; right: -18px; top: -18px; height: 18px;
  border-radius: 80px 80px 0 0; background: linear-gradient(#e6e7eb, #a7a9b2);
}
.visor-checker {
  position: absolute; left: 0; right: 0; top: -40px; height: 330px;
  background: conic-gradient(#0f1a44 25%, #3a55b0 0 50%, #0f1a44 0 75%, #3a55b0 0) 0 0 / 70px 70px;
  transform: perspective(500px) rotateX(38deg); transform-origin: top;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  opacity: .8;
}
.visor-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; width: 54px; height: 76px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.pin-red { left: 22px; top: 96px; }
.pin-green { left: 30px; top: 640px; width: 40px; height: 56px; }

#screen {
  position: absolute; left: 119px; top: 32px; width: 1216px; height: 684px;
  border-radius: 6px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 10px #0a0a12, 0 0 0 13px #2f3a6e, 0 12px 30px rgba(0,0,0,.6);
}
#game { width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }

.arrow { position: absolute; top: 290px; width: 104px; height: 168px; }
.arrow.left { left: 4px; }
.arrow.right { right: 4px; }
.arrow svg { width: 100%; height: 100%; overflow: visible; }
.arrow .tri-back { fill: #9a9ca6; stroke: #c2c4cc; stroke-width: 16; stroke-linejoin: round; }
.arrow .tri { fill: #b8900a; stroke: #b8900a; stroke-width: 14; stroke-linejoin: round; transition: fill .08s; }
.arrow .tri-dots { fill: url(#dots); }
.arrow.on .tri, .arrow.blink .tri { fill: #ffe23a; stroke: #ffe23a; }
.arrow.blink .tri { fill: #ffae1f; stroke: #ffae1f; }
.arrow.on svg, .arrow.blink svg { filter: drop-shadow(0 0 22px #ffe23a) drop-shadow(0 0 6px #fff7b0); }

/* wiper sweep over the screen */
#wiper { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#wiper .blade {
  position: absolute; left: 50%; bottom: -30px; width: 12px; height: 760px; margin-left: -6px;
  background: linear-gradient(90deg, #111, #444 50%, #111); border-radius: 6px;
  transform-origin: 50% 100%; transform: rotate(-95deg); opacity: 0;
}
#wiper.go .blade { animation: wipe 1.4s ease-in-out; }
@keyframes wipe { 0% { opacity: 1; transform: rotate(-95deg); } 25% { transform: rotate(95deg); } 50% { transform: rotate(-95deg); } 75% { transform: rotate(95deg); } 99% { opacity: 1; } 100% { opacity: 0; transform: rotate(-95deg); } }

/* ================= HUD (on the game screen) ================= */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud-pos {
  position: absolute; left: 28px; bottom: 4px;
  font-size: 130px; font-weight: 900; font-style: italic; color: #ffe23a; line-height: 1;
  -webkit-text-stroke: 11px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 rgba(0,0,0,.35);
}
#hud-pos small { font-size: 60px; }
#hud-lap {
  position: absolute; right: 26px; top: 16px; display: flex; align-items: center; gap: 12px;
  font-size: 70px; font-weight: 900; color: #fff; -webkit-text-stroke: 9px var(--ink); paint-order: stroke fill;
}
.flag {
  display: inline-block; width: 62px; height: 46px; border: 5px solid var(--ink); border-radius: 6px;
  background: conic-gradient(var(--ink) 25%, #fff 0 50%, var(--ink) 0 75%, #fff 0) 0 0 / 18px 18px;
}
.flag.small { width: 54px; height: 40px; border-width: 4px; background-size: 14px 14px; }
#hud-boost { position: absolute; left: 22px; top: 16px; display: flex; align-items: center; gap: 8px; }
.bolt-badge {
  width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; font-size: 46px;
  background: radial-gradient(circle at 35% 30%, #fff3a0, #f5c400 60%, #c79500); border: 6px solid var(--ink);
}
.pips { display: flex; gap: 8px; }
.pips i { width: 46px; height: 46px; border-radius: 50%; border: 6px solid var(--ink); background: #3a4a66; }
.pips i.on { background: radial-gradient(circle at 35% 30%, #d9f2ff, #2e9bff 65%); box-shadow: 0 0 16px #7cc8ff; }
#hud-auto { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); padding: 6px 22px; border-radius: 30px; background: #ff8a1f; border: 5px solid var(--ink); font-size: 34px; font-weight: 900; color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
#hud-msg {
  position: absolute; left: 0; right: 0; top: 34%; text-align: center;
  font-size: 130px; font-weight: 900; font-style: italic; color: #fff; -webkit-text-stroke: 11px var(--ink); paint-order: stroke fill;
  opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s;
}
#hud-msg.show { opacity: 1; transform: scale(1); }
#hud-msg.count, #hud-msg.go { font-size: 230px; top: 22%; }
#hud-msg.count { color: #ffe23a; }
#hud-msg.go { color: #4be05a; }
#hud-msg.boost { color: #ffb21f; }
#hud-msg.jump { color: #7ad1ff; }
#hud-msg.pick, #hud-msg.info { color: #8fd3ff; font-size: 90px; }
#hud-msg.lap { color: #ffe23a; }
#hud-msg.finish { color: #ffe23a; font-size: 180px; }

/* ================= MENUS (on the game screen) ================= */
#menu { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; }
#menu:empty { display: none; }
#menu.dim { background: linear-gradient(180deg, rgba(14,30,80,.55), rgba(14,30,80,.75)); }
.logo { font-weight: 900; font-style: italic; line-height: .9; -webkit-text-stroke: 13px var(--ink); paint-order: stroke fill; text-shadow: 0 10px 0 rgba(0,0,0,.35); }
.logo .l1 { font-size: 130px; color: #ffe23a; display: block; transform: rotate(-4deg); }
.logo .l2 { font-size: 165px; color: #ff4a3d; display: block; transform: rotate(-4deg); }
.blink { margin-top: 34px; font-size: 56px; font-weight: 900; -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hint { margin-top: 20px; font-size: 30px; font-weight: 900; color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.menu-title { font-size: 80px; font-weight: 900; color: #ffe23a; -webkit-text-stroke: 10px var(--ink); paint-order: stroke fill; margin: 0 0 22px; }
.cards { display: flex; gap: 38px; align-items: center; }
.card {
  width: 290px; padding: 18px 14px 16px; border-radius: 28px; background: rgba(255,255,255,.92); color: var(--ink);
  border: 7px solid var(--ink); transform: scale(.86); opacity: .75; transition: transform .15s, opacity .15s; position: relative;
}
.card.sel { transform: scale(1.08); opacity: 1; border-color: #ffd400; box-shadow: 0 0 0 7px var(--ink), 0 0 50px rgba(255,212,0,.8); }
.card .star { position: absolute; top: -48px; left: 50%; transform: translateX(-50%); font-size: 62px; display: none; filter: drop-shadow(0 4px 0 var(--ink)); }
.card.sel .star { display: block; animation: bob .8s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translate(-50%, -10px); } }
.card img { width: 230px; height: auto; image-rendering: pixelated; display: block; margin: 8px auto 4px; }
.card img.wide { width: 254px; border-radius: 12px; border: 5px solid var(--ink); }
.card .name { font-size: 40px; font-weight: 900; }
.card .blurb { font-size: 23px; font-weight: 900; color: #666; margin-top: 2px; }
.stats { margin-top: 8px; font-size: 21px; font-weight: 900; display: grid; grid-template-columns: auto auto; gap: 2px 12px; justify-content: center; text-align: left; }
.stats b { color: #f5a400; letter-spacing: 2px; }
.colors { display: flex; gap: 16px; margin-top: 38px; }
.colors i { width: 54px; height: 54px; border-radius: 50%; border: 6px solid var(--ink); transform: scale(.85); transition: transform .1s; }
.colors i.sel { transform: scale(1.25); box-shadow: 0 0 0 6px #fff; }
.results { display: flex; flex-direction: column; gap: 6px; min-width: 700px; }
#menu.results-screen .menu-title { font-size: 64px; margin-bottom: 12px; }
.res-row { display: flex; align-items: center; gap: 22px; background: rgba(255,255,255,.9); color: var(--ink); border-radius: 20px; padding: 0 22px; border: 6px solid var(--ink); font-size: 32px; font-weight: 900; height: 56px; }
.res-row.me { background: #ffe23a; transform: scale(1.06); }
.res-row img { width: 74px; image-rendering: pixelated; }
.res-row .place { width: 100px; text-align: left; }
.big-stars { font-size: 66px; letter-spacing: 12px; filter: drop-shadow(0 6px 0 var(--ink)); margin: 0 0 4px; }
.choice-row { display: flex; gap: 28px; margin-top: 18px; }
.choice { font-size: 36px; font-weight: 900; padding: 8px 32px; border-radius: 22px; border: 6px solid var(--ink); background: rgba(255,255,255,.85); color: var(--ink); }
.choice.sel { background: #4be05a; transform: scale(1.1); box-shadow: 0 0 30px rgba(75,224,90,.8); }
.pad-box { background: rgba(0,0,0,.55); border-radius: 28px; padding: 26px 44px; font-size: 33px; font-weight: 900; line-height: 1.5; }
.pad-box .big { font-size: 56px; color: #ffe23a; }
.pad-box code { background: #222; padding: 2px 12px; border-radius: 8px; }

/* ================= TABLET ================= */
#tablet {
  position: absolute; left: 1530px; top: 14px; width: 372px; height: 444px;
  border-radius: 36px; padding: 14px;
  background: linear-gradient(180deg, #f0352c, #c81a14);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.35), inset 0 -6px 10px rgba(0,0,0,.3), 0 8px 0 rgba(0,0,0,.2);
}
.tab-screen {
  position: relative; height: 100%; border-radius: 22px; overflow: hidden; padding: 8px 12px;
  background: linear-gradient(180deg, #7fb2f2 0%, #3c7ddb 45%, #2a62c4 100%);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.25);
}
.tab-status { display: flex; justify-content: space-between; align-items: center; height: 28px; color: #fff; font-size: 18px; padding: 0 4px; }
.grid-ico { display: grid; grid-template-columns: 9px 9px; gap: 3px; }
.grid-ico i { width: 9px; height: 9px; background: #fff; border-radius: 2px; }
#tab-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 6px; margin-top: 4px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font-size: 16px; font-weight: 900; text-shadow: 0 2px 0 rgba(0,0,0,.35); padding: 4px 0; border-radius: 16px; }
.app .tile {
  width: 78px; height: 78px; border-radius: 22px; display: grid; place-items: center; font-size: 42px;
  border: 4px solid rgba(255,255,255,.9); box-shadow: 0 5px 0 rgba(0,0,0,.25); transition: transform .08s;
}
.app:active .tile, .app.on .tile { transform: scale(.9); }
.app.lit .tile { box-shadow: 0 0 0 4px #ffe23a, 0 0 24px #ffe23a; }
.t-green { background: linear-gradient(#6ee06a, #2fa43a); }
.t-white { background: linear-gradient(#ffffff, #cfe3f7); }
.t-orange { background: linear-gradient(#ffd25a, #ff9a1f); }
.t-pink { background: linear-gradient(#ffb0dc, #f067b4); }
.t-blue { background: linear-gradient(#9fd0ff, #3c8de8); }
#tab-gps { position: absolute; left: 12px; right: 12px; top: 40px; bottom: 34px; border-radius: 16px; background: #0f2438; display: grid; place-items: center; }
#tab-gps canvas { width: 100%; height: 100%; }
.gps-label { position: absolute; bottom: 6px; font-size: 16px; color: #8fd3ff; font-weight: 900; }
.tab-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 10px; }
.tab-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.5); }
.tab-dots i.on { background: #fff; }

/* ================= MODE SLIDER ================= */
#mode-panel {
  position: absolute; left: 1540px; top: 472px; width: 352px; height: 104px;
  border-radius: 20px; padding: 10px; display: flex; gap: 6px;
  background: linear-gradient(180deg, #e52a22, #b9150f);
  box-shadow: inset 0 0 0 5px #8f0f0b, inset 0 4px 0 rgba(255,255,255,.3);
}
.mode-end { width: 72px; border-radius: 10px; display: grid; place-items: center; font-size: 44px; }
.seat { background: linear-gradient(#ffb15a, #f07d1f); }
.flagbox { background: linear-gradient(#ffe36a, #f5b800); }
.mode-mid { position: relative; flex: 1; border-radius: 10px; overflow: hidden; background: linear-gradient(180deg, #8fd0ff 0 45%, #5aa0e0 45% 60%, #6b6f7a 60%); }
.mode-mid .city { position: absolute; left: 0; right: 0; top: 20px; height: 26px; background: linear-gradient(90deg, #3b5ea8 0 8%, transparent 8% 12%, #4a6fbf 12% 22%, transparent 22% 28%, #3b5ea8 28% 36%, transparent 36% 44%, #4a6fbf 44% 58%, transparent 58% 64%, #3b5ea8 64% 76%, transparent 76% 82%, #4a6fbf 82% 94%, transparent 94%); }
.mode-mid .road { position: absolute; left: 50%; bottom: 0; width: 120px; height: 38px; transform: translateX(-50%); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); background: #3a3d46; }
.mode-track { position: absolute; left: 30px; right: 30px; bottom: 6px; height: 26px; border-radius: 13px; background: #8f0f0b; box-shadow: inset 0 3px 4px rgba(0,0,0,.5); }
#mode-knob { position: absolute; top: -8px; left: 0; width: 56px; height: 42px; border-radius: 14px; background: linear-gradient(#5ab8ff, #1f7ad6); border: 4px solid #0f4a8a; transition: left .2s; }
#mode-panel.race #mode-knob { left: calc(100% - 56px); }

/* ================= THREE BUTTONS ================= */
#three-btns { position: absolute; left: 1540px; top: 588px; width: 352px; height: 92px; display: flex; justify-content: space-between; align-items: center; }
.t3 { height: 86px; transition: transform .06s, filter .06s; filter: drop-shadow(0 6px 0 #7a0d0a); }
.t3:active, .t3.on { transform: translateY(5px); filter: drop-shadow(0 1px 0 #7a0d0a); }
.t3.wiper { width: 116px; background: linear-gradient(#a6e86a, #5cbf2e); clip-path: polygon(0 0, 100% 0, 82% 100%, 8% 100%); border-radius: 12px; display: grid; place-items: center; }
.t3.wiper svg { width: 62px; }
.t3.hazard { width: 104px; }
.t3.hazard svg { width: 100%; height: 100%; }
.t3.hazard.lit svg polygon:first-child { fill: #ff7b5c; }
.t3.ac { width: 116px; background: linear-gradient(#ffe36a, #f5b800); clip-path: polygon(0 0, 100% 0, 92% 100%, 18% 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding-left: 10px; }
.t3.ac span { font-size: 34px; line-height: 1; }
.t3.ac b { font-size: 18px; color: #1f5fb8; }
.t3.lit { filter: drop-shadow(0 6px 0 #7a0d0a) drop-shadow(0 0 16px #fff6a0); }

/* ================= BOOST / KEY / GEAR BLOCK ================= */
#drive-block {
  position: absolute; left: 1530px; top: 694px; width: 372px; height: 372px;
  border-radius: 30px; background: linear-gradient(180deg, #d0d2d8, #a9acb4);
  border: 7px solid #8a8d96; box-shadow: inset 0 4px 0 rgba(255,255,255,.6), 0 8px 0 rgba(0,0,0,.2);
}
.boost-slide { position: absolute; left: 20px; top: 16px; width: 140px; }
.stripes {
  display: block; position: relative; height: 104px; border-radius: 10px; border: 5px solid #5a5c64;
  background: repeating-linear-gradient(-45deg, #f5c400 0 12px, #1b1b26 12px 24px);
}
.slide-knob {
  position: absolute; left: 12px; right: 12px; top: 10px; height: 56px; border-radius: 10px;
  background: linear-gradient(#6cc4ff, #1f7ad6); border: 4px solid #0f4a8a; box-shadow: 0 6px 0 #0f4a8a;
  transition: top .06s, box-shadow .06s;
}
.boost-slide.on .slide-knob { top: 26px; box-shadow: 0 1px 0 #0f4a8a; }
.boost-slide.active .stripes { box-shadow: 0 0 24px #ffb21f; }
.boost-plate { display: block; margin-top: 6px; background: #e53935; color: #fff; font-size: 24px; font-weight: 900; letter-spacing: 2px; border-radius: 6px; padding: 2px 0; border: 3px solid #7a0d0a; }
#drive-block .boost-lights { position: absolute; left: 24px; top: 170px; display: flex; gap: 10px; }
.boost-lights i { width: 32px; height: 32px; border-radius: 50%; background: #3a4a66; border: 4px solid var(--ink); }
.boost-lights i.on { background: radial-gradient(circle at 35% 30%, #d9f2ff, #2e9bff 65%); box-shadow: 0 0 14px #7cc8ff; }
#btn-key { position: absolute; left: 14px; top: 208px; width: 160px; height: 150px; }
.key-arc { position: absolute; top: 0; left: 0; right: 0; font-size: 17px; font-weight: 900; color: #3a3c44; letter-spacing: 1px; }
.key-base { position: absolute; left: 18px; top: 24px; width: 124px; height: 124px; border-radius: 50%; background: radial-gradient(circle, #e9eaee 55%, #5aa0e0 56% 70%, #8a8d96 71%); display: grid; place-items: center; }
.key-knob { width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3a0, #f5c400 55%, #c79500); border: 4px solid #a07800; display: grid; place-items: center; transition: transform .15s; transform: rotate(-35deg); box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.key-grip { width: 22px; height: 76px; border-radius: 11px; background: linear-gradient(90deg, #d9a800, #ffe36a, #d9a800); border: 3px solid #a07800; }
#btn-key.on .key-knob, #btn-key.started .key-knob { transform: rotate(35deg); }
#gear { position: absolute; left: 186px; top: 14px; width: 172px; height: 344px; }
.gear-strip { position: absolute; left: 0; top: 30px; width: 54px; height: 280px; border-radius: 16px; background: linear-gradient(90deg, #4a4c55, #6a6d76); display: flex; flex-direction: column; justify-content: space-around; align-items: center; box-shadow: inset 0 0 8px rgba(0,0,0,.6); }
.gear-strip b { font-size: 34px; color: #e0e0e6; }
.gear-strip b[data-g="P"] { color: #ff5a4a; }
.gear-strip b.on { color: #ffe23a; text-shadow: 0 0 10px #ffe23a; }
#gear-lever { position: absolute; left: 30px; top: 40px; width: 150px; height: 150px; transition: top .25s; }
#gear-lever .lever-arm { position: absolute; left: 0; top: 52px; width: 60px; height: 46px; border-radius: 12px; background: linear-gradient(#5ab8ff, #1f7ad6); border: 4px solid #0f4a8a; }
#gear-lever .lever-handle {
  position: absolute; left: 36px; top: 0; width: 112px; height: 150px; border-radius: 40px 50px 50px 40px;
  background: radial-gradient(circle at 40% 30%, #7fd0ff, #2d8ee8 60%, #1f6fc4); border: 4px solid #0f4a8a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; box-shadow: 0 8px 0 rgba(0,0,0,.25);
}
.lever-handle i { font-style: normal; color: #ffd400; font-size: 34px; line-height: 1.05; text-shadow: 0 2px 0 #a07800; }

/* ================= CLIMATE DIAL ================= */
#climate {
  position: absolute; left: 22px; top: 818px; width: 150px; height: 248px; border-radius: 28px;
  background: repeating-linear-gradient(45deg, #2a2a30 0 6px, #34343b 6px 12px); border: 7px solid #111;
  color: #fff; box-shadow: 0 8px 0 rgba(0,0,0,.25);
}
#climate .c-sun { position: absolute; left: 16px; top: 12px; font-size: 32px; }
#climate .c-eco { position: absolute; left: 12px; top: 92px; font-size: 18px; font-weight: 900; }
#climate .c-snow { position: absolute; left: 16px; top: 150px; font-size: 32px; color: #9fd8ff; }
.c-bar { position: absolute; right: 22px; top: 14px; width: 40px; height: 176px; border-radius: 8px; background: linear-gradient(180deg, #e53935, #e53935 30%, #5aa0e0 70%, #5aa0e0); border: 4px solid #111; }
#c-ind { position: absolute; left: -8px; right: -8px; height: 10px; top: 40%; background: #fff; border-radius: 4px; transition: top .4s; box-shadow: 0 0 8px #fff; }
.c-btns { position: absolute; left: 10px; right: 10px; bottom: 8px; display: flex; gap: 6px; }
.c-btns i { flex: 1; height: 32px; border-radius: 8px; background: #8a8d96; font-style: normal; font-size: 18px; display: grid; place-items: center; color: #222; }

/* ================= INDICATOR STALK ================= */
#stalk {
  position: absolute; left: 150px; top: 1000px; width: 300px; height: 56px; z-index: 2;
  background: linear-gradient(180deg, #ffe36a, #f5c400 60%, #c79500); border: 4px solid #a07800;
  border-radius: 10px 30px 30px 10px; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 82%);
  transform: rotate(-3deg); transform-origin: right center;
  box-shadow: 0 6px 0 rgba(0,0,0,.25);
}
.stalk-arrow { font-size: 26px; color: #a07800; font-weight: 900; margin-right: 110px; }
#stalk.up { transform: rotate(-9deg); }
#stalk.down { transform: rotate(3deg); }

/* ================= GAUGE CLUSTER ================= */
#cluster {
  position: absolute; left: 196px; top: 816px; width: 850px; height: 250px; z-index: 1;
  border-radius: 60px 60px 30px 30px;
  background: linear-gradient(180deg, #a8130f, #c41a14);
  box-shadow: inset 0 10px 20px rgba(0,0,0,.45), 0 -3px 0 rgba(255,255,255,.2);
}
.gauge-ring { position: absolute; top: 8px; width: 236px; height: 236px; border-radius: 50%; background: #121218; border: 14px solid #d61f18; box-shadow: 0 0 0 5px #8f0f0b, inset 0 0 20px #000; }
.gauge-ring.tacho { left: 34px; }
.gauge-ring.speedo { right: 34px; }
.gauge-ring svg { width: 100%; height: 100%; }
#speed-num { position: absolute; left: 0; right: 0; bottom: 30px; text-align: center; font-size: 30px; font-weight: 900; color: #ffe23a; }
.cluster-mid { position: absolute; left: 50%; top: 14px; width: 250px; margin-left: -125px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
#odo { width: 200px; height: 46px; border-radius: 10px; background: #0b1418; border: 4px solid #2f3a44; color: #3fe0c8; font: 900 34px/38px "Courier New", monospace; letter-spacing: 4px; text-align: center; text-shadow: 0 0 8px rgba(63,224,200,.6); clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
#bars { display: flex; gap: 5px; align-items: flex-end; height: 70px; }
#bars .col { display: flex; flex-direction: column-reverse; gap: 3px; }
#bars .seg { width: 16px; height: 6px; background: #1d3a44; border-radius: 1px; }
#bars .seg.on { background: #3fe0c8; box-shadow: 0 0 6px #3fe0c8; }
.mid-icons { color: #3fe0c8; font-size: 20px; opacity: .8; }

/* ================= STEERING WHEEL ================= */
#wheel-box { position: absolute; left: 370px; top: 800px; width: 500px; height: 500px; z-index: 3; pointer-events: none; }
#wheel { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 14px 10px rgba(0,0,0,.45)); }
#wheel-g { transition: transform .05s linear; }
#hub { pointer-events: auto; cursor: pointer; transition: transform .06s; }
#hub.on { transform: scale(.94); }
#hub.on circle:first-child { fill: #fff07a; }

/* ================= VENT ================= */
#vent { position: absolute; left: 1068px; top: 818px; width: 446px; height: 248px; }
.vent-housing {
  position: absolute; left: 0; top: 0; width: 290px; height: 196px; border-radius: 34px 60px 34px 34px;
  background: linear-gradient(180deg, #2a2a30, #121216); border: 6px solid #0a0a0d; box-shadow: 0 8px 0 rgba(0,0,0,.25);
}
.slots { position: absolute; left: 24px; top: 26px; display: flex; flex-direction: column; gap: 16px; }
.slots i { width: 170px; height: 18px; border-radius: 5px; background: linear-gradient(180deg, #2fa8a0, #146a66); box-shadow: inset 0 3px 0 rgba(0,0,0,.4); }
#thumbwheel { position: absolute; right: 26px; top: 20px; width: 56px; height: 150px; border-radius: 16px; background: #0a0a0d; display: grid; place-items: center; }
#thumbwheel span { width: 44px; height: 136px; border-radius: 14px; background: repeating-linear-gradient(180deg, #ffe36a 0 6px, #d9a800 6px 12px); border: 3px solid #a07800; transition: background-position .2s; }
.air-panel { position: absolute; right: 0; top: 0; width: 140px; height: 196px; border-radius: 24px; background: linear-gradient(180deg, #8f929b, #6a6d76); border: 6px solid #4a4c55; display: flex; flex-direction: column; justify-content: space-around; align-items: center; padding: 6px 0; }
.air { width: 100px; height: 46px; border-radius: 12px; background: #3a3c44; color: #e8e8ee; font-size: 28px; font-weight: 900; box-shadow: 0 4px 0 #222; }
.air:active { transform: translateY(3px); box-shadow: 0 1px 0 #222; }
.vent-foot { position: absolute; left: 6px; right: 0; bottom: 4px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#pad-status { font-size: 19px; font-weight: 900; color: #fff; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
#pad-status.ok { color: #c8ffb0; }
.tiny-btn { width: 54px; height: 38px; border-radius: 10px; border: 4px solid var(--ink); background: #e8e8ee; font-size: 22px; }
#grille { display: none; }

/* ================= Hand-steering camera ================= */
#cam-pip {
  position: absolute; right: 18px; bottom: 18px; width: 256px; height: 192px; z-index: 2;
  border: 6px solid var(--ink); border-radius: 18px; background: #0d1a3a;
  box-shadow: 0 0 0 4px #ffe23a, 0 8px 18px rgba(0,0,0,.5); pointer-events: none;
}
#cam-pip.hidden { display: none; }
#btn-cam.lit { background: #ffe23a; box-shadow: 0 0 14px #ffe23a; }
#btn-cam.busy { background: #ffd0a0; }
#btn-cam { margin-left: auto; }

/* ================= Title menu, levels, results prize ================= */
.coin-pill { position: absolute; right: 22px; top: 18px; padding: 4px 22px; border-radius: 30px; background: #ffe23a; color: var(--ink); border: 5px solid var(--ink); font-size: 36px; font-weight: 900; box-shadow: 0 5px 0 rgba(0,0,0,.3); }
.coin-pill.inline { position: static; }
.logo.small .l1 { font-size: 96px; }
.logo.small .l2 { font-size: 124px; }
.title-btns { display: flex; gap: 28px; margin-top: 34px; }
.tbtn { width: 260px; padding: 12px 0 14px; border-radius: 26px; border: 7px solid var(--ink); background: rgba(255,255,255,.9); color: var(--ink); font-size: 40px; font-weight: 900; display: flex; flex-direction: column; align-items: center; cursor: pointer; transform: scale(.92); transition: transform .12s; box-shadow: 0 8px 0 rgba(0,0,0,.3); }
.tbtn span { font-size: 64px; line-height: 1.1; }
.tbtn.sel { background: #4be05a; transform: scale(1.08); box-shadow: 0 0 0 6px #fff, 0 0 40px rgba(75,224,90,.9); }
.menu-title.sm { font-size: 60px; margin-bottom: 14px; }
.card { cursor: pointer; }
.card-best { position: absolute; right: -14px; top: -22px; }
.levels { display: flex; gap: 14px; margin-top: 22px; }
.lvl { width: 168px; padding: 6px 0 8px; border-radius: 20px; border: 6px solid var(--ink); background: rgba(255,255,255,.88); color: var(--ink); display: flex; flex-direction: column; align-items: center; cursor: pointer; line-height: 1.1; }
.lvl .lv-ic { font-size: 40px; }
.lvl b { font-size: 26px; }
.lvl small { font-size: 20px; font-weight: 900; color: #666; }
.lvl.sel { background: #ffe23a; transform: scale(1.1); box-shadow: 0 0 0 5px #fff; }
.lvl.locked { background: rgba(120,120,140,.85); color: #ddd; }
.lvl.locked small { color: #ddd; }
.lvl.locked.sel { background: #a0a0b4; }
.res-wrap { display: flex; gap: 30px; align-items: center; }
#menu.results-screen .results { min-width: 520px; gap: 4px; }
#menu.results-screen .res-row { height: 44px; font-size: 26px; }
#menu.results-screen .menu-title { margin-bottom: 8px; }
#menu.results-screen .choice-row { margin-top: 10px; }
.unlocks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; max-width: 1150px; margin-top: 6px; }
.unlocks .unlock { margin-top: 0; font-size: 22px; padding: 2px 16px; }
.prize { width: 380px; padding: 6px 18px 10px; border-radius: 28px; background: rgba(0,0,0,.45); border: 5px solid rgba(255,255,255,.35); }
.prize-trophy svg { width: 120px; height: 120px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); animation: bobT .9s ease-in-out infinite alternate; }
@keyframes bobT { to { transform: translateY(-8px) rotate(3deg); } }
.prize-name { font-size: 36px; font-weight: 900; color: #ffe23a; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.prize-coins { margin-top: 6px; font-size: 24px; font-weight: 900; }
.prize-coins div { display: flex; justify-content: space-between; gap: 12px; }
.prize-coins b { color: #ffe23a; }
.prize-total { margin-top: 8px; font-size: 34px; font-weight: 900; display: inline-block; padding: 2px 20px; border-radius: 26px; background: #ffe23a; color: var(--ink); border: 4px solid var(--ink); }
.unlock { margin-top: 10px; font-size: 32px; font-weight: 900; color: #fff; padding: 4px 26px; border-radius: 26px; background: linear-gradient(90deg, #ff8a1f, #ff4fa0); border: 5px solid var(--ink); animation: pop .5s ease-out both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.12); } }
.choice { cursor: pointer; }

/* ================= Shop ================= */
#menu.shop-screen { justify-content: flex-start; padding: 14px 22px 10px; background: linear-gradient(180deg, rgba(14,30,80,.88), rgba(10,20,60,.94)); }
.shop-head { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.shop-title { font-size: 52px; font-weight: 900; color: #ffe23a; -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; }
.shop-body { width: 100%; flex: 1; display: flex; gap: 18px; margin-top: 8px; min-height: 0; }
.areas { width: 300px; display: flex; flex-direction: column; gap: 6px; }
.area { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 18px; border: 5px solid var(--ink); background: rgba(255,255,255,.9); color: var(--ink); font-size: 23px; font-weight: 900; text-align: left; cursor: pointer; position: relative; }
.area .a-ic { font-size: 32px; width: 40px; text-align: center; }
.area .a-nm { flex: 1; }
.area .a-lock { font-size: 24px; }
.area.locked { background: rgba(110,110,130,.85); color: #e0e0e8; }
.area.locked .a-ic { filter: grayscale(1); opacity: .6; }
.area.sel { background: #ffe23a; }
.area.locked.sel { background: #b0b0c4; color: var(--ink); }
.area.focus { transform: translateX(10px); box-shadow: 0 0 0 5px #fff, 0 0 26px rgba(255,226,58,.8); }
.area .new { position: absolute; right: -12px; top: -12px; background: #ff4fa0; color: #fff; font-size: 17px; padding: 2px 8px; border-radius: 12px; border: 3px solid var(--ink); transform: rotate(8deg); animation: blink 1s steps(2) infinite; }
.area-panel { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.preview-row { display: flex; gap: 14px; align-items: stretch; height: 196px; }
.preview-car { width: 250px; border-radius: 22px; background: radial-gradient(circle at 50% 60%, #4a7fd6, #1d3a7a); border: 5px solid var(--ink); display: grid; place-items: center; }
.preview-car img { width: 220px; image-rendering: pixelated; filter: drop-shadow(0 8px 0 rgba(0,0,0,.35)); }
.stat-bars { width: 270px; display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 4px 8px; padding: 10px 12px; border-radius: 22px; background: rgba(0,0,0,.4); font-size: 19px; font-weight: 900; text-align: left; }
.bar { display: flex; gap: 3px; }
.bar i { flex: 1; height: 18px; border-radius: 4px; background: rgba(255,255,255,.18); }
.bar i.on { background: #ffe23a; }
.bar i.up { background: #4be05a; box-shadow: 0 0 8px #4be05a; }
.bar i.down { background: #ff5a4a; }
.item-info { flex: 1; border-radius: 22px; background: rgba(255,255,255,.92); color: var(--ink); padding: 12px 16px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.it-name { font-size: 32px; font-weight: 900; }
.it-desc { font-size: 22px; font-weight: 900; color: #555; flex: 1; }
.it-act { align-self: flex-start; font-size: 24px; font-weight: 900; padding: 4px 16px; border-radius: 16px; border: 4px solid var(--ink); }
.it-act.can { background: #4be05a; }
.it-act.using { background: #8fd3ff; }
.it-act.cant { background: #ddd; color: #777; }
.items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.item { position: relative; height: 150px; border-radius: 18px; border: 5px solid var(--ink); background: rgba(255,255,255,.88); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 4px 4px 6px; cursor: pointer; }
.item img { width: 110px; image-rendering: pixelated; margin-bottom: auto; margin-top: 4px; }
.item .nm { font-size: 18px; font-weight: 900; line-height: 1.05; }
.item .tag { margin-top: 3px; font-size: 18px; padding: 0 10px; border-radius: 10px; border: 3px solid var(--ink); }
.tag.on { background: #8fd3ff; }
.tag.own { background: #fff; }
.tag.price { background: #ffe23a; }
.tag.price.poor { background: #ddd; color: #888; }
.item.using { background: #dff3ff; }
.item.sel { background: #fff7b0; transform: scale(1.06); box-shadow: 0 0 0 5px #fff, 0 0 26px rgba(255,226,58,.9); z-index: 1; }
.closed { position: relative; flex: 1; border-radius: 22px; overflow: hidden; border: 5px solid var(--ink); }
.shutter { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, #8d93a3 0 26px, #6d7383 26px 32px); }
.lockmsg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 38px; font-weight: 900; color: #fff; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; }
.lockmsg small { font-size: 28px; color: #ffe23a; }
.big-lock { font-size: 90px; -webkit-text-stroke: 0; }
.shop-msg { margin-top: 8px; font-size: 26px; font-weight: 900; color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; min-height: 34px; }

/* ================= Trophy room ================= */
.tr-totals { display: flex; gap: 26px; align-items: center; padding: 6px 26px; border-radius: 26px; background: rgba(0,0,0,.4); font-size: 30px; font-weight: 900; }
.tr-totals > div { display: flex; align-items: center; gap: 4px; }
.tr-all { color: #ffe23a; }
.tr-grid { margin-top: 12px; display: grid; grid-template-columns: 190px repeat(3, 200px); gap: 2px 10px; align-items: center; padding: 8px 18px; border-radius: 26px; background: linear-gradient(180deg, rgba(110,62,20,.75), rgba(70,38,10,.8)); border: 6px solid var(--ink); }
.tr-head { font-size: 24px; font-weight: 900; color: #ffe9b0; }
.tr-lv { font-size: 24px; font-weight: 900; text-align: left; }
.tr-cell { border-bottom: 6px solid #3a1e06; height: 70px; display: flex; align-items: flex-end; justify-content: center; }
.hint[data-pick] { cursor: pointer; }

/* Grown-ups button: small, tucked in a corner; ▼ to reach it, then hold A for 2 s */
.gear-btn { position: absolute; left: 22px; bottom: 18px; display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 10px; border-radius: 30px; background: rgba(27,27,38,.55); color: rgba(255,255,255,.75); border: 4px solid rgba(255,255,255,.35); font-size: 22px; font-weight: 900; cursor: pointer; overflow: hidden; user-select: none; }
.gear-ic { font-size: 30px; position: relative; z-index: 1; }
.gear-txt { position: relative; z-index: 1; }
.gear-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); background: #4be05a; }
.gear-btn.sel { background: rgba(27,27,38,.85); color: #fff; border-color: #fff; font-size: 26px; box-shadow: 0 0 24px rgba(255,255,255,.5); }
.gear-btn.sel .gear-ic { animation: gear-spin 3s linear infinite; }
@keyframes gear-spin { to { transform: rotate(360deg); } }
