@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Barlow:wght@400;500;600;700&display=swap');
:root{--lime:#d5ff3f;--muted:#9b9eae}*{box-sizing:border-box}body{margin:0;background:#090b17;color:#f4f3f8;font-family:Barlow,Arial,sans-serif;overflow:hidden}#game,.shade{position:fixed;inset:0;width:100%;height:100%}.shade{pointer-events:none;background:linear-gradient(90deg,rgba(6,8,19,.97),rgba(6,8,19,.6) 35%,transparent 75%)}header{position:fixed;top:0;left:0;right:0;height:90px;padding:0 5%;display:flex;align-items:center;gap:30px;z-index:3}.brand{font-weight:800;color:white;text-decoration:none;letter-spacing:2px;font-size:15px}.brand span{color:var(--lime)}.tag{font-size:10px;letter-spacing:2px;color:#bbb}.tag i{display:inline-block;width:6px;height:6px;background:var(--lime);border-radius:50%;margin-right:8px}header button{margin-left:auto}button,input{font:inherit}button{cursor:pointer;border:1px solid #ffffff22;background:#171b2b;color:white;border-radius:5px;font-weight:600;padding:14px 18px;transition:background .2s,transform .2s}button:hover{background:#303746;transform:translateY(-1px)}button:focus-visible,input:focus-visible{outline:2px solid var(--lime);outline-offset:4px}button:disabled{opacity:.5;cursor:wait}.small{font-size:10px;letter-spacing:1px;padding:10px 12px}main{position:absolute;left:8%;top:16%;width:390px}.eyebrow{color:var(--lime);font-size:10px;letter-spacing:3px;font-weight:700}h1,h2{font-family:'Barlow Condensed',Impact,sans-serif;font-weight:800;font-style:italic;line-height:.91;letter-spacing:-1px}h1{font-size:clamp(60px,7vw,100px);margin:22px 0}h1 em{color:var(--lime);font-style:inherit}.intro{font-size:14px;line-height:1.6;color:#aeb2c4;margin-bottom:25px}.panel{width:340px;background:#111522e8;border:1px solid #ffffff1c;border-radius:8px;padding:20px}.paneltop{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1.5px;margin-bottom:22px;color:#acafbc}.paneltop span:last-child{color:var(--lime)}label{display:block;font-size:9px;color:var(--muted);letter-spacing:1.5px;margin-bottom:7px}input{color:white;background:#090d19;border:1px solid #ffffff20;border-radius:4px;padding:11px 12px;width:100%;font-size:13px}.primary{background:var(--lime);color:#151a09;border:0;width:100%;margin-top:12px;padding:14px 16px}.primary:hover{background:#e1ff78}.primary span{float:right}.join{display:flex;gap:8px;margin-top:10px}.join input{width:52%;font-size:10px;letter-spacing:1px;text-transform:uppercase}.join button{flex:1;padding:10px;font-size:11px}.textbutton{background:none;border:0;color:#bec1cd;width:100%;font-size:12px;margin-top:8px;padding:9px}#status{font-size:10px;color:#82899c;margin:10px 0 0;line-height:1.5}.features{display:flex;gap:28px;margin-top:23px;font-size:9px;color:#969cab;letter-spacing:1px}.features b{color:white;font-size:18px;margin-right:4px}#trackLabel{position:absolute;right:7%;bottom:15%;text-align:right}#trackLabel span{font-size:10px;color:var(--lime);letter-spacing:3px}#trackLabel h2{font-size:45px;margin:12px 0}#trackLabel p{font-size:9px;letter-spacing:2px;color:#a3a8ba}footer{position:fixed;bottom:0;left:5%;right:5%;height:64px;display:flex;align-items:center;gap:28px;border-top:1px solid #ffffff18;font-size:9px;letter-spacing:1px;color:#9a9eaf}footer span:last-child{margin-left:auto}kbd{font:10px Barlow,Arial;border:1px solid #ffffff30;border-radius:3px;padding:4px 6px;margin-right:4px;color:#ddd}.hidden{display:none!important}.modal{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(420px,90%);background:#111522f5;border:1px solid #ffffff24;padding:32px;border-radius:12px;text-align:center}.modal h2{font-size:45px}.modal p{font-size:13px;color:#abb1c7;line-height:1.5}#roomCode{display:block;font:52px 'Barlow Condensed',sans-serif;letter-spacing:9px;color:var(--lime);margin:15px}#scores{font-size:18px;margin:25px 0;line-height:2}#hud{position:fixed;inset:110px 5% 100px;pointer-events:none}.hudtop,.hudbottom{display:flex;justify-content:space-between}.hudtop strong{display:block;font:italic 48px 'Barlow Condensed',sans-serif}.hudtop small,.hudbottom small{font-size:10px;letter-spacing:2px;color:#bcc1d3}.timer{text-align:right}.hudbottom{position:absolute;bottom:0;width:100%;align-items:flex-end}.hudbottom strong{font:italic 65px 'Barlow Condensed',sans-serif;margin-right:8px}.hudbottom button{pointer-events:auto}.nitro{width:220px}.nitro span{float:right;color:#6f788e}.nitro>div{height:7px;background:#ffffff22;margin-top:10px}.nitro i{display:block;height:100%;background:var(--lime);width:100%}.progress{width:200px;display:grid;gap:5px;margin-top:15px}.progress div{height:3px;background:var(--lime);width:0}.progress div:last-child{background:#f06cce}#countdown{position:fixed;top:40%;width:100%;text-align:center;font:italic 140px 'Barlow Condensed',sans-serif;color:var(--lime);pointer-events:none}#toast{position:fixed;top:26%;width:100%;text-align:center;color:var(--lime);font-weight:700;font-size:16px;pointer-events:none}#touch{position:fixed;bottom:20px;left:5%;right:5%;gap:10px;display:flex;touch-action:none}#touch button{font-size:20px;background:#141d35bd;width:65px;height:55px;user-select:none}#touch #boost{margin-left:auto;width:110px;color:var(--lime);font-size:14px}body.playing .shade{display:none}body.playing #trackLabel,body.playing #help{display:none}@media(max-height:800px) and (min-width:701px){main{top:13%}h1{font-size:70px;margin:15px 0}.intro{margin-bottom:16px}.panel{padding:15px}.paneltop{margin-bottom:13px}.features{margin-top:14px}}@media(max-width:700px){header{height:70px;padding:0 6%}.tag{display:none}.brand{font-size:12px}main{left:7%;top:13%;width:86%}h1{font-size:65px;margin:15px 0}.intro{font-size:12px;margin-bottom:18px}.panel{width:min(340px,100%);padding:16px}.features{margin-top:18px}#trackLabel{display:none}footer{font-size:8px;gap:12px;height:45px}footer span:last-child{display:none}.shade{background:linear-gradient(90deg,#060813ee,#06081388)}#hud{inset:85px 6% 100px}.nitro{width:130px}.nitro span{display:none}.hudbottom strong{font-size:45px}body{min-height:620px}}@media(max-height:650px){body:not(.playing){overflow:auto}main{position:relative;margin-top:90px;top:0;padding-bottom:70px}footer{display:none}}

.driving{position:absolute;left:50%;top:12px;transform:translateX(-50%);text-align:center;padding:10px 20px;background:#09111cbb;border-radius:6px;font-size:11px;letter-spacing:2px}.driving strong{display:block;margin-top:8px;color:var(--lime);font-size:9px}.driving strong.warning{color:#ffb36a}#hud{text-shadow:0 2px 6px #000}.hudbottom{background:linear-gradient(0deg,#09111c99,transparent);padding:10px;border-radius:8px}.shade{background:linear-gradient(90deg,#060813f7,#060813b0 35%,#06081305 80%)}@media(max-width:700px){.driving{top:95px;white-space:nowrap;padding:8px 12px}.shade{background:linear-gradient(90deg,#060813ef,#06081355)}#trackLabel{display:none}}

#volume{width:70px;padding:0;accent-color:var(--lime);cursor:pointer}.levelLabel{margin-top:12px}select{width:100%;background:#090d19;color:#eee;border:1px solid #ffffff25;padding:10px;border-radius:4px;font:12px Barlow,Arial}.garage{display:grid;gap:5px;margin-top:12px;font-size:9px;letter-spacing:1px}.garage span:first-child{color:#e2b52f}.garage span:last-child{color:#ff7a66}#practiceCar{margin-top:12px;font-size:10px;padding:7px}#carName{display:block;margin-top:8px;color:#f5d17a;font-size:11px}.rev{width:150px;font-size:10px;letter-spacing:1px}.rev>div{height:4px;background:#ffffff22;margin-top:8px}.rev i{display:block;height:100%;background:linear-gradient(90deg,#d5ff3f,#ff603e);width:12%}#closure{position:absolute;top:90px;left:50%;transform:translateX(-50%);color:#ffce79;text-align:center;font-size:12px;white-space:nowrap}.panel{padding:15px}.paneltop{margin-bottom:12px}.intro{margin-bottom:14px}main{top:12%}h1{font-size:70px;margin:15px 0}.features{margin-top:12px}body:not(.playing){overflow-y:auto}#menu{padding-bottom:75px}#help{background:#090b17cc;z-index:2}header{gap:16px}.hudbottom{gap:15px}@media(max-width:700px){h1{font-size:54px}.rev{position:absolute;left:10px;bottom:75px;width:140px}#closure{top:158px;font-size:10px}#carName{max-width:180px;font-size:9px}.hudtop strong{font-size:38px}#volume{width:48px}header{gap:8px}#menu{top:11%}.intro{font-size:11px}.garage{font-size:8px}}@media(max-height:850px){#menu{position:relative;top:0;margin-top:85px}body:not(.playing) #help{display:none}}

.credits{display:block;color:#929dad;text-align:center;font-size:10px;margin-top:10px}
.controls{font-size:10px;color:#bdc7d8;line-height:1.5;margin:12px 0 0}#touch #brake{color:#ffb5a5;font-size:12px;width:80px;border-color:#ff947466}#touch #boost{margin-left:0;width:90px}#touch button{flex:1;min-width:0;padding:8px}#touch{max-width:500px;margin:auto}button:active{filter:brightness(1.3)}

#countdown.networkWait{font:700 clamp(20px,4vw,42px) Barlow,Arial,sans-serif;padding:0 20px;letter-spacing:1px}

#preparation{position:fixed;inset:0;z-index:20;background:#090d17;display:grid;place-items:center;text-align:center;padding:24px}#preparation>div{width:min(420px,100%)}#preparation h2{font-size:clamp(48px,8vw,76px);margin:25px 0}#preparation p{color:#b4bfd1;font-size:14px;line-height:1.7}#preparation progress{display:block;width:100%;height:10px;margin:28px 0 12px;accent-color:#d5ff3f}#prepPercent{font-size:20px;color:#d5ff3f}#prepStatus{min-height:45px}

#graphicsSettings{margin-left:auto;white-space:nowrap}header #sound{margin-left:0;white-space:nowrap}#graphicsPanel{position:fixed;inset:0;margin:auto;width:min(420px,calc(100% - 32px));max-height:90vh;overflow:auto;border:1px solid #ffffff30;border-radius:12px;background:#111522;color:#f4f3f8;padding:28px;box-shadow:0 24px 80px #0009}#graphicsPanel::backdrop{background:#050911b8}#graphicsPanel h2{font-size:36px;margin:0 0 24px}#graphicsPanel p{font-size:13px;line-height:1.6;color:#c1c8d9}#graphicsPanel .qualityHint{font-size:11px;color:#8d98af}#graphicsPanel select{font-size:14px;padding:12px}#qualityDescription{min-height:62px}@media(max-width:440px){header{padding:0 4%;gap:6px}.brand{font-size:10px;letter-spacing:1px}header .small{font-size:9px;padding:9px 7px}#volume{width:32px}#graphicsPanel{padding:22px}}

#performancePanel{position:fixed;right:5%;top:76px;z-index:4;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px 16px;max-width:280px;padding:7px 10px;border-radius:5px;background:#090d19c9;color:#d5ff3f;font-size:11px;pointer-events:none;font-variant-numeric:tabular-nums}#performancePanel b{color:inherit;display:inline-block;min-width:27px}#performancePanel small{width:100%;text-align:right;font-size:9px;color:#b5bdce}#performancePanel .metricWarning{color:#ffad70}body.playing #performancePanel{top:54px}@media(max-width:700px){#performancePanel,body.playing #performancePanel{top:60px;right:6%;padding:4px 8px;font-size:10px;gap:3px 12px}#hud{top:110px}body:not(.playing) #menu{margin-top:112px}#performancePanel small{font-size:8px}}

#closure{width:max-content;max-width:90vw;white-space:normal;line-height:1.5}

#touch #throttle,#touch #handbrake{font-size:11px;padding:4px}#touch #throttle{color:var(--lime)}#touch #handbrake{color:#ffc583}

.carPicker{display:flex;align-items:center;gap:7px}.carPicker select{min-width:0;flex:1;margin:0;font-size:11px}.carPicker button{padding:9px 11px;font-size:22px;line-height:1}.garage small{display:block;font-size:10px;line-height:1.5;color:#aebbd1;margin-top:8px}.garage label{margin-bottom:8px}#lobbyCar,#resultCar{width:100%;font-size:12px}#result{max-height:85vh;overflow:auto}

#cameraFlash{position:fixed;inset:0;background:white;opacity:0;pointer-events:none;z-index:1000}#speedLimit{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border:6px solid #e33232;border-radius:50%;background:#fff;color:#161616;font:bold 25px Arial;margin-right:12px}#speedLimit.hidden{display:none}#speedLimit.speeding{box-shadow:0 0 22px #ff3030}

.paintPicker{margin:12px 0}.paintPicker label{display:block;margin-bottom:6px}.paintPicker select{width:100%;border-left:5px solid var(--paint-color,#9ca8b7)}

.stripePicker{display:grid;grid-template-columns:1.25fr 1fr;gap:10px;margin:12px 0}.stripePicker label{display:block;margin-bottom:6px}.stripePicker select{width:100%;min-width:0}.stripePicker select:disabled{opacity:.45;cursor:not-allowed}

/* Main menu: play modes first, compact garage and optional customization. */
body:not(.playing):has(#menu:not(.hidden)){overflow-y:auto;min-height:100vh}
body:has(#menu:not(.hidden)) #trackLabel,body:has(#menu:not(.hidden)) #help{display:none}
body:has(#menu:not(.hidden)) .shade{background:radial-gradient(ellipse at 85% 20%,#d5ff3f09,transparent 50%),linear-gradient(110deg,#060913f7 15%,#060913e3 65%,#060913b0)}
body:has(#menu:not(.hidden)) header{height:76px;background:#090d17ed;border-bottom:1px solid #ffffff0c}
#menu{position:relative;left:auto;top:auto;width:calc(100% - 64px);max-width:1120px;margin:118px auto 32px;padding:0}
.menuHeading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:26px}
#menu h1{font-size:clamp(42px,4.7vw,66px);line-height:.96;margin:14px 0 16px;letter-spacing:-.8px}
.menuHeading .intro{font-size:15px;color:#aab6c9;margin:0;line-height:1.5}
.raceFacts{display:flex;gap:30px;padding-bottom:3px}.raceFacts span{font-size:12px;color:#aab6c9}.raceFacts b{display:block;font:italic 38px 'Barlow Condensed',sans-serif;color:#f4f3f8;line-height:1.2;margin-bottom:5px}
.menuGrid{display:grid;grid-template-columns:1.2fr 1fr;gap:24px;align-items:start}
.menuCard{padding:24px;border:1px solid #ffffff16;border-radius:18px;background:#101624f2;box-shadow:0 18px 50px #0002}
.sectionTitle{display:flex;align-items:center;gap:10px;margin-bottom:22px}.sectionTitle h2{font:600 20px Barlow,Arial,sans-serif;letter-spacing:0;margin:0}.sectionDot{width:7px;height:7px;flex:none;border-radius:50%;background:var(--lime);box-shadow:0 0 16px #d5ff3f36}.sectionTitle small{margin-left:auto;color:#7f8ba2;letter-spacing:1.3px;font-size:9px}
#menu label{font-size:12px;letter-spacing:.1px;color:#aebbd0;text-transform:none;margin-bottom:8px}
#menu input,#menu select{height:46px;font-size:14px;padding:10px 12px;border-color:#ffffff1b;border-radius:8px;background-color:#090e1b}
#menu select:focus-visible,#menu summary:focus-visible{outline:2px solid var(--lime);outline-offset:4px}
#menu button{border-radius:9px}#menu button:disabled{transform:none;cursor:wait}
.modeCard{display:grid;grid-template-columns:46px 1fr;column-gap:14px;padding:20px;border:1px solid #ffffff14;border-radius:13px;background:#151c2b;margin-bottom:16px}.modeCard.training{background:linear-gradient(110deg,#d5ff3f14,#d5ff3f05);border-color:#d5ff3f38}
.modeIcon{display:grid;place-items:center;align-self:start;width:44px;height:44px;border:1px solid #ffffff1a;border-radius:11px;background:#ffffff06;color:var(--lime);font-size:28px}.modeEyebrow{font-size:9px;letter-spacing:1.7px;color:var(--lime);font-weight:600}.online .modeEyebrow{color:#aab6c9}
#menu h3{font-size:22px;margin:5px 0 7px;font-weight:600}.modeText p{font-size:13px;line-height:1.5;color:#aab6c9;margin:0}
.modeCard .primary{grid-column:1/-1;height:49px;font-size:15px;font-weight:700;margin-top:20px;box-shadow:0 5px 20px #d5ff3f0b}.modeCard .primary span{font-size:22px;line-height:20px}
.onlineSetup{display:grid;grid-template-columns:1fr 1fr;gap:12px;grid-column:1/-1;align-items:end;margin-top:18px}#menu .seriesChoice{padding:0}.onlineSetup button{height:46px;padding:10px 12px;background:#232e43;border-color:#8796ad55;font-size:13px}.onlineSetup button span{margin-left:8px}.onlineSetup button:hover{background:#34425a}.onlineSetup select{font-size:13px!important}.online #seriesHint{grid-column:1/-1;font-size:11px;line-height:1.5;color:#8593ab;margin-top:10px}
.joinChoice{padding:5px 0 0}#menu .join{display:flex;margin:0;gap:10px}#menu .join input{flex:1;width:0;font-size:16px;letter-spacing:3px}#menu .join button{flex:none;font-size:13px;padding:10px 16px}#menu #status{margin:13px 0 0;min-height:17px;font-size:11px;line-height:1.5;color:#a1afc4}
#menu .garage{margin:0;gap:0}.garageBanner{position:relative;border-radius:12px;overflow:hidden;margin-bottom:18px;padding:14px 18px;background:linear-gradient(135deg,#1e293a,#151d2a);border:1px solid #ffffff0d}.garageBanner>span{font-size:9px;letter-spacing:2px;color:#aab6c9!important}.garageBanner svg{display:block;width:100%;height:94px;color:var(--lime);filter:drop-shadow(0 4px 12px #d5ff3f15);margin:3px 0}.garageBanner small{position:absolute;right:16px;top:15px;font-size:8px;letter-spacing:1.1px;color:#8795a9;margin:0}
#menu .carPicker{gap:8px}#menu .carPicker button{height:46px;width:42px;padding:5px;font-size:26px;background:#1b2536}#menu .carPicker select{min-width:0;font-size:14px;font-weight:600}
.customize{margin:14px 0 20px;border-bottom:1px solid #ffffff12;padding-bottom:16px}.customize summary{display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;cursor:pointer;font-size:12px;color:#aebbd0}.customize summary::-webkit-details-marker{display:none}.customize summary span{font-size:11px;color:var(--lime)}.customize summary span:after{content:' +';font-size:16px}.customize[open] summary span:after{content:' −'}.customizeFields .paintPicker{margin:17px 0 12px}.customizeFields .stripePicker{margin-bottom:0}
.setupFields{display:grid;grid-template-columns:1fr 1fr;gap:12px}#menu .setupFields select{font-size:12px}.setupCard .timeChoice{margin-top:16px}.setupHint{font-size:11px;line-height:1.6;color:#8290a7;margin:16px 0 0}
.menuBottom{display:grid;grid-template-columns:1fr auto;align-items:start;gap:24px;margin-top:18px}.menuControls{border:1px solid #ffffff16;border-radius:11px;background:#0d1320e0;padding:16px 18px;font-size:13px}.menuControls summary{cursor:pointer;font-weight:600}.menuControls summary span{font-size:11px;font-weight:400;margin-left:14px;color:#8998b0}.controlGrid{display:flex;flex-wrap:wrap;gap:16px 22px;margin-top:22px;color:#c0cada}.menuControls p{font-size:12px;line-height:1.7;color:#a5b2c6;margin:20px 0 0}.menuLinks{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 18px;max-width:360px}#menu .menuLinks .textbutton{margin:0;width:auto;padding:10px 0}#menu .menuLinks .credits{margin:0;font-size:11px}#menu .statsLaunch{margin:0;font-size:12px;padding:14px 16px}
@media(max-width:850px){#menu{width:calc(100% - 40px)}.menuGrid{gap:16px;grid-template-columns:1.1fr 1fr}.menuCard{padding:18px}.sectionTitle small{display:none}.modeCard{padding:16px}.onlineSetup{grid-template-columns:1fr}.setupFields{grid-template-columns:1fr}.raceFacts{gap:22px}.menuBottom{grid-template-columns:1fr}.menuLinks{max-width:none;justify-content:space-between}}
@media(max-width:640px){body:not(.playing) #menu{width:calc(100% - 28px);margin:116px auto 24px}.menuGrid{grid-template-columns:1fr;gap:16px}.menuHeading{margin-bottom:22px}.raceFacts{display:none}#menu h1{font-size:46px}.menuHeading .intro{font-size:13px}.menuCard{padding:18px}.sectionTitle{margin-bottom:18px}.modeCard{padding:16px}.onlineSetup{grid-template-columns:1fr 1fr}.setupFields{grid-template-columns:1fr 1fr}.menuBottom{gap:12px}.menuLinks{gap:8px 14px}.menuLinks .statsLaunch{width:100%}.menuControls summary span{margin-left:8px}.garageBanner svg{height:110px}.menuControls p{margin-top:16px}.customize summary{min-height:32px}}
@media(max-width:360px){.onlineSetup,.setupFields{grid-template-columns:1fr}#menu .join button{padding:10px}.modeCard{column-gap:10px}#menu h1{font-size:41px}}
@media(prefers-reduced-motion:reduce){#menu button{transition:none}}

.seriesChoice{padding-top:18px}.seriesChoice small{display:block;color:#a5b2c6;font-size:11px;line-height:1.5;margin-top:8px}.seriesScore{padding:12px;border:1px solid #d5ff3f40;border-radius:8px;background:#d5ff3f0c;color:var(--lime)!important;font-size:14px!important;line-height:1.6}#hudSeries{display:block;margin-top:8px;color:var(--lime);font-size:11px;letter-spacing:.5px}#lobby{max-height:90vh;overflow:auto}#result h2{font-size:38px;margin:22px 0}#result #scores{font-size:15px;margin:16px 0}
/* Keep the expanded race result usable on short screens and phones. */
#result{position:fixed;z-index:6;max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;padding:24px}#result h2{margin:12px 0 16px;font-size:38px}#result #scores{font-size:15px;line-height:1.6;margin:16px 0}.penaltySummary{text-align:left;background:#090d19;border:1px solid #ffffff1c;border-radius:8px;padding:14px 16px;margin:0 0 20px}.penaltySummary h3{font-size:13px;font-weight:600;margin:0 0 12px;color:#f4f3f8}

.penaltySummary table{width:100%;border-collapse:collapse;font-size:13px}.penaltySummary th,.penaltySummary td{padding:6px 0}.penaltySummary th{text-align:left;font-weight:400;color:#aeb7ca}.penaltySummary td,.penaltySummary thead th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.penaltySummary td{font-weight:700;padding-left:12px}.penaltySummary thead th{font-size:10px;color:#8f9bb0;padding:0 0 8px}.penaltySummary tbody tr:last-child>*{padding-bottom:12px}.penaltySummary tfoot th,.penaltySummary tfoot td{border-top:1px solid #ffffff20;padding-top:12px;color:var(--lime);font-weight:700}

#result .penaltyHint{font-size:11px;margin:-4px 0 12px;color:#8f9bb0}.penaltySummary table{table-layout:fixed}.penaltySummary th:first-child{width:38%}.penaltySummary td{padding-left:6px;font-size:12px}.penaltySummary thead th:nth-child(2),.penaltySummary tbody td:nth-child(2){color:var(--lime)}.penaltySummary thead th:nth-child(3),.penaltySummary tbody td:nth-child(3){color:#ef91d7}.penaltySummary tfoot td:nth-child(3){color:#ef91d7}@media(max-width:380px){#result{padding:18px}.penaltySummary{padding:12px}.penaltySummary table{font-size:12px}.penaltySummary td{font-size:11px}}

#weatherBadge{position:absolute;top:145px;left:24px;display:grid;gap:5px;padding:11px 15px;border-left:3px solid #d5ff3f;background:#101b28c9;backdrop-filter:blur(8px);text-align:left;max-width:250px}#weatherName{font-size:13px;letter-spacing:.13em;color:#f5f8ff}#weatherSurface{font-size:10px;letter-spacing:.1em;color:#bbd1e0}.prepWeather{color:#d5ff3f!important;font-size:14px!important;max-width:480px;margin:18px auto!important}@media(max-width:650px){#weatherBadge{top:118px;left:12px;padding:8px 10px}#weatherName{font-size:11px}#weatherSurface{font-size:9px}}

/* Keep connection status and the host start action above optional customization. */
#lobby{position:fixed;z-index:6;max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;padding:24px}#lobby h2{font-size:36px;margin:14px 0 20px}#lobby .roomCodeLabel{margin:0}#lobby #roomCode{font-size:42px;letter-spacing:7px;margin:4px 0}#lobby #copy{margin-top:0}#lobbyStatus{min-height:20px;margin:12px 0 0}#lobby #start{font-size:16px;margin-top:12px}#lobby #start:disabled{cursor:default;transform:none}.lobbyConnection{padding-bottom:18px;border-bottom:1px solid #ffffff20}.lobbyGarage{text-align:left;border:1px solid #ffffff20;border-radius:7px;padding:12px;margin:16px 0 4px}.lobbyGarage summary{cursor:pointer;font-size:13px;color:#cbd2df}.lobbyGarage[open] summary{margin-bottom:18px}.lobbyGarage summary:focus-visible{outline:2px solid var(--lime);outline-offset:4px}#lobby #assignment,#lobby #lobbyTime{margin:6px 0}

.raceActions{display:grid;gap:6px;flex-shrink:0}.raceActions #recover{color:var(--lime);border-color:#d5ff3f66}.raceActions button:disabled{cursor:default;transform:none}@media(max-width:700px){.raceActions{gap:4px}.raceActions .small{font-size:9px;padding:9px 8px}}

/* Persistent race records: the native dialog keeps focus above the game. */
#menu .menuLinks{display:grid;grid-template-columns:auto auto;gap:4px 18px}#menu .statsLaunch{grid-column:1/-1;color:var(--lime);border-color:#d5ff3f55;font-size:12px;padding:12px 16px;margin-bottom:3px}#result #openStatsResult{color:var(--lime)}#result .resultSaveStatus,#lobby .lobbyBalance{font-size:11px;line-height:1.65;color:#b9c7dc;margin:14px 0}#lobby .lobbyBalance{padding:10px 12px;border:1px solid #ffffff20;border-radius:7px;background:#090d19}
#statsPanel{position:fixed;inset:0;margin:auto;width:min(1020px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;border:1px solid #ffffff30;border-radius:16px;background:#101624;color:#f4f3f8;padding:28px;box-shadow:0 24px 100px #000b;scrollbar-color:#506077 #101624;color-scheme:dark}#statsPanel::backdrop{background:#030712ce;backdrop-filter:blur(6px)}#statsPanel [hidden]{display:none!important}#statsPanel button:disabled{cursor:wait;transform:none}#statsPanel :is(button,a,select,.statsTableScroll):focus-visible{outline:2px solid var(--lime);outline-offset:4px}
.statsHeading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.statsHeading h2{font-size:44px;margin:12px 0 0;line-height:1.03}.statsHeading .eyebrow{font-size:9px;letter-spacing:2px}#closeStats{flex-shrink:0;font-size:11px;min-height:40px}.statsRules{font-size:12px;color:#a9b6ca;line-height:1.7;max-width:740px;margin:16px 0 22px}.statsAccountBox{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 20px;background:#171f2e;border:1px solid #ffffff1c;border-radius:10px}.statsAccountBox strong{font-size:14px;overflow-wrap:anywhere}.statsAccountBox p{font-size:12px;line-height:1.6;color:#b7c4d6;margin:6px 0 0}.statsAccountBox .statsPrivacy{font-size:10px;color:#9dabc0}.statsSignIn{display:inline-block;flex-shrink:0;color:#111704;background:var(--lime);font-size:12px;font-weight:700;padding:13px 16px;text-decoration:none;text-align:center;border-radius:5px}.statsSignIn:hover{background:#e1ff78}
.statsToolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-top:24px}.statsToolbar>div{width:min(100%,310px)}.statsToolbar label{font-size:11px;letter-spacing:.4px;color:#b6c4d7}.statsToolbar select{font-size:13px;min-height:42px}.statsToolbar button{font-size:12px;min-height:42px;padding:10px 16px}.statsStatus{font-size:11px;line-height:1.6;min-height:18px;color:#a6b6cb;margin:12px 0 0}.statsError{border:1px solid #f4a16d55;background:#552b1c40;border-radius:7px;color:#ffd1ae;padding:12px 15px;font-size:12px;line-height:1.6;margin:12px 0 0;overflow-wrap:anywhere}
.statsSection{margin-top:28px}.statsSectionHeading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:12px}.statsSectionHeading h3{font-size:16px;line-height:1.4;margin:0}.statsSectionHeading p{font-size:10px;line-height:1.6;color:#9faec3;margin:0}.statsSummaryCards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.statsSummaryCards>div{padding:16px 14px;background:#090f1b;border:1px solid #ffffff18;border-radius:9px;min-width:0}.statsSummaryCards span{display:block;font-size:10px;line-height:1.5;color:#a7b6ca}.statsSummaryCards strong{display:block;font:700 28px 'Barlow Condensed',Barlow,Arial,sans-serif;color:var(--lime);font-variant-numeric:tabular-nums;margin-top:7px;white-space:nowrap}
.statsTableScroll{overflow-x:auto;border:1px solid #ffffff20;border-radius:9px;background:#0c121f;scrollbar-color:#526078 #0c121f}.statsTable{width:100%;border-collapse:collapse;text-align:left;font-size:12px;line-height:1.5}.statsLeaderboard{min-width:770px}.statsRivals{min-width:440px}.statsTable th{background:#192232;color:#b3c2d7;font-size:10px;letter-spacing:.4px;font-weight:600;padding:11px 13px;white-space:nowrap}.statsTable td{padding:13px;border-top:1px solid #ffffff10;vertical-align:middle;color:#d9e0eb}.statsTable tbody tr:nth-child(even){background:#ffffff03}.statsTable .statsRank{color:#8495ac;font-variant-numeric:tabular-nums;width:35px}.statsTable .statsDistance{color:var(--lime);font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.statsTable .statsNickname{font-weight:600;min-width:120px;max-width:200px;overflow-wrap:anywhere}.statsTable .statsCar{min-width:160px;max-width:200px;color:#b8c5d8}.statsTable .statsNumeric{text-align:right;font-variant-numeric:tabular-nums}.statsTable .statsEmpty{text-align:center;white-space:normal;color:#a9b8ce;font-size:12px;line-height:1.7;padding:32px 20px}.statsTable .statsMine td{background:#d5ff3f08}.statsTable .statsMine .statsNickname{color:var(--lime)}.statsRivals th:not(:first-child),.statsRivals td:not(:first-child){text-align:right}.statsRivals th:first-child{width:44%}
@media(max-width:700px){#statsPanel{width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:20px 16px;border-radius:12px}.statsHeading{gap:12px}.statsHeading h2{font-size:33px}.statsHeading .eyebrow{font-size:8px;letter-spacing:1.2px}#closeStats{padding:9px 10px}.statsAccountBox{align-items:stretch;flex-direction:column;gap:14px;padding:16px}.statsSignIn{align-self:flex-start}.statsRules{font-size:11px}.statsSectionHeading{align-items:flex-start;flex-direction:column;gap:3px}.statsSummaryCards{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.statsSummaryCards>div{padding:12px 10px}.statsSummaryCards strong{font-size:26px}.statsSummaryCards span{font-size:9px}.statsToolbar{gap:10px}.statsToolbar button{font-size:11px;padding:10px;white-space:nowrap}.statsToolbar select{font-size:12px}.statsSection{margin-top:24px}.statsTable .statsEmpty{padding:24px 16px}.statsTableScroll{max-width:100%}}
@media(max-width:380px){.statsHeading h2{font-size:29px}.statsSummaryCards{grid-template-columns:repeat(2,minmax(0,1fr))}.statsSummaryCards>div:last-child{grid-column:1/-1}.statsToolbar{align-items:stretch;flex-direction:column}.statsToolbar>div{width:100%}.statsToolbar button{align-self:flex-start}}
.statsTable:has(.statsEmpty){min-width:0}.statsTable:has(.statsEmpty) thead{display:none}
#radarWarning{position:absolute;right:0;top:135px;display:flex;align-items:center;gap:13px;width:270px;padding:15px 18px;background:#111b29ed;border:1px solid #ffc96e80;border-left:4px solid #ffc96e;border-radius:8px;color:#ffcf7c;text-shadow:none;box-shadow:0 8px 30px #0004;font-variant-numeric:tabular-nums}#radarWarning .radarIcon{font:36px Arial;color:inherit}#radarWarning [data-radar-title]{display:block;font-size:10px;letter-spacing:1.2px;font-weight:800}#radarWarning strong{display:block;margin:3px 0;font:700 34px 'Barlow Condensed',sans-serif;line-height:1.05;color:#fff}#radarWarning small{display:block;font-size:10px;line-height:1.5;color:#e7d3b4}#radarWarning[data-state="brake"],#radarWarning[data-state="danger"]{border-color:#ff735b;background:#321c21ed;color:#ff9a7e}#radarWarning[data-state="measuring"]{border-color:#d5ff3f;color:#d5ff3f}#radarWarning[data-state="danger"] strong{color:#ffad94}@media(max-width:700px){#radarWarning{top:210px;left:50%;right:auto;transform:translateX(-50%);width:260px;padding:9px 13px;gap:10px}#radarWarning strong{font-size:27px}#radarWarning .radarIcon{font-size:28px}}@media(max-height:550px) and (min-width:701px){#radarWarning{top:75px;width:240px;padding:10px 12px}#radarWarning strong{font-size:28px}}

.radarNotice{position:absolute;right:0;top:110px;width:270px;max-width:100%;padding:14px 16px;display:grid;gap:6px;background:#101824f2;border:1px solid #f2be6655;border-left:3px solid #f2be66;border-radius:6px;text-shadow:none;pointer-events:none;text-align:left;font-variant-numeric:tabular-nums}.radarNotice strong{font-size:16px;color:#ffd18c;letter-spacing:.08em}.radarNotice b{font-size:17px;color:#fff}.radarNotice span{font-size:12px;color:#dbe3ef}.radarNotice small{font-size:11px;color:#ffd18c;border-top:1px solid #ffffff20;padding-top:7px;line-height:1.4}.radarNotice[data-severity=high]{border-left-color:#ff856f}.radarNotice[data-severity=high] strong,.radarNotice[data-severity=high] small{color:#ffad9e}@media(max-width:700px){.radarNotice{top:210px;width:236px;padding:10px 12px;gap:4px}.radarNotice strong{font-size:14px}.radarNotice b{font-size:15px}.radarNotice span{font-size:11px}}@media(max-height:550px){.radarNotice{top:95px;padding:8px 10px;gap:3px;width:235px}}

#hud:has(#radarNotice:not(.hidden)) #radarWarning{display:none}

#menu .nicknameHint{grid-column:1/-1;grid-row:2;margin:0;color:#a9b6ca;font-size:10px;line-height:1.5}
/* Keep primary actions above the fold and preserve the lime customization cue. */
@media(min-width:641px){#menu h1 br{display:none}#menu h1 em{margin-left:.14em}#menu h1{font-size:clamp(40px,4.2vw,60px)}}
#menu .customize summary span{color:var(--lime)}

/* Nitro recharge is visible without taking attention away from the road. */
.nitro #nitroHint{display:block;min-height:14px;margin-top:8px;font-size:9px;letter-spacing:.5px;white-space:nowrap;color:#b5bdce}.nitro.laneBonus #nitroHint{color:var(--lime)}.nitro.laneBonus #fuel{box-shadow:0 0 10px #d5ff3f55}@media(max-width:700px){.nitro #nitroHint{font-size:8px;letter-spacing:0}.nitro{flex-shrink:0}}

/* Thumb controls and safe display edges, including phones with a camera cutout. */
#rotateHint{display:none}
#touch{max-width:none;pointer-events:none;left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));display:grid;grid-template-columns:64px 64px 1fr 64px 64px;grid-template-rows:44px 64px;gap:10px}
#touch button{pointer-events:auto;width:100%!important;height:100%;margin:0!important;border-radius:14px;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;background:#111c30df;border:1px solid #a2b6d766;box-shadow:0 3px 12px #0005;transform:none;font-weight:700}
#touch #left{grid-area:2/1;font-size:30px}#touch #right{grid-area:2/2;font-size:30px}
#touch #autoThrottle{grid-area:1/1/2/3;font-size:11px;letter-spacing:.5px}
#touch #brake{grid-area:2/4;font-size:11px}#touch #throttle{grid-area:2/5;font-size:12px;border-color:#d5ff3f88;background:#26351cdb}
#touch #handbrake{grid-area:1/4;font-size:10px}#touch #boost{grid-area:1/5;font-size:11px;color:var(--lime)}
#touch button.pressed,#touch button[aria-pressed=true]{background:var(--lime);border-color:var(--lime);color:#101807!important;box-shadow:0 0 18px #d5ff3f35}
@media(any-pointer:coarse){
 body.playing{min-height:0;height:100dvh;overflow:hidden;overscroll-behavior:none}
 body.playing #game{touch-action:none}
 #menu input,#menu select,#menu .setupFields select,#menu .carPicker select,.onlineSetup select{font-size:16px!important}
 header{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
 .modal,#graphicsPanel,#statsPanel{max-height:calc(100dvh - max(24px,env(safe-area-inset-top)) - max(24px,env(safe-area-inset-bottom)))}
 #menu{padding-bottom:env(safe-area-inset-bottom)}
}
@media(any-pointer:coarse) and (orientation:landscape) and (max-height:600px){
 body.playing header{height:44px;top:env(safe-area-inset-top);gap:8px;justify-content:flex-end;background:none;border:0;left:auto}
 body.playing header .brand,body.playing header .tag,body.playing #volume{display:none}
 body.playing header button{min-height:44px;padding:8px 10px;font-size:9px}
 body.playing #performancePanel{top:48px;right:max(16px,env(safe-area-inset-right));padding:3px 6px;font-size:9px;gap:8px}
 body.playing #performanceHint{display:none}
 #hud{inset:max(10px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
 .hudtop{justify-content:flex-start;gap:24px;align-items:flex-start}
 .hudtop strong{font-size:29px;line-height:1.1}.hudtop small{font-size:9px;letter-spacing:.6px}
 #carName{display:none}#hudSeries{font-size:9px;margin-top:3px}
 .timer{text-align:left}#place{margin-top:3px}.progress{width:100px;margin-top:6px;gap:3px}
 .driving{top:0;padding:5px 10px;font-size:10px;letter-spacing:1px;max-width:220px}.driving strong{margin-top:4px;font-size:9px}
 #speedLimit{width:30px;height:30px;border-width:4px;font-size:17px;margin-right:5px}
 #closure{top:58px;font-size:10px;width:42%}
 #weatherBadge{top:78px;left:0;padding:5px 7px;gap:3px;max-width:160px}#weatherName{font-size:9px}#weatherSurface{font-size:8px}
 .hudbottom{left:50%;transform:translateX(-50%);bottom:0;width:170px;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:5px 8px;align-items:center;background:none;text-align:center}
 .hudbottom>div:first-child{grid-column:1/-1}.hudbottom strong{font-size:32px;margin-right:4px}.hudbottom small{font-size:9px;letter-spacing:.5px}
 .hudbottom .rev{display:none}.hudbottom .nitro{grid-column:1/-1;width:100%;padding:0 12px}.nitro span{display:none}.nitro>div{margin-top:4px;height:5px}
 .raceActions{grid-column:1/-1;display:flex;gap:6px;justify-content:center}.raceActions .small{min-height:44px;padding:6px 9px;font-size:9px;letter-spacing:0}
 #radarWarning,.radarNotice{left:auto;right:0;top:68px;transform:none;width:180px;padding:6px 8px;gap:3px}
 #radarWarning .radarIcon{display:none}#radarWarning strong{font-size:22px}#radarWarning small,#radarWarning [data-radar-title]{font-size:9px}
 .radarNotice strong,.radarNotice b{font-size:12px}.radarNotice span,.radarNotice small{font-size:9px}.radarNotice small{padding-top:3px}
 #countdown{top:30%;font-size:80px}#toast{top:35%;left:25%;width:50%;font-size:12px}
 body:has(#menu:not(.hidden)) header{height:52px}body:not(.playing) #menu{margin-top:78px;width:calc(100% - max(32px,env(safe-area-inset-left)) - max(32px,env(safe-area-inset-right)))}
 body:not(.playing) #performancePanel{top:54px;font-size:9px}body:not(.playing) #performanceHint{display:none}
 .menuHeading{margin-bottom:16px}#menu h1{font-size:36px}.raceFacts{display:none}
}
@media(any-pointer:coarse) and (orientation:portrait){
 body.playing:has(#touch:not(.hidden)) #rotateHint{display:block;position:fixed;top:46%;left:12%;width:76%;padding:10px 14px;background:#101827db;border:1px solid #ffffff30;border-radius:10px;font-size:12px;text-align:center;pointer-events:none;z-index:4}
 #hud{bottom:155px}#touch{grid-template-columns:58px 58px 1fr 58px 58px;gap:8px;left:12px;right:12px}
}
@media(any-pointer:coarse) and (orientation:landscape) and (max-height:350px){
 #touch{grid-template-rows:40px 56px;gap:6px}.hudbottom strong{font-size:26px}#weatherBadge{display:none}
}

@media(any-pointer:coarse) and (orientation:landscape) and (max-height:600px){.nitro #nitroHint{font-size:8px;margin-top:4px;min-height:10px}}

/* Readable instrument panel: stable digits, grouped telemetry, clear contrast. */
.hudbottom{display:grid;grid-template-columns:190px minmax(130px,180px) minmax(160px,240px) auto;align-items:center;gap:24px;padding:16px 22px;background:#0b1222ed;border:1px solid #ffffff26;border-radius:18px;box-shadow:0 12px 36px #0005;text-shadow:none;max-width:850px;left:50%;transform:translateX(-50%)}
.hudbottom .speedReadout{border-right:1px solid #ffffff26;padding-right:20px;grid-column:auto;text-align:left}.hudbottom small{font-size:10px;letter-spacing:1.5px;color:#b9c6dc}.speedReadout>small{display:block}.speedReadout>div{display:flex;align-items:baseline;gap:8px}.hudbottom #speed{font:800 76px/.98 'Barlow Condensed',sans-serif;font-style:normal;letter-spacing:-2px;font-variant-numeric:tabular-nums;margin:4px 0;color:#fff}.speedReadout>div small{text-transform:none;letter-spacing:0;font-size:14px}#speedStatus{display:block;color:var(--lime);font-size:10px;letter-spacing:.7px;min-height:13px;margin-top:5px}#speedStatus.overLimit{color:#ff927d;font-weight:800}.hudbottom .rev{position:static;display:block;width:auto}.rev .engineReadout{display:flex;justify-content:space-between;align-items:center;background:none;height:auto;margin:0}.gearReadout,.rpmReadout{display:flex;flex-direction:column;gap:4px}.gearReadout b{font:700 40px/1 'Barlow Condensed',sans-serif;color:var(--lime)}.rpmReadout{text-align:right}.rpmReadout b{font-size:23px;font-variant-numeric:tabular-nums}.hudbottom .rev small{font-size:8px}.rev .rpmTrack{height:6px;margin-top:12px;border-radius:4px;overflow:hidden}.rev .rpmScale{display:flex;justify-content:space-between;font-size:8px;color:#8291aa;margin-top:6px;letter-spacing:0}.hudbottom .nitro{width:100%;grid-column:auto;padding:0}.hudbottom .nitro>div{height:9px;border-radius:5px;overflow:hidden}.hudbottom .nitro span{font-size:8px;letter-spacing:0}.hudbottom .raceActions{grid-column:auto}.hudbottom .raceActions button{min-height:38px;background:#182338;border-radius:8px}.hudbottom .nitro #nitroHint{white-space:normal;line-height:1.4}
@media(max-width:850px){.hudbottom{grid-template-columns:130px 115px minmax(110px,1fr);gap:14px;padding:12px 16px}.hudbottom #speed{font-size:60px}.hudbottom .speedReadout{padding-right:12px}.hudbottom .raceActions{position:absolute;bottom:calc(100% + 10px);right:0;display:flex}.hudbottom .nitro span{display:none}}
@media(max-width:520px){.hudbottom{grid-template-columns:105px 85px minmax(70px,1fr);gap:9px;padding:12px;width:100%}.hudbottom #speed{font-size:52px}.hudbottom small{font-size:8px}.rpmReadout b{font-size:18px}.gearReadout b{font-size:30px}.hudbottom .rev small{font-size:7px}#speedStatus{font-size:8px}.hudbottom .nitro #nitroHint{font-size:8px}}
@media(any-pointer:coarse) and (orientation:landscape) and (max-height:600px){.hudbottom{width:min(360px,48vw);grid-template-columns:95px 85px minmax(70px,1fr);gap:10px;padding:9px 12px;bottom:0}.hudbottom #speed{font-size:44px}.hudbottom .speedReadout{grid-column:auto;padding-right:8px}.hudbottom .rev{display:block}.hudbottom .nitro{grid-column:auto;padding:0}.hudbottom .raceActions{bottom:calc(100% + 6px)}.hudbottom small{font-size:8px}.gearReadout b{font-size:28px}.rpmReadout b{font-size:17px}.rev .rpmScale{display:none}#speedStatus{font-size:8px}.hudbottom .nitro #nitroHint{font-size:8px;margin-top:4px}}
