@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=Barlow:wght@400;500;600;700;800&display=swap');
:root{font-family:Barlow,Arial,sans-serif;color:#f7f6e9;background:#101e26;font-synthesis:none;--yellow:#eff27e;--muted:#bcc9c8;--line:#ffffff25}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{color:inherit;cursor:pointer;border:1px solid var(--line);background:#162d34d9}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--yellow);outline-offset:4px}button:hover:not(:disabled){filter:brightness(1.13)}[hidden]{display:none!important}#game{position:relative;width:100%;height:100dvh;min-height:320px;isolation:isolate;overflow:hidden}#scene,#scene canvas,.vignette{position:absolute;inset:0;width:100%;height:100%}.vignette{pointer-events:none;background:linear-gradient(#0817209c,transparent 28%,transparent 65%,#0817206b);z-index:1}.topbar{position:absolute;top:max(22px,env(safe-area-inset-top));left:max(30px,env(safe-area-inset-left));right:max(30px,env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:flex-start;gap:20px;z-index:4}.wordmark{color:inherit;display:flex;align-items:center;gap:10px;text-decoration:none;font-size:18px;line-height:1.05;font-weight:500;letter-spacing:1.1px}.wordmark svg{color:var(--yellow)}.wordmark b{font-weight:800}.wordmark small{display:block;font-size:8px;letter-spacing:1.8px;margin-top:9px;color:#e3e8dc}.wordmark i{font-style:normal;padding:3px 5px;background:#eff27e22;color:var(--yellow);margin-left:7px;font-size:7px}.timer{text-align:center;position:absolute;left:50%;transform:translateX(-50%);text-shadow:0 2px 9px #0004}.timer>span{font-size:9px;letter-spacing:2.5px;font-weight:700}.timer strong{display:block;font:600 clamp(28px,3.2vw,46px)/1.05 'Barlow Condensed',Impact,sans-serif;font-variant-numeric:tabular-nums;letter-spacing:.5px}.timer small{display:block;font-size:8px;letter-spacing:1.3px;color:var(--muted);margin-top:6px}.timer small b{color:#fff;margin-left:6px}.tools{display:flex;gap:8px;margin-left:auto}.tools button{width:46px;height:46px;border-radius:8px;font-size:21px;backdrop-filter:blur(12px)}.tools button small{display:block;font-size:7px;letter-spacing:1px;margin-top:2px}.tools #camera{line-height:1}.route-hud{position:absolute;top:112px;left:30px;right:30px;z-index:3;display:flex;align-items:center;gap:12px;pointer-events:none}.route-hud>span{font-size:10px;font-weight:700;letter-spacing:1px;color:var(--yellow)}.route-hud>div:not(.progress){min-width:174px}.route-hud b{display:block;font-size:11px;letter-spacing:1.3px}.route-hud small{font-size:9px;color:var(--muted);margin-top:4px;display:block}.progress{height:2px;background:#ffffff25;flex:1;margin:0 8px}.progress i{display:block;width:0;height:100%;background:var(--yellow);box-shadow:0 0 10px #eff27e66}.drive-hud{position:absolute;left:32px;right:32px;bottom:134px;display:flex;align-items:flex-end;z-index:3;pointer-events:none}.speedometer{width:126px}.speedometer strong{font:600 74px/.8 'Barlow Condensed',Impact,sans-serif;letter-spacing:-2px;font-variant-numeric:tabular-nums}.speedometer>span{font-size:10px;margin-left:6px;letter-spacing:2px}.rev-track{height:3px;background:#ffffff3b;margin:14px 0 8px}.rev-track i{display:block;background:var(--yellow);height:100%;width:0;transition:width .1s}.speedometer small{font-size:9px;letter-spacing:1px}.pace-note{display:flex;align-items:center;gap:15px;margin:0 auto 4px;padding:10px 20px;background:#0f25314d;border:1px solid #ffffff18;border-radius:10px;backdrop-filter:blur(6px)}.pace-note>span{font-size:34px;font-weight:700;color:var(--yellow)}.pace-note b{font-size:11px;letter-spacing:1px}.pace-note small{display:block;font-size:10px;color:#cdd8d5;margin-top:5px}.map-wrap{width:135px;text-align:center}.map-wrap canvas{width:135px;height:112px;filter:drop-shadow(0 1px 2px #0007)}.map-wrap>span{font-size:8px;letter-spacing:1px;color:#d6e0da}.map-wrap b{color:white;font-size:11px}.touch-controls{position:absolute;bottom:max(25px,env(safe-area-inset-bottom));left:max(30px,env(safe-area-inset-left));right:max(30px,env(safe-area-inset-right));z-index:5;display:flex;justify-content:space-between;pointer-events:none}.touch-controls>div{display:flex;gap:12px;pointer-events:auto}.touch-controls button{width:75px;height:78px;border-radius:14px;user-select:none;-webkit-user-select:none;touch-action:none;backdrop-filter:blur(10px);background:#0d223173;border:1px solid #ffffff4a}.steering button{font-size:50px;line-height:.5}.pedals button{font-size:10px;font-weight:800;letter-spacing:1px}.pedals .brake{width:70px;height:65px;align-self:flex-end}.pedals .gas{color:#142c2c;background:#eff27edb;width:88px;border-color:#eff27e}.gas span{font-size:23px;margin-left:4px}.touch-controls button.held{background:white;color:#183037;transform:translateY(2px)}.overlay{position:absolute;inset:0;z-index:8}.intro{display:flex;align-items:center;background:linear-gradient(90deg,#071a24e8 0%,#071a24a8 32%,#071a2420 65%,transparent);padding:104px 6vw 36px}.intro-content{max-width:410px}.eyebrow{font-weight:700;font-size:10px;letter-spacing:3.4px;color:var(--yellow);margin:0 0 18px}h1{font:800 clamp(56px,6.7vw,94px)/.89 'Barlow Condensed',Impact,sans-serif;letter-spacing:-1px;margin:0 0 22px}h1 em{font-style:normal;color:var(--yellow)}.intro-copy{font-size:14px;line-height:1.65;color:#d5e0dc;max-width:300px;margin:0 0 26px}.specs{display:flex;gap:38px;margin:0 0 28px}.specs b{font:600 29px/1 'Barlow Condensed',Impact,sans-serif}.specs small{display:block;font-size:8px;letter-spacing:1.6px;color:#b8c8c8;margin-top:7px}.primary,.secondary{border-radius:7px;min-height:48px;padding:13px 22px;font-weight:800;font-size:12px;letter-spacing:.5px}.primary{background:var(--yellow);color:#132b30;border-color:var(--yellow)}.intro .primary{width:100%;min-height:55px;text-align:left;position:relative;font-size:13px}.intro .primary:after{content:'→';position:absolute;right:20px;font-size:22px;top:13px}.intro-actions{display:flex;justify-content:space-between;gap:12px;margin-top:10px}.text-button{border:0;background:none;color:inherit;font-size:9px;font-weight:700;letter-spacing:1px;min-height:44px;padding:10px 0;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.prototype-note{font-size:9px;line-height:1.6;color:#93a9ab;max-width:350px;margin:12px 0 0}.vehicle-tag{position:absolute;right:7vw;bottom:70px;text-align:right;text-shadow:0 2px 8px #0008}.vehicle-tag span{font-size:8px;letter-spacing:2.2px;color:var(--yellow)}.vehicle-tag b{display:block;font-size:13px;letter-spacing:1px;margin:9px 0}.vehicle-tag small{font-size:10px;color:#d2ded9}.modal{background:#0719229c;backdrop-filter:blur(7px);display:grid;place-items:center;padding:22px;overflow:auto}.panel{background:#122a33f5;border:1px solid #dae2d536;border-radius:16px;box-shadow:0 30px 120px #0007;width:min(100%,430px);padding:32px}.panel .eyebrow{font-size:9px;letter-spacing:2.5px;margin-bottom:14px}.panel h2{font:700 39px/.96 'Barlow Condensed',Impact,sans-serif;margin:0 0 16px}.panel p{font-size:12px;line-height:1.65;color:#bfd0d0}.panel .primary,.panel .secondary{width:100%;margin-top:9px}.panel .text-button{width:100%}.panel .fineprint{font-size:9px;line-height:1.5;color:#94adb1;margin-bottom:0}.settings{display:flex;align-items:end;gap:12px;margin:18px 0 7px}.settings label{flex:1;font-size:10px}.settings select{display:block;margin-top:7px;width:100%;min-height:42px;background:#223d47;color:white;border:1px solid #ffffff33;border-radius:5px;padding:8px;font-size:11px}.settings button{width:40%!important;font-size:10px;min-height:42px}.finish-time{font:600 67px/1.2 'Barlow Condensed',Impact,sans-serif;color:var(--yellow);font-variant-numeric:tabular-nums;display:block}.board-heading{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:12px 0;font-size:8px;letter-spacing:1.5px;color:#a4bec2}.board-panel ol{list-style:none;padding:0;margin:0}.board-panel li{display:flex;align-items:center;gap:14px;border-bottom:1px solid #ffffff12;min-height:35px;font-size:11px}.board-panel li span:first-child{color:var(--yellow);font-size:9px;width:16px}.board-panel li b{font-weight:600}.board-panel li time{margin-left:auto;font-variant-numeric:tabular-nums}.help-list{padding:0;list-style:none;margin:20px 0}.help-list li{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line);font-size:11px}.help-list span{color:#b9ccce}.consent{display:flex;gap:9px;font-size:10px;line-height:1.5;margin:14px 0}.consent input{width:20px;height:20px;flex:none;accent-color:var(--yellow)}#post-form{margin:18px 0}#post-form>label:first-child{font-size:11px;display:block;margin:8px 0}#post-form label small{font-size:9px;color:#a6bec2}#nickname{background:#0e2028;border:1px solid #ffffff40;color:#fff;width:100%;padding:11px;border-radius:5px;font-size:13px}#countdown{position:absolute;inset:0;display:grid;place-items:center;z-index:7;font:800 130px/1 'Barlow Condensed',Impact,sans-serif;color:var(--yellow);text-shadow:0 7px 35px #031b35aa;pointer-events:none}#toast{position:absolute;top:164px;left:50%;transform:translateX(-50%);max-width:85%;z-index:7;background:#102832d9;color:var(--yellow);padding:11px 18px;border:1px solid #eff27e55;border-radius:6px;font-size:12px;text-align:center;pointer-events:none;opacity:0;transition:opacity .2s}#toast.visible{opacity:1}body[data-phase=menu] .timer,body[data-phase=loading] .timer,body[data-phase=menu] .route-hud,body[data-phase=loading] .route-hud,body[data-phase=menu] .drive-hud,body[data-phase=loading] .drive-hud,body[data-phase=menu] .touch-controls,body[data-phase=loading] .touch-controls{display:none}body[data-phase=menu] #pause,body[data-phase=loading] #pause{display:none}body[data-phase=menu] .topbar,body[data-phase=loading] .topbar{z-index:9}
@media(max-width:650px){.topbar{top:max(18px,env(safe-area-inset-top));left:17px;right:17px;gap:10px}.wordmark{font-size:11px;gap:6px;letter-spacing:.5px}.wordmark svg{width:23px}.wordmark small{font-size:5px;letter-spacing:.9px;margin-top:6px}.wordmark i{font-size:5px;margin-left:3px;padding:2px}.tools{gap:5px}.tools button{width:37px;height:38px}.timer{top:51px;width:150px}.timer strong{font-size:38px}.timer>span{font-size:7px}.timer small{font-size:6px;letter-spacing:.8px}.route-hud{top:134px;left:18px;right:18px;gap:7px}.route-hud>div:not(.progress){min-width:126px}.route-hud b{font-size:9px}.route-hud small{font-size:8px;max-width:145px}.route-hud>span{font-size:8px}.route-hud .progress{margin:0 2px}.drive-hud{left:20px;right:20px;bottom:135px}.speedometer{width:85px}.speedometer strong{font-size:58px}.speedometer>span{font-size:8px;margin-left:3px}.speedometer small{font-size:7px;letter-spacing:.5px}.map-wrap{width:85px}.map-wrap canvas{width:85px;height:75px}.map-wrap>span{font-size:6px}.map-wrap b{font-size:9px}.pace-note{position:absolute;bottom:90px;left:50%;transform:translateX(-50%);gap:8px;padding:7px 12px;min-width:155px}.pace-note>span{font-size:23px}.pace-note b{font-size:9px}.pace-note small{font-size:8px}.touch-controls{left:17px;right:17px;bottom:max(24px,env(safe-area-inset-bottom));}.touch-controls>div{gap:7px}.touch-controls button{width:57px;height:72px;border-radius:11px}.pedals .gas{width:70px}.pedals .brake{width:57px;height:59px}.pedals button{font-size:8px}.steering button{font-size:43px}.intro{padding:88px 25px 30px;background:linear-gradient(90deg,#071a24c9,transparent),linear-gradient(0deg,#071a24f0 0%,#071a2470 65%,#071a2470)}.intro-content{max-width:310px}.intro .eyebrow{font-size:8px;margin-bottom:17px;letter-spacing:2.5px}h1{font-size:clamp(55px,15vw,82px);margin-bottom:17px}.intro-copy{font-size:12px;max-width:240px;margin-bottom:18px}.specs{gap:28px;margin-bottom:20px}.specs b{font-size:25px}.specs small{font-size:7px}.intro .primary{min-height:50px}.intro-actions{gap:5px;margin-top:5px}.intro-actions .text-button{font-size:8px}.prototype-note{font-size:8px;margin-top:5px;max-width:270px}.vehicle-tag{display:none}.panel{padding:25px}.panel h2{font-size:35px}.panel .eyebrow{font-size:8px}.panel p{font-size:11px}#toast{top:187px;font-size:10px}#countdown{font-size:95px}}
@media(max-height:580px) and (min-width:600px){.topbar{top:14px;left:22px;right:22px}.wordmark{font-size:13px}.wordmark small{font-size:6px}.timer strong{font-size:34px}.timer>span{font-size:7px}.timer small{font-size:7px}.tools button{height:38px;width:38px}.route-hud{top:82px;left:23px;right:23px}.drive-hud{bottom:104px;left:24px;right:24px}.speedometer strong{font-size:52px}.speedometer{width:90px}.speedometer small{font-size:7px}.map-wrap{width:95px}.map-wrap canvas{width:95px;height:80px}.touch-controls{bottom:18px;left:22px;right:22px}.touch-controls button{height:64px;width:65px}.pedals .brake{height:52px}.pedals .gas{width:77px}.intro{padding:72px 5vw 18px}.intro-content{max-width:310px}h1{font-size:55px;line-height:.89;margin-bottom:10px}.intro .eyebrow{margin-bottom:10px;font-size:8px}.intro-copy{font-size:10px;margin:0 0 12px;max-width:245px}.specs{gap:25px;margin:0 0 13px}.specs b{font-size:21px}.specs small{font-size:6px;margin-top:4px}.intro .primary{min-height:42px;font-size:11px}.intro .primary:after{top:6px}.intro-actions{margin-top:1px}.intro-actions .text-button{min-height:30px;font-size:7px}.prototype-note{font-size:7px;max-width:290px;margin:2px 0 0}.vehicle-tag{bottom:30px;right:5vw}.vehicle-tag b{font-size:10px}.vehicle-tag small{font-size:8px}.vehicle-tag span{font-size:7px}.panel{padding:22px;max-height:calc(100dvh - 36px);overflow:auto}.panel h2{font-size:30px}.panel .eyebrow{margin-bottom:10px}.panel p{font-size:11px}#toast{top:124px}.pace-note{padding:6px 12px}.pace-note>span{font-size:25px}.pace-note b{font-size:9px}.pace-note small{font-size:8px}}
@media(max-height:690px) and (max-width:599px){.intro{padding-top:80px;padding-bottom:16px}h1{font-size:57px;margin-bottom:14px}.intro-copy{font-size:11px;margin-bottom:15px}.intro .eyebrow{margin-bottom:13px}.specs{margin-bottom:16px}.specs b{font-size:22px}.prototype-note{font-size:7px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Short phones retain access to every action. */
.intro{overflow-y:auto}.panel{max-height:calc(100dvh - 44px);overflow-y:auto}
@media(max-height:520px) and (max-width:599px){.intro{align-items:flex-start;padding-top:80px;padding-bottom:30px}.intro-content{padding-bottom:20px}.vehicle-tag{display:none}}

/* Handbrake stays between steering and pedals, reachable by either thumb. */
.touch-controls .handbrake{pointer-events:auto;align-self:flex-end;width:74px;height:54px;font-size:9px;font-weight:800;letter-spacing:.6px;border-color:#f4c38388;background:#322e2677;color:#ffdc9e}.handbrake small{display:block;font-size:7px;margin-top:5px;letter-spacing:1.6px}
@media(max-width:650px){.touch-controls .handbrake{width:60px;height:48px;font-size:8px}.handbrake small{font-size:6px}}
@media(max-width:374px){.touch-controls{left:10px;right:10px}.touch-controls>div{gap:5px}.touch-controls button{width:50px}.pedals .brake{width:49px}.pedals .gas{width:59px}.touch-controls .handbrake{width:54px}}

#runout-summary{position:absolute;z-index:6;top:170px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:18px;padding:12px 18px;background:#102b33df;border:1px solid #eff27e88;border-radius:10px;box-shadow:0 5px 25px #0003}#runout-summary>span{max-width:115px;font-size:8px;letter-spacing:1.5px;color:var(--yellow);line-height:1.6}#runout-time{font:600 32px/1 'Barlow Condensed',sans-serif;white-space:nowrap}#runout-results{padding:12px;font-size:10px;border-radius:6px;white-space:nowrap;background:var(--yellow);color:#163039;font-weight:800}
@media(max-width:650px){#runout-summary{top:190px;width:calc(100% - 34px);gap:10px;padding:10px}#runout-summary>span{font-size:6px;max-width:75px}#runout-time{font-size:26px}#runout-results{font-size:8px;padding:10px;margin-left:auto}}
@media(max-height:580px) and (min-width:600px){#runout-summary{top:121px;padding:8px 12px;gap:12px}#runout-time{font-size:26px}}

/* Two-thumb touch driving. Fine-pointer desktop pedals and keyboard stay intact. */
.touch-controls .mobile-pedals{display:none}
.touch-controls [data-slide-pad],.touch-controls button{touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
@media (pointer:coarse),(max-width:650px){
 .touch-controls{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));align-items:flex-end}
 .touch-controls .handbrake,.touch-controls .desktop-pedals{display:none}
 .touch-controls .steering{gap:0;border-radius:12px;overflow:hidden}
 .steering button{width:56px;height:72px;border-radius:0}
 .touch-controls .mobile-pedals{display:grid;grid-template-columns:54px 82px;grid-template-rows:48px 64px;gap:0;border-radius:12px;overflow:hidden}
 .mobile-pedals button{width:100%;height:100%;border-radius:0;font-size:10px;font-weight:800;letter-spacing:.4px;backdrop-filter:none}
 .mobile-brake{grid-column:1;grid-row:1 / 3;background:#17313bdb!important}
 .mobile-drift{grid-column:2;grid-row:1;background:#cfa866e8!important;color:#172b2e}
 .mobile-gas{grid-column:2;grid-row:2;background:#eff27ee8!important;color:#172b2e}
 .mobile-gas small{display:block;font-size:6px;letter-spacing:0;margin-top:7px}
 .touch-controls button.held{transform:none;background:#fff!important;color:#183037}
 .drive-hud{left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));bottom:calc(max(14px,env(safe-area-inset-bottom)) + 88px)}
 .speedometer{width:90px}.speedometer strong{font-size:44px}.speedometer small{font-size:6px}.rev-track{margin:8px 0 5px}
 .map-wrap{display:none}
 .pace-note{position:fixed;top:174px;bottom:auto;left:50%;transform:translateX(-50%);margin:0;min-width:0;max-width:80vw;padding:6px 10px;gap:8px}
 .pace-note>span{font-size:22px}.pace-note b{font-size:9px}.pace-note small{font-size:8px;margin-top:3px}
 body[data-phase=runout] .pace-note{display:none}
 #toast{top:228px}
}
@media (pointer:coarse) and (min-width:651px){.pace-note{top:145px}}
@media (max-height:580px) and (min-width:600px) and (pointer:coarse){
 .pace-note{top:110px}.pace-note small{display:none}
 .touch-controls .mobile-pedals{grid-template-rows:44px 52px}
 .drive-hud{bottom:calc(max(14px,env(safe-area-inset-bottom)) + 80px)}
 .speedometer strong{font-size:34px}.speedometer small,.rev-track{display:none}
 #toast{top:148px}
}
@media (max-height:580px) and (orientation:landscape) and (pointer:coarse), (max-height:580px) and (orientation:landscape) and (max-width:650px){
 .topbar{top:max(10px,env(safe-area-inset-top));left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right))}
 .wordmark{font-size:10px;max-width:170px}.wordmark small{font-size:5px}.wordmark i{display:none}
 .timer{top:0;width:120px}.timer strong{font-size:28px}.timer>span{font-size:6px}.timer small{display:none}
 .tools button{width:38px;height:38px}
 .route-hud{top:60px;left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right))}.route-hud small{display:none}
 .pace-note{top:88px}.pace-note small{display:none}
 .touch-controls .mobile-pedals{grid-template-rows:44px 52px}
 .drive-hud{bottom:calc(max(14px,env(safe-area-inset-bottom)) + 80px)}
 .speedometer strong{font-size:34px}.speedometer small,.rev-track{display:none}
 #toast{top:124px}
}
