*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#b8c2ca;font:15px system-ui,-apple-system,sans-serif;touch-action:none}button{font:inherit;color:#edf1e7;background:#293f45;border:1px solid #d1d8cc;border-radius:12px;padding:12px 18px;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.45}button[aria-pressed=true]{background:#6b702d}button:focus-visible{outline:3px solid #f1cc6a;outline-offset:3px}[hidden]{display:none!important}#game{position:absolute;top:0;right:0;bottom:0;left:0}#game canvas{display:block}#settings-open{position:absolute;left:16px;top:14px}#joystick{position:absolute;bottom:38px;left:30px;width:132px;height:132px;border:2px solid #d1d8cc;border-radius:50%;background:#e0e6dc33;display:flex;align-items:center;justify-content:center}#knob{width:56px;height:56px;background:#e3e8e2;border:1px solid #aeb8aa;border-radius:50%;pointer-events:none}.stick-label{position:absolute;bottom:-24px;color:#31473d;font-size:12px;pointer-events:none}.actions{position:absolute;bottom:30px;right:26px;display:flex;gap:12px;align-items:center}.actions button{height:88px;width:88px;border-radius:50%;font-size:17px}.overlay,#settings-panel{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#96a0a8dd;z-index:20}.overlay section,#settings-panel section{background:#e8ece6;color:#2d3d35;padding:24px;border-radius:18px;max-height:90vh;overflow:auto;width:480px;max-width:90vw}.overlay small{letter-spacing:2px;color:#748079}#settings-panel fieldset{border:0;padding:12px 0}#settings-panel label{display:inline-flex;align-items:center;gap:8px;margin:8px 12px 0 0}.quality-options label{display:flex!important}#settings-panel small{display:block;color:#728074;margin-top:3px;font-size:12px}#settings-panel footer{display:flex;justify-content:flex-end;gap:12px}#settings-error{color:#a93a2a}#landscape-notice{display:none;position:absolute;top:0;right:0;bottom:0;left:0;background:#273a39;color:white;z-index:50;align-content:center;text-align:center}@media(orientation:portrait){#landscape-notice{display:block}}@media(max-height:450px){#joystick{width:112px;height:112px;left:22px;bottom:28px}.actions{right:18px;bottom:24px;gap:8px}.actions button{min-width:68px;height:58px;padding:8px 12px}}

#bike-controls{position:absolute;right:26px;bottom:134px;display:flex;gap:8px}#bike-controls button{touch-action:none;user-select:none;height:58px;padding:10px 14px}#bike-hint{position:absolute;top:52px;right:24px;color:#fff;text-shadow:0 1px 3px #000;font-size:12px}#ride{font-size:15px}@media(max-height:450px){#bike-controls{bottom:96px;right:18px}#bike-controls button{height:48px;padding:8px}}

#destruction-controls{position:absolute;bottom:120px;right:calc(22px + var(--game-safe-right,0px));display:flex}#destruction-controls #break-forward{width:96px;height:96px;min-width:0;padding:0;border:0;border-radius:0;background:transparent url('assets/ui/dash-v1.png') center/88% 88% no-repeat;-webkit-tap-highlight-color:transparent}#break-forward:focus,#break-forward:focus-visible{outline:none;box-shadow:none}#break-forward:active{transform:scale(.94)}@media(max-height:450px){#destruction-controls{bottom:96px;right:calc(18px + var(--game-safe-right,0px))}#destruction-controls #break-forward{width:80px;height:80px}}

#flight-toggle{position:absolute;left:48px;bottom:208px;width:96px;height:96px;min-width:0;padding:0;border:0;border-radius:24px;background:transparent url('assets/ui/flight-v3.png') center/64% 64% no-repeat;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}#flight-toggle[aria-pressed=true]{background-color:transparent}#flight-toggle[data-flight-action=land]{background-image:url('assets/ui/landing-v3.png')}#flight-toggle:focus,#flight-toggle:focus-visible{outline:none;box-shadow:none}#flight-toggle:active{transform:scale(.94)}@media(max-height:450px){#flight-toggle{left:36px;bottom:164px;width:80px;height:80px;padding:0}}

#dash-lines,#dash-flash{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;opacity:0}#dash-lines{background:repeating-conic-gradient(from 7deg at 50% 45%,transparent 0deg 19deg,#e4f5ffb0 19.4deg 19.7deg,transparent 20deg);-webkit-mask-image:radial-gradient(ellipse,transparent 40%,#000 100%);mask-image:radial-gradient(ellipse,transparent 40%,#000 100%)}#dash-flash{background:#f8e6ca}#break-forward{touch-action:none;user-select:none}@media(prefers-reduced-motion:reduce){#dash-lines,#dash-flash{display:none}}

#highway-driving{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;border:0;z-index:100;background:#1b282b}

#vehicle-gears{position:fixed;right:150px;bottom:125px;z-index:10;color:#fff;text-align:center}#vehicle-gears[hidden]{display:none}.gear-buttons{display:flex;gap:5px;background:#243d42;padding:6px;border-radius:10px}.gear-buttons button{width:39px;height:43px;color:#eee;background:#344b50;border:1px solid #a3b0ad;border-radius:6px;font-size:18px}.gear-buttons .selected{background:#d2b25c;color:#152a30}#vehicle-gears small{font-size:11px}#vehicle-repair{display:block;margin:8px auto;background:#b44e39;color:white;border:1px solid white;border-radius:8px;padding:8px}#vehicle-repair[hidden]{display:none}

#vehicle-gears{right:26px;bottom:207px}.native-actions{display:flex;gap:5px;margin-bottom:5px}.native-actions button{padding:7px 10px;border-radius:7px;background:#304a50;color:#fff;border:1px solid #a3b0ad}@media(max-height:450px){#vehicle-gears{bottom:155px;right:18px}.gear-buttons button{height:32px;width:32px}.native-actions button{padding:4px 7px}}

#carry-vehicle{position:absolute;right:calc(22px + var(--game-safe-right,0px));bottom:220px;width:96px;height:96px;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:transparent url('assets/ui/lift-v2.png') center/88% 88% no-repeat;z-index:12;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}#carry-vehicle[data-carry-action=throw]{background-image:url('assets/ui/toss-v2.png')}#carry-vehicle:disabled{opacity:.45}#carry-vehicle[hidden]{display:none}#carry-vehicle:focus,#carry-vehicle:focus-visible{outline:none;box-shadow:none}#carry-vehicle:active{transform:scale(.94)}@media(max-height:450px){#carry-vehicle{right:calc(18px + var(--game-safe-right,0px));bottom:214px;width:80px;height:80px}}

#pursuer-counter{position:absolute;top:calc(14px + var(--game-safe-top,0px));right:calc(16px + var(--game-safe-right,0px));z-index:12;padding:9px 13px;border:1px solid #cbd6cb;border-radius:12px;background:#293f45e8;color:#edf1e7;font-size:14px;line-height:22px;pointer-events:none;user-select:none;font-variant-numeric:tabular-nums}#pursuer-count{color:#e9a39a;font-weight:700}@media(max-height:450px){#pursuer-counter{top:calc(8px + var(--game-safe-top,0px));right:calc(12px + var(--game-safe-right,0px));padding:5px 10px;font-size:13px}}

/* The whole game, including dynamically mounted driving UI, shares one logical viewport. */
#game-viewport{position:absolute;left:0;top:0;transform-origin:0 0;overflow:hidden;isolation:isolate}
#game-viewport #landscape-notice{display:none!important}
:root{--physical-safe-top:0px;--physical-safe-right:0px;--physical-safe-bottom:0px;--physical-safe-left:0px}
@supports(padding:env(safe-area-inset-top)){:root{--physical-safe-top:env(safe-area-inset-top,0px);--physical-safe-right:env(safe-area-inset-right,0px);--physical-safe-bottom:env(safe-area-inset-bottom,0px);--physical-safe-left:env(safe-area-inset-left,0px)}}
@supports(padding:max(0px,1px)){:root{--physical-safe-top:max(env(safe-area-inset-top,0px),var(--toy-safe-top,0px));--physical-safe-right:max(env(safe-area-inset-right,0px),var(--toy-safe-right,0px));--physical-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--toy-safe-bottom,0px));--physical-safe-left:max(env(safe-area-inset-left,0px),var(--toy-safe-left,0px))}}
@supports(padding:env(safe-area-inset-top)){html[data-rotated=true]{--physical-safe-top:env(safe-area-inset-right,0px);--physical-safe-right:env(safe-area-inset-bottom,0px);--physical-safe-bottom:env(safe-area-inset-left,0px);--physical-safe-left:env(safe-area-inset-top,0px)}}
@supports(padding:max(0px,1px)){html[data-rotated=true]{--physical-safe-top:max(env(safe-area-inset-right,0px),var(--toy-safe-right,0px));--physical-safe-right:max(env(safe-area-inset-bottom,0px),var(--toy-safe-bottom,0px));--physical-safe-bottom:max(env(safe-area-inset-left,0px),var(--toy-safe-left,0px));--physical-safe-left:max(env(safe-area-inset-top,0px),var(--toy-safe-top,0px))}}
#native-driving-ui{--app-height:var(--game-height);--safe-top:var(--game-safe-top);--safe-right:var(--game-safe-right);--safe-bottom:var(--game-safe-bottom);--safe-left:var(--game-safe-left)}
#settings-panel section,.overlay section{max-height:calc(var(--game-height,100vh) * .9)}
#game-viewport #native-driving-ui{--app-height:var(--game-height);--screen-width:var(--game-width);--safe-top:var(--game-safe-top);--safe-right:var(--game-safe-right);--safe-bottom:var(--game-safe-bottom);--safe-left:var(--game-safe-left)}
#game-viewport #native-driving-ui main{width:100%!important;height:100%!important;max-height:100%}

#map-open{position:absolute;top:calc(14px + var(--game-safe-top,0px));right:calc(150px + var(--game-safe-right,0px));padding:7px 15px;height:38px;z-index:12;font-size:14px}
#world-map-panel{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;background:#142729ed;padding:calc(12px + var(--game-safe-top,0px)) calc(12px + var(--game-safe-right,0px)) calc(12px + var(--game-safe-bottom,0px)) calc(12px + var(--game-safe-left,0px));display:flex;align-items:center;justify-content:center}
#world-map-panel section{display:flex;flex-direction:column;width:100%;max-width:1100px;height:100%;background:#253b3f;border:1px solid #8da49d;border-radius:14px;overflow:hidden;color:#edf1e2}
#world-map-panel header{display:flex;align-items:center;justify-content:space-between;padding:8px 14px;gap:12px}#world-map-title{font-size:18px;margin:0}
#world-map-panel button{min-height:34px;padding:6px 13px;border-radius:8px;font-size:13px}#world-map-panel button:focus-visible{outline:2px solid #f1cc6a}
.map-toolbar{display:flex;align-items:center;gap:8px;padding:0 14px 8px}.map-toolbar span{flex:1}.map-stage{position:relative;flex:1;min-height:0;background:#35483e;overflow:hidden}
#world-map-canvas{display:block;width:100%;height:100%;cursor:grab;touch-action:none}#world-map-canvas:active{cursor:grabbing}
#world-map-panel footer{display:flex;justify-content:space-between;gap:12px;padding:7px 14px;font-size:12px;line-height:18px;color:#d0d9c6}
@media(max-height:450px){#map-open{top:calc(8px + var(--game-safe-top,0px));height:34px}#world-map-panel{padding:calc(8px + var(--game-safe-top,0px)) calc(8px + var(--game-safe-right,0px)) calc(8px + var(--game-safe-bottom,0px)) calc(8px + var(--game-safe-left,0px))}#world-map-panel header{padding:5px 12px}.map-toolbar{padding-bottom:5px}#world-map-panel footer{padding:4px 12px;font-size:11px}}

#restroom-door-toggle{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(100px + var(--game-safe-bottom,0px));z-index:14;padding:12px 24px;font-size:17px;touch-action:manipulation}#restroom-door-toggle[hidden]{display:none}

/* v86: square transparent HUD art, shared sizing and touch targets. */
#settings-open,#map-open{width:56px;height:56px;min-width:0;padding:0;border:0;border-radius:0;background-color:transparent;background-position:center;background-size:contain;background-repeat:no-repeat;font-size:0;line-height:0;z-index:12;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
#settings-open{background-image:url('assets/ui/settings-v1.png')}
#map-open{background-image:url('assets/ui/map-v1.png')}
#settings-open:active,#map-open:active{transform:scale(.93)}
#settings-open:focus:not(:focus-visible),#map-open:focus:not(:focus-visible){outline:none;box-shadow:none}
@media(max-height:450px){#settings-open,#map-open{width:48px;height:48px}}

/* Generic interaction cutout; retain full action text for accessible naming. */
#ride,body[data-native-driving=true] .actions #ride{position:relative;width:88px;height:88px;min-width:0;min-height:0;padding:0;border:0;border-radius:0;font-size:0;line-height:0;background:transparent url('assets/ui/interact-v1.png') center top/68px 68px no-repeat;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
#ride::after{content:attr(title);position:absolute;left:0;right:0;bottom:2px;color:#f4f3e9;font-size:13px;line-height:18px;text-align:center;text-shadow:0 1px 3px #000,0 0 3px #000;pointer-events:none}
body[data-native-driving=true] .actions #ride{position:fixed}
#ride:active{transform:scale(.93)}
#ride:focus,#ride:focus-visible{outline:none;box-shadow:none}
@media(max-height:450px){#ride,body[data-native-driving=true] .actions #ride{width:72px;height:72px;background-size:54px 54px}#ride::after{font-size:12px;line-height:16px;bottom:0}}

#eye-laser{position:absolute;right:calc(130px + var(--game-safe-right,0px));bottom:220px;width:96px;height:96px;padding:0;border:0;border-radius:0;background:transparent url('assets/ui/eye-laser-v2.png') center/88% 88% no-repeat;touch-action:none;z-index:12;-webkit-tap-highlight-color:transparent}
#eye-laser[aria-pressed=true]{background-color:transparent;filter:drop-shadow(0 0 4px #ff5038);transform:scale(.94)}
#eye-laser:focus:not(:focus-visible){outline:none;box-shadow:none}
#laser-reticle{position:absolute;left:50%;top:50%;width:12px;height:12px;border:1px solid #ffbc99;border-radius:50%;box-shadow:0 0 3px #e64230;transform:translate(-50%,-50%);pointer-events:none;z-index:11}
@media(max-height:450px){#eye-laser{right:calc(110px + var(--game-safe-right,0px));bottom:214px;width:80px;height:80px}}

#actions-open{position:absolute;left:calc(16px + var(--game-safe-left,0px));top:calc(82px + var(--game-safe-top,0px));width:56px;height:56px;padding:0;border:0;border-radius:0;background:transparent url('assets/ui/actions-v1.png') center/contain no-repeat;z-index:12;-webkit-tap-highlight-color:transparent}
#actions-open[aria-expanded=true]{background-color:transparent}#actions-open:active{transform:scale(.93)}#actions-open:focus:not(:focus-visible){outline:none;box-shadow:none}
#emote-panel{position:absolute;top:calc(82px + var(--game-safe-top,0px));left:calc(82px + var(--game-safe-left,0px));width:200px;padding:12px;z-index:16;border:1px solid #cbd6cb;border-radius:14px;background:#293f45f5;box-shadow:0 5px 20px #0003;color:#edf1e7}#emote-panel>button{display:block;width:100%;margin-top:8px;padding:9px 12px;text-align:left}.emote-heading{display:flex;align-items:center;justify-content:space-between;font-weight:600}#emote-close{padding:0;width:28px;height:28px;font-size:22px;border:0;background:transparent}#emote-stop{font-size:12px;background:#1b2f34}#emote-hint{position:absolute;left:calc(20px + var(--game-safe-left,0px));top:calc(144px + var(--game-safe-top,0px));font-size:12px;color:#f4f3e9;text-shadow:0 1px 3px #000;z-index:12;pointer-events:none}
@media(max-height:450px){#actions-open{width:48px;height:48px;top:calc(72px + var(--game-safe-top,0px))}#emote-panel{top:calc(72px + var(--game-safe-top,0px));left:calc(74px + var(--game-safe-left,0px))}#emote-hint{top:calc(124px + var(--game-safe-top,0px))}}

#web-grapple{position:absolute;right:calc(130px + var(--game-safe-right,0px));bottom:220px;width:96px;height:96px;padding:0;border:0;border-radius:0;background:transparent url('assets/ui/web-grapple.svg') center/88% 88% no-repeat;touch-action:none;z-index:12;-webkit-tap-highlight-color:transparent}#web-grapple[aria-pressed=true]{background-color:transparent;filter:drop-shadow(0 0 3px #e5ebdf);transform:scale(.94)}#web-grapple:focus:not(:focus-visible){outline:none;box-shadow:none}#web-reticle{position:absolute;left:50%;top:50%;width:18px;height:18px;transform:translate(-50%,-50%);border:2px solid #f3e9d4;border-radius:50%;pointer-events:none;z-index:11;opacity:.65}#web-reticle[data-valid=true]{border-color:#b9efcf;opacity:1;box-shadow:0 0 5px #101b1b}#web-hint{position:absolute;left:50%;top:calc(80px + var(--game-safe-top,0px));transform:translateX(-50%);color:#fff;font-size:13px;text-shadow:0 1px 4px #000;pointer-events:none;z-index:12}@media(max-height:450px){#web-grapple{right:calc(110px + var(--game-safe-right,0px));bottom:214px;width:80px;height:80px}}

#hero-switch{position:absolute;left:calc(82px + var(--game-safe-left,0px));top:calc(14px + var(--game-safe-top,0px));width:64px;height:58px;padding:0;border:0;border-radius:0;background:transparent;z-index:13;-webkit-tap-highlight-color:transparent}.hero-role-art{display:block;width:46px;height:40px;margin:0 auto;background:transparent url('assets/ui/web-grapple.svg') center/contain no-repeat}#hero-role-label{display:block;color:#f2f0e5;font-size:12px;line-height:17px;text-shadow:0 1px 3px #000}.hero-switch-arrow{position:absolute;right:0;top:24px;font-size:16px;color:#f2f0e5;text-shadow:0 1px 3px #000}#hero-switch:active{transform:scale(.94)}#hero-switch:focus,#hero-switch:focus-visible{outline:none;box-shadow:none}html[data-hero-role=power] .hero-role-art{background-image:url('assets/ui/dash-v1.png')}html[data-hero-role=web] #eye-laser,html[data-hero-role=power] #web-grapple{display:none!important}@media(max-height:450px){#hero-switch{top:calc(8px + var(--game-safe-top,0px));left:calc(74px + var(--game-safe-left,0px));width:58px;height:52px}.hero-role-art{width:40px;height:35px}#hero-role-label{font-size:11px;line-height:15px}}

#web-hint{display:none!important}

/* Driving owns its HUD; hide walking skills even when their update loop is skipped. */
body[data-native-driving=true] #web-grapple,body[data-native-driving=true] #eye-laser,body[data-native-driving=true] #destruction-controls,body[data-native-driving=true] #actions-open,body[data-native-driving=true] #emote-panel,body[data-native-driving=true] #flight-toggle,body[data-native-driving=true] #carry-vehicle,body[data-native-driving=true] #jump{display:none!important}

#return-home{position:absolute;left:calc(16px + var(--game-safe-left,0px));top:calc(146px + var(--game-safe-top,0px));width:56px;height:56px;padding:0;border:0;border-radius:0;background:transparent;z-index:12;-webkit-tap-highlight-color:transparent}#return-home svg{width:100%;height:100%}#return-home:active{transform:scale(.93)}#return-home:focus:not(:focus-visible){outline:none}body[data-native-driving=true] #return-home{display:none!important}@media(max-height:450px){#return-home{top:calc(128px + var(--game-safe-top,0px));width:48px;height:48px}}

/* Vehicle utilities replace the on-foot actions/home area, below the fixed header. */
#game-viewport #native-driving-ui .driving-aux-dock{position:absolute;left:calc(16px + var(--game-safe-left,0px));top:calc(82px + var(--game-safe-top,0px));display:grid;grid-template-columns:repeat(2,56px);grid-auto-rows:56px;gap:8px;pointer-events:none;z-index:6}
#game-viewport #native-driving-ui .driving-aux-dock .aux-controls,#game-viewport #native-driving-ui .driving-aux-dock .road-light-controls{display:contents!important}
#game-viewport #native-driving-ui .driving-aux-dock .aux-controls>button,#game-viewport #native-driving-ui .driving-aux-dock .road-light-controls>button{position:relative!important;width:56px!important;height:56px!important;min-width:0;min-height:0;margin:0!important;padding:0;pointer-events:auto}
#game-viewport #native-driving-ui .driving-aux-dock .aux-controls>button:first-child{grid-column:1;grid-row:1}
#game-viewport #native-driving-ui .driving-aux-dock .aux-controls>button:nth-child(2){grid-column:2;grid-row:1}
#game-viewport #native-driving-ui .driving-aux-dock .beam-flash-button{grid-column:1;grid-row:2}
#game-viewport #native-driving-ui .driving-aux-dock .hazard-button{grid-column:2;grid-row:2}
#game-viewport #native-driving-ui .driving-aux-dock .turn-stalk{position:relative!important;top:auto!important;left:auto!important;grid-column:1 / 3;grid-row:3;width:120px!important;height:56px!important;margin:0!important;pointer-events:auto}
#game-viewport #native-driving-ui .driving-aux-dock .turn-stalk button{height:33.333%!important}
#game-viewport #native-driving-ui .driving-aux-dock .stalk-sprite{top:12px!important;width:120px!important;height:32px!important}
@media(max-height:450px){#game-viewport #native-driving-ui .driving-aux-dock{top:calc(72px + var(--game-safe-top,0px));grid-template-columns:repeat(2,48px);grid-auto-rows:48px;gap:6px}#game-viewport #native-driving-ui .driving-aux-dock .aux-controls>button,#game-viewport #native-driving-ui .driving-aux-dock .road-light-controls>button{width:48px!important;height:48px!important}#game-viewport #native-driving-ui .driving-aux-dock .turn-stalk{width:102px!important;height:48px!important}#game-viewport #native-driving-ui .driving-aux-dock .stalk-sprite{top:8px!important;width:102px!important}}

/* Compact game HUD settings: plain rows and shared option strips. */
#settings-panel{padding:12px;background:#0008}
#settings-panel section{width:590px;max-width:100%;max-height:calc(var(--game-height,100vh) - 24px - var(--game-safe-top,0px) - var(--game-safe-bottom,0px));padding:18px 24px;background:#e4e5e0;color:#181b1b;border:2px solid #111817;border-radius:8px;overflow-x:hidden;overflow-y:auto;box-shadow:none}
#settings-panel .settings-heading{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px;border-bottom:1px solid #b9bcb6}
#settings-panel h2{display:flex;align-items:center;gap:10px;margin:0;font-size:22px;line-height:32px;font-weight:600;letter-spacing:2px}
#settings-panel h2 span{width:30px;height:30px;background:url('assets/ui/settings-v1.png') center/contain no-repeat}
#settings-panel #settings-close{width:34px;height:34px;padding:0;border:0;background:none;color:#353936;font-size:28px;line-height:1}
#settings-panel .settings-row{display:flex;align-items:center;gap:20px;padding:13px 0;border-bottom:1px solid #c7c9c2}
#settings-panel .settings-row h3{flex:0 0 46px;margin:0;font-size:15px;font-weight:500;color:#454a46;letter-spacing:2px}
#settings-panel fieldset{flex:1;min-width:0;padding:0;margin:0;border:0;display:flex}
#settings-panel label.settings-choice{position:relative;display:block!important;flex:1;min-width:0;margin:0;cursor:pointer}
#settings-panel .settings-choice input{position:absolute;width:1px;height:1px;opacity:0}
#settings-panel .settings-choice>span{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:42px;padding:6px 10px;border:1px solid #111817;border-right:0;background:#f0f0eb;color:#242824;font-size:15px;line-height:20px;white-space:nowrap}
#settings-panel .settings-choice:last-child>span{border-right:1px solid #111817}
#settings-panel .settings-choice input:checked+span{background:#292d2b;color:#f3f3ed;border-color:#111817;font-weight:600}
#settings-panel .settings-choice input:focus-visible+span{outline:2px solid #e3e8da;outline-offset:3px}
#settings-panel .settings-choice small{display:block;margin:1px 0 0;font-size:11px;line-height:15px;color:#747a73;font-weight:400}
#settings-panel .settings-choice input:checked+span small{color:#c5cbc3}
#settings-panel .settings-lighting{border-bottom:0}
#settings-panel .settings-toggle{flex:0 0 auto!important}
#settings-panel .settings-toggle>span{flex-direction:row;gap:10px;border:0!important;padding:0;background:none!important;color:#242824!important;font-weight:400!important;min-height:32px}
#settings-panel .settings-toggle>span::before{content:'';display:block;width:18px;height:18px;border:1px solid #111817;background:#f0f0eb}
#settings-panel .settings-toggle input:checked+span::before{content:'✓';background:#292d2b;color:#f3f3ed;font-size:16px;line-height:17px;text-align:center}
#settings-panel #settings-error{margin:8px 0 0;font-size:12px;line-height:18px;color:#9e3933}
#settings-panel #settings-error:empty{display:none}
#settings-panel footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px;padding-top:12px;border-top:1px solid #b9bcb6}
#settings-panel footer button{min-width:88px;height:36px;padding:0 18px;border:1px solid #111817;border-radius:3px;background:transparent;color:#353936;font-size:14px}
#settings-panel #settings-save{background:#292d2b;color:#f3f3ed;border-color:#111817}
#settings-panel button:active{transform:translateY(1px)}
@media(max-height:450px){#settings-panel{padding:8px}#settings-panel section{padding:12px 20px;max-height:calc(var(--game-height,100vh) - 16px - var(--game-safe-top,0px) - var(--game-safe-bottom,0px))}#settings-panel .settings-heading{padding-bottom:8px}#settings-panel h2{font-size:20px;line-height:28px}#settings-panel h2 span{width:26px;height:26px}#settings-panel #settings-close{height:28px;width:28px}#settings-panel .settings-row{padding:10px 0;gap:16px}#settings-panel .settings-choice>span{min-height:38px;padding-top:4px;padding-bottom:4px}#settings-panel footer{padding-top:10px;margin-top:4px}}

#hero-panel{position:absolute;top:0;right:0;bottom:0;left:0;z-index:25;display:flex;align-items:center;justify-content:center;padding:12px;background:#0008}
#hero-panel section{width:640px;max-width:100%;max-height:calc(var(--game-height,100vh) - 24px);overflow:auto;background:#e4e5e0;color:#181b1b;border:2px solid #111817;border-radius:8px;padding:16px 20px}
#hero-panel header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
#hero-panel h2{font-size:20px;line-height:28px;margin:0;font-weight:600}
#hero-close{padding:0;width:32px;height:32px;border:0;border-radius:0;background:none;color:#292d2b;font-size:28px;line-height:1}
.hero-choices{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;padding:3px 3px 10px;touch-action:none;user-select:none;-webkit-user-select:none;scrollbar-width:thin;scrollbar-color:#747c72 transparent}.hero-choices::-webkit-scrollbar{height:4px}.hero-choices::-webkit-scrollbar-thumb{background:#747c72}.hero-choices::-webkit-scrollbar-track{background:transparent}
#hero-panel .hero-choice{flex:0 0 calc((100% - 36px) / 3.5);position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 6px 12px;border:1px solid #111817;border-radius:3px;background:#f0f0eb;color:#242824;min-width:0}
#hero-panel .hero-choice[aria-pressed=true]{background:#cbd0c7;box-shadow:inset 0 0 0 2px #111817}
.hero-choice-art{display:block;width:90px;height:90px;background-position:center;background-size:contain;background-repeat:no-repeat}
.hero-web-art{background-image:url('assets/ui/heroes/web.png')}.hero-power-art{background-image:url('assets/ui/heroes/power.png')}
#hero-panel strong{font-size:18px;font-weight:600}#hero-panel small{font-size:12px;line-height:18px;color:#626a60}
.hero-current{font-size:11px;line-height:20px;min-height:20px;color:#242824;visibility:hidden}.hero-choice[aria-pressed=true] .hero-current{visibility:visible}
#hero-panel button:focus-visible{outline:2px solid #292d2b;outline-offset:3px}
@media(max-height:450px){#hero-panel section{padding:10px 16px;max-height:calc(var(--game-height,100vh) - 16px)}#hero-panel header{margin-bottom:8px}.hero-choice-art{width:72px;height:72px}#hero-panel .hero-choice{padding:10px 6px;gap:4px}}

#hero-panel .hero-reserved{flex:0 0 calc((100% - 36px) / 3.5);min-height:160px;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;background:#dcded8;border:1px dashed #969e92;border-radius:3px;color:#a7afa1;font-size:26px}
#hero-panel .hero-reserved strong{font-size:15px;font-weight:400;color:#747d70}#hero-panel .hero-reserved>span{font-size:38px;line-height:48px}
@media(max-height:450px){#hero-panel .hero-reserved{min-height:140px}}

#hero-web-status{visibility:visible}
#hero-panel .hero-choice[data-locked=true]{background:#e4e5df;box-shadow:none}
#hero-panel .hero-choice[data-locked=true] .hero-choice-art{opacity:.5}
#hero-panel .hero-choice[data-locked=true] #hero-web-status{color:#6c7367}
#hero-follow{padding:6px 0 10px}
#hero-panel .hero-follow-copy{font-size:20px;font-weight:600;margin:10px 0 16px}
#hero-follow-message{font-size:14px;line-height:1.8;min-height:50px;color:#626a60;margin:0 0 20px}
.hero-follow-actions{display:flex;flex-wrap:wrap;gap:10px}
#hero-panel .hero-follow-actions button{border:1px solid #111817;border-radius:3px;padding:10px 14px;background:#f0f0eb;color:#242824;font-size:14px}
#hero-panel #hero-follow-go{background:#292d2b;color:#f3f3ed}

:root{--game-safe-top:calc(var(--physical-safe-top,0px) / var(--game-ui-scale,1));--game-safe-right:calc(var(--physical-safe-right,0px) / var(--game-ui-scale,1));--game-safe-bottom:calc(var(--physical-safe-bottom,0px) / var(--game-ui-scale,1));--game-safe-left:calc(var(--physical-safe-left,0px) / var(--game-ui-scale,1))}
/* Gear hit areas must fit their four grid rows after the HUD scales. */
#game-viewport #native-driving-ui .real-shifter .gear-buttons button{height:100%;min-height:0;max-height:100%;padding-top:0;padding-bottom:0}

/* Main touch controls retain their physical size; other HUD elements scale more gently. */
:root{--main-stick-size:132px;--main-stick-left:30px;--main-stick-center:96px;--main-stick-bottom:38px;--main-jump-size:88px;--main-jump-right:26px;--main-jump-bottom:30px}
html[data-ui-short=true]{--main-stick-size:112px;--main-stick-left:22px;--main-stick-center:78px;--main-stick-bottom:28px;--main-jump-size:76px;--main-jump-right:18px;--main-jump-bottom:24px}
#game-viewport #joystick{width:calc(var(--main-stick-size) / var(--game-ui-scale,1));height:calc(var(--main-stick-size) / var(--game-ui-scale,1));left:calc(var(--main-stick-left) / var(--game-ui-scale,1) + var(--game-safe-left,0px));bottom:calc(var(--main-stick-bottom) / var(--game-ui-scale,1) + var(--game-safe-bottom,0px))}
#game-viewport #knob{width:calc(56px / var(--game-ui-scale,1));height:calc(56px / var(--game-ui-scale,1))}
#game-viewport .stick-label{font-size:calc(12px / var(--game-ui-scale,1));bottom:calc(-24px / var(--game-ui-scale,1))}
#game-viewport .actions{right:calc(var(--main-jump-right) / var(--game-ui-scale,1) + var(--game-safe-right,0px));bottom:calc(var(--main-jump-bottom) / var(--game-ui-scale,1) + var(--game-safe-bottom,0px))}
#game-viewport .actions #jump{width:calc(var(--main-jump-size) / var(--game-ui-scale,1));height:calc(var(--main-jump-size) / var(--game-ui-scale,1));min-width:0;font-size:calc(17px / var(--game-ui-scale,1));padding:0}
#game-viewport #destruction-controls{bottom:calc((var(--main-jump-bottom) + var(--main-jump-size) + 12px) / var(--game-ui-scale,1) + var(--game-safe-bottom,0px))}
#game-viewport #carry-vehicle,#game-viewport #eye-laser,#game-viewport #web-grapple,#game-viewport #naifrog-laugh{bottom:calc((var(--main-jump-bottom) + var(--main-jump-size) + 22px) / var(--game-ui-scale,1) + 96px + var(--game-safe-bottom,0px))}
#game-viewport #flight-toggle{left:calc(16px / var(--game-ui-scale,1) + var(--game-safe-left,0px));bottom:calc((var(--main-stick-bottom) + var(--main-stick-size) + 16px) / var(--game-ui-scale,1) + var(--game-safe-bottom,0px))}

html[data-ui-tiny=true] #game-viewport #flight-toggle{width:80px;height:80px;left:calc(12px / var(--game-ui-scale,1) + var(--game-safe-left,0px));bottom:calc((var(--main-stick-bottom) + var(--main-stick-size) + 8px) / var(--game-ui-scale,1) + var(--game-safe-bottom,0px))}

/* Summoning shares the role picker's outlined, monochrome interface. */
#summon-open{position:absolute;z-index:5;left:calc(156px + var(--game-safe-left,0px));top:calc(14px + var(--game-safe-top,0px));width:64px;height:58px;padding:0;border:0;background:none;color:#0a1010;display:flex;align-items:center;flex-direction:column;gap:1px;text-shadow:0 1px 2px #fff}
#summon-open svg{width:48px;height:40px;filter:drop-shadow(0 1px 1px #ffffff80)}#summon-open span{font-size:12px;color:#f2f2e9;text-shadow:0 1px 3px #111}
#summon-open:hover{transform:scale(1.06)}#summon-open:active{transform:scale(.94)}
#summon-panel{position:absolute;top:0;right:0;bottom:0;left:0;z-index:26;display:flex;align-items:center;justify-content:center;background:#0008;padding:12px}
#summon-panel[hidden],#summon-panel [hidden]{display:none!important}
#summon-panel section{width:520px;max-width:100%;max-height:calc(var(--game-height,100vh) - 32px);overflow:auto;border:2px solid #111817;border-radius:8px;padding:16px 20px;background:#e4e5e0;color:#181b1b}
#summon-panel header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}#summon-title{font-size:20px;margin:0}#summon-close{width:32px;height:32px;padding:0;border:0;background:none;color:#181b1b;font-size:28px}
.summon-tabs{display:flex;border-bottom:1px solid #92958f;margin-bottom:16px;gap:20px}.summon-tabs button{border:0;border-radius:0;background:none;color:#666b65;padding:8px 12px;font-size:16px}.summon-tabs button[aria-pressed=true]{color:#111817;border-bottom:3px solid #111817;font-weight:bold}
.summon-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.summon-options button{min-width:0;display:flex;flex-direction:column;align-items:center;gap:12px;padding:20px 8px;border:1px solid #111817;border-radius:3px;background:#f0f0eb;color:#181b1b;font-size:16px}.summon-options svg{width:88px;height:70px}.summon-options button:hover{background:#cbd0c7}.summon-options button:active{background:#afb5ac}#summon-panel button:focus-visible,#summon-open:focus-visible{outline:2px solid #111817;outline-offset:3px}
#summon-panel footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-top:16px;font-size:12px;color:#565c56}body[data-native-driving=true] #summon-open{display:none}

.summon-options button{padding:8px 4px 14px;gap:6px;overflow:hidden}.summon-options img{display:block;width:100%;height:104px;object-fit:contain;pointer-events:none;user-select:none}.summon-options button:hover img{mix-blend-mode:multiply}

#settings-layout{padding:9px 18px;background:#f0f0eb;color:#181b1b;border:1px solid #111817;border-radius:3px;font-size:15px}
#hud-layout-editor{position:absolute;top:0;right:0;bottom:0;left:0;z-index:35;isolation:isolate;background:#0002;touch-action:none}#hud-layout-editor[hidden]{display:none!important}#hud-layout-handles{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.hud-layout-handle{position:absolute;pointer-events:auto;background:#eeeeeb22;color:#111817;border:2px dashed #111817;border-radius:6px;padding:2px;min-width:0;min-height:0;font-size:12px;font-weight:600;text-shadow:0 1px 2px white,0 -1px 2px white;touch-action:none;user-select:none}.hud-layout-handle.selected{border-style:solid;background:#ffffff66;box-shadow:0 0 0 2px #fff9}
.hud-layout-toolbar{position:absolute;z-index:2;left:50%;bottom:14px;transform:translateX(-50%);width:510px;max-width:calc(100% - 30px);background:#e4e5e0;border:2px solid #111817;border-radius:6px;padding:10px 14px;color:#181b1b;touch-action:auto;box-shadow:0 3px 15px #0003}.hud-layout-toolbar header,.hud-layout-toolbar footer,.hud-layout-detail{display:flex;align-items:center;gap:12px}.hud-layout-toolbar header{margin-bottom:8px}.hud-layout-toolbar header strong{font-size:16px;white-space:nowrap}.hud-layout-toolbar header span{font-size:12px;color:#565c56;flex:1}.hud-layout-toolbar button{padding:6px 12px;border:1px solid #111817;border-radius:3px;background:#f0f0eb;color:#181b1b;font-size:13px}.hud-layout-detail{justify-content:space-between;margin-bottom:10px;font-size:14px}.hud-layout-detail label{display:flex;align-items:center;gap:8px}.hud-layout-detail input{width:170px;accent-color:#252b28}#hud-layout-size{min-width:40px}.hud-layout-toolbar footer{gap:8px}#hud-layout-error{font-size:12px;color:#873a30;flex:1}#hud-layout-save{background:#292d2b;color:#f3f3ed}.hud-layout-toolbar button:focus-visible,.hud-layout-handle:focus-visible{outline:2px solid #111817;outline-offset:3px}

/* Small movable editor; drag the header to uncover any HUD button. */
.hud-layout-toolbar{width:340px;max-width:calc(100% - 16px);padding:8px 10px;top:50%;bottom:auto;transform:translate(-50%,-50%);border-radius:5px}
.hud-layout-toolbar header{margin-bottom:8px;gap:8px;min-height:28px;justify-content:space-between}.hud-layout-toolbar header strong{font-size:14px}.hud-layout-toolbar #hud-layout-grip{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border:1px solid #111817;border-radius:3px;background:#f0f0eb;color:#181b1b;font-size:12px;cursor:grab;touch-action:none;user-select:none}.hud-layout-toolbar #hud-layout-grip:active{cursor:grabbing;background:#cbd0c7}.hud-layout-toolbar #hud-layout-grip span{font-size:16px;line-height:16px;color:inherit;flex:none}

.hud-layout-detail{font-size:12px;gap:8px;margin-bottom:8px}.hud-layout-detail label{gap:5px}.hud-layout-detail input{width:112px}.hud-layout-toolbar button{padding:5px 9px;font-size:12px}#hud-layout-size{min-width:34px;font-size:12px}.hud-layout-toolbar footer{flex-wrap:wrap;gap:6px}#hud-layout-reset{margin-right:auto}#hud-layout-error:empty{display:none}#hud-layout-error:not(:empty){order:4;flex-basis:100%}

.hero-naifrog-art{background-image:url("assets/ui/heroes/naifrog.png")}html[data-hero-role=naifrog] .hero-role-art{background-image:url("assets/ui/naifrog.svg")}html[data-hero-role=naifrog] #eye-laser,html[data-hero-role=naifrog] #web-grapple{display:none!important}

#naifrog-laugh{position:absolute;right:calc(130px + var(--game-safe-right,0px));bottom:220px;width:96px;height:96px;padding:0;border:0;border-radius:0;background:transparent url('assets/ui/naifrog-laugh.png') center/contain no-repeat;touch-action:manipulation;z-index:12;-webkit-tap-highlight-color:transparent}#naifrog-laugh:focus,#naifrog-laugh:focus-visible{outline:none;box-shadow:none}#naifrog-laugh:active,#naifrog-laugh[aria-pressed=true]{background-color:transparent;transform:scale(.94)}#naifrog-laugh[aria-pressed=true]{opacity:1;filter:drop-shadow(0 0 3px #ffe080)}html:not([data-hero-role=naifrog]) #naifrog-laugh,body[data-native-driving=true] #naifrog-laugh{display:none!important}@media(max-height:450px){#naifrog-laugh{right:calc(110px + var(--game-safe-right,0px));width:80px;height:80px}}

/* Full-screen city key art. Loading and error states share the same recovery surface. */
#status{isolation:isolate;display:block;background:#d9e3e6;color:#f7f4e9;z-index:45;overflow:hidden}
#status:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background:linear-gradient(0deg,rgba(12,20,27,.94),rgba(12,20,27,.35) 18%,transparent 45%),linear-gradient(90deg,rgba(246,245,234,.65),transparent 36%);pointer-events:none}
.loading-brand{position:absolute;left:5%;top:10%;color:#172127;user-select:none}.loading-kicker{display:block;font-size:15px;font-weight:700;letter-spacing:4px;border-left:4px solid #b22d32;padding-left:12px}.loading-brand h1{font-size:clamp(58px,7.5vw,112px);font-weight:950;line-height:.98;letter-spacing:-4px;margin:24px 0 20px;transform:skewY(-3deg);text-shadow:2px 3px 0 #f2f1e9}.loading-title-dot{color:#b22d32}.loading-tagline{font-size:15px;letter-spacing:2px;font-weight:650}
#status .loading-panel{position:absolute;left:5%;right:5%;bottom:5%;width:auto;max-width:none;max-height:none;border:0;border-radius:0;padding:0;background:none;color:#f7f4e9;overflow:visible}.loading-row{display:flex;align-items:center;justify-content:space-between;gap:20px}#status-title{font-size:20px;margin:0;letter-spacing:1px;font-weight:750}#loading-count{font-variant-numeric:tabular-nums;font-size:14px;color:#e5e6df}#status-text{font-size:13px;line-height:1.6;margin:7px 0 13px;color:#d3dad8}#loading-progress{height:9px;border:1px solid #e9e9df;padding:2px;background:#17212788;overflow:hidden}#loading-fill{display:block;height:3px;width:0;background:#f2f1e9;transition:width .2s ease}.loading-footer{margin-top:12px;display:flex;justify-content:space-between;gap:20px;align-items:center;font-size:12px;color:#d2d7d2}.loading-roles{letter-spacing:2px;white-space:nowrap}
#status[data-state=error]:before{background:#15212b9e}#status[data-state=error] .loading-brand{opacity:.25}#status[data-state=error] .loading-panel{left:50%;right:auto;bottom:50%;transform:translate(-50%,50%);width:460px;max-width:85%;padding:26px;background:#eceee7;color:#172127;border:2px solid #172127;box-shadow:6px 6px 0 #17212766}#status[data-state=error] #status-title{font-size:25px}#status[data-state=error] #status-text{color:#46514e;overflow-wrap:anywhere;margin:14px 0 22px}#status[data-state=error] #loading-count,#status[data-state=error] #loading-progress,#status[data-state=error] .loading-footer{display:none}#status #retry{border:2px solid #172127;border-radius:3px;background:#172127;color:#f4f1e7;padding:10px 25px;font-weight:650}
@media(prefers-reduced-motion:reduce){#loading-fill{transition:none}}

.loading-art{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center 40%;z-index:-2;pointer-events:none;user-select:none}

.loading-brand{left:max(5%,var(--game-safe-left,0px));top:max(10%,var(--game-safe-top,0px));}.loading-kicker{font-size:calc(15 * var(--loading-unit,1px));letter-spacing:calc(4 * var(--loading-unit,1px));border-left-width:calc(4 * var(--loading-unit,1px));padding-left:calc(12 * var(--loading-unit,1px))}.loading-brand h1{font-size:calc(96 * var(--loading-unit,1px));letter-spacing:calc(-4 * var(--loading-unit,1px));margin:calc(24 * var(--loading-unit,1px)) 0 calc(20 * var(--loading-unit,1px))}.loading-tagline{font-size:calc(15 * var(--loading-unit,1px));letter-spacing:calc(2 * var(--loading-unit,1px))}
#status .loading-panel{left:max(5%,var(--game-safe-left,0px));right:max(5%,var(--game-safe-right,0px));bottom:max(5%,var(--game-safe-bottom,0px))}.loading-row{gap:calc(20 * var(--loading-unit,1px))}#status-title{font-size:calc(20 * var(--loading-unit,1px))}#loading-count{font-size:calc(14 * var(--loading-unit,1px))}#status-text{font-size:calc(13 * var(--loading-unit,1px));margin:calc(7 * var(--loading-unit,1px)) 0 calc(13 * var(--loading-unit,1px))}#loading-progress{height:calc(9 * var(--loading-unit,1px));padding:calc(2 * var(--loading-unit,1px));border-width:calc(1 * var(--loading-unit,1px))}#loading-fill{height:100%}.loading-footer{margin-top:calc(12 * var(--loading-unit,1px));font-size:calc(12 * var(--loading-unit,1px));gap:calc(20 * var(--loading-unit,1px))}.loading-roles{letter-spacing:calc(2 * var(--loading-unit,1px))}
#status[data-shape=wide] .loading-brand{top:9%}#status[data-shape=wide] .loading-brand h1{font-size:calc(78 * var(--loading-unit,1px));margin:calc(18 * var(--loading-unit,1px)) 0 calc(14 * var(--loading-unit,1px))}
#status[data-state=error] .loading-panel{left:50%;right:auto;width:calc(460 * var(--loading-unit,1px));padding:calc(26 * var(--loading-unit,1px));bottom:50%;max-height:85%;overflow:auto}#status[data-state=error] #status-title{font-size:calc(25 * var(--loading-unit,1px))}#status[data-state=error] #status-text{margin:calc(14 * var(--loading-unit,1px)) 0 calc(22 * var(--loading-unit,1px))}#status #retry{font-size:calc(15 * var(--loading-unit,1px));padding:calc(10 * var(--loading-unit,1px)) calc(25 * var(--loading-unit,1px))}

#status[data-shape=compact] .loading-art{object-position:55% 50%}#status[data-shape=compact] .loading-brand{top:7%}#status[data-shape=compact] .loading-brand h1{font-size:calc(86 * var(--loading-unit,1px))}#status[data-shape=wide] .loading-art{object-position:center 20%}

/* Minimal loading copy: game name, one status line and actual progress only. */
.loading-brand h1{margin-top:0;margin-bottom:0}#status[data-shape=wide] .loading-brand h1{margin:0}#status:not([data-state=error]) #status-text{display:none}#loading-progress{margin-top:calc(15 * var(--loading-unit,1px))}

#hero-naifrog-status{visibility:visible}#hero-panel .hero-choice[data-locked=true] #hero-naifrog-status{color:#6c7367}

/* Keep exit below the view switch, sharing the same platform safe-area origin. */
#game-viewport #native-driving-ui .reverse-view-button{top:calc(66px + var(--game-safe-top,0px));right:calc(12px + var(--game-safe-right,0px));height:44px;min-height:44px;max-height:44px;white-space:nowrap}
/* Third-person steering keeps a thumb-sized physical target as the HUD scales. */
#game-viewport #native-driving-ui main[data-camera=third] .mobile-controls{--wheel-size:var(--third-wheel-size,176px)}
html[data-ui-short=true] #game-viewport #native-driving-ui main[data-camera=third] .mobile-controls{--wheel-size:var(--third-wheel-size,160px)}
html[data-ui-tiny=true] #game-viewport #native-driving-ui main[data-camera=third] .mobile-controls{--wheel-size:var(--third-wheel-size,144px)}
#game-viewport #native-driving-ui main[data-camera=third] .driving-aux-dock{top:calc(70px + var(--game-safe-top,0px))}

/* Left-side controls avoid physical cutouts without inheriting the right Toy capsule's padding. */
:root{--edge-safe-top:0px;--edge-safe-left:0px}
@supports(padding:env(safe-area-inset-top)){:root{--edge-safe-top:calc(env(safe-area-inset-top,0px) / var(--game-ui-scale,1));--edge-safe-left:calc(env(safe-area-inset-left,0px) / var(--game-ui-scale,1))}
html[data-rotated=true]{--edge-safe-top:calc(env(safe-area-inset-right,0px) / var(--game-ui-scale,1));--edge-safe-left:calc(env(safe-area-inset-top,0px) / var(--game-ui-scale,1))}}
#game-viewport #settings-open,#game-viewport #key-settings-open,#game-viewport #hero-switch,#game-viewport #summon-open,#game-viewport #actions-open,#game-viewport #emote-panel,#game-viewport #emote-hint,#game-viewport #return-home,#game-viewport #flight-toggle,#game-viewport #joystick,#game-viewport #native-driving-ui .driving-aux-dock{--game-safe-top:var(--edge-safe-top);--game-safe-left:var(--edge-safe-left)}
#game-viewport #settings-open{top:calc(14px + var(--edge-safe-top));left:calc(16px + var(--edge-safe-left))}
#game-viewport #native-driving-ui .mobile-controls{--safe-left:var(--edge-safe-left)}

/* Dedicated layout entry: settings, key settings, role, summon. */
#game-viewport #key-settings-open{position:absolute;left:calc(82px + var(--game-safe-left,0px));top:calc(14px + var(--game-safe-top,0px));width:86px;height:56px;min-height:44px;padding:4px 6px;border:1px solid #cbd6cb;border-radius:9px;background:#293f45;color:#edf1e7;font-size:13px;white-space:nowrap;z-index:13;touch-action:manipulation}
#game-viewport #hero-switch{left:calc(178px + var(--game-safe-left,0px))}
#game-viewport #summon-open{left:calc(252px + var(--game-safe-left,0px))}
@media(max-height:450px){#game-viewport #key-settings-open{left:calc(74px + var(--game-safe-left,0px));top:calc(8px + var(--game-safe-top,0px));width:78px;height:48px;font-size:12px}#game-viewport #hero-switch{left:calc(162px + var(--game-safe-left,0px))}#game-viewport #summon-open{left:calc(230px + var(--game-safe-left,0px))}}

#game-viewport #key-settings-open{height:58px;min-height:0;padding:0;border:0;border-radius:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;color:#f2f0e5;text-shadow:0 1px 3px #000;font-size:12px;line-height:17px}
#key-settings-open .key-settings-art{display:block;width:46px;height:40px;object-fit:contain;pointer-events:none}#key-settings-open span{display:block;white-space:nowrap;pointer-events:none}#game-viewport #key-settings-open:active{transform:scale(.94)}
@media(max-height:450px){#game-viewport #key-settings-open{height:52px;font-size:11px;line-height:15px}#key-settings-open .key-settings-art{width:40px;height:35px}}

#key-settings-open .key-settings-art{overflow:hidden;flex:none}#key-settings-open .key-settings-art img{display:block;width:100%;height:100%;object-fit:contain;transform:scale(1.6);pointer-events:none}

/* Equal cells and equal gaps across the four top-left shortcuts. */
#game-viewport #settings-open,#game-viewport #key-settings-open,#game-viewport #hero-switch,#game-viewport #summon-open{width:64px;height:58px;top:calc(14px + var(--game-safe-top,0px));min-width:0;min-height:0}
#game-viewport #settings-open{left:calc(16px + var(--game-safe-left,0px))}
#game-viewport #key-settings-open{left:calc(92px + var(--game-safe-left,0px))}
#game-viewport #hero-switch{left:calc(168px + var(--game-safe-left,0px))}
#game-viewport #summon-open{left:calc(244px + var(--game-safe-left,0px));gap:0}
#game-viewport #summon-open span{line-height:17px}
@media(max-height:450px){#game-viewport #settings-open,#game-viewport #key-settings-open,#game-viewport #hero-switch,#game-viewport #summon-open{width:58px;height:52px;top:calc(8px + var(--game-safe-top,0px))}#game-viewport #settings-open{left:calc(16px + var(--game-safe-left,0px))}#game-viewport #key-settings-open{left:calc(84px + var(--game-safe-left,0px))}#game-viewport #hero-switch{left:calc(152px + var(--game-safe-left,0px))}#game-viewport #summon-open{left:calc(220px + var(--game-safe-left,0px))}#game-viewport #summon-open svg{width:40px;height:35px}#game-viewport #summon-open span{font-size:11px;line-height:15px}}

/* Shared WebView compositing boundary: canvas never paints over the HUD. */
#game-viewport #game{z-index:0;isolation:isolate;transform:translateZ(0)}
#game-hud-layer{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;isolation:isolate;transform:translateZ(0);pointer-events:none}
#game-hud-layer>*{pointer-events:auto}
#game-hud-layer #dash-lines,#game-hud-layer #dash-flash,#game-hud-layer #laser-reticle,#game-hud-layer #web-reticle,#game-hud-layer #emote-hint,#game-hud-layer #pursuer-counter{pointer-events:none}

#vehicle-repair-notice,#native-driving-ui .native-repair-notice{position:absolute;left:50%;top:calc(96px + var(--game-safe-top,0px));transform:translateX(-50%);padding:9px 14px;background:#293f45e8;color:#fff4d5;border:1px solid #cbd6cb;border-radius:8px;font-size:14px;white-space:nowrap;pointer-events:none;z-index:25}#vehicle-gears #vehicle-repair-notice{position:fixed}

#settings-panel .audio-sliders{flex:1;min-width:0}#settings-panel .audio-sliders label{display:flex;justify-content:space-between;margin:0 0 5px;font-size:14px}#settings-panel .audio-sliders output{font-variant-numeric:tabular-nums;color:#606b65}#settings-panel .audio-sliders input{display:block;width:100%;height:28px;margin:0 0 8px;accent-color:#314b45;touch-action:pan-x}#settings-panel .audio-sliders input:last-child{margin-bottom:0}
/* Use measured physical height: the logical viewport remains at least 540px. */
html[data-ui-short=true] #settings-panel section{padding:12px 20px}
html[data-ui-short=true] #settings-panel .settings-heading{padding-bottom:8px}
html[data-ui-short=true] #settings-panel h2{font-size:20px;line-height:28px}
html[data-ui-short=true] #settings-panel .settings-row{padding:7px 0;gap:16px}
html[data-ui-short=true] #settings-panel .settings-choice>span{min-height:36px;padding-top:3px;padding-bottom:3px}
html[data-ui-short=true] #settings-panel .audio-sliders input{height:24px;margin-bottom:4px}
html[data-ui-short=true] #settings-panel .audio-sliders label{margin-bottom:2px;font-size:13px}
html[data-ui-short=true] #settings-panel footer{padding-top:8px;margin-top:4px}

/* Bound the image to its control even on legacy flex/intrinsic-size implementations. */
#game-viewport #native-driving-ui .steering-control{flex:none;min-width:0;min-height:0;overflow:hidden}#game-viewport #native-driving-ui .steering-control .wheel-face{max-width:100%;max-height:100%;min-width:0;min-height:0}

/* Weapon prototype: shares the viewport, touch mapping and editable HUD. */
#weapon-hud{pointer-events:none}#weapon-ammo{position:absolute;right:calc(24px + var(--game-safe-right,0px));bottom:calc(150px + var(--game-safe-bottom,0px));font-size:22px;font-weight:700;color:#fff5d2;text-shadow:0 1px 3px #000}#weapon-hud>small{position:absolute;right:calc(24px + var(--game-safe-right,0px));bottom:calc(132px + var(--game-safe-bottom,0px));color:#e4e8df;font-size:11px;text-shadow:0 1px 3px #000}
#weapon-reticle{position:absolute;left:50%;top:50%;width:26px;height:26px;transform:translate(-50%,-50%);pointer-events:none;z-index:9;filter:drop-shadow(0 1px 1px #000)}#weapon-reticle:before,#weapon-reticle:after{content:"";position:absolute;background:#f7f3d9}#weapon-reticle:before{left:12px;top:0;width:2px;height:26px}#weapon-reticle:after{top:12px;left:0;height:2px;width:26px}#weapon-reticle.aiming{width:14px;height:14px}#weapon-reticle.aiming:before{left:6px;height:14px}#weapon-reticle.aiming:after{top:6px;width:14px}#weapon-reticle.hit:before,#weapon-reticle.hit:after{background:#ffc464}

/* Weapon actions reuse walk HUD elements and their saved layout transforms. */
html[data-weapon-equipped=true][data-hero-role] #game-viewport #eye-laser,html[data-weapon-equipped=true][data-hero-role] #game-viewport #destruction-controls{display:block!important}
html[data-weapon-equipped=true] #web-grapple,html[data-weapon-equipped=true] #flight-toggle,html[data-weapon-equipped=true] #naifrog-laugh,html[data-weapon-equipped=true] #actions-open{display:none!important}
html[data-weapon-equipped=true] button[data-weapon-action]{background:none!important;border:0;color:#edf1e7;padding:0}
html[data-weapon-equipped=true] button[data-weapon-action]:before,html[data-weapon-equipped=true] button[data-weapon-action]:after{display:none!important}
.weapon-context-icon{display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;text-shadow:0 1px 3px #000}
.weapon-context-icon img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
html[data-weapon-equipped=true][data-hero-role] #game-viewport #eye-laser[hidden]{display:none!important}
#weapon-hud #weapon-ammo{left:50%;right:auto;bottom:calc(24px + var(--game-safe-bottom,0px));transform:translateX(-50%);font-size:18px}

/* Reticle opens briefly with the shot; it does not alter camera input or HUD layout. */
#weapon-reticle{width:calc(26px + var(--weapon-kick,0px));height:calc(26px + var(--weapon-kick,0px))}
#weapon-reticle:before{left:calc(50% - 1px);height:100%}#weapon-reticle:after{top:calc(50% - 1px);width:100%}
#weapon-reticle.aiming{width:calc(14px + var(--weapon-kick,0px));height:calc(14px + var(--weapon-kick,0px))}
#weapon-reticle.aiming:before{left:calc(50% - 1px);height:100%}#weapon-reticle.aiming:after{top:calc(50% - 1px);width:100%}
#weapon-reticle.hit{filter:drop-shadow(0 0 3px #ffdb7f)}

.weapon-context-icon{position:relative}
.weapon-context-icon>b{position:absolute;bottom:1%;left:0;width:100%;text-align:center;font-size:18px;line-height:1.15;font-weight:800;color:#fffdf3;-webkit-text-stroke:1px #131615;paint-order:stroke fill;text-shadow:0 1px 2px #000}

/* One movable weapon status block; image crops transparent square padding into 2:1. */
#weapon-status{position:absolute;left:calc(50% - 56px);bottom:calc(24px + var(--game-safe-bottom,0px));width:188px;height:82px;pointer-events:none}
#weapon-status-icon{display:block;width:112px;height:56px;object-fit:cover;object-position:center;filter:drop-shadow(0 1px 2px #000);pointer-events:none}
#weapon-hud #weapon-status #weapon-ammo{position:static;transform:none;width:112px;text-align:center;font-size:18px;line-height:26px;white-space:nowrap}
#weapon-drop{position:absolute;left:124px;bottom:0;min-width:56px;min-height:44px;padding:8px 6px;border:1px solid #d1d8cc99;border-radius:8px;background:#253b4277;color:#edf1e7;font-size:13px;pointer-events:auto;touch-action:manipulation;text-shadow:0 1px 2px #000}
@media(max-height:450px){#weapon-status{bottom:calc(12px + var(--game-safe-bottom,0px))}}

#weapon-drop{width:64px;height:72px;min-height:0;padding:0;border:0;border-radius:0;background:none}
#weapon-drop>img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}

/* Carnival reuses the laugh skill slot and its saved HUD layout. */
.hero-pumpkin-art,html[data-hero-role=pumpkin] .hero-role-art{background-image:url('assets/ui/heroes/pumpkin.png')}
html[data-hero-role=pumpkin] #eye-laser,html[data-hero-role=pumpkin] #web-grapple{display:none!important}
html[data-hero-role=pumpkin] #game-viewport #naifrog-laugh{display:block!important;background-image:url('assets/halloween/pumpkin-icon-v1.png')}
html[data-hero-role=pumpkin] #naifrog-laugh::after{content:'狂欢';position:absolute;bottom:-5px;left:0;right:0;color:#fff4db;font-size:15px;text-shadow:0 1px 3px #000}
html[data-hero-role=pumpkin] #naifrog-laugh[hidden],html[data-hero-role=pumpkin][data-weapon-equipped=true] #game-viewport #naifrog-laugh,html[data-hero-role=pumpkin] body[data-native-driving=true] #game-viewport #naifrog-laugh{display:none!important}

/* Achievements use the same warm grey surfaces, ink outlines and stickman art as the role/summon panels. */
#game-viewport #achievements-open{position:absolute;left:calc(320px + var(--edge-safe-left,0px));top:calc(14px + var(--edge-safe-top,0px));width:64px;height:58px;padding:0;border:0;border-radius:0;background:transparent;z-index:13;touch-action:manipulation;color:#f2f0e5;text-shadow:0 1px 3px #000}
#achievements-open svg{display:block;width:46px;height:40px;margin:auto;filter:drop-shadow(0 1px 1px #ffffff35)}#achievements-open span{display:block;font-size:12px;line-height:17px}#achievements-open:active{transform:scale(.94)}
/* Centered split-view achievement sheet. Both columns share one frame. */
#achievements-panel{position:absolute;top:0;right:0;bottom:0;left:0;z-index:82;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0;background:#10191caa;color:#182121}
#achievements-panel[hidden],#achievement-toast[hidden]{display:none!important}
#achievements-panel .achievement-window{position:absolute;left:50%;top:50%;width:1180px;height:663.75px;min-height:0;transform:translate(-50%,-50%);transform-origin:center;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;background:#e4e5df;border:2px solid #182121;border-radius:5px;box-shadow:0 6px 0 #10191c40}
#achievements-panel .achievement-header{display:flex;flex:none;align-items:center;gap:20px;padding:16px 22px;border-bottom:2px solid #182121;background:#ecece5}
.achievement-heading{display:flex;align-items:center;gap:10px;margin-right:auto}.achievement-heading-icon{font-size:33px;line-height:1;color:#182121}#achievements-panel h2{font-size:27px;margin:0;line-height:1.2}
#achievements-close{flex:none;width:36px;height:36px;padding:0;border:1.5px solid #182121;border-radius:4px;background:#e4e5df;color:#182121;font-size:30px;line-height:30px;cursor:pointer}#achievements-close:hover{background:#d1d5ca}
.achievement-body{display:flex;flex:1;min-height:0}.achievement-sidebar{flex:0 0 24%;min-width:130px;box-sizing:border-box;border-right:1.5px solid #182121;background:#dddfd7;padding-top:14px}.achievement-category{display:flex;gap:12px;align-items:center;position:relative;padding:15px 18px;background:#cdd1c7;border-bottom:1px solid #a9afa4;border-top:1px solid #a9afa4}.achievement-category:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#182121}.achievement-category-icon{font-size:32px}.achievement-category strong{display:block;font-size:18px}.achievement-category div>span{display:block;margin-top:5px;font-size:13px;color:#606b60}
.achievement-main{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;padding:20px 24px 12px;box-sizing:border-box;position:relative;background:linear-gradient(0deg,#cbd0c340,transparent 22%)}
.achievement-list-title{flex:none;font-size:24px;line-height:1.3;margin:0 0 14px;padding-bottom:13px;border-bottom:1px solid #9ca497}#achievement-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:0 8px 2px 0;scrollbar-width:thin;scrollbar-color:#949e90 transparent}#achievement-list::-webkit-scrollbar{width:5px}#achievement-list::-webkit-scrollbar-thumb{border-radius:4px;background:#949e90}
.achievement-card{display:flex;align-items:center;gap:16px;min-height:100px;margin-bottom:10px;padding:12px 16px;border:1px solid #a1a99b;border-radius:4px;background:#e9eae380;box-sizing:border-box}.achievement-art{position:relative;width:68px;height:68px;flex:0 0 68px;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1.5px solid #26312e;border-radius:4px;background:#d7dcd1;box-sizing:border-box}.achievement-art>span{font-size:44px;font-weight:700;line-height:1;color:#788273}.achievement-art img{display:block;width:100%;height:100%;object-fit:contain}.achievement-content{flex:1;min-width:0}.achievement-content h3{font-size:19px;line-height:1.3;margin:0 0 7px}.achievement-content p{font-size:13px;line-height:1.5;margin:0;color:#667061}.achievement-tag{flex:none;display:flex;align-items:center;gap:7px;font-size:14px;font-weight:700;white-space:nowrap;color:#737e6e}.achievement-check{font-size:27px;line-height:1}.achievement-lock{position:relative;width:15px;height:12px;border:2px solid currentColor;box-sizing:border-box;border-radius:2px;margin-top:6px}.achievement-lock:before{content:"";position:absolute;left:1px;bottom:9px;width:9px;height:9px;border:2px solid currentColor;border-bottom:0;border-radius:8px 8px 0 0;box-sizing:border-box}.is-unlocked .achievement-art{background:#ecebd5}.is-unlocked .achievement-tag{color:#26312e}.achievement-card.is-unlocked{border-color:#75836c;background:#eff0e6}
#achievements-panel footer{flex:none;font-size:12px;color:#80572b}#achievements-panel footer p{margin:8px 0}#achievement-save-retry{background:#f0f0e9;border:1px solid #182121;border-radius:3px;padding:6px 12px;color:#182121}
#achievement-toast{position:absolute;z-index:90;top:calc(86px + var(--edge-safe-top,0px));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;max-width:calc(100% - 40px);padding:10px 20px;background:#e4e5df;border:2px solid #182121;border-radius:4px;box-shadow:0 4px 0 #10191c40;pointer-events:none;color:#182121}.achievement-toast-seal{width:48px;height:48px;flex:none;border:1px solid #182121;border-radius:3px;background:#ecebd5}.achievement-toast-seal img{width:100%;height:100%;object-fit:contain}#achievement-toast div>span{display:block;font-size:12px;color:#68715f}#achievement-toast strong{display:block;font-size:19px;margin-top:3px;white-space:nowrap}
@media(max-height:450px){#game-viewport #achievements-open{left:calc(288px + var(--edge-safe-left,0px));top:calc(8px + var(--edge-safe-top,0px));width:58px;height:52px}#achievements-open svg{width:40px;height:35px}#achievements-open span{font-size:11px;line-height:15px}#achievement-toast{top:calc(68px + var(--edge-safe-top,0px));padding:7px 14px}}
.achievement-heading-icon{width:36px;height:36px;flex:none}.achievement-category-icon{display:block;width:42px;height:42px;flex:none}.achievement-category-icon img{width:100%;height:100%;object-fit:contain}

/* Restroom actions reuse the interaction slot immediately left of Jump. */
#restroom-interact{position:relative;width:88px;height:88px;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:#f4f3e9;touch-action:manipulation;user-select:none;-webkit-user-select:none}#restroom-interact[hidden]{display:none!important}.restroom-action-art{display:block;width:68px;height:68px;margin:0 auto;background:url('assets/ui/interact-v1.png') center/contain no-repeat}.restroom-action-label{display:block;position:absolute;left:0;right:0;bottom:2px;text-align:center;font-size:13px;line-height:18px;text-shadow:0 1px 3px #000,0 0 3px #000}html[data-restroom-action=true] #ride{display:none!important}#restroom-interact:active{transform:scale(.93)}
#restroom-use-screen{position:absolute;top:0;right:0;bottom:0;left:0;z-index:120;background:#000;color:#fff;display:flex;align-items:center;justify-content:center;font-size:28px;letter-spacing:.08em;touch-action:none}#restroom-use-screen[hidden]{display:none!important}
@media(max-height:450px){#restroom-interact{width:72px;height:72px}.restroom-action-art{width:54px;height:54px}.restroom-action-label{font-size:12px;line-height:16px;bottom:0}}

/* Helicopter shares the walking stick and the vehicle HUD, without car pedals or a wheel. */
/* Helicopter controls share the existing movement contact and HUD editor. */
html[data-vehicle=helicopter] body[data-native-driving=true] #game-viewport #joystick{display:flex!important;z-index:10;width:calc(180px / var(--game-ui-scale,1));height:calc(180px / var(--game-ui-scale,1));border:0;border-radius:0;background:url('assets/ui/helicopter/cyclic-base-v2.png') center/contain no-repeat;overflow:visible}
html[data-vehicle=helicopter] body[data-native-driving=true] #game-viewport #knob{transform-origin:50% 77%;width:100%;height:100%;border:0;border-radius:0;background:url('assets/ui/helicopter/cyclic-grip-v2.png') center/contain no-repeat}
html[data-vehicle=helicopter] body[data-native-driving=true] #joystick:after{content:'操纵杆';position:absolute;bottom:-12px;left:0;width:100%;text-align:center;color:#eceee3;font-size:14px;text-shadow:0 2px 3px #172326;pointer-events:none}
#native-driving-ui .helicopter-compass{position:absolute;left:50%;top:24px;transform:translateX(-50%);width:300px;height:64px;color:#f0eee1;text-align:center;filter:drop-shadow(0 2px 2px #172326);pointer-events:none}
.helicopter-compass .compass-window{height:39px;overflow:hidden;border-bottom:2px solid #e5e5d4;mask-image:linear-gradient(90deg,transparent,#000 15%,#000 85%,transparent)}
.helicopter-compass .compass-tape{position:relative;left:50%;height:36px}
.helicopter-compass .compass-tape span{position:absolute;top:23px;width:1px;height:8px;background:#d5d7cb;font-size:12px;white-space:nowrap}
.helicopter-compass .compass-tape span.major{top:3px;height:28px;background:linear-gradient(transparent 70%,#eae9d9 70%);text-indent:-.5em}
.helicopter-compass .compass-marker{position:absolute;left:calc(50% - 5px);top:30px;color:#e6ad5c;font-size:10px}
.helicopter-compass strong{display:block;margin-top:4px;font-size:15px;font-variant-numeric:tabular-nums}
#native-driving-ui .helicopter-instruments{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);width:344px;height:116px;display:grid;grid-template-columns:1fr 88px 1fr;grid-template-rows:86px 30px;border:2px solid #243335;border-radius:8px;background:#dcded0e8;color:#243335;box-shadow:0 4px 0 #15242670;pointer-events:none}
.helicopter-instruments .flight-reading{text-align:center;padding-top:8px;line-height:1.05}
.helicopter-instruments .flight-reading span{display:block;font-size:12px;color:#5c6962}
.helicopter-instruments .flight-reading strong{display:block;margin:3px;font-size:32px;font-variant-numeric:tabular-nums}
.helicopter-instruments .flight-reading small{font-size:11px}
.helicopter-instruments .attitude{position:relative;width:72px;height:72px;margin:5px auto;border:4px solid #344244;border-radius:50%;overflow:hidden;background:#788d8d;box-shadow:0 0 0 2px #f4f0dd}
.helicopter-instruments .attitude-horizon{position:absolute;width:160px;height:160px;left:-44px;top:-44px;background:linear-gradient(#80979b 49%,#eee8ce 49%,#eee8ce 51%,#796952 51%)}
.helicopter-instruments .attitude-horizon i{position:absolute;left:64px;top:60px;width:32px;height:35px;border-top:1px solid #eee8ce;border-bottom:1px solid #eee8ce}
.helicopter-instruments .attitude-wings{position:absolute;left:0;top:24px;width:100%;text-align:center;font-size:20px;color:#f3bc61;text-shadow:0 1px #263738}
.helicopter-instruments .attitude-label{position:absolute;left:0;bottom:3px;width:100%;text-align:center;color:#eeeadb;font-size:9px}
.helicopter-instruments .flight-status{grid-column:1/4;display:flex;align-items:center;justify-content:space-evenly;border-top:1px solid #a4ad9e;font-size:11px}
#native-driving-ui .helicopter-collective{position:absolute;right:calc(32px + var(--game-safe-right,0px));bottom:calc(45px + var(--game-safe-bottom,0px));width:122px;height:224px;pointer-events:auto;touch-action:none;user-select:none;cursor:ns-resize;color:#eeeede;text-shadow:0 2px 3px #172326;outline-offset:5px}
.helicopter-collective .collective-rail{position:absolute;left:55px;top:22px;bottom:22px;width:12px;border:2px solid #b9c0ad;border-radius:8px;background:repeating-linear-gradient(0deg,#324447 0px,#324447 16px,#a2ac9c 16px,#a2ac9c 18px);box-shadow:2px 3px 0 #17232688}
.helicopter-collective img{position:absolute;left:0;top:51px;width:122px;height:122px;object-fit:contain;pointer-events:none}
.helicopter-collective span{position:absolute;font-size:13px;right:0;pointer-events:none}
.helicopter-collective .collective-up{top:12px}.helicopter-collective .collective-center{top:104px;color:#d3dac6;font-size:11px}.helicopter-collective .collective-down{bottom:12px}
@media(max-width:1000px){#native-driving-ui .helicopter-compass{top:86px;width:260px}}
@media(max-height:450px){html[data-vehicle=helicopter] body[data-native-driving=true] #game-viewport #joystick{width:calc(140px / var(--game-ui-scale,1));height:calc(140px / var(--game-ui-scale,1))}#native-driving-ui .helicopter-instruments{bottom:16px;scale:.82;transform-origin:bottom left}#native-driving-ui .helicopter-collective{bottom:28px;right:20px;height:200px}#native-driving-ui .helicopter-collective img{top:39px}#native-driving-ui .helicopter-compass{top:76px;width:240px}}
/* Contextual laboratory interaction: movement and camera remain usable. */
#lab-transfer{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;background:#101b1beF;color:#eeeddb;display:flex;align-items:center;justify-content:center;font-size:22px;pointer-events:none}
#lab-transfer[hidden],#lab-dig[hidden],#lab-status[hidden]{display:none!important}
#lab-status{position:absolute;top:90px;left:50%;transform:translateX(-50%);font-size:17px;color:#ececde;text-shadow:0 2px 3px #172326;pointer-events:none}
#lab-dig{position:absolute;right:calc(142px + var(--game-safe-right,0px));bottom:calc(38px + var(--game-safe-bottom,0px));width:112px;min-height:66px;padding:12px;border:2px solid #b9c3ad;border-radius:7px;background:#293f3fe8;color:#f0efdf;font:inherit;font-size:16px;touch-action:none;user-select:none}
html[data-lab-held=true] #hero-switch,html[data-lab-held=true] #summon-open,html[data-lab-held=true] #return-home,html[data-lab-held=true] #flight-toggle,html[data-lab-held=true] #actions-open,html[data-lab-held=true] #destruction-controls,html[data-lab-held=true] #eye-laser,html[data-lab-held=true] #carry-vehicle,html[data-lab-held=true] #ride,html[data-lab-held=true] #jump,html[data-lab-held=true] #weapon-hud,html[data-lab-held=true] #weapon-status,html[data-lab-held=true] #naifrog-laugh,html[data-lab-held=true] #carnival-action{display:none!important}

#player-health{position:relative;margin-top:4px;padding-top:3px;border-top:1px solid #cbd6cb66;font-size:12px;line-height:20px;color:#edf1e7;background:linear-gradient(to right,#92ad7d38 var(--player-health,100%),transparent var(--player-health,100%));border-radius:2px}
#player-damage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:34;pointer-events:none;box-shadow:inset 0 0 32px 4px #17212524;opacity:0;will-change:opacity}
#player-damage::before{content:"";position:absolute;top:20px;right:20px;bottom:20px;left:20px;background:linear-gradient(#eee9d7,#eee9d7) left top/24px 3px,linear-gradient(#eee9d7,#eee9d7) left top/3px 24px,linear-gradient(#eee9d7,#eee9d7) right top/24px 3px,linear-gradient(#eee9d7,#eee9d7) right top/3px 24px,linear-gradient(#eee9d7,#eee9d7) left bottom/24px 3px,linear-gradient(#eee9d7,#eee9d7) left bottom/3px 24px,linear-gradient(#eee9d7,#eee9d7) right bottom/24px 3px,linear-gradient(#eee9d7,#eee9d7) right bottom/3px 24px;background-repeat:no-repeat;filter:drop-shadow(0 1px 2px #17212566)}
#player-damage[hidden]{display:none!important}
#hero-pumpkin-status{visibility:visible}#hero-panel .hero-choice[data-locked=true] #hero-pumpkin-status{color:#6c7367}

#laser-reticle[data-hit="hit"],#laser-reticle[data-hit="kill"]{width:18px;height:18px;border-radius:2px;border:2px solid #ffb25e;box-shadow:0 0 8px #ec6a25;transform:translate(-50%,-50%) rotate(45deg)}
#laser-reticle[data-hit="kill"]{width:23px;height:23px;border-color:#e96d45;box-shadow:0 0 12px #e96d45}

:root{--app-safe-top:env(safe-area-inset-top,0px);--app-safe-right:env(safe-area-inset-right,0px);--app-safe-bottom:env(safe-area-inset-bottom,0px);--app-safe-left:env(safe-area-inset-left,0px)}
@supports(padding:max(0px,1px)){:root{--app-safe-top:max(env(safe-area-inset-top,0px),var(--toy-safe-top,0px));--app-safe-right:max(env(safe-area-inset-right,0px),var(--toy-safe-right,0px));--app-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--toy-safe-bottom,0px));--app-safe-left:max(env(safe-area-inset-left,0px),var(--toy-safe-left,0px))}}
#settings-open{left:calc(16px + var(--app-safe-left));top:calc(14px + var(--app-safe-top))}
#joystick{left:calc(30px + var(--app-safe-left));bottom:calc(38px + var(--app-safe-bottom))}
#flight-toggle{left:calc(48px + var(--app-safe-left));bottom:calc(208px + var(--app-safe-bottom))}
.actions{right:calc(26px + var(--app-safe-right));bottom:calc(30px + var(--app-safe-bottom))}
#carry-vehicle{bottom:calc(220px + var(--app-safe-bottom))}#destruction-controls{bottom:calc(120px + var(--app-safe-bottom))}
body[data-native-driving=true] #ride{right:calc(12px + var(--app-safe-right));top:calc(116px + var(--app-safe-top))}
#native-driving-ui .vehicle-ram{right:calc(18px + var(--app-safe-right));bottom:calc(180px + var(--app-safe-bottom))}
#native-driving-ui .native-repair{right:calc(180px + var(--app-safe-right));top:calc(80px + var(--app-safe-top))}
#native-driving-ui .jet-flight-control{right:calc(112px + var(--app-safe-right));top:calc(116px + var(--app-safe-top))}
@media(max-height:450px){#joystick{left:calc(22px + var(--app-safe-left));bottom:calc(28px + var(--app-safe-bottom))}#flight-toggle{left:calc(36px + var(--app-safe-left));bottom:calc(164px + var(--app-safe-bottom))}.actions{right:calc(18px + var(--app-safe-right));bottom:calc(24px + var(--app-safe-bottom))}#carry-vehicle{bottom:calc(214px + var(--app-safe-bottom))}#destruction-controls{bottom:calc(96px + var(--app-safe-bottom))}#native-driving-ui .vehicle-ram{bottom:calc(142px + var(--app-safe-bottom))}}

:root{--app-safe-top:var(--game-safe-top,0px);--app-safe-right:var(--game-safe-right,0px);--app-safe-bottom:var(--game-safe-bottom,0px);--app-safe-left:var(--game-safe-left,0px)}
