/* Compact edge-mounted cockpit. Keep the centre clear at 360px and in landscape. */
#room{--cockpit-bottom:calc(12px + env(safe-area-inset-bottom));--hud-top:calc(max(8px,env(safe-area-inset-top)) + 52px)}
#room.is-playing{--dock:0px!important}.is-playing .room-bottom{display:none}
.room-top{top:max(8px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));gap:8px}.room-top nav{gap:6px;align-items:center}.room-top button{min-height:44px;height:44px;line-height:1;min-width:44px;padding:8px 12px;border-radius:12px;font-size:12px}
.room-top #settingsToggle{font-size:0;width:44px;padding:8px}.room-top #settingsToggle:before{content:'⚙';font-size:22px}.room-top #pause{font-size:0;width:44px;padding:8px}.room-top #pause:before{content:'Ⅱ';font-size:24px;font-weight:800}.is-paused .room-top #pause:before{content:'▶';font-size:18px}.is-playing .brand span{display:none}.is-playing .brand img{width:36px;height:36px}.room-top #fullscreen{font-size:23px;padding:4px}
.game-hud{position:absolute;inset:0;display:block!important;pointer-events:none;z-index:2}.game-hud[hidden]{display:none!important}
#room .speed-card{position:absolute;left:50%;top:auto;bottom:calc(var(--dock,90px) + var(--cockpit-bottom) + 12px);transform:translateX(-50%);width:108px;min-width:0;max-width:none;height:108px;min-height:0;padding:31px 0 8px;gap:0;border-radius:50%;border:1px solid #a4b8be77;background:radial-gradient(circle at 50% 38%,#344955f2,#10222de8);box-shadow:0 4px 18px #14243044;overflow:visible}
.speed-card:after{display:none}.speed-dial{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.speed-dial path{fill:none;stroke-linecap:round}.dial-track{stroke:#6d7e8766;stroke-width:4}.dial-active{stroke:var(--instrument-accent);stroke-width:4;stroke-dasharray:100;stroke-dashoffset:calc(100 - var(--speed-ratio,0)*100)}.dial-ticks{stroke:#d5e2e2;stroke-width:1.3}.dial-needle{stroke:#ff6579;stroke-width:2;transform-origin:60px 57px;transform:rotate(var(--dial-angle,0deg));opacity:.5}
#room .speed-card #modeLabel{display:none}#room .speed-card #speed{z-index:1;line-height:1;font-size:31px;letter-spacing:-1px;font-weight:800;text-shadow:0 1px 3px #13222c}#room .speed-card .speed-unit{font-size:10px;color:#d8e5e7;margin-top:3px;z-index:1}#room .speed-card .instrument-detail{font-size:9px;margin-top:5px;letter-spacing:.5px;color:#fff}
#room .mission-card{position:absolute;left:12px;top:var(--hud-top);width:max-content;max-width:calc(100% - 134px);min-height:0;padding:8px 11px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 12px;border-radius:12px;background:#19313ce3;box-shadow:0 3px 10px #10242a1f}
#room .mission-card #objective{font-size:10px;letter-spacing:.3px;line-height:1.3}#room .mission-card #timer{font-size:17px;margin:0;line-height:1.2}#room .mission-card #feedback{display:none}.mission-progress{grid-column:1/-1;width:100%;margin:0;height:2px}
#room .map-panel{right:12px;top:var(--hud-top);width:100px;border-radius:12px;box-shadow:0 3px 10px #18374420}#room .map-panel>span{display:none}
#room .route-hint{flex-direction:row;align-items:center;left:12px;right:auto;top:calc(var(--hud-top) + 53px);width:auto;max-width:calc(100% - 134px);padding:6px 9px;gap:7px;border-radius:10px;box-shadow:0 3px 10px #18374420}#room .route-hint>b{font-size:23px}#room .route-hint strong{font-size:11px;line-height:1.3}#room .route-hint small{font-size:9px;line-height:1.3}
#room .station-board{left:12px;top:calc(var(--hud-top) + 53px);width:200px;max-width:calc(100% - 134px);padding:8px 11px;border-radius:10px;border-top-width:2px;background:#19313ce3}#room .station-board>span{font-size:8px;letter-spacing:.7px}#room .station-board strong{font-size:16px;margin:3px 0}#room .station-board #stationDistance{font-size:10px;letter-spacing:0;line-height:1.4}#room .station-board #passengerCount{font-size:9px;margin:5px 0 0;color:#d8e8e1}.station-progress{margin-top:6px}
#room .drive-controls{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(var(--dock,90px) + var(--cockpit-bottom) + 12px)}.control-caption{display:none}.steering-wheel{width:132px;height:132px}#room .drive-controls .pedals{gap:8px;padding:0}#room .drive-controls .pedals button{width:57px}#room .drive-controls .pedals svg{height:75px}#room .drive-controls .pedals .gas-pedal{width:48px}#room .drive-controls .pedals .gas-pedal svg{height:105px}#room .drive-controls .pedals button small{font-size:8px;padding:3px 5px}#room .drive-controls .car-reverse{width:44px;height:44px;min-height:44px;left:0;bottom:calc(100% + 6px)}
#room .lever{right:max(12px,env(safe-area-inset-right));bottom:calc(var(--dock,90px) + var(--cockpit-bottom) + 12px);width:94px;padding:8px;border-radius:13px}#room .lever-body{height:116px;margin:7px 0 0}#room .lever label{font-size:9px;letter-spacing:.5px}#room .lever output{font-size:13px}.lever .train-brake{font-size:10px;margin-top:6px;min-height:44px}.lever.locked:after{font-size:8px}
#room .rail-controls{left:max(12px,env(safe-area-inset-left));bottom:calc(var(--dock,90px) + var(--cockpit-bottom) + 12px);width:114px;grid-template-columns:1fr;gap:7px}#room .rail-controls button{min-height:44px;padding:8px 5px;font-size:11px}.flight-stick{width:120px;height:120px}.stick-top{font-size:8px;padding:2px 7px}
#room .game-status{left:50%;transform:translateX(-50%);bottom:calc(var(--dock,90px) + var(--cockpit-bottom) + 170px);top:auto;width:max-content;min-width:0;max-width:min(300px,85%);padding:8px 12px;font-size:11px;line-height:1.4}#room .pause-state{left:50%;top:45%;transform:translate(-50%,-50%);width:max-content;max-width:80%;font-size:12px;padding:9px 14px;text-align:center}
.room-bottom .play-actions{width:auto}.room-bottom .model-caption{max-width:65%;flex:1}.room-bottom #play{min-width:110px}.room-bottom .model-caption>span,.room-bottom .model-caption small{display:none}.room-bottom{padding:10px 12px;flex-wrap:nowrap;bottom:var(--cockpit-bottom)}
#settings #camera,#settings #recover{display:block;width:100%;margin:10px 0}#settings #rendererNote{position:static!important;transform:none!important;max-width:none!important;font-size:11px!important;line-height:1.6;color:#6d7f77;background:transparent;padding:0!important}
@media(max-width:480px){.is-playing .brand img{width:30px;height:30px}.room-top .brand{font-size:17px}.room-top .brand img{width:30px;height:30px}.room-top nav{gap:5px}.room-top #garageToggle{padding:8px}.steering-wheel{width:112px;height:112px}#room .speed-card{width:88px;height:88px;padding-top:25px}#room .speed-card #speed{font-size:26px}#room .speed-card .instrument-detail{font-size:8px;margin-top:4px}#room .speed-card .speed-unit{font-size:9px;margin-top:1px}#room .drive-controls .pedals button{width:49px}#room .drive-controls .pedals .gas-pedal{width:44px}#room .drive-controls .pedals .gas-pedal svg{height:94px}#room .drive-controls .pedals svg{height:68px}.flight-stick{width:112px;height:112px}#room .mission-card #objective{font-size:9px}#room .mission-card #timer{font-size:15px}}
@media(max-height:560px) and (orientation:landscape){#room{--hud-top:calc(max(6px,env(safe-area-inset-top)) + 48px);--cockpit-bottom:calc(4px + env(safe-area-inset-bottom))}.room-top{top:max(6px,env(safe-area-inset-top))}.room-top .brand small{display:none}#room .speed-card{width:88px;height:88px;padding-top:25px}#room .speed-card #speed{font-size:26px}#room .speed-card .instrument-detail{font-size:8px;margin-top:3px}#room .speed-card .speed-unit{font-size:9px}#room .lever-body{height:86px}#room .station-board{width:208px;padding:6px 9px}#room .station-board strong{font-size:14px}#room .station-board #passengerCount{margin-top:3px}#room .station-board .station-progress{display:none}#room .rail-controls{grid-template-columns:1fr 1fr;width:242px}.steering-wheel{width:100px;height:100px}#room .drive-controls .car-reverse{left:calc(100% + 8px);bottom:0}.flight-stick{width:100px;height:100px}#room .map-panel{width:90px}#room .game-status{bottom:calc(var(--dock,90px) + 125px);max-width:250px}#room .route-hint{top:var(--hud-top);left:250px;max-width:200px}#room .mission-card{max-width:220px}}
@media(prefers-reduced-motion:reduce){.dial-active,.dial-needle{transition:none}}
