@font-face{font-family:Inter;src:url('./fonts/inter.ttf') format('truetype');font-weight:400;font-display:swap}@font-face{font-family:Barlow;src:url('./fonts/barlow-condensed.ttf') format('truetype');font-weight:800;font-display:swap}
:root{color-scheme:dark;--cyan:#8adee7;--muted:#a5b2bb}*{box-sizing:border-box}body{margin:0;background:#111b24;color:#f4f7f8;font-family:Inter,Arial,sans-serif;overflow:hidden;user-select:none;-webkit-user-select:none}button,select{font:inherit}button{cursor:pointer;color:inherit;border:0}button:hover:not(:disabled){filter:brightness(1.13)}button:disabled{cursor:default;opacity:.45}button:focus-visible,select:focus-visible,[role=slider]:focus-visible{outline:2px solid var(--cyan);outline-offset:4px}[hidden]{display:none!important}#world,.vignette{position:fixed;inset:0;width:100%;height:100%;touch-action:none}.vignette{pointer-events:none;background:linear-gradient(90deg,#09131bf5 0%,#09131bd9 30%,#09131b40 65%,#09131b0d),linear-gradient(0deg,#07121acc,transparent 25%)}body.playing .vignette{background:linear-gradient(180deg,#09172522,transparent 22%,transparent 80%,#09172555)}#loading{position:fixed;inset:0;z-index:50;background:#101922;display:grid;place-content:center;text-align:center;transition:opacity .4s}#loading p{font-size:12px;color:var(--muted);margin-top:24px}.brand{font-family:Barlow,Impact,sans-serif;font-weight:800;font-size:29px;letter-spacing:2px;color:#fff;text-decoration:none;white-space:nowrap}.brand em,.hud-brand em{font-style:normal;color:var(--cyan)}header{position:absolute;left:5%;right:5%;top:max(28px,env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between;z-index:3}.header-right{display:flex;gap:9px}.icon{border:1px solid #ffffff29;background:#10202a80;border-radius:8px;width:40px;height:40px;font-size:20px;backdrop-filter:blur(10px)}.intro{position:absolute;top:50%;left:7%;transform:translateY(-50%);width:435px;max-width:85vw}h1{font:800 55px/.98 Barlow,Impact,sans-serif;letter-spacing:.2px;margin:0 0 16px}.tagline{font-size:12px;color:#b1bec5;margin:0 0 35px}.mode-tabs{display:flex;gap:4px;border-bottom:1px solid #b9d0df30;margin-bottom:24px}.mode-tabs button{background:none;font-size:11px;padding:15px 12px;color:#9dabb5;white-space:nowrap}.mode-tabs .selected{color:#fff;border-bottom:2px solid var(--cyan)}.match-panel{padding:0}.options{display:flex;gap:12px}.options label{flex:1;min-width:0;font-size:8px;letter-spacing:1.3px;color:#93a5b2}select{display:block;width:100%;margin-top:9px;padding:12px 8px;border:1px solid #b4cfdf30;background:#172630e6;border-radius:5px;color:#e9eff2;font-size:11px;outline:none}.map-description{font-size:10px;line-height:1.5;color:#849aa8;margin:14px 0 24px}.play{display:flex;align-items:center;justify-content:space-between;width:100%;background:#d7eef0;color:#142730;border-radius:6px;padding:16px 20px;letter-spacing:1.4px;font-size:13px;font-weight:bold}.play>span:last-child{font-size:19px}.match-note{font-size:9px;line-height:1.7;text-align:center;color:#8fa5b4;margin:13px 0 0}#human-mode-info{font-size:12px;line-height:1.8;color:#b9c7d0;margin:0 0 24px}.bike-colors{position:absolute;bottom:18%;right:15%;display:flex;gap:12px}.bike-colors button{border:3px solid #15222b;background:var(--swatch);height:20px;width:20px;border-radius:50%;outline:1px solid transparent}.bike-colors button.active{outline-color:var(--swatch)}footer{position:absolute;bottom:max(22px,env(safe-area-inset-bottom));left:5%;font-size:8px;letter-spacing:1.5px;color:#8297a4}footer span{margin-left:15px;opacity:.6}
#hud{position:fixed;inset:0;pointer-events:none}#hud button{pointer-events:auto;touch-action:none}.hud-top{position:absolute;left:max(25px,env(safe-area-inset-left));right:max(25px,env(safe-area-inset-right));top:max(20px,env(safe-area-inset-top));display:flex;justify-content:space-between;align-items:flex-start}.hud-brand{font-family:Barlow,Impact,sans-serif;font-size:24px;letter-spacing:1px;text-shadow:0 1px 5px #0008}.hud-brand small{font-family:Inter,sans-serif;font-size:7px;display:block;letter-spacing:1.5px;color:#e0e9ef;margin-top:6px}.round{position:absolute;left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap;padding:9px 15px;border-radius:6px;background:#102330a3}.round span{display:block;font-size:6px;letter-spacing:2px;color:#c0cdd5}.round strong{display:block;font-size:22px;margin-top:5px;font-weight:400;font-variant-numeric:tabular-nums}.standing{position:absolute;top:105px;left:25px;padding:10px;background:#1023309e;border-radius:6px}.small-label{font-size:7px;letter-spacing:1.5px;color:#9eb5c4}.rider-row{display:flex;align-items:center;gap:9px;font-size:8px;padding:5px 0;color:#e0e7eb}.rider-row:first-child{padding-top:10px}.rider-row i{height:12px;width:3px;background:white}.rider-row b{margin-left:7px;font-size:6px;font-weight:400;opacity:.6}.rider-row.dead{opacity:.3;text-decoration:line-through}#map{position:absolute;right:25px;top:105px;width:130px;height:130px;background:#1023308c;border:1px solid #9bb6c329;border-radius:5px}.telemetry{position:absolute;bottom:65px;left:25px;width:180px;padding:10px;border-radius:6px;background:#102330a3}.telemetry>div:first-child{display:flex;align-items:baseline;gap:8px}.telemetry strong{font:800 43px Barlow,Impact,sans-serif}.telemetry span{font-size:7px;color:#bbcbd5;letter-spacing:.8px}.energy-label{display:flex;justify-content:space-between;gap:5px;margin-top:7px}.energy-label b{font-size:7px;color:var(--cyan);font-weight:400}.meter{height:2px;background:#708d9b66;margin-top:8px}.meter i{display:block;height:100%;background:var(--cyan);width:0}#ride-status{font-size:7px;color:#d1bbff;margin-top:7px}.abilities{position:absolute;right:25px;bottom:50px;display:flex;align-items:stretch;gap:9px}.abilities button{width:76px;height:76px;border:1px solid #adc5d14f;border-radius:8px;background:#102330b3;backdrop-filter:blur(6px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.abilities button>span{font-size:24px;color:var(--cyan)}.abilities b{font-size:8px;letter-spacing:1px}.abilities small{font-size:6px;letter-spacing:.2px;color:#c1d2dc}.abilities #brake-btn{width:44px}.abilities #brake-btn>span{font-size:18px;color:#ccd6dc}.abilities #brake-btn b{font-size:6px}.abilities .cooling{opacity:.42}.abilities button:active{background:#355565}.steering{display:none;position:absolute;left:20px;bottom:30px;width:130px;height:62px;border:1px solid #adc5d166;border-radius:40px;background:#102330b3;align-items:center;justify-content:space-between;padding:0 13px;pointer-events:auto;touch-action:none}.steering>span{font-size:27px;color:#bfced7}.steering i{position:absolute;width:44px;height:44px;left:42px;border-radius:50%;border:1px solid #c8dce499;background:radial-gradient(circle at 35% 25%,#597581,#233b49);box-shadow:0 3px 8px #0005;pointer-events:none}.steering small{position:absolute;top:-15px;left:0;right:0;text-align:center;letter-spacing:1px;font-size:6px;color:#c0d0da}.key-hint{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);font-size:8px;white-space:nowrap;color:#d0dbe3;text-shadow:0 1px 4px #000}#countdown{position:absolute;inset:0;display:grid;place-content:center;font:800 95px Barlow,Impact,sans-serif;color:#fff;text-shadow:0 2px 25px #0006}#toast{position:absolute;top:24%;left:50%;transform:translateX(-50%);max-width:90vw;font-size:11px;letter-spacing:1px;text-align:center;color:white;padding:9px 13px;border-radius:5px;background:#102330b3}#toast:empty{display:none}#spectator{position:absolute;left:50%;bottom:95px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:12px;white-space:nowrap}#spectator span{font-size:8px;letter-spacing:2px}#spectator button{font-size:10px;border-radius:5px;padding:12px 20px;background:#183b4c;border:1px solid #9bc1d15f}#p2-hint{position:absolute;right:25px;bottom:20px;font-size:8px;color:#f8b7d0}
.overlay{position:fixed;inset:0;z-index:10;background:#07121cc9;backdrop-filter:blur(12px);padding:20px;display:grid;place-items:center}.dialog{width:min(440px,100%);padding:30px;background:#14222d;border:1px solid #a3bfcc2e;border-radius:12px;max-height:90dvh;overflow:auto}.dialog h2{font:800 35px Barlow,Impact,sans-serif;margin:12px 0 20px;letter-spacing:.6px}.dialog p{font-size:12px;line-height:1.8;color:#b2c3ce}.dialog .play{margin-top:20px}.secondary{display:block;width:100%;text-align:center;font-size:11px;padding:13px;border:1px solid #abc6d333;border-radius:5px;background:#203541;color:#dde8ed;margin-top:10px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:12px;margin:20px 0}.setting-row select{width:150px;margin:0}.developer-credit{border-top:1px solid #abc6d329;margin-top:25px!important;padding-top:18px;text-align:center;font-size:10px!important;color:#d4e0e6!important}.dialog a{color:var(--cyan)}.controls-table{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.controls-table>div{font-size:11px;color:#90a9ba;line-height:1.6}.controls-table b{display:block;color:#e6eff4}.results-stats{display:flex;justify-content:space-between;border-block:1px solid #abc6d333;margin:22px 0;padding:18px 0}.results-stats b{font-size:25px;font-weight:400;color:var(--cyan);display:block}.results-stats span{font-size:7px;color:#8ca6b8}.compatibility{position:fixed;bottom:3px;left:50%;transform:translateX(-50%);font-size:7px;letter-spacing:.7px;color:#bdccd6;background:#132631b3;padding:3px 7px;pointer-events:none;z-index:8;white-space:nowrap}
@media(max-width:760px){header{left:6%;right:6%;top:22px}.brand{font-size:25px}.icon{width:35px;height:35px}.intro{left:7%;width:86%;max-width:440px;top:47%}h1{font-size:45px}.tagline{font-size:11px;margin-bottom:30px}.mode-tabs button{font-size:10px;padding:13px 10px}.options{gap:8px}select{font-size:10px;padding:11px 6px}.map-description{font-size:9px}.vignette{background:linear-gradient(90deg,#09131bf2,#09131ba6),linear-gradient(0deg,#09131b77,transparent)}.bike-colors{bottom:15%;right:7%}.hud-top{left:16px;right:16px;top:16px}.hud-brand{font-size:20px}.hud-brand small{font-size:6px}.round{padding:8px 10px}.round span{font-size:5px;letter-spacing:1px}.round strong{font-size:20px}.standing{top:88px;left:16px;padding:8px}#map{top:88px;right:16px;width:92px;height:92px}.rider-row{font-size:7px;padding:4px 0}.telemetry{bottom:120px;left:16px;width:145px}.telemetry strong{font-size:34px}.telemetry span,.energy-label b{font-size:6px}.abilities{right:16px;bottom:max(28px,env(safe-area-inset-bottom));gap:7px}.abilities button{width:62px;height:64px}.abilities #brake-btn{width:39px}.steering{display:flex;left:16px;width:126px;bottom:max(28px,env(safe-area-inset-bottom))}.steering i{left:40px}.key-hint{display:none}#p2-hint{bottom:8px;font-size:6px}.dialog{padding:24px}#toast{font-size:9px;top:24%;white-space:normal}}
@media(pointer:coarse){.steering{display:flex}.telemetry{bottom:120px}.key-hint{display:none}}
@media(max-height:540px) and (orientation:landscape){header{top:16px;left:4%;right:4%}.brand{font-size:24px}.intro{left:5%;width:365px;top:52%}h1{font-size:35px;margin-bottom:8px}.tagline{font-size:9px;margin-bottom:15px}.mode-tabs{margin-bottom:15px}.mode-tabs button{font-size:9px;padding:9px 10px}select{padding:8px 6px;font-size:10px;margin-top:6px}.map-description{margin:10px 0 15px;font-size:8px}.play{padding:11px 16px;font-size:11px}.match-note{font-size:8px;margin-top:9px}#human-mode-info{font-size:10px;line-height:1.5;margin-bottom:14px}.bike-colors{bottom:18%;right:12%}footer{bottom:12px;font-size:6px}.hud-top{top:10px}.hud-brand{font-size:18px}.round{padding:5px 9px}.round strong{font-size:17px;margin-top:3px}.standing{top:65px;left:16px;padding:6px}.rider-row{font-size:6px;padding:3px 0}#map{top:65px;right:16px;width:80px;height:80px}.telemetry{bottom:98px;left:16px;width:130px;padding:6px}.telemetry strong{font-size:28px}.telemetry span,.energy-label b{font-size:5px}.abilities{bottom:20px;right:16px}.abilities button{width:58px;height:58px}.abilities #brake-btn{width:36px}.steering{display:flex;bottom:20px;left:16px;height:58px}.key-hint{display:none}#toast{top:20%;font-size:9px}.dialog{max-height:94dvh;padding:20px}.dialog h2{font-size:28px;margin:8px 0 12px}.dialog p{font-size:10px}.setting-row{margin:14px 0}.developer-credit{margin-top:14px!important;padding-top:12px}.results-stats{margin:12px 0;padding:10px 0}#spectator{bottom:40px}}

input[type=number]{font:inherit;display:block;width:100%;margin-top:9px;padding:12px 8px;border:1px solid #b4cfdf30;background:#172630e6;border-radius:5px;color:#e9eff2;font-size:11px;user-select:text}input:focus-visible{outline:2px solid var(--cyan)}input[aria-invalid=true]{border-color:#ff9a92}#players-help{font-size:10px;line-height:1.5;color:#a5b2bb}.mode-tabs{overflow-x:auto}.mode-tabs button{padding-inline:10px}.maps-dialog{width:min(820px,100%)}.map-picker{display:flex;gap:6px;overflow:auto;padding-bottom:14px}.map-picker .secondary{width:auto;flex-shrink:0;margin:0;padding:10px 12px;font-size:10px}.map-picker .active{border-color:var(--cyan);background:#2a4858}.map-picker small{font-size:7px;color:#bcb0ff;display:block;margin-top:4px}#map-video{width:100%;aspect-ratio:16/9;display:block;background:#050a12;border-radius:6px;object-fit:contain}.maps-dialog h2{margin-bottom:14px}.maps-dialog .play{margin-top:12px}@media(max-width:760px){.mode-tabs button{padding-inline:8px;font-size:9px}.maps-dialog{padding:18px}.map-picker .secondary{padding:9px;font-size:9px}input[type=number]{font-size:16px;padding:8px 6px}}@media(max-height:540px) and (orientation:landscape){input[type=number]{padding:7px 6px;margin-top:6px;font-size:12px}.maps-dialog{max-height:94dvh}#map-video{max-height:44dvh}#players-help{margin:8px 0;font-size:8px}}

#preview-loading{font-size:10px;color:#a9bcc8}#map-video{background:#07131f}@media(max-height:540px) and (orientation:landscape){.maps-dialog #map-video{max-height:40dvh}}

#rotate-bike{position:absolute;right:8%;top:26%;width:36%;height:44%;display:flex;align-items:flex-end;justify-content:center;padding:15px;color:#a5b2bb;font-size:10px;letter-spacing:1px;cursor:grab;touch-action:none;z-index:2}#rotate-bike:active{cursor:grabbing}.setting-row input{max-width:60%;padding:12px;border:1px solid #536875;border-radius:5px;background:#172630;color:white;font:inherit;user-select:text}@media(orientation:portrait){#rotate-bike{top:auto;bottom:8%;right:12%;width:76%;height:9%;background:#10202a88;border-radius:8px}}

@media(orientation:portrait){#menu:has(#rotate-bike:focus) .intro{opacity:0;pointer-events:none}#menu:has(#rotate-bike:focus) #rotate-bike{height:65%;background:transparent}}

.result-rank{font-size:24px!important;margin:10px 0 32px!important;color:#fff!important}.dialog>.small-label:empty{display:none}

.result-dialog h2{font-size:clamp(20px,5vw,40px);white-space:nowrap;letter-spacing:-.5px}.result-dialog .result-rank{font-size:16px!important}

#preview-loading:empty{display:none}#preview-loading:not(:empty){display:block;margin-bottom:8px}
/* Spectator targets stay reachable in 15-rider rooms and on short phone screens. */
#roster{max-height:min(45dvh,420px);overflow-y:auto;pointer-events:auto;overscroll-behavior:contain;touch-action:pan-y}
button.rider-row{background:transparent;border:1px solid transparent;width:100%;text-align:left;min-height:30px;padding:6px 8px;border-radius:4px}button.rider-row:disabled{opacity:1}button.rider-row.dead:disabled{opacity:.3}button.rider-row.watching{border-color:var(--cyan);background:#2a4858}button.rider-row span{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.spectating .abilities,body.spectating .steering,body.spectating .telemetry,body.spectating .key-hint,body.spectating #p2-hint{display:none!important}
#spectator{bottom:max(16px,env(safe-area-inset-bottom));max-width:calc(100vw - 32px);gap:8px;padding:12px;background:#07121ee8;border:1px solid #9bc1d15f;border-radius:8px}#spectator>span{max-width:80vw;white-space:normal;text-align:center;letter-spacing:1px}.spectator-switch{display:flex;gap:8px}#spectator button{min-height:44px}#spectator #retry{display:none}body.spectating .standing{max-width:45vw}body.spectating button.rider-row{min-height:44px;font-size:10px}
@media(max-height:540px) and (orientation:landscape){#spectator{left:auto;right:16px;transform:none;bottom:12px;padding:8px;gap:6px}#spectator button{padding:8px 12px}#roster{max-height:calc(100dvh - 110px)}body.spectating .standing{top:65px}}
.steering{display:none!important}#direction-controls,#gyro-center{display:none}body.mobile-controls #direction-controls{position:absolute;bottom:max(24px,env(safe-area-inset-bottom));left:max(20px,env(safe-area-inset-left));display:flex;gap:14px;opacity:var(--steering-opacity,.8)}#direction-controls button{width:64px;height:64px;border:1px solid #b9dce5;border-radius:12px;background:#173846;font-size:42px;line-height:1;touch-action:none}#direction-controls button:active{background:#468297}body.gyro-controls #direction-controls{display:none}body.gyro-controls #gyro-center{display:block;position:absolute;left:20px;bottom:28px;padding:14px;background:#183b4c;border:1px solid #91bbc8;border-radius:6px;font-size:10px}body.spectating #direction-controls,body.spectating #gyro-center{display:none!important}#control-opacity{width:100%;accent-color:#8adee7;min-height:40px}#opacity-preview{display:flex;gap:12px;margin:12px 0}#opacity-preview span{display:grid;place-items:center;width:48px;height:48px;border:1px solid #b9dce5;border-radius:10px;background:#173846;font-size:30px}body.mobile-controls .telemetry{bottom:110px}body:not(.mobile-controls) .abilities{pointer-events:none}body:not(.mobile-controls) .abilities button{pointer-events:none}

#sudden-death-banner{position:absolute;top:19%;left:0;width:100%;padding:16px 12px 18px;text-align:center;background:#070a13b8;pointer-events:none;color:#fff;text-shadow:0 2px 5px #000;z-index:3}#sudden-death-banner strong{display:block;font:800 clamp(30px,5vw,56px)/1 Barlow,Impact,sans-serif;letter-spacing:1px}#sudden-death-banner span{display:block;margin-top:8px;font-size:clamp(11px,1.5vw,17px)}#sudden-death-banner.compact{top:76px;left:50%;width:max-content;max-width:60%;transform:translateX(-50%);padding:7px 14px;border-bottom:2px solid #ffdf25;border-radius:3px}#sudden-death-banner.compact strong{font-size:19px;color:#ffe756}#sudden-death-banner.compact span{font-size:10px;margin-top:4px}@media(max-height:540px) and (orientation:landscape){#sudden-death-banner{top:20%;padding:10px}#sudden-death-banner strong{font-size:32px}#sudden-death-banner.compact{top:59px;padding:5px 12px}#sudden-death-banner.compact strong{font-size:16px}#sudden-death-banner.compact span{font-size:9px}}
.final-leaderboard{max-height:48vh;overflow:auto;margin:18px 0}.final-leaderboard h3{font:800 22px Barlow,Arial,sans-serif;letter-spacing:1px}.final-leaderboard table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}.final-leaderboard th,.final-leaderboard td{padding:10px 7px;border-bottom:1px solid #ffffff20}.final-leaderboard th{color:#a5b2bb;font-size:10px}.final-leaderboard .you{color:#8adee7;background:#8adee710}.final-leaderboard td:nth-child(2){overflow-wrap:anywhere;max-width:130px}.final-leaderboard td:nth-child(3){white-space:nowrap}@media(max-height:540px){.final-leaderboard{max-height:38vh}.final-leaderboard td{padding:7px 4px;font-size:11px}}
#room-notice{position:fixed;top:16px;left:50%;transform:translateX(-50%);z-index:100;padding:12px 18px;background:#10232fed;color:#fff;border:1px solid #8adee755;border-radius:7px;max-width:85vw;font-size:13px;pointer-events:none}
/* Harbor HUD 08: shared across bots, public and custom matches. */
#hud{--bike-color:#38c9ff;--map-size:clamp(82px,20dvh,184px);--roster-width:clamp(136px,17vw,260px);--hud-edge:12px}
#hud #map{left:max(var(--hud-edge),env(safe-area-inset-left));bottom:max(var(--hud-edge),env(safe-area-inset-bottom));top:auto;right:auto;width:var(--map-size);height:var(--map-size);border-radius:2px;background:#07101caa;border:1px solid #ffffff40}
#hud .standings-panel{position:absolute;right:max(var(--hud-edge),env(safe-area-inset-right));bottom:max(var(--hud-edge),env(safe-area-inset-bottom));width:var(--roster-width);max-width:36vw}
#hud .standing{position:static;max-width:none;padding:0;background:transparent;border-radius:0}
#hud #roster{max-height:min(30dvh,300px)}
#hud .rider-row{min-height:28px;padding:4px 7px;font-size:12px;gap:7px;background:#08132170;border-radius:0;border-bottom:1px solid #ffffff10;text-shadow:0 1px 3px #000}
#hud .rider-row span{flex:1;min-width:0;max-width:none;font-weight:bold}
#hud .rider-row i{flex-shrink:0;width:3px;height:12px}
#hud .rider-row b{font-size:7px;margin-left:0;flex-shrink:0}
#hud .rider-row.watching{border-color:var(--bike-color);background:#173447d9}
#hud .round{position:static;transform:none;padding:6px 8px;display:flex;align-items:center;justify-content:space-between;border-radius:0;background:#081321ba}
#hud .round span{font-size:10px;letter-spacing:1px;color:white}
#hud .round strong{font:800 26px/1 Barlow,Impact,sans-serif;margin:0;font-variant-numeric:tabular-nums}
#hud .abilities{top:max(16px,env(safe-area-inset-top));bottom:auto;left:50%;right:auto;transform:translateX(-50%);display:flex;gap:14px}
#hud .abilities button{width:clamp(46px,8dvh,68px);height:clamp(46px,8dvh,68px);padding:12px;border-radius:50%;border:2px solid #ffffff30;background:#142130cc;color:#a7acb4;opacity:1;backdrop-filter:none;transition:background .12s,box-shadow .12s,color .12s}
#hud .abilities svg{display:block;width:100%;height:100%;fill:currentColor;filter:drop-shadow(0 1px 1px #0003)}
#hud .abilities button.acquired{background:var(--bike-color);border-color:var(--bike-color);color:#fff;box-shadow:0 0 18px color-mix(in srgb,var(--bike-color) 60%,transparent)}
#hud .abilities button.active-power{box-shadow:inset 0 0 0 2px #ffffffb3,0 0 22px color-mix(in srgb,var(--bike-color) 70%,transparent)}
#hud .abilities button:active{transform:scale(.96)}
#hud #race-objective{position:absolute;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);width:max-content;max-width:calc(100% - 2 * var(--roster-width) - 28px);margin:0;text-align:center;font:600 clamp(10px,1.65vw,22px)/1.3 Inter,Arial,sans-serif;color:#fff;text-shadow:0 2px 3px #000,0 0 7px #000;pointer-events:none}
#hud #line-word{color:var(--bike-color)}
#hud #key-hint,#hud #p2-hint,#hud .energy-label,#hud .meter,#hud #ride-status{display:none!important}
#hud .telemetry{left:auto;right:max(var(--hud-edge),env(safe-area-inset-right));top:70px;bottom:auto;width:auto;padding:3px 7px;background:#08132170}
#hud .telemetry strong{font-size:28px}#hud .telemetry span{font-size:7px}
#hud .brake-control{display:none}
body.mobile-controls #hud .brake-control{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;width:52px;height:52px;border:1px solid #b9dce5;border-radius:50%;background:#173846cc;right:calc(max(var(--hud-edge),env(safe-area-inset-right)) + var(--roster-width) + 12px);bottom:max(55px,env(safe-area-inset-bottom));opacity:var(--steering-opacity,.8)}
#hud .brake-control span{font-size:20px}#hud .brake-control small{font-size:7px;margin-top:3px}
body.mobile-controls #hud #direction-controls{left:calc(max(var(--hud-edge),env(safe-area-inset-left)) + var(--map-size) + 12px);bottom:max(55px,env(safe-area-inset-bottom));gap:8px}
#hud #direction-controls button{width:54px;height:54px;font-size:38px}
body.gyro-controls #hud #gyro-center{left:calc(max(var(--hud-edge),env(safe-area-inset-left)) + var(--map-size) + 12px);bottom:max(55px,env(safe-area-inset-bottom));padding:13px 10px}
#hud #spectator{left:50%;right:auto;bottom:55px;transform:translateX(-50%);max-width:calc(100vw - 2 * var(--roster-width) - 30px);padding:8px;gap:6px}
#hud #spectator button{padding:8px 12px;font-size:10px}
body.spectating #hud .brake-control{display:none!important}body.spectating #hud .rider-row{min-height:40px;font-size:12px}
.sr-only{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}
@media(max-height:540px) and (orientation:landscape){#hud{--hud-edge:8px;--roster-width:136px}#hud .abilities{top:max(8px,env(safe-area-inset-top));gap:10px}#hud .abilities button{width:46px;height:46px;padding:9px}#hud .rider-row{min-height:24px;font-size:11px;padding:3px 6px}#hud .round{padding:4px 7px}#hud .round strong{font-size:20px}#hud .round span{font-size:8px}#hud #race-objective{font-size:clamp(10px,1.7vw,14px);bottom:max(10px,env(safe-area-inset-bottom))}#hud .telemetry{top:55px}#hud .telemetry strong{font-size:24px}#hud #spectator{bottom:48px}body.spectating #hud .rider-row{min-height:36px}}
/* Clean HUD 09 */
#hud .hud-brand,#hud .telemetry{display:none!important}
#hud .hud-top{justify-content:flex-end}
#hud #race-objective{font-weight:400;font-size:clamp(10px,1.15vw,17px);text-shadow:0 1px 2px #0009}
#hud #kill-feed{position:absolute;left:max(var(--hud-edge),env(safe-area-inset-left));bottom:calc(max(var(--hud-edge),env(safe-area-inset-bottom)) + var(--map-size) + 8px);width:max-content;max-width:min(420px,44vw);display:flex;flex-direction:column;gap:3px;font:400 clamp(10px,1.1vw,15px)/1.4 Inter,Arial,sans-serif;color:#fff;text-shadow:0 1px 2px #000;pointer-events:none}
#hud .kill-row{padding:7px 10px;background:#0910199e;overflow-wrap:anywhere}
#hud .kill-row span{font-weight:400}
@media(max-height:540px) and (orientation:landscape){#hud #race-objective{font-size:clamp(10px,1.35vw,12px)}#hud #kill-feed{font-size:10px;max-width:42vw;gap:2px}#hud .kill-row{padding:4px 6px}}
body.mobile-controls #hud #kill-feed{bottom:max(calc(max(var(--hud-edge),env(safe-area-inset-bottom)) + var(--map-size) + 8px),120px)}
/* Arena HUD 10: shared minimap and elimination-feed width. */
#hud{--map-size:clamp(120px,26dvh,280px);--map-height:calc(var(--map-size) * .75);--roster-width:clamp(150px,18vw,290px)}
#hud #map{width:var(--map-size);height:var(--map-height);background:#b7b8aa;border:0;border-radius:0;box-shadow:0 1px 3px #0004}
#hud #kill-feed,body.mobile-controls #hud #kill-feed{width:var(--map-size);max-width:var(--map-size);bottom:calc(max(var(--hud-edge),env(safe-area-inset-bottom)) + var(--map-height) + 7px)}
#hud .kill-row{width:100%;background:linear-gradient(90deg,#1720269e,#172026b5);padding:6px 8px;font-size:clamp(10px,1vw,13px)}
#hud .rider-row,body.spectating #hud .rider-row{justify-content:flex-end;gap:14px;border:0;border-bottom:1px solid #ffffff8a;border-radius:0;background:linear-gradient(90deg,transparent,#222a2e96 42%,#222a2ea6);min-height:32px;padding:4px 8px}
#hud .rider-row i{display:none}
#hud .rider-row span,body.spectating #hud .rider-row span{text-align:right;font-family:Arial,Helvetica,sans-serif;font-stretch:condensed;font-size:clamp(12px,1.35vw,20px);font-weight:400;text-shadow:0 1px 2px #000}
#hud .rider-row b{min-width:25px;text-align:right;font:400 clamp(17px,1.8vw,28px)/1.15 Arial,Helvetica,sans-serif;opacity:1}
#hud .round{justify-content:flex-end;gap:14px;padding:5px 8px;background:linear-gradient(90deg,transparent,#222a2e96 42%,#222a2ea6);border-bottom:1px solid #ffffff8a}
#hud .round span{font:400 12px Arial,Helvetica,sans-serif;letter-spacing:0}
#hud .round strong{font:400 clamp(20px,2vw,30px)/1.1 Arial,Helvetica,sans-serif;font-variant-numeric:tabular-nums}
#hud .rider-row.watching{background:linear-gradient(90deg,transparent,#486775bf);box-shadow:inset -2px 0 var(--bike-color)}
#hud .rider-row.dead{opacity:.4}
body.spectating #hud .rider-row{min-height:40px}
@media(max-height:540px) and (orientation:landscape){#hud{--roster-width:136px}#hud .rider-row{min-height:24px;padding:3px 6px;gap:8px}#hud .rider-row span{font-size:11px}#hud .rider-row b{font-size:17px;min-width:18px}#hud .round{padding:4px 6px;gap:8px}#hud .round strong{font-size:21px}#hud .round span{font-size:9px}#hud .kill-row{font-size:10px;padding:4px 5px}body.mobile-controls #hud #kill-feed{bottom:max(calc(max(var(--hud-edge),env(safe-area-inset-bottom)) + var(--map-height) + 7px),116px)}}
/* Protect the central riding view, including iPad. */
body.mobile-device #hud #toast{top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:auto;transform:none;max-width:29vw;padding:5px 7px;font-size:10px;line-height:1.3;letter-spacing:0;text-align:left;pointer-events:none;background:#09131cc4}
body.mobile-device.playing #room-notice{top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));transform:none;max-width:29vw;font-size:10px;padding:6px 8px}
body.mobile-device #hud #sudden-death-banner{top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));width:29vw;padding:7px;text-align:left;background:#080d16d4}
body.mobile-device #hud #sudden-death-banner strong{font:600 15px/1.1 Arial,sans-serif;letter-spacing:0}
body.mobile-device #hud #sudden-death-banner span{font-size:10px;line-height:1.3;margin-top:4px}
body.mobile-device #hud:has(#sudden-death-banner:not([hidden])) #toast{display:none}
body.mobile-device #hud #kill-feed .kill-row:nth-last-child(n+3){display:none}
body.mobile-device #hud #roster{max-height:min(23dvh,210px)}
body.mobile-device #hud #countdown{inset:auto;top:max(62px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);font-size:45px}
body.mobile-device.spectating #hud #race-objective{display:none}
body.mobile-device #hud #spectator{left:50%;right:auto;bottom:max(8px,env(safe-area-inset-bottom));transform:translateX(-50%);width:max-content;max-width:calc(100vw - var(--map-size) - var(--roster-width) - 55px);padding:4px;gap:3px;background:#08121bc4;border:0}
body.mobile-device #hud #spectator>span{font-size:9px;line-height:1.1;max-width:100%;letter-spacing:0}
body.mobile-device #hud #spectator .spectator-switch{gap:4px;width:100%}
body.mobile-device #hud #spectator button{min-height:36px;padding:6px 8px;font-size:9px}
body.mobile-device #hud #spectate-next{flex:1;white-space:normal}
body.mobile-device #hud #spectate-exit{width:100%;min-height:30px}
body.mobile-device .maps-dialog{width:min(860px,94vw);max-height:92dvh}
@media(max-height:450px) and (orientation:landscape){body.mobile-device #hud #spectator{display:grid;grid-template-columns:1fr auto;max-width:calc(100vw - var(--map-size) - var(--roster-width) - 42px)}body.mobile-device #hud #spectator>span{grid-column:1/-1}body.mobile-device #hud #spectate-exit{font-size:8px;padding:4px;max-width:66px;white-space:normal}body.mobile-device #hud #spectate-next{font-size:8px}body.mobile-device #hud #spectator button{min-height:36px}body.mobile-device #hud .abilities button{width:44px;height:44px}}

/* Compact HUD: fixed edge zones leave the road and bike unobstructed. */
#hud #roster{max-height:min(18dvh,130px);scrollbar-width:thin;scrollbar-color:#8adee766 transparent}
#hud .rider-row,body.spectating #hud .rider-row{min-height:26px;height:26px;padding:2px 7px;gap:9px;line-height:1;border-bottom-color:#ffffff45}
#hud .rider-row:first-child{padding-top:2px}
#hud .rider-row span,body.spectating #hud .rider-row span{font-size:13px;line-height:1.2}
#hud .rider-row b{font-size:17px;min-width:22px;line-height:1}
#hud .round{padding:4px 7px;gap:9px;border-bottom-color:#ffffff45}
#hud .round strong{font-size:23px;line-height:1}
#hud .round span{font-size:10px}
#hud .kill-row{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#hud #roster button{touch-action:pan-y}
body.mobile-device #hud{--map-size:clamp(104px,24dvh,184px);--roster-width:clamp(110px,14vw,180px);--hud-edge:8px}
body.mobile-device #hud #roster{max-height:min(24dvh,104px)}
body.mobile-device #hud .rider-row{min-height:22px;height:22px;padding:2px 5px;gap:6px}
body.mobile-device #hud .rider-row span{font-size:11px}
body.mobile-device #hud .rider-row b{font-size:15px;min-width:18px}
body.mobile-device #hud .round{padding:4px 5px;gap:6px}
body.mobile-device #hud .round strong{font-size:20px}
body.mobile-device #hud .round span{font-size:9px}
body.mobile-device.spectating #hud .rider-row{height:44px;min-height:44px}
body.mobile-device #hud .abilities{top:max(8px,env(safe-area-inset-top));gap:10px}
body.mobile-device #hud .abilities button{width:48px;height:48px;padding:10px}
body.mobile-device #hud .hud-top{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top))}
body.mobile-device #pause{width:44px;height:44px;backdrop-filter:none}
body.mobile-device #hud #toast,body.mobile-device #room-notice{max-height:64px;overflow:hidden;overflow-wrap:anywhere}
body.mobile-device #hud #countdown{top:max(60px,calc(env(safe-area-inset-top) + 52px));font-size:36px}
body.mobile-device #hud #race-objective{font-size:10px;line-height:1.25;max-width:calc(100vw - var(--map-size) - var(--roster-width) - 48px);bottom:max(8px,env(safe-area-inset-bottom))}
body.mobile-device #hud #kill-feed{max-height:55px;overflow:hidden}
body.mobile-device #hud .kill-row{font-size:10px;padding:4px 5px}
body.mobile-device #hud #direction-controls,body.mobile-device #hud .brake-control,body.mobile-device #hud #gyro-center{bottom:max(42px,env(safe-area-inset-bottom))}
body.mobile-device #hud #direction-controls button{width:50px;height:50px}
body.mobile-device #hud .brake-control{width:48px;height:48px}
/* Death choices appear only after elimination, with no automatic spectating. */
body.mobile-device .overlay{padding:8px;backdrop-filter:none}
body.mobile-device .dialog{max-height:calc(100dvh - 16px);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
body.mobile-device .overlay:has(.result-dialog):not(:has(.final-leaderboard)){place-items:end center;background:linear-gradient(0deg,#06101966,transparent 42%);pointer-events:none;padding-bottom:max(8px,env(safe-area-inset-bottom))}
body.mobile-device .result-dialog:not(:has(.final-leaderboard)){width:min(400px,54vw);padding:12px;display:grid;grid-template-columns:1fr 1fr;gap:6px;background:#10212bf2;box-shadow:0 5px 24px #0005;pointer-events:auto}
body.mobile-device .result-dialog:not(:has(.final-leaderboard)) h2{grid-column:1/-1;margin:0;font:800 24px/1.1 Barlow,Impact,sans-serif;white-space:normal;text-align:center}
body.mobile-device .result-dialog:not(:has(.final-leaderboard)) .result-rank{grid-column:1/-1;font-size:11px!important;line-height:1.2;margin:0 0 3px!important;text-align:center}
body.mobile-device .result-dialog:not(:has(.final-leaderboard)) button{min-height:44px;margin:0;padding:8px;font-size:10px;letter-spacing:.3px;justify-content:center;gap:6px}
body.mobile-device .result-dialog #watch-riders{grid-column:1/-1;background:#d7eef0;color:#142730;border-color:#d7eef0}
body.mobile-device .result-dialog #again{background:#203541;color:#dde8ed}
body.mobile-device:has(#overlay:not([hidden]) .result-dialog) #hud :is(.abilities,#direction-controls,.brake-control,#gyro-center,#race-objective,#toast,#kill-feed,#countdown,#pause){display:none!important}
@media(max-width:700px) and (orientation:landscape){body.mobile-device #hud #race-objective{display:none}body.mobile-device #hud .abilities button{width:44px;height:44px;padding:8px}}
@media(prefers-reduced-motion:reduce){#loading,#hud .abilities button{transition:none}}

#hud .rider-row:disabled{pointer-events:none}

/* === CrazyGames QA Polish & Onboarding Fixes === */
.load-bar{width:180px;height:3px;background:#ffffff1f;border-radius:3px;overflow:hidden;margin:18px auto 0}
.load-bar i{display:block;width:45%;height:100%;background:linear-gradient(90deg,transparent,var(--cyan),#fff);animation:ton-load 1.1s ease-in-out infinite}
@keyframes ton-load{0%{transform:translateX(-110%)}100%{transform:translateX(260%)}}

/* Anchor left menu panel from top so switching tabs never causes vertical layout jumps */
.intro{top:clamp(92px,15vh,148px);transform:none}
@media(max-width:760px){.intro{top:max(76px,11vh);transform:none}}
@media(max-height:540px) and (orientation:landscape){.intro{top:max(54px,12vh);transform:none}}

/* Subtle keyboard control keycaps on menu and during countdown */
kbd{display:inline-block;padding:2px 5px;margin:0 1px;font:600 9px/1.2 Inter,Arial,sans-serif;color:#eef6fa;background:#1b313e;border:1px solid #8adee755;border-radius:4px;box-shadow:0 1px 0 #071018}
.menu-keys{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 12px;margin-top:14px;padding-top:12px;border-top:1px solid #b9d0df22;font-size:10px;color:#9eb3c0}
.menu-keys span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
body.mobile-device .menu-keys,@media(pointer:coarse){.menu-keys{display:none}}
@media(max-height:540px) and (orientation:landscape){.menu-keys{margin-top:8px;padding-top:8px;gap:5px 8px;font-size:8px}}


/* Prevent compatibility badge from colliding with #race-objective during gameplay */
body.playing .compatibility{top:max(10px,env(safe-area-inset-top));left:max(14px,env(safe-area-inset-left));bottom:auto;transform:none;border-radius:4px;opacity:.85}

/* Hide browser native video controls & polish preview framing */
#map-video{pointer-events:none;border:1px solid #8adee726}

/* Visual How to Play cards */
.help-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 18px}
.help-card{padding:10px 12px;background:#1a2d3a;border:1px solid #8adee726;border-radius:8px;font-size:11px;line-height:1.45;color:#b8c9d4}
.help-card b{display:block;font-size:9px;letter-spacing:1.2px;color:var(--cyan);margin-bottom:4px}
@media(max-width:480px){.help-cards{grid-template-columns:1fr}}

/* Play Online live searching indicator */
.room-searching{display:flex;align-items:center;gap:10px;margin:6px 0 12px;font:600 12px Inter,Arial,sans-serif;color:var(--cyan)}
.pulse-dot{width:9px;height:9px;border-radius:50%;background:var(--cyan);box-shadow:0 0 10px var(--cyan);animation:ton-pulse 1.2s ease-in-out infinite}
@keyframes ton-pulse{0%,100%{transform:scale(.85);opacity:.55}50%{transform:scale(1.2);opacity:1}}
.room-sub{font-size:11px!important;color:#8fa6b5!important;margin-top:4px!important}

/* Keep Game Over stats clean on both desktop and mobile */
.result-dialog .results-stats{margin:14px 0 18px;padding:12px 6px}
.result-dialog .results-stats>div{flex:1;text-align:center}
.result-dialog .results-stats b{font:800 22px/1.1 Barlow,Impact,sans-serif;color:var(--cyan)}
.result-dialog .results-stats span{display:block;margin-top:4px;font-size:8px;letter-spacing:1.2px;color:#93aab8}
body.mobile-device .result-dialog:not(:has(.final-leaderboard)) .results-stats{grid-column:1/-1;margin:4px 0 6px;padding:8px 4px}
body.mobile-device .result-dialog:not(:has(.final-leaderboard)) .results-stats b{font-size:17px}

/* CrazyGames Technical Requirement: prevent tablet/mobile double-tap zoom & selection menus */
html,body{-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
