.cm-scooter-host{position:relative;display:block;width:100%;height:100%;min-height:0;background:#121a1e;color:#fff;overflow:hidden;font-family:Arial,sans-serif}
.cm-scooter-panel{position:relative;width:100%;height:100%;min-height:0;max-height:100%;margin:auto;overflow:hidden;box-sizing:border-box}
.cm-scooter-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:fill}
.cm-scooter-overlay{position:fixed;inset:0;z-index:9500;display:block;width:100%;height:100dvh;min-height:0;max-height:100dvh;background:#10171d}
.cm-scooter-overlay.hidden{display:none!important}
/* Both the overlay itself and a separately mounted host must fit short landscape screens. */
.cm-scooter-overlay .cm-scooter-host{height:100%;min-height:0}
.cm-scooter-hud{position:absolute;right:max(12px,env(safe-area-inset-right,0px));bottom:max(10px,env(safe-area-inset-bottom,0px));width:min(290px,calc(100% - 160px));box-sizing:border-box;pointer-events:none}
.cm-scooter-stats{padding:10px 13px 8px;border:3px solid #46545a;border-radius:16px;background:#111d23f2;box-shadow:0 4px 16px #0009;color:#d6f1ca}
.cm-scooter-instruments{display:flex;justify-content:space-between;align-items:center;gap:14px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-variant-numeric:tabular-nums;line-height:1}
.cm-scooter-instruments>div{display:flex;flex-direction:column;gap:3px}
.cm-scooter-instruments>div:first-child{flex-direction:row;align-items:baseline;gap:4px}
.cm-scooter-instruments small{font:700 10px Arial,sans-serif;letter-spacing:.08em;color:#a9c3aa}
.cm-scooter-speed{font-size:38px;font-weight:700;letter-spacing:-2px}
.cm-scooter-timer{font-size:23px;font-weight:700}
.cm-scooter-position{font-size:13px;font-weight:700;line-height:1.3;margin-top:6px;white-space:nowrap}
.cm-scooter-stats[data-leader=player] .cm-scooter-position{color:#a5f38b}
.cm-scooter-progress{display:block;appearance:none;width:100%;height:5px;border:0;border-radius:4px;background:#35433c;margin:6px 0 4px;accent-color:#b6e3a4;overflow:hidden}
.cm-scooter-progress::-webkit-progress-bar{background:#35433c}
.cm-scooter-progress::-webkit-progress-value{background:#b6e3a4}
.cm-scooter-progress::-moz-progress-bar{background:#b6e3a4}
.cm-scooter-details{display:flex;justify-content:space-between;font:11px ui-monospace,monospace;font-variant-numeric:tabular-nums;color:#b0c3b0}
.cm-scooter-footer{position:absolute;top:max(8px,env(safe-area-inset-top,0px));left:max(10px,env(safe-area-inset-left,0px));right:calc(58px + env(safe-area-inset-right,0px));display:flex;justify-content:center;pointer-events:none}
.cm-scooter-advice{max-width:620px;padding:7px 12px;border-radius:9px;background:#101c27ed;color:#fff;text-align:center;font-size:12px;line-height:1.4;box-sizing:border-box}
.cm-scooter-advice span{display:block}
.cm-scooter-start,.cm-scooter-result{position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);padding:12px 22px;border-radius:13px;background:#111d27f5;text-align:center;width:min(85%,570px);max-height:70%;overflow:auto;box-sizing:border-box}
.cm-scooter-start p{font-size:clamp(11px,1.6vw,16px);line-height:1.4;margin:4px 0}
.cm-scooter-light{font-size:clamp(44px,12vh,100px);font-weight:900;color:#eaba42;line-height:1.1}
.cm-scooter-close{position:absolute;right:max(8px,env(safe-area-inset-right,0px));top:max(7px,env(safe-area-inset-top,0px));background:#151515e8;border:1px solid white;color:white;border-radius:50%;width:39px;height:39px;font-size:25px;cursor:pointer}
.cm-scooter-result button{margin:6px;padding:9px 18px;border-radius:8px;cursor:pointer;border:0;font-weight:bold}
.cm-scooter-result h2{margin:4px 0;font-size:clamp(20px,3vw,32px)}
.cm-scooter-result.hidden,.cm-scooter-start.hidden{display:none}
/* Keep the shared joystick's idle appearance and original pressed appearance. */
body.cm-scooter-race-open .touch-controls{z-index:9601}
body.cm-scooter-race-open .touch-action{display:none!important}
body.cm-scooter-race-open .touch-controls .virtual-joystick:not(.active){opacity:.84!important;background:radial-gradient(circle at center,#ffffff20 0 38%,#080b13e0 39% 100%);border:2px solid #ffffff9c;box-shadow:0 7px 24px #000b,inset 0 0 0 1px #ffffff36}
body.cm-scooter-race-open .touch-controls .virtual-joystick.active{opacity:.96!important}
@media(max-height:440px){
 .cm-scooter-hud{width:min(255px,calc(100% - 150px));bottom:max(6px,env(safe-area-inset-bottom,0px))}
 .cm-scooter-stats{padding:7px 10px 6px;border-radius:12px}
 .cm-scooter-speed{font-size:32px}
 .cm-scooter-timer{font-size:21px}
 .cm-scooter-position{font-size:12px;margin-top:4px}
 .cm-scooter-advice{font-size:11px;padding:5px 9px}
 .cm-scooter-advice span:last-child{display:none}
}
@media(max-width:450px){
 .cm-scooter-hud{width:min(220px,calc(100% - 125px));right:max(6px,env(safe-area-inset-right,0px))}
 .cm-scooter-stats{padding:7px}
 .cm-scooter-instruments{gap:6px}
 .cm-scooter-speed{font-size:30px}
 .cm-scooter-timer{font-size:18px}
 .cm-scooter-position{font-size:11px}
 .cm-scooter-advice{font-size:11px}
}
