/* POP V2.3.4: one safe-area-aware layout, compact 44px touch targets. */
body.spatial-world {
  --pop-edge-left:max(8px,env(safe-area-inset-left,0px));
  --pop-edge-right:max(8px,env(safe-area-inset-right,0px));
  --pop-edge-top:max(8px,env(safe-area-inset-top,0px));
  --pop-edge-bottom:max(6px,env(safe-area-inset-bottom,0px));
  --pop-dock-h:52px;
  --pop-control-bottom:calc(var(--pop-edge-bottom) + var(--pop-dock-h) + 7px);
  --pop-map-size:clamp(72px,21vw,94px);
  --pop-air-width:76px;
  position:fixed; inset:auto; top:var(--pop-vy,0px); left:var(--pop-vx,0px);
  width:var(--pop-vw,100%); height:var(--pop-vh,100vh);
  min-width:0; min-height:0; max-width:none; max-height:none;
  margin:0; padding:0; overflow:hidden; contain:layout;
  -webkit-text-size-adjust:100%; text-size-adjust:100%;
}
/* World, touch layer and projection use precisely the same box. */
body.spatial-world :is(#universe,#fallback-canvas,#fallback-world,#viewport,#portal-layer,.world-hud, #treasure-layer) {
  position:absolute!important; inset:0!important; width:100%!important; height:100%!important;
  max-width:100%!important; max-height:100%!important; margin:0; box-sizing:border-box;
}
body.spatial-world #spatial-dock {
  position:absolute!important; left:var(--pop-edge-left)!important; right:var(--pop-edge-right)!important;
  bottom:var(--pop-edge-bottom)!important; width:auto!important; max-width:384px!important;
  height:var(--pop-dock-h); min-height:0; max-height:var(--pop-dock-h); margin:0 auto!important;
  transform:none!important; display:grid; grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:3px!important; padding:3px!important; border-radius:10px!important;
}
body.spatial-world #spatial-dock :is(.dock-action,.pop-chat-launch) {
  height:44px!important; min-height:44px!important; max-height:44px!important; width:100%!important;
  min-width:0!important; max-width:100%; padding:0 3px!important; margin:0!important;
  font:700 12px/1.15 Arial,sans-serif!important; letter-spacing:0!important;
  white-space:nowrap!important; touch-action:manipulation; border-radius:7px;
}
body.spatial-world #spatial-dock .pop-chat-launch span{font-size:11px;line-height:1}
body.spatial-world #pop-minimap {
  position:absolute!important; left:var(--pop-edge-left)!important; bottom:var(--pop-control-bottom)!important;
  width:var(--pop-map-size)!important; max-width:var(--pop-map-size)!important; padding:3px; border-radius:8px;
}
body.spatial-world #pop-minimap .mini-caption{font-size:9px;letter-spacing:0}
body.spatial-world #pop-air-controls {
  position:absolute!important; right:var(--pop-edge-right)!important; bottom:var(--pop-control-bottom)!important;
  width:var(--pop-air-width); max-width:var(--pop-air-width)!important; gap:3px;
}
body.spatial-world #pop-air-controls :is(#jump-action,#fly-action,#land-action,#flight-speed-action,#force-land-action) {
  width:100%; min-width:44px; max-width:100%; min-height:44px; height:44px; padding:0 3px;
  border-radius:12px; font:800 12px/1 system-ui,sans-serif; touch-action:manipulation;
}
body.spatial-world #air-caption{width:100%;max-width:100%;font-size:9px;line-height:1.2;overflow-wrap:normal;text-align:center}
body.spatial-world #air-stick{width:var(--pop-air-width);height:var(--pop-air-width);max-width:100%}
body.spatial-world .world-hud{padding:var(--pop-edge-top) var(--pop-edge-right) var(--pop-control-bottom) var(--pop-edge-left);}
body.spatial-world .world-hud header{min-width:0;gap:8px;align-items:flex-start}
body.spatial-world .wordmark{font-size:clamp(15px,4.2vw,24px);letter-spacing:.06em;line-height:1.15;min-width:0}
body.spatial-world .world-index{min-width:0;max-width:46%;text-align:right}
body.spatial-world .world-index span{font-size:22px}
body.spatial-world .wordmark small,body.spatial-world .world-index small{font-size:8px;letter-spacing:.07em;margin-top:3px;overflow-wrap:anywhere}
body.spatial-world .world-foot{
  position:absolute; left:calc(var(--pop-edge-left) + var(--pop-map-size) + 7px);
  right:calc(var(--pop-edge-right) + var(--pop-air-width) + 7px); bottom:var(--pop-control-bottom);
  width:auto; max-width:none; min-width:0; margin:0; text-align:center;
}
body.spatial-world .world-foot #world-readout{font-size:10px;line-height:1.25;letter-spacing:.035em;margin:0;overflow-wrap:anywhere}
body.spatial-world #treasure-hud{position:absolute;right:var(--pop-edge-right);top:calc(var(--pop-edge-top) + 60px);font-size:15px;min-width:44px;min-height:44px}
body.spatial-world :is(.controls-panel,#toolbox-panel,.spatial-dock .pop-chat-panel){
  bottom:calc(100% + 6px);max-height:max(44px,calc(var(--pop-vh) - var(--pop-edge-top) - var(--pop-control-bottom)))!important;
  max-width:100%; overflow:auto; overscroll-behavior:contain;
}
body.spatial-world #accessible-world{position:absolute;inset:calc(var(--pop-edge-top) + 58px) var(--pop-edge-right) var(--pop-control-bottom) var(--pop-edge-left);}
body.spatial-world #city-exhibit{position:absolute;top:var(--pop-edge-top);bottom:var(--pop-control-bottom);width:min(680px,calc(100% - var(--pop-edge-left) - var(--pop-edge-right)))}
body.spatial-world #treasure-journal{position:absolute;top:var(--pop-edge-top);bottom:var(--pop-control-bottom);width:min(470px,calc(100% - var(--pop-edge-left) - var(--pop-edge-right)))}
/* Top-layer dialogs are outside the body's containing block. Constrain to visible bounds. */
body.spatial-world #pop-full-map {
  position:fixed; top:calc(var(--pop-vy) + var(--pop-edge-top)); left:calc(var(--pop-vx) + var(--pop-edge-left));
  right:auto; bottom:auto; margin:0; transform:none;
  width:calc(var(--pop-vw) - var(--pop-edge-left) - var(--pop-edge-right));
  max-width:calc(var(--pop-vw) - var(--pop-edge-left) - var(--pop-edge-right))!important;
  max-height:calc(var(--pop-vh) - var(--pop-edge-top) - var(--pop-edge-bottom))!important;
  overflow:auto;
}
body.spatial-world .pop-map-canvas-wrap{width:min(100%,max(110px,calc(var(--pop-vh) - 275px)))}
body.spatial-world .pop-map-shell{padding:10px;gap:7px}
body.spatial-world .pop-map-header h2{font-size:18px}
body.spatial-world .pop-map-shell :is(button,select){min-height:44px}
body.spatial-world #device-dialog{inset:auto;top:var(--pop-vy);left:var(--pop-vx);width:var(--pop-vw);height:var(--pop-vh);margin:0;overflow:hidden}
body.spatial-world .device-stage{padding:var(--pop-edge-top) var(--pop-edge-right) var(--pop-edge-bottom) var(--pop-edge-left)}
body.spatial-world .device-rig{max-width:100%;min-width:0}
body.spatial-world #device-dialog .device-lid{max-width:100%;max-height:calc(var(--pop-vh) - var(--pop-edge-top) - var(--pop-edge-bottom) - 95px)}
body.spatial-world #device-dialog .gps-view{overflow:auto;min-width:0;padding:8px;gap:5px}
body.spatial-world #device-dialog .gps-view canvas{display:block;max-width:100%;height:auto;aspect-ratio:1;flex:0 0 auto;align-self:center}
body.spatial-world #device-dialog .gps-view select{max-width:100%;min-width:0}
body.spatial-world #device-dialog .device-address-form input{font-size:16px}
@media(max-width:360px){
 body.spatial-world{--pop-map-size:72px;--pop-air-width:68px}
 body.spatial-world #spatial-dock :is(.dock-action,.pop-chat-launch){font-size:11px!important;gap:2px}
 body.spatial-world .world-foot #world-readout{font-size:9px}
}
@media(max-height:480px){
 body.spatial-world{--pop-map-size:68px;--pop-air-width:68px}
 body.spatial-world .world-index small{font-size:7px}
 body.spatial-world #treasure-hud{top:calc(var(--pop-edge-top) + 40px)}
 body.spatial-world .world-foot #world-readout{display:block;font-size:9px}
 body.spatial-world .pop-map-canvas-wrap{width:min(100%,max(100px,calc(var(--pop-vh) - 100px)))}
}
@media(min-width:700px) and (min-height:481px){
 body.spatial-world{--pop-map-size:110px;--pop-air-width:84px}
 body.spatial-world #spatial-dock{max-width:400px!important}
 body.spatial-world #pop-full-map{width:min(670px,calc(var(--pop-vw) - var(--pop-edge-left) - var(--pop-edge-right)));left:calc(var(--pop-vx) + var(--pop-vw)/2);transform:translateX(-50%)}
}
@media(orientation:landscape) and (max-height:640px){
 body.spatial-world .pop-map-shell{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 body.spatial-world .pop-map-canvas-wrap{width:min(100%,max(100px,calc(var(--pop-vh) - 100px)))}
}

/* V2.4.33: match visible viewport; keep full-size backing pixels and compact safe-area HUD. */
html{overflow:hidden;overscroll-behavior:none}
body.spatial-world{box-sizing:border-box;min-width:0!important;min-height:0!important;max-width:var(--pop-vw,100vw)!important;max-height:var(--pop-vh,100dvh)!important;}
body.spatial-world :is(#universe,#fallback-canvas){filter:none;image-rendering:auto;transform:none!important;}
body.spatial-world :is(#pop-landmark-labels,#pop-city-labels){transform:none!important;}
body.spatial-world #pop-secret-prompt{position:absolute;box-sizing:border-box;width:min(290px,calc(100% - var(--pop-edge-left) - var(--pop-edge-right)));max-width:100%;bottom:calc(var(--pop-control-bottom) + 66px);padding:6px 8px;}
body.spatial-world #pop-secret-dialog{max-width:calc(var(--pop-vw,100vw) - var(--pop-edge-left) - var(--pop-edge-right));max-height:calc(var(--pop-vh,100dvh) - var(--pop-edge-top) - var(--pop-edge-bottom));}
body.spatial-world #pop-secret-dialog.pop-secret-helix{height:min(92dvh,calc(var(--pop-vh,100dvh) - var(--pop-edge-top) - var(--pop-edge-bottom)));}
@media(max-height:480px){body.spatial-world #pop-secret-prompt{bottom:calc(var(--pop-control-bottom) + 12px);width:min(230px,calc(100% - 176px));}body.spatial-world #pop-secret-prompt span{font-size:10px;}}

/* V2.4.38: compact flight controls; ordinary Land remains separate. */
#flight-speed-action,#force-land-action{border:1px solid #8ceaff;background:#123d50;color:#fff;font-weight:800;touch-action:manipulation;}
#force-land-action{border-color:#f5c987;background:#3d2930;}
#flight-speed-action[hidden],#force-land-action[hidden]{display:none!important;}
body.spatial-world #pop-air-controls #flight-speed-action,body.spatial-world #pop-air-controls #force-land-action{font-size:10px;line-height:1.15;}

/* V2.4.43: accessible, compact sound control in world HUD. */
body.spatial-world .world-hud #pop-sound-toggle{pointer-events:auto;touch-action:manipulation;flex:0 0 auto;min-height:36px;max-width:88px;padding:5px 7px;border:1px solid #71d9ff80;border-radius:7px;background:#071c2be8;color:#d6f7ff;font:600 10px/1.2 Arial,sans-serif;white-space:nowrap;cursor:pointer}body.spatial-world .world-hud #pop-sound-toggle[aria-pressed="true"]{border-color:#c283ff;color:#ead5ff}body.spatial-world .world-hud #pop-sound-toggle:focus-visible{outline:2px solid white;outline-offset:2px}@media(max-width:350px){body.spatial-world .world-hud #pop-sound-toggle{font-size:9px;max-width:75px;padding:4px}}

/* V2.4.46 — compact independent music mixer, no popup. */
.pop-audio-controls{flex:0 0 auto;display:flex;flex-direction:column;align-items:stretch;gap:2px;width:94px;max-width:30vw;min-width:0;pointer-events:auto;align-self:flex-start}
.pop-audio-controls #pop-sound-toggle{width:100%;max-width:100%!important;align-self:stretch;min-height:32px!important}
.pop-music-volume{display:flex;flex-direction:column;align-items:stretch;gap:0;min-width:0;padding:3px 5px 0;border:1px solid #71d9ff60;border-radius:7px;background:#071c2be8;color:#d6f7ff;font:600 10px/1.2 Arial,sans-serif;pointer-events:auto}
.pop-music-volume span{display:flex;justify-content:space-between;gap:2px;white-space:nowrap;line-height:13px}
.pop-music-volume output{color:#c6ecff;font-variant-numeric:tabular-nums}
.pop-music-volume input[type=range]{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;min-height:30px;height:30px;accent-color:#00c9ff;touch-action:none;pointer-events:auto;cursor:pointer}
.pop-music-volume input:focus-visible{outline:2px solid white;outline-offset:1px;border-radius:4px}
#controls-panel .pop-music-volume{width:100%;max-width:260px;margin:6px 0 10px;padding:7px 10px 1px;font-size:12px}
#controls-panel .pop-music-volume input[type=range]{min-height:44px;height:44px}
@media(max-width:350px){.pop-audio-controls{width:78px}.pop-music-volume{padding-left:3px;padding-right:3px;font-size:9px}}

/* V2.4.58 non-lethal archery — compact controls, no new startup assets. */
#pop-archery-layer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4}#pop-archery-layer[hidden],#pop-archery-hud[hidden],#pop-archery-shop[hidden]{display:none!important}
#pop-archery-hud{position:absolute;right:max(8px,env(safe-area-inset-right));bottom:calc(120px + env(safe-area-inset-bottom));z-index:8;width:min(170px,44vw);box-sizing:border-box;border:1px solid #87cfff99;border-radius:9px;padding:6px;background:#061828e8;color:#fff;display:grid;gap:3px;font:700 12px/1.2 system-ui;touch-action:manipulation}#pop-archery-hud small{color:#a8eaff;font-size:10px}#pop-archery-hud div{display:flex;gap:4px}#pop-archery-hud button,#pop-archery-shop button,#pop-archery-shop-open{min-height:42px;padding:6px 8px;border:1px solid #71cfff88;border-radius:7px;background:#11344c;color:#effaff;font:700 12px/1.2 system-ui;cursor:pointer;touch-action:manipulation}#pop-archery-hud button{flex:1;min-width:0;padding:3px}#pop-archery-hud button:disabled,#pop-archery-shop button:disabled{opacity:.5;cursor:default}#pop-archery-shop-open{width:100%;margin:8px 0}#pop-archery-shop{border:1px solid #5485a8;border-radius:9px;padding:9px;margin:5px 0 12px;background:#071b2c}#pop-archery-shop h3{margin:0 0 6px;color:#bcecff}#pop-archery-shop p{font-size:11px;color:#b5cde0;margin:4px 0 8px}#pop-archery-shop .arch-item{display:grid;grid-template-columns:46px 1fr;gap:8px;align-items:center;border-bottom:1px solid #41637b;padding:8px 0}#pop-archery-shop .arch-item svg{width:40px;height:58px}#pop-archery-shop .arch-item strong,#pop-archery-shop .arch-item small{display:block}#pop-archery-shop .arch-item small{color:#b4d6e8;font-size:11px;margin:4px 0}#pop-archery-shop .arch-item button{width:100%}#pop-archery-shop .arch-ammo{display:grid;gap:6px;padding-top:8px}#pop-archery-shop-status{min-height:1.2em;color:#bfefff}#pop-archery-shop button:focus-visible,#pop-archery-hud button:focus-visible{outline:2px solid white;outline-offset:2px}@media(max-height:480px){#pop-archery-hud{bottom:calc(46px + env(safe-area-inset-bottom));right:max(95px,env(safe-area-inset-right));width:160px}}

#pop-archery-hud{bottom:calc(148px + env(safe-area-inset-bottom));z-index:8}#pop-archery-hud[hidden]{display:none!important}#pop-archery-shop-open{color:#e9f9ff}#pop-archery-shop [data-buy="arrows"]{background:#17443d} @media(max-height:480px){#pop-archery-hud{bottom:calc(74px + env(safe-area-inset-bottom));right:max(100px,env(safe-area-inset-right));width:148px}}

/* V2.4.60 street lettering and in-world catalog */
#pop-road-lettering{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2;filter:none}#pop-road-lettering[hidden],#pop-browse-catalog[hidden]{display:none!important}#pop-browse-catalog{position:absolute;z-index:7;left:50%;bottom:calc(110px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#0d3148;border:1px solid #81dfff;color:#fff;border-radius:7px;padding:10px 14px;font:700 13px system-ui;min-height:44px;white-space:nowrap;touch-action:manipulation;cursor:pointer;box-shadow:0 0 9px #008fcc55}

/* V2.4.61: controls stay reachable after stowing. */
#pop-archery-hud{width:min(182px,48vw);padding:5px;gap:4px}#pop-archery-hud button{min-height:44px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}#pop-archery-hud button[hidden]{display:none!important}#pop-archery-fire:not(:disabled){background:#16434e;border-color:#8ee8f1}#pop-archery-holster[aria-pressed="true"]{border-color:#c1a3ff}#pop-archery-fire:active{background:#28627a} @media(max-height:480px){#pop-archery-hud{width:154px;max-width:44vw}}

/* V2.4.63: distinct inventory, spatial client display and safe shop spawn. */
body.spatial-world #spatial-dock:has(#weapons-launch){grid-template-columns:repeat(5,minmax(0,1fr))!important;max-width:490px!important}
body.spatial-world #spatial-dock:has(#weapons-launch) :is(.dock-action,.pop-chat-launch){font-size:clamp(9px,2.75vw,12px)!important}
:is(#pop-cnc-display,#pop-pads-display){position:absolute;left:0;top:0;width:1348px;height:926px;box-sizing:border-box;transform-origin:0 0;z-index:2;pointer-events:auto;display:block;overflow:hidden;border:5px solid #e5fbff;outline:4px solid #00a7f4;background:#081525;touch-action:none;color:white;text-decoration:none;backface-visibility:hidden;box-shadow:0 0 28px #008aff88}
:is(#pop-cnc-display,#pop-pads-display)[hidden]{display:none!important}:is(#pop-cnc-display,#pop-pads-display) img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}:is(#pop-cnc-display,#pop-pads-display) span{position:absolute;bottom:0;left:0;right:0;background:#071424ee;padding:22px;text-align:center;font:700 38px/1.2 system-ui;color:#fff;pointer-events:none}:is(#pop-cnc-display,#pop-pads-display)[aria-disabled=true]{pointer-events:none}
#pop-weapons-dialog{box-sizing:border-box;width:min(420px,calc(100% - 24px));max-height:80dvh;overflow:auto;background:#071928;color:#eaf8ff;border:1px solid #68c9ff;border-radius:12px;padding:16px;box-shadow:0 14px 50px #0009;font:14px system-ui}#pop-weapons-dialog::backdrop{background:#0009}#pop-weapons-dialog header,#pop-owned-weapons>div{display:flex;align-items:center;justify-content:space-between;gap:10px}#pop-weapons-dialog h2{margin:0;font-size:22px}#pop-owned-weapons>div{border-top:1px solid #3d6277;padding:10px 0}#pop-weapons-dialog button,#pop-shop-results button,#pop-shop-spawn{min-height:44px;color:#edfaff;background:#123a52;border:1px solid #6bbfe8;border-radius:7px;padding:6px 10px;font:700 12px system-ui}#pop-weapons-dialog button[data-wclose]{min-width:44px;font-size:24px}#pop-shop-search{width:100%;min-height:44px;background:#0d2434;color:white;border:1px solid #5796b5;border-radius:6px;padding:8px;font-size:16px;box-sizing:border-box}.pop-shop-search{display:grid;gap:4px;font:12px system-ui;color:#b7e7ff}#pop-shop-results{display:grid;gap:4px;max-height:144px;overflow:auto}#pop-shop-results>div{display:flex;gap:5px}#pop-shop-results>div>button:first-child{flex:1;text-align:left}#pop-shop-spawn[hidden],#pop-weapon-reload[hidden]{display:none!important}#pop-weapon-reload{width:100%}body.spatial-world .pop-map-canvas-wrap{width:min(100%,max(100px,calc(var(--pop-vh) - 390px)))}

/* V2.4.65: compact inventory drawer, no floating stowed-weapon HUD. */
body.spatial-world #pop-weapons-dialog{position:fixed;inset:auto;top:auto;left:calc(var(--pop-vx,0px) + var(--pop-edge-left,8px));right:auto;bottom:calc(100vh - var(--pop-vy,0px) - var(--pop-vh,100vh) + var(--pop-edge-bottom,6px));margin:0 auto;width:min(480px,calc(var(--pop-vw,100vw) - var(--pop-edge-left,8px) - var(--pop-edge-right,8px)));max-width:none;max-height:calc(var(--pop-vh,100vh) - var(--pop-edge-top,8px) - var(--pop-edge-bottom,6px) - 8px);padding:8px 14px 14px;border:1px solid #70d0ff;border-radius:16px 16px 10px 10px;background:linear-gradient(155deg,#0c263b,#06131f);overflow:auto;overscroll-behavior:contain;box-shadow:0 -6px 28px #0086e633;}
body.spatial-world #pop-weapons-dialog[open]{animation:popWeaponsSlide65 .20s cubic-bezier(.2,.75,.25,1) both;}
#pop-weapons-dialog::backdrop{background:#02091377;}
@keyframes popWeaponsSlide65{from{transform:translateY(28px);opacity:.3}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){body.spatial-world #pop-weapons-dialog[open]{animation:none;}}
@media(min-width:520px){body.spatial-world #pop-weapons-dialog{left:calc(var(--pop-vx,0px) + var(--pop-vw,100vw)/2 - 240px);}}
.pop-weapons-grip{width:40px;height:4px;border-radius:4px;background:#8edcff75;margin:0 auto 10px;}
.pop-weapons-eyebrow{font-size:10px;letter-spacing:.13em;color:#91d8ff;}
#pop-weapons-dialog h2{display:flex;align-items:center;gap:8px;margin:2px 0;font-size:20px;}
.pop-weapons-count{font-size:12px;background:#174664;padding:3px 8px;border-radius:14px;}
.pop-weapons-ammo{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0;padding:9px 10px;background:#04111c;border:1px solid #315971;border-radius:7px;color:#a9d4eb;font-size:12px;}
.pop-weapons-ammo b{color:white;margin-left:4px;}
#pop-owned-weapons>div.pop-owned-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px 5px;}
#pop-owned-weapons>div.is-equipped{background:#15415e6b;border-radius:6px;}
.pop-owned-icon{display:grid;place-items:center;font-size:21px;}
.pop-owned-info{min-width:0;display:grid;gap:3px;}
.pop-owned-info strong{font-size:13px;overflow-wrap:anywhere;}
.pop-owned-info small,.pop-weapons-note{font-size:11px;color:#add5ea;line-height:1.4;}
.pop-weapons-note{margin:12px 0 0;}.pop-weapons-empty{color:#c4e7f7;padding:8px 0;}
#pop-weapons-dialog [data-wequip]{white-space:nowrap;min-width:82px;}

/* V2.4.84: keep Fire/Reload separate from the flight controls. */
body.spatial-world #pop-archery-hud.airborne{bottom:calc(var(--pop-control-bottom) + 174px);right:var(--pop-edge-right);}
@media(max-height:640px){body.spatial-world #pop-archery-hud.airborne{bottom:var(--pop-control-bottom);right:calc(var(--pop-edge-right) + var(--pop-air-width) + 8px);width:min(182px,44vw);}}

/* V2.4.100: six compact dock buttons and a distinct key/special-item drawer. */
body.spatial-world #spatial-dock:has(#inventory-launch){grid-template-columns:repeat(6,minmax(0,1fr))!important;max-width:580px!important}
body.spatial-world #spatial-dock:has(#inventory-launch) :is(.dock-action,.pop-chat-launch){font-size:clamp(9px,2.48vw,12px)!important;padding:0 1px!important}
#pop-inventory-dialog{box-sizing:border-box;width:min(460px,calc(100% - 20px));max-height:min(80dvh,calc(100% - 24px));overflow:auto;overscroll-behavior:contain;background:#071928;color:#eaf8ff;border:1px solid #70d0ff;border-radius:15px;padding:14px;box-shadow:0 14px 50px #0009;font:14px system-ui}#pop-inventory-dialog::backdrop{background:#02091399}#pop-inventory-dialog header{display:flex;justify-content:space-between;align-items:center;gap:8px;border-bottom:1px solid #375e76;padding-bottom:9px}#pop-inventory-dialog header small{font-size:10px;letter-spacing:.12em;color:#90d8ff}#pop-inventory-dialog h2{font-size:22px;margin:2px 0}#pop-inventory-dialog button{min-width:44px;min-height:44px;color:white;background:#123a52;border:1px solid #6bbfe8;border-radius:8px;font-size:25px;cursor:pointer}#pop-inventory-items article{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:center;padding:12px 2px;border-bottom:1px solid #31536a}#pop-inventory-items article>span{font-size:23px;text-align:center}#pop-inventory-items article strong,#pop-inventory-items article small{display:block;overflow-wrap:anywhere}#pop-inventory-items article small,.pop-inventory-note{font-size:12px;color:#b3d5e9;line-height:1.4;margin-top:4px}#pop-key-pickup{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--pop-control-bottom,75px) + 65px);z-index:34;min-height:44px;padding:8px 13px;border:1px solid #ffdf74;border-radius:10px;background:#2a2112f5;color:#fff0a3;font:700 13px system-ui;touch-action:manipulation;box-shadow:0 0 16px #e9b74d55}#pop-key-pickup[hidden]{display:none!important}


/* V2.4.106: remove floating equipped-weapon HUD box per user request. */
body.spatial-world #pop-archery-hud{display:none !important;pointer-events:none !important;visibility:hidden !important;}
body.spatial-world #pop-archery-hud *{pointer-events:none !important;}
body.spatial-world .pop-weapons-quick{display:grid;gap:6px;margin:10px 0 4px;}
body.spatial-world .pop-weapons-quick button{width:100%;min-height:44px;color:#edfaff;background:#15415b;border:1px solid #7bd5ff;border-radius:8px;padding:8px 10px;font:700 12px system-ui;}

/* V2.4.125: safe-area top-right restart and stacked cash; restore unobstructed dock. */
body.spatial-world .world-hud header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:start;}
body.spatial-world .world-hud .wordmark{justify-self:start;max-width:100%;overflow-wrap:anywhere;}
body.spatial-world .pop-hud-right{min-width:0;max-width:100%;display:flex;flex-direction:column;align-items:flex-end;gap:3px;justify-self:end;width:max-content;}
body.spatial-world .pop-hud-right .world-index{max-width:100%;min-width:0;}
body.spatial-world .pop-hud-right .world-index small{white-space:normal;}
body.spatial-world .pop-hud-right #pop-start-over-dock{
  pointer-events:auto;min-width:0;min-height:44px;width:min(96px,100%);padding:5px 4px;margin:0;
  border:1px solid #8adfff;border-radius:8px;background:#071c2bea;color:#eafaff;
  font:800 12px/1.2 system-ui,sans-serif;white-space:normal;touch-action:manipulation;cursor:pointer;
  box-shadow:0 0 12px #009dff30;box-sizing:border-box;
}
body.spatial-world .pop-hud-right #pop-start-over-dock:disabled{opacity:.7;cursor:default}
body.spatial-world .pop-hud-right #pop-start-over-dock:focus-visible{outline:2px solid #fff;outline-offset:2px}
body.spatial-world .pop-hud-right #treasure-hud{position:static;inset:auto;margin:0;pointer-events:auto;max-width:100%;min-width:44px;flex:0 0 auto;}
@media(max-width:350px){body.spatial-world .world-hud header{gap:5px;}body.spatial-world .pop-hud-right #pop-start-over-dock{font-size:11px;}}


/* V2.4.126: Mount Bonnell mystery, centered and never intercepting movement. */
.pop-bonnell-mystery{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:45;width:max-content;max-width:calc(100vw - 40px);box-sizing:border-box;text-align:center;color:#fff;font:700 clamp(17px,2.7vw,30px)/1.4 system-ui,sans-serif;letter-spacing:.015em;text-shadow:0 2px 5px #000,0 0 12px #000,0 0 18px #168eff;pointer-events:none;overflow-wrap:break-word;animation:pop-bonnell-mystery-in .22s ease-out both;}
@keyframes pop-bonnell-mystery-in{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.pop-bonnell-mystery{animation:none}}

#pop-pads-display img{object-fit:contain;background:#081525}
#pop-pads-display span{font-size:32px}
