/* IAA MOBILITY: a viewport-sized game surface, also inside an iframe. */
@font-face{font-family:Biotif;src:url('assets/fonts/Biotif-Book.woff2') format('woff2'),url('assets/fonts/Biotif-Book.woff') format('woff'),url('assets/fonts/Biotif-Book.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Biotif;src:url('assets/fonts/Biotif-Medium.woff2') format('woff2'),url('assets/fonts/Biotif-Medium.woff') format('woff'),url('assets/fonts/Biotif-Medium.ttf') format('truetype');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:Biotif;src:url('assets/fonts/Biotif-SemiBold.woff2') format('woff2'),url('assets/fonts/Biotif-SemiBold.woff') format('woff'),url('assets/fonts/Biotif-SemiBold.ttf') format('truetype');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:Biotif;src:url('assets/fonts/Biotif-Bold.woff2') format('woff2'),url('assets/fonts/Biotif-Bold.woff') format('woff'),url('assets/fonts/Biotif-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:Biotif;src:url('assets/fonts/Biotif-ExtraBold.woff2') format('woff2'),url('assets/fonts/Biotif-ExtraBold.woff') format('woff'),url('assets/fonts/Biotif-ExtraBold.ttf') format('truetype');font-weight:800;font-style:normal;font-display:swap}
@font-face{font-family:Biotif;src:url('assets/fonts/Biotif-Black.woff2') format('woff2'),url('assets/fonts/Biotif-Black.woff') format('woff'),url('assets/fonts/Biotif-Black.ttf') format('truetype');font-weight:900;font-style:normal;font-display:swap}
:root{font-family:Biotif,Arial,Helvetica,sans-serif;font-synthesis:none;--iaa-base:#132FC2;--iaa-glow:#0071FA;--iaa-light:#2ED1F7;--iaa-orange:#FF5100;--iaa-green:#30C0A2;--iaa-yellow:#FAB716;--iaa-dark:#041579;--iaa-red:#F03246;--iaa-gradient-blue:linear-gradient(30deg,#132FC2 50%,#0071FA 95%);--iaa-gradient-energy:linear-gradient(90deg,#30C0A2 5%,#2ED1F7 100%);--iaa-gradient-warm:linear-gradient(90deg,#FF5100 5%,#FAB716 100%);color:var(--iaa-dark);background:#a3ddef}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;touch-action:manipulation}
button:disabled{opacity:.45;cursor:default}
button:focus-visible,a:focus-visible{outline:3px solid var(--iaa-yellow);outline-offset:2px}
canvas:focus-visible{outline:3px solid var(--iaa-yellow);outline-offset:-3px}
[hidden]{display:none!important}
.cutscene{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#000;color:#fff;overflow:hidden}
.cutscene::backdrop{background:#000}
.cutscene video{display:block;width:100%;height:100%;object-fit:contain;background:#000}
.cutscene-actions{position:absolute;top:max(16px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));display:flex;justify-content:space-between;gap:12px;pointer-events:none}
.cutscene-actions button{pointer-events:auto;background:#132fc2e8;color:#fff;border:1px solid #ffffff80;min-height:44px;font-size:14px}
.cutscene-actions .secondary-button:hover{background:#0071fa}
.cutscene-message{position:absolute;left:16px;right:16px;top:50%;transform:translateY(-50%);text-align:center;pointer-events:none}
.cutscene-message p{display:inline-block;margin:0 0 12px;padding:10px 16px;background:#132fc2e8;border-radius:8px;font-size:16px}
.cutscene-message button{display:block;margin:auto;pointer-events:auto}
.game-shell{position:relative;isolation:isolate;display:flex;flex-direction:column;width:100%;height:100%;height:100dvh;min-width:0;overflow:hidden;background:#a3ddef}
.game-shell[data-level="5"]{background:#0c182c}
.game-stage{position:relative;flex:1;min-height:0;min-width:0;overflow:hidden}
canvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none}
/* Visual tokens are the uploaded IAA 2027 deck's theme1; gradients are native CSS. */
.hud{position:relative;z-index:5;flex:none;padding:12px max(20px,env(safe-area-inset-right)) 10px max(20px,env(safe-area-inset-left));background:var(--iaa-gradient-blue);color:#fff;border-bottom:0}
.hud-top{display:flex;align-items:center;gap:20px;min-width:0}
.hud-brand{display:flex;flex-direction:column;align-items:flex-start;gap:6px;flex:none}
.hud-brand-meta{display:flex;align-items:center;gap:7px;line-height:1.2}
.hud-brand>.hud-logo{position:relative;display:block;width:210px;aspect-ratio:4061/325;overflow:hidden;flex:none}
.hud-logo img{position:absolute;display:block;width:115.43955%;max-width:none;height:auto;left:-7.73209%;top:-96.61538%}
.hud-brand small{font-size:9px;font-weight:700;letter-spacing:.8px}
.player-label{max-width:100px;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:var(--iaa-light);white-space:nowrap}
.player-label:empty{display:none}
.hud-stats{display:flex;align-items:center;flex:1;min-width:0}
.hud-section{position:relative;min-width:0;flex:1;border-right:1px solid #ffffff26;padding:0 12px}
.hud-label{display:block;font-size:9px;font-weight:700;letter-spacing:1px;margin-bottom:5px;white-space:nowrap;color:#ffffffbf}
.hud-stats strong{font-size:23px;line-height:1.05;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.hud small{font-size:10px;color:#ffffffbf}
.hud-section.score{flex:1.2}.score strong{color:#fff}
.combo-badge{position:absolute;top:-4px;right:4px;display:none;background:var(--iaa-orange);color:#fff;font-style:normal;font-weight:800;font-size:11px;padding:3px 5px;border-radius:12px}
.combo-badge.on{display:block;animation:comboPop .22s ease-out}
@keyframes comboPop{from{transform:scale(.4)}to{transform:scale(1)}}
.timer strong{color:#fff}.timer>small{display:inline-block;margin-left:6px;color:var(--iaa-light);font-weight:700}
.timer.urgent strong{color:var(--iaa-yellow)}.timer.urgent{box-shadow:inset 3px 0 var(--iaa-orange)}
.hearts strong{display:flex;gap:2px;font-size:21px}.heart.full{color:#ff8391}.heart.empty{color:#ffffff40}
.secrets strong{display:flex;align-items:center;gap:5px;font-size:18px;color:var(--iaa-yellow)}
.liaa-coin-slots{display:flex;gap:2px;align-items:center}.liaa-coin-slots img{width:16px;height:16px;object-fit:contain;opacity:.3;filter:grayscale(1)}.liaa-coin-slots img.collected{opacity:1;filter:none}
.enemies strong{font-size:20px;color:#fff}.route{flex:1.15;border:0}.progress{height:5px;background:#ffffff26;margin-top:12px;border-radius:0}.progress i{display:block;height:100%;width:0;background:var(--iaa-gradient-energy);border-radius:0}
.hud-actions{display:flex;gap:5px;flex:none;align-items:center}
.utility,.hud-button{border:1px solid #ffffff40;background:transparent;color:#fff;border-radius:0;height:30px;padding:0 8px;font-size:11px;font-weight:700;white-space:nowrap}.hud-button{width:30px;padding:0;font-size:20px}
.audio-button{min-width:30px;padding:0 6px}.audio-button[aria-pressed="false"]{opacity:.6;text-decoration:line-through}.utility:hover,.hud-button:hover{background:#ffffff20}
.hud-tools{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin-top:10px;padding-top:10px;border-top:1px solid #ffffff25;min-width:0}
.boost-controls{display:flex;align-items:center;gap:12px;flex:1;min-width:0;margin:0}
.boost-meter{width:200px;min-width:130px;flex:none}.boost-heading{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:5px}.boost-heading>strong{font-size:9px;font-weight:700;letter-spacing:1px}.boost-heading b{font-size:14px;font-variant-numeric:tabular-nums}.boost-heading small{font-size:10px}
.boost-track{height:10px;background:#04157975;box-shadow:inset 0 0 0 1px #ffffff30;position:relative;overflow:hidden}
.boost-track i{display:block;width:0;height:100%;background:var(--iaa-gradient-energy);transition:width .18s ease-out;position:relative}
.boost-ready .boost-track{outline:1px solid #ffffffb0;outline-offset:2px;animation:boostReadyPulse 1.2s ease-in-out infinite}
.boost-active .boost-track{outline:1px solid var(--iaa-yellow);outline-offset:2px}
@keyframes boostReadyPulse{0%,100%{opacity:1;box-shadow:0 0 12px #2ed1f745}50%{opacity:.5;box-shadow:0 0 0 #2ed1f700}}
.boost-button{border:1px solid #ffffff50;border-radius:0;padding:8px 12px;background:#ffffff0a;color:#fff;font-weight:700;font-size:11px;white-space:nowrap;min-width:94px;min-height:33px}
.boost-button:disabled{opacity:.5}.boost-button:not(:disabled){background:var(--iaa-gradient-energy);border-color:transparent;color:var(--iaa-dark)}.boost-button.boost-active{opacity:1;background:var(--iaa-gradient-warm);color:var(--iaa-dark);border-color:transparent}.boost-button:not(:disabled):hover{filter:brightness(1.1)}
.boost-info{display:flex;flex-direction:column;gap:4px;min-width:0}.boost-info small{display:block;font-size:10px}.boost-info #boost-status{font-weight:700;letter-spacing:.2px;color:#fff}#boost-effect{color:var(--iaa-light)}
.controls{display:flex;gap:12px;align-items:center;margin-left:auto;font-size:10px;color:#ffffffba}.controls>span{display:flex;align-items:center;gap:4px;white-space:nowrap}.controls kbd{font-family:inherit;border:1px solid #ffffff40;padding:2px 4px;min-width:17px;text-align:center;font-size:10px}
.overlay{position:absolute;inset:0;z-index:2;overflow:auto;display:flex;align-items:safe center;gap:6%;padding:38px 6%;background:var(--iaa-gradient-blue);color:#fff}
.overlay.hidden{display:none}.overlay:not(.hidden)~.touch-controls,.overlay:not(.hidden)~.world-label{display:none}
.overlay[data-view="intro"]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.95fr);align-content:safe center}
.start-card{max-width:620px;min-width:0;width:100%;position:relative;z-index:1}
.eyebrow{color:var(--iaa-base);font-size:11px;letter-spacing:1px;font-weight:700}.overlay .eyebrow{color:var(--iaa-light)}
.start-card h1,.start-card h2{font-size:clamp(34px,4.2vw,64px);letter-spacing:-1.8px;line-height:1.02;margin:18px 0 22px;font-weight:700}
.start-card p,.level-description{font-size:15px;line-height:1.5;max-width:510px;margin:0 0 16px;color:#fff}.start-card .level-mission{color:#ffffffc4;font-size:13px;line-height:1.5}
.level-facts{display:grid;grid-template-columns:1fr 1.25fr;gap:14px 16px;margin:22px 0;padding:17px 0;border-top:1px solid #ffffff35;border-bottom:1px solid #ffffff35}.level-facts>div:last-child{grid-column:1/-1}.level-facts dt{font-size:9px;letter-spacing:1px;font-weight:700;color:#ffffffad}.level-facts dd{margin:4px 0 0;font-size:14px;font-weight:700}
.level-goal{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;margin-bottom:20px}.level-goal>span{font-size:28px;line-height:.6;color:var(--iaa-yellow)}
.level-start-actions{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.primary{border:0;background:var(--iaa-gradient-blue);border-radius:0;color:#fff;padding:14px 20px;font-size:15px;font-weight:700;min-width:180px;box-shadow:none}.primary span{margin-left:22px;font-size:22px;line-height:.7}.primary:hover{filter:brightness(1.1)}
.overlay .primary{background:#fff;color:var(--iaa-base)}.start-scores{border:0;background:transparent;color:var(--iaa-base);padding:10px 0;font-size:13px;font-weight:700}.overlay .start-scores{color:#fff}
.start-hint{font-size:9px;letter-spacing:.6px;color:#ffffffa8;margin-top:18px}
.level-art{position:relative;align-self:stretch;min-height:390px;max-height:560px;overflow:hidden;background:linear-gradient(180deg,#ffffff0e,transparent);isolation:isolate}
.level-art-heading{position:absolute;left:22px;right:22px;top:22px;z-index:3}.level-art-heading>span{display:block;font-size:10px;letter-spacing:1px;font-weight:700;color:#ffffffb0}.level-art-heading>strong{display:block;font-size:clamp(34px,4.8vw,64px);line-height:1;font-weight:700;letter-spacing:-2px;margin-top:8px}
.level-landscape{position:absolute;left:0;right:0;bottom:62px;width:100%;height:46%;object-fit:cover;object-position:center}
.level-chevron{position:absolute;inset:29% 7% 23% 7%;background:var(--iaa-gradient-warm);clip-path:polygon(0 0,24% 0,48% 50%,24% 100%,0 100%,24% 50%,0 0,52% 0,76% 0,100% 50%,76% 100%,52% 100%,76% 50%,52% 0);opacity:.85;z-index:1}
.level-hero{position:absolute;right:2%;bottom:70px;width:78%;height:65%;object-fit:contain;z-index:2;filter:drop-shadow(0 14px 16px #04157955)}
.level-hero-vehicle{width:96%;right:2%;height:59%}.level-hero-super{aspect-ratio:706/758;width:62%;height:auto;bottom:75px;right:7%;overflow:hidden;filter:drop-shadow(0 12px 18px #04157960)}.level-hero-super img{position:absolute;width:251.2748%;max-width:none;left:-7.3654%;top:-8.4433%}
.level-art-footer{position:absolute;left:0;right:0;bottom:0;min-height:62px;display:flex;flex-direction:column;justify-content:center;gap:5px;padding:14px 20px;background:var(--iaa-gradient-energy);color:var(--iaa-dark);z-index:3}.level-art-footer>span{font-size:11px}.level-art-footer b{font-size:11px;font-weight:700;letter-spacing:.5px}
.notice{position:absolute;top:14px;left:50%;transform:translateX(-50%);border-left:4px solid var(--iaa-orange);border-radius:3px;background:var(--iaa-dark);color:#fff;font-size:14px;padding:10px 16px;z-index:4;opacity:0;transition:opacity .2s;pointer-events:none;text-align:center;max-width:90%;width:max-content}
.notice.show{opacity:1}
.world-label{position:absolute;bottom:18px;left:max(18px,env(safe-area-inset-left));display:flex;gap:12px;align-items:center;color:#fff;pointer-events:none;text-shadow:0 1px 5px #15245760}
.world-label>span{font-size:32px;font-weight:800;opacity:.55}
.world-label>div{font-weight:800;font-size:18px}
.world-label small{display:block;font-size:11px;letter-spacing:1px;margin-top:4px;font-weight:500}
.touch-controls{display:none;position:absolute;bottom:max(10px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));justify-content:space-between;pointer-events:none;z-index:4}
.touch-controls>div{display:flex;gap:7px}
.touch-controls button{pointer-events:auto;touch-action:none;user-select:none;border:1px solid #ffffff88;color:#fff;background:#142762b8;border-radius:7px;min-width:44px;height:48px;font-size:14px;font-weight:700;padding:8px}
.touch-controls button:active{background:var(--iaa-glow)}
.touch-controls .boost-button{min-width:58px;font-size:12px;background:var(--iaa-base);border-color:var(--iaa-light)}
.touch-controls .boost-active{background:var(--iaa-yellow);color:var(--iaa-dark)}
.story-overlay{background:var(--iaa-gradient-blue);padding:30px 6%;align-items:safe center}
.story-overlay .start-card{max-width:700px;margin:auto;width:100%}
.story-overlay .start-card h2{font-size:34px;letter-spacing:-1px;margin:5px 0 15px}
.story-overlay .start-card p{max-width:none;font-size:14px;line-height:1.5;margin-bottom:16px}
.story-art{display:block;float:right;width:40%;height:210px;object-fit:cover;object-position:center 44%;border-radius:5px;margin:0 0 10px 22px}
.story-copy{display:block;margin-bottom:12px;font-size:14px;line-height:1.45}
.result-score{font-size:36px;color:#fff;font-weight:700}
.time-calculation{display:block;background:#ffffff12;border-left:3px solid var(--iaa-yellow);padding:10px;margin:10px 0;font-weight:800;color:#fff;font-variant-numeric:tabular-nums}
.game-dialog{border:2px solid var(--iaa-base);border-radius:5px;padding:28px;color:var(--iaa-dark);background:#fff;max-width:calc(100% - 24px);max-height:calc(100% - 24px);overflow:auto;box-shadow:0 20px 80px #26103f50}
.game-dialog::backdrop{background:#26103fbf}
.game-dialog h2{font-size:34px;letter-spacing:-1px;margin:8px 0 15px}
.game-dialog p,.game-dialog li,.game-dialog dd{font-size:14px;line-height:1.5}
.player-dialog{width:430px}
.player-dialog label{display:block;font-size:12px;letter-spacing:1.5px;font-weight:800;margin-top:24px}
.player-dialog input{display:block;width:100%;padding:13px 15px;border:2px solid #132fc240;border-radius:4px;margin-top:8px;font:700 20px Biotif,Arial,sans-serif;color:var(--iaa-dark);background:#f5f7ff}
.player-dialog input:focus{outline:2px solid var(--iaa-glow);outline-offset:2px}
.form-error{color:var(--iaa-red);min-height:20px;margin:8px 0}
.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}
.dialog-actions .primary{min-width:0;padding:13px 18px}
.secondary-button{border:1px solid var(--iaa-base);padding:10px 14px;border-radius:3px;background:#fff;color:var(--iaa-base);font-size:13px;font-weight:800}
.secondary-button:hover{background:#edf3ff}
.scores-dialog{width:690px}
.dialog-heading{display:flex;justify-content:space-between;align-items:start;gap:12px}
.dialog-close{border:0;background:#132fc210;color:var(--iaa-base);font-size:25px;min-width:36px;height:36px;border-radius:4px}
.score-table-wrap{overflow:auto}
.score-table{width:100%;border-collapse:collapse;font-size:14px}
.score-table th{text-align:left;padding:12px 10px;background:var(--iaa-base);color:#fff;font-size:11px;letter-spacing:.7px;white-space:nowrap}
.score-table td{padding:12px 10px;border-bottom:1px solid #132fc218;white-space:nowrap}
.score-table td:nth-child(2){font-weight:800;max-width:190px;overflow:hidden;text-overflow:ellipsis}
.score-table td:nth-child(3){color:var(--iaa-base);font-weight:900;text-align:right;font-variant-numeric:tabular-nums}
.score-table th:nth-child(3){text-align:right}
.score-table tr:nth-child(-n+3) td:first-child{color:#a26c00;font-weight:900}
.score-table tr.your-score{background:#fab71625}
.your-best{font-weight:800;color:var(--iaa-base)}
.game-dialog .score-note{font-size:12px;color:#626779}
.score-save-panel{border-top:1px solid #132fc230;margin-top:15px;padding-top:10px}
.score-save-panel p{font-size:14px;margin:0 0 8px}
.score-actions{display:flex;gap:8px}
.help-dialog{width:820px}
.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 28px;margin-bottom:20px}
.help-grid h3{color:var(--iaa-base);font-size:18px;margin:12px 0}
.help-grid ul{padding-left:20px}
.help-grid li{margin:5px 0}
.help-keys{display:grid;grid-template-columns:112px 1fr;gap:8px 12px}
.help-keys dt{font-size:13px;font-weight:800;color:var(--iaa-base)}
.help-keys dd{margin:0}
#level-select,#scores-level {font:700 12px Biotif,Arial,sans-serif;color:#fff;background:#132fc2;border:1px solid #ffffff55;padding:7px;border-radius:5px;max-width:130px;}
.super-panel {display:flex;align-items:center;gap:8px;color:#FAB716;font-size:11px;white-space:nowrap}.super-panel[hidden]{display:none}.super-panel .progress{width:85px}.super-panel .progress i{background:#FAB716}.super-panel.urgent{color:#FF5100}.super-panel b{font-size:18px;min-width:45px}@media(max-width:800px){.super-panel{font-size:9px}.super-panel .progress{display:none}.hud-tools{flex-wrap:wrap;gap:7px}#level-select{max-width:94px;font-size:10px}}

.repair-panel{display:flex;align-items:center;gap:8px;color:#FAB716;white-space:nowrap;font-size:12px}.repair-panel[hidden]{display:none}.repair-panel small{color:#fff;font-size:11px}.hud-tools{flex-wrap:wrap}.repair-panel b{color:#fff}@media(max-width:900px){.repair-panel small{display:none}.repair-panel{font-size:11px}.repair-panel .utility{font-size:11px}}

@media(max-width:420px){.touch-controls>div{gap:4px}.touch-controls button{font-size:11px;padding:7px 6px;min-width:35px}.touch-controls .boost-button{min-width:48px}}

.mission-panel{display:flex;flex-direction:column;gap:3px;border-left:3px solid var(--iaa-orange);padding-left:9px;font-size:11px;color:#fff}.mission-panel strong{color:var(--iaa-yellow);letter-spacing:.4px}.mission-panel[hidden]{display:none}.mission-panel span{font-size:10px;max-width:260px}
.rescue-art{float:right;position:relative;width:220px;height:202px;overflow:hidden;margin:0 0 10px 18px}.rescue-art img{position:absolute;width:675.84px;max-width:none;height:450.56px;left:-406.12px;top:-235.4px}@media(max-width:720px){.mission-panel{width:100%;flex-direction:row;align-items:center;gap:10px}.mission-panel span{max-width:none;flex:1;font-size:9px}.rescue-art{float:none;margin:0 auto 12px}}

/* On narrow screens the ground is close to the controls. Keep the district
   label above the action, so it cannot cover Liaa or a landing surface. */
@media(max-width:720px){.world-label{top:12px;bottom:auto;left:12px;gap:8px}.world-label>span{font-size:24px}.world-label>div{font-size:14px}.world-label small{font-size:9px}.notice{top:64px}}

/* A real ten-second shutdown deadline, separate from the level clock. */
.shutdown-countdown{position:absolute;z-index:2;top:14px;left:50%;transform:translateX(-50%);width:220px;padding:10px 14px;border:2px solid #2ed1f7;border-radius:12px;background:#102343ed;color:#e6fbff;text-align:center;pointer-events:none;box-shadow:0 4px 24px #08152680;font-size:12px;font-weight:bold}
.shutdown-countdown strong{display:flex;justify-content:center;align-items:baseline;gap:8px;margin:3px 0}
.shutdown-countdown b{font-size:40px;line-height:1; font-variant-numeric:tabular-nums}
.shutdown-countdown small{font-size:11px;color:#8ddde9}
.shutdown-time-track{height:4px;background:#28536b;border-radius:4px;overflow:hidden;margin:6px 0}
.shutdown-time-track i{display:block;height:100%;width:100%;background:#2ed1f7}
.shutdown-instruction{font-size:10px;letter-spacing:.3px}
.shutdown-countdown.urgent{border-color:#ff735c;color:#ffe5d9;background:#491d2bed}
.shutdown-countdown.urgent .shutdown-time-track i{background:#ff735c}
@media(max-width:600px){.shutdown-countdown{top:8px;width:174px;padding:7px 10px;font-size:10px}.shutdown-countdown b{font-size:30px}.shutdown-countdown small{font-size:9px}.shutdown-instruction{font-size:9px}}

/* IAA 27 UI breakpoints: the stage keeps the remaining iframe space. */
#level-select{border-radius:0;background:#ffffff0a;max-width:120px;font-size:10px;padding:6px}
#scores-level{border-radius:0}
.game-dialog{border:0;border-radius:0;color:var(--iaa-dark);box-shadow:0 20px 80px #04157960}
.game-dialog::backdrop{background:#041579b5}.game-dialog h2{font-weight:700}.dialog-close,.secondary-button,.player-dialog input{border-radius:0}
.game-dialog .eyebrow{color:var(--iaa-base)}
.mission-panel{border-color:var(--iaa-orange)}.mission-panel strong{color:#fff}.mission-panel span{color:#ffffffb5}
.repair-panel .utility{border-radius:0}.super-panel .progress{margin:0}
.overlay .time-calculation{color:#fff}
.start-card h1,.start-card h2{font-size:clamp(34px,4vw,56px);margin:16px 0 18px}
.level-facts{grid-template-columns:1fr 1.2fr 1.4fr;gap:14px;margin:16px 0;padding:12px 0}.level-facts>div:last-child{grid-column:auto}.level-facts dd{font-size:12px;line-height:1.3}
@media(max-width:1540px){.route,.controls{display:none}.hud-top{gap:14px}.hud-section{padding:0 10px}.hud-brand>.hud-logo{width:185px}.hud-actions .audio-button{font-size:0;width:28px;padding:0}.hud-actions #music::before{content:'♫';font-size:17px}.hud-actions #sound::before{content:'SFX';font-size:9px}}
@media(max-width:1140px){.hud{padding:10px 16px}.hud-top{flex-wrap:wrap;gap:10px}.hud-brand{margin-right:auto;flex-direction:row;align-items:center;gap:12px}.hud-brand-meta{flex-direction:column;align-items:flex-start;gap:3px}.hud-stats{order:3;flex-basis:100%}.hud-section:first-child{padding-left:0}.hud-section:last-child{border:0}.hud-tools{margin-top:8px;padding-top:8px}.boost-meter{width:190px}.boost-controls{flex:1}.mission-panel span{max-width:200px}.overlay{padding:28px 5%;gap:5%}.level-art{min-height:360px}.hud-stats strong{font-size:20px}.enemies strong,.secrets strong{font-size:17px}}
@media(max-height:760px) and (min-width:721px){.overlay{padding:24px 5%}.start-card h1,.start-card h2{font-size:40px;letter-spacing:-1px;margin:12px 0 16px}.start-card p{font-size:14px;line-height:1.4;margin-bottom:12px}.start-card .level-mission{font-size:12px;line-height:1.4}.level-facts{margin:12px 0;padding:10px 0}.level-facts dt{font-size:8px}.level-facts dd{font-size:11px}.level-goal{font-size:12px;margin-bottom:16px}.level-art{min-height:320px}.level-art-heading>strong{font-size:44px}.start-hint{margin-top:14px}}
@media(max-width:720px){.hud{padding:8px 10px}.hud-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 6px}.hud-brand{display:block;margin:0}.hud-brand>.hud-logo{width:96px}.hud-brand-meta{display:none}.hud-stats{grid-column:1/-1;width:100%;order:3}.hud-section{padding:0 6px}.hud-label{font-size:8px;letter-spacing:.5px;margin-bottom:5px}.hud-stats strong{font-size:18px}.timer>small{margin-left:4px;font-size:9px}.hearts strong{font-size:17px}.secrets strong{font-size:13px;gap:4px}.liaa-coin-slots img{width:12px;height:12px}.enemies strong{font-size:16px}.hud-actions{gap:3px}.hud-actions .utility{font-size:9px;padding:0 5px;height:26px}.hud-actions .hud-button{width:24px;height:26px;font-size:17px}.hud-actions .audio-button{width:24px;min-width:24px;font-size:0;padding:0}.hud-actions #music::before{font-size:15px}.hud-actions #sound::before{font-size:8px}#level-select{max-width:74px;font-size:9px;padding:5px 3px}#scores-open{font-size:9px;padding:0 4px}.hud-tools{gap:7px;margin-top:8px;padding-top:8px}.boost-controls{gap:10px;flex-wrap:wrap;width:100%;flex:none}.boost-meter{flex:1;width:auto;min-width:130px}.boost-button{min-height:30px;min-width:87px;padding:7px 10px}.boost-heading>strong{font-size:9px}.boost-track{height:9px}.boost-info{flex-direction:row;justify-content:space-between;gap:8px;width:100%}.boost-info #boost-status,.boost-info #boost-effect{font-size:9px}.mission-panel{width:100%;flex-direction:row;align-items:center;gap:8px;font-size:9px}.mission-panel span{font-size:8px;max-width:none}.repair-panel{font-size:10px}.repair-panel .utility{font-size:10px;height:27px}.super-panel{font-size:9px}.super-panel b{font-size:14px;min-width:38px}.super-panel .progress{display:none}.overlay,.overlay[data-view="intro"]{display:flex;flex-direction:column;align-items:stretch;justify-content:safe center;padding:22px;gap:22px}.start-card{max-width:none;flex:none}.start-card h1,.start-card h2{font-size:36px;letter-spacing:-1px;margin:12px 0 16px}.start-card p{font-size:14px;line-height:1.45}.start-card .level-mission{font-size:12px}.level-facts{grid-template-columns:1fr 1fr;gap:12px}.level-facts>div:last-child{grid-column:1/-1}.level-facts dd{font-size:12px}.level-art{order:-1;align-self:stretch;flex:none;min-height:130px;height:130px;max-height:130px}.level-art-heading{top:17px;left:16px;right:auto;max-width:55%}.level-art-heading>strong{font-size:34px;letter-spacing:-1px}.level-art-heading>span{font-size:8px}.level-landscape{left:40%;width:60%;height:100%;bottom:0;opacity:.65}.level-chevron{inset:20% 2% 0 44%}.level-hero{right:2%;bottom:0;width:47%;height:125px}.level-hero-vehicle{right:0;width:58%;height:108px}.level-hero-super{width:30%;height:auto;bottom:0;right:6%}.level-art-footer{display:none}.level-start-actions{gap:18px}.primary{min-width:160px;padding:12px 16px;font-size:14px}.start-hint{display:none}.start-scores{font-size:12px}.story-overlay .start-card h2{font-size:30px}.story-art{float:none;width:100%;height:150px;margin:0 0 14px}.help-grid{grid-template-columns:1fr;gap:0}.game-dialog{padding:22px}.game-dialog h2{font-size:29px}.notice{font-size:12px}.touch-controls{display:flex}.score-table th,.score-table td{padding:10px 7px}}
@media(max-width:370px){.hud-brand>.hud-logo{width:80px}.hud{padding:7px 8px}.hud-label{font-size:7px}.hud-stats strong{font-size:16px}.hud-section{padding:0 4px}.timer>small{font-size:8px}.hearts strong{font-size:15px}.secrets strong{font-size:12px}.liaa-coin-slots img{width:10px;height:10px}.overlay{padding:18px}.start-card h1,.start-card h2{font-size:31px}.level-art-heading>strong{font-size:29px}.boost-info #boost-effect{font-size:8px}}
@media(pointer:coarse){.touch-controls{display:flex}.world-label{bottom:78px}.start-hint{display:none}.hud-actions .utility,.hud-actions .hud-button{min-height:32px}}
@media(max-height:550px) and (min-width:721px){.hud{padding:6px 12px}.hud-top{flex-wrap:nowrap;gap:8px}.hud-brand{display:none}.hud-stats{order:0;flex-basis:auto}.hud-section{padding:0 5px}.hud-label{font-size:8px;margin-bottom:4px}.hud-stats strong{font-size:17px}.hearts strong{font-size:16px}.secrets strong{font-size:13px}.liaa-coin-slots img{width:11px;height:11px}.timer>small{font-size:9px}.hud-actions{gap:3px}.hud-actions .utility{font-size:9px;padding:0 5px;height:27px}.hud-actions .hud-button{width:26px;height:27px}.hud-tools{margin-top:6px;padding-top:6px;gap:8px}.boost-meter{width:150px}.boost-button{min-height:29px;min-width:85px;padding:6px 8px;font-size:10px}.boost-info small{font-size:9px}.overlay{padding:16px 5%;gap:5%}.start-card h1,.start-card h2{font-size:29px;margin:8px 0 12px}.start-card p{font-size:12px;margin-bottom:10px}.start-card .level-mission{font-size:11px}.level-facts{margin:10px 0;padding:8px 0}.level-facts dd{font-size:10px}.level-goal{font-size:11px;margin-bottom:12px}.level-art{min-height:260px}.level-art-heading{top:16px;left:16px}.level-art-heading>strong{font-size:34px}.level-art-footer{min-height:47px;padding:9px 14px}.level-art-footer b,.level-art-footer>span{font-size:9px}.level-landscape{bottom:47px}.level-hero{bottom:51px}.level-hero-super{bottom:51px}.primary{padding:10px 16px;font-size:13px}.start-hint{display:none}.story-overlay .start-card h2{font-size:27px}.story-art{height:140px}.touch-controls button{height:40px}.world-label small{display:none}}
@media(max-height:550px) and (max-width:720px){.hud{padding-top:5px;padding-bottom:5px}.hud-top{gap:5px}.hud-tools{margin-top:5px;padding-top:5px}.hud-label{margin-bottom:3px}.overlay{padding:18px}.level-art{display:none}.start-card h1,.start-card h2{font-size:29px}.start-card p{font-size:12px}.level-facts{margin:12px 0}}
@media(prefers-reduced-motion:reduce){.boost-ready .boost-track{animation:none;box-shadow:0 0 0 2px #2ed1f770}.boost-track i,.notice{transition:none}.combo-badge.on{animation:none}}
/* Native vector chevrons retain crisp edges at every iframe size. */
.level-chevron{clip-path:none;width:86%;height:48%;object-fit:fill}
.hud-actions>button{flex:none;display:inline-flex;align-items:center;justify-content:center}
@media(max-width:720px){.overlay,.overlay[data-view="intro"]{padding:20px;gap:18px}.level-art{height:110px;min-height:110px;max-height:110px}.level-art-heading>strong{font-size:31px}.level-hero{height:108px}.level-hero-vehicle{height:94px}.level-hero-super{height:auto}.level-chevron{width:54%;height:80%}.start-card h1,.start-card h2{font-size:32px;margin:10px 0 12px}.start-card p{font-size:13px;line-height:1.4;margin-bottom:12px}.start-card .level-mission{font-size:12px}.level-facts{grid-template-columns:1fr 1.15fr 1.2fr;gap:10px;margin:12px 0;padding:10px 0}.level-facts>div:last-child{grid-column:auto}.level-facts dt{font-size:8px;letter-spacing:.5px}.level-facts dd{font-size:11px}.level-goal{font-size:12px;margin-bottom:16px}}
@media(max-height:550px) and (min-width:721px){.overlay[data-view="intro"]{display:block}.overlay[data-view="intro"] .level-art,.overlay[data-view="intro"] .level-facts{display:none}.overlay[data-view="intro"] .start-card{max-width:780px}.level-chevron{height:48%}.start-card .level-story{margin-bottom:8px}.level-start-actions{gap:20px}}
.level-hero-super{height:65%;aspect-ratio:auto;overflow:hidden}
@media(max-width:720px){.level-hero-super{height:108px;width:36%}}
/* This must follow the chapter and responsive display rules. */
.overlay.hidden{display:none}
.hud-actions #scores-open{width:62px;padding:0 5px}
.level-start-actions .primary{display:inline-flex;align-items:center;justify-content:space-between;gap:20px;min-width:190px}
.level-start-actions .primary span{margin-left:0}
@media(max-width:720px){.hud-actions #scores-open{width:41px;padding:0 4px}.level-start-actions .primary{min-width:160px}}
/* Keep the game visible after Play regardless of the chapter layout. */
.overlay.hidden{display:none}
.level-chevron{background:transparent}
@media(max-width:720px){.hud-top{display:flex;flex-wrap:wrap}.hud-brand{flex:none;width:96px}.hud-actions{flex:none;margin-left:auto}.hud-stats{flex:0 0 100%;width:100%}}
@media(max-width:370px){.hud-brand{width:80px}}

/* Native select menus can ignore inherited colors (notably on Windows). */
#level-select,#scores-level,#title-level{color-scheme:light;color:#041579;background-color:#fff;border:1px solid #fff}
#level-select option,#scores-level option,#title-level option{color:#041579;background-color:#fff}
#level-select:focus-visible,#scores-level:focus-visible,#title-level:focus-visible{outline:3px solid #FAB716;outline-offset:2px}

/* Phones in landscape: the two-row HUD used 30% of the screen height. Slim it down and keep the world label out of the play field. */
@media (orientation:landscape) and (max-height:480px){
 .hud{padding:3px 10px 4px}
 .hud-top{gap:6px;flex-wrap:nowrap}
 .hud-brand{display:none}
 .hud-section{padding:0 6px}
 .hud-label{font-size:7px;margin-bottom:1px;letter-spacing:.4px}
 .hud-stats strong{font-size:14px}
 .hud-stats .timer>small{font-size:8px}
 .liaa-coin-slots img{width:10px;height:10px}
 .hud-actions{gap:3px}
 .hud-actions .utility,.hud-actions .hud-button{height:24px;min-height:24px;font-size:9px;padding:0 5px}
 .hud-actions .hud-button{width:26px}
 .hud-actions .audio-button{font-size:0;width:26px;min-width:26px;padding:0}
 #level-select{max-width:96px;font-size:9px;padding:3px 3px}
 .hud-tools{margin-top:2px;padding-top:3px;gap:8px;flex-wrap:nowrap}
 .boost-controls{gap:8px;flex-wrap:nowrap;width:auto}
 .boost-heading strong{display:none}
 .boost-meter{width:110px}
 .boost-button{min-height:22px;padding:2px 8px;font-size:9px}
 .boost-info #boost-effect,.controls{display:none}
 .boost-info #boost-status{font-size:8px}
 .boost-meter{display:flex;align-items:center;gap:6px;width:150px}
 .boost-heading{margin:0}
 .boost-track{flex:1;height:8px}
 .notice{font-size:12px;padding:6px 12px;top:8px;max-width:70%}
 .world-label{display:none}
}

/* Level 5: the shutdown countdown owns the top centre. Hints go to the bottom so they never hide the seconds left. */
.game-shell[data-level="5"] .notice{top:auto;bottom:74px;max-width:80%}
@media(max-width:720px){.game-shell[data-level="5"] .notice{top:auto;bottom:88px}}

/* Result card: the Hi-Score list sits right above Continue. */
.result-board-title{margin:0 0 8px;font-size:12px;letter-spacing:1.2px;color:inherit}
.result-board .score-table-wrap{max-height:320px;overflow:auto;border-radius:10px;background:#fff;color:var(--iaa-dark)}
.result-board .score-table td,.result-board .score-table th{padding:7px 10px;font-size:13px}
.result-board p{margin:0 0 6px;font-size:13px}
.result-score-table tr.your-score{background:#fab71640;box-shadow:inset 3px 0 0 #fab716}
.result-score-table tr.board-gap td{text-align:center;color:#6a7aa8;padding:2px 10px;border-bottom:0}
.score-save-panel{margin-bottom:14px}

/* Controller focus is visible even when the browser last saw pointer input. */
.using-gamepad :is(button,input,select,textarea):focus{outline:3px solid #fab716;outline-offset:3px}
.controller-status{font-size:11px;line-height:1.4;color:#b9f6ed;margin:8px 0 5px}
.controller-keyboard{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px;margin:16px 0 20px}
.controller-keyboard button{min-height:37px;min-width:0;padding:7px 0;border:1px solid #132fc238;border-radius:9px;background:linear-gradient(135deg,#50bfa4,#55c9e8);color:#041579;font:700 14px Biotif,sans-serif}
.controller-keyboard button:nth-last-child(-n+2){font-size:11px}
.controller-keyboard button:hover{filter:brightness(1.08)}

.controller-dialog{max-width:640px;width:calc(100% - 32px);max-height:calc(100dvh - 32px);overflow:auto;border-radius:24px}
.controller-dialog #controller-detail-status{padding:14px 16px;border-radius:14px;background:linear-gradient(120deg,#50bfa430,#55c9e838);color:#10287a;font-weight:700}
.controller-readings{display:grid;grid-template-columns:120px minmax(0,1fr);gap:8px 14px;margin:22px 0;padding:16px;background:#eff3fa;border-radius:14px}
.controller-readings dt{font-weight:700}.controller-readings dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.controller-dialog select{display:block;width:100%;margin:8px 0 20px;padding:12px;border:1px solid #132fc240;border-radius:12px;color:#132fc2;background:#fff;font:inherit}
.controller-dialog .secondary-button{display:inline-block;text-decoration:none}.controller-dialog p{line-height:1.5}
@media(max-width:480px){.controller-readings{grid-template-columns:1fr}.controller-readings dt{margin-top:5px}.controller-dialog{padding:20px}}

#timer-panel.surf-paused{background:linear-gradient(110deg,#50bfa433,#53c6d544,#55c9e833);border-radius:12px;box-shadow:inset 0 0 0 2px #50bfa4}#timer-panel.surf-paused #timer{color:#132fc2}#timer-panel.surf-paused .hud-label{color:#155f66}
/* ===== HUD v2: IAA MOBILITY glass panels over the play field =====
   #hud2 is a 1280x650 design plane (the canvas height) scaled to the stage by game.js (--hud-k, --hud-w). */
#hud2{--navy:#041579;--blue:#132FC2;--glow:#0071FA;--cyan:#2ED1F7;--teal:#30C0A2;--orange:#FF5100;--yellow:#FAB716;--red:#F03246;--ice:#cfe3ff;
 position:absolute;left:0;top:0;z-index:1;width:var(--hud-w,1280px);height:var(--hud-h,650px);transform:scale(var(--hud-k,1));transform-origin:0 0;pointer-events:none;color:#fff;font-family:Biotif,Arial,Helvetica,sans-serif}
#hud2 *{box-sizing:border-box}
#hud2 .abs{position:absolute}
#hud2 button{pointer-events:auto}
#hud2 strong{font-weight:inherit}
#hud2 .glass{position:relative;background:linear-gradient(100deg,rgba(4,21,121,.94),rgba(19,47,194,.86) 58%,rgba(0,113,250,.74));
  border:1.5px solid rgba(46,209,247,.85);border-radius:4px;
  box-shadow:0 10px 26px rgba(2,8,60,.5),inset 0 1px 0 rgba(255,255,255,.3),inset 0 -12px 20px rgba(4,21,121,.35)}
#hud2 .sk{transform:skewX(-18deg)}
#hud2 .sk>.un,#hud2 .un{transform:skewX(18deg)}
#hud2 .cap{font-weight:800;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--ice)}
#hud2 .kbd{display:inline-grid;place-items:center;min-width:26px;height:26px;padding:0 7px;border-radius:6px;background:linear-gradient(180deg,#fff,#cfe0ff);
  color:var(--navy);font-weight:800;font-size:13px;line-height:1;box-shadow:0 3px 0 #6f8fe6,0 5px 8px rgba(2,10,60,.4)}
#hud2 .c-time{display:flex;flex-direction:column;gap:8px;width:300px}
#hud2 .c-time .row{display:flex;align-items:flex-end;gap:14px}
#hud2 .c-time .digits{font-weight:900;font-size:68px;line-height:.86;letter-spacing:1px;font-variant-numeric:tabular-nums;
  /* solid fill: gradient text with background-clip:text rendered as a filled block in some browsers */
  color:#FAB716;text-shadow:0 3px 0 rgba(4,21,121,.85),0 0 16px rgba(250,183,22,.45)}
#hud2 .c-time .meta{display:flex;flex-direction:column;gap:2px;padding-bottom:3px}
#hud2 .c-time .meta b{font-weight:900;font-size:22px;line-height:1;color:#fff;text-shadow:0 2px 0 rgba(4,21,121,.8)}
#hud2 .c-time .meta small{font-weight:600;font-size:10px;letter-spacing:.12em;color:var(--ice);text-transform:uppercase}
#hud2 .c-time .track{position:relative;height:10px;background:rgba(4,21,121,.75);border:1.5px solid rgba(46,209,247,.7);transform:skewX(-18deg);overflow:hidden}
#hud2 .c-time .track i{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#FF5100,#FAB716);box-shadow:0 0 12px rgba(250,183,22,.7)}
#hud2 .c-time.warn .digits{color:#FF6A1F;text-shadow:0 3px 0 rgba(4,21,121,.85),0 0 16px rgba(255,81,0,.5)}
#hud2 .c-time.urgent .digits{color:#FF4458;text-shadow:0 3px 0 rgba(4,21,121,.85),0 0 16px rgba(240,50,70,.6);animation:hxCrit .7s ease-in-out infinite alternate}
#hud2 .c-time.urgent .track i{background:linear-gradient(90deg,#B0001C,#F03246)}
@keyframes hxCrit{from{transform:scale(1)}to{transform:scale(1.05)}}
#hud2 .c-life{position:relative;width:340px;height:76px}
#hud2 .c-life .bar{position:absolute;left:0;top:0;width:340px;height:42px;padding:6px 14px 6px 22px;display:flex;align-items:center;gap:8px}
#hud2 .c-life .cell{flex:1;height:26px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.2);background:rgba(4,21,121,.65)}
#hud2 .c-life .cell svg{width:20px;height:20px;transform:skewX(18deg);fill:rgba(255,255,255,.14);stroke:rgba(255,255,255,.4);stroke-width:1.5}
#hud2 .c-life .cell.is-full{background:linear-gradient(90deg,#F03246,#FF5100);border-color:rgba(255,200,170,.9);box-shadow:0 0 14px rgba(240,50,70,.55),inset 0 1px 0 rgba(255,255,255,.4)}
#hud2 .c-life .cell.is-full svg{fill:#fff;stroke:none}
#hud2 .c-life .cell.is-hit{animation:hxHit .5s steps(2) infinite}
@keyframes hxHit{50%{opacity:.25}}
#hud2 .c-life .name{position:absolute;left:44px;top:34px;height:22px;padding:0 18px;display:flex;align-items:center;background:var(--navy);
  border:1.5px solid rgba(46,209,247,.85);font-weight:800;font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:#fff}
#hud2 .c-life .line{position:absolute;left:0;top:64px;width:340px;display:flex;align-items:center;gap:10px;font-weight:800;font-size:11px;letter-spacing:.2em;color:var(--ice)}
#hud2 .c-life .line i{flex:1;height:2px;background:linear-gradient(90deg,rgba(46,209,247,.9),rgba(46,209,247,.15))}
#hud2 .c-life .line u{width:14px;height:2px;background:rgba(46,209,247,.5);display:inline-block}
#hud2 .c-score{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
#hud2 .c-score .num{font-weight:900;font-size:58px;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:.5px;
  text-shadow:0 3px 0 rgba(4,21,121,.8),0 0 24px rgba(46,209,247,.35)}
#hud2 .c-score .num small{font-size:16px;font-weight:800;letter-spacing:.14em;margin-left:8px;color:var(--cyan);text-shadow:none}
#hud2 .combo{display:inline-flex;align-items:center;gap:8px;height:28px;padding:0 14px;background:linear-gradient(90deg,#FF5100,#FAB716);border:1.5px solid rgba(255,255,255,.7);
  box-shadow:0 0 16px rgba(255,81,0,.6)}
#hud2 .combo b{font-weight:900;font-size:17px;color:#fff;text-shadow:0 1px 0 rgba(120,30,0,.7)}
#hud2 .combo span{font-weight:800;font-size:10px;letter-spacing:.16em;color:#fff3d6}
#hud2 .combo-bar{position:relative;width:100%;height:4px;margin-top:4px;background:rgba(4,21,121,.7);overflow:hidden}
#hud2 .combo-bar i{position:absolute;left:0;top:0;bottom:0;background:#FAB716}
#hud2 .c-chips{display:flex;align-items:center;gap:10px}
#hud2 .coin{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(4,21,121,.75);border:1.5px solid rgba(255,255,255,.3)}
#hud2 .coin img{width:26px;height:26px;object-fit:contain}
#hud2 .coin.off img{filter:grayscale(1) brightness(.45)}
#hud2 .coin.on{border-color:var(--yellow);box-shadow:0 0 14px rgba(250,183,22,.7)}
#hud2 .chip{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 16px}
#hud2 .chip svg{width:16px;height:16px;stroke:var(--cyan);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#hud2 .chip b{font-weight:900;font-size:16px;font-variant-numeric:tabular-nums}
#hud2 .chip small{font-weight:700;font-size:10px;letter-spacing:.14em;color:var(--ice)}
#hud2 .c-btns{display:flex;gap:8px}
#hud2 .ibtn{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(160deg,rgba(19,47,194,.92),rgba(4,21,121,.92));
  border:1.5px solid rgba(46,209,247,.8);box-shadow:0 6px 14px rgba(2,8,60,.45),inset 0 1px 0 rgba(255,255,255,.3)}
#hud2 .ibtn svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
#hud2 .ibtn.is-off svg{stroke:rgba(255,255,255,.4)}
#hud2 .ibtn.is-off{border-color:rgba(255,255,255,.25)}
#hud2 .c-mission{width:540px}
#hud2 .c-mission .glass{padding:9px 28px 10px 34px}
#hud2 .c-mission .top{display:flex;align-items:center;justify-content:space-between;gap:14px}
#hud2 .c-mission .chapter{font-weight:800;font-size:11px;letter-spacing:.2em;color:var(--cyan);text-transform:uppercase}
#hud2 .c-mission .depth{display:inline-flex;align-items:center;gap:6px;height:20px;padding:0 10px;background:rgba(46,209,247,.16);border:1px solid rgba(46,209,247,.7);
  font-weight:800;font-size:11px;letter-spacing:.1em;color:#fff}
#hud2 .c-mission .depth svg{width:11px;height:11px;stroke:var(--cyan);fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
#hud2 .c-mission .goal{margin-top:4px;font-weight:800;font-size:17px;letter-spacing:.04em;text-transform:uppercase;line-height:1.15;text-shadow:0 2px 0 rgba(4,21,121,.7)}
#hud2 .c-mission.is-alert .glass{border-color:rgba(255,160,90,.95);background:linear-gradient(100deg,rgba(120,20,10,.94),rgba(200,60,20,.84) 58%,rgba(255,120,30,.72))}
#hud2 .c-mission.is-alert .chapter{color:#FFD9A8}
#hud2 .c-route{position:relative;height:8px;background:rgba(4,21,121,.75);border-bottom:1px solid rgba(46,209,247,.5)}
#hud2 .c-route .fill{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#30C0A2,#2ED1F7 55%,#0071FA);box-shadow:0 0 12px rgba(46,209,247,.8)}
#hud2 .c-route .tick{position:absolute;top:0;bottom:0;width:2px;background:rgba(255,255,255,.5)}
#hud2 .c-route .dot{position:absolute;top:-5px;width:18px;height:18px;margin-left:-9px;border-radius:50%;background:var(--orange);border:2.5px solid #fff;box-shadow:0 0 14px rgba(255,81,0,.85)}
#hud2 .c-boost{position:relative;width:560px;height:104px}
#hud2 .c-boost .key{position:absolute;left:0;top:18px;width:62px;height:62px;border-radius:14px;display:grid;place-items:center;
  background:linear-gradient(160deg,rgba(19,47,194,.95),rgba(4,21,121,.95));border:2px solid rgba(46,209,247,.85);
  font-weight:900;font-size:28px;color:var(--ice);box-shadow:0 8px 18px rgba(2,8,60,.5),inset 0 1px 0 rgba(255,255,255,.3)}
#hud2 .c-boost .key small{position:absolute;bottom:5px;font-weight:800;font-size:8px;letter-spacing:.18em;color:var(--cyan)}
#hud2 .c-boost .body{position:absolute;left:78px;top:0;width:482px;height:104px;padding:10px 26px 10px 30px}
#hud2 .c-boost .head{display:flex;align-items:baseline;justify-content:space-between}
#hud2 .c-boost .head .t{font-weight:900;font-size:15px;letter-spacing:.16em}
#hud2 .c-boost .head .n{font-weight:900;font-size:26px;line-height:1;font-variant-numeric:tabular-nums}
#hud2 .c-boost .head .n i{font-style:normal;font-weight:700;font-size:14px;color:var(--ice);margin-left:2px}
#hud2 .c-boost .cells{display:flex;gap:6px;margin-top:6px}
#hud2 .bcell{flex:1;height:24px;border:1px solid rgba(255,255,255,.22);background:rgba(4,21,121,.7)}
#hud2 .bcell.on{background:linear-gradient(180deg,#7EE9FF,#2ED1F7 45%,#0071FA);border-color:rgba(214,247,255,.95);box-shadow:0 0 12px rgba(46,209,247,.7),inset 0 1px 0 rgba(255,255,255,.65)}
#hud2 .bcell.hot{background:linear-gradient(180deg,#FFE08A,#FAB716 45%,#FF5100);border-color:rgba(255,236,200,.95);box-shadow:0 0 14px rgba(255,120,0,.8),inset 0 1px 0 rgba(255,255,255,.7)}
#hud2 .c-boost .foot{display:flex;justify-content:space-between;margin-top:8px;font-weight:700;font-size:10px;letter-spacing:.12em;color:var(--ice);text-transform:uppercase}
#hud2 .c-boost .foot b{color:#fff;font-weight:800}
#hud2 .c-boost .badge{position:absolute;right:30px;top:-12px;height:24px;padding:0 14px;display:flex;align-items:center;gap:6px;font-weight:900;font-size:12px;letter-spacing:.16em;color:#fff;
  background:linear-gradient(90deg,#FF5100,#FAB716);border:1.5px solid rgba(255,255,255,.85);box-shadow:0 0 16px rgba(255,120,0,.8)}
#hud2 .c-boost .badge svg{width:12px;height:12px;fill:#fff}
#hud2 .c-boost.boost-ready .key{background:linear-gradient(160deg,#FF5100,#FAB716);border-color:#fff;color:#fff;animation:hxReadyGlow 1s ease-in-out infinite alternate}
#hud2 .c-boost.boost-ready .key small{color:#fff}
#hud2 .c-boost.boost-ready .glass{border-color:rgba(255,236,180,.95);animation:hxReadyEdge 1s ease-in-out infinite alternate}
#hud2 .c-boost.boost-ready .bcell.on{animation:hxCellPulse 1s ease-in-out infinite alternate}
#hud2 .c-boost.boost-active .glass{border-color:rgba(255,190,90,.95)}
#hud2 .c-boost.boost-active .key{background:linear-gradient(160deg,#FAB716,#FF5100);border-color:#fff;color:#fff}
@keyframes hxReadyGlow{from{box-shadow:0 0 10px rgba(255,120,0,.5)}to{box-shadow:0 0 28px rgba(255,160,0,1)}}
@keyframes hxReadyEdge{from{box-shadow:0 10px 26px rgba(2,8,60,.5),0 0 8px rgba(255,200,90,.4)}to{box-shadow:0 10px 26px rgba(2,8,60,.5),0 0 22px rgba(255,200,90,.9)}}
@keyframes hxCellPulse{from{filter:brightness(1)}to{filter:brightness(1.35)}}
#hud2 .c-ride{display:flex;align-items:center;gap:10px}
#hud2 .ride{display:inline-flex;align-items:center;gap:10px;height:38px;padding:0 18px 0 16px}
#hud2 .ride svg{width:20px;height:20px;stroke:var(--cyan);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#hud2 .ride .cap{font-size:9px;letter-spacing:.18em;line-height:1}
#hud2 .ride b{display:block;font-weight:900;font-size:14px;letter-spacing:.08em;line-height:1.1}
#hud2 .ride.is-gadget{border-color:rgba(250,183,22,.95)}
#hud2 .ride.is-gadget svg{stroke:var(--yellow)}
#hud2 .fuel{position:relative;width:96px;height:8px;margin-top:4px;background:rgba(4,21,121,.8);border:1px solid rgba(46,209,247,.7)}
#hud2 .fuel i{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#30C0A2,#2ED1F7)}
#hud2 .fuel.is-low i{background:linear-gradient(90deg,#F03246,#FF5100)}
#hud2 .c-ring{display:flex;flex-direction:column;align-items:center;gap:6px;width:190px}
#hud2 .c-ring .disc{position:relative;width:108px;height:108px;border-radius:50%;background:radial-gradient(circle,rgba(4,21,121,.9) 55%,rgba(19,47,194,.55) 100%);
  box-shadow:0 8px 22px rgba(2,8,60,.55),0 0 0 2px rgba(46,209,247,.35)}
#hud2 .c-ring svg{position:absolute;left:0;top:0;width:108px;height:108px;transform:rotate(-90deg)}
#hud2 .c-ring .val{position:absolute;left:0;top:0;width:108px;height:108px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:900;font-size:26px;line-height:1}
#hud2 .c-ring .val small{font-weight:800;font-size:9px;letter-spacing:.16em;color:var(--cyan);margin-top:3px}
#hud2 .c-ring .lbl{font-weight:800;font-size:11px;letter-spacing:.16em;text-transform:uppercase;text-align:center;text-shadow:0 2px 0 rgba(4,21,121,.8)}
#hud2 .pips{display:flex;gap:6px}
#hud2 .pips i{width:30px;height:8px;transform:skewX(-18deg);background:rgba(4,21,121,.8);border:1px solid rgba(255,255,255,.35)}
#hud2 .pips i.on{background:linear-gradient(90deg,#30C0A2,#2ED1F7);border-color:#d6fff6;box-shadow:0 0 8px rgba(48,192,162,.8)}
#hud2 .c-gauge{position:relative;width:96px;height:360px}
#hud2 .c-gauge .tube{position:absolute;left:62px;top:0;width:20px;height:360px;border-radius:10px;background:rgba(4,21,121,.8);border:1.5px solid rgba(46,209,247,.8);overflow:hidden;box-shadow:0 8px 18px rgba(2,8,60,.5)}
#hud2 .c-gauge .water{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(180deg,rgba(120,230,255,.95),rgba(0,113,250,.95))}
#hud2 .c-gauge .water:before{content:"";position:absolute;left:0;right:0;top:-1px;height:3px;background:#fff;opacity:.9}
#hud2 .c-gauge .exit{position:absolute;left:54px;top:-2px;width:36px;height:4px;background:var(--teal);box-shadow:0 0 10px var(--teal)}
#hud2 .c-gauge .exit-l{position:absolute;right:42px;top:-8px;font-weight:800;font-size:10px;letter-spacing:.14em;color:#9ef4df;text-align:right}
#hud2 .c-gauge .liaa{position:absolute;left:61px;width:22px;height:22px;margin-top:-11px;border-radius:50%;background:var(--orange);border:3px solid #fff;box-shadow:0 0 14px rgba(255,81,0,.9)}
#hud2 .c-gauge .liaa-l{position:absolute;right:42px;margin-top:-10px;padding:2px 8px;font-weight:900;font-size:13px;white-space:nowrap;background:rgba(4,21,121,.9);border:1px solid rgba(46,209,247,.8)}
#hud2 .c-gauge .mark{position:absolute;right:42px;font-weight:700;font-size:9px;letter-spacing:.1em;color:rgba(207,227,255,.75);margin-top:-6px}
#hud2 .c-gauge .warn{position:absolute;right:42px;font-weight:900;font-size:11px;letter-spacing:.14em;color:#8fe9ff;margin-top:-8px;white-space:nowrap}
#hud2 .toast{display:inline-flex;align-items:center;gap:12px;padding:10px 24px 10px 14px;border-radius:999px;background:linear-gradient(100deg,rgba(4,21,121,.95),rgba(19,47,194,.9));
  border:1.5px solid rgba(46,209,247,.9);box-shadow:0 10px 24px rgba(2,8,60,.55),0 0 18px rgba(46,209,247,.35);font-weight:800;font-size:14px;letter-spacing:.04em}
#hud2 .toast .ic{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(160deg,#FAB716,#FF5100)}
#hud2 .toast .ic svg{width:15px;height:15px;stroke:#fff;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
/* --- placement (design units) --- */
#hud2 .hx-route{left:0;top:10px;width:100%}
#hud2 .hx-life-pos{left:28px;top:34px}
#hud2 .hx-time-pos{left:calc(50% - 150px);top:30px}
#hud2 .hx-score-pos{right:28px;top:30px;width:300px}
#hud2 .hx-coins-pos{right:28px;top:128px}
#hud2 .hx-defeated-pos{right:28px;top:172px}
#hud2 .hx-mission-pos{left:calc(50% - 150px);top:126px}
#hud2 .notice{position:absolute;left:calc(50% - 150px);top:206px;transform:none;max-width:470px;width:max-content;padding:10px 20px;border:1.5px solid rgba(46,209,247,.9);border-left-width:1.5px;border-radius:20px;background:linear-gradient(100deg,rgba(4,21,121,.95),rgba(19,47,194,.9));
 box-shadow:0 10px 24px rgba(2,8,60,.55),0 0 18px rgba(46,209,247,.35);font-weight:800;font-size:14px;line-height:1.3;letter-spacing:.02em;text-align:left;z-index:1;opacity:0;transition:opacity .2s;pointer-events:none}
#hud2 .notice.show{opacity:1}
#hud2 .hx-ring-pos{left:28px;top:204px}
#hud2 .hx-super-pos{left:28px;top:380px}
#hud2 .hx-gauge-pos{right:28px;top:236px}
#hud2 .hx-gadget-pos{left:28px;top:162px}
#hud2 .hx-ride-pos{left:28px;top:122px}
#hud2 .hx-boost-pos{left:28px;top:calc(var(--hud-h,650px) - 90px)}
#hud2 .hx-world-pos{position:absolute;left:auto;right:28px;bottom:50px;text-align:right;flex-direction:row-reverse}
#hud2 .world-label>span{font-size:26px}
#hud2 .world-label>div{font-size:15px}

/* --- lives: cells are rendered by game.js --- */
#hud2 .c-life{width:300px}#hud2 .c-life .bar,#hud2 .c-life .line{width:300px}
#hud2 .c-life .cell.is-hit{animation:hxHit .5s steps(2) infinite}
#hud2 .c-life .name .player-label{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#fff}
#hud2 .c-life .line{white-space:nowrap}
#hud2 .c-life .line .zone{min-width:0;overflow:hidden;text-overflow:ellipsis}
#hud2 .c-life .line i{min-width:12px}

/* --- time --- */
#hud2 .c-time.surf-paused .digits{color:#5ee0c0;text-shadow:0 3px 0 rgba(4,21,121,.85),0 0 16px rgba(48,192,162,.5)}
#hud2 .c-time .track i{transition:width .25s linear}

/* --- score, combo, coins --- */
#hud2 .c-score .num strong{font:inherit}
#hud2 .c-score .combo{display:none;font-style:normal;margin-top:4px;font-weight:900;font-size:17px;color:#fff}
#hud2 .c-score .combo.on{display:inline-flex}
#hud2 .c-score .combo::after{content:"COMBO";margin-left:8px;font-weight:800;font-size:10px;letter-spacing:.16em;color:#fff3d6;align-self:center}
#hud2 .c-score .combo-bar{width:120px}
#hud2 .c-score .combo-bar i{display:block;height:100%;width:0;background:#FAB716}
#hud2 .c-score .combo:not(.on)+.combo-bar{visibility:hidden}
#hud2 .liaa-coin-slots{display:flex;gap:10px;align-items:center}
#hud2 .liaa-coin-slots img{width:34px;height:34px;padding:4px;border-radius:50%;object-fit:contain;background:rgba(4,21,121,.75);border:1.5px solid rgba(255,255,255,.3);filter:grayscale(1) brightness(.45);opacity:1}
#hud2 .liaa-coin-slots img.collected{filter:none;border-color:var(--yellow);box-shadow:0 0 14px rgba(250,183,22,.7)}
#hud2 .chip strong{font-weight:900;font-size:16px;font-variant-numeric:tabular-nums;color:#fff}
#hud2 .chip .un{display:flex;align-items:center;gap:8px}
#hud2 .chip small,#hud2 .c-time small{color:var(--ice)}

/* --- mission --- */
#hud2 .c-mission{width:400px}
#hud2 .c-mission .glass{padding:8px 24px 9px 30px}
#hud2 .c-mission .goal{font-size:15px}
#hud2 .c-mission .chapter{font-size:10px}
#hud2 .c-mission[hidden],#hud2 [hidden]{display:none!important}
#hud2 .c-mission .depth b{font-weight:800}

/* --- repair ring --- */
#hud2 .c-ring{width:190px;align-items:flex-start}
#hud2 .c-ring .disc{width:96px;height:96px}
#hud2 .c-ring svg{width:96px;height:96px}
#hud2 .c-ring .val{width:96px;height:96px;font-size:23px}
#hud2 .c-ring #repair-ring{transition:stroke-dasharray .35s ease-out}
#hud2 .c-ring .lbl{text-align:left;max-width:190px;font-size:10px;line-height:1.25}
#hud2 .hx-repair{height:30px;padding:0 14px;border:1.5px solid rgba(46,209,247,.85);border-radius:4px;background:linear-gradient(160deg,rgba(19,47,194,.95),rgba(4,21,121,.95));color:#fff;font:800 11px/1 Biotif,Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase;cursor:pointer}
#hud2 .hx-repair:not(:disabled){background:linear-gradient(90deg,#FF5100,#FAB716);border-color:#fff}
#hud2 .hx-repair:disabled{opacity:.6}

/* --- Super Liaa (level 2) --- */
#hud2 .hx-super{padding:7px 20px 8px 24px;min-width:230px}
#hud2 .hx-super .un{display:flex;align-items:center;gap:10px;font-size:11px;letter-spacing:.1em;white-space:nowrap}
#hud2 .hx-super strong{font-weight:800;color:var(--yellow)}
#hud2 .hx-super b{font-weight:900;font-size:17px;min-width:44px;font-variant-numeric:tabular-nums}
#hud2 .hx-super .hx-super-bar{position:relative;width:70px;height:6px;background:rgba(4,21,121,.8);border:1px solid rgba(46,209,247,.7)}
#hud2 .hx-super .hx-super-bar i{position:absolute;left:0;top:0;bottom:0;width:0;background:var(--yellow)}
#hud2 .hx-super.urgent strong,#hud2 .hx-super.urgent b{color:var(--orange)}

/* --- depth gauge (level 4) --- */
#hud2 .c-gauge{height:330px}
#hud2 .c-gauge .tube{height:330px}
#hud2 .c-gauge .tube i{position:absolute;left:0;right:0;top:0;height:0;background:linear-gradient(180deg,rgba(46,209,247,.85),rgba(0,113,250,.95));transition:height .25s linear}
#hud2 .c-gauge .liaa{transition:top .25s linear}
#hud2 .c-gauge .liaa-l{transition:top .25s linear}
#hud2 .c-gauge .mark{top:auto;bottom:-4px;margin-top:0}

/* --- ride and gadget chips --- */
#hud2 .ride{height:34px;padding:0 16px 0 14px}
#hud2 .ride .un{display:flex;align-items:center;gap:10px}
#hud2 .ride b{font-size:13px;white-space:nowrap}
#hud2 #ride-chip[data-ride="foot"] .i-ride{display:none}
#hud2 #ride-chip:not([data-ride="foot"]) .i-foot{display:none}
#hud2 .fuel i{transition:width .2s linear}

/* --- boost: ten cells, one key --- */
#hud2 .c-boost{width:470px;height:82px}
#hud2 .c-boost .key{left:0;top:14px;width:56px;height:56px;padding:0;border-radius:12px;font-size:26px;line-height:1;cursor:pointer;min-width:0;min-height:0}
#hud2 .c-boost .key:disabled{opacity:.9}
#hud2 .c-boost .body{left:70px;top:0;width:400px;height:82px;padding:8px 24px 8px 28px}
#hud2 .c-boost .head .t{font-weight:900;font-size:13px;letter-spacing:.16em}
#hud2 .c-boost .head .n{font-size:22px}
#hud2 .c-boost .head .n b{font-weight:900}
#hud2 .c-boost .head .n small{font-size:12px;font-weight:700;color:var(--ice)}
#hud2 .c-boost .cells{display:block;position:relative;height:18px;margin-top:5px;background:rgba(4,21,121,.78);-webkit-mask:repeating-linear-gradient(90deg,#000 0 calc(10% - 5px),transparent calc(10% - 5px) 10%);mask:repeating-linear-gradient(90deg,#000 0 calc(10% - 5px),transparent calc(10% - 5px) 10%)}
#hud2 .c-boost .cells i{display:block;height:100%;width:0;background:linear-gradient(180deg,#7EE9FF,#2ED1F7 45%,#0071FA);transition:width .18s ease-out}
#hud2 .c-boost.boost-ready .cells i{background:linear-gradient(180deg,#FFE08A,#FAB716 45%,#FF5100);animation:hxCellPulse 1s ease-in-out infinite alternate}
#hud2 .c-boost.boost-active .cells i{background:linear-gradient(180deg,#FFE08A,#FAB716 45%,#FF5100)}
#hud2 .c-boost .foot{margin-top:6px;font-size:9.5px}
#hud2 .c-boost .badge{right:24px;top:-12px}
#hud2 .c-boost .badge svg{width:12px;height:12px;fill:#fff}


/* --- level 5: the shutdown countdown owns the top centre --- */
.game-shell[data-level="5"] .shutdown-countdown{top:calc(var(--hud-k,1)*204px)}
.game-shell[data-level="5"] #hud2 .notice{top:300px}

/* --- level 4 route rail: descent / climb --- */
#hud2 .c-route .tick.t25,#hud2 .c-route .tick.t75{display:block}
.game-shell[data-level="4"] #hud2 .c-route .tick.t25,.game-shell[data-level="4"] #hud2 .c-route .tick.t75{display:none}
.game-shell[data-level="4"] #hud2 .c-route .tick.t50{width:4px;background:#fff}
#hud2 .c-route .fill{display:block;width:0;transition:width .2s linear}
#hud2 .c-route .fill::after{content:"";position:absolute;right:-9px;top:-5px;width:18px;height:18px;border-radius:50%;background:var(--orange);border:2.5px solid #fff;box-shadow:0 0 14px rgba(255,81,0,.85)}
#hud2 .c-route{overflow:visible}

/* --- compact: phones and short landscape windows keep only what a thumb game needs --- */
#hud2[data-compact] .hx-mission-pos,#hud2[data-compact] .hx-gauge-pos,#hud2[data-compact] .hx-defeated-pos,#hud2[data-compact] .hx-world-pos,#hud2[data-compact] .hx-super-pos,#hud2[data-compact] .hx-gadget-pos,#hud2[data-compact] .c-boost .key,#hud2[data-compact] .c-boost .foot,#hud2[data-compact] .c-life .line,#hud2[data-compact] .c-life .name{display:none}
#hud2[data-compact] .hx-boost-pos{left:28px;top:128px}
#hud2[data-compact] .c-boost{width:340px;height:60px}
#hud2[data-compact] .c-boost .body{left:0;width:340px;height:60px}
#hud2[data-compact] .hx-ride-pos{left:28px;top:200px}
#hud2[data-compact] .hx-ring-pos{left:auto;right:28px;top:200px}
#hud2[data-compact] .hx-coins-pos{top:112px}
#hud2[data-compact] .notice{top:130px;left:calc(50% - 235px)}
@media(prefers-reduced-motion:reduce){#hud2 *{animation:none!important;transition:none!important}}

#hud2 .cap,#hud2 .c-time .meta small,#hud2 .c-score .num small{text-shadow:0 1px 3px rgba(2,8,60,.9),0 0 8px rgba(2,8,60,.6)}
#hud2 .c-life .line{padding:3px 10px 3px 0;background:linear-gradient(90deg,rgba(4,21,121,.78),rgba(4,21,121,.5) 70%,rgba(4,21,121,0));text-shadow:0 1px 2px rgba(2,8,60,.8)}
#hud2 .c-route .fill{min-width:12px}
#hud2 .world-label{text-shadow:0 2px 6px rgba(2,8,60,.85),0 0 12px rgba(2,8,60,.5)}
/* HUD v2 fixes: world label clears the depth gauge, level line never truncates */
#hud2 .hx-world-pos{right:132px}
#hud2 .c-life .line{width:auto;max-width:330px}
#hud2 .c-life .line .zone{overflow:visible;text-overflow:clip}
/* HUD v2 fixes: level 5 notice/mission, legacy bottom offsets */
#hud2 .notice{bottom:auto;height:auto}
.game-shell[data-level="5"] #hud2 .notice{top:318px;bottom:auto}
.game-shell[data-level="5"] #hud2 .c-mission{width:500px}
.game-shell[data-level="5"] #hud2 .c-mission .goal{font-size:14px;white-space:nowrap}

/* --- portrait phones: 420 unit plane, two rows on top, then boost / ride / ring --- */
#hud2[data-narrow] .hx-life-pos{left:12px;top:26px}
#hud2[data-narrow] .c-life,#hud2[data-narrow] .c-life .bar{width:176px}
#hud2[data-narrow] .hx-score-pos{right:12px;top:22px;width:210px}
#hud2[data-narrow] .c-score .num{font-size:40px}
#hud2[data-narrow] .c-score .num small{font-size:12px;margin-left:5px}
#hud2[data-narrow] .hx-time-pos{left:12px;top:84px}
#hud2[data-narrow] .c-time{width:210px;gap:6px}
#hud2[data-narrow] .c-time .cap{text-align:left!important;font-size:9px}
#hud2[data-narrow] .c-time .row{justify-content:flex-start!important;gap:10px}
#hud2[data-narrow] .c-time .digits{font-size:50px}
#hud2[data-narrow] .c-time .meta b{font-size:16px}
#hud2[data-narrow] .c-time .meta small{font-size:8px}
#hud2[data-narrow] .hx-coins-pos{right:12px;top:100px}
#hud2[data-narrow] .hx-boost-pos{left:12px;top:162px}
#hud2[data-narrow] .c-boost,#hud2[data-narrow] .c-boost .body{width:496px}
#hud2[data-narrow] .hx-ride-pos{left:12px;top:232px}
#hud2[data-narrow] .hx-ring-pos{left:auto;right:12px;top:226px}
#hud2[data-narrow] .notice{left:12px;top:312px;max-width:496px;font-size:13px}
.game-shell[data-level="5"] #hud2[data-narrow] .notice{top:420px}
@media(max-width:620px){.game-shell[data-level="5"] .shutdown-countdown{top:calc(var(--hud-k,1)*300px)}}
#hud2[data-narrow] .c-ring .lbl,#hud2[data-narrow] .c-ring .hx-repair{display:none}
#hud2[data-narrow] .notice{top:352px}
.game-shell[data-level="5"] #hud2 .notice{top:352px}
#hud2 .c-boost .foot{gap:14px;letter-spacing:.06em;white-space:nowrap}
#hud2 .c-boost .foot span:last-child{text-align:right;overflow:hidden;text-overflow:ellipsis}
/* portrait phones, tighter: leave as much of the level visible as possible */
#hud2[data-narrow] .hx-time-pos{top:70px}
#hud2[data-narrow] .c-time .digits{font-size:42px}
#hud2[data-narrow] .hx-coins-pos{top:84px}
#hud2[data-narrow] .hx-boost-pos{top:134px}
#hud2[data-narrow] .c-boost,#hud2[data-narrow] .c-boost .body{height:46px}
#hud2[data-narrow] .hx-ride-pos{top:190px}
#hud2[data-narrow] .hx-ring-pos{top:186px;transform:scale(.75);transform-origin:top right}
#hud2[data-narrow] .notice{top:272px}
.game-shell[data-level="5"] #hud2[data-narrow] .notice{top:352px}

/* --- HUD v2.2: continuous boost bar at the bottom right, clock never clipped --- */
#hud2 .hx-boost-pos{left:28px;right:auto;top:calc(var(--hud-h,650px) - 87px - 15px / var(--hud-k,1))}
#hud2:not([data-compact]) .c-boost{height:87px}
#hud2:not([data-compact]) .c-boost .body{height:87px;padding-bottom:13px}
#hud2 .hx-world-pos{left:auto;right:28px;text-align:right;flex-direction:row-reverse}
#hud2 .c-boost{--bw:348px}
#hud2[data-compact] .c-boost{--bw:288px}
#hud2[data-narrow] .c-boost{--bw:444px}
#hud2 .c-boost .cells{-webkit-mask:none;mask:none;height:16px;border-radius:8px;background:rgba(4,21,121,.8);box-shadow:inset 0 0 0 1.5px rgba(46,209,247,.55),inset 0 2px 5px rgba(2,8,60,.7);overflow:hidden}
#hud2 .c-boost .cells::after{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 1px),rgba(255,255,255,.22) calc(10% - 1px) 10%)}
#hud2 .c-boost .cells i{border-radius:8px;background:linear-gradient(90deg,#30C0A2,#2ED1F7 50%,#0071FA) 0 0/var(--bw) 100% no-repeat;box-shadow:0 0 12px rgba(46,209,247,.7),inset 0 1px 0 rgba(255,255,255,.55)}
#hud2 .c-boost.boost-ready .cells i{background:linear-gradient(90deg,#2ED1F7,#FAB716 55%,#FF5100) 0 0/var(--bw) 100% no-repeat;box-shadow:0 0 14px rgba(255,150,0,.85),inset 0 1px 0 rgba(255,255,255,.6)}
#hud2 .c-boost.boost-active .cells i{background:linear-gradient(90deg,#FAB716,#FF5100) 0 0/var(--bw) 100% no-repeat;box-shadow:0 0 14px rgba(255,120,0,.85)}
/* the clock keeps its full glyph height (gradient text is clipped to the line box) */
#hud2 .c-time .digits{line-height:1.1;padding-top:4px;margin-bottom:-4px}
#hud2 .hx-time-pos{top:34px}

/* --- Menu: the former top bar lives in a dialog that pauses the game --- */
.menu-fab{position:absolute;right:max(12px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));z-index:5;display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 14px 0 11px;border:1.5px solid rgba(255,255,255,.75);border-radius:19px;background:linear-gradient(135deg,rgba(19,47,194,.94),rgba(4,21,121,.94));color:#fff;font:800 11px Biotif,Arial,sans-serif;letter-spacing:.14em;box-shadow:0 4px 12px rgba(2,8,60,.5);cursor:pointer}
.menu-fab:hover{background:linear-gradient(135deg,#0071FA,#132fc2)}
.menu-fab:focus-visible{outline:3px solid #FAB716;outline-offset:3px}
.menu-ico{display:grid;gap:3px;width:16px}.menu-ico i{display:block;height:2px;border-radius:2px;background:#fff}
/* Pause menu follows the chapter chooser: one ordered list, large rows and clear focus. */
.menu-dialog{
 width:min(1040px,calc(100% - 32px));padding:28px 32px 32px;
 color:#fff;background:linear-gradient(30deg,#132fc2 50%,#0071fa 95%);
 max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;
}
.menu-dialog .dialog-heading{align-items:center;margin-bottom:24px}
.menu-brand{display:inline-block}
.menu-logo{position:relative;display:block;width:220px;aspect-ratio:4061/325;overflow:hidden}
.menu-dialog h2{font-size:clamp(32px,4vw,48px);font-weight:800;margin:18px 0 0;line-height:1.05}
.menu-dialog .dialog-close{background:#ffffff15;color:#fff;border:1px solid #ffffff66;min-width:44px;height:44px}
.menu-content{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:clamp(24px,4vw,56px);align-items:start}
.menu-actions{display:flex;flex-direction:column;gap:10px;min-width:0}
.menu-dialog .menu-btn{
 position:relative;display:flex;align-items:center;text-align:left;justify-content:flex-start;
 width:100%;min-height:56px;height:auto;min-width:0;padding:14px 52px 14px 18px;
 border:1px solid #ffffff55;border-radius:18px!important;background:#ffffff10;color:#fff;
 font:800 17px/1.25 Biotif,Arial,sans-serif;white-space:normal;overflow-wrap:anywhere;
 cursor:pointer;box-shadow:0 4px 0 #04157930;transition:transform .16s ease,filter .16s ease;
}
.menu-dialog .menu-btn::after{content:'↗';position:absolute;right:18px;top:50%;translate:0 -50%;font-size:23px}
.menu-dialog #menu-resume{background:linear-gradient(90deg,#30c0a2,#2ed1f7);color:#041579;font-size:19px}
.menu-dialog #menu-resume::after{content:'»'}
.menu-dialog #scores-open{background:linear-gradient(90deg,#ff5100,#fab716);color:#041579;font:800 17px/1.25 Biotif,Arial,sans-serif}
.menu-dialog #help-open{background:linear-gradient(90deg,#3471f7,#8bc6ff);color:#041579}
.menu-dialog #controller-open{background:linear-gradient(90deg,#9c79ea,#cfa6fd);color:#041579}
.menu-dialog #restart{border-color:#fab71699}
.menu-dialog .menu-btn:hover{filter:brightness(1.1)}
.menu-dialog :is(.menu-btn,.dialog-close,#level-select):focus-visible{outline:3px solid #fff;outline-offset:3px;box-shadow:0 6px 0 #04157955}
.menu-dialog .menu-btn:focus-visible{transform:translateX(4px)}
.menu-dialog .menu-btn.audio-button::before{content:none!important}
.menu-dialog .menu-btn.audio-button{text-decoration:none}
.menu-dialog .menu-btn[aria-pressed="false"]{opacity:.75}
.menu-level{display:flex;align-items:center;gap:14px;margin:2px 0;padding:10px 0}
.menu-level label{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#ffffffb5}
.menu-dialog .menu-level #level-select{flex:1;min-width:0;max-width:none;min-height:44px;font:700 14px/1.3 Biotif,Arial,sans-serif;padding:10px 12px;border:1px solid #ffffff66;color:#fff;background:#102ba4}
.menu-controls{margin:0;padding:20px;background:#04157940;border:1px solid #ffffff30;border-radius:20px}
.menu-controls h3{margin:0 0 18px;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:#2ed1f7}
.menu-keys{display:grid;grid-template-columns:minmax(110px,auto) minmax(0,1fr);gap:14px 16px;margin:0;align-items:center}
.menu-keys dt{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}.menu-dialog .menu-keys dd{margin:0;font-size:13px;line-height:1.4}.menu-keys small{font-size:11px;color:#ffffffa0}
.menu-keys .kbd{display:inline-grid;place-items:center;min-width:28px;min-height:28px;padding:4px 8px;border:1.5px solid #ffffff66;border-radius:7px;background:#fff;color:var(--iaa-base);font:800 12px/1.2 Biotif,Arial,sans-serif;box-shadow:0 2px 0 #04157980}
.menu-keys-pad .kbd{border-radius:14px}
.menu-controls .menu-keys-pad,.menu-controls h3 .menu-keys-pad{display:none}
.using-gamepad .menu-controls dl.menu-keys-pad{display:grid}.using-gamepad .menu-controls h3 .menu-keys-pad{display:inline}
.using-gamepad .menu-controls dl.menu-keys-keyboard,.using-gamepad .menu-controls h3 .menu-keys-keyboard{display:none}
.menu-dialog .menu-touch{margin:0;font-size:13px;color:#ffffffcf;display:none;line-height:1.6}
@media (max-width:720px),(pointer:coarse),(max-width:1024px) and (max-height:550px){.menu-dialog .menu-touch{display:block}}
@media(max-width:720px){
 .menu-dialog{width:calc(100% - 20px);max-width:none;max-height:calc(100dvh - 20px);padding:22px 18px}
 .menu-content{grid-template-columns:minmax(0,1fr);gap:24px}
 .menu-dialog .dialog-heading{margin-bottom:22px}.menu-logo{width:190px}
 .menu-dialog h2{font-size:34px;margin-top:16px}
 .menu-dialog .menu-btn{min-height:52px;font-size:16px;padding:13px 46px 13px 16px}
 .menu-dialog #scores-open{font-size:16px}
 .menu-controls{padding:18px 16px}.menu-keys{grid-template-columns:minmax(100px,auto) minmax(0,1fr);gap:12px}
}
@media(max-height:620px) and (min-width:721px){
 .menu-dialog{padding:18px 24px}.menu-dialog .dialog-heading{margin-bottom:16px}
 .menu-dialog h2{font-size:28px;margin-top:12px}.menu-logo{width:190px}
 .menu-actions{gap:7px}.menu-dialog .menu-btn{min-height:44px;padding-top:10px;padding-bottom:10px;font-size:15px}
 .menu-dialog #menu-resume{font-size:17px}.menu-dialog #scores-open{font-size:15px}
 .menu-level{padding:6px 0}.menu-controls{padding:16px}.menu-keys{gap:10px 12px}
}
/* the top-right score column makes room for the menu button */
#hud2 .hx-score-pos{top:46px}
/* phones: the menu button shrinks to an icon in the corner and the score steps left of it */
#hud2[data-compact]~.menu-fab,#hud2[data-narrow]~.menu-fab{width:34px;height:34px;padding:0;justify-content:center;border-radius:50%}
#hud2[data-compact]~.menu-fab .menu-fab-text,#hud2[data-narrow]~.menu-fab .menu-fab-text{display:none}
#hud2[data-compact] .hx-score-pos{top:30px;right:calc(54px / var(--hud-k,1))}
#hud2[data-narrow] .hx-score-pos{top:22px;right:calc(54px / var(--hud-k,1))}
/* Keep the underlying automatic-pause card out of the menu's backdrop. */
body:has(#menu-dialog[open]) #overlay[data-view="pause"]{visibility:hidden}
