:root{--glory:#b7ff54;--ink:#0b1119;--soft:#9baabd;--line:#293440}*{box-sizing:border-box} [hidden]{display:none!important}
body{font-family:Inter,Arial,sans-serif;color:#edf4fa;background:#080d14;margin:0}button,a,select,input{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--glory);outline-offset:4px}
body .control-group label:has(#engine),body .control-group label:has(#suspension),body .control-group label:has(#aero),body .specs span:nth-child(3),body .mod-head>strong,body .mod-head>small{display:none}body .specs{grid-template-columns:1fr 1fr}body .mod-head{margin-top:18px}.load-track i{animation-duration:5s}
@media(max-width:900px){body:not(.career-driving) #leaderboard{position:sticky;top:0;z-index:25}}
.topbar{height:82px;grid-template-columns:155px 1fr auto;padding:8px 24px;gap:18px}.topbar .logo{width:145px;height:66px}.season{padding-left:18px}.season b{font-size:22px}.season span{color:var(--glory)}.pilot-wallet{display:flex;gap:22px;align-items:center;font-size:12px}.pilot-wallet small{display:block;color:var(--soft);font-size:9px;margin-bottom:5px;letter-spacing:.1em}.pilot-wallet b{font-size:16px}.pilot-wallet #credits{color:var(--glory)}.pilot-wallet button{border:1px solid var(--line);background:transparent;color:white;padding:9px}
.cockpit{height:calc(100dvh - 82px);min-height:680px;grid-template-columns:minmax(400px,1fr) 325px 285px}.visualizer{min-height:0}.modulator{padding:18px}.control-group{padding:12px 0}.control-group>p{margin-bottom:8px}.control-group label{margin:8px 0}.mod-head{padding-bottom:12px}.mod-head>strong{font-size:35px}.mod-head b{font-size:18px}.car-wrap{left:50%;top:49%;width:480px}#car3d{inset:-135px -110px -100px}.stage-copy h1{font-size:70px}.stage-copy span{color:var(--glory)}.telemetry{display:none}.stage-copy{top:5%}.orbit-hint{font-size:8px!important}
.career-strip{position:absolute;z-index:7;bottom:24px;left:24px;right:24px;padding:18px;background:#0a121ce8;border:1px solid #405060;backdrop-filter:blur(16px)}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.18em;color:var(--glory)}.career-strip h2{font-size:24px;margin:8px 0}.career-strip p{font-size:12px;color:#bac6d3;line-height:1.6;margin-bottom:0}.career-strip strong{color:var(--glory)}
.rank-panel{background:#0d141e;border-left:1px solid var(--line);padding:24px 18px;overflow:auto;z-index:20}.rank-title{display:flex;justify-content:space-between;align-items:center}.rank-title h2{font-size:20px;margin:5px 0 18px}.live-dot{font-size:9px;color:var(--glory);letter-spacing:.12em}.rank-panel label,.public-board label{display:block;font-size:10px;color:var(--soft);margin-bottom:7px}.rank-panel select,.public-board select{width:100%;padding:12px;border:1px solid var(--line);background:#182330;color:white}.rank-panel ol,.public-board ol{padding:0;margin:20px 0;list-style:none}.rank-panel li,.public-board li{display:flex;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:15px 0;font-size:12px}.rank-panel li>span,.public-board li>span{color:var(--soft);font-weight:800}.rank-panel li:first-child>span,.public-board li:first-child>span{color:var(--glory)}[data-rank-list] li>div{flex:1;min-width:0}[data-rank-list] strong{display:block;overflow-wrap:anywhere}[data-rank-list] small{display:block;font-size:9px;color:var(--soft);margin-top:5px}[data-rank-list] b{font-variant-numeric:tabular-nums;color:var(--glory);white-space:nowrap}.rank-empty{font-size:13px;line-height:1.7;color:#b8c4d1;padding:24px 0}.rank-panel a{color:var(--glory);font-size:11px}.rank-note,[data-rank-status]{color:var(--soft);font-size:10px;line-height:1.6}.rank-note{margin:20px 0}
.race-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.race-picker button{background:#121e2a;border:1px solid #334050;color:white;text-align:left;padding:9px 6px;font-size:10px;line-height:1.5}.race-picker button small{display:block;color:var(--soft);font-size:8px}.race-picker button.selected{border-color:var(--glory);color:var(--glory)}#race-description,#car-ownership{font-size:9px;color:var(--soft);line-height:1.6}.purchase{width:100%;border:1px solid #596b36;color:var(--glory);background:#243118;padding:10px;font-size:10px;font-weight:700;margin:6px 0}.upgrade-title{display:flex;justify-content:space-between;font-size:10px;color:var(--soft)}.launch{margin-top:12px;background:var(--glory);color:#152309;box-shadow:0 5px 30px #9dff3820}.launch strong{font-size:24px}.hint{color:#a3b1c1;font-size:10px;line-height:1.6}.career-cosmetic{display:none}#career-message{font-size:11px;line-height:1.5;color:var(--glory);min-height:16px}
dialog{color:#edf4fa;background:#101b28;border:1px solid #4c5c6e;box-shadow:0 30px 100px #000a;padding:32px;width:min(440px,calc(100vw - 28px));border-radius:12px}dialog::backdrop{background:#01070bba;backdrop-filter:blur(9px)}dialog h2{font-size:36px;line-height:1.05;margin:16px 0}dialog p{font-size:13px;line-height:1.7;color:#bcc8d5}dialog label{display:block;font-size:12px;margin:20px 0 8px}dialog input{width:100%;padding:14px;background:#080e17;color:#fff;border:1px solid #506072;font-size:19px}dialog button{width:100%;padding:14px;border:0;background:var(--glory);color:#172408;font-weight:800;margin-top:12px}dialog button.secondary{background:transparent;color:#b1bfd0;border:1px solid #3d4a5a}#nickname-error{color:#ffbd91;margin:8px 0;font-size:12px;min-height:17px}dialog small{display:block;font-size:10px;color:var(--soft);line-height:1.7;margin-top:10px}
.race-overlay{display:none}.career-driving .race-overlay{display:block}.career-driving .modulator,.career-driving .stage-copy,.career-driving .career-strip,.career-driving .orbit-hint,.career-driving .garage-door-frame,.career-driving .paint-crew,.career-driving .garage-action{display:none!important}.career-driving .cockpit{grid-template-columns:minmax(0,1fr) 285px}.career-driving .visualizer{background:#101f34;min-height:550px}.career-driving .visualizer::before,.career-driving .visualizer::after{display:none}.career-driving .car-wrap{inset:0;width:100%;height:100%;transform:none!important;animation:none!important}.career-driving #car3d{inset:0}.career-driving #car3d canvas{cursor:default}.race-top{position:absolute;z-index:12;top:22px;left:22px;right:22px;display:flex;justify-content:space-between;align-items:start;pointer-events:none}.race-top h2{font-size:22px;margin:5px 0}.race-top button{pointer-events:auto;background:#101b29db;color:#fff;border:1px solid #536277;padding:12px}.race-top p{margin:4px 0;color:var(--glory);font-size:12px}.race-hud{position:absolute;z-index:12;bottom:92px;left:24px;right:24px;display:flex;align-items:end;gap:24px;background:#0b1421de;padding:14px 18px;border:1px solid #3c5367;pointer-events:none}.race-hud small{display:block;font-size:9px;color:#afc0d1;letter-spacing:.15em}.race-hud strong{font-size:34px;font-variant-numeric:tabular-nums}.race-hud span{font-size:10px;color:#a1b6c6}.race-bars{margin-left:auto;width:35%}progress{accent-color:var(--glory);width:100%;height:7px}#drive-nitro{accent-color:#48d9ff}.race-bars label{display:block;font-size:9px;color:#bfcedd;margin:5px 0}.touch-controls{position:absolute;z-index:13;bottom:20px;left:24px;right:24px;display:flex;gap:8px}.touch-controls button{touch-action:none;user-select:none;min-height:48px;min-width:55px;background:#102033e8;border:1px solid #546c84;color:#fff;border-radius:8px;font-weight:800;font-size:13px}.touch-controls button.pressed{background:#547531}.touch-controls button[data-drive='16']{margin-left:auto;color:#58e6ff}.touch-controls button[data-drive='1']{color:var(--glory);padding:0 18px}#race-countdown{position:absolute;z-index:13;top:32%;left:0;right:0;text-align:center;font-size:100px;font-weight:900;color:var(--glory);pointer-events:none;text-shadow:0 8px 40px #000}.race-card{position:absolute;z-index:18;top:50%;left:50%;transform:translate(-50%,-50%);width:min(430px,90%);background:#0b1423f5;border:1px solid #657d4e;padding:30px;text-align:center;box-shadow:0 25px 70px #000b}.race-card h2{font-size:32px}.race-card p{font-size:15px;line-height:1.6}.race-card button{padding:12px;background:var(--glory);border:0;color:#19230c;font-weight:800;margin:8px}.race-card small{display:block;color:var(--soft);line-height:1.6}#official-result{font-size:24px;color:var(--glory)}
.public-ranks{background:radial-gradient(ellipse at 60% 0,#21334a,transparent 60%),#090e16;min-height:100dvh;padding:50px 20px}.public-board{max-width:740px;margin:auto}.public-board>a{color:var(--glory);font-size:13px}.public-board h1{font:900 clamp(38px,8vw,72px)/.98 Arial,sans-serif;letter-spacing:-.06em;margin:28px 0}.public-board>p{line-height:1.7;color:#a9b8c9;font-size:13px}.public-board .eyebrow{color:var(--glory);margin-top:40px}
@media(max-width:1150px){.cockpit{grid-template-columns:minmax(300px,1fr) 290px 235px}.rank-panel{padding:18px 12px}.career-driving .cockpit{grid-template-columns:1fr 235px}.pilot-wallet{gap:12px}.stage-copy h1{font-size:58px}}
@media(max-width:900px){.cockpit{height:auto;min-height:0;grid-template-columns:minmax(0,1fr) 290px}.rank-panel{grid-column:1/-1;max-height:260px;border-top:1px solid var(--line)}.visualizer{height:650px;min-height:0}.topbar{grid-template-columns:110px 1fr;gap:8px;height:80px;padding:8px 14px}.topbar .logo{width:105px}.topbar .season{display:none}.pilot-wallet{justify-content:flex-end}.career-driving .cockpit{display:flex;flex-direction:column}.career-driving .visualizer{height:calc(100dvh - 178px);min-height:400px}.career-driving .rank-panel{max-height:125px;min-height:96px;padding:8px 14px;position:relative}.career-driving .rank-panel .rank-title h2{font-size:14px;margin:0}.career-driving .rank-panel select{position:absolute;right:12px;top:5px;width:135px;padding:5px}.career-driving .rank-panel label,.career-driving .rank-note,.career-driving .rank-panel .eyebrow{display:none}.career-driving .rank-panel ol{display:flex;gap:18px;margin:8px 0;overflow:auto}.career-driving .rank-panel li{min-width:180px;padding:4px}.career-driving [data-rank-status]{margin:2px 0}.career-driving .rank-panel .rank-empty{margin:0;padding:0;font-size:11px}.career-driving .rank-panel>a{position:absolute;bottom:7px;right:12px}}
@media(max-width:600px){.cockpit{display:flex;flex-direction:column}.visualizer{height:470px}.modulator{overflow:visible}.rank-panel{order:-1;max-height:200px}.rank-panel ol{margin:8px 0}.rank-panel li{padding:7px 0}.rank-panel .eyebrow,.rank-note{display:none}.rank-title h2{font-size:16px;margin:0 0 8px}.rank-panel select{padding:7px}.career-strip{bottom:18px;left:14px;right:14px;padding:12px}.career-strip h2{font-size:20px}.career-strip p{font-size:11px}.car-wrap{transform:translate(-50%,-50%) scale(.68);top:44%}.stage-copy h1{font-size:48px}.pilot-wallet{font-size:10px;gap:10px}.pilot-wallet b{font-size:13px}.pilot-wallet small{font-size:8px}.career-driving .rank-panel{order:0}.race-hud{left:12px;right:12px;padding:10px;gap:16px}.race-hud strong{font-size:24px}.race-top{top:12px;left:12px;right:12px}.race-top h2{font-size:18px}.touch-controls{left:12px;right:12px;gap:5px}.touch-controls button{min-width:42px;font-size:11px}.touch-controls button[data-drive='1']{padding:0 10px}.race-card{padding:18px}.race-card h2{font-size:25px}.race-card p{font-size:13px}}
#toggle-door{pointer-events:auto;background:#14212d;color:#d5f5ff;border:1px solid #5e8a9b;border-radius:6px;padding:8px 12px;cursor:pointer;font:700 11px sans-serif;margin-right:12px;letter-spacing:1px}
#drive-mode-info{font-size:12px;line-height:1.5;color:#c1d2df;margin:8px 0 20px}
.race-hud{background:none;border:0;padding:0;gap:12px}
.race-hud>div{background:#0b1421de;border:1px solid #3c5367;padding:12px}
.race-hud .race-bars{width:30%}
@media(max-width:600px){.race-hud{top:90px;bottom:auto;gap:6px}.race-hud>div{padding:7px}.race-hud .race-bars{width:30%}.race-hud strong{font-size:22px}}

/* Thumb controls: keep the tall accelerator on the outer right edge. */
.career-driving .cockpit{min-height:0}
.career-driving .visualizer{min-height:0;touch-action:none;user-select:none}
.career-driving #car3d canvas{touch-action:none}
.race-hud{bottom:188px}
.steering-hint{position:absolute;left:24px;bottom:155px;z-index:12;color:#fff;font-size:10px;font-weight:700;letter-spacing:.08em;text-shadow:0 2px 5px #000;pointer-events:none}
.touch-steering .steering-hint{color:var(--glory)}
.touch-controls{right:12px;bottom:max(14px,env(safe-area-inset-bottom));align-items:flex-end;pointer-events:none}
.touch-controls button{pointer-events:auto;flex-shrink:0;width:58px;height:58px;-webkit-touch-callout:none;box-shadow:0 5px 16px #0005}
.touch-controls button[data-drive='16']{width:82px;height:110px;border-color:#58e6ff;background:linear-gradient(155deg,#123c51ef,#091d30f5);border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.touch-controls button[data-drive='16'] span{display:block;font-size:10px;letter-spacing:.16em}
.nitro-button svg{width:50px;height:68px;filter:drop-shadow(0 0 5px #29c8ff66)}
.nitro-bottle{fill:#0c7096;stroke:#64e8ff;stroke-width:2.5}
.nitro-valve,.nitro-spark{fill:none;stroke:#a5f6ff;stroke-width:3;stroke-linecap:round}
.nitro-shine{fill:none;stroke:#56bcdc;stroke-width:3;stroke-linecap:round}
.nitro-bolt{fill:#d8ffff;stroke:#67eaff;stroke-width:1}
.touch-controls .nitro-button.pressed{background:#076584;box-shadow:0 0 24px #3adeff88;border-color:#b9ffff}
.nitro-button.pressed svg{filter:drop-shadow(0 0 9px #71eeff);transform:scale(1.06)}
#race-hazard{position:absolute;z-index:14;top:115px;left:50%;transform:translateX(-50%);width:max-content;max-width:92%;padding:12px 18px;border:1px solid #ff6093;border-radius:10px;background:#100f29ec;color:#fff0a9;font-size:13px;font-weight:800;text-align:center;pointer-events:none;box-shadow:0 0 25px #e2337050}
#replay-race{background:#49dbff}
@media(max-width:600px){#race-hazard{top:200px;font-size:11px;padding:9px}}
@media(max-height:540px) and (orientation:landscape){#race-hazard{top:auto;bottom:126px;font-size:10px;padding:7px}}
.touch-controls button[data-drive='1']{padding:8px 10px;width:112px;height:158px;border:2px solid #b7ff5499;border-radius:22px 22px 12px 12px;background:linear-gradient(150deg,#263827ed,#101b19f5);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px}
.accelerator-pedal svg{width:67px;height:112px;overflow:visible;filter:drop-shadow(0 5px 3px #0008)}
.pedal-base{fill:#bed1cd;stroke:#effff7;stroke-width:2}
.pedal-ribs{fill:none;stroke:#334540;stroke-width:6;stroke-linecap:round}
.accelerator-pedal span{font-size:10px;letter-spacing:.1em}
.touch-controls button.pressed{background:#46662a;border-color:var(--glory)}
.touch-controls button[data-drive='1'].pressed{background:#547531;box-shadow:0 0 25px #b7ff5455}
.accelerator-pedal.pressed svg{transform:translateY(3px) scale(.96)}
@media(max-width:900px){.career-driving .visualizer{flex:none}.career-driving .cockpit{height:auto}}
@media(max-width:600px){
  .touch-controls{left:10px;right:8px;gap:6px}
  .touch-controls button{min-width:40px;width:44px;height:52px}
  .touch-controls button[data-drive='16']{width:68px;height:100px;font-size:11px}
  .nitro-button svg{width:44px;height:60px}
  .touch-controls button[data-drive='1']{width:88px;height:145px;padding:8px}
  .accelerator-pedal svg{width:60px;height:102px}
  .accelerator-pedal span{font-size:9px}
  .steering-hint{left:12px;bottom:168px;font-size:8px}
  .race-hud{bottom:auto}
}
@media(max-height:540px) and (orientation:landscape){
  .career-driving .topbar{height:52px}.career-driving .topbar .logo{height:44px}
  .career-driving .cockpit{height:calc(100dvh - 52px);display:grid;grid-template-columns:1fr 190px}
  .career-driving .visualizer{height:100%}.career-driving .rank-panel{grid-column:auto;min-height:0;max-height:none}
  .career-driving .rank-panel select{position:static;width:100%;margin:8px 0}
  .race-top{top:8px;left:12px;right:12px}.race-top h2{font-size:16px}
  .race-hud{bottom:auto;top:78px;left:12px;right:12px;gap:6px}.race-hud>div{padding:5px}.race-hud strong{font-size:20px}
  .touch-controls{bottom:8px}.touch-controls button[data-drive='1']{height:108px;width:80px}
  .accelerator-pedal svg{height:68px;width:44px}.steering-hint{bottom:118px;font-size:8px}
  .touch-controls button[data-drive='16']{height:92px;width:70px}.nitro-button svg{height:55px;width:42px}
  .race-card{padding:8px}.race-card h2{font-size:22px;margin:8px}.race-card p{font-size:12px;margin:8px}
}
