/* Slipstream — the ride is the canvas; controls are quiet, tactile instruments. */
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;color-scheme:dark;color:#f5f2e9;background:#1d2723;--ink:#f5f2e9;--muted:#b5c5be;--faint:#849b92;--lagoon:#91ded0;--coral:#f1a18a;--line:#e6f3e025;--panel:#202b26ed;--shadow:0 16px 50px #06120f40}
*{box-sizing:border-box}body{margin:0;width:100%;height:100dvh;overflow:hidden}button,.button,select,input{font:inherit}button,.button,select{color:var(--ink);background:#263b35e6;border:1px solid #d6e6d02b;border-radius:11px;padding:11px 14px;font-size:12px;font-weight:550;line-height:1.3;min-height:42px}button,.button{cursor:pointer;transition:background .15s,border-color .15s,transform .15s}button:hover,.button:hover{background:#36544b;border-color:#91ded08c}button:active,.button:active{transform:translateY(1px)}button:disabled{opacity:.4;cursor:default;transform:none}button.active,button[aria-pressed=true]{color:#b8f4e6;background:#30574b;border-color:var(--lagoon)}.button{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}select{max-width:100%;cursor:pointer;padding-right:26px}input{color:var(--ink);background:#0e211c;border:1px solid #b7cec03d;border-radius:9px;padding:11px 12px;min-width:0}input::placeholder{color:#8ca49a}input[type=range]{padding:0;accent-color:var(--lagoon)}input[type=color]{padding:0;cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--lagoon);outline-offset:4px}button:disabled:focus-visible{outline-offset:2px}[hidden]{display:none!important}
.stage{position:fixed;inset:0;background:#233d32}.stage>canvas,.stage>video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.stage>#povCanvas,.stage>#guestWorkerCanvas{object-fit:fill}.stage>#maskEditor{z-index:3;cursor:crosshair;touch-action:none}.world-view{position:absolute;inset:0;width:100%;height:100%;overflow:hidden}.vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#0a1a164d,transparent 25%,transparent 65%,#07181370)}body:has(.lobby:not([hidden])) .vignette{background:linear-gradient(90deg,#0a201acf 0%,#0a201a9c 27%,#0a201a13 69%),linear-gradient(0deg,#091d1640,transparent 40%)}
.topbar{position:fixed;z-index:5;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:24px 30px;pointer-events:none;gap:16px}.topbar>*{pointer-events:auto}.brand{position:relative;padding-left:43px;color:var(--ink);text-decoration:none;font-size:21px;letter-spacing:-1.2px;font-weight:780;line-height:1}.brand:before,.brand:after{content:"";position:absolute;left:0;top:4px;width:25px;height:15px;border:2px solid var(--lagoon);border-radius:50%;transform:rotate(-35deg)}.brand:after{left:10px;top:12px;border-color:var(--ink)}.brand span{display:block;font-size:8px;letter-spacing:2.3px;font-weight:500;color:#d0dfd5;margin-top:9px}.top-actions{display:flex;align-items:center;gap:8px}.top-actions button{background:#172b25b8;backdrop-filter:blur(18px)}.status{display:inline-flex;align-items:center;gap:7px;color:#e0e9dd;font-size:9px;letter-spacing:1px;margin-right:9px}.status:before,.live-dot{content:"";display:inline-block;width:6px;height:6px;background:var(--lagoon);border-radius:50%;flex:none}.live-dot{margin-right:7px}.ride-top{position:fixed;left:30px;top:100px;display:flex;gap:8px;align-items:center;pointer-events:none;z-index:2;max-width:calc(100% - 60px);flex-wrap:wrap}.ride-top>span{font-size:9px;letter-spacing:.6px;color:#e2eee4;padding:6px 9px;background:#172b2594;border:1px solid #f5f2e914;border-radius:6px;backdrop-filter:blur(12px);line-height:1.3}#riderCount{color:#c2f0da}
.lobby{position:fixed;z-index:2;top:clamp(145px,24vh,250px);left:clamp(30px,7.5vw,130px);width:min(440px,calc(100vw - 60px));max-height:calc(100dvh - 170px);overflow:auto;scrollbar-width:thin;padding:0 8px 16px 0;overscroll-behavior:contain}.eyebrow{font-size:10px;font-weight:650;letter-spacing:1.65px;color:#bbdfce;margin:0 0 20px}h1{font-size:clamp(64px,7.5vw,112px);letter-spacing:-6px;line-height:.96;font-weight:670;margin:0 0 25px;text-wrap:balance;text-shadow:0 3px 40px #061c1233}.lobby h1{font-size:30px;line-height:1.15;letter-spacing:-.5px;margin-bottom:20px}
.lobby>p:not(.eyebrow){color:#d5e2d8;font-size:15px;line-height:1.75;margin:0 0 26px}.lobby-starts{display:flex;flex-direction:column;gap:10px;align-items:stretch}.primary{display:flex;align-items:center;justify-content:space-between;gap:20px;background:var(--lagoon);color:#102e25;border:1px solid var(--lagoon);font-size:14px;padding:16px 20px;min-height:52px;box-shadow:0 4px 24px #071e191a}.primary:hover{background:#b3f0e2;border-color:#b3f0e2}.primary span{font-size:19px}.demo-button{display:block;padding:13px 17px;background:#1c332bc9}.lobby-starts>.demo-button{font-size:12px}.lobby-more{border:0;margin:17px 0 0;padding:0}.lobby-more summary{display:inline-block;font-size:12px;color:#d9e7dc;padding:5px 0;list-style:none}.lobby-more summary:after{content:" +";margin-left:8px;color:var(--lagoon)}.lobby-more[open] summary:after{content:" −"}.lobby-more .demo-button{margin-top:8px;width:100%;text-align:left}.lobby>p.lobby-demo-note{margin:14px 0 0;color:#acc4b5;font-size:10px;letter-spacing:.2px}.subtle{display:block;font-size:10px;color:#b2c6b8;margin-top:10px}.lobby #roomRecovery{margin-top:12px;padding:12px;background:#172b25d9;border:1px solid var(--line);border-radius:12px}
/* The host's source and broadcast tools share one dock; the guest has riding tools. */
.host-hud{position:fixed;z-index:4;bottom:max(20px,env(safe-area-inset-bottom));left:24px;right:24px;max-width:1450px;margin:0 auto;display:grid;grid-template-columns:minmax(170px,.9fr) minmax(0,2fr) auto;gap:16px;align-items:center;padding:17px 20px;background:var(--panel);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);backdrop-filter:blur(22px)}.host-summary strong{font-size:13px;font-weight:600}.host-summary p{font-size:11px;color:var(--muted);margin:7px 0 0 13px;line-height:1.5;max-width:230px}.host-world-controls,.host-session-controls{display:flex;flex-wrap:wrap;align-items:center;gap:7px}.host-world-controls{border-left:1px solid var(--line);padding-left:16px}.host-world-controls select,.host-world-controls button,.host-session-controls button{font-size:10px;min-height:37px;padding:9px 11px}.host-world-controls select{max-width:210px}#record{border-color:#f1a18a6b;color:#f9c1ad}
.ride-hud{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));left:24px;right:24px;max-width:1140px;margin:auto;z-index:4;display:grid;grid-template-columns:100px minmax(160px,1fr) 92px auto minmax(130px,170px);align-items:center;gap:20px;padding:18px 24px;background:var(--panel);border:1px solid var(--line);border-radius:23px;box-shadow:var(--shadow);backdrop-filter:blur(22px);pointer-events:none}.ride-hud>*{pointer-events:auto}.speedometer{display:flex;flex-direction:column;align-self:center}.speedometer strong{font-size:62px;line-height:.9;letter-spacing:-4px;font-variant-numeric:tabular-nums;font-weight:500}.speedometer span{font-size:7px;letter-spacing:1.2px;margin-top:11px;color:#d4e1d6}.speedometer small{font-size:10px;margin-top:8px;color:var(--muted);font-variant-numeric:tabular-nums}.ride-control{display:flex;flex-direction:column;gap:7px;min-width:0;max-width:270px;padding-left:18px;border-left:1px solid var(--line)}.ride-control>span{font-size:9px;color:#adc5b7;line-height:1.3}.ride-control select{width:100%;font-size:9px;letter-spacing:.45px;min-height:32px;padding:7px 9px;color:#c4f2df;background:#28473a}.ride-control select#embodiment{font-size:9px}.effort{display:flex;align-items:center;gap:10px;font-size:8px;letter-spacing:.8px;color:#b9cfc2}.effort input{width:100%;min-width:30px;min-height:22px}#joystick{width:92px;height:92px;border:1px solid #b9e7cf5c;border-radius:50%;background:radial-gradient(circle,#ffffff08,transparent 75%);position:relative;touch-action:none;user-select:none}#joystick:before,#joystick:after{content:"";position:absolute;background:#d9ead822;pointer-events:none}#joystick:before{left:13px;right:13px;top:50%;height:1px}#joystick:after{top:13px;bottom:13px;left:50%;width:1px}#stick{position:absolute;left:27px;top:27px;width:38px;height:38px;border:1px solid #bcead9;border-radius:50%;background:#8fdbbf38;box-shadow:0 4px 12px #0003;pointer-events:none;z-index:1}.steer-label{position:absolute;bottom:-14px;width:100%;text-align:center;font-size:7px;letter-spacing:1px;color:#b6d0bc}.ride-pedals{display:flex;align-items:center;gap:9px}.pedal{border-radius:50%;width:92px;height:92px;background:var(--lagoon);color:#173c2c;border:0;font-size:12px;letter-spacing:1px;touch-action:none;user-select:none;box-shadow:inset 0 -4px 0 #163d2522}.pedal:hover{background:#b8f2de}.pedal small{display:block;font-size:7px;letter-spacing:.3px;margin-top:7px;opacity:.7}.pedal.active{background:#e9f8be;color:#173c2c;box-shadow:0 0 24px #91ded044}.ride-brake{min-width:60px;min-height:54px;padding:9px;border-color:#efac8d66;background:#503c30;color:#ffd2b7;font-size:10px;letter-spacing:.5px;touch-action:none;user-select:none}.ride-brake small{display:block;font-size:7px;margin-top:5px}.ride-brake.active{background:#ffd2b7;color:#3b2b20}.ride-buttons{display:grid;grid-template-columns:1fr 1fr;gap:7px}.ride-buttons button{font-size:10px;min-height:39px;padding:8px 9px;white-space:normal}.host-locator{display:flex;align-items:center;gap:7px;max-width:100%;color:#d9f4d7;font-size:10px;line-height:1.3}.host-locator [data-host-arrow]{display:inline-block;flex:none;font-size:23px;width:23px;text-align:center}.host-locator strong{font-weight:600}.host-locator small{display:block;font-size:9px;color:#b3cabc;overflow-wrap:anywhere}
/* Drawers use a solid reading surface and clearly separated sections. */
.setup{position:fixed;z-index:8;top:12px;right:12px;bottom:12px;width:min(460px,calc(100% - 24px));background:#222c26fa;border:1px solid #dfecdb33;border-radius:22px;padding:24px;overflow-y:auto;box-shadow:-20px 0 100px #03110d66;scrollbar-width:thin;scrollbar-color:#496655 transparent}.drawer-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:25px}.drawer-title h2{margin:0;font-size:25px;font-weight:570;letter-spacing:-1px}.drawer-title button,.kit-title button{border:1px solid var(--line);background:#2c4035;min-width:36px;min-height:36px;padding:6px;font-size:15px;border-radius:50%}.setup .eyebrow{font-size:9px;letter-spacing:1.4px;margin-bottom:13px;color:#b2dac4}.row{display:flex;flex-wrap:wrap;gap:7px}.row>*{font-size:11px;padding:10px 12px}.small{font-size:11px;color:#afc2b5;line-height:1.7;margin:12px 0;overflow-wrap:anywhere}.source-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}.source-choices button{white-space:normal;text-align:left;min-height:46px}#sourceState{padding:9px 11px;border-left:2px solid var(--lagoon);background:#9bddbd0a;border-radius:0 7px 7px 0}.source-credit{display:inline-block;color:#a6d9c2;font-size:10px;line-height:1.6;text-decoration:underline;text-underline-offset:3px}.twitch-row{display:flex;gap:7px;margin-top:17px}.twitch-row input{min-width:0;flex:1;font-size:12px}.twitch-row button{font-size:10px;white-space:nowrap}details{border-top:1px solid var(--line);padding:17px 0 0;margin:20px 0}summary{cursor:pointer;font-size:12px;font-weight:550;color:#e1eadf;line-height:1.5;min-height:24px;padding:2px 0}summary::marker{color:#8ebda6}details[open]>summary{color:#a4ebd2;margin-bottom:15px}.ground-settings{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.ground-settings label{display:flex;flex-direction:column;font-size:10px;color:#b6cbbb;gap:9px}.ground-settings input{width:100%}.setup label{font-size:11px;color:#c1d3c4}.setup label>select{display:block;width:100%;margin-top:8px}.rider-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:13px 0;border-top:1px solid var(--line)}.rider-row span{margin-right:auto;font-size:12px}.rider-row select,.rider-row button,#routeView{font-size:10px;padding:8px;min-height:35px}.rider-roster-title{font-size:15px;font-weight:550;margin-top:24px}.drawer-bottom{border-top:1px solid var(--line);margin-top:24px;padding-top:20px}.drawer-bottom>section{margin-bottom:20px}.drawer-bottom>.row{margin-top:18px}.drawer-bottom .button{margin-top:8px}.danger-action{color:#fac3ad;border-color:#efa88a4d;background:#47372b}.danger-action:hover{background:#614538;border-color:#f1a18a}.world-coordinates{display:grid;grid-template-columns:1fr 1fr .7fr;gap:8px}.world-coordinates label,.world-key{display:flex;flex-direction:column;gap:8px}.world-coordinates input,.world-key input{width:100%;min-width:0;font-size:12px}.world-key{margin:18px 0 12px}#worldPanel{margin:24px 0;padding-top:20px}#routeView{width:100%;margin-top:12px}#footagePlayback{margin:15px 0;padding:13px;border:1px solid var(--line);border-radius:12px;background:#ffffff04}#footagePlayback p:last-child{margin-bottom:0}#notice.setup-notice-footer{background:#11251ded;color:#b7cdbd;border-color:#bbd4bf2e;border-radius:11px;font-size:10px;line-height:1.6}.setup.notice-layout>.setup-scroll-content{scrollbar-width:thin;scrollbar-color:#496655 transparent}.setup.notice-layout>.setup-notice-footer{flex-basis:56px;height:56px;max-height:15dvh}.setup-notice-footer:focus-visible{outline-color:var(--lagoon)}
.outfit-panel{position:fixed;z-index:9;right:24px;bottom:205px;width:350px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 110px);overflow:auto;padding:22px;background:#242f28fa;border:1px solid #c2ead34d;border-radius:20px;backdrop-filter:blur(24px);box-shadow:var(--shadow);scrollbar-width:thin}.kit-title{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:18px;letter-spacing:-.4px}.kit-title strong{font-weight:550}#riderNameForm{margin-top:22px}#riderNameForm label{display:block;margin-bottom:8px;font-size:11px;font-weight:550;color:#c2d9c9}#riderNameForm .row{flex-wrap:nowrap}#riderName{flex:1;min-width:0;font-size:14px;padding:10px 12px}#riderNameForm p{font-size:10px;line-height:1.6;margin-top:7px}#riderNameCurrent{color:#a9e9ce}#riderNameError:not(:empty){color:#ffc2ac}.kit-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:15px 0}.kit-presets button{position:relative;padding:12px 9px;font-size:11px;display:flex;align-items:center;gap:5px}.kit-presets i{width:12px;height:12px;border-radius:50%;display:inline-block;border:1px solid #ffffff44;flex:none}.kit-presets span{margin-left:3px}.kit-presets .kit-check{position:absolute;right:5px;top:3px;font-size:10px;line-height:1;visibility:hidden}.kit-presets button[aria-pressed=true] .kit-check{visibility:visible}.outfit-panel .kit-selection{margin:20px 0 0;font-size:11px;color:#c6ebd1}.kit-colors{display:flex;justify-content:space-between;gap:9px;border-top:1px solid var(--line);padding-top:15px;margin-top:18px}.kit-colors label{font-size:10px;color:#b9cebe;display:flex;flex-direction:column;gap:7px;align-items:flex-start}.kit-colors input{width:72px;height:31px;border:0;background:transparent;border-radius:7px}.outfit-panel p{font-size:10px;color:#afc7b5;margin:12px 0 0;line-height:1.6}
.toast{position:fixed;z-index:10;bottom:215px;left:50%;transform:translateX(-50%);max-width:min(90vw,650px);padding:12px 18px;border:1px solid #cfedd439;border-radius:12px;background:#152c23f5;color:#e6f1e2;font-size:12px;line-height:1.5;text-align:center;pointer-events:none;opacity:0;transition:opacity .2s;box-shadow:var(--shadow)}.toast.visible{opacity:1}.route-waiting{position:fixed;z-index:3;left:50%;top:43%;transform:translate(-50%,-50%);text-align:center;width:min(88vw,520px);padding:25px;background:#162b23e8;border:1px solid var(--line);border-radius:22px;backdrop-filter:blur(20px)}.route-waiting h2{font-size:clamp(25px,3.5vw,37px);letter-spacing:-1.1px;font-weight:550;margin:0 0 14px;line-height:1.15}.route-waiting>p:not(.eyebrow){font-size:12px;line-height:1.7;color:#c0d2c2;margin-bottom:18px}#routeWaiting button{margin:4px}.mapped-world-status{position:fixed;bottom:205px;left:24px;z-index:6;max-width:min(920px,calc(100% - 48px));background:#1b322beb;color:#edf5df;padding:10px 14px;font-size:11px;line-height:1.5;border:1px solid var(--line);border-radius:11px;pointer-events:none}.regroup-offer{position:fixed;z-index:6;top:clamp(140px,18vh,170px);left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 32px);padding:19px 21px;background:#20392ef5;border:1px solid #91ded070;border-radius:17px;box-shadow:var(--shadow);backdrop-filter:blur(20px)}.regroup-offer strong{font-size:15px;font-weight:550}.regroup-offer p{margin:8px 0 14px;color:#c8decc;font-size:12px;line-height:1.6}.regroup-offer div{display:flex;gap:8px}.regroup-offer #regroupAccept{background:var(--lagoon);color:#183c2e}#guestRenderStatus{position:absolute;top:44%;left:20px;right:20px;text-align:center;color:#e0eee0;font-size:14px;pointer-events:none}
.provider-streetview #povCanvas{pointer-events:none}.provider-streetview .ride-hud{bottom:58px}.provider-streetview .vignette{background:linear-gradient(#0a1b184d,transparent 20%,transparent)}.provider-streetview .stage>#streetView{z-index:0}.provider-streetview .stage>#povCanvas{z-index:1}.provider-streetview .stage>.vignette{z-index:2}.provider-streetview .route-waiting:not(.host-offline){display:none}.provider-streetview:has(#setup:not([hidden])) #streetView{width:calc(100% - min(484px,100%));right:auto}.provider-streetview:has(#setup:not([hidden])) #povCanvas{visibility:hidden}.clean .topbar,.clean main,.clean .vignette{display:none}.clean .stage{background:#000}
@media(min-width:1100px){body:has(#setup:not([hidden])) .host-hud{right:calc(clamp(460px,42vw,780px) + 28px);grid-template-columns:1fr;gap:11px;max-width:680px;margin-left:0}.host-hud:has(#companionGuest:not([hidden])){grid-template-columns:minmax(160px,.8fr) minmax(0,2fr);max-width:none}.host-hud:has(#companionGuest:not([hidden])) .host-session-controls{grid-column:1/-1;justify-content:flex-end}body:has(#setup:not([hidden])) .host-world-controls{border:0;padding-left:0}body:has(#setup:not([hidden])) .host-session-controls{justify-content:flex-start}}
@media(max-width:1099px){.host-hud{grid-template-columns:1fr auto;gap:12px;padding:15px}.host-summary{grid-column:1/-1;display:flex;align-items:baseline;gap:13px}.host-summary p{margin:0;max-width:none}.host-world-controls{border:0;padding-left:0}.ride-hud{grid-template-columns:80px minmax(135px,1fr) 82px auto 125px;gap:14px;padding:16px}.speedometer strong{font-size:55px}#joystick{width:82px;height:82px}#stick{left:22px;top:22px}.pedal{width:82px;height:82px}.ride-control{padding-left:12px}.ride-buttons button{font-size:9px;padding:7px}.ride-brake{min-width:52px}.lobby-starts{max-width:400px}}
@media(max-width:760px){.topbar{padding:20px}.brand{font-size:19px;padding-left:39px}.brand span{font-size:7px;letter-spacing:2px}.status{font-size:8px;margin-right:2px}.top-actions button{font-size:10px;padding:10px;min-height:38px}.ride-top{left:20px;top:90px;max-width:calc(100% - 40px);gap:6px}.ride-top>span{font-size:8px;padding:5px 7px}.lobby{left:30px;top:clamp(145px,24vh,200px);width:min(440px,calc(100vw - 60px))}.lobby h1{font-size:30px;letter-spacing:-.5px}.lobby>p:not(.eyebrow){font-size:14px}.lobby-starts{display:grid;grid-template-columns:1fr}.lobby-starts button{text-align:left;justify-content:space-between}.lobby-starts .demo-button{min-height:45px;padding:12px 18px}.host-hud{left:14px;right:14px;bottom:max(14px,env(safe-area-inset-bottom));grid-template-columns:1fr;gap:11px;border-radius:17px}.host-summary{gap:6px;display:block}.host-summary p{font-size:10px;margin:5px 0 0 13px}.host-world-controls,.host-session-controls{gap:6px}.host-world-controls{display:grid;grid-template-columns:1fr 1fr}.host-world-controls select{width:100%;max-width:none;min-width:0}.host-world-controls button{white-space:normal}.host-session-controls button{flex:1;min-width:0}.ride-hud{left:14px;right:14px;bottom:max(14px,env(safe-area-inset-bottom));grid-template-columns:80px minmax(0,1fr) 82px auto;grid-template-areas:"speed modes modes actions" "steer modes modes pedals";gap:12px;padding:17px;max-width:660px}.speedometer{grid-area:speed}.speedometer strong{font-size:48px}.speedometer span{font-size:6px;letter-spacing:.8px}.speedometer small{font-size:9px}.ride-control{grid-area:modes;padding-left:0;border:0;max-width:none;gap:9px}.ride-control select{font-size:9px;min-height:35px}.ride-buttons{grid-area:actions;grid-template-columns:1fr 1fr;width:145px;align-self:start}.ride-buttons button{font-size:10px;min-height:40px}#joystick{grid-area:steer}.ride-pedals{grid-area:pedals;justify-content:flex-end;gap:7px}.pedal{width:76px;height:76px;font-size:10px}.ride-brake{min-width:52px;min-height:50px;font-size:9px}.outfit-panel{right:16px;bottom:255px;padding:20px}.toast{bottom:265px}.mapped-world-status{bottom:260px;left:14px;max-width:calc(100% - 28px)}.route-waiting{top:37%;padding:20px}.provider-streetview:has(#setup:not([hidden])) #streetView{visibility:hidden}}
@media(max-width:520px){.topbar{padding:18px 16px;gap:8px}.brand{font-size:17px;letter-spacing:-.7px;padding-left:35px}.brand:before,.brand:after{width:22px;height:13px}.brand span{font-size:6px;letter-spacing:1.8px;margin-top:8px}.status{display:none}.top-actions{gap:6px}.top-actions button{font-size:9px;max-width:115px}.ride-top{left:16px;top:83px;gap:5px;max-width:calc(100% - 32px)}.ride-top>span{font-size:7px;letter-spacing:.3px}.lobby{left:26px;width:calc(100% - 52px);top:clamp(145px,24vh,190px);max-height:calc(100dvh - 160px)}.lobby .eyebrow{font-size:9px;letter-spacing:1.35px;margin-bottom:17px}.lobby h1{font-size:30px;letter-spacing:-.5px;margin-bottom:22px}.lobby>p:not(.eyebrow){font-size:13px;margin-bottom:23px}.lobby-starts{gap:8px}.primary{font-size:13px}.lobby>p.lobby-demo-note{margin:13px 0 0;font-size:9px}.subtle{font-size:9px}.ride-hud{display:grid;grid-template-columns:75px minmax(0,1fr);grid-template-areas:"speed modes" "actions actions" "steer pedals";gap:12px;padding:15px}.ride-control{gap:6px}.ride-control select{font-size:8px;min-height:30px;padding:6px 8px}.ride-control>span{font-size:8px}.ride-control select#embodiment{font-size:8px}.effort{font-size:7px;gap:7px}.effort input{min-height:18px}.ride-buttons{width:auto;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.ride-buttons button{min-width:0;font-size:10px;min-height:40px;padding:7px 4px}#joystick{width:76px;height:76px;margin:0 0 7px}#stick{width:32px;height:32px;left:21px;top:21px}.pedal{width:78px;height:78px}.ride-pedals{gap:12px}.ride-brake{min-width:67px;min-height:55px}.speedometer strong{font-size:51px}.speedometer span{font-size:6px}.speedometer small{font-size:9px}.outfit-panel{bottom:16px;right:16px;max-height:calc(100dvh - 95px);width:350px}.toast{bottom:327px;font-size:11px}.mapped-world-status{bottom:320px;font-size:10px}.setup{top:8px;right:8px;bottom:8px;width:calc(100% - 16px);border-radius:18px}.drawer-title h2{font-size:24px}.world-coordinates{grid-template-columns:1fr 1fr}.world-coordinates label:last-child{grid-column:1/-1}.ground-settings{gap:12px}.regroup-offer{top:133px;padding:16px}.regroup-offer strong{font-size:14px}.host-world-controls select,.host-world-controls button,.host-session-controls button{font-size:9px;min-height:35px}.route-waiting{top:33%;width:calc(100% - 28px)}.route-waiting .eyebrow{font-size:8px;margin-bottom:12px}.route-waiting h2{font-size:23px}.route-waiting>p:not(.eyebrow){font-size:11px;line-height:1.55}.route-waiting button{font-size:10px;min-height:36px;padding:8px 10px}.host-locator{font-size:9px}.host-locator [data-host-arrow]{font-size:19px;width:19px}.host-locator small{font-size:8px}}
@media(max-height:720px){.lobby{top:135px;max-height:calc(100dvh - 150px)}.lobby h1{font-size:30px;letter-spacing:-.5px;margin-bottom:18px}.lobby>p:not(.eyebrow){margin-bottom:17px}.lobby .eyebrow{margin-bottom:15px}.lobby>p.lobby-demo-note{margin:12px 0 0}.primary{min-height:46px;padding:13px 18px}.lobby-starts .demo-button{min-height:40px}.outfit-panel{bottom:14px;max-height:calc(100dvh - 95px)}}
@media(max-height:500px) and (min-width:521px){.topbar{padding:12px 20px}.ride-top{top:69px}.lobby{left:35px;top:105px;max-height:calc(100dvh - 115px);width:440px}.lobby h1{font-size:30px;line-height:.95;margin-bottom:12px}.lobby h1 br{display:none}.lobby h1 br:after{content:" "}.lobby>p:not(.eyebrow){font-size:12px;line-height:1.5;margin-bottom:12px}.lobby-starts{display:flex;gap:7px}.lobby-starts button{min-height:40px;padding:10px 13px;font-size:11px}.lobby-more{margin-top:8px}.lobby>p.lobby-demo-note,.subtle{font-size:8px}.ride-hud{grid-template-columns:60px minmax(110px,1fr) 65px auto;grid-template-areas:"actions actions actions actions" "speed modes steer pedals";gap:6px 12px;padding:11px 15px;max-width:800px}.ride-buttons{width:auto;display:flex;gap:7px;justify-content:center}.ride-buttons button{min-height:30px;font-size:9px;padding:5px 12px}.ride-control{gap:3px}.ride-control select{min-height:27px;padding:4px 7px;font-size:8px}.ride-control>span{font-size:7px}.effort input{min-height:12px}.speedometer strong{font-size:43px}.speedometer span{font-size:5px}.speedometer small{font-size:8px}#joystick{width:65px;height:65px}#stick{width:29px;height:29px;left:17px;top:17px}.steer-label{font-size:6px;bottom:-11px}.pedal{width:65px;height:65px;font-size:9px}.pedal small{font-size:6px}.ride-brake{min-height:45px;font-size:8px}.route-waiting{top:35%;padding:15px;max-width:430px}.route-waiting h2{font-size:22px}.route-waiting .eyebrow{margin-bottom:8px}.route-waiting>p:not(.eyebrow){font-size:10px;margin-bottom:10px}.host-hud{gap:7px;padding:11px;grid-template-columns:1fr auto}.host-summary{grid-column:1/-1;display:flex;gap:10px;align-items:baseline}.host-world-controls{display:flex}.host-world-controls select{max-width:180px;width:auto;font-size:9px}.host-world-controls button,.host-session-controls button{font-size:9px;min-height:32px;padding:6px 8px}.toast,.mapped-world-status{bottom:190px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Keep camera swipes on the riding surface, without changing panel gestures. */
#povCanvas,#guestWorkerCanvas{touch-action:none}

/* Fill the riding stage on portrait phones as well as wide desktop screens. */
body[data-scene-mode="simulation"] .stage>#output{object-fit:cover}
#notice.setup-notice-footer{flex:0 0 56px;height:56px;max-height:15dvh}

.look-around-hint{display:none;position:fixed;z-index:3;top:142px;right:26px;max-width:290px;margin:0;color:#deebdf;background:#192d2599;border:1px solid #e6f3e01c;border-radius:8px;padding:7px 10px;backdrop-filter:blur(12px);font-size:10px;line-height:1.5;pointer-events:none}
body:has(#guestPanel:not([hidden])):has(#guestWorkerCanvas:not([hidden])) .look-around-hint,body:has(#guestPanel:not([hidden])):has(#povCanvas:not([hidden])) .look-around-hint{display:flex}
@media(max-width:520px){.look-around-hint{top:116px;right:16px;max-width:235px;font-size:9px;padding:6px 9px}}
@media(max-height:500px){.look-around-hint{top:88px;right:20px;max-width:250px;font-size:9px}}
@media(max-width:520px) and (min-height:501px){.ride-buttons button{min-height:44px}.host-world-controls select,.host-world-controls button{min-height:40px}.host-session-controls button{min-height:44px}.top-actions button{min-height:42px}.ride-control select{min-height:34px}}
/* Imported riders are part of My kit, with the same quiet, tactile controls. */
.outfit-panel:has(.avatar-library){top:90px;bottom:20px;max-height:none;width:380px;overscroll-behavior:contain;scrollbar-gutter:stable}
.outfit-panel:has(.avatar-library) .kit-title{position:sticky;z-index:2;top:-22px;margin:-22px -22px 0;padding:18px 22px;background:#242f28fa;border-bottom:1px solid var(--line);backdrop-filter:blur(18px)}
.avatar-library{margin-top:25px;padding-top:22px;border-top:1px solid var(--line)}
.avatar-library h3{margin:0;color:var(--ink);font-size:18px;font-weight:550;letter-spacing:-.35px}
.avatar-library h4{margin:21px 0 10px;color:#c3d6c7;font-size:11px;font-weight:550;letter-spacing:.15px}
.outfit-panel .avatar-library-intro{margin:8px 0 17px;font-size:11px;line-height:1.6}
.avatar-import-label{display:flex;flex-direction:column;gap:9px;font-size:10px;color:#c3d6c7}
.avatar-import-file{width:100%;min-height:44px;max-width:100%;padding:7px;background:#17251e;border:1px dashed #c1e0c550;border-radius:11px;font-size:10px;color:#b7cdbb;overflow:hidden}
.avatar-import-file::file-selector-button{font:inherit;font-weight:600;color:#143e30;background:var(--lagoon);border:0;border-radius:7px;margin-right:9px;padding:9px 10px;cursor:pointer}
.avatar-import-file:hover{border-color:var(--lagoon)}
.avatar-model-preview{width:100%;height:230px;position:relative;isolation:isolate;overflow:hidden;background:#e6e0ce;border:1px solid #e8f3d12e;border-radius:14px;margin-top:15px;touch-action:pan-y}
.avatar-model-preview:not(:has(canvas)){display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;background:radial-gradient(ellipse at 50% 60%,#39473b,#26372d);border-color:#d3ead22b}
.avatar-model-preview:not(:has(canvas)):before{content:"Your model preview";color:#d7e9d7;font-size:14px;font-weight:550;letter-spacing:-.15px}
.avatar-model-preview:not(:has(canvas)):after{content:"Import a model or choose a saved avatar";color:#acc5af;font-size:10px}
.outfit-panel .avatar-library-status{color:#bce9ce;font-size:10px;line-height:1.65;overflow-wrap:anywhere}
.avatar-library-status:empty{display:none}
.avatar-library .avatar-use-button{width:100%;min-height:44px;margin-top:12px;background:var(--lagoon);border-color:var(--lagoon);color:#173c2c;font-size:12px}
.avatar-library .avatar-use-button:hover{background:#b9efdf}
.avatar-library .avatar-use-button:disabled{background:#314639;border-color:#c0dfbd26;color:#a5bba5;opacity:.65}
.avatar-library details{margin:18px 0 0;padding-top:15px}
.avatar-library summary{font-size:11px;min-height:28px}
.avatar-library details[open]>summary{margin-bottom:13px}
.avatar-fit-controls{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:14px 12px}
.avatar-fit-controls label{display:flex;min-width:0;flex-direction:column;gap:8px;color:#bfdec5;font-size:10px}
.avatar-fit-controls input[type=number]{width:100%;min-height:40px;font-size:12px;padding:9px 10px}
.avatar-fit-controls input[type=range]{width:100%;min-height:40px;accent-color:var(--lagoon)}
.avatar-fit-controls .avatar-facing-label{grid-column:1/-1}
.avatar-fit-controls select{width:100%;min-height:40px;font-size:11px}
.avatar-library-items:empty:before{content:"No saved avatars yet.";display:block;padding:13px 12px;border:1px dashed #c1e0c526;border-radius:10px;font-size:10px;color:#aec3b1}
.avatar-library-items{display:grid;gap:8px}
.avatar-library-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;min-width:0}
.avatar-library-item .avatar-saved-preview{text-align:left;min-width:0;overflow-wrap:anywhere;white-space:normal;font-size:11px;line-height:1.5;min-height:42px;padding:10px 12px;color:#d8ebd7;background:#2c4134}
.avatar-library-item .avatar-saved-remove{font-size:10px;color:#ddbaa6;border-color:#e6b79f30;background:transparent;padding:9px;min-height:42px}
.avatar-library-item .avatar-saved-remove:hover{background:#503d30;border-color:#e6b79f77}
.avatar-library .avatar-builtin-button{width:100%;min-height:44px;margin-top:13px;font-size:11px}
.avatar-support-details p,.avatar-fit-details p{font-size:10px;line-height:1.7;color:#b0c5b4}
.avatar-support-details{margin-bottom:0!important;padding-bottom:2px}
@media(max-width:760px){.outfit-panel:has(.avatar-library){top:84px;bottom:16px}.outfit-panel:has(.avatar-library) .kit-title{top:-20px;margin:-20px -20px 0;padding:17px 20px}}
@media(max-width:520px){.outfit-panel:has(.avatar-library){right:12px;top:80px;bottom:12px;width:calc(100% - 24px);max-width:380px}.avatar-library-item .avatar-saved-preview,.avatar-library-item .avatar-saved-remove{min-height:44px}.avatar-library{padding-top:20px;margin-top:23px}.avatar-import-file{font-size:10px}.avatar-fit-controls input[type=number],.avatar-fit-controls select{min-height:44px}}
@media(max-height:500px){.outfit-panel:has(.avatar-library){top:70px;bottom:10px}}
/* Immersive ride instruments. The world stays open between small edge controls. */
:root{--ink:#f3f4ee;--muted:#a9b7b8;--faint:#7d9194;--lagoon:#8aebef;--coral:#f0ac91;--line:#e9f4ef1c;--panel:#192226eb;background:#121b1e}
button,.button,select{border-radius:7px;background:#1c292dde;border-color:#e3f1ef24;font-weight:500}button:hover,.button:hover{background:#304248;border-color:#8aebef77}button.active,button[aria-pressed=true]{background:#244349;color:#b5f9fa;border-color:#8aebef80}input{background:#111e22;border-color:#d6e7e52b}.stage{background:#172328}.vignette{background:linear-gradient(180deg,#07111444,transparent 19%,transparent 75%,#0711147a)}
.topbar{padding:22px 28px}.brand{font-size:17px;letter-spacing:-.7px;padding-left:36px}.brand:before,.brand:after{width:22px;height:12px;border-width:1.5px}.brand:after{left:8px;top:11px}.brand span{font-size:6px;letter-spacing:2px;margin-top:7px;color:#c6d7d6}.top-actions button{background:#14202486;border-color:#d7ece421;backdrop-filter:blur(12px);font-size:10px;min-height:34px;padding:8px 12px}.status{font-size:7px;letter-spacing:1px;opacity:.7}.ride-top{top:85px;left:28px;gap:7px}.ride-top>span{padding:3px 0;background:none;border:0;backdrop-filter:none;font-size:7px;letter-spacing:.5px;color:#dbe9e5;text-shadow:0 1px 5px #0009}.ride-top>span+span:before{content:"·";margin-right:7px;color:#b3cdca}#riderCount{color:#d7eeee}
.ride-hud{left:30px;right:30px;bottom:max(25px,env(safe-area-inset-bottom));max-width:none;display:grid;grid-template-columns:70px 170px minmax(20px,1fr) 50px auto auto;grid-template-areas:"speed modes gap steer pedals actions";align-items:end;column-gap:18px;row-gap:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none}.speedometer{grid-area:speed;align-self:end;min-height:75px;text-shadow:0 2px 16px #0009}.speedometer strong{font-size:37px;font-weight:450;line-height:1;letter-spacing:-1.7px}.speedometer span{font-size:6px;letter-spacing:.7px;margin-top:7px;color:#dce7e1}.speedometer small{font-size:8px;margin-top:6px;color:#c1d0cb}.ride-control{grid-area:modes;max-width:170px;padding:0;border:0;gap:4px}.ride-control>span{font-size:6px;letter-spacing:.1px;color:#c6d5d0;opacity:.6}.ride-control select,.ride-control select#embodiment{min-height:26px;font-size:8px;letter-spacing:.2px;background:#102025ac;border:1px solid #daece326;border-radius:5px;padding:5px 8px;color:#d0eeec;backdrop-filter:blur(10px)}.ride-control label:has(#embodiment){max-width:110px}.effort{font-size:6px;color:#c0d5cf;gap:8px;letter-spacing:.5px}.effort input{min-height:12px;opacity:.8}.host-locator{font-size:8px;gap:4px;color:#e0ece6}.host-locator [data-host-arrow]{font-size:16px;width:16px}.host-locator small{display:inline;font-size:7px;margin-left:4px;color:#b7ccc5}
#joystick{grid-area:steer;width:46px;height:46px;opacity:.55;background:#1424296b;border-color:#e0f3eb3b;transition:opacity .15s;align-self:end;margin-bottom:13px}#joystick:hover,#joystick:active{opacity:1}#joystick:before{left:8px;right:8px}#joystick:after{top:8px;bottom:8px}#stick{width:20px;height:20px;left:12px;top:12px;background:#99e5e822;border-color:#ace1df88;box-shadow:none}.steer-label{font-size:5px;letter-spacing:.5px;bottom:-12px;color:#ccdcd4}.ride-pedals{grid-area:pedals;align-self:end;align-items:center;gap:6px;margin-bottom:0}.pedal{width:68px;height:40px;border-radius:7px;font-size:9px;letter-spacing:.7px;box-shadow:none;background:#b4e7e5de;color:#17363b}.pedal small{font-size:5px;margin-top:4px;letter-spacing:.3px}.pedal:hover{background:#c8fbf7}.pedal.active{background:#e5ffff;box-shadow:0 0 20px #8aebef22}.ride-brake{min-width:47px;min-height:40px;padding:7px 8px;border:1px solid #dfb39a3b;background:#382b25a3;color:#e4bda7;font-size:8px;letter-spacing:.3px}.ride-brake small{font-size:5px;margin-top:4px}.ride-buttons{grid-area:actions;display:grid;grid-template-columns:repeat(4,auto);width:auto;gap:6px;margin:0;align-self:end}.ride-buttons button{min-width:54px;min-height:40px;font-size:9px;padding:9px 11px;background:#14242acc;border-color:#d1e6dd25;border-radius:7px;backdrop-filter:blur(10px);color:#dbe8e4;white-space:nowrap}.ride-buttons button:hover{background:#2a4148;border-color:#8aebef60}.ride-buttons button:disabled{opacity:.4}
.host-hud{left:28px;right:28px;bottom:24px;max-width:none;padding:0;grid-template-columns:minmax(170px,.9fr) minmax(0,2fr) auto;gap:18px;border:0;border-radius:0;background:none;backdrop-filter:none;box-shadow:none}.host-summary{display:block;min-width:0;padding:10px 12px;background:#142126;text-shadow:none}.host-summary strong{font-size:11px;font-weight:500}.host-summary p{font-size:8px;line-height:1.5;max-width:220px;margin-top:5px;color:#c2d0ca}.host-world-controls{border:0;padding:0;gap:6px}.host-world-controls select,.host-world-controls button,.host-session-controls button{font-size:8px;min-height:32px;padding:7px 9px;background:#14242acc;backdrop-filter:blur(10px);border-color:#daece326}.host-world-controls select{max-width:180px}.host-session-controls{gap:6px}#record{color:#edc3ae;border-color:#e5b69e44}
.setup{background:#1a2428fa;border-color:#e9f4ef29;border-radius:15px}.drawer-title h2{font-size:22px;letter-spacing:-.7px}.drawer-title button,.kit-title button{background:#2b383a;border-color:#d6e9e126}.setup .eyebrow{color:#a8d7d7}.source-choices button{background:#243135;border-color:#d4e8e326;font-size:11px;min-height:43px}#sourceState{background:#8aebef06;border-left-color:#8aebef;color:#b3c4c2}.small{color:#aebfbc}summary{color:#d1ded8}details[open]>summary{color:#b1e9e6}#notice.setup-notice-footer{background:#121e22e8;color:#aabfba;border-color:#daece320}.outfit-panel{background:#1d292cfa;border-color:#d9f0e333;border-radius:15px}.outfit-panel:has(.avatar-library) .kit-title{background:#1d292cfa}.kit-presets button{background:#24383a}.kit-title{font-size:16px}.kit-colors input{height:25px}.avatar-model-preview:not(:has(canvas)){background:radial-gradient(ellipse at 50% 60%,#34464b,#243237)}.avatar-import-file{background:#142429}.avatar-library-item .avatar-saved-preview{background:#283b40}.avatar-library .avatar-use-button:disabled{background:#2b3b40;border-color:#d6eeee20;color:#9db1b2}.avatar-library .avatar-use-button{background:var(--lagoon);color:#173b40}.avatar-library h3{font-size:16px}.toast{background:#17272cf5;border-color:#daf3e330;color:#e3efea}.regroup-offer,.route-waiting{background:#1c2c32ed;border-color:#d4eee32b}.look-around-hint{top:115px;background:none;border:0;backdrop-filter:none;font-size:8px;color:#d1dfd9;opacity:.65;padding:0;text-shadow:0 1px 5px #0009}.mapped-world-status{bottom:135px;background:#1b2c32df;border-radius:7px;font-size:10px}.lobby h1{font-size:30px;letter-spacing:-.5px;font-weight:600}.lobby .eyebrow{font-size:8px;letter-spacing:1.5px;color:#b5d5cf}.lobby>p:not(.eyebrow){font-size:13px;line-height:1.7}.lobby .primary{background:#b6e9e6;color:#15373d;border-color:#b6e9e6;font-size:12px;padding:14px 17px;min-height:46px;border-radius:7px;box-shadow:none}.lobby .demo-button{background:#14242aab;border-radius:7px;font-size:10px}.lobby-more summary{font-size:10px}.lobby>p.lobby-demo-note,.lobby .subtle{font-size:8px;color:#b0c5bd}
@media(min-width:1100px){body:has(#setup:not([hidden])) .host-hud{background:none;padding:0;max-width:660px}.host-hud:has(#companionGuest:not([hidden])){grid-template-columns:minmax(160px,.8fr) minmax(0,2fr)}}
@media(max-width:1099px) and (min-width:761px){.ride-hud{grid-template-columns:60px 150px minmax(0,1fr) 42px auto auto;gap:10px}.ride-control{max-width:150px}.ride-buttons{grid-template-columns:1fr 1fr;gap:4px}.ride-buttons button{min-height:29px;padding:6px 9px;font-size:8px;min-width:48px}.host-hud{grid-template-columns:1fr auto;gap:10px}.host-summary{grid-column:1/-1;display:flex;gap:10px;align-items:baseline}.host-summary p{margin:0;max-width:none}}
@media(max-width:760px){.topbar{padding:19px 18px}.brand{font-size:16px}.brand span{font-size:5px}.ride-top{top:77px;left:18px}.ride-top>span{font-size:6px}.ride-hud{left:20px;right:20px;bottom:max(25px,env(safe-area-inset-bottom));display:grid;grid-template-columns:65px minmax(0,1fr) 74px auto;grid-template-areas:"speed modes actions actions" "steer gap pedals pedals";column-gap:14px;row-gap:17px;align-items:end;padding:0;background:none;border:0;box-shadow:none;backdrop-filter:none}.speedometer{min-height:66px}.speedometer strong{font-size:33px}.speedometer span{font-size:5px;margin-top:6px}.speedometer small{font-size:7px;margin-top:5px}.ride-control{max-width:165px;gap:4px;align-self:end}.ride-control select,.ride-control select#embodiment{font-size:7px;min-height:25px;padding:5px 7px}.ride-control>span{font-size:5px}.effort{font-size:5px;gap:5px}.effort input{min-height:13px}.ride-control label:has(#embodiment){max-width:100px}.host-locator{font-size:7px}.host-locator [data-host-arrow]{font-size:14px;width:14px}.host-locator small{font-size:6px;display:block;margin:0}.ride-buttons{grid-template-columns:1fr 1fr;gap:5px;max-width:150px;justify-self:end}.ride-buttons button{font-size:8px;min-height:32px;padding:7px 9px;min-width:48px}.ride-pedals{justify-self:end;margin:0;gap:8px}.pedal{width:74px;height:58px;border-radius:12px;font-size:10px;background:#b0e8e4df}.pedal small{font-size:5px;margin-top:6px}.ride-brake{min-width:50px;min-height:45px;font-size:8px}#joystick{width:62px;height:62px;opacity:.8;margin:0 0 5px;background:#18292b66;border-color:#d6ece54d}#stick{width:26px;height:26px;left:17px;top:17px}.steer-label{font-size:5px;bottom:-12px}.host-hud{left:20px;right:20px;bottom:22px;grid-template-columns:1fr;gap:10px}.host-summary{display:block}.host-summary strong{font-size:10px}.host-summary p{font-size:7px;max-width:none;margin:4px 0 0 12px}.host-world-controls{display:grid;grid-template-columns:1fr 1fr;gap:5px}.host-world-controls select{max-width:none;width:100%;font-size:8px}.host-world-controls button,.host-session-controls button{min-height:32px;font-size:8px}.host-session-controls button{flex:1}.look-around-hint{top:101px;right:18px;font-size:7px;max-width:210px}.mapped-world-status{bottom:245px;left:20px;max-width:calc(100% - 40px);font-size:9px}.toast{bottom:245px;font-size:10px}.lobby h1{font-size:30px;letter-spacing:-.5px}.lobby .eyebrow{font-size:7px}.lobby>p:not(.eyebrow){font-size:12px}}
@media(max-width:520px){.ride-hud{left:19px;right:19px;bottom:max(26px,env(safe-area-inset-bottom));grid-template-columns:51px minmax(110px,1fr) auto;grid-template-areas:"speed modes actions" "steer gap pedals";gap:18px 11px}.speedometer strong{font-size:32px;letter-spacing:-1px}.speedometer span{font-size:5px;letter-spacing:.2px}.speedometer small{font-size:6px}.ride-control{min-width:0;max-width:none}.ride-control select,.ride-control select#embodiment{min-height:27px;font-size:6px;letter-spacing:.1px;padding:5px 6px}.ride-control label:has(#embodiment){max-width:90px}.ride-buttons{max-width:116px;grid-template-columns:1fr 1fr;gap:4px}.ride-buttons button{min-width:0;min-height:34px;font-size:7px;padding:6px 7px;line-height:1.2;white-space:normal}.ride-pedals{gap:7px}.pedal{width:65px;height:58px;font-size:9px}.ride-brake{min-width:42px;min-height:43px;padding:6px;font-size:7px}.ride-brake small{font-size:4px}.pedal small{font-size:4px}#joystick{width:58px;height:58px}#stick{width:24px;height:24px;left:16px;top:16px}.top-actions button{min-height:33px;font-size:8px;padding:7px 9px}.host-world-controls select,.host-world-controls button,.host-session-controls button{min-height:32px}.look-around-hint{top:100px;font-size:6px}.lobby{left:26px;top:clamp(145px,25vh,190px)}.lobby h1{font-size:30px;letter-spacing:-.5px}.lobby .primary{min-height:43px;font-size:11px}.lobby-starts .demo-button{min-height:36px}.lobby>p.lobby-demo-note{font-size:8px}}
@media(max-height:500px) and (min-width:521px){.ride-hud{left:22px;right:22px;bottom:20px;grid-template-columns:52px 140px minmax(0,1fr) 42px auto auto;grid-template-areas:"speed modes gap steer pedals actions";gap:10px}.speedometer strong{font-size:30px}.ride-control{gap:2px}.ride-control select,.ride-control select#embodiment{font-size:7px;min-height:23px}.ride-buttons{display:grid;grid-template-columns:1fr 1fr}.ride-buttons button{min-height:27px;font-size:7px;padding:6px 9px}#joystick{width:42px;height:42px;margin-bottom:10px}#stick{width:18px;height:18px;left:11px;top:11px}.pedal{width:57px;height:36px;border-radius:7px;font-size:8px}.ride-brake{min-height:36px;min-width:42px;font-size:7px}.host-hud{grid-template-columns:1fr auto;gap:6px}.host-summary{display:flex;gap:10px}.host-world-controls{display:flex}.host-world-controls select{max-width:150px}.host-summary p{margin:0}.look-around-hint{top:82px}}
@media(max-width:520px) and (min-height:501px){.ride-control select,.ride-control select#embodiment{font-size:8px;min-height:29px}.ride-buttons button{font-size:9px;min-height:36px}.ride-control label:has(#embodiment){max-width:96px}.pedal small,.ride-brake small{font-size:5px}}
/* Clear riding choices; transport acknowledgements stay available to assistive tech. */
#inputAck{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.ride-control select,.ride-control select#embodiment{font-size:11px;min-height:33px;letter-spacing:0;padding:7px 9px}.ride-control label:has(#embodiment){max-width:125px}.host-locator{font-size:11px;gap:6px}.host-locator [data-host-arrow]{font-size:20px;width:20px}.host-locator small{font-size:9px;margin-left:5px}.effort{font-size:7px}.ride-control{gap:5px}.ride-buttons button{font-size:10px}.host-world-controls select,.host-world-controls button,.host-session-controls button{font-size:10px;min-height:36px}.host-summary strong{font-size:12px}.host-summary p{font-size:10px}.look-around-hint{display:none!important}
@media(max-width:760px){.ride-control select,.ride-control select#embodiment{font-size:10px;min-height:38px;padding:8px}.host-locator{font-size:10px}.host-locator small{font-size:9px}.ride-buttons button{font-size:10px;min-height:42px}.host-world-controls select,.host-world-controls button,.host-session-controls button{min-height:42px;font-size:10px}.top-actions button{min-height:42px;font-size:9px}.ride-brake{min-height:46px;font-size:9px}.pedal{font-size:10px}}
@media(max-width:520px){.ride-control select,.ride-control select#embodiment{font-size:10px;min-height:42px;padding:8px 6px}.ride-control label:has(#embodiment){max-width:110px}.ride-buttons button{font-size:9px;min-height:42px}.host-locator small{font-size:8px;display:block;margin:0}.host-locator{font-size:10px}.host-locator [data-host-arrow]{font-size:17px;width:17px}.effort{font-size:6px}.ride-hud{grid-template-columns:51px minmax(110px,1fr) auto}.host-summary p{font-size:9px}.host-summary strong{font-size:11px}}
@media(pointer:coarse){.ride-buttons button,.ride-control select,.ride-control select#embodiment,.host-world-controls select,.host-world-controls button,.host-session-controls button{min-height:42px}}
@media(max-height:500px) and (min-width:521px){.ride-control select,.ride-control select#embodiment{font-size:9px;min-height:28px}.host-locator{font-size:9px}.host-locator small{font-size:8px}.ride-buttons button{font-size:9px;min-height:34px}}
@media(max-width:760px){.kit-title button,.drawer-title button{min-width:42px;min-height:42px}}

/* One garage for rider identity, imported avatars and bicycle finishes. */
.kit-tabs{display:flex;gap:4px;margin:0 0 20px;padding:4px;background:#111a20;border-radius:10px}.kit-tabs button{flex:1;background:transparent;border:0;min-height:42px;color:#98a9b1}.kit-tabs button[aria-selected="true"]{background:#2c414d;color:#f2f8fb}.bike-kit h3{font-size:18px;margin:0 0 14px}.bike-kit-preview{height:240px;border-radius:12px;background:#172128;overflow:hidden}.bike-kit-preview canvas{width:100%;height:100%;display:block}.bike-kit-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.bike-kit-fields label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#b5c5ce}.bike-kit-fields input[type=color]{width:100%;height:42px;padding:4px;border-radius:8px;background:#18262e;border:1px solid #33454e}.bike-kit-fields select{min-height:42px;max-width:100%}.bike-kit-apply{width:100%;min-height:44px;background:#bcecf1;color:#11262a}.bike-kit p{font-size:12px;color:#b5c5ce;line-height:1.5}

.outfit-panel .bike-kit-apply{background:#bcecf1;color:#11262a;border-color:transparent}.outfit-panel .bike-kit-apply:disabled{opacity:.55}.bike-kit-preview{touch-action:none;cursor:grab}.bike-kit-preview:active{cursor:grabbing}

/* Keep map limitations readable over bright photographic roofs. */
body:has(.stage.runtime-map-visible) .host-summary{display:block;width:fit-content;max-width:100%;padding:8px 10px;background:rgba(8,18,23,.88);border-radius:4px;text-shadow:none}
body:has(.stage.runtime-map-visible) .host-summary strong{font-size:12px;font-weight:600;color:#f3f6f5}
body:has(.stage.runtime-map-visible) .host-summary p{font-size:12px;line-height:1.4;color:#e3eae7;max-width:34rem;margin:4px 0 0}
.ride-control>.movement-status{display:block;grid-column:1/-1;min-width:0;max-width:100%;box-sizing:border-box;font-size:14px;line-height:1.4;color:#edf9f6;opacity:1;background:#14262b;border:1px solid #78948e;border-radius:6px;padding:6px 8px;overflow-wrap:anywhere;}
.ride-control>.movement-status:empty{display:none;}
#ridePauseStatus{margin:0 0 6px;padding:8px 10px;border-left:3px solid #ffd58a;background:#182b30;color:#fff1d8;font-size:12px;line-height:1.4;white-space:normal;grid-column:1/-1}
#guestPanel .pedal:disabled,#guestPanel .ride-brake:disabled{opacity:1;background:#193039;color:#d4e4e5;box-shadow:none;cursor:not-allowed}
#guestPanel #joystick[aria-disabled=true]{opacity:.45;cursor:not-allowed}
/* The live location instrument stays visible with the source; it opens its controls. */
#liveGPSQuick{display:block;margin:6px 0 0 12px;min-height:30px;padding:4px 8px;border:0;border-left:2px solid var(--lagoon);border-radius:0;background:#101b20e8;color:#d3f5ef;text-align:left;font-size:12px;line-height:1.4;text-shadow:none}
#liveGPSQuick:hover,#liveGPSQuick:focus-visible{background:#223b40;text-decoration:underline;text-underline-offset:3px}
#liveGPSQuick[data-status="uncertain"],#liveGPSQuick[data-status="stale"],#liveGPSQuick[data-status="unavailable"]{border-left-color:var(--coral);color:#ffd2bd}

.source-recovery{position:fixed;z-index:35;top:116px;left:20px;right:20px;max-width:640px;display:flex;gap:18px;align-items:center;padding:16px 18px;border:1px solid #ffc56d;background:#292419;color:#fff4dd;box-shadow:0 6px 24px #0006}.source-recovery[hidden],body.clean .source-recovery{display:none}.source-recovery strong{font-size:17px}.source-recovery p{margin:6px 0 0;font-size:14px;line-height:1.45}.source-recovery button{flex-shrink:0;min-height:44px;border-color:#ffc56d;color:#fff4dd}@media(max-width:600px){.source-recovery{left:12px;right:12px;top:104px;gap:12px;align-items:stretch;flex-direction:column}.source-recovery button{align-self:flex-start}}

body:has(#setup:not([hidden])) .source-recovery{display:none}

/* Keep ride input legible over moving scenery at desktop and phone sizes. */
.ride-hud{grid-template-columns:86px 190px minmax(0,1fr) 64px auto auto;column-gap:16px}
.speedometer span{font-size:9px;letter-spacing:.2px;line-height:1.4}
.speedometer small{font-size:10px}
.ride-control{max-width:190px;gap:6px}
.ride-control select,.ride-control select#embodiment{font-size:12px;min-height:44px;background:#14262bf2;color:#edf9f6;border-color:#78948e;padding:9px}
.ride-control label:has(#embodiment){max-width:none}
.effort{font-size:10px;color:#e4f1eb;letter-spacing:.2px;text-shadow:0 1px 3px #000}
.effort input{min-height:32px;opacity:1}
.host-locator{font-size:12px;color:#f1fbf5;text-shadow:0 1px 3px #000}
.host-locator small{font-size:10px;color:#d3e5dd}
#joystick{width:64px;height:64px;opacity:1;background:#14262be8;border-color:#86a49c;margin-bottom:16px}
#stick{width:28px;height:28px;left:17px;top:17px;background:#8aebef40;border-color:#c5f5ec}
.steer-label{font-size:9px;letter-spacing:0;bottom:-17px;white-space:nowrap;color:#eff8f2;text-shadow:0 1px 3px #000}
.pedal{width:88px;height:56px;font-size:12px;background:#b4eeea;color:#102d31;transition:none}
.pedal small,.ride-brake small{font-size:9px;opacity:1;letter-spacing:0;margin-top:5px;white-space:nowrap}
.ride-brake{min-width:72px;min-height:56px;font-size:12px;background:#49362df2;color:#ffe1cf;border-color:#be957e;transition:none}
.ride-buttons{grid-template-columns:repeat(3,minmax(0,1fr));max-width:315px;gap:6px}
.ride-buttons button{min-width:0;min-height:44px;font-size:12px;padding:8px 10px;white-space:normal;line-height:1.25;background:#14262bf2;color:#edf9f6;border-color:#68857e}
.ride-buttons button:focus-visible,.ride-control select:focus-visible,.ride-pedals button:focus-visible{outline:3px solid #c7ffef;outline-offset:3px}
@media(max-width:1099px) and (min-width:761px){
 .ride-hud{grid-template-columns:76px 170px minmax(0,1fr) 64px auto;grid-template-areas:"speed modes gap steer pedals" "actions actions actions actions actions";row-gap:15px}
 .ride-buttons{display:flex;max-width:none;justify-self:end;flex-wrap:wrap}
 .ride-buttons button{font-size:11px}
}
@media(max-width:760px){
 .ride-hud{left:16px;right:16px;bottom:max(24px,env(safe-area-inset-bottom));grid-template-columns:70px minmax(0,1fr) auto;grid-template-areas:"speed modes modes" "actions actions actions" "steer gap pedals";gap:12px}
 .ride-control{max-width:none;display:grid;grid-template-columns:1.5fr 1fr;align-items:center;gap:6px}
 .ride-control #hostLocator,.ride-control .effort{grid-column:1/-1}
 .ride-control select,.ride-control select#embodiment{width:100%;font-size:11px;padding:7px;min-height:44px}
 .host-locator small{display:inline;margin-left:5px;font-size:10px}
 .host-locator{font-size:12px}
 .ride-buttons{width:100%;max-width:none;grid-template-columns:repeat(4,minmax(0,1fr));justify-self:stretch;gap:6px}
 .ride-buttons button{min-height:44px;font-size:11px;padding:7px 4px}
 .ride-pedals{gap:10px}
 .speedometer{min-height:0;align-self:center}
 .speedometer span{font-size:9px}
 .speedometer small{font-size:10px}
 .pedal{width:88px;height:60px;font-size:12px}
 .ride-brake{min-width:72px;min-height:56px;font-size:12px}
 .effort{font-size:10px}
 #joystick{width:64px;height:64px;margin-bottom:0}
 body:has(#guestPanel:not([hidden])) .toast,body:has(#guestPanel:not([hidden])) .mapped-world-status{bottom:355px}
}
@media(max-width:380px){
 .ride-hud{left:12px;right:12px;grid-template-columns:58px minmax(0,1fr) auto;gap:10px}
 .ride-buttons button{font-size:10px}
 .speedometer span{font-size:8px}
}
@media(max-height:500px) and (min-width:521px){
 .ride-hud{left:16px;right:16px;bottom:20px;grid-template-columns:70px 160px minmax(0,1fr) 64px auto;grid-template-areas:"actions actions actions actions actions" "speed modes gap steer pedals";gap:10px}
 .ride-control{display:flex;gap:4px;max-width:160px}
 .ride-control select,.ride-control select#embodiment{min-height:40px;font-size:11px;padding:7px}
 .ride-buttons{display:flex;flex-wrap:wrap;justify-content:flex-end;max-width:none;gap:5px}
 .ride-buttons button{font-size:10px;min-height:40px;padding:7px 9px}
 .pedal{width:88px;height:56px}
 .ride-brake{min-height:56px}
 #joystick{margin-bottom:15px}
 .host-locator small{font-size:10px}
}
/* Recovery stays readable within the narrow ride controls on phones. */
.host-locator:has([data-host-catchup]){flex-wrap:wrap}
.host-locator [data-host-catchup]{flex:0 0 100%;min-width:0;min-height:42px;padding:7px 8px;font-size:11px;white-space:normal;line-height:1.25}
/* A short viewport must not put renderer progress under ride actions. */
@media(max-width:520px){#guestRenderStatus{top:clamp(120px,calc(100dvh - 430px),44%)}}
@media(max-height:500px) and (min-width:521px){#guestRenderStatus{top:110px;left:16px;right:auto;max-width:250px;font-size:12px}}

#sourceBadge.coverage-held{font-size:12px!important;line-height:1.4;letter-spacing:.03em!important;color:#fff!important;background:#473b22;padding:8px 10px;border-radius:5px;white-space:normal;max-width:calc(100vw - 36px)}


/* Keep the same rider visible while choosing clothing or bicycle details. */
.outfit-panel>.bike-kit-preview{height:210px;margin:0 0 4px;border:1px solid #55707866}.outfit-panel>.bike-kit-preview:focus-visible{outline:2px solid var(--lagoon);outline-offset:3px}.outfit-panel>.kit-preview-caption{font-size:11px;color:#bad5d4;margin:4px 0 16px}.outfit-panel .kit-tabs{margin-bottom:12px}@media(max-width:760px){.outfit-panel>.bike-kit-preview{height:175px}.outfit-panel>.kit-preview-caption{font-size:10px;margin-bottom:12px}}
/* Loss of registration must remain readable over the ride, including phones. */
#sourceBadge.alignment-held{font-size:13px;line-height:1.45;font-weight:700;letter-spacing:.025em;color:#fff3d0;background:#503600;border:1px solid #c89b3c;padding:9px 12px;white-space:normal;max-width:100%;box-shadow:0 2px 12px #0005}

/* Keep the paused source and the outline actions together while authoring. */
.mask-edit-tools{position:fixed;z-index:20;left:16px;right:16px;bottom:max(16px,env(safe-area-inset-bottom));max-width:720px;margin:auto;padding:14px 16px;background:#10251ff5;border:1px solid #b4dac6;border-radius:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-shadow:0 8px 32px #0008}
.mask-edit-tools strong{font-size:14px}.mask-edit-tools p{font-size:12px;color:#d5e7de;margin:6px 0 0}.mask-edit-actions{display:flex;gap:8px;flex-shrink:0}.mask-edit-actions button{min-height:44px;font-size:12px;padding:10px 12px}#maskEditApply{background:var(--lagoon);color:#102e25}#maskEditApply:disabled{opacity:.45}
body.mask-editing .topbar,body.mask-editing .host-hud,body.mask-editing .ride-top,body.mask-editing .ride-hud,body.mask-editing #hostRenderStatus,body.mask-editing #sourceRecovery{visibility:hidden}
@media(max-width:665px){.mask-edit-tools{left:10px;right:10px;flex-direction:column;align-items:stretch;padding:12px}.mask-edit-actions{justify-content:space-between}.mask-edit-actions button{flex:1;padding:10px 7px}}

body.mask-editing .stage{bottom:calc(100px + env(safe-area-inset-bottom))}
@media(max-width:665px){body.mask-editing .stage{bottom:calc(146px + env(safe-area-inset-bottom))}}
#guestRenderStatus.watching-host{top:120px;left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100% - 40px);padding:10px 14px;background:#132320eb;border:1px solid #a6d7cb55;border-radius:8px;line-height:1.5;font-size:13px}

@media(max-width:520px){#guestRenderStatus.watching-host{top:220px}.stage video.preparing-host{top:180px;height:clamp(100px,calc(100dvh - 560px),320px);bottom:auto;object-fit:contain}}
/* Avatar download state stays with the host's existing rider controls. */
.rider-avatar-state{grid-column:1/-1;display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;padding:.35rem 0 .15rem;font-size:.82rem;line-height:1.4}
.rider-avatar-message{flex:1 1 13rem}
.rider-avatar-state[data-state="error"] .rider-avatar-message{color:#f4c386}
.rider-avatar-state .rider-avatar-retry{min-height:36px;padding:.3rem .65rem;font-size:.8rem;white-space:nowrap}
.rider-avatar-state .rider-avatar-retry[hidden]{display:none}

.ride-formation{display:flex;flex-direction:column;gap:5px;min-width:0;grid-column:1/-1}.ride-formation>label{font-size:10px;letter-spacing:.08em;color:#bdd3ce}.ride-formation small{font-size:11px;line-height:1.35;color:#d7e8e4;white-space:normal}.ride-formation select{width:100%;min-height:44px}
.ride-formation-rejoin{align-self:stretch;min-height:44px;background:#1a6158;border:1px solid #72ccba;color:#f2fffa;font-weight:700;letter-spacing:.02em}.ride-formation-rejoin:focus-visible{outline:2px solid #fff;outline-offset:2px}.ride-formation-rejoin[hidden]{display:none}

#rideNitro{font-variant-numeric:tabular-nums}#rideNitro:disabled{opacity:.8}#rideNitro[data-active=true]{opacity:1;background:#174e45;color:#c0ffee;border-color:#63d5b5}

.host-view-controls{min-width:0}.host-view-controls>summary{display:block;cursor:pointer;list-style:none;border:1px solid var(--line);border-radius:10px;padding:11px 13px;font-size:12px;background:#10272be8}.host-view-controls>summary::after{content:"＋";float:right}.host-view-controls[open]>summary::after{content:"−"}.host-view-controls[open]>.host-world-controls{margin-top:10px}.host-view-controls[open]{max-height:42dvh;overflow:auto}.host-view-controls{align-self:center;border:0;padding:0}.host-view-controls:not([open])>summary{max-width:200px}.host-view-controls #simRideCruise{margin-top:10px}
@media(max-width:760px){.host-view-controls>summary{display:block;cursor:pointer;list-style:none;border:1px solid var(--line);border-radius:10px;padding:11px 13px;font-size:12px;background:#10272be8}.host-view-controls>summary::after{content:"＋";float:right}.host-view-controls[open]>summary::after{content:"−"}.host-view-controls[open]>.host-world-controls{margin-top:10px}.host-view-controls[open]{max-height:42dvh;overflow:auto}.host-hud:has(.host-view-controls){gap:8px}}

@media(max-width:760px){body[data-scene-mode="simulation"]:has(#hostHud:not([hidden])) .stage>#output{top:132px;bottom:auto;height:max(220px,calc(100dvh - 420px));object-fit:cover;object-position:40% center}body.clean[data-scene-mode="simulation"]:has(#hostHud:not([hidden])) .stage>#output{top:0;bottom:0;height:100%;object-fit:cover}}

@media(max-width:760px) and (orientation:portrait){
 /* Keep the entire host video above the live controls, instead of letterboxing
    it in the middle of the screen where the bottom of the picture is covered. */
 body[data-scene-mode="footage"]:not(.clean):has(#hostHud:not([hidden])) .stage>#output{
  top:calc(95px + env(safe-area-inset-top));
  bottom:auto;
  height:min(56.25vw,calc(100dvh - 455px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  object-fit:contain;
  object-position:center top;
 }
 /* A populated roster grows the dock to 61dvh; keep its upper edge clear. */
 body[data-scene-mode="footage"]:not(.clean):has(#hostHud:not([hidden]) .host-live-rider:nth-child(2)) .stage>#output{
  height:min(56.25vw,calc(39dvh - 115px - env(safe-area-inset-top)));
 }
}


#footagePlayback .footage-position-label{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:14px}#footagePositionTime{font-variant-numeric:tabular-nums;font-size:11px;color:#d8e6da;white-space:nowrap}#footagePosition{width:100%;margin:8px 0 0;padding:0;min-height:32px;accent-color:var(--lagoon)}

/* Do not show a host renderer placeholder underneath guest recovery actions. */
#returnVideo.host-view-unavailable{visibility:hidden}
.host-summary #linkAlert{font-size:.85rem;line-height:1.45;color:#ffe8b0;background:rgba(19,24,22,.94);padding:8px 10px;border-left:3px solid #dfb45c;margin:8px 0;max-width:36rem;}

#reconnectMedia{pointer-events:auto;min-height:40px;padding:8px 14px;font-size:12px;font-weight:700;color:#102c2c;background:var(--lagoon);border:1px solid var(--lagoon);box-shadow:0 2px 12px #0004}
#reconnectMedia:focus-visible{outline:3px solid white;outline-offset:3px}

#activeVideoFile{overflow-wrap:anywhere;}

/* The joined phone ride is the primary surface, including usable host-video fallback. */
@media(max-width:520px){
 body:has(#guestPanel:not([hidden])):has(#returnVideo:not([hidden])) .stage>#returnVideo:not(.host-view-unavailable){inset:0;width:100%;height:100%;object-fit:contain;object-position:center;background:#091c22}
 body:has(#guestPanel:not([hidden])) .topbar{padding:calc(12px + env(safe-area-inset-top)) 16px 12px}
 body:has(#guestPanel:not([hidden])) .brand span{display:none}
 /* The camera state belongs below the full-height wordmark and view actions;
    a single measured row scales across 320–390px phones and the safe area. */
 body:has(#guestPanel:not([hidden])) .ride-top{
  top:calc(76px + env(safe-area-inset-top));left:16px;right:16px;max-width:none;
  align-items:flex-start;gap:5px 9px
 }
 body:has(#guestPanel:not([hidden])) .ride-top>#sourceBadge:not([hidden]){
  display:inline-flex;align-items:center;min-width:0;max-width:100%;
  padding:7px 9px;background:#102b2aeb;border:1px solid #bce4db64;border-radius:8px;
  color:#f2fff6;font-size:11px;font-weight:650;line-height:1.35;letter-spacing:.15px;
  white-space:normal;overflow-wrap:anywhere;text-shadow:none
 }
 body:has(#guestPanel:not([hidden])) #guestConversation{top:112px;left:16px;right:16px;max-width:none}
 body:has(#guestPanel:not([hidden])) #guestConversation button{min-height:36px;padding:6px 10px;font-size:11px;background:#14262bc9}
 body:has(#guestPanel:not([hidden])) .vignette{background:linear-gradient(180deg,#071813b8,transparent 25%,transparent 62%,#071813c9)}
}


/* A live control strip belongs beside the broadcast, not in a second dashboard. */
.host-rider-keys{box-sizing:border-box;width:100%;grid-column:1/-1;display:grid;grid-template-columns:minmax(160px,1fr) auto;gap:6px 16px;border:1px solid var(--line);padding:10px 12px;background:#142126}
.rider-key-target{display:flex;align-items:baseline;gap:12px;min-width:0}
.rider-key-target strong{font-size:15px;color:var(--lagoon);overflow-wrap:anywhere}
.rider-key-target span{font-size:11px;color:var(--muted);white-space:nowrap}
.rider-key-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:flex-end}
.rider-key-actions button{min-height:36px;border-radius:6px;padding:8px 12px;font-size:11px}
.rider-key-remove-confirm{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.rider-key-remove-confirm[hidden]{display:none}
.rider-key-remove-confirm button{min-height:38px;border-radius:6px}
.rider-key-remove-confirm .danger-action{background:#8d3e38;color:white}
.rider-key-help,.rider-key-feedback{margin:0;grid-column:1/-1;font-size:11px;line-height:1.5;color:var(--muted)}
.rider-key-feedback:empty{display:none}
.rider-key-feedback{color:var(--ink)}
.host-live-people-heading #hostSpeechToggle{min-height:38px;background:#245b57;border-color:#7fd6bf;font-size:11px}
.host-live-people-heading #hostSpeechToggle[aria-pressed="true"]{background:#165446;outline:2px solid #74e0b3;outline-offset:1px}
.host-speech-status{margin:2px 0 8px;color:var(--lagoon);font-size:12px;line-height:1.5;max-width:60ch}
@media(max-width:680px){.host-live-people-heading #hostSpeechToggle{min-height:44px;flex:1 1 auto}.host-speech-status{font-size:12px}}
.rider-row[data-keyboard-selected]{box-shadow:inset 3px 0 var(--lagoon);padding-left:10px}
@media(max-width:680px){.host-rider-keys{grid-template-columns:1fr;gap:8px}.rider-key-actions{justify-content:flex-start}.rider-key-target{justify-content:space-between}.rider-key-actions button:nth-child(n+3){flex:1}.rider-key-help{font-size:10px}}

@media(max-width:680px){.host-session-controls:has(#riderKeysToggle:not([hidden])){min-width:0}.host-session-controls:has(#riderKeysToggle:not([hidden]))>button{flex:1 1 80px;min-height:42px}.host-session-controls:has(#riderKeysToggle:not([hidden]))>.recording-controls{flex:1 1 120px;min-width:0}.rider-key-actions button{min-height:42px}}
@media(max-width:680px){body:has(#hostRiderKeys:not([hidden])) .ride-chat{top:104px;bottom:auto}}

#guestCaptureDialog{width:calc(100vw - 32px);max-width:none;height:calc(100dvh - 32px);max-height:none;background:#0b171e;color:#edf4f3;border:1px solid #40565a;border-radius:12px;padding:12px;box-sizing:border-box}#guestCaptureDialog::backdrop{background:#000c}#guestCaptureDialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}#guestCaptureDialog h2{font-size:18px;margin:0}#guestCaptureStatus{margin:10px 0;font-size:14px}#guestCaptureStage{position:relative;width:100%;height:calc(100% - 88px);background:#081218;overflow:hidden;isolation:isolate}#guestCaptureStage:has(#guestCapturePhoto:not([hidden]))::before{content:'';position:absolute;inset:-40px;background:var(--capture-photo) center/cover no-repeat;filter:blur(35px) brightness(.36);pointer-events:none}#guestCaptureCanvas{width:100%;height:100%;display:block;touch-action:none}#guestCaptureCanvas[hidden]{display:none}#guestCapturePhoto{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(100%,900px);height:auto;max-height:100%;object-fit:contain;pointer-events:none;box-shadow:0 16px 64px #0009}#guestCapturePhoto[hidden]{display:none}
#guestCaptureHostInset{position:absolute;z-index:4;top:14px;right:14px;width:clamp(170px,25vw,300px);margin:0;overflow:hidden;border:1px solid #8fb5ad88;border-radius:12px;background:#091c22;box-shadow:0 12px 36px #000b;pointer-events:none}
#guestCaptureHostInset[hidden]{display:none}
#guestCaptureHostVideo{display:block;width:100%;aspect-ratio:16/9;height:auto;object-fit:contain;background:#091c22}
#guestCaptureHostInset figcaption{padding:6px 10px;font-size:10px;line-height:1.2;letter-spacing:.11em;color:#d8eee8;background:#10252bd9}
@media(max-width:600px){#guestCaptureHostInset{top:10px;right:10px;width:min(40vw,174px);border-radius:9px}#guestCaptureHostInset figcaption{padding:4px 7px;font-size:9px}}

/* During a real hosted capture transfer, keep the advancing host view as
   the stage, not a postage stamp surrounded by empty black. The verified
   native/trained world takes the same stage as soon as it actually renders. */
#guestCaptureStage:has(#guestCapturePhoto[hidden]):not(:has(#guestCaptureCanvas[data-native-geometry="verified"])):not(:has(#guestCaptureCanvas[data-splat-appearance="ready"])) #guestCaptureHostInset:not([hidden]){
 inset:0;width:100%;height:100%;max-width:none;display:flex;flex-direction:column;
 border:0;border-radius:0;box-shadow:none;background:#091c22
}
#guestCaptureStage:has(#guestCapturePhoto[hidden]):not(:has(#guestCaptureCanvas[data-native-geometry="verified"])):not(:has(#guestCaptureCanvas[data-splat-appearance="ready"])) #guestCaptureHostVideo{
 flex:1 1 auto;min-height:0;width:100%;height:calc(100% - 30px);aspect-ratio:auto;object-fit:contain
}
#guestCaptureStage:has(#guestCapturePhoto[hidden]):not(:has(#guestCaptureCanvas[data-native-geometry="verified"])):not(:has(#guestCaptureCanvas[data-splat-appearance="ready"])) #guestCaptureHostInset figcaption{
 flex:none;padding:8px 14px;font-size:11px
}
#guestCaptureStage:has(#guestCapturePhoto[hidden]):not(:has(#guestCaptureCanvas[data-native-geometry="verified"])):not(:has(#guestCaptureCanvas[data-splat-appearance="ready"])) #guestCaptureHostInset figcaption::after{
 content:" · preparing captured place";letter-spacing:normal;text-transform:none;color:#a9c7c6
}

@media(max-width:600px){#guestCaptureDialog{width:100vw;height:100dvh;border-radius:0;padding:10px}#exploreCapture{font-size:12px}}

#guestCaptureControls{position:absolute;right:22px;bottom:22px;display:flex;gap:4px;padding:4px;border:1px solid #50666a;border-radius:10px;background:#0b171ee8}#guestCaptureControls[hidden]{display:none}#guestCaptureControls button{min-width:44px;min-height:44px;padding:4px;font-size:24px;line-height:1}

/* While moving, the host sees people, voice and just two live actions. */
#hostHud[hidden],#hostHud [hidden],#setup [hidden]{display:none!important}
body .host-hud{left:clamp(12px,2vw,28px);right:clamp(12px,2vw,28px);bottom:max(14px,env(safe-area-inset-bottom));max-width:1050px;margin:0 auto;display:grid;grid-template-columns:minmax(170px,.85fr) minmax(260px,1.4fr) auto;align-items:start;gap:14px;padding:14px;background:#101d20eb;border:1px solid #a9d4cc46;border-radius:16px;box-shadow:0 14px 60px #020e14a6;backdrop-filter:none}
body .host-hud .host-summary{padding:2px 0;background:none}
body .host-hud .host-summary>strong{font-size:13px;font-weight:650}
body .host-hud .host-summary #stageHint{font-size:11px;max-width:28ch}
body .host-hud #hostConversation{margin-top:10px}
body .host-hud #hostConversation button{font-size:11px;min-height:40px}
.host-live-people{min-width:0;max-height:min(230px,36dvh);overflow:auto;border-inline:1px solid #bce9e42b;padding:0 12px}
.host-live-people-heading{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
.host-live-people-heading strong{font-size:12px;letter-spacing:.02em}
.host-live-people-heading span{font-size:11px;color:#bed5d4}
.host-live-roster{display:grid;gap:5px}
.host-live-rider{display:grid;grid-template-columns:minmax(75px,.9fr) minmax(140px,1.3fr);align-items:center;gap:8px;padding:5px 1px;border-top:1px solid #a7dcd42d}
.host-live-identity{min-width:0;display:grid;gap:3px}
.host-live-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.host-live-presence{font-size:10px;color:#a4e1c0}
.host-live-presence[data-state=disconnected]{color:#d9ae9f}
.host-live-rider .rider-moderation{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px;align-items:center}
.host-live-rider .rider-moderation>button{padding:8px 10px;min-height:40px;font-size:11px;white-space:nowrap}
.host-live-rider .rider-voice-state{flex:1 1 100%;font-size:10px;text-align:right;color:#c5d5d1}
.host-live-rider .rider-removal-confirm{flex:1 1 100%;padding:9px;background:#293035;border:1px solid #e3aa9d77;border-radius:9px}
.host-live-rider .rider-removal-confirm p{font-size:11px;line-height:1.4}
.host-live-actions{display:flex;flex-direction:column;gap:8px;min-width:125px}
.host-live-actions button{min-height:43px;padding:9px 12px;font-size:12px;white-space:nowrap}
#hostVideoPause[aria-pressed=true]{border-color:#f8c5a9;background:#654435;color:#fff1e8}
.host-live-actions #hostLeave{display:block}
.host-live-actions #hostLeave button{width:100%}
.host-live-actions #hostLeave p{display:none}
#hostVideoPauseStatus{font-size:10px;line-height:1.45;color:#c5d7d7;margin:1px 0 0;max-width:160px}

/* Preparation is navigated by purpose, with the original controls and state. */
#hostSetupNav{position:sticky;top:73px;z-index:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:10px 0 14px;background:#1a2428fa;margin-bottom:15px;border-bottom:1px solid #c4e6e229}
#hostSetupNav button{min-height:43px;padding:8px 6px;font-size:12px}
#hostSetupNav button[aria-current=true]{background:#426b68;color:#f8ffff;border-color:#a5f5e2}
#setup .host-setup-workspace{min-width:0}
#setup .host-setup-workspace h3{font-size:20px;letter-spacing:-.04em;margin:8px 0}
#setup .host-setup-intro{font-size:12px;line-height:1.55;color:#bed1ce;margin:3px 0 19px}
#setup #hostPreparedWorld{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px;padding:16px;margin:0 0 19px;border:1px solid #8dd9c63b;border-radius:12px;background:#203c3a6b}
#setup #hostPreparedWorld label{grid-column:1/-1;font-size:12px;font-weight:650;color:#e0f9f4}
#setup #hostPreparedWorld select{min-width:0;width:100%;min-height:43px}
#setup #hostPreparedWorld button{min-height:43px}
#setup #hostPreparedWorld button[hidden]{display:none}
#setup #broadcastWorkspace .host-session-controls{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0 18px}
#setup #broadcastWorkspace .recording-controls{display:flex;gap:8px}
#setup #broadcastWorkspace .host-view-controls{width:100%;margin-bottom:14px}
#setup #broadcastWorkspace .host-world-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#setup #hostPeopleWorkspace #riders{display:grid;gap:8px}
#setup #hostPeopleWorkspace .rider-row{max-width:100%}
#setup #hostPeopleWorkspace .rider-row>select{min-width:70px}
#setup #hostPeopleWorkspace #hostRiderKeys{margin-top:15px}
/* Keep most of the ride visible while preparing at ordinary laptop widths. */
#setup[data-host-preparation=true]{width:min(clamp(460px,42vw,780px),calc(100% - 28px));right:14px;top:75px;bottom:14px;max-height:calc(100dvh - 89px)}
#setup[data-host-preparation=true] .drawer-bottom>.row,
#setup[data-host-preparation=true] .drawer-bottom>.ride-volume,
#setup[data-host-preparation=true] .drawer-bottom>#inviteHelp,
#setup[data-host-preparation=true] .drawer-bottom>#soundStatus{display:none}
/* A tablet/laptop host still needs the live ride dock beside preparation. */
@media(min-width:900px) and (max-width:1099px){
 body:has(#setup:not([hidden])) .host-hud{right:calc(clamp(460px,42vw,780px) + 28px);max-width:none;grid-template-columns:minmax(0,1fr);gap:9px}
 body:has(#setup:not([hidden])) .host-hud .host-summary{display:block;min-width:0}
 body:has(#setup:not([hidden])) .host-hud .host-live-actions{min-width:0}
}
@media(max-width:760px){
 body .host-hud{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:11px;max-height:min(61dvh,480px);overflow:hidden}
 body .host-hud:has(#liveRiders .host-live-rider:nth-child(2)){height:min(61dvh,480px)}
 body .host-hud .host-summary{flex:0 0 auto;min-width:0}
 body .host-hud .host-summary #stageHint{display:none}
 .host-live-people{flex:1 1 auto;min-height:0;max-height:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;border-left:0;border-right:0;border-top:1px solid #bce9e42b;border-bottom:1px solid #bce9e42b;padding:8px 0}
 .host-live-actions{position:relative;z-index:1;flex:0 0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:7px;padding-top:8px;border-top:1px solid #bce9e42b;background:#101d20}
 .host-live-actions>#hostVideoPause,.host-live-actions>#hostStopRequest{width:100%;min-width:0;min-height:46px}
 #hostVideoPauseStatus{grid-column:1/-1;max-width:none;font-size:10px;line-height:1.35;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 #setup[data-host-preparation=true]{top:64px;bottom:9px;max-height:calc(100dvh - 73px);right:9px;width:calc(100% - 18px)}
}
@media(max-width:400px){
 .host-live-rider{grid-template-columns:minmax(55px,.8fr) minmax(115px,1.4fr);gap:4px}
 .host-live-rider .rider-moderation>button{font-size:10px;padding:7px}
 #hostSetupNav{gap:3px;top:69px}
 #hostSetupNav button{font-size:10px}
}


/* On a 320px joined ride the view switch and Setup must remain full-size actions,
   not 8px labels compressed against the full desktop wordmark. */
@media(max-width:380px){
 .topbar{padding:12px 10px;gap:6px}
 .topbar .brand{flex:0 1 auto;min-width:0;font-size:14px;padding-left:31px;letter-spacing:-.5px}
 .topbar .brand:before,.topbar .brand:after{width:19px;height:11px;top:3px}
 .topbar .brand:after{left:7px;top:10px}
 .topbar .brand span{font-size:5px;letter-spacing:1.2px;margin-top:6px}
 .topbar .top-actions{flex:0 0 auto;gap:4px}
 .topbar .top-actions button{font-size:10px;min-height:44px;padding:7px 8px;max-width:none}
 .topbar #setupToggle{min-width:64px}
 .topbar #observer,.topbar #exploreCapture{min-width:68px;max-width:90px}
}

/* Lost host video uses the existing rider status and one Reconnect media action.
   Keep the reason legible on the actual viewport instead of a blank Observer view. */
#guestRenderStatus.media-trouble{
 top:clamp(116px,29%,300px);left:50%;right:auto;
 transform:translateX(-50%);width:min(460px,calc(100vw - 32px));
 max-width:none;padding:18px 22px;text-align:left;
 background:#132723f2;border:1px solid #9dbdae80;border-left:4px solid #e5d38c;
 border-radius:8px;color:#f0f5ee;box-shadow:0 12px 36px #07181280;
 font:600 clamp(14px,1.5vw,18px)/1.55 system-ui,sans-serif;
 z-index:4;pointer-events:none;
}
body:has(#guestRenderStatus.media-trouble:not([hidden])) #reconnectMedia:not([hidden]){
 min-height:44px;padding:9px 14px;background:#d4e8b4;color:#182e23;
 font-weight:750;border:1px solid #e7f5d0;
}
@media(max-width:520px){
 #guestRenderStatus.media-trouble{
  top:clamp(284px,36dvh,346px);padding:14px 16px;
  font-size:14px;line-height:1.45;
 }
}
@media(max-height:480px) and (min-width:521px){
 #guestRenderStatus.media-trouble{top:100px;left:20px;transform:none;width:min(360px,calc(50vw - 24px));padding:12px 14px;font-size:13px}
}
.host-live-actions #hostStopRequest{width:100%}
/* The stop confirmation leaves the compact HUD in place, keeping its
   two live actions reachable even on a short phone. */
.host-stop-confirm{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;background:#061310d6;backdrop-filter:blur(8px)}
.host-stop-sheet{width:min(420px,100%);display:grid;gap:12px;padding:24px;background:#1a2926;border:1px solid #dbb0a1a6;border-radius:19px;box-shadow:0 28px 90px #000b}
.host-stop-sheet h2{font-size:24px;line-height:1.15;letter-spacing:-.04em;margin:0}
.host-stop-sheet p{font-size:13px;line-height:1.55;color:#d5e3d9;margin:0}
.host-stop-sheet #hostLeave{display:block}
.host-stop-sheet button{min-height:48px;width:100%;font-size:14px}
.host-stop-sheet #stopHosting{background:#904638;border-color:#f2ad9e;color:#fff8f2}
.host-stop-sheet #hostStopCancel{background:#31554c;border-color:#9adccd;color:#ebfff7}
.host-stop-sheet #stopHostingHelp{display:none}
@media(max-width:760px){
 .host-live-actions #hostStopRequest{flex:1;min-width:90px}




}

/* Keep the already subscribed host element rendered until its first frame arrives.
   A hidden video can have zero decoded frames, and therefore never pass the
   readiness condition that would otherwise show it. This is not another tile. */
.stage>#returnVideo.host-video-warming:not([hidden]){
 position:absolute!important;inset:0 auto auto 0!important;
 width:2px!important;height:2px!important;min-width:0!important;min-height:0!important;
 opacity:.001!important;visibility:visible!important;pointer-events:none!important;
 border:0!important;box-shadow:none!important;z-index:1!important;
}

/* Guest ride with host-video inset, sharing the actual room and decoded host track. */
body.guest-host-inset .stage>#returnVideo:not([hidden]){
 position:absolute;inset:170px 22px auto auto;width:min(32vw,400px);height:min(23vw,225px);
 aspect-ratio:16/9;object-fit:contain;object-position:center;z-index:7;
 background:#091c22;border:1px solid #b3e4d6a1;border-radius:14px;
 box-shadow:0 12px 48px #0009,0 0 0 4px #0b202d88;
}
body.guest-host-inset .stage>#hostInsetCaption{
 position:absolute;top:178px;right:30px;z-index:8;pointer-events:none;
 padding:5px 8px;background:#07171dcc;border:1px solid #b6e9d43b;border-radius:5px;
 font-size:10px;letter-spacing:1px;color:#e5f9ed;font-weight:650;
}
@media(max-width:520px){
 body.guest-host-inset:has(#guestPanel:not([hidden])):has(#returnVideo:not([hidden])) .stage>#returnVideo:not(.host-view-unavailable){
  inset:292px 12px auto auto;width:min(56vw,220px);height:auto;aspect-ratio:16/9;object-fit:contain;object-position:center;
 }
 body.guest-host-inset .stage>#returnVideo.host-view-unavailable{
  inset:292px 12px auto auto;width:min(56vw,220px);height:auto;aspect-ratio:16/9;
 }
 body.guest-host-inset .stage>#hostInsetCaption{top:297px;right:18px;font-size:10px;letter-spacing:.5px}
}

/* During an interruption the stream's rectangle remains a legible status surface,
   not a stale video frame or a free-floating label over the world. */
body.guest-host-inset .stage>#returnVideo.host-inset-unavailable{visibility:hidden}
body.guest-host-inset .stage>#hostInsetCaption:is(.media-trouble,.host-inset-waiting){
 top:170px;right:22px;width:min(32vw,400px);height:min(23vw,225px);
 display:flex;align-items:center;justify-content:center;box-sizing:border-box;
 padding:20px;text-align:center;line-height:1.5;white-space:normal;
 font-size:clamp(12px,1.1vw,16px);letter-spacing:.1px;
 color:#eaf9f2;border:1px solid #a3d7c9;border-radius:14px;
 background:linear-gradient(145deg,#103238f7,#0a2028f7);
 box-shadow:0 12px 48px #0009,0 0 0 4px #0b202d88;
}
body.guest-host-inset .stage>#hostInsetCaption.media-trouble{
 color:#fff6db;border-color:#e5d38c;
 background:linear-gradient(145deg,#322d22fa,#132a30f8);
}
@media(max-width:520px){
 body.guest-host-inset .stage>#hostInsetCaption:is(.media-trouble,.host-inset-waiting){
  top:292px;right:12px;width:min(56vw,220px);height:auto;
  aspect-ratio:16/9;max-width:none;padding:12px;
  font-size:clamp(10px,2.8vw,13px);line-height:1.35;
 }
}
/* A fixed reference overview is not the shared ride camera or its pace. */
body:has(.stage.runtime-map-visible) #hostViewControls{display:none!important;}


/* A failed rider scene has one recovery action at the place the picture was lost.
   Its placement stays above the disabled riding controls on narrow phones. */
#retryRiderView{position:absolute;z-index:9;left:50%;top:52%;transform:translate(-50%,-50%);min-width:190px;min-height:48px;padding:12px 18px;border:1px solid #adf0cc;background:#d1f2d4;color:#153426;font-size:14px;font-weight:750;border-radius:12px;box-shadow:0 12px 28px #07181388;cursor:pointer}
#retryRiderView:focus-visible{outline:3px solid white;outline-offset:4px}
@media(max-width:520px){#retryRiderView{top:43%;min-height:50px;max-width:calc(100vw - 48px)}}

/* The host video replaces an unavailable riding scene, not the other way around. */
body.guest-host-main.guest-host-inset .stage>#returnVideo:not([hidden]),
body.guest-host-main.guest-host-inset:has(#guestPanel:not([hidden])):has(#returnVideo:not([hidden])) .stage>#returnVideo:not(.host-view-unavailable){
 inset:0;width:100%;height:100%;aspect-ratio:auto;object-fit:contain;object-position:center;
 background:#091c22;border:0;border-radius:0;box-shadow:none;z-index:7;
}
/* Before the first host frame, the same full-size screen explains the wait.
   A tiny waiting inset is not usable above the compact phone ride controls. */
body.guest-host-main .stage>#hostInsetCaption:is(.media-trouble,.host-inset-waiting){
 inset:0;top:0;left:0;right:0;width:100%;height:100%;z-index:8;
 border:0;border-radius:0;box-shadow:none;
 display:flex;align-items:center;justify-content:center;
 font-size:clamp(17px,2.6vw,28px);font-weight:650;letter-spacing:.6px;
 background:#091c22;color:#eaf9f2;
}
@media(max-width:520px){
 body.guest-host-main .stage>#hostInsetCaption:is(.media-trouble,.host-inset-waiting){
  box-sizing:border-box;padding:clamp(140px,24vh,190px) 16px 12px;
 }
}
body:is(.guest-host-main,.guest-observer-view) #guestRenderStatus:not(.media-trouble){display:none}

/* Watching a host (by choice or while 3D loads) is not riding.
   Keep kit and social actions; return to riding remains visible in Observer view. */
body:is(.guest-host-main,.guest-observer-view) #guestPanel>.speedometer,
body:is(.guest-host-main,.guest-observer-view) #guestPanel>.ride-control,
body:is(.guest-host-main,.guest-observer-view) #guestPanel>#joystick,
body:is(.guest-host-main,.guest-observer-view) #guestPanel>.ride-pedals,
body:is(.guest-host-main,.guest-observer-view) #guestPanel>.ride-control-guidance,
body:is(.guest-host-main,.guest-observer-view) #guestPanel .ride-buttons>:not(#look):not([data-action="wave"]):not([data-action="cheer"]),
body:is(.guest-host-main,.guest-observer-view) .look-around-hint{display:none}
/* Only the missing-world fallback has no ride to return to. */
body.guest-host-main #observer{display:none}
body:is(.guest-host-main,.guest-observer-view) #guestPanel{
 display:flex;left:auto;right:24px;bottom:max(20px,env(safe-area-inset-bottom));
 width:auto;max-width:min(430px,calc(100vw - 32px));padding:0;
 border:0;box-shadow:none;background:none;backdrop-filter:none;
}
body:is(.guest-host-main,.guest-observer-view) #guestPanel .ride-buttons{
 display:flex;width:auto;max-width:none;gap:8px;
 justify-content:flex-end;align-items:center;
}
body:is(.guest-host-main,.guest-observer-view) #guestPanel .ride-buttons button{min-height:44px;padding:9px 14px;font-size:12px}
@media(max-width:520px){
 body:is(.guest-host-main,.guest-observer-view) #guestPanel{left:16px;right:16px;bottom:max(14px,env(safe-area-inset-bottom));max-width:none}
 body:is(.guest-host-main,.guest-observer-view) #guestPanel .ride-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:6px}
 body:is(.guest-host-main,.guest-observer-view) #guestPanel .ride-buttons button{min-height:46px;font-size:12px;padding:10px 5px}
}


/* A host changes the actual shared source in the ride, not in a preparation drawer. */
.host-source{display:grid;gap:7px;margin:10px 0 9px;padding:10px 0;border-top:1px solid #bce9e42b;border-bottom:1px solid #bce9e42b}
.host-source-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.host-source-heading>strong{flex:0 0 auto;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#bfd7d4}
.host-source #sourceState{min-width:0;margin:0;padding:0;border:0;background:none;border-radius:0;font-size:10px;line-height:1.45;color:#b5cac6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.host-source .source-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:6px}
.host-source .source-choices button{min-width:0;min-height:44px;padding:9px 5px;text-align:center;white-space:nowrap;font-size:11px;font-weight:650;line-height:1.25;background:#214044;border:1px solid #6baba93f;border-radius:9px;color:#edf8f5}
.host-source .source-choices button:hover{background:#2d5659;border-color:#83d9ce88}
.host-source .source-choices button:focus-visible{outline:3px solid #a9ece0;outline-offset:2px}
.host-source .source-choices #parkSource{grid-column:1/-1;min-height:42px;letter-spacing:.025em;background:#355d4c;border-color:#90cc95aa;color:#f2ffe6}
.host-source .source-choices #parkSource:hover{background:#477562;border-color:#b8e6ad}
@media(max-width:760px){
 .host-source{margin:7px 0;padding:8px 0;gap:6px}
 .host-source-heading>strong{font-size:9px}
 .host-source .source-choices button{min-height:44px;font-size:11px}
}


/* A landscape phone has to show the camera picture, not a full-screen dashboard. */
@media(max-height:500px) and (min-width:521px){
 body .host-hud{left:12px;right:auto;bottom:max(10px,env(safe-area-inset-bottom));width:min(382px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 66px);margin:0;padding:9px 11px;display:flex;flex-direction:column;align-items:stretch;gap:5px;overflow:hidden}
 body .host-hud .host-summary{display:block;flex:0 0 auto;padding:0;background:none;min-width:0}
 body .host-hud .host-summary #stageHint{display:none}
 body .host-hud .host-summary #stageTitle{font-size:12px;line-height:1.35}
 body .host-hud .host-source{margin:5px 0;padding:5px 0;gap:5px}
 body .host-hud .host-source-heading>strong{font-size:9px}
 body .host-hud .host-source #sourceState{font-size:9px}
 body .host-hud .host-source .source-choices button{min-height:36px;padding:5px 4px;font-size:10px}
 body .host-hud .host-conversation-buttons button{min-height:34px;padding:6px 8px;font-size:10px}
 body .host-hud .host-live-people{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;border:0;border-top:1px solid #bce9e42b;padding:4px 0}
 body .host-hud .host-live-actions{flex:0 0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding-top:5px}
 body .host-hud .host-live-actions #hostVideoPause,body .host-hud .host-live-actions #hostStopRequest{min-width:0;width:100%;min-height:39px;padding:7px 8px}
 body .host-hud #hostVideoPauseStatus{grid-column:1/-1;font-size:9px;line-height:1.2;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* The actual host stream remains the guest's stage while a new 3D place loads.
   Place recovery belongs beside the picture instead of covering it. */
body.guest-host-main .mapped-world-status{display:none}
body.guest-host-main #watchHost{display:none}
body.guest-host-main #routeWaiting:not([hidden]){
 top:auto;bottom:max(112px,env(safe-area-inset-bottom));left:20px;
 transform:none;width:min(390px,calc(100vw - 40px));
 padding:14px 16px;border-radius:14px;text-align:left;
}
body.guest-host-main #routeWaiting h2{font-size:17px;letter-spacing:-.3px;margin:0 0 4px}
body.guest-host-main #routeWaiting>p:not(.eyebrow){font-size:11px;line-height:1.45;margin:0 0 8px}
body.guest-host-main #routeWaiting .eyebrow{margin:0 0 5px}
@media(max-width:520px){
 body.guest-host-main #routeWaiting:not([hidden]){
  left:12px;bottom:max(120px,env(safe-area-inset-bottom));
  width:calc(100vw - 24px);padding:12px 14px;
 }
}

/* The offline guest is no longer waiting for a new place. Restore a real exit
   on top of the host-video canvas without showing two competing actions. */
body.guest-host-main #routeWaiting.host-offline:not([hidden]){
 z-index:12;
 bottom:max(114px,env(safe-area-inset-bottom));
 padding:17px 19px;
 border:1px solid #9fd6c66b;
 background:#192f34f2;
 box-shadow:0 12px 32px #0718138a;
}
body.guest-host-main #routeWaiting.host-offline>p:not(.eyebrow){
 display:block;
 color:#d9e8e3;
 font-size:12px;
 line-height:1.55;
 margin:8px 0 13px;
}
body.guest-host-main #routeWaiting.host-offline #watchHost,
body.guest-host-main #routeWaiting.watcher-return #watchHost{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 min-height:44px;
 padding:10px 18px;
 background:#d5eee5;
 border:1px solid #b8e3d2;
 border-radius:8px;
 color:#173534;
 font-size:13px;
 font-weight:700;
}
body.guest-host-main #routeWaiting.host-offline #watchHost:focus-visible{
 outline:3px solid white;
 outline-offset:3px;
}
@media(max-width:520px){
 body.guest-host-main #routeWaiting.host-offline:not([hidden]){
  left:12px;
  width:calc(100vw - 24px);
  bottom:max(122px,env(safe-area-inset-bottom));
  padding:15px 16px;
 }
}
@media(max-height:500px) and (min-width:521px){
 body.guest-host-main #routeWaiting.host-offline:not([hidden]){
  top:70px;
  bottom:auto;
  left:50%;
  transform:translateX(-50%);
  width:min(410px,calc(100vw - 56px));
  padding:14px 16px;
 }
}

/* Invite from the live heading, not a hidden preparation drawer. */
#hostHud .host-summary #copyRiderInvitation{flex:0 0 auto;min-height:44px;min-width:90px;padding:7px 10px;font-size:11px;line-height:1.15;font-weight:700;white-space:nowrap;background:#244946;border:1px solid #86d9c999;border-radius:9px;color:#eefcf8}
#hostHud .host-summary #copyRiderInvitation:hover:not(:disabled){background:#356660;border-color:#a9ead9}
#hostHud .host-summary #copyRiderInvitation:focus-visible{outline:3px solid #a9ece0;outline-offset:2px}
#hostHud .host-summary #copyRiderInvitation:disabled{opacity:.5}
@media(max-height:500px) and (min-width:521px){body #hostHud .host-summary #copyRiderInvitation{min-height:34px;padding:5px 8px;font-size:10px}}
.host-invite-status{margin:4px 0 7px;font-size:11px;line-height:1.35;color:#c5e7df;overflow-wrap:break-word}
.host-invite-status:empty{display:none}

/* The invitation is available immediately from the live host title.
   Keep the original single action and its handler; do not add a second share link. */
@media(max-width:760px){
 body #hostHud .host-summary{position:relative}
 body #hostHud .host-summary>#stageTitle{display:block;max-width:100%;min-height:44px;box-sizing:border-box;padding-left:118px}
 body #hostHud .host-summary>#copyRiderInvitation{position:absolute;left:0;right:auto;top:0;min-width:105px;min-height:44px;z-index:1}
}
@media(min-width:1100px) and (min-height:600px){
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-summary>#copyRiderInvitation{
  grid-column:1;grid-row:3;justify-self:start;
 }
}
#hostHud.needs-source .host-summary>.live-dot{display:none}


/* The first live-source decision belongs in the picture, not a repeated bottom menu. */
@media (min-width:900px) and (min-height:680px){
 #hostHud.needs-source{max-width:720px;grid-template-columns:minmax(0,1fr) auto;gap:14px}
 #hostHud.needs-source .host-summary{
  position:fixed;z-index:5;top:46%;left:50%;transform:translate(-50%,-50%);
  width:min(570px,calc(100vw - 48px));max-width:none;box-sizing:border-box;
  padding:26px 30px 24px;background:linear-gradient(150deg,#17302cf2,#0e2226f5);
  border:1px solid #a4e3d355;border-radius:22px;
  box-shadow:0 24px 90px #04120ec9,0 0 0 1px #030f1014;backdrop-filter:blur(14px)
 }
 #hostHud.needs-source .host-summary>strong{display:block;font-size:clamp(25px,2.6vw,34px);line-height:1.16;letter-spacing:-.025em;color:#f6faec}
 #hostHud.needs-source .host-summary #stageHint{display:block;font-size:13px;line-height:1.55;color:#bfd7ce;max-width:43ch;margin:9px 0 0}
 #hostHud.needs-source .host-source{margin:21px 0 13px;padding:15px 0 16px;gap:12px;border-color:#bce9e43f}
 #hostHud.needs-source .host-source-heading>strong{font-size:11px}
 #hostHud.needs-source .host-source #sourceState{font-size:11px}
 #hostHud.needs-source .source-choices{gap:10px}
 #hostHud.needs-source .source-choices button{min-height:62px;font-size:14px;padding:15px 10px;border-radius:12px;background:#294d48;border-color:#a4dcc46f}
 #hostHud.needs-source .source-choices button:hover{background:#3c675c;border-color:#d1f3d0}
 #hostHud.needs-source #hostConversation{margin-top:10px}
 #hostHud.needs-source .host-live-people{grid-column:1;min-width:0}
 #hostHud.needs-source .host-live-actions{grid-column:2}
}

/* An active host has one compact source switch, not three permanent picker buttons. */
#hostSourceSelector>summary{cursor:pointer;list-style:none;user-select:none}
#hostSourceSelector>summary::-webkit-details-marker{display:none}
#hostSourceSelector>summary:after{content:'⌄';color:#b0dacf;font-size:15px;margin-left:6px;flex:none}
#hostSourceSelector[open]>summary:after{content:'⌃'}
#hostSourceSelector:not([open])>.source-choices{display:none}
#hostSourceSelector[open]>.source-choices{margin-top:9px}
#hostSourceSelector:not([open]){padding-block:7px;margin-block:5px;border-bottom:0}
#hostSourceSelector>summary:focus-visible{outline:3px solid #a9ece0;outline-offset:3px;border-radius:4px}

/* The source decision is already visible in Setup. Keep microphone controls
   in the side dock rather than centering a redundant prompt behind the drawer. */
@media(min-width:900px) and (min-height:680px){
 body:has(#setup:not([hidden])) #hostHud.needs-source{grid-template-columns:minmax(0,1fr);max-width:none}
 body:has(#setup:not([hidden])) #hostHud.needs-source .host-summary{position:static;transform:none;inset:auto;box-sizing:border-box;width:auto;max-width:100%;min-width:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none}
 body:has(#setup:not([hidden])) #hostHud.needs-source .host-summary>strong{display:none}
 body:has(#setup:not([hidden])) #hostHud.needs-source .host-live-people,
 body:has(#setup:not([hidden])) #hostHud.needs-source .host-live-actions{grid-column:auto}
}

/* Preparation is a side panel, not half a desktop-wide empty host control bar.
   The original voice, invitation and end-ride actions remain in a compact dock. */
@media(min-width:900px) and (min-height:680px){
 body:has(#setup:not([hidden])) #hostHud.needs-source{
  left:clamp(12px,2vw,28px);right:auto;
  width:min(480px,calc(100vw - clamp(460px,42vw,780px) - 76px));
  max-width:none;box-sizing:border-box;margin:0;
 }
}
/* A disabled video or recording button is not a useful choice before source admission. */
#hostHud.needs-source #hostVideoPause:disabled,
#hostHud.needs-source #record:disabled,
#hostHud.needs-source .host-live-recording:has(#record:disabled) #recordingLiveStatus{display:none}

/* Let the live picture breathe; show host instructions only when there is news. */
#hostHud #stageHint:empty{display:none}
#hostHud:not(.needs-source) #hostSourceSelector:not([open]){margin-block:3px;padding-block:4px}
#hostHud:not(.needs-source) #hostConversation{margin-top:5px}
@media(min-width:900px){
 #hostHud:not(.needs-source) #hostConversation button{min-height:36px;padding:7px 10px}
}

/* Once sharing, the host needs one glanceable rail rather than a bottom drawer. */
@media(min-width:1100px) and (min-height:600px){
 body #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])){
  grid-template-columns:minmax(390px,1.4fr) minmax(270px,1fr) minmax(220px,.9fr);
  align-items:center;gap:14px;padding:11px 15px;
 }
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-summary{
  display:grid;grid-template-columns:minmax(155px,.95fr) minmax(200px,1.3fr);
  grid-template-rows:auto auto;align-items:center;column-gap:10px;row-gap:3px;
  min-width:0;padding:0;
 }
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-summary>.live-dot{display:none}
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-summary>#stageTitle{grid-column:1;grid-row:1;font-size:12px;line-height:1.3}
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-summary>#stageHint:not(:empty),
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-summary>#linkAlert:not([hidden]),
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-summary>#batteryAlert:not([hidden]),
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-summary>#liveGPSQuick:not([hidden]){grid-column:1/-1}
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-source{
  grid-column:1;grid-row:2;margin:3px 0;padding:4px 0;border:0;
 }
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) #hostConversation{
  grid-column:2;grid-row:1/span 2;margin-top:0;
 }
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-live-people{
  max-height:min(150px,25dvh);
 }
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-live-actions{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;min-width:0;
 }
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-live-actions button{
  min-width:0;min-height:43px;white-space:nowrap;padding:8px 10px;
 }
 #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) #hostVideoPauseStatus{
  grid-column:1/-1;max-width:100%;
 }
}

/* Live hosts see the picture first; media and connection warnings still expand naturally. */
#hostHud #stageTitle:empty{display:none}
#hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-live-actions:has(#hostVideoPause:enabled[aria-pressed=false]) #hostVideoPauseStatus{display:none}
@media(max-width:760px){
 body #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])){gap:5px;padding:9px 11px}
 body #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-source{margin:2px 0;padding:3px 0;border-top:0}
 body #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) #hostConversation{margin-top:3px}
 body #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-live-people{padding-block:5px}
 body #hostHud:not(.needs-source):has(#hostSourceSelector:not([open])) .host-live-actions{padding-top:5px}
}

/* The file may take time to hash and open, but the existing camera stays live. */
#hostSourceSelector .source-progress{margin:8px 0 2px;font-size:12px;line-height:1.45;color:#bfe5da}
/* Keep source errors beside the recovery actions after transient toasts fade. */
#hostSourceSelector .source-failure{margin:7px 0 1px;font-size:12px;line-height:1.5;color:#ffd5bb}
#hostHud.needs-source #hostSourceSelector .source-failure{font-size:13px;margin:11px 0 0}

/* Source selection is the first host action. Speed safety remains armed if
   already enabled and returns as a visible control once video is admitted. */
#hostHud.needs-source #hostMotionToggle,
#hostHud.needs-source #hostMotionPanel,
#hostHud:has(#sourceFailure:not([hidden])) #hostMotionToggle,
#hostHud:has(#sourceFailure:not([hidden])) #hostMotionPanel{display:none}
#hostHud.needs-source #hostVideoPauseStatus{display:none}

/* The host chooses among the actual recorded places, not sample map cities. */
#setup .host-captured-places{margin:0 0 20px}
#setup .host-captured-places h4{font-size:13px;letter-spacing:.01em;margin:0 0 10px;color:#c4ebe4}
#setup .host-place-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
#setup .host-place-card{display:flex;flex-direction:column;position:relative;overflow:hidden;min-width:0;text-decoration:none;color:#f0faf7;background:#18332f;border:1px solid #79bba957;border-radius:12px;transition:border-color .15s,transform .15s}
#setup .host-place-card:hover,#setup .host-place-card:focus-visible{border-color:#98f5d9;transform:translateY(-2px);outline-offset:3px}
#setup .host-place-card img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#172827}
#setup .host-place-card strong{font-size:15px;line-height:1.2;letter-spacing:-.02em;margin:10px 12px 2px}
#setup .host-place-card span{font-size:11px;color:#b4d8ce;margin:0 12px 12px}
#setup .host-place-card .host-place-source{margin-bottom:2px;color:#c9e8df}
#setup .host-place-card .host-place-archive{margin-bottom:6px;color:#a9c7bf;font-variant-numeric:tabular-nums}
#setup .host-place-card .host-place-action{margin-top:auto;color:#9fe8d7;font-weight:600}

#setup .host-place-status{color:#a9c9c0;font-size:11px;line-height:1.5;margin:9px 0 0}
@media(max-width:420px){#setup .host-place-gallery{gap:8px}#setup .host-place-card strong{font-size:13px;margin:8px 9px 2px}#setup .host-place-card span{font-size:10px;margin:0 9px 9px}}

/* The captured world is traversable at phone and desktop sizes. The direction
   pad and zoom are part of the existing view, never a separate scene mode. */
#guestCaptureControls{left:22px;right:22px;bottom:22px;display:flex;justify-content:space-between;align-items:flex-end;border:0;padding:0;background:transparent;pointer-events:none}
#guestCaptureControls>*{pointer-events:auto}
#guestCaptureTravel{display:grid;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:3px;border:1px solid #50666a;border-radius:12px;padding:5px;background:#0b171ee8}
#guestCaptureTravel button{font-size:23px;line-height:1;touch-action:none}
#guestCaptureTravel [data-capture-move="forward"]{grid-column:2;grid-row:1}
#guestCaptureTravel [data-capture-move="left"]{grid-column:1;grid-row:2}
#guestCaptureTravel [data-capture-move="back"]{grid-column:2;grid-row:2}
#guestCaptureTravel [data-capture-move="right"]{grid-column:3;grid-row:2}
#guestCaptureZoomButtons{display:flex;gap:4px;padding:4px;border:1px solid #50666a;border-radius:10px;background:#0b171ee8}
#guestCaptureRejoinHost{position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);pointer-events:auto;min-width:150px!important;min-height:40px!important;padding:6px 12px!important;border:1px solid #50666a;border-radius:999px;background:#10272cea;color:#eef5f2;font-size:13px!important;line-height:1.2!important;white-space:nowrap}
#guestCaptureRejoinHost:disabled{opacity:.75}

@media(max-width:600px){#guestCaptureControls{left:12px;right:12px;bottom:12px}#guestCaptureTravel{grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,48px)}}

/* Landscape host video and ride conversation share one portrait-phone screen.
   Portrait camera feeds keep their full-height framing and original controls. */
@media (max-width:520px) and (min-height:568px) and (orientation:portrait) {
  body.guest-host-main:has(.ride-chat.landscape-watch-chat:not(.compact-compose)) {
    --watch-video-top: max(calc(224px + env(safe-area-inset-top)), var(--watch-video-audio-bottom, 0px));
    --watch-video-height: min(56.25vw, calc(100dvh - 510px));
  }
  body.guest-host-main.guest-host-inset:has(#guestPanel:not([hidden])):has(#returnVideo:not([hidden])):has(.ride-chat.landscape-watch-chat:not(.compact-compose)) .stage>#returnVideo:not(.host-view-unavailable) {
    inset:var(--watch-video-top) 0 auto 0;
    width:100%;
    height:var(--watch-video-height);
    aspect-ratio:16/9;
    object-fit:contain;
    object-position:center;
    border:0;
    border-radius:0;
    box-shadow:none;
  }
}

/* Source setup: a dormant source is not a second option, and phone inputs fit narrow screens. */
.source-credit[hidden]{display:none}
#microphoneInput{display:flex;flex-direction:column;align-items:stretch;gap:10px;min-width:0}
#microphoneInput>label{display:block}
#microphoneInput>select{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box}
#microphoneInput>.row{display:flex;gap:8px;flex-wrap:wrap}
#microphoneInput>.small{margin:0 0 15px}

/* On compact phones keep the host picture and a message-sized chat together. */
@media (max-width:520px) and (min-height:568px) and (max-height:739px) and (orientation:portrait) {
  body.guest-host-main:has(.ride-chat.landscape-watch-chat:not(.compact-compose)) {
    --watch-video-height:min(56.25vw,max(80px,calc(100dvh - var(--watch-video-top) - 205px)));
  }
}

/* The live video-source controls are also the setup Source controls. */
#setup #hostSourceSelector{margin:0 0 18px;padding:14px;background:#203439;border:1px solid #649b975c;border-radius:12px}
#setup #hostSourceSelector>summary{cursor:default}
#setup #hostSourceSelector>summary:after{display:none}
#setup #hostSourceSelector>.source-choices{margin-top:12px}
#setup #hostSourceSelector .source-choices button{font-size:13px;min-height:48px}
@media(max-width:520px){#setup #hostSourceSelector{padding:12px}#setup #hostSourceSelector .source-choices button{font-size:12px}}

/* On phones, an expanded source picker is a recovery workflow. Give its
   invitation and ride actions actual touch space instead of shrinking the
   riders row behind the fixed bottom actions. Keep the picture above it and
   permit scrolling on unusually short screens. Compact the dock again once
   the selector closes. */
@media (max-width:760px){
 body #hostHud:has(#hostSourceSelector[open]){
  max-height:min(560px,calc(100dvh - 108px));
  overflow-y:auto;
  overscroll-behavior:contain;
 }
 body #hostHud:has(#hostSourceSelector[open]) .host-live-people{
  flex:0 0 auto;
  min-height:50px;
 }
 /* Emergency source recovery keeps End ride visible before the optional
    roster/speech setup, rather than below the dock's scroll boundary. */
 body #hostHud:has(#hostSourceSelector[open]) .host-live-actions{grid-row:2}
 body #hostHud:has(#hostSourceSelector[open]) .host-live-people{grid-row:3}
 /* A disabled recording action must not send emergency End ride below the
    phone viewport while camera capture is being recovered. */
 body #hostHud:has(#sourceFailure:not([hidden])) .host-live-recording:has(#record:disabled){display:none}
}

/* On a short phone, the room invitation is a primary host action, not a
   control that can start entirely below the scrollable ride dock. Keep the
   existing single invitation button before source selection; active rides
   return to the normal rider-list order and its moderation controls. */
@media (max-width:360px) and (max-height:650px) {
 body #hostHud.needs-source .host-live-people {
  order:-1;
  flex:0 0 auto;
  max-height:min(150px,26dvh);
  min-height:0;
  overflow-y:auto;
  border-top:0;
  border-bottom:1px solid #bce9e42b;
  padding:3px 0 7px;
 }
 body #hostHud.needs-source .host-live-people:has(#liveRiders:empty) #liveRiderCount {
  display:none;
 }
 body #hostHud.needs-source .host-live-people-heading {
  justify-content:flex-start;
  flex-wrap:nowrap;
  gap:12px;
 }
 /* Rider moderation and speech setup remain in the normal connected ride.
    They obscure the first invitation and clash with the floating Chat action
    before there is a rider to manage. */
 body #hostHud.needs-source .host-live-people-heading #riderKeysToggle,
 body #hostHud.needs-source .host-live-people-heading #hostSpeechToggle,
 body #hostHud.needs-source .host-speech-status {display:none}
}

/* Keep the one authoritative keyboard target beside the live rider list, not
   hidden in the broadcast-preparation drawer after a host starts a ride. */
#hostHud .host-live-people-heading #riderKeysToggle{flex:0 0 auto;min-height:38px;padding:8px 9px;font-size:11px;background:#2b5350;border-color:#81c4b8}
#hostHud .host-rider-keys{margin:8px 0;max-height:min(300px,39dvh);overflow:auto;border-radius:10px;grid-template-columns:1fr}
#hostHud .host-rider-keys .rider-key-actions{justify-content:flex-start}
#hostHud .host-rider-keys button{font-size:11px;min-height:40px}
@media(max-width:520px){
 #hostHud .host-live-people-heading{gap:5px}
 #hostHud .host-live-people-heading #riderKeysToggle{min-height:42px}
 #hostHud .host-rider-keys{max-height:min(270px,35dvh);padding:9px}
 #hostHud .host-rider-keys .rider-key-actions button{flex:1 1 30%}
}
/* The open source picker is a tall emergency-recovery workflow on phones.
   While rider keys are explicitly armed, put moderation and End ride on the
   same visible screen. The source choices return when keys are turned off. */
@media(max-width:760px){
 body #hostHud:has(#hostRiderKeys:not([hidden])):has(#hostSourceSelector[open]){overflow:hidden;max-height:min(560px,calc(100dvh - 108px))}
 body #hostHud:has(#hostRiderKeys:not([hidden])) .host-summary>strong{display:none}
 body #hostHud:has(#hostRiderKeys:not([hidden])) #hostSourceSelector .source-choices{display:none}
 body #hostHud:has(#hostRiderKeys:not([hidden])) .host-live-people{flex:1 1 auto;min-height:0;overflow-y:auto}
}

/* A real tap target: double-click is not discoverable on phone touchscreens. */
.look-around-hint{align-items:center;gap:8px;opacity:1;pointer-events:none}
.look-around-hint span{opacity:.7;max-width:130px}
.look-around-hint button{pointer-events:auto;touch-action:manipulation;min-height:36px;padding:6px 10px;border:1px solid #b7e8d64d;border-radius:7px;background:#1b3d35e8;color:#e6ffef;font-size:11px;white-space:nowrap;cursor:pointer}
.look-around-hint button:focus-visible{outline:2px solid #b9f2df;outline-offset:2px}
@media(max-width:520px){.look-around-hint{max-width:235px}.look-around-hint span{max-width:100px;font-size:9px}.look-around-hint button{min-height:44px;font-size:10px;padding:6px 8px}}

/* The compact chrome hides instructional hints; the reachable guest world
   still needs its explicit camera-reset touch control. */
body:not(.guest-host-main):has(#guestPanel:not([hidden])):has(#guestWorkerCanvas:not([hidden])) .look-around-hint,
body:not(.guest-host-main):has(#guestPanel:not([hidden])):has(#povCanvas:not([hidden])) .look-around-hint{display:flex!important}
@media(max-width:520px){.look-around-hint span{display:none}}

/* Physical host motion protection: visible in the normal broadcast, not an extra mode. */
.host-motion-badge{padding:7px 10px;border:1px solid #6a927a;background:#12392f;color:#defbe8;font-weight:750;font-size:12px;letter-spacing:.035em}
.host-motion-badge[data-locked="true"]{border-color:#d89e52;background:#51351b;color:#ffe2b4}
#hostMotionToggle{min-height:42px;border:1px solid #83b8a5;font-weight:650}
.host-motion-panel{grid-column:1/-1;margin:3px 0 10px;color:var(--muted);font-size:12px;line-height:1.5}
@media(max-width:680px){#hostMotionToggle{flex:1 1 140px}.host-motion-badge{font-size:11px}}

.host-motion-locked #riders,.host-motion-locked #hostRiderKeys,.host-motion-locked #worldPanel,.host-motion-locked #hostPanel,.host-motion-locked #hostViewControls{opacity:.42}

.host-summary #hostMotionToggle{display:block;margin:7px 0 2px 0;min-height:40px;padding:8px 12px;background:#1b4038;color:#e2fff0;border:1px solid #74b3a0;border-radius:8px;font-size:11px}
.host-summary #hostMotionToggle[hidden]{display:none}
.host-summary .host-motion-panel{margin:4px 0 4px 0;font-size:11px;max-width:350px}
.host-summary .host-motion-badge{display:block;margin:5px 0 0 0;max-width:350px}
.host-summary .host-motion-badge[hidden],.host-summary .host-motion-panel[hidden]{display:none}
@media(max-width:760px){.host-summary #hostMotionToggle{min-height:44px;font-size:11px;width:100%;max-width:300px}}

.host-motion-locked #liveRiders button,
.host-motion-locked #copyRiderInvitation,
.host-motion-locked #hostConversation,
.host-motion-locked #hostSourceSelector,
.host-motion-locked #hostVideoPause,
.host-motion-locked #record,
.host-motion-locked #recordingQuickDownload{opacity:.45}
.host-motion-locked #hostMotionBadge{opacity:1}

/* At physical riding speed the host dock becomes a glanceable status + voice
   surface. Source selection, text/audio fiddling and touch moderation can wait
   for a measured stop. End ride stays reachable in an emergency. */
body.host-motion-locked #hostHud #hostSourceSelector,
body.host-motion-locked #hostHud #hostConversation,
body.host-motion-locked #hostHud #copyRiderInvitation,
body.host-motion-locked #hostHud #liveRiders .rider-moderation,
body.host-motion-locked #hostHud #hostVideoPause,
body.host-motion-locked #hostHud .host-live-recording,
body.host-motion-locked #hostHud #hostVideoPauseStatus{display:none!important}
body.host-motion-locked #hostHud .host-live-actions{grid-template-columns:minmax(0,1fr)}
body.host-motion-locked #hostHud #hostStopRequest{grid-column:1/-1}
body.host-motion-locked #hostHud .host-summary #stageHint{display:none}
@media(max-width:760px){
 body.host-motion-locked #hostHud,
 body.host-motion-locked #hostHud:has(#hostSourceSelector[open]){
  max-height:min(61dvh,470px);height:auto;overflow-y:auto;
 }
 body.host-motion-locked #hostHud .host-live-people{flex:0 0 auto;min-height:0;max-height:130px}
 body.host-motion-locked #hostHud .host-live-actions{padding-top:5px}
}

body.host-motion-locked #rideChatToggle{opacity:.35;pointer-events:none}

/* Keep the actual road centered during phone rotation, until the resized scene arrives. */
.stage>#guestWorkerCanvas.viewport-retained{object-fit:cover}
/* The depth controls are only present during an admitted swim; never cover pedals on a phone. */
.swim-controls{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.swim-controls[hidden]{display:none!important}
.swim-controls button{min-height:44px;min-width:85px;touch-action:none}
.swim-controls small{margin-left:.35rem;opacity:.72}

/* A joined phone guest's live host view is the fallback ride, not a 16:9 band
   floating inside a tall empty canvas. Fill without stretching and let the
   guest reveal the complete source frame with one reachable action. The
   dedicated watch-and-chat layout deliberately keeps its video uncropped. */
@media(max-width:520px) and (orientation:portrait){
 body.guest-host-main.guest-host-inset:has(#guestPanel:not([hidden])):has(#returnVideo:not([hidden])):not(:has(.ride-chat.landscape-watch-chat)) .stage>#returnVideo[data-framing="fill"]:not(.host-view-unavailable):not(.host-video-warming){
  object-fit:cover;object-position:center center;
 }
 body.guest-host-main #hostViewFraming:not([hidden]){
  display:block;position:fixed;z-index:11;left:16px;right:auto;top:auto;bottom:calc(80px + env(safe-area-inset-bottom));
  min-height:44px;min-width:112px;padding:10px 14px;
  border:1px solid #a7ded0bd;border-radius:999px;
  background:#10242be9;color:#eafff8;font-family:inherit;font-size:12px;font-weight:650;line-height:1.2;
  box-shadow:0 8px 24px #081d2488;touch-action:manipulation;cursor:pointer;
 }
 body.guest-host-main #hostViewFraming:focus-visible{outline:3px solid #fff;outline-offset:3px}
}

/* --- Front-door HUD zero-overlap & WCAG AA high-contrast tokens --- */
.setup { z-index: 32; }
.outfit-panel { z-index: 31; }

body:not(:has(#lobby:not([hidden]))):not(.page-viewer) .ride-top {
  top: calc(78px + env(safe-area-inset-top, 0px));
  left: calc(24px + env(safe-area-inset-left, 0px));
  right: auto;
  max-width: calc(100vw - 388px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  z-index: 9;
}
.ride-top > span:not([hidden]),
.ride-top > button:not([hidden]) {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(14, 22, 28, 0.86);
  color: #f1f5f9;
  border: 1px solid rgba(186, 230, 220, 0.38);
  border-radius: 8px;
  padding: 5px 9px;
  font-weight: 600;
  text-shadow: none;
}
#riderCount {
  color: #d1fae5;
}
#sourceBadge.alignment-held {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  color: #fff3d0;
  background: rgba(80, 54, 0, 0.94);
  border: 1px solid #eab308;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
#sourceBadge.coverage-held {
  font-size: 12px !important;
  color: #ffffff !important;
  background: rgba(71, 59, 34, 0.94);
  white-space: normal;
}
.top-actions button {
  background: rgba(14, 22, 28, 0.88);
  color: #f8fafc;
  border: 1px solid rgba(186, 230, 220, 0.42);
}
.top-actions button:hover:not(:disabled) {
  background: rgba(28, 48, 54, 0.94);
  border-color: rgba(145, 222, 208, 0.72);
}
#connection.status {
  opacity: 1;
  color: #f1f5f9;
  background: rgba(14, 22, 28, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  padding: 5px 10px;
  margin-right: 2px;
  max-width: 152px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ride-hud {
  background: rgba(16, 24, 28, 0.90);
  border-color: rgba(186, 230, 220, 0.30);
}
.pedal:not(:disabled) {
  background: #8ee3d4;
  color: #0b261c;
  border: 1px solid rgba(15, 41, 30, 0.36);
  font-weight: 700;
}
.pedal:not(:disabled) small {
  color: #0f2e22;
  opacity: 1;
}
.ride-brake:not(:disabled) {
  background: rgba(56, 35, 27, 0.92);
  color: #ffe4d1;
  border: 1px solid rgba(251, 191, 147, 0.56);
  font-weight: 650;
}
.ride-brake:not(:disabled) small {
  color: #fed7aa;
  opacity: 1;
}
.ride-buttons button:not(:disabled),
.host-conversation-buttons button:not(:disabled) {
  background: rgba(14, 22, 28, 0.88);
  color: #f1f5f9;
  border: 1px solid rgba(186, 230, 220, 0.42);
}
.ride-control select:not(:disabled),
.ride-formation select:not(:disabled) {
  background: rgba(15, 28, 28, 0.92);
  color: #ecfdf5;
  border: 1px solid rgba(167, 243, 208, 0.46);
}
#joystick:not([aria-disabled="true"]) {
  opacity: 1;
  background: rgba(14, 22, 30, 0.86);
  border: 1px solid rgba(186, 230, 220, 0.52);
}
#joystick .steer-label {
  color: #e2e8f0;
  background: rgba(14, 18, 26, 0.88);
  border-radius: 999px;
  padding: 1px 6px;
  width: max-content;
  max-width: 110%;
  left: 50%;
  transform: translateX(-50%);
}

button:disabled,
select:disabled,
.pedal:disabled,
.ride-brake:disabled,
.ride-buttons button:disabled,
.top-actions button:disabled,
.vehicle-strip button:disabled,
.host-conversation-buttons button[data-host-hold-talk]:disabled,
.host-conversation-buttons button[data-guest-hold-talk]:disabled,
.host-conversation-buttons button:disabled,
#rideChatSend:disabled,
#maskEditApply:disabled {
  opacity: 1 !important;
  background: rgba(14, 18, 26, 0.84) !important;
  color: #cbd5e1 !important;
  border: 1px dashed rgba(148, 163, 184, 0.56) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: not-allowed;
}
button:disabled small,
.pedal:disabled small,
.ride-brake:disabled small {
  color: #cbd5e1 !important;
  opacity: 1 !important;
}
#joystick[aria-disabled="true"] {
  opacity: 1 !important;
  background: rgba(14, 18, 26, 0.84) !important;
  border: 1px dashed rgba(148, 163, 184, 0.56) !important;
  box-shadow: none !important;
}
#joystick[aria-disabled="true"] #stick {
  background: rgba(148, 163, 184, 0.24);
  border: 1px dashed rgba(203, 213, 225, 0.62);
  box-shadow: none;
}
#joystick[aria-disabled="true"] .steer-label {
  color: #cbd5e1 !important;
  background: rgba(14, 18, 26, 0.88) !important;
  opacity: 1 !important;
}

body.guest-host-main .stage {
  background: #091c22;
}
body.guest-host-main .stage > #hostInsetCaption:is(.media-trouble, .host-inset-waiting):not([hidden]) {
  inset: auto;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100vw - 32px));
  height: auto;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid rgba(163, 215, 201, 0.45);
  border-radius: 14px;
  background: rgba(14, 24, 30, 0.92);
  color: #f1f5f9;
  font-size: clamp(13px, 1.6vw, 17px);
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}
body.guest-host-main:has(#routeWaiting:not([hidden])) .stage > #hostInsetCaption:is(.media-trouble, .host-inset-waiting):not([hidden]) {
  top: max(calc(222px + env(safe-area-inset-top, 0px)), calc(var(--ride-status-bottom, 212px) + 10px));
  transform: translateX(-50%);
}
@media (min-width: 761px) and (min-height: 501px) {
  #guestConversation:not([hidden]) {
    max-width: min(420px, 100%);
  }
  body.guest-host-main #routeWaiting:not([hidden]):not(.host-offline),
  body.guest-host-main:has(.guest-conversation:not([hidden])) #routeWaiting:not([hidden]):not(.host-offline),
  body.guest-host-main:has(#hostInsetCaption:not([hidden])) #routeWaiting:not([hidden]):not(.host-offline) {
    inset: auto;
    top: max(calc(380px + env(safe-area-inset-top, 0px)), calc(var(--ride-status-bottom, 260px) + 24px));
    bottom: auto;
    left: 24px;
    right: auto;
    transform: none;
    width: min(390px, calc(100vw - 48px));
  }
}
@media (max-width: 760px) {
  body:not(:has(#lobby:not([hidden]))):not(.page-viewer) .ride-top {
    top: calc(68px + env(safe-area-inset-top, 0px));
    left: calc(12px + env(safe-area-inset-left, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    max-width: none;
    gap: 6px;
  }
}
@media (max-width: 520px) {
  body.guest-host-inset:not(.guest-host-main):has(#guestPanel:not([hidden])):has(#returnVideo:not([hidden])) .stage > #returnVideo:not(.host-view-unavailable),
  body.guest-host-inset:not(.guest-host-main) .stage > #returnVideo.host-view-unavailable {
    inset: max(calc(232px + env(safe-area-inset-top, 0px)), calc(var(--ride-status-bottom, 226px) + 6px)) calc(12px + env(safe-area-inset-right, 0px)) auto auto;
    width: min(38vw, 136px);
    height: auto;
    aspect-ratio: 16 / 9;
  }
  body.guest-host-inset:not(.guest-host-main) .stage > #hostInsetCaption:not([hidden]) {
    top: max(calc(236px + env(safe-area-inset-top, 0px)), calc(var(--ride-status-bottom, 226px) + 10px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }
  body.guest-host-inset:not(.guest-host-main) .stage > #hostInsetCaption:is(.media-trouble, .host-inset-waiting):not([hidden]) {
    top: max(calc(230px + env(safe-area-inset-top, 0px)), calc(var(--ride-status-bottom, 226px) + 4px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    width: min(46vw, 168px);
    height: auto;
    aspect-ratio: auto;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 10.5px;
    line-height: 1.2;
  }
  body.guest-host-main .stage > #hostInsetCaption:is(.media-trouble, .host-inset-waiting):not([hidden]) {
    inset: auto;
    top: max(calc(264px + env(safe-area-inset-top, 0px)), calc(var(--ride-status-bottom, 256px) + 8px));
    left: 12px;
    right: 12px;
    width: auto;
    min-height: 40px;
    height: auto;
    transform: none;
    padding: 8px 12px;
    font-size: 12px;
  }
  body.guest-host-main #routeWaiting:not([hidden]):not(.host-offline) {
    inset: auto;
    top: max(calc(314px + env(safe-area-inset-top, 0px)), calc(var(--ride-status-bottom, 256px) + 58px));
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 126px;
    overflow-y: auto;
    padding: 8px 12px;
    transform: none;
  }
}
@media (min-width: 521px) and (max-width: 1100px) and (max-height: 500px) {
  body:not(:has(#lobby:not([hidden]))):not(.page-viewer) .ride-top {
    top: calc(58px + env(safe-area-inset-top, 0px));
    left: calc(14px + env(safe-area-inset-left, 0px));
    right: auto;
    max-width: calc(100vw - 116px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  }
  body:has(#rideChatPanel:not([hidden])):not(:has(#lobby:not([hidden]))):not(.page-viewer) .ride-top {
    max-width: calc(100vw - 374px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  }
  body.guest-host-main .stage > #hostInsetCaption:is(.media-trouble, .host-inset-waiting):not([hidden]) {
    inset: auto;
    top: calc(160px + env(safe-area-inset-top, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    left: auto;
    transform: none;
    width: min(240px, calc(45vw - 24px));
    min-height: 44px;
    height: auto;
    padding: 8px 12px;
    font-size: 12px;
  }
  body.guest-host-main #routeWaiting:not([hidden]):not(.host-offline) {
    inset: auto;
    bottom: 16px;
    left: 18px;
    right: auto;
    top: auto;
    transform: none;
    width: min(260px, calc(50vw - 26px));
  }
}

/* The only practice camera selector lives in the ordinary host dock, not a
   closed setup drawer. Phone/landscape viewers can always choose a rider. */
.host-director-controls{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:6px 0 9px;padding:9px;border:1px solid #a9d4cc4d;border-radius:10px;background:#0c2428cc}
.host-director-controls[hidden],.host-director-controls select[hidden],.host-director-controls button[hidden],.host-director-status[hidden]{display:none!important}
.host-director-label{flex:1 1 100%;font-size:10px;color:#b8e8d8;font-weight:650;letter-spacing:.03em}
.host-director-controls select{flex:1 1 115px;min-width:0;max-width:100%;min-height:40px;padding:8px 9px;font-size:12px}
.host-director-controls button{flex:0 1 auto;min-height:40px;padding:8px;font-size:11px}
.host-director-status{flex:1 1 100%;min-width:0;margin:1px 0 0;font-size:12px;line-height:1.45;color:#d9eee7;overflow-wrap:anywhere;white-space:normal}
@media(max-width:520px){.host-director-controls{padding:7px;margin-bottom:6px}.host-director-controls select{font-size:13px;min-height:44px}.host-director-status{font-size:12px;line-height:1.5}}

/* The camera is the first ordinary host action. On a narrow phone its choices
   remain above the long source and roster sections instead of inside the
   scrolling rider list. Let the rest of the summary scroll if it grows. */
@media(max-width:760px){
 body .host-hud .host-summary:has(.host-director-controls:not([hidden])){flex:0 1 auto;min-height:170px;overflow-y:auto;overscroll-behavior:contain}
 body .host-hud .host-summary .host-director-controls{margin-top:8px;margin-bottom:8px}
}

@media (max-width:760px) and (orientation:portrait) {
  body[data-scene-mode="simulation"]:not(.clean):has(#hostHud:not([hidden]) #companionGuest:not([hidden])) .stage > #output {
    --director-picture-top: max(132px, calc(var(--director-status-bottom, 126px) + 6px));
    top: var(--director-picture-top);
    height: max(1px, calc(var(--director-dock-top, 40dvh) - var(--director-picture-top) - 6px));
    object-fit: contain;
    object-position: center;
  }
}
