:root{font-family:'Pretendard','Apple SD Gothic Neo','Noto Sans KR',system-ui,sans-serif;color:#f8f4ed;background:#142c34;font-synthesis:none;--accent:#ffab7a;--panel:rgba(18,38,45,.86)}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,select{font:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button{color:inherit;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);border-radius:12px;padding:12px 18px;cursor:pointer;transition:background .2s,transform .2s}button:hover{background:rgba(255,255,255,.18)}button:active{transform:scale(.97)}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #ffbb88;outline-offset:3px}button:disabled{opacity:.5;cursor:wait}[hidden]{display:none!important}#world,#shade{position:fixed;inset:0;width:100%;height:100%}#shade{pointer-events:none;background:linear-gradient(90deg,rgba(9,31,40,.7),rgba(10,30,36,.05) 72%),linear-gradient(0deg,rgba(6,25,30,.8),transparent 55%)}header{position:fixed;top:0;left:0;width:100%;z-index:3;padding:22px max(30px,env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:center}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;color:#fff;font-size:22px;letter-spacing:4px;font-weight:800}.brand small{font-size:7px;letter-spacing:2px;display:block;margin-top:3px;font-weight:500}.brandmark{background:linear-gradient(135deg,#ffd5a6,#ff754e);color:#1c3c43;display:grid;place-items:center;font-size:30px;font-style:italic;border-radius:13px;width:45px;height:45px;box-shadow:inset 0 2px 2px #ffe3c2,0 5px 18px #0003;letter-spacing:-5px;padding-right:6px}.top-actions{display:flex;gap:8px}.top-actions button{background:#102d3977;backdrop-filter:blur(12px);min-height:44px;padding:10px 14px}.pill{display:flex;align-items:center;gap:9px;border-radius:50px;font-size:13px}.pill i{width:7px;height:7px;border-radius:50%;background:#93a4ab}.pill i.connected{background:#9ef4bf;box-shadow:0 0 12px #9ef4bf}.hero{position:absolute;top:21%;left:5%;pointer-events:none}.eyebrow{font-size:10px;letter-spacing:2.8px;color:#ffbf95;font-weight:700}h1{font-size:clamp(34px,4.2vw,68px);line-height:1.22;letter-spacing:-2.5px;font-weight:500;margin:20px 0}h1 em{font-style:normal;color:#ffd5b4}p{line-height:1.7;color:#b9ccd0;font-size:14px}.hero p{font-size:15px}.hero-chips{display:flex;gap:10px;margin-top:20px;font-size:11px;color:#dbebe8}.hero-chips span:before{content:'•';color:#ffae7e;margin-right:6px}.ride-panel{position:absolute;bottom:57px;left:5%;width:90%;max-width:1400px;background:rgba(17,39,47,.85);border:1px solid #cfedeb25;border-radius:20px;padding:20px 24px;backdrop-filter:blur(20px);box-shadow:0 15px 65px #06182044}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-head h2{margin:0;font-size:16px;font-weight:600}.section-head>span{font-size:9px;letter-spacing:2px;color:#7f9a9f}.routes{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.route{display:flex;text-align:left;padding:9px;gap:14px;align-items:center;background:#ffffff04;border-color:#d8ece414}.route.selected{border-color:#ffc198;background:#ffc19812}.route-art{width:90px;height:62px;border-radius:8px;position:relative;overflow:hidden;flex-shrink:0}.route-art span{position:absolute;font-size:10px;top:8px;left:9px;opacity:.8}.route-art svg{position:absolute;bottom:0;left:0;width:100%;fill:none;stroke:#fff8;stroke-width:2}.coast{background:linear-gradient(165deg,#faab7e,#b7d7c9 48%,#4d9c9b 49%,#286f79)}.forest{background:linear-gradient(150deg,#b3cba2,#699575 45%,#275d52)}.night{background:linear-gradient(150deg,#73738f,#444779 45%,#202f52)}.route-info{flex:1}.route-info strong{display:block;font-size:15px;font-weight:600;margin-bottom:5px}.route-info small{color:#94b0b6;font-size:11px}.route>b{font-size:22px;font-weight:400;color:#d9af8f;padding-right:8px}.ride-options{display:flex;gap:18px;align-items:center;margin-top:17px}.segmented{background:#081e2777;padding:4px;border-radius:10px;display:flex}.segmented button{border:0;background:transparent;padding:9px 16px;font-size:12px;color:#a4b5b8}.segmented .active{background:#3c535b;color:#fff;box-shadow:0 2px 4px #0002}.ride-options label{font-size:12px;color:#9db3b9}select{background:#243e47;color:#fff;border:1px solid #80989844;border-radius:8px;padding:9px;margin-left:8px}.primary{background:#ffb17e;color:#183139;border:0;font-weight:750;box-shadow:inset 0 1px 1px #ffe8ce}.primary:hover{background:#ffc59c}.ride-options .primary{margin-left:auto;min-width:200px;display:flex;justify-content:space-between;gap:30px}.hint{font-size:11px;color:#9ab0b6;margin-bottom:0}.ride-panel>.hint{margin-top:10px}footer{position:absolute;bottom:16px;left:5%;width:90%;display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#abc2c6}footer button{padding:4px 12px;border:0;background:none;font-size:11px}dialog{background:#172f38;color:#f6f1e8;border:1px solid #557078;border-radius:22px;padding:27px;width:min(560px,92vw);max-height:90dvh;box-shadow:0 30px 130px #0008}dialog::backdrop{background:#06151ccc;backdrop-filter:blur(8px)}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h2{margin:6px 0;font-size:23px}.dialog-head small{font-size:10px;letter-spacing:2px;color:#ffbc90}.dialog-head button{border:0}.sensor-readings{display:grid;grid-template-columns:repeat(4,1fr);background:#0b232c;border-radius:12px;padding:18px;margin:18px 0;text-align:center}.sensor-readings strong{font-size:32px;font-weight:500;display:block}.sensor-readings small{font-size:10px;color:#93b5bc}.sensor-buttons{display:flex;gap:10px}.sensor-buttons .primary{flex:1}.input-select{font-size:13px}#device-list{display:grid;gap:8px;max-height:180px;overflow:auto;margin:10px 0}#device-list button{text-align:left;display:flex;justify-content:space-between;font-size:12px}details{margin-top:16px;font-size:12px;color:#b9cdd2}summary{cursor:pointer}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.6 monospace;max-height:180px;overflow:auto;background:#0c242b;padding:12px;border-radius:8px}dialog>button{margin:12px 5px 0 0}ol{padding-left:22px}ol li{padding:7px}ol p{margin:4px 0}.glass{background:#102b35bb;border:1px solid #d2e8e833;backdrop-filter:blur(16px);border-radius:14px}.racing #shade{background:linear-gradient(0deg,#071a2780,transparent 35%,transparent 70%,#071a2755)}.racing header{padding-top:14px}.racing .brand small{display:none}.racing .brand{font-size:17px}.racing .brandmark{width:32px;height:32px;font-size:22px;border-radius:9px}.race-top{position:absolute;top:86px;left:28px;right:28px;display:flex;align-items:start;gap:16px}.route-label{padding:14px 22px;min-width:160px}.route-label small{display:block;color:#b4d0d5;font-size:11px}.route-label strong{font-size:35px;font-weight:600}.route-label strong span{font-size:15px;font-weight:400;color:#91afb7}.progress-block{padding:15px 20px;width:min(450px,50vw);margin:auto}.progress-block>div:first-child{display:flex;justify-content:space-between;font-size:12px;gap:25px;color:#cce0e2}.progress{height:4px;background:#ffffff25;border-radius:4px;margin-top:12px;overflow:hidden}.progress i{display:block;width:0;height:100%;background:#ffb17e}.race-bottom{position:absolute;bottom:35px;left:28px;right:28px;display:flex;gap:16px;align-items:end}.speedometer{display:flex;gap:30px;align-items:center;padding:16px 24px}.speedometer strong{font-size:64px;font-weight:500;letter-spacing:-3px;line-height:1}.speedometer span{display:block;font-size:10px;color:#abc7cd;margin-top:7px}.speedometer .cadence{border-left:1px solid #cce0e233;padding-left:25px}.speedometer .cadence strong{font-size:33px;letter-spacing:-1px}.race-meta{padding:16px 22px;margin-left:auto;font-size:12px;line-height:1.9}.race-meta small{display:block;color:#b5c9ce;font-size:10px}.race-meta>span:last-child{color:#ffbd91;display:block}.pedal{background:#ffb17e;color:#173039;min-width:140px;height:90px;border:0;border-radius:18px;touch-action:none;font-weight:750;user-select:none;-webkit-user-select:none;box-shadow:0 5px 0 #b66d4e,inset 0 1px 0 #ffe1c3}.pedal small{display:block;font-weight:400;font-size:11px;margin-top:8px}.pedal.pressed{background:#ffdfb8;transform:translateY(3px);box-shadow:0 2px 0 #b66d4e}.race-copy{position:absolute;bottom:10px;left:29px;font-size:9px;color:#bfd3d6aa}#race-notice{position:absolute;top:37%;left:50%;transform:translateX(-50%);color:#fff3df;text-shadow:0 2px 10px #000;text-align:center;font-size:14px;pointer-events:none}#countdown{position:absolute;inset:0;display:grid;place-items:center;font-size:100px;font-weight:700;pointer-events:none;text-shadow:0 5px 60px #000}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#071f2cee;border:1px solid #8eacb5;border-radius:12px;padding:12px 20px;font-size:13px;max-width:85vw;text-align:center;z-index:10;pointer-events:none;opacity:0;transition:opacity .2s}#toast.visible{opacity:1}#result-overtakes{font-size:58px;color:#ffbd91;margin:15px 0}#result-stats{display:flex;flex-wrap:wrap;gap:20px;line-height:1.7}#result-stats b{font-size:23px;display:block}#result-stats small{color:#a6c1c7}#records article{padding:13px 0;border-bottom:1px solid #67858c44;font-size:13px;display:flex;justify-content:space-between;gap:12px}#records article small{display:block;color:#9cb5bc;font-size:11px;margin-top:5px}
@media(min-width:1600px){.ride-panel{left:50%;transform:translateX(-50%)}.hero{left:calc((100% - 1400px)/2)}}
@media(max-height:650px) and (orientation:landscape){header{padding:12px 24px}.brand{font-size:18px}.brandmark{width:34px;height:34px;font-size:24px}.hero{top:22%;left:4%}h1{font-size:32px;margin:12px 0}.hero p,.hero-chips{display:none}.eyebrow{font-size:8px}.ride-panel{left:4%;width:92%;bottom:33px;padding:12px 16px;border-radius:15px}.section-head{margin-bottom:8px}.section-head h2{font-size:13px}.route{padding:6px;gap:8px}.route-art{width:58px;height:42px}.route-info strong{font-size:12px}.route-info small{font-size:9px}.route>b{font-size:16px}.ride-options{margin-top:9px;gap:10px}.ride-options label{font-size:10px}.ride-options select{padding:6px}.segmented button{padding:7px 10px;font-size:11px}.ride-options .primary{min-width:160px;padding:11px 15px;font-size:12px}.ride-panel>.hint{font-size:9px;margin-top:6px}footer{bottom:6px;font-size:9px}.race-top{top:65px;left:18px;right:18px;gap:10px}.route-label{padding:8px 14px;min-width:130px}.route-label strong{font-size:27px}.progress-block{padding:12px 18px}.race-bottom{bottom:25px;left:18px;right:18px}.speedometer{padding:12px 20px;gap:20px}.speedometer strong{font-size:48px}.race-meta{padding:10px 15px}.pedal{height:76px;min-width:130px}.race-copy{bottom:7px;left:19px}dialog{max-height:93dvh;padding:20px}.sensor-readings{padding:10px;margin:10px 0}}
@media(max-height:430px) and (orientation:landscape){.hero{top:22%}h1{font-size:27px;margin:6px 0}.hero .eyebrow{display:none}.ride-panel{padding:10px 14px}.section-head{display:none}.route-art{height:35px}.route-info small{font-size:8px}.ride-panel>.hint{font-size:8px}.race-meta{display:none}}
@media(orientation:portrait){body{overflow-y:auto}#home{position:relative;min-height:100dvh;padding:120px 20px 24px}header{padding:18px 20px}.brand{font-size:17px}.brandmark{width:34px;height:34px;font-size:24px}.top-actions{gap:5px}.top-actions button{padding:9px;min-width:38px}.pill span{max-width:85px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hero{position:relative;top:auto;left:auto;margin:4vh 0 35vh}h1{font-size:40px}.hero p{font-size:13px}.hero-chips{display:none}.ride-panel{position:relative;bottom:auto;left:auto;width:100%;padding:16px;backdrop-filter:blur(15px)}.routes{grid-template-columns:1fr;gap:8px}.route-art{width:65px;height:44px}.route-info strong{font-size:13px}.ride-options{flex-wrap:wrap;gap:12px}.segmented{width:100%}.segmented button{flex:1}.ride-options .primary{flex:1;min-width:140px}.ride-options label{font-size:10px}select{padding:8px;margin-left:4px}footer{position:relative;bottom:auto;left:auto;width:100%;margin-top:18px}footer>span:last-child{display:none}.racing{overflow:hidden}.race-top{top:85px;left:14px;right:14px;flex-wrap:wrap}.route-label{min-width:100px;padding:10px 14px}.route-label strong{font-size:28px}.progress-block{width:auto;flex:1;padding:12px}.progress-block>div:first-child{font-size:10px;gap:8px}.race-top>button{padding:10px}.race-bottom{bottom:35px;left:14px;right:14px;flex-wrap:wrap;gap:10px}.race-meta{display:none}.speedometer{padding:14px;gap:20px;flex:1}.speedometer strong{font-size:48px}.speedometer .cadence{padding-left:16px}.pedal{min-width:110px;height:85px;padding:12px}.race-copy{left:15px}.racing header .brand{font-size:14px}.racing header{padding:15px}.racing .brandmark{display:none}}
/* Photography edition: restrained, dark performance dashboard. */
:root{--accent:#91e6fb;--panel:rgba(10,20,30,.88)}#shade{background:linear-gradient(0deg,#030b16ed 0%,#07111d44 50%,#07111d44 100%)}.brandmark{background:linear-gradient(135deg,#d9f7ff,#65cfe9);color:#102c39;box-shadow:inset 0 1px 1px #fff8,0 5px 20px #06101e66}.brand{letter-spacing:5px}.hero{top:21%;left:5%;z-index:1}.hero h1{font-size:clamp(34px,4.05vw,64px);font-weight:650;line-height:1.25}.hero h1 em{color:#b6e9f4}.eyebrow{color:#b2deec}.hero-chips span:before{color:#91e6fb}.hero p{color:#d2dce4}.car-showcase{position:absolute;right:5%;top:19%;width:42%;height:39%;display:flex;flex-direction:column;justify-content:center;align-items:center;pointer-events:none}.car-showcase img{max-height:100%;max-width:100%;object-fit:contain;filter:drop-shadow(0 25px 30px #020811cc)}.car-kicker{position:absolute;top:-14px;right:0;font-size:10px;letter-spacing:2px;color:#cbe9f2}.car-spec{width:85%;display:flex;justify-content:space-between;font-size:9px;letter-spacing:1px;color:#c6d9e3;padding-top:8px}.car-spec span:last-child{letter-spacing:0}.ride-panel{background:#07131fe8;border-color:#a7c2d431;box-shadow:0 20px 70px #0005;border-radius:16px}.route{border-radius:10px;background:#ffffff03}.route.selected{border-color:#9ad7e5;background:#9ad7e510}.route>b{color:#90d8ed}.route-art{width:100px;background-size:cover;background-position:center}.route-art svg{display:none}.route-art span{background:#071722aa;padding:3px 5px;border-radius:3px}.route-art.coast{background-image:url('assets/coast.webp')}.route-art.forest{background-image:url('assets/forest.webp')}.route-art.night{background-image:url('assets/city.webp')}.primary{background:#afe8f5;color:#0c2635;box-shadow:inset 0 1px 0 #ecfbff}.primary:hover{background:#d1f5fc}.segmented{background:#020a14}.segmented .active{background:#304a5b}.glass{background:#091522d9;border-color:#c7e9fc25;border-radius:10px}.pedal{background:#b7e9f6;color:#0a2636;border-radius:12px;box-shadow:0 4px 0 #547f94}.pedal.pressed{background:#ddf8ff;box-shadow:0 1px 0 #547f94}.progress i{background:#b1e8f5}.race-meta>span:last-child{color:#a9e6f7}.race-bottom{bottom:30px}.race-meta{margin-right:170px}.steering{position:absolute;bottom:38px;left:50%;transform:translateX(-50%);display:flex;gap:14px;z-index:2}.steering button{width:76px;height:70px;background:#0c1d2cbb;border:1px solid #a6e4ff88;border-radius:13px;color:#def7ff;font-size:23px;backdrop-filter:blur(12px);touch-action:manipulation;user-select:none}.steering button small{font-size:8px;display:block;letter-spacing:1px;margin-top:3px}.racing #photo-credit{display:none}#photo-credit{position:absolute;right:5%;bottom:42px;font-size:8px;letter-spacing:1px;color:#9db5c3;pointer-events:none}dialog{background:#101e2c;border-color:#547184}.racing #shade{background:transparent}.speedometer strong{font-variant-numeric:tabular-nums}.race-meta{display:none}.race-bottom .pedal{margin-left:auto}.race-copy{font-size:8px}
@media(max-height:650px) and (orientation:landscape){.hero{top:22%;left:4%}.hero h1{font-size:29px;letter-spacing:-1px;margin:8px 0}.car-showcase{right:6%;top:18%;width:39%;height:32%}.car-kicker{font-size:8px;top:-8px}.car-spec{display:none}.route-art{width:68px}.steering{bottom:31px;gap:10px}.steering button{width:64px;height:60px;padding:8px;font-size:20px}.race-bottom{bottom:30px}#photo-credit{display:none}.ride-panel{bottom:35px}.racing .speedometer strong{font-size:43px}.racing .speedometer .cadence strong{font-size:27px}.speedometer .cadence{padding-left:17px}.speedometer{gap:18px}.pedal{min-width:125px}}
@media(max-height:430px) and (orientation:landscape){.hero{top:21%}.hero h1{font-size:25px}.car-showcase{top:18%;height:31%}.car-kicker{display:none}.route-art{width:58px}.steering button{width:58px;height:55px}.speedometer{padding:10px 14px}.speedometer strong{font-size:38px!important}.speedometer .cadence strong{font-size:25px!important}.pedal{height:65px;min-width:110px}}
@media(orientation:portrait){.hero{top:auto;left:auto;margin-top:0;margin-bottom:38vh}.hero h1{font-size:34px}.car-showcase{width:85%;height:28vh;top:31vh;right:7.5%}.car-kicker{font-size:8px}.car-spec{display:none}#photo-credit{display:none}.ride-panel{bottom:auto}.steering{bottom:138px}.steering button{width:75px;height:60px}.race-bottom{bottom:35px}.route-art{width:70px}.speedometer{gap:12px}.speedometer strong{font-size:40px}.speedometer .cadence strong{font-size:27px}}

/* Free drive: keep distance and trip information at the very bottom. */
.race-top{justify-content:flex-end;pointer-events:none}.race-top #pause{pointer-events:auto}
.ride-telemetry{position:absolute;bottom:max(7px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(610px,68vw);padding:8px 12px;pointer-events:none;background:#06111de0;border-radius:8px}
.telemetry-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:#c8e5ef;white-space:nowrap;font-variant-numeric:tabular-nums}.telemetry-row strong{font-weight:600;color:#9aeeff}.ride-telemetry .progress{margin-top:6px;height:2px}
.race-bottom{bottom:64px}.steering{bottom:66px}#result-overtakes{font-size:44px;color:#a4eeff}
@media(max-height:650px) and (orientation:landscape){.race-bottom{bottom:59px}.steering{bottom:61px}.ride-telemetry{width:min(580px,70vw);padding:6px 10px}.telemetry-row{font-size:10px;gap:8px}.race-top{top:65px}.race-copy{bottom:9px;left:14px}}
@media(orientation:portrait){.ride-telemetry{width:calc(100% - 28px);bottom:8px}.telemetry-row{font-size:9px;gap:6px}.telemetry-row #race-course{max-width:32%;overflow:hidden;text-overflow:ellipsis}.race-bottom{bottom:63px}.steering{bottom:166px}.race-copy{display:none}}

#tilt-toggle{font-size:11px;white-space:nowrap}#tilt-toggle[aria-pressed=true]{background:#a5eaff;color:#092533;border-color:#b9f3ff}.tilt-options{display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-size:12px}.tilt-options button{font-size:12px}.top-actions #tilt-toggle{padding:8px 10px}@media(max-width:600px){.racing .brand>span:last-child{display:none}.top-actions{gap:4px}.top-actions button{padding:8px}.pill{font-size:11px}}

.route-art.meadow,.route-art.endless{background-image:url('assets/meadow.webp')}.route-art.endless{background-image:linear-gradient(90deg,#8dc36f33,#76cde433),url('assets/meadow.webp')}.routes{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.route{gap:8px}.route-art{width:64px}.route-info strong{font-size:12px}.route-info small{font-size:9px}.route>b{font-size:16px;padding-right:2px}@media(max-width:1250px) and (orientation:landscape){.route-art{width:40px;height:40px}.route-info strong{font-size:10px}.route-info small{font-size:8px}.route{padding:6px}.route>b{display:none}.ride-options{gap:9px}.ride-options .primary{min-width:150px}.segmented button{padding:8px 10px}}@media(orientation:portrait){.routes{grid-template-columns:1fr}.route-art{width:70px}.route-info strong{font-size:13px}.route-info small{font-size:10px}}



/* 1.2.1: clear central road view on phones and tablets. */
.racing .race-bottom{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(max(8px,env(safe-area-inset-bottom)) + 43px);pointer-events:none}
.racing .speedometer{padding:4px 6px;gap:14px;background:transparent;border:0;box-shadow:none;backdrop-filter:none;text-shadow:0 1px 4px #000,0 0 10px #0008}
.racing .speedometer strong{font-size:32px!important;letter-spacing:-1px}.racing .speedometer .cadence{padding-left:12px;border-left:1px solid #fff5}.racing .speedometer .cadence strong{font-size:23px!important}.racing .speedometer span{font-size:8px;margin-top:3px;color:#edfaff}
.racing .steering{left:auto;right:max(12px,env(safe-area-inset-right));bottom:calc(max(8px,env(safe-area-inset-bottom)) + 43px);transform:none;gap:8px}
.racing .steering button{width:52px;height:48px;padding:0;background:#07152245;border:1px solid #d6f3ff66;backdrop-filter:none;font-size:23px;box-shadow:none;text-shadow:0 1px 4px #000}
.racing .race-bottom .pedal{position:absolute;right:0;bottom:59px;min-width:112px;height:42px;padding:8px 12px;background:#b7e9f64d;color:#f0fbff;border:1px solid #d4f5ff66;box-shadow:none;font-size:12px;pointer-events:auto;text-shadow:0 1px 3px #000}
.racing .pedal small{display:none}.racing .ride-telemetry{background:#06111d55;border:0;backdrop-filter:none;padding:5px 8px}.racing .telemetry-row{font-size:9px}
@media(max-height:450px) and (orientation:landscape){.racing .speedometer strong{font-size:28px!important}.racing .speedometer .cadence strong{font-size:20px!important}.racing .steering button{width:48px;height:44px}.racing .race-bottom .pedal{bottom:53px;height:38px;min-width:104px}}

@media(orientation:portrait){.racing .race-bottom .pedal{right:calc(50% - 56px);bottom:0}}
/* Home fits one viewport; normal layout keeps title, preview and controls separate. */
html,body{height:100%;overflow:hidden}
#home{position:fixed;inset:0;width:100%;height:100dvh;min-height:0;padding:clamp(70px,11dvh,100px) clamp(16px,4vw,80px) 10px;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);grid-template-rows:minmax(0,1fr) auto 24px;grid-template-areas:'hero car' 'panel panel' 'foot foot';gap:12px 24px;overflow:hidden}
#home .hero{grid-area:hero;position:static;align-self:center;min-width:0;min-height:0;margin:0;transform:none}
#home .hero h1{font-size:clamp(28px,4vw,62px);margin:10px 0;line-height:1.2}
#home .hero p{margin:8px 0;font-size:clamp(11px,1.15vw,15px)}#home .hero-chips{margin-top:12px}
#home .car-showcase{grid-area:car;position:static;inset:auto;min-width:0;min-height:0;width:100%;height:100%;transform:none;overflow:hidden}
#home .car-showcase img{width:100%;height:100%;min-height:0;max-width:100%;max-height:100%;object-fit:contain}
#home .car-kicker,#home .car-spec{display:none}
#home .ride-panel{grid-area:panel;position:static;inset:auto;transform:none;min-width:0;min-height:0;width:100%;max-width:none;margin:0;padding:16px 18px}
#home footer{grid-area:foot;position:static;inset:auto;transform:none;min-width:0;width:100%;height:24px;margin:0;font-size:9px}
#photo-credit{display:none}
@media(orientation:portrait){
 #home{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto 22px;grid-template-areas:'hero' 'car' 'panel' 'foot';gap:8px;padding-left:16px;padding-right:16px}
 #home .hero h1{font-size:clamp(28px,4.5vw,42px);margin:4px 0;letter-spacing:-1px}
 #home .hero p{font-size:12px;margin:6px 0}#home .hero-chips{display:none}
 #home .ride-panel{padding:12px}#home .section-head{margin-bottom:8px}#home .section-head h2{font-size:14px}#home .section-head>span{font-size:8px;letter-spacing:1px}
 #home .routes{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}#home .route{min-width:0;min-height:48px;padding:6px;gap:7px}#home .route-art{width:40px;height:36px}#home .route-info{min-width:0}#home .route-info strong{font-size:12px;margin-bottom:3px}#home .route-info small{font-size:9px;white-space:normal}#home .route>b{display:none}
 #home .ride-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:9px}#home .segmented{grid-column:1/-1;width:100%;padding:3px}#home .segmented button{padding:7px 9px;font-size:11px}#home .ride-options label{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:10px;white-space:nowrap}#home .ride-options select{min-width:0;max-width:72%;padding:7px 4px;margin-left:0;font-size:10px}#home .ride-options .primary{grid-column:1/-1;margin:0;width:100%;min-width:0;padding:10px 14px;font-size:12px}
 #home .ride-panel>.hint{font-size:9px;line-height:1.4;margin-top:7px}
}
@media(orientation:portrait) and (max-width:600px){#home .hero .eyebrow,#home .hero p{display:none}#home .route-info strong{font-size:11px}#home .route-info small{font-size:8px}#home .route-art{width:34px}#home footer{font-size:8px}}
@media(orientation:portrait) and (max-height:650px){#home{grid-template-rows:minmax(0,1fr) auto 20px;grid-template-areas:'hero' 'panel' 'foot';padding-top:70px;gap:6px}#home .car-showcase{display:none}#home .hero h1{font-size:24px}#home .hero .eyebrow,#home .hero p{display:none}#home .ride-panel{padding:9px}#home .route{min-height:43px;padding:4px}#home .route-art{height:30px}#home .ride-panel>.hint{display:none}#home .section-head{margin-bottom:6px}#home .ride-options{gap:5px;margin-top:6px}}
@media(orientation:landscape) and (max-height:650px){#home{padding-top:70px;padding-bottom:6px;grid-template-rows:minmax(0,1fr) auto 20px;gap:8px 20px}#home .hero h1{font-size:clamp(23px,4.6dvh,32px);margin:4px 0}#home .ride-panel{padding:10px 12px}#home .ride-panel>.hint{font-size:8px;margin-top:5px}#home .ride-options{margin-top:8px}#home .section-head{margin-bottom:6px}}
@media(orientation:landscape) and (max-height:430px){#home{padding-top:64px;gap:6px 18px}#home .hero h1{font-size:23px}#home .hero .eyebrow,#home .hero p,#home .hero-chips,#home .ride-panel>.hint,#home .section-head{display:none}#home .ride-panel{padding:9px 11px}#home .route{min-height:44px}#home .ride-options .primary{padding:9px 12px}#home .ride-options select{padding:6px}#home .segmented button{padding:6px 8px}}
@media(orientation:landscape) and (max-width:720px){#home .route-art{display:none}#home .route-info strong{font-size:10px}#home .route-info small{font-size:8px}#home .ride-options{gap:6px}#home .ride-options label{font-size:9px}#home .ride-options select{margin-left:2px;font-size:9px}#home .segmented button{font-size:10px}#home .ride-options .primary{min-width:120px;font-size:11px}#home footer{font-size:8px}}
@media(max-width:600px){header{padding:12px}.brand>span:last-child{display:none}.brandmark{width:32px;height:32px}.top-actions{gap:4px}.top-actions button{min-width:32px;padding:7px;min-height:36px}.top-actions .pill{font-size:10px}.top-actions #tilt-toggle{padding:7px;font-size:10px}}
@media(orientation:portrait){#home .route:last-child{grid-column:1/-1}}

/* Two-handed controls: middle left and middle right, away from the road center. */
.racing .steering{position:fixed;inset:0;transform:none;display:block;pointer-events:none}
.racing .steering button{position:absolute;top:50%;transform:translateY(-50%);width:64px;height:86px;pointer-events:auto;background:#06152238;border:1px solid #d7f5ff55;border-radius:18px;font-size:30px;touch-action:manipulation}
.racing #lane-left{left:max(8px,env(safe-area-inset-left))}.racing #lane-right{right:max(8px,env(safe-area-inset-right))}
.racing .steering button:active{transform:translateY(-50%) scale(.96);background:#d0efff45}
@media(max-height:450px){.racing .steering button{width:54px;height:72px;font-size:26px}}
#steering-live{font-variant-numeric:tabular-nums;color:#b4edfc;font-size:13px}

.racing .steering button{touch-action:none;user-select:none;-webkit-user-select:none}

/* Open-road taps never pan/zoom the viewport or obscure the scenery. */
.racing #world,.racing #race-ui{touch-action:none;-webkit-user-select:none;user-select:none}
/* All completion content stays visible, including both actions on short landscape phones. */
#result-dialog{width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:clamp(12px,3dvh,24px);overflow:visible}
#result-dialog[open]{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(6px,1.8dvh,14px)}
#result-dialog .eyebrow{font-size:9px}#result-dialog h2{font-size:clamp(18px,4dvh,25px);line-height:1.2;margin:0}
#result-dialog #result-overtakes{font-size:clamp(27px,6dvh,40px);line-height:1.1;margin:0}
#result-dialog #result-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;line-height:1.35;padding:12px 0;border-block:1px solid #b7e9f626}
#result-dialog #result-stats b{font-size:clamp(15px,3.7dvh,23px);white-space:nowrap}#result-dialog #result-stats small{font-size:10px}
#result-dialog .hint{margin:0;font-size:10px;line-height:1.4}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.result-actions button{margin:0;min-width:0;min-height:40px;padding:9px 8px;font-size:12px}
@media(max-width:360px){#result-dialog #result-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#result-dialog #result-stats b{font-size:18px}.result-actions button{font-size:11px}}
@media(max-height:350px) and (orientation:landscape){#result-dialog[open]{gap:5px;padding:10px 16px}#result-dialog #result-stats{padding:8px 0}#result-dialog .result-actions button{min-height:34px;padding:6px}}

/* Rivals now have a little breathing room around each complete silhouette. */
#sorami-player{position:fixed;z-index:5;top:76px;right:16px;width:min(300px,40vw);height:min(48dvh,420px);display:flex;flex-direction:column;gap:5px;padding:10px;border:1px solid #b9eaff55;border-radius:14px;background:#07131de8;backdrop-filter:blur(12px);box-shadow:0 10px 30px #0006}
#sorami-player>.sorami-controls{display:flex;align-items:center;gap:5px;flex:none;margin-bottom:0;font-size:12px}
#sorami-track-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#sorami-player .sorami-controls button,#sorami-player .sorami-transport button{padding:4px 8px;min-width:34px;min-height:32px;border:1px solid #b9eaff30;border-radius:8px;font-size:13px}
#sorami-player .sorami-controls #sorami-engine{min-width:64px;font-size:10px}
#sorami-player>.sorami-transport{display:none}
.race-top .sorami-transport{display:flex;align-items:center;gap:4px;margin-left:auto;pointer-events:auto}
.race-top .sorami-transport button{width:38px;min-width:38px;height:38px;min-height:38px;padding:0;border:1px solid #c7e9fc25;border-radius:9px;background:#091522d9;font-size:18px;line-height:1}
#sorami-stop{font-size:14px!important}
#sorami-frame{display:block;flex:none;width:200px;height:200px;max-width:100%;margin-inline:auto;border:0;border-radius:7px;background:#000}
#sorami-frame iframe{display:block;width:200px;height:200px;max-width:100%;border:0;border-radius:7px}
#sorami-lyrics{display:block;flex:1;min-height:38px;overflow:auto;white-space:pre-line;overscroll-behavior:contain;line-height:1.6;margin:0;padding:4px 3px;color:#e1f0f5;font-size:12px;scrollbar-width:thin;scroll-behavior:smooth}
.lyric-line{display:block;min-height:1.6em;padding:1px 4px;border-radius:4px;color:#e1f0f5;transition:color .15s,background .15s}
.lyric-line.active{color:#b8f4ff;background:#82e5ff18;font-weight:650}
#sorami-player.expanded{top:50%;right:16px;transform:translateY(-50%);width:min(380px,calc(100vw - 24px));height:min(42dvh,410px);padding:14px;gap:8px}
#sorami-player.expanded #sorami-lyrics{font-size:12px;line-height:1.6;padding:8px 6px}
#sorami-list{display:grid;gap:7px;max-height:44dvh;overflow:auto;margin-top:12px}
.sorami-song{min-height:42px;text-align:left;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#auto-toggle{margin-right:auto;min-width:150px;color:#bff5ff;border-color:#83daef66;font-size:12px;pointer-events:auto;position:relative;z-index:4}
body.auto-driving.racing .steering{display:none}
.routes{grid-template-columns:repeat(4,minmax(0,1fr))}
#home .route:last-child{grid-column:auto}
@media(max-width:1250px) and (orientation:landscape){.routes{grid-template-columns:repeat(4,minmax(0,1fr))}.route-art{width:48px}.route-info strong{font-size:10px}.route-info small{font-size:8px}}
@media(orientation:portrait){.routes{grid-template-columns:1fr}}
@media(orientation:portrait){#sorami-player{top:auto;right:10px;bottom:max(12px,env(safe-area-inset-bottom));width:min(300px,92vw);height:min(48dvh,420px)}#sorami-player.expanded{top:50%;right:10px;bottom:auto;width:min(300px,calc(100vw - 20px));height:min(43dvh,380px)}.top-actions{gap:4px}.top-actions button{padding:8px;min-width:34px}.top-actions #sorami-open{font-size:10px}}

/* Keep four synchronized lyric lines visible beside the compliant player. */
#sorami-player{display:grid;grid-template-columns:200px minmax(0,1fr);grid-template-rows:auto minmax(200px,1fr);align-content:start;gap:8px;width:min(520px,56vw);height:min(76dvh,520px);min-height:260px}
#sorami-player>.sorami-controls{grid-column:1/-1;grid-row:1;min-width:0}
#sorami-frame{grid-column:1;grid-row:2;margin:0;align-self:start}
#sorami-lyrics{grid-column:2;grid-row:2;align-self:start;width:100%;height:260px;min-height:260px;max-height:260px;flex:none;box-sizing:border-box;border-left:1px solid #b9eaff20;padding:4px 8px}
#sorami-player.expanded{width:min(560px,62vw);height:min(78dvh,560px);grid-template-columns:200px minmax(0,1fr);grid-template-rows:auto minmax(200px,1fr)}
#sorami-player.expanded #sorami-lyrics{height:260px;min-height:260px;max-height:260px}
@media(orientation:portrait){#sorami-player,#sorami-player.expanded{top:auto;right:10px;bottom:max(12px,env(safe-area-inset-bottom));transform:none;width:min(320px,calc(100vw - 20px));height:auto;max-height:calc(100dvh - 24px - env(safe-area-inset-bottom));min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 200px 260px;gap:6px;padding:9px}#sorami-player>.sorami-controls{grid-column:1;grid-row:1}#sorami-frame{grid-column:1;grid-row:2;margin-inline:auto}#sorami-lyrics{grid-column:1;grid-row:3;width:100%;height:260px;min-height:260px;max-height:260px;border-left:0;border-top:1px solid #b9eaff20;padding:5px 4px}#sorami-player.expanded{top:auto;right:10px;bottom:max(12px,env(safe-area-inset-bottom));width:min(320px,calc(100vw - 20px));height:auto}#sorami-player.expanded #sorami-lyrics{height:260px;min-height:260px;max-height:260px}}

/* Twelve synchronized lyric rows stay visible at the same font size. */
#sorami-lyrics{height:260px;min-height:260px;max-height:260px;overflow:auto}
#sorami-player.expanded #sorami-lyrics{height:260px;min-height:260px;max-height:260px}
@media(orientation:portrait){#sorami-lyrics,#sorami-player.expanded #sorami-lyrics{height:260px;min-height:260px;max-height:260px}}
/* On phone-sized screens, keep the visible YouTube player and fold lyrics away by default. */
#sorami-player.lyrics-hidden{width:min(228px,calc(100vw - 16px));height:auto;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 200px;gap:6px;padding:8px}
#sorami-player.lyrics-hidden #sorami-lyrics{display:none}
#sorami-player.lyrics-hidden #sorami-frame{grid-column:1;grid-row:2;width:200px;height:200px;margin-inline:auto}
#sorami-player.lyrics-hidden .sorami-controls{gap:3px}
#sorami-player.lyrics-hidden #sorami-track-title{min-width:0;font-size:10px}
#sorami-player.lyrics-hidden #sorami-lyrics-toggle{min-width:48px;padding-inline:4px;font-size:9px}
#sorami-player.lyrics-hidden #sorami-resize{display:none}
#sorami-player.lyrics-hidden #sorami-engine{min-width:45px;padding-inline:4px;font-size:9px}
@media(max-width:700px),(max-height:500px){#sorami-player.lyrics-hidden,#sorami-player.expanded.lyrics-hidden{top:72px;right:8px;bottom:auto;transform:none;width:min(228px,calc(100vw - 16px));height:auto;max-height:calc(100dvh - 84px - env(safe-area-inset-bottom));min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 200px;padding:8px;gap:6px}#sorami-player.lyrics-hidden>.sorami-controls{grid-column:1;grid-row:1}#sorami-player.lyrics-hidden #sorami-frame{grid-column:1;grid-row:2;width:200px;height:200px;margin-inline:auto}}
@media(max-height:500px) and (orientation:landscape){#sorami-player:not(.lyrics-hidden){top:72px;right:8px;bottom:auto;transform:none;width:min(520px,calc(100vw - 16px));height:222px;min-height:0;grid-template-columns:200px minmax(0,1fr);grid-template-rows:auto 200px;padding:8px;gap:6px}#sorami-player:not(.lyrics-hidden)>.sorami-controls{grid-column:1/-1;grid-row:1}#sorami-player:not(.lyrics-hidden) #sorami-frame{grid-column:1;grid-row:2;width:200px;height:200px}#sorami-player:not(.lyrics-hidden) #sorami-lyrics{grid-column:2;grid-row:2;height:186px;min-height:186px;max-height:186px;line-height:1.28;padding:3px 5px}.lyric-line{min-height:1.28em;padding-top:0;padding-bottom:0}}
/* Original, locally bundled future-world art; each course now has its own scene. */
.route-art.utopia{background-image:linear-gradient(130deg,#36d8ff20,#8b65ff12),url('assets/utopia.svg');background-size:cover;background-position:center}
.route-art.dystopia{background-image:linear-gradient(130deg,#131d3220,#b52f3725),url('assets/dystopia.svg');background-size:cover;background-position:center}
.route-art.desert{background-image:linear-gradient(130deg,#e9a74122,#437fac38),url('assets/golden.webp');background-size:cover;background-position:center}
#race-position{position:absolute;top:0;left:50%;transform:translateX(-50%);display:flex;align-items:baseline;gap:4px;padding:8px 12px;min-width:66px;justify-content:center;background:#0715229c;border:1px solid #c7e9fc35;border-radius:10px;text-shadow:0 1px 4px #000;pointer-events:none}
#race-position strong{font-size:19px;color:#c9f5ff}#race-position small{font-size:9px;color:#d8e9ee}
@media(max-height:450px) and (orientation:landscape){#race-position{padding:5px 8px}#race-position strong{font-size:16px}}
body.pass-flash::after{content:'';position:fixed;inset:0;z-index:2;pointer-events:none;background:radial-gradient(ellipse at 50% 64%,#b3f4ff55 0%,#43cfff1c 38%,transparent 68%);animation:pass-pulse .44s ease-out forwards}
@keyframes pass-pulse{from{opacity:1}to{opacity:0}}
