/* Bot Battle styles. Dialogs and board keep their look; the in-match HUD is a compact contextual layout built by
   battle-hud.js (#hud-top strip, #hud-hotbar, #hud-player, #hud-actions, touch FIRE/pad) using theme.css tokens.
   Z ladder: world labels 2 · reticle 3 · HUD roots 10 · board 11 · toasts/feedback 12 · dialogs 40 · spawn map 90 ·
   pause 95 · settings/controls 96 · flash 110. Layout queries: (pointer:coarse), (max-width:560px), (max-height:500px). */
.battle-dialog{width:min(530px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;background:#132d43;border:1px solid #a3d2cd;border-top:4px solid #f4c67b;box-shadow:8px 8px #091b2cd4;padding:25px}.battle-dialog small{font-size:12px;letter-spacing:.17em;color:#94e5db}.battle-dialog h2{font-size:27px;font-weight:400;letter-spacing:.06em;margin:14px 0}.battle-dialog p{font-size:12px;line-height:1.7;color:#bfd6d5}.battle-controls-help{padding:14px;border:1px solid #587f87;background:#183b4c;font-size:12px;line-height:1.9;color:#e6d8b3}.battle-drain-label{display:flex;align-items:center;gap:9px;font-size:12px;line-height:1.5;margin:16px 0}.battle-drain-label input{accent-color:#93e4d2;width:17px;height:17px}.battle-dialog .battle-local-note{font-size:12px;color:#8dafb7}.battle-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:9px;margin-top:18px}.battle-dialog-actions button:last-child{color:#142e40;background:#e8c989;border-color:#ffedb5;font-weight:bold}
#battle-panel,#battle-result{position:fixed;inset:0;z-index:40;display:grid;place-items:center;background:#0e253ab5;backdrop-filter:blur(3px)}#battle-load-status{min-height:20px;color:#fae0a0}
.battle-castle-setup{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}.battle-castle-setup label{display:grid;gap:5px;font-size:12px;flex:1}.battle-castle-setup select{background:#193747;color:#f8e7c3;border:1px solid #91a6b1;padding:8px;min-width:0}.battle-castle-setup p{width:100%;font-size:12px!important;margin:0!important}#battle-load-status{min-height:18px;color:#ffe5a4}
#battle-panel.building{background:transparent;backdrop-filter:none;pointer-events:none;align-items:flex-end;padding-bottom:100px}#battle-panel.building .battle-dialog{width:min(560px,90vw);padding:16px;pointer-events:auto;background:#102936e8}#battle-panel.building .battle-dialog>*{display:none}#battle-panel.building .battle-dialog>h2,#battle-panel.building #battle-load-status,#battle-panel.building .battle-dialog-actions{display:block}#battle-panel.building #battle-start{display:none}

/* Shared HUD tokens. --hud-top-h / --hud-bottom-h are static per query (no JS measurement); other packages read them. */
body{--icon-lance:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='12' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='4' y='10' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='6' y='8' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='8' y='6' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='11' y='1' width='1' height='7' fill='%23f4c67b'/%3E%3Crect x='8' y='4' width='7' height='1' fill='%23f4c67b'/%3E%3Crect x='10' y='3' width='3' height='3' fill='%23f4c67b'/%3E%3Crect x='1' y='14' width='2' height='1' fill='%23b98a45'/%3E%3C/svg%3E");--icon-fan:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='12' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='4' y='10' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='6' y='6' width='1' height='3' fill='%23fff3cd'/%3E%3Crect x='5' y='5' width='1' height='1' fill='%23fff3cd'/%3E%3Crect x='9' y='9' width='3' height='1' fill='%23fff3cd'/%3E%3Crect x='11' y='7' width='1' height='1' fill='%23fff3cd'/%3E%3Crect x='4' y='3' width='3' height='3' fill='%23f4c67b'/%3E%3Crect x='12' y='4' width='3' height='3' fill='%23f4c67b'/%3E%3Crect x='12' y='10' width='3' height='3' fill='%23f4c67b'/%3E%3Crect x='6' y='8' width='2' height='2' fill='%23fff3cd'/%3E%3C/svg%3E");--icon-orbit:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='5' y='2' width='6' height='2' fill='%23fff3cd'/%3E%3Crect x='3' y='4' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='11' y='4' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='2' y='6' width='2' height='4' fill='%23fff3cd'/%3E%3Crect x='12' y='6' width='2' height='4' fill='%23fff3cd'/%3E%3Crect x='3' y='10' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='11' y='10' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='5' y='12' width='6' height='2' fill='%23fff3cd'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23f4c67b'/%3E%3Crect x='1' y='1' width='2' height='2' fill='%23f4c67b'/%3E%3Crect x='13' y='13' width='2' height='2' fill='%23f4c67b'/%3E%3Crect x='13' y='1' width='2' height='2' fill='%23f4c67b'/%3E%3Crect x='1' y='13' width='2' height='2' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-longbow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='5' y='1' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='7' y='3' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='8' y='5' width='2' height='6' fill='%23fff3cd'/%3E%3Crect x='7' y='11' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='5' y='13' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='5' y='3' width='1' height='10' fill='%23b98a45'/%3E%3Crect x='2' y='7' width='11' height='2' fill='%23fff3cd'/%3E%3Crect x='12' y='6' width='3' height='4' fill='%23f4c67b'/%3E%3Crect x='1' y='6' width='2' height='1' fill='%23f4c67b'/%3E%3Crect x='1' y='9' width='2' height='1' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-firepot:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='4' y='8' width='8' height='6' fill='%23fff3cd'/%3E%3Crect x='3' y='9' width='10' height='4' fill='%23fff3cd'/%3E%3Crect x='6' y='6' width='4' height='2' fill='%23b98a45'/%3E%3Crect x='5' y='12' width='6' height='1' fill='%23b98a45'/%3E%3Crect x='7' y='1' width='2' height='5' fill='%23f4c67b'/%3E%3Crect x='6' y='3' width='4' height='2' fill='%23f4c67b'/%3E%3Crect x='8' y='0' width='1' height='2' fill='%23ff8a7a'/%3E%3C/svg%3E");--icon-reviver:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='7' y='6' width='2' height='9' fill='%23fff3cd'/%3E%3Crect x='7' y='1' width='2' height='6' fill='%23f4c67b'/%3E%3Crect x='5' y='3' width='6' height='2' fill='%23f4c67b'/%3E%3Crect x='6' y='14' width='4' height='1' fill='%23b98a45'/%3E%3Crect x='4' y='1' width='1' height='1' fill='%2380eee2'/%3E%3Crect x='11' y='1' width='1' height='1' fill='%2380eee2'/%3E%3C/svg%3E");--icon-sword:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='9' fill='%23fff3cd'/%3E%3Crect x='8' y='1' width='1' height='9' fill='%23c9c3e6'/%3E%3Crect x='4' y='10' width='8' height='2' fill='%23f4c67b'/%3E%3Crect x='7' y='12' width='2' height='2' fill='%23b98a45'/%3E%3Crect x='6' y='14' width='4' height='1' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-reload:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='4' y='2' width='7' height='2' fill='%23fff3cd'/%3E%3Crect x='11' y='1' width='1' height='4' fill='%23fff3cd'/%3E%3Crect x='12' y='2' width='1' height='2' fill='%23fff3cd'/%3E%3Crect x='2' y='4' width='2' height='6' fill='%23fff3cd'/%3E%3Crect x='5' y='12' width='7' height='2' fill='%23fff3cd'/%3E%3Crect x='4' y='11' width='1' height='4' fill='%23fff3cd'/%3E%3Crect x='3' y='12' width='1' height='2' fill='%23fff3cd'/%3E%3Crect x='12' y='6' width='2' height='6' fill='%23fff3cd'/%3E%3C/svg%3E");--icon-cannon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='7' width='10' height='4' fill='%23fff3cd'/%3E%3Crect x='11' y='6' width='3' height='6' fill='%23fff3cd'/%3E%3Crect x='4' y='11' width='3' height='3' fill='%23b98a45'/%3E%3Crect x='9' y='11' width='3' height='3' fill='%23b98a45'/%3E%3Crect x='1' y='8' width='1' height='2' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-anvil:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'%3E%3Crect x='1' y='2' width='10' height='3' fill='%23231a2e'/%3E%3Crect x='4' y='5' width='4' height='3' fill='%23231a2e'/%3E%3Crect x='2' y='8' width='8' height='2' fill='%23231a2e'/%3E%3C/svg%3E");--icon-crate:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'%3E%3Crect x='1' y='1' width='10' height='2' fill='%23231a2e'/%3E%3Crect x='1' y='9' width='10' height='2' fill='%23231a2e'/%3E%3Crect x='1' y='1' width='2' height='10' fill='%23231a2e'/%3E%3Crect x='9' y='1' width='2' height='10' fill='%23231a2e'/%3E%3Crect x='3' y='5' width='6' height='2' fill='%23231a2e'/%3E%3C/svg%3E");--icon-banner:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='1' height='12' fill='%23231a2e'/%3E%3Crect x='3' y='1' width='7' height='6' fill='%23231a2e'/%3E%3Crect x='5' y='7' width='5' height='2' fill='%23231a2e'/%3E%3C/svg%3E");--icon-up:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='7' y='2' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='5' y='4' width='6' height='2' fill='%23fff3cd'/%3E%3Crect x='3' y='6' width='10' height='2' fill='%23fff3cd'/%3E%3Crect x='6' y='8' width='4' height='6' fill='%23fff3cd'/%3E%3Crect x='6' y='13' width='4' height='1' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-down:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='6' y='2' width='4' height='6' fill='%23fff3cd'/%3E%3Crect x='3' y='8' width='10' height='2' fill='%23fff3cd'/%3E%3Crect x='5' y='10' width='6' height='2' fill='%23fff3cd'/%3E%3Crect x='7' y='12' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='6' y='2' width='4' height='1' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-pod:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='6' y='2' width='4' height='2' fill='%23f4c67b'/%3E%3Crect x='4' y='4' width='8' height='2' fill='%23f4c67b'/%3E%3Crect x='5' y='6' width='6' height='5' fill='%23fff3cd'/%3E%3Crect x='4' y='8' width='8' height='2' fill='%23fff3cd'/%3E%3Crect x='6' y='11' width='1' height='3' fill='%23ff8a7a'/%3E%3Crect x='9' y='11' width='1' height='3' fill='%23ff8a7a'/%3E%3Crect x='7' y='12' width='2' height='3' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-pin:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='5' y='1' width='6' height='2' fill='%23fff3cd'/%3E%3Crect x='3' y='3' width='10' height='5' fill='%23fff3cd'/%3E%3Crect x='5' y='8' width='6' height='2' fill='%23fff3cd'/%3E%3Crect x='7' y='10' width='2' height='4' fill='%23fff3cd'/%3E%3Crect x='6' y='4' width='4' height='3' fill='%235966a1'/%3E%3Crect x='6' y='14' width='4' height='1' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-box:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='4' width='12' height='10' fill='%23fff3cd'/%3E%3Crect x='2' y='4' width='12' height='2' fill='%23f4c67b'/%3E%3Crect x='7' y='4' width='2' height='10' fill='%23b98a45'/%3E%3Crect x='2' y='8' width='12' height='1' fill='%23b98a45'/%3E%3Crect x='4' y='2' width='8' height='2' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-gate:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='4' width='2' height='10' fill='%23fff3cd'/%3E%3Crect x='12' y='4' width='2' height='10' fill='%23fff3cd'/%3E%3Crect x='4' y='2' width='8' height='2' fill='%23fff3cd'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='11' y='3' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='5' y='5' width='1' height='9' fill='%23b98a45'/%3E%3Crect x='7' y='5' width='1' height='9' fill='%23b98a45'/%3E%3Crect x='9' y='5' width='1' height='9' fill='%23b98a45'/%3E%3Crect x='11' y='5' width='1' height='9' fill='%23b98a45'/%3E%3Crect x='4' y='8' width='8' height='1' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-ship:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='1' height='9' fill='%23fff3cd'/%3E%3Crect x='8' y='2' width='4' height='6' fill='%23f4c67b'/%3E%3Crect x='2' y='10' width='12' height='2' fill='%23fff3cd'/%3E%3Crect x='3' y='12' width='10' height='2' fill='%23b98a45'/%3E%3Crect x='1' y='9' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='13' y='9' width='2' height='2' fill='%23fff3cd'/%3E%3C/svg%3E");--icon-wheel:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='5' y='1' width='6' height='2' fill='%23fff3cd'/%3E%3Crect x='3' y='3' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='11' y='3' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='1' y='5' width='2' height='6' fill='%23fff3cd'/%3E%3Crect x='13' y='5' width='2' height='6' fill='%23fff3cd'/%3E%3Crect x='3' y='11' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='11' y='11' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='5' y='13' width='6' height='2' fill='%23fff3cd'/%3E%3Crect x='7' y='3' width='2' height='10' fill='%23f4c67b'/%3E%3Crect x='3' y='7' width='10' height='2' fill='%23f4c67b'/%3E%3Crect x='6' y='6' width='4' height='4' fill='%23fff3cd'/%3E%3C/svg%3E");--icon-hammer:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='2' width='8' height='4' fill='%23fff3cd'/%3E%3Crect x='2' y='2' width='8' height='1' fill='%23f4c67b'/%3E%3Crect x='10' y='3' width='2' height='2' fill='%23b98a45'/%3E%3Crect x='6' y='6' width='2' height='9' fill='%23b98a45'/%3E%3Crect x='5' y='14' width='4' height='1' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-star:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='7' y='1' width='2' height='4' fill='%23f4c67b'/%3E%3Crect x='1' y='6' width='14' height='2' fill='%23f4c67b'/%3E%3Crect x='4' y='8' width='8' height='2' fill='%23f4c67b'/%3E%3Crect x='3' y='10' width='4' height='4' fill='%23f4c67b'/%3E%3Crect x='9' y='10' width='4' height='4' fill='%23f4c67b'/%3E%3Crect x='6' y='5' width='4' height='1' fill='%23f4c67b'/%3E%3Crect x='7' y='7' width='2' height='2' fill='%23fff3cd'/%3E%3C/svg%3E");--icon-seat:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='4' y='2' width='2' height='10' fill='%23fff3cd'/%3E%3Crect x='4' y='8' width='9' height='2' fill='%23fff3cd'/%3E%3Crect x='11' y='10' width='2' height='4' fill='%23fff3cd'/%3E%3Crect x='4' y='12' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='5' y='3' width='1' height='5' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-door:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='3' y='1' width='10' height='14' fill='%23fff3cd'/%3E%3Crect x='5' y='3' width='6' height='12' fill='%23b98a45'/%3E%3Crect x='9' y='8' width='1' height='2' fill='%23f4c67b'/%3E%3Crect x='13' y='7' width='2' height='2' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-wrench:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='9' y='1' width='4' height='2' fill='%23fff3cd'/%3E%3Crect x='12' y='2' width='2' height='3' fill='%23fff3cd'/%3E%3Crect x='10' y='4' width='2' height='2' fill='%23fff3cd'/%3E%3Crect x='8' y='5' width='3' height='3' fill='%23fff3cd'/%3E%3Crect x='6' y='7' width='3' height='3' fill='%23fff3cd'/%3E%3Crect x='4' y='9' width='3' height='3' fill='%23fff3cd'/%3E%3Crect x='2' y='11' width='3' height='3' fill='%23fff3cd'/%3E%3Crect x='9' y='1' width='1' height='1' fill='%23f4c67b'/%3E%3C/svg%3E");--icon-podI:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='6' y='2' width='4' height='2' fill='%23231a2e'/%3E%3Crect x='4' y='4' width='8' height='2' fill='%23231a2e'/%3E%3Crect x='5' y='6' width='6' height='5' fill='%23231a2e'/%3E%3Crect x='4' y='8' width='8' height='2' fill='%23231a2e'/%3E%3Crect x='6' y='11' width='1' height='3' fill='%23b0412e'/%3E%3Crect x='9' y='11' width='1' height='3' fill='%23b0412e'/%3E%3Crect x='7' y='12' width='2' height='3' fill='%23231a2e'/%3E%3C/svg%3E");--icon-pinI:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='5' y='1' width='6' height='2' fill='%23231a2e'/%3E%3Crect x='3' y='3' width='10' height='5' fill='%23231a2e'/%3E%3Crect x='5' y='8' width='6' height='2' fill='%23231a2e'/%3E%3Crect x='7' y='10' width='2' height='4' fill='%23231a2e'/%3E%3Crect x='6' y='4' width='4' height='3' fill='%23fff3cd'/%3E%3Crect x='6' y='14' width='4' height='1' fill='%235966a1'/%3E%3C/svg%3E");--icon-hammerI:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='2' y='2' width='8' height='4' fill='%23231a2e'/%3E%3Crect x='10' y='3' width='2' height='2' fill='%235966a1'/%3E%3Crect x='6' y='6' width='2' height='9' fill='%235966a1'/%3E%3Crect x='5' y='14' width='4' height='1' fill='%23231a2e'/%3E%3C/svg%3E");--icon-map:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect x='1' y='2' width='14' height='12' fill='%23231a2e'/%3E%3Crect x='2' y='3' width='12' height='10' fill='%23fff3cd'/%3E%3Crect x='4' y='5' width='3' height='1' fill='%23231a2e'/%3E%3Crect x='9' y='9' width='3' height='1' fill='%23231a2e'/%3E%3Crect x='7' y='6' width='2' height='3' fill='%235966a1'/%3E%3Crect x='11' y='4' width='2' height='2' fill='%23f4c67b'/%3E%3C/svg%3E")}
body.in-battle{--hud-top-h:48px;--hud-bottom-h:84px;--hud-lane:28px;--hud-edge:12px;--hud-panel:var(--ui-panel);--hud-frame:inset 0 0 0 1px var(--ui-gold-lo),3px 3px 0 #231a2e88}
.in-battle .telemetry,.in-battle #defense-panel,.in-battle .keys{display:none}
/* With the HUD extension running (body.hud-on) the sandbox header and pod panel give way to the HUD roots. */
body.in-battle.hud-on>header,.in-battle.hud-on .travel{display:none}
body.in-battle:not(.hud-on) #battle-hud{width:min(560px,calc(100vw - 24px));padding:8px 10px;background:var(--ui-panel);border:2px solid var(--ui-ink);box-shadow:3px 3px 0 #231a2e88}body.in-battle:not(.hud-on) #battle-towers{margin-top:8px;justify-content:center}
.in-battle:after{content:'';position:fixed;inset:0;box-shadow:inset 0 0 95px rgba(255,54,102,var(--battle-hit,0));pointer-events:none;z-index:4}
/* reduced motion (motion-pref.js / <html data-motion>): the own-hit glow is a faint, narrow edge tint, not a full-screen pulse */
@media (prefers-reduced-motion:reduce){:root:not([data-motion="full"]) .in-battle:after{box-shadow:inset 0 0 28px rgba(255,54,102,calc(var(--battle-hit,0)*.3))}}:root[data-motion="reduce"] .in-battle:after{box-shadow:inset 0 0 28px rgba(255,54,102,calc(var(--battle-hit,0)*.3))}
#hud-top,#hud-hotbar,#hud-player,#hud-actions{display:none}
body.in-battle #hud-top,body.in-battle #hud-hotbar,body.in-battle #hud-actions{display:flex}body.in-battle #hud-player{display:grid}
.hud-root{position:fixed;z-index:10;pointer-events:none;font-family:var(--ui-body);color:var(--ui-parchment);font-variant-ligatures:none}
.hud-root button,#battle-fire,#battle-radar,.in-battle .compass button{pointer-events:auto;border-radius:0}
.hud-root button{font:12px/1 var(--ui-body);color:var(--ui-parchment);background:linear-gradient(var(--ui-raise),var(--ui-raise-lo));border:2px solid var(--ui-ink);box-shadow:inset 0 0 0 1px #ffffff1c,2px 2px 0 #231a2e88;text-shadow:1px 1px 0 var(--ui-ink);padding:0 10px}
.hud-root button:hover{color:var(--ui-gold-hi);border-color:var(--ui-ink);background:linear-gradient(#34497a,var(--ui-raise))}
.hud-root button:disabled{opacity:.45;cursor:default;filter:saturate(.4)}
.hud-root button:focus-visible{outline:2px solid var(--ui-gold);outline-offset:1px}
.slot-key{font:12px/1 var(--ui-label);letter-spacing:0;text-transform:uppercase;color:var(--ui-ink);background:var(--ui-gold);padding:2px 3px;text-shadow:none;box-shadow:1px 1px 0 var(--ui-ink)}.slot-sep{display:none}

/* Top strip: Menu | Dawn bars · clock · Dusk bars + five silo pips | View, SFX, Map, Pause. */
#hud-top{top:calc(env(safe-area-inset-top,0px) + 4px);left:50%;transform:translateX(-50%);height:40px;max-width:calc(100vw - 16px);align-items:center;gap:8px;padding:0 5px;background:var(--hud-panel);border:2px solid var(--ui-ink);box-shadow:var(--hud-frame)}
#hud-top .hud-slot{display:flex;align-items:center;gap:4px;min-width:0}#hud-top .hud-centre{flex:1 1 auto;justify-content:center}
#hud-top button{height:30px;white-space:nowrap}
#battle-toggle{font-weight:700;color:var(--ui-gold-hi)}
#hud-top #overview{font-size:12px;padding:0 8px}
#hud-top #battle-sound{font:12px/1 var(--ui-label);padding:0 6px;min-width:44px}
#hud-map{display:flex;align-items:center;gap:5px;padding:0 8px}
#hud-top #pause{min-width:52px}
#hud-score{display:flex;align-items:center;gap:5px;padding:0 8px}#hud-score[data-on="true"]{color:var(--ui-gold-hi);box-shadow:inset 0 0 0 1px var(--ui-gold),2px 2px 0 #231a2e88}
#battle-hud{position:fixed;left:50%;top:79px;transform:translateX(-50%);pointer-events:none}
#hud-top #battle-hud{position:static;transform:none;width:auto;padding:0;margin:0;background:none;border:0;box-shadow:none;display:flex;align-items:center;gap:10px}
.core-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:center}
#hud-top .core-row{width:360px}
.core{display:grid;gap:3px;min-width:0}.core>strong{font:12px/8px var(--ui-label);letter-spacing:.04em;color:var(--ui-dawn);white-space:nowrap;overflow:hidden;font-weight:400}.core.dusk>strong{color:var(--ui-dusk);text-align:right}
.castle-resource{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;margin:0;font:12px/8px var(--ui-label)}.castle-resource>span{display:none}
.castle-resource b{grid-row:1;grid-column:2;font:700 12px/11px var(--ui-body);color:var(--ui-parchment);white-space:nowrap;float:none!important;letter-spacing:0;text-shadow:1px 1px 0 var(--ui-ink);font-variant-numeric:tabular-nums}
.castle-resource i{grid-row:1;grid-column:1;display:block;height:7px;margin:0;background:var(--ui-ink);border:1px solid var(--ui-ink);box-shadow:inset 0 0 0 1px #ffffff12}
.castle-resource em{display:block;height:100%;background:var(--ui-dawn)}.core.dusk .castle-resource em{background:var(--ui-dusk);margin-left:auto}
.castle-resource.shield em{background:repeating-linear-gradient(90deg,#c9f4ff 0 5px,#7fc1e0 5px 6px)}.castle-resource.shield b{color:#c9f4ff}
.core.dusk .castle-resource{grid-template-columns:auto minmax(0,1fr)}.core.dusk .castle-resource b{grid-column:1}.core.dusk .castle-resource i{grid-column:2}
.battle-clock-wrap{text-align:center;min-width:48px}.battle-clock-wrap small{display:block;font:12px/8px var(--ui-label);letter-spacing:.04em;color:var(--ui-parchment-dim);margin:0 0 3px}#battle-clock{display:block;font:700 16px/16px var(--ui-body);color:var(--ui-gold-hi);text-shadow:var(--ui-shadow)}
#battle-hud[data-phase="evacuation"] #battle-clock,#battle-hud[data-phase="evacuation"] #battle-clock-label{color:#ffb47a}
#battle-towers{display:flex;gap:4px;margin:0}
#hud-top .tower-capture{position:relative;flex:none;width:24px;height:24px;padding:0;margin:0;border:2px solid var(--ui-ink);background:var(--ui-stone);overflow:hidden;box-shadow:inset 0 0 0 1px #fff3cd99}
.tower-capture>b,.tower-capture>span,.tower-charge-label{display:none}
.tower-capture .pip-id{position:absolute;inset:0;z-index:2;display:grid;place-items:center;font:12px/1 var(--ui-label);font-style:normal;color:var(--ui-ink)}
.tower-capture .charge-meter{position:absolute;left:0;top:0;bottom:3px;width:100%;height:auto;margin:0;background:none;display:block}.tower-capture .charge-meter em{display:block;height:100%;background:#f4c67bb8;box-shadow:none}
.tower-capture .capture-meter{position:absolute;left:0;right:0;bottom:0;height:3px;margin:0;background:var(--ui-ink);display:block;z-index:1}.tower-capture .capture-meter em{display:block;height:100%}
.tower-capture[data-owner="0"]{background:var(--ui-dawn)}.tower-capture[data-owner="1"]{background:var(--ui-dusk)}
.tower-capture:last-child{border-color:var(--ui-gold-lo);box-shadow:inset 0 0 0 1px var(--ui-gold-hi)}
.tower-capture[data-firing="1"]{animation:hud-pip-fire .6s steps(2) infinite}@media (prefers-reduced-motion:reduce){.tower-capture[data-firing="1"]{animation:none}}:root[data-motion="reduce"] .tower-capture[data-firing="1"]{animation:none}
@keyframes hud-pip-fire{50%{box-shadow:inset 0 0 0 3px var(--ui-gold-hi);filter:brightness(1.25)}}

/* Evacuation banner and toasts sit under the strip; the first lane (--hud-lane) is left for the objective line. */
#battle-evacuation{display:grid;gap:3px;color:#ffe3b4}
body.in-battle #battle-evacuation{position:fixed;z-index:12;left:50%;top:calc(var(--hud-top-h) + var(--hud-lane));transform:translateX(-50%);width:min(440px,calc(100vw - 24px));margin:0;padding:6px 12px;text-align:center;pointer-events:none;background:#5a3427f2;border:2px solid var(--ui-ink);box-shadow:inset 0 0 0 1px #e4a46d,3px 3px 0 #231a2e88;animation:hud-evac 1.2s steps(2) infinite}
#battle-evacuation b{font:16px/16px var(--ui-label);letter-spacing:.02em;font-weight:400}#battle-evacuation span{font:12px/1.4 var(--ui-body)}
#battle-evacuation[data-safe="true"]{background:#20453ef2;box-shadow:inset 0 0 0 1px var(--ui-good),3px 3px 0 #231a2e88;color:#d6f8e2;animation:none}
@keyframes hud-evac{50%{box-shadow:inset 0 0 0 2px #ffb47a,3px 3px 0 #231a2e88}}
body.in-battle #message{position:fixed;z-index:12;top:calc(var(--hud-top-h) + var(--hud-lane));bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:min(480px,calc(100vw - 420px));padding:5px 12px;margin:0;font:12px/18px var(--ui-body);font-variant-ligatures:none;color:var(--ui-parchment);text-align:center;text-shadow:1px 1px 0 var(--ui-ink);background:var(--hud-panel);border:2px solid var(--ui-ink);box-shadow:var(--hud-frame);pointer-events:none;opacity:0;transition:opacity .6s steps(4);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal}
body.in-battle #message.fresh{opacity:1;transition:opacity .12s}body.in-battle #message:empty{display:none}
body.in-battle.hud-evacuating #message{top:calc(var(--hud-top-h) + var(--hud-lane) + 72px)}
/* While an announcer banner shows (body.announcing) the toast drops below it; compact layouts hide it for those 2 s instead. */
body.in-battle.announcing #message{top:calc(var(--hud-top-h) + var(--hud-lane) + 96px)}body.in-battle.hud-evacuating.announcing #message{top:calc(var(--hud-top-h) + var(--hud-lane) + 152px)}

/* Radar (parchment sky chart, drawn by battle-map.js) with the camera compass under it. */
#battle-radar{position:fixed;z-index:10;left:calc(var(--hud-edge,12px) + env(safe-area-inset-left,0px));top:calc(var(--hud-top-h,48px) + var(--hud-lane,28px));padding:0;margin:0;display:block;background:var(--ui-parchment);border:2px solid var(--ui-ink);box-shadow:3px 3px 0 #231a2e88;cursor:pointer;line-height:0}
#battle-radar:hover{background:var(--ui-parchment);border-color:var(--ui-ink);box-shadow:0 0 0 2px var(--ui-gold),3px 3px 0 #231a2e88}
#battle-radar canvas{display:block;width:160px;height:113px;image-rendering:pixelated}
#battle-radar .radar-key{position:absolute;left:4px;bottom:4px}
/* Touch has no M key and no Map button: the radar carries its own 'Map' caption there (bottom centre, clear of the silo dots). */
#battle-radar .radar-caption{display:none}
.radar-key,#spawn-map-close b{font:12px/1 var(--ui-label);color:var(--ui-gold-hi);background:var(--ui-ink);padding:2px 3px}
#battle-radar[hidden],#spawn-map[hidden]{display:none}
body.inspecting-bots #battle-radar{display:none}
.in-battle .compass{position:fixed;z-index:10;left:calc(var(--hud-edge,12px) + env(safe-area-inset-left,0px));right:auto;top:calc(var(--hud-top-h) + var(--hud-lane) + 123px);bottom:auto;transform:none;width:164px;height:32px;padding:0 2px;gap:2px;justify-content:space-between;background:var(--hud-panel);border:2px solid var(--ui-ink);box-shadow:var(--hud-frame);font-family:var(--ui-body)}
.in-battle .compass button{height:26px;padding:0 8px;font:12px/1 var(--ui-body);background:transparent;border:0;box-shadow:none;color:var(--ui-parchment)}.in-battle .compass button:hover{color:var(--ui-gold-hi)}
.in-battle .compass span{font:12px/1 var(--ui-label);color:var(--ui-gold-hi);min-width:0}

/* Hotbar: weapon slots (key, icon, name), reload, fighter sword or mounted battery; one plated cadence line above (ammo/state). */
#hud-hotbar{left:50%;bottom:calc(var(--hud-edge,12px) + env(safe-area-inset-bottom,0px));transform:translateX(-50%);flex-direction:column;align-items:center;gap:2px;max-width:calc(100vw - 24px)}
#battle-cadence{display:block;width:max-content;max-width:100%;box-sizing:border-box;min-height:0;margin:0;padding:1px 8px;font:12px/14px var(--ui-body);font-variant-ligatures:none;color:var(--ui-gold-hi);text-shadow:1px 1px 0 var(--ui-ink);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#231a2ed9;border:1px solid var(--ui-gold-lo);box-shadow:2px 2px 0 #231a2e88}#battle-cadence:empty{display:none}
.hud-hotbar-caption{display:none}
.hud-hotbar-row{display:flex;align-items:flex-end;gap:4px}
#hud-hotbar #battle-weapons{display:flex;gap:4px;margin:0}
#hud-hotbar #battle-weapons button,#hud-hotbar #battle-reload,.hud-slot-static{position:relative;width:60px;height:52px;padding:0 2px 4px;margin:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:0;font:12px/8px var(--ui-label);letter-spacing:0;text-transform:uppercase;text-align:center;white-space:normal;overflow:hidden;color:var(--ui-parchment);background:linear-gradient(var(--ui-raise),var(--ui-raise-lo));border:2px solid var(--ui-ink);box-shadow:inset 0 0 0 1px #ffffff1c,2px 2px 0 #231a2e88;text-shadow:1px 1px 0 var(--ui-ink)}
#hud-hotbar #battle-weapons button::before,#hud-hotbar #battle-reload::before,.hud-slot-static::before{content:'';position:absolute;left:50%;top:6px;width:16px;height:16px;margin-left:-8px;background:var(--slot-icon,none) center/16px 16px no-repeat;image-rendering:pixelated}
#battle-weapons .slot-key,#battle-reload .slot-key,.hud-slot-static .slot-key{position:absolute;left:2px;top:2px}
#battle-weapons .slot-name,#battle-reload .slot-name,.hud-slot-static .slot-name{display:block;max-height:16px;overflow:hidden;word-break:break-word}
#hud-hotbar #battle-weapons button[aria-pressed=true]{color:var(--ui-gold-hi);background:linear-gradient(#3e548a,var(--ui-raise));border-color:var(--ui-ink);box-shadow:0 0 0 2px var(--ui-gold),inset 0 0 0 1px var(--ui-gold-hi),2px 2px 0 #231a2e88}
#battle-weapons button:disabled{opacity:.4}
#battle-weapons button[data-weapon="0"]{--slot-icon:var(--icon-lance)}#battle-weapons button[data-weapon="1"]{--slot-icon:var(--icon-fan)}#battle-weapons button[data-weapon="2"]{--slot-icon:var(--icon-orbit)}#battle-weapons button[data-weapon="3"]{--slot-icon:var(--icon-longbow)}#battle-weapons button[data-weapon="4"]{--slot-icon:var(--icon-firepot)}#battle-weapons button[data-weapon="5"]{--slot-icon:var(--icon-reviver)}
#hud-hotbar #battle-reload{width:52px;margin-left:6px;--slot-icon:var(--icon-reload)}
.hud-slot-static{pointer-events:none;background:linear-gradient(#3e548a,var(--ui-raise));box-shadow:0 0 0 2px var(--ui-gold),inset 0 0 0 1px var(--ui-gold-hi),2px 2px 0 #231a2e88;color:var(--ui-gold-hi)}
#hud-sword{--slot-icon:var(--icon-sword)}#hud-mount{--slot-icon:var(--icon-cannon);width:auto;min-width:60px;max-width:132px;padding:0 6px 4px}

/* Player card: class badge, HP bar in the ally colour, K/D or respawn, profession pockets. */
#hud-player{left:calc(var(--hud-edge,12px) + env(safe-area-inset-left,0px));bottom:calc(var(--hud-edge,12px) + env(safe-area-inset-bottom,0px));width:208px;padding:6px 8px;gap:4px 8px;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"cls health" "bar bar" "life life" "status status";align-items:center;background:var(--hud-panel);border:2px solid var(--ui-ink);box-shadow:var(--hud-frame);--hud-ally:var(--ui-dawn)}
#hud-player[data-team="1"]{--hud-ally:var(--ui-dusk)}
.hud-player-head{grid-area:cls;display:flex}.hud-class{font:12px/1 var(--ui-label);letter-spacing:.04em;text-transform:uppercase;color:var(--ui-ink);background:var(--hud-ally);padding:3px 4px;box-shadow:1px 1px 0 var(--ui-ink)}
#hud-player .battle-player{display:contents}
#battle-health{grid-area:health;font:12px/16px var(--ui-body);color:var(--ui-parchment);text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:1px 1px 0 var(--ui-ink)}
#hud-player .battle-player>i{grid-area:bar;display:block;height:8px;margin:0;background:var(--ui-ink);border:1px solid var(--ui-ink);box-shadow:inset 0 0 0 1px #ffffff12}
#battle-health-fill{display:block;height:100%;background:var(--hud-ally);box-shadow:inset 0 -2px 0 #0003}
#battle-life{grid-area:life;font:12px/16px var(--ui-body);font-weight:400;color:var(--ui-parchment-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hud-player #profession-status{grid-area:status;font:12px/10px var(--ui-label);text-transform:uppercase;letter-spacing:0;color:var(--ui-gold-hi);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:10px}
#hud-player #profession-status{display:none}#hud-status{grid-area:status;font:12px/16px var(--ui-body);color:var(--ui-gold-hi);white-space:normal;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:32px;text-shadow:1px 1px 0 var(--ui-ink)}#hud-status:empty{display:none}
#hud-player.down{box-shadow:inset 0 0 0 1px var(--ui-bad),3px 3px 0 #231a2e88}#hud-player.down #battle-life{color:var(--ui-bad)}

/* Context chips: only the actions that apply right now (at most three). */
#hud-actions{right:calc(var(--hud-edge,12px) + env(safe-area-inset-right,0px));bottom:calc(var(--hud-edge,12px) + env(safe-area-inset-bottom,0px));flex-direction:column;align-items:flex-end;gap:6px;max-width:min(330px,calc(100vw - 24px))}
#hud-actions[data-count="0"]{display:none!important}
.hud-chip{display:flex;align-items:stretch;justify-content:flex-end;gap:4px;max-width:100%}
.hud-chip button{position:relative;display:block;height:32px;max-width:250px;line-height:28px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.hud-chip button .slot-key{margin-right:6px;vertical-align:1px}
@media not all and (pointer:coarse){.hud-chip button:not([data-hud-slot]):not(#launch):not(.hud-cycle)::first-letter{font:12px/1 var(--ui-label);color:var(--ui-ink);background:var(--ui-gold);padding:2px 3px;margin-right:1px;text-shadow:none}}
#battle-restock{--chip-icon:var(--icon-box)}#battle-gate{--chip-icon:var(--icon-gate)}#fleet-enter{--chip-icon:var(--icon-ship)}#chariot-enter{--chip-icon:var(--icon-wheel)}#battle-repair{--chip-icon:var(--icon-wrench)}#battle-ward{--chip-icon:var(--icon-star)}#battle-build{--chip-icon:var(--icon-hammer)}#hud-plan-cycle{--chip-icon:var(--icon-hammerI)}#hud-actions #launch{--chip-icon:var(--icon-podI)}#hud-dest-cycle{--chip-icon:var(--icon-pinI)}#fleet-seat{--chip-icon:var(--icon-seat)}#fleet-up{--chip-icon:var(--icon-up)}#fleet-down{--chip-icon:var(--icon-down)}.hud-chip[data-chip=vehicle] #fleet-enter{--chip-icon:var(--icon-door)}
.hud-root #launch{width:auto;margin:0;font:700 12px/28px var(--ui-body);letter-spacing:.02em;color:var(--ui-ink);background:linear-gradient(var(--ui-gold-hi),var(--ui-gold));text-shadow:none;box-shadow:inset 0 -2px 0 var(--ui-gold-lo),2px 2px 0 #231a2e88}
.hud-root #launch span{display:inline;margin:0 0 0 6px;font:12px/1 var(--ui-label);letter-spacing:0;color:var(--ui-gold-hi);background:var(--ui-ink);padding:2px 3px;vertical-align:1px}
.hud-root #launch:disabled{opacity:.55}
.hud-chip select{display:none}
.hud-root .hud-cycle{color:var(--ui-ink);background:linear-gradient(var(--ui-parchment),var(--ui-stone));text-shadow:none;max-width:150px}
/* Desktop pod pair: the destination chip and the launch pill keep their words whole (never shrunk into an ellipsis; a pair wider
   than the action column grows to the left instead). */
@media not all and (pointer:coarse){.hud-root .hud-cycle::after{content:' \25B8'}.hud-chip[data-chip="pod"]>button{flex:none}}
.hud-chip[data-chip="vehicle"]{flex-wrap:wrap;max-width:330px}
#fleet-status{flex:1 0 100%;display:block;box-sizing:border-box;margin:0;padding:1px 6px;font:12px/16px var(--ui-body);font-variant-ligatures:none;color:var(--ui-parchment);text-align:right;text-shadow:1px 1px 0 var(--ui-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#231a2ed9;border:1px solid var(--ui-gold-lo);box-shadow:2px 2px 0 #231a2e88}#fleet-status:empty{display:none}
/* Cooldowns (battle-hud.js .hud-cd, contract 2): a stepped shade for what is left (--cd 1..0, 16 steps) plus the seconds. Wide
   chips wipe left to right with a seconds badge; square slots and touch tiles sweep like a clock with the seconds over the icon. */
.hud-cd{position:absolute;inset:0;display:block;pointer-events:none;background:linear-gradient(90deg,transparent calc((1 - var(--cd,0)) * 100%),#231a2ea8 0)}.hud-cd[hidden]{display:none}
.hud-cd::after{content:attr(data-cd);position:absolute;right:3px;top:50%;margin-top:-8px;padding:0 4px;font:700 12px/16px var(--ui-body);color:var(--ui-gold-hi);background:var(--ui-ink);text-shadow:none;font-variant-numeric:tabular-nums}.hud-cd[data-cd=""]::after{display:none}
.hud-cd[data-kind=mana]::after{color:#9fd8ff}.hud-cd[data-kind=build]{background:linear-gradient(90deg,#f4c67b59 calc((1 - var(--cd,0)) * 100%),transparent 0)}.hud-root .hud-chip button.cooling:not(#battle-build){color:var(--ui-parchment-dim)}@media not all and (pointer:coarse){.hud-root .hud-chip button.cooling:not(#battle-build){padding-right:40px}}
#battle-reload .hud-cd,.hud-slot-static .hud-cd{background:linear-gradient(0deg,transparent calc((1 - var(--cd,0)) * 100%),#231a2ec0 0)}
#battle-reload .hud-cd::after{left:0;right:0;top:4px;margin:0;padding:0;background:none;text-align:center;font:700 16px/16px var(--ui-body);text-transform:none;text-shadow:1px 0 0 var(--ui-ink),-1px 0 0 var(--ui-ink),0 1px 0 var(--ui-ink),0 -1px 0 var(--ui-ink),2px 2px 0 var(--ui-ink)}

/* Touch FIRE (and the move pad) exist only for touch-style input. */
#battle-fire{position:fixed;z-index:10;right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));width:88px;height:88px;margin:0;padding:0;border-radius:50%;display:grid;place-content:center;justify-items:center;gap:4px;font:700 16px/1 var(--ui-body);letter-spacing:.04em;color:var(--ui-ink);background:radial-gradient(circle at 35% 30%,var(--ui-gold-hi),var(--ui-gold) 55%,var(--ui-gold-lo));border:3px solid var(--ui-ink);box-shadow:inset 0 -5px 0 #0000002e,3px 3px 0 #231a2e88;text-shadow:none;touch-action:none;user-select:none;-webkit-user-select:none}
#battle-fire small{display:none}.hud-fire-ammo{font:12px/1 var(--ui-label);letter-spacing:0;color:var(--ui-ink)}.hud-fire-ammo:empty{display:none}
#battle-fire:active,#battle-fire[data-held]{transform:translateY(2px) scale(.96);background:radial-gradient(circle at 50% 55%,var(--ui-gold),var(--ui-gold-lo));box-shadow:inset 0 4px 0 #0000003d,1px 1px 0 #231a2e88}
body:not(.in-battle) #battle-fire{display:none}
.in-battle footer{left:calc(16px + env(safe-area-inset-left,0px));right:auto;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:10;gap:0}
.in-battle .move-zone{gap:0}
.in-battle #pad{width:120px;height:120px;border:2px solid var(--ui-ink);background:radial-gradient(circle,#2a3b63cc 0 18%,transparent 19% 47%,#1d2a4bcc 48%);box-shadow:inset 0 0 0 2px #f4c67b66,3px 3px 0 #231a2e88}
.in-battle #pad:before,.in-battle #pad:after{left:59px;top:14px;height:92px;background:#fff3cd55}
.in-battle #pad i{left:43px;top:43px;width:32px;height:32px;border:2px solid var(--ui-ink);background:var(--ui-gold)}
.in-battle #pad span{font:12px/1 var(--ui-label);color:var(--ui-parchment);bottom:8px}
@media (hover:hover) and (pointer:fine){#battle-fire,.in-battle #pad{display:none}}

/* Combat bonuses stay at the owner's central-bottom spot; the kill feed sits top-right under the strip. */
#combat-feedback{pointer-events:none;position:fixed;z-index:12;right:calc(12px + env(safe-area-inset-right,0px));top:calc(var(--hud-top-h,48px) + var(--hud-lane,28px));left:auto;bottom:auto;width:240px;text-align:right}
#combat-feed{font:12px/1.6 var(--ui-body);color:var(--ui-parchment);text-shadow:var(--ui-shadow)}
#combat-score{position:fixed;z-index:12;left:50%;bottom:calc(var(--hud-bottom-h,84px) + 8px);transform:translateX(-50%);width:min(420px,calc(100vw - 24px));margin:0;text-align:center;font:700 20px/1.35 var(--ui-body);color:var(--ui-gold-hi);text-shadow:2px 2px 0 var(--ui-ink),-1px -1px 0 var(--ui-ink),1px -1px 0 var(--ui-ink),-1px 1px 0 var(--ui-ink);pointer-events:none}

/* Tactical board (bot decisions): hidden in play unless asked for (K / board-open, or held inspection). */
#battle-board{position:fixed;left:12px;top:126px;width:300px;max-height:calc(100dvh - 280px);overflow:auto;background:var(--ui-panel);border:2px solid var(--ui-ink);box-shadow:var(--hud-frame,3px 3px 0 #231a2e88);z-index:11;padding:8px 10px;color:var(--ui-parchment);font-family:var(--ui-body)}
body.in-battle:not(.board-open):not(.inspecting-bots) #battle-board{display:none}
body.in-battle #battle-board{left:calc(12px + env(safe-area-inset-left,0px));top:calc(var(--hud-top-h) + var(--hud-lane));width:min(320px,calc(100vw - 24px));max-height:calc(100dvh - var(--hud-top-h) - var(--hud-lane) - var(--hud-bottom-h) - 16px)}
#battle-board summary{font:12px/24px var(--ui-label);letter-spacing:.04em;color:var(--ui-gold-hi);cursor:pointer;min-height:24px}
#battle-board p{font-size:12px;line-height:1.5;color:var(--ui-parchment-dim)}
#battle-map{display:block;width:100%;height:auto;margin-top:6px;image-rendering:pixelated;border:2px solid var(--ui-ink)}
#battle-roster{display:grid;grid-template-columns:1fr 1fr;gap:3px}#battle-roster button{font:12px/1.2 var(--ui-body);padding:6px 4px;text-align:left;border-radius:0}#battle-roster [data-team="0"]{color:var(--ui-dawn)}#battle-roster [data-team="1"]{color:var(--ui-dusk)}
#battle-selected{position:sticky;top:0;z-index:1;background:var(--ui-panel-solid);border:2px solid var(--ui-ink);padding:8px;margin-top:8px}#battle-selected strong{display:block;font-size:12px;color:var(--ui-parchment)}#battle-selected p{margin:5px 0;overflow-wrap:anywhere}#battle-readiness{color:var(--ui-good)!important}#battle-goal,#battle-approaches{color:var(--ui-stone)!important}#battle-approaches:empty{display:none}
body.inspecting-bots #battle-board{top:calc(var(--hud-top-h,16px) + 8px);left:16px;right:auto;width:min(360px,calc(100vw - 32px));max-height:calc(100dvh - 160px);z-index:97}
body.inspecting-bots #pause-panel .cu-n20-pause{place-items:end center;padding:12px;background:none}body.inspecting-bots #pause-panel .cu-n20-pause-box{padding:10px;width:min(360px,calc(100vw - 24px))}body.inspecting-bots #pause-panel h2{font-size:14px;margin:0 0 8px}body.inspecting-bots #pause-panel small,body.inspecting-bots #pause-panel p,body.inspecting-bots #inspect-bots,body.inspecting-bots #frame-profile{display:none}
#pause-panel button:not(.cu-n20-pause-btn){min-height:44px;margin:3px}
body.in-battle.bot-board-open #frame-profile{display:none}
.in-battle #pause-panel{z-index:95}.in-battle #look-panel,.in-battle #controls-panel{z-index:96}
#battle-reticle{position:fixed;transform:translate(-50%,-50%);color:var(--ui-gold-hi);text-shadow:1px 1px var(--ui-ink),-1px -1px var(--ui-ink);font-size:30px;pointer-events:none;z-index:3}
#battle-explosion-white{position:fixed;inset:0;z-index:110;pointer-events:none;background:#fff;opacity:0;mix-blend-mode:screen}

/* Scoreboard overlay (battle-hud.js, body.scoreboard-open via K or the Score button): both teams, the viewer's row gilt. */
#hud-scoreboard{display:none;z-index:13;left:50%;top:calc(var(--hud-top-h,48px) + var(--hud-lane,28px));transform:translateX(-50%);width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - var(--hud-top-h,48px) - var(--hud-lane,28px) - 12px);overflow:auto;pointer-events:auto}
body.in-battle.scoreboard-open #hud-scoreboard{display:block}
.sb-frame{padding:8px 12px 12px;background:var(--ui-panel-solid,#1e2a4a);border:2px solid var(--ui-ink);box-shadow:inset 0 0 0 1px var(--ui-gold-lo),6px 6px 0 #231a2e88}
.sb-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 6px}.sb-head h2{margin:0;font:400 32px/1.1 var(--ui-display);letter-spacing:.02em;color:var(--ui-gold-hi);text-shadow:2px 2px 0 var(--ui-ink)}
.hud-root .sb-close{height:32px;display:flex;align-items:center;gap:6px}
.sb-teams{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.sb-team{--team:var(--ui-dawn)}.sb-team[data-team="1"]{--team:var(--ui-dusk)}
.sb-team h3{display:flex;align-items:baseline;justify-content:space-between;margin:0 0 4px;padding:2px 6px;font:700 16px/20px var(--ui-body);color:var(--ui-ink);background:var(--team);box-shadow:2px 2px 0 var(--ui-ink)}.sb-team h3 small{font:12px/1 var(--ui-label);text-transform:uppercase;letter-spacing:.04em}
.sb-team table{width:100%;border-collapse:collapse;font:12px/16px var(--ui-body);color:var(--ui-parchment);font-variant-numeric:tabular-nums}
.sb-team th{padding:3px 4px;font:12px/8px var(--ui-label);text-transform:uppercase;letter-spacing:.04em;color:var(--ui-parchment-dim);text-align:right;border-bottom:1px solid var(--ui-gold-lo)}.sb-team th:first-child,.sb-team td:first-child{text-align:left}
.sb-team td{padding:3px 4px;text-align:right;white-space:nowrap;border-bottom:1px solid #ffffff14}.sb-team td:first-child{max-width:150px;overflow:hidden;text-overflow:ellipsis;color:var(--team)}.sb-team td:nth-child(2){color:var(--ui-parchment-dim)}
.sb-team tr.down td{opacity:.6}.sb-team tr.you td{color:var(--ui-ink);background:var(--ui-gold-hi);text-shadow:none;opacity:1}

/* Battle gear left in the hidden pod panel (target picker, plan select, help) keeps a sane look if it is ever shown. */
#battle-fleet{padding:5px;border-top:1px solid #8fbdc4}#battle-fleet>div{display:flex;gap:3px;flex-wrap:wrap}#battle-fleet button{font-size:12px;padding:5px;min-height:30px}
.fleet-target-label{display:grid;gap:4px;margin:7px 0;font-size:12px;color:#c4f3df}#fleet-target{width:100%;min-width:0;min-height:44px;padding:6px;background:#193747;color:#f8e7c3;border:1px solid #91a6b1;font:inherit}
#fleet-boarding-hint{display:block;margin:7px 0;padding:7px;border:1px solid #b89d70;color:#f4d398;line-height:1.5}#fleet-boarding-hint[data-ready="true"]{border-color:#80eee2;color:#bcfff0}
#profession-tools{border-top:1px solid #a2c6bf;padding-top:8px;display:grid;gap:5px;font-size:12px}#profession-tools small{color:#c7cfba;line-height:1.4}#profession-tools label{display:grid;gap:4px}#profession-tools select{max-width:100%;background:#173440;color:#f0e2bd}

/* Deployment map: parchment chart dialog. */
#spawn-map{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:max(12px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(12px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));background:#231a2ec4;font-family:var(--ui-body);color:var(--ui-ink)}
.spawn-map-dialog{width:min(820px,100%);max-height:calc(100dvh - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)));overflow:auto;padding:14px 16px 16px;background:var(--ui-parchment);border:2px solid var(--ui-ink);box-shadow:inset 0 0 0 3px var(--ui-parchment),inset 0 0 0 4px var(--ui-gold-lo),6px 6px 0 #231a2e88}
.spawn-map-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:2px 12px;margin:0 0 10px}
.spawn-map-head small{grid-column:1;font:12px/1 var(--ui-label);letter-spacing:.06em;color:var(--ui-shade)}
.spawn-map-head h2{grid-column:1;margin:0;font:400 36px/1 var(--ui-display);letter-spacing:.02em;color:var(--ui-ink);text-shadow:2px 2px 0 var(--ui-stone)}
#spawn-map-close{grid-column:2;grid-row:1/3;align-self:center;display:flex;align-items:center;gap:6px;min-height:36px}
.spawn-map-body{display:grid;gap:10px}
.spawn-map-dialog canvas{display:block;width:min(100%,calc((100dvh - 116px - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px))) * 720 / 440));height:auto;margin:0 auto;image-rendering:pixelated;border:2px solid var(--ui-ink);cursor:crosshair}
#spawn-map-status{margin:0;font:12px/1.5 var(--ui-body);color:var(--ui-ink)}
#spawn-map-options{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
#spawn-map button{font:12px/1 var(--ui-body);color:var(--ui-ink);background:linear-gradient(var(--ui-parchment),var(--ui-stone));border:2px solid var(--ui-ink);border-radius:0;box-shadow:2px 2px 0 #231a2e66;padding:8px 10px;min-height:32px;text-shadow:none}
#spawn-map button:hover{background:var(--ui-gold-hi);color:var(--ui-ink)}
#spawn-map button[aria-pressed=true]{background:var(--ui-gold);color:var(--ui-ink);box-shadow:inset 0 0 0 1px var(--ui-ink),2px 2px 0 #231a2e66}
#spawn-map button:disabled{opacity:.5}
.spawn-map-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:10px 0 0;font:12px/1 var(--ui-label);text-transform:uppercase;color:var(--ui-ink)}.spawn-map-legend i{display:inline-block;width:10px;height:10px;border:2px solid var(--ui-ink);margin-right:2px;vertical-align:-2px}.spawn-map-legend .dawn{background:var(--ui-dawn)}.spawn-map-legend .dusk{background:var(--ui-dusk)}.spawn-map-legend .you{background:var(--ui-you);border-radius:50%}.spawn-map-legend .spawn{background:none;border-radius:50%;box-shadow:inset 0 0 0 2px var(--ui-dawn)}

/* World labels: silo pennants (swallow-tail, owner colour) and service pennants (team colour, kind icon). */
#silo-markers{position:fixed;inset:0;pointer-events:none;z-index:2}
.silo-marker{position:absolute;transform:translate(-50%,-100%);width:max-content;max-width:calc(100vw - 8px);min-width:64px;padding:4px 8px 10px;background:none;border:0;box-shadow:none;color:var(--ui-ink);text-align:center;font:12px/8px var(--ui-label);letter-spacing:.02em;text-transform:uppercase;--pennant:var(--ui-parchment);filter:drop-shadow(1px 0 0 #231a2e) drop-shadow(-1px 0 0 #231a2e) drop-shadow(0 1px 0 #231a2e) drop-shadow(0 -1px 0 #231a2e) drop-shadow(2px 2px 0 #231a2e66)}
.silo-marker::before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(var(--pennant) 0 3px,#fff3cd55 3px 4px,var(--pennant) 4px);clip-path:polygon(0 0,100% 0,100% 100%,50% calc(100% - 6px),0 100%)}
.silo-marker::after{content:'';position:absolute;left:50%;top:calc(100% - 6px);bottom:auto;width:0;height:var(--silo-line-length,17px);margin-left:-1px;border-left:2px solid var(--pennant);transform-origin:top center;transform:rotate(var(--silo-line-angle,0rad));z-index:-2}
.silo-marker b,.silo-marker span{display:block;font:inherit;font-weight:400;white-space:nowrap}.silo-marker span{margin-top:3px;opacity:.78}
.silo-marker[data-owner="0"]{--pennant:var(--ui-dawn)}.silo-marker[data-owner="1"]{--pennant:var(--ui-dusk)}
.silo-marker[hidden]{display:none}
#service-markers{position:fixed;inset:0;pointer-events:none;z-index:2}
#service-markers span{position:absolute;display:block;transform:translate(-50%,-100%);padding:3px 14px 3px 6px;font:12px/10px var(--ui-label);letter-spacing:.02em;text-transform:uppercase;white-space:nowrap;color:var(--ui-ink);border-left:2px solid var(--ui-ink);background:var(--kind-icon,none) 5px 50%/10px 10px no-repeat,var(--pennant,var(--ui-parchment));clip-path:polygon(0 0,100% 0,calc(100% - 7px) 50%,100% 100%,0 100%);box-shadow:inset 0 -2px 0 #231a2e44}
#service-markers span[data-kind]{padding-left:19px}
#service-markers span[data-kind="armory"]{--kind-icon:var(--icon-anvil)}#service-markers span[data-kind="supply"]{--kind-icon:var(--icon-crate)}#service-markers span[data-kind="hall"],#service-markers span[data-kind="barracks"]{--kind-icon:var(--icon-banner)}
#service-markers span[data-team="0"]{--pennant:var(--ui-dawn)}#service-markers span[data-team="1"]{--pennant:var(--ui-dusk)}
#service-markers span[hidden]{display:none}

@media (max-width:980px){#hud-top #overview{display:none}#hud-top .core-row{width:290px}}
/* Mid-width desktop windows (561-1000px): the centred hotbar keeps the bottom row and the two corner stacks rise above it, so the
   card never covers the first weapon slot and the chips never cover Reload. --hud-bottom-h stays right for the bonus line. */
@media (min-width:561px) and (max-width:1000px) and (min-height:501px) and (hover:hover) and (pointer:fine){
 #hud-player,#hud-actions{bottom:calc(var(--hud-bottom-h) + 4px + env(safe-area-inset-bottom,0px))}
 body.in-battle #battle-board{max-height:calc(100dvh - var(--hud-top-h) - var(--hud-lane) - var(--hud-bottom-h) - 108px)}
}
/* Touch: 44 px targets, 52 px strip with pips under the bars, FIRE bottom-right, pad bottom-left, hotbar between. */
@media (pointer:coarse){
 body.in-battle{--hud-top-h:calc(56px + env(safe-area-inset-top,0px));--hud-bottom-h:calc(68px + env(safe-area-inset-bottom,0px));--hud-lane:24px}
 #hud-top{top:env(safe-area-inset-top,0px);height:52px;gap:6px;padding:0 3px}
 #hud-top button{height:44px;min-width:44px;padding:0 8px}
 #hud-top #overview,#hud-map{display:none}
 #hud-top #battle-sound{min-width:44px;padding:0 4px}
 #hud-top #battle-hud{flex-direction:column;align-items:stretch;gap:3px}
 #hud-top .core-row{width:auto;min-width:200px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:6px}
 .core>strong,.castle-resource b,.battle-clock-wrap small{display:none}.core{gap:2px}.castle-resource i{height:6px}
 #battle-clock{font-size:12px;line-height:12px}
 #battle-towers{justify-content:center}
 .in-battle .compass{height:48px;width:auto;top:calc(var(--hud-top-h) + var(--hud-lane) + 80px)}.in-battle .compass button{min-width:44px;min-height:44px;height:44px;padding:0 6px}
 /* Camera orbit: pixel rotate icons instead of the tiny fallback arrows (the bearing has no room beside two 44px buttons). */
 .in-battle .compass button{position:relative;width:46px;font-size:0;line-height:0}.in-battle .compass button::before{content:'';position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Cg fill='%23fff3cd'%3E%3Crect x='5' y='2' width='6' height='2'/%3E%3Crect x='11' y='3' width='2' height='2'/%3E%3Crect x='12' y='5' width='2' height='6'/%3E%3Crect x='11' y='11' width='2' height='2'/%3E%3Crect x='5' y='12' width='6' height='2'/%3E%3Crect x='3' y='11' width='2' height='2'/%3E%3Crect x='2' y='6' width='2' height='5'/%3E%3Crect x='2' y='3' width='2' height='1'/%3E%3Crect x='1' y='4' width='4' height='1'/%3E%3Crect x='0' y='5' width='6' height='1'/%3E%3C/g%3E%3C/svg%3E") center/16px 16px no-repeat;image-rendering:pixelated}.in-battle #orbit-left::before{transform:scaleX(-1)}
 /* No keyboard badges on touch (radar M, map Close M). */
 .radar-key,#spawn-map-close b{display:none}
 #battle-radar .radar-caption{display:block;position:absolute;left:50%;bottom:2px;transform:translateX(-50%);padding:2px 4px;font:700 12px/12px var(--ui-body);color:var(--ui-gold-hi);background:var(--ui-ink);pointer-events:none}
 #battle-radar canvas{width:100px;height:70px}
 #hud-hotbar #battle-weapons,.hud-hotbar-row{gap:3px}
 #hud-hotbar{bottom:calc(16px + env(safe-area-inset-bottom,0px))}#battle-cadence{display:none}
 #hud-hotbar #battle-weapons button,#hud-hotbar #battle-reload,.hud-slot-static{width:44px;height:44px;padding:0}
 #hud-hotbar #battle-weapons button::before,#hud-hotbar #battle-reload::before,.hud-slot-static::before{top:50%;margin-top:-8px}
 #battle-weapons .slot-name,#battle-reload .slot-name,.hud-slot-static .slot-name{display:none}
 #hud-hotbar #battle-reload{margin-left:4px}#hud-mount{width:auto;min-width:44px;padding:0 6px}#hud-mount .slot-name{display:block;margin-top:24px}
 #hud-player{right:calc(12px + env(safe-area-inset-right,0px));left:auto;top:calc(var(--hud-top-h) + var(--hud-lane));bottom:auto;width:156px;padding:4px 6px;gap:3px 6px;grid-template-areas:"cls health" "bar bar"}
 #hud-player #profession-status,#hud-player #battle-life,#hud-status{display:none}#hud-player.down #battle-life{display:block;grid-area:auto;grid-column:1/-1}
 #combat-feedback{width:150px;top:calc(var(--hud-top-h) + var(--hud-lane) + 48px)}#combat-feed{font-size:12px;line-height:1.4}
 #hud-actions{right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(112px + env(safe-area-inset-bottom,0px));flex-direction:row-reverse;align-items:flex-end;gap:6px}
 .hud-chip{gap:4px;align-items:flex-end}
 .hud-chip button,.hud-root .hud-chip #launch,.hud-root .hud-cycle{position:relative;display:block;width:44px;height:44px;max-width:none;padding:0;font-size:0;line-height:0;overflow:hidden;text-align:center}
 .hud-chip button>*,.hud-root .hud-chip #launch span{display:none}
 .hud-chip button::before{content:'';position:absolute;left:50%;top:6px;width:16px;height:16px;margin-left:-8px;background:var(--chip-icon,none) center/16px 16px no-repeat;image-rendering:pixelated}
 .hud-chip button::after{content:attr(data-short);position:absolute;left:0;right:0;bottom:6px;font:12px/8px var(--ui-label);letter-spacing:0;text-transform:uppercase;white-space:nowrap;color:inherit}
 .hud-root .hud-chip #launch::after{color:var(--ui-ink)}
 .hud-chip[data-chip=vehicle]{flex-wrap:wrap;max-width:240px}#fleet-status{font-size:12px;white-space:normal;max-height:32px}
 #fleet-up,#fleet-down{min-width:56px!important;height:56px!important}#fleet-up::before,#fleet-down::before{top:12px}#fleet-up::after,#fleet-down::after{bottom:10px}
 /* A full magazine hides Reload but keeps its place, so the weapon slots never move under the thumb when it comes back. */
 #hud-hotbar[data-full] #battle-reload{visibility:hidden;pointer-events:none}
 #combat-score{font-size:16px}
 #spawn-map button,#spawn-map-close{min-height:44px}
 /* Readable touch labels: information-carrying 8px Silkscreen becomes 12px Pixelify Sans. */
 .hud-fire-ammo{font:700 12px/1 var(--ui-body)}.hud-class{font:700 12px/1 var(--ui-body);padding:2px 4px;text-transform:none}#hud-top #battle-sound{font:700 12px/1 var(--ui-body)}
 .tower-capture .pip-id{font:700 12px/1 var(--ui-body)}.in-battle #pad span{font:700 12px/1 var(--ui-body)}
 #service-markers span{font:700 12px/14px var(--ui-body)}.in-battle .compass span{font:700 12px/1 var(--ui-body)}#battle-board summary{font:700 12px/24px var(--ui-body);letter-spacing:0}.silo-marker{font:700 12px/12px var(--ui-body)}
 .hud-chip button,.hud-root .hud-chip #launch,.hud-root .hud-cycle{min-width:52px;width:auto;padding:0 4px}#battle-weapons .slot-key,#battle-reload .slot-key,.hud-slot-static .slot-key{display:none}#hud-mount .slot-name{font:700 12px/14px var(--ui-body);text-transform:none}.hud-chip button::after{font:700 12px/12px var(--ui-body);text-transform:none;bottom:4px}
 .hud-chip button::before{top:5px}
 /* The short word sits in flow under the icon (not absolute), so a tile is as wide as its word: 'Operate', 'Restock' never clip. */
 .hud-chip button::after{position:static;display:block;margin-top:24px;font-variant-ligatures:none}#fleet-up::after,#fleet-down::after{margin-top:30px}
 .hud-chip button>.hud-cd{display:block}.hud-chip button>.hud-cd[hidden]{display:none}.hud-chip button.cooling::before{opacity:.4}
 .hud-chip .hud-cd{background:linear-gradient(0deg,transparent calc((1 - var(--cd,0)) * 100%),#231a2ec0 0)}.hud-chip .hud-cd[data-kind=build]{background:linear-gradient(0deg,#f4c67b66 calc((1 - var(--cd,0)) * 100%),transparent 0)}
 .hud-chip .hud-cd::after{left:0;right:0;top:4px;margin:0;padding:0;background:none;text-align:center;font:700 14px/16px var(--ui-body);text-shadow:1px 0 0 var(--ui-ink),-1px 0 0 var(--ui-ink),0 1px 0 var(--ui-ink),0 -1px 0 var(--ui-ink),2px 2px 0 var(--ui-ink)}
 /* Readable 12px labels on information-carrying text (scoreboard side, spawn map legend and kicker). */
 .sb-team h3 small,.spawn-map-head small{font:700 12px/1 var(--ui-body);text-transform:none;letter-spacing:0}.spawn-map-legend{font:700 12px/1.3 var(--ui-body);text-transform:none}
 /* Menu and Pause open the same dialog on touch: keep Pause. Score opens the scoreboard. */
 body.in-battle.hud-on #hud-top #battle-toggle{display:none}
 #hud-score{min-width:44px;padding:0 6px;font:700 12px/1 var(--ui-body)}#hud-score .slot-key,.sb-close .slot-key{display:none}
 .sb-team th{font:700 12px/14px var(--ui-body);text-transform:none}.hud-root .sb-close{min-height:44px}
 /* Weapon name flashes above the hotbar for 1.2 s after a slot change (battle-hud.js adds .flash), on its own layer (z 11). When the
    phone hotbar wraps (data-wrapped: Reload on a second row, the vehicle chips right above it) the name sits in the empty left of
    that top row instead, so it neither hides under the chips nor covers them. */
 #hud-hotbar.flash{z-index:11}#hud-hotbar.flash .hud-hotbar-caption{display:block;position:absolute;right:0;bottom:calc(100% + 6px);padding:3px 8px;font:700 14px/16px var(--ui-body);font-variant-ligatures:none;color:var(--ui-gold-hi);background:var(--ui-panel);border:2px solid var(--ui-ink);box-shadow:2px 2px 0 #231a2e88;white-space:nowrap;text-shadow:1px 1px 0 var(--ui-ink)}
 #hud-hotbar[data-wrapped="1"].flash .hud-hotbar-caption{top:9px;bottom:auto;left:0;right:auto}
 #hud-hotbar .hud-hotbar-row>*,#hud-hotbar #battle-weapons button{flex:0 0 auto}
}
/* Narrow / portrait: full-width strip, player card top-right, toasts under the radar column. */
@media (max-width:560px){
 #hud-top{left:6px;right:6px;transform:none;max-width:none;justify-content:space-between}
 #hud-top .core-row{min-width:0}
 #hud-top #overview,#hud-map{display:none}
 #hud-player{right:calc(12px + env(safe-area-inset-right,0px));left:auto;top:calc(var(--hud-top-h) + var(--hud-lane));bottom:auto;width:156px;padding:4px 6px;gap:3px 6px;grid-template-areas:"cls health" "bar bar" "life life"}#hud-player #profession-status{display:none}
 #combat-feedback{width:150px;top:calc(var(--hud-top-h) + var(--hud-lane) + 76px)}
 body.in-battle #message,body.in-battle #battle-evacuation{top:calc(var(--hud-top-h) + var(--hud-lane) + 136px);left:12px;right:12px;transform:none;width:auto;max-width:none}
 body.in-battle.hud-evacuating #message{top:calc(var(--hud-top-h) + var(--hud-lane) + 208px)}
 body.in-battle.hud-evacuating.announcing #battle-evacuation{visibility:hidden}
 body.in-battle.announcing #message{visibility:hidden}
 #hud-status{display:none}
 .sb-teams{grid-template-columns:1fr}.sb-head h2{font-size:28px}.sb-team td:first-child{max-width:120px}
 #combat-score{width:calc(100vw - 24px)}
 .spawn-map-dialog{padding:10px}.spawn-map-head h2{font-size:28px}
}
@media (max-width:560px) and (pointer:coarse){
 body.in-battle{--hud-top-h:calc(52px + env(safe-area-inset-top,0px));--hud-bottom-h:calc(196px + env(safe-area-inset-bottom,0px))}
 #hud-top{left:0;right:0;border-width:0 0 2px;padding:0 4px;box-shadow:inset 0 -1px 0 var(--ui-gold-lo),0 3px 0 #231a2e66}
 #hud-hotbar{left:auto;right:calc(16px + env(safe-area-inset-right,0px));transform:none;bottom:calc(144px + env(safe-area-inset-bottom,0px))}
 #hud-actions{bottom:calc(var(--hud-bottom-h) + 52px)}
 #hud-hotbar .hud-hotbar-row{flex-wrap:wrap-reverse;justify-content:flex-end;max-width:calc(100vw - 32px)}#hud-hotbar #battle-reload{margin-left:0}#hud-hotbar #battle-weapons{flex-wrap:wrap-reverse;justify-content:flex-end}
 #hud-hotbar[data-mount="chariot"] #hud-mount{display:none}
 body.in-battle.player-down #hud-hotbar{visibility:hidden}
 #fleet-status{display:none}#fleet-up,#fleet-down{min-width:44px!important;height:44px!important}#fleet-up::before,#fleet-down::before{top:5px}#fleet-up::after,#fleet-down::after{bottom:4px;margin-top:24px}
 .hud-chip[data-chip=vehicle]{flex-wrap:nowrap;max-width:none}
 .in-battle .compass span{display:none}.in-battle .compass{width:96px}
 #combat-score{bottom:calc(var(--hud-bottom-h) + 8px)}
}
/* Short landscape: smaller radar column, chips above FIRE, toast centred between the side columns. */
@media (max-height:500px){
 body.in-battle{--hud-lane:24px}
 #battle-radar canvas{width:100px;height:70px}
 .in-battle .compass{top:calc(var(--hud-top-h) + var(--hud-lane) + 80px);width:96px}.in-battle .compass span{display:none}
 #hud-player{right:calc(12px + env(safe-area-inset-right,0px));left:auto;top:calc(var(--hud-top-h) + var(--hud-lane));bottom:auto;width:156px;padding:4px 6px;gap:3px 6px;grid-template-areas:"cls health" "bar bar" "life life"}#hud-player #profession-status{display:none}
 #combat-feedback{width:150px;top:calc(var(--hud-top-h) + var(--hud-lane) + 76px)}#combat-feed{max-height:64px;overflow:hidden}
 body.in-battle #message{max-width:calc(100vw - 340px)}
 body.in-battle.hud-evacuating #message{top:calc(var(--hud-top-h) + var(--hud-lane) + 64px)}
 body.in-battle.announcing #message{visibility:hidden}
 /* While a banner shows during evacuation the banner takes the evacuation box's place for its two seconds: one band under the
    strip instead of two stacked bands reaching down into the fighter at the centre of a 390px-tall screen. */
 body.in-battle.hud-evacuating.announcing #battle-evacuation{visibility:hidden}
 #hud-status{display:none}
 #hud-scoreboard{top:calc(var(--hud-top-h,48px) + 4px);max-height:calc(100dvh - var(--hud-top-h,48px) - 8px)}.sb-frame{padding:4px 10px 8px}.sb-head h2{font-size:28px}.sb-team td,.sb-team th{padding:1px 4px}
 #combat-score{font-size:16px;width:min(420px,calc(100vw - 340px))}
 /* The chart and the side column share one height inside the safe area: status and legend stay in view, a long spawn list scrolls. */
 .spawn-map-dialog{--map-h:calc(100dvh - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)) - 74px);padding:8px 10px}.spawn-map-head{margin-bottom:6px}.spawn-map-head h2{font-size:28px}
 .spawn-map-body{grid-template-columns:minmax(0,1fr) minmax(160px,220px);align-items:start}
 .spawn-map-dialog canvas{width:min(100%,calc((var(--map-h) - 4px) * 720 / 440))}
 .spawn-map-side{display:flex;flex-direction:column;gap:8px;max-height:var(--map-h);min-height:0}#spawn-map-status,.spawn-map-legend{flex:none;margin:0}
 #spawn-map-options{flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;min-height:0;margin:0;padding:0 4px 4px 0;overflow-y:auto;overscroll-behavior:contain}
}
@media (prefers-reduced-motion:reduce){body.in-battle #battle-evacuation,.tower-capture[data-firing="1"]{animation:none}body.in-battle #message{transition:none}}
/* Repair mode (I) is lit while it runs; it ends by itself with a message when nothing is left to repair. */
.hud-root .hud-chip #battle-repair.active{color:var(--ui-ink);background:linear-gradient(var(--ui-gold-hi),var(--ui-gold));border-color:var(--ui-ink);text-shadow:none;box-shadow:inset 0 -3px 0 var(--ui-gold-lo),2px 2px 0 var(--ui-ink)}
/* Round touch buttons (FIRE, pad) and the chips keep their own :active look: no square browser tap highlight. */
#battle-fire,#pad,.hud-root button,#battle-gear button{-webkit-tap-highlight-color:transparent}
/* Owner's HUD art (hud-art.js, after the UI kit's menus.css .cu-wslot / .cu-crest, which the game does not load): weapon art in
   the slots (the selected one drawn a size up, GTA:SA style) and the crest at the left of the player card. The crest's rings
   carry health (outer) and the ward or spawn shield (inner), so the desktop card drops its HP bar; compact layouts keep the
   bar and show a small crest without its scroll. Last Light (defense.css) restyles or hides these roots by id; that still applies. */
#hud-hotbar .has-art::before{display:none}
.hud-wart{position:absolute;left:50%;top:3px;width:24px;height:24px;margin-left:-12px;pointer-events:none}
.hud-wart>svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(1px 1px 0 #231a2e99)}
#hud-hotbar #battle-weapons button.has-art:not([aria-pressed=true]) .hud-wart{opacity:.82}
#hud-hotbar #battle-weapons button.has-art[aria-pressed=true] .hud-wart{top:1px;width:28px;height:28px;margin-left:-14px}
#hud-player.has-crest{width:264px;grid-template-columns:84px minmax(0,1fr);grid-template-areas:"crest cls" "crest health" "crest life" "crest status"}
#hud-player.has-crest .battle-player>i{display:none}#hud-player.has-crest #battle-health{text-align:left}
.hud-crest{grid-area:crest;width:84px;height:90px;align-self:center}
.hud-crest>svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(2px 2px 0 #231a2e88)}
.hud-crest>svg.hit{animation:hud-crest-hit .4s steps(2)}@keyframes hud-crest-hit{50%{filter:drop-shadow(0 0 6px #ff6a5c) brightness(1.3)}}
#hud-player.down .hud-crest{filter:grayscale(.8) brightness(.8)}
@media (pointer:coarse),(max-width:560px),(max-height:500px){
 #hud-player.has-crest{width:188px;grid-template-columns:32px auto minmax(0,1fr);grid-template-areas:"crest cls health" "crest bar bar"}
 #hud-player.has-crest .battle-player>i{display:block}#hud-player.has-crest #battle-health{text-align:right}
 .hud-crest{width:32px;height:32px}.hud-crest>svg{height:calc(100% * 236 / 220)}.hud-crest .cr-scroll{display:none}}
@media (max-width:560px),(max-height:500px){#hud-player.has-crest{grid-template-areas:"crest cls health" "crest bar bar" "crest life life"}}
@media (pointer:coarse){#hud-hotbar .hud-wart{top:50%;margin-top:-15px}#hud-hotbar #battle-weapons button.has-art[aria-pressed=true] .hud-wart{top:50%;margin-top:-17px;width:34px;height:34px;margin-left:-17px}}
@media (prefers-reduced-motion:reduce){.hud-crest>svg.hit{animation:none}}
/* ---- phone portrait (560 px wide or less, taller than 500): the battle HUD fits 320x568 to 390x844 (playtest LS1, test/
   battle-hud-phone.cjs). Game-side overrides of match-hud.css (loaded after this file, so these selectors are more specific);
   the main battle only (Last Light keeps match-hud.css's layout). ---- */
/* Narrow plates (under 380 px): slimmer blade padding and a shorter track so "16,000" fits beside its bar (it was cut to
   "16,00" at 320 px). */
@media (max-width:379px) and (min-height:501px){
 body.mh-on:not(.mh-lastlight) #match-hud .h2 .h2-blade .h2-side.l{padding-left:19px}
 body.mh-on:not(.mh-lastlight) #match-hud .h2 .h2-blade .h2-side.r{padding-right:19px}
 body.mh-on:not(.mh-lastlight) #match-hud .h2 .h2-top .h2-bar{grid-template-columns:auto minmax(14px,1fr) auto}
}
/* Touch: the context chips (Chariot, pod destination, Launch) share the chat dock's row, right of it and above FIRE (they
   overlapped the chat buttons and the MOVE pad at 320 px); the weapon row moves up under the crest card.
   The open chat log (playtest r8 R8-B3; Menus chat r14 made .chat-logbox, with its head, lines and staff line, the box that
   chat.css places): it opens between the crest card and the weapon row, its head (Full / Quick / Off) beside the lines and
   the staff line under both, and the lines scroll in what is left; under 680 px tall the head and the staff line are slimmer. */
@media (max-width:560px) and (min-height:501px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) #hud-actions{right:calc(8px + env(safe-area-inset-right,0px));gap:4px;flex-wrap:wrap-reverse;max-width:calc(100vw - 150px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))}
 body.mh-on:not(.mh-lastlight) #match-hud .h2 .h2-hot{bottom:calc(var(--h2-pad) + 208px)}
 /* box bottom 4 px over the weapon row (its top is 264 px over the screen's bottom, the dock's 188 px), top 4 px under the
    crest card (--mh-top + 180 px) */
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{bottom:calc(100% + 83px);max-height:calc(100vh - var(--mh-top,115px) - 455px)}/* [R8-B3] 3 px higher: the selected slot stands 5 px above the row */
}
/* the side-by-side log box (portrait phones, the touch rule above, and a narrow mouse window below) */
@media (max-width:560px) and (min-height:501px) and (pointer:coarse),(max-width:560px) and (min-height:634px) and (pointer:fine){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{width:min(344px,calc(100vw - 16px));overflow:hidden;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-content:start}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-head{grid-column:1;grid-row:1;align-self:stretch;border-bottom:0;border-right:2px solid var(--ch-ink);box-shadow:1px 0 0 var(--ch-navy-hi)}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log{grid-column:2;grid-row:1;max-height:none;min-height:0;contain:size}/* as tall as the head beside it; scrolls */
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-foot{grid-column:1/-1;grid-row:2;border-top:2px solid var(--ch-ink)}
}
/* Under 360 px: slimmer chips and 38 px weapon slots so the row of six stays on screen. */
@media (max-width:359px) and (min-height:501px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) #hud-actions .hud-chip button{min-width:48px;padding:0 3px}
 body.mh-on:not(.mh-lastlight) #hud-actions .hud-chip button::after{font-size:12px}
 body.mh-on:not(.mh-lastlight) #match-hud .h2 .h2-slots{gap:4px}
 body.mh-on:not(.mh-lastlight) #match-hud .h2 .h2-slot{width:38px;height:38px}
}
/* Mouse in a narrow window: no MOVE pad or FIRE, so the chips take the bottom right corner (clear of the chat dock) and the
   weapon row and its ammo plate sit lower, clear of the crest card. */
@media (max-width:560px) and (min-height:501px) and (pointer:fine){
 body.mh-on:not(.mh-lastlight) #hud-actions{bottom:calc(8px + env(safe-area-inset-bottom,0px));right:calc(8px + env(safe-area-inset-right,0px));flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 16px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))}
 body.mh-on:not(.mh-lastlight) #match-hud .h2 .h2-hot{bottom:calc(var(--h2-pad) + 162px)}
}
@media (max-width:560px) and (min-height:634px) and (pointer:fine){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{bottom:calc(100% + 92px);max-height:calc(100vh - 565px)}
}
/* Touch landscape (R8-B3): the open log box sits right of the crest card (x 254 px), under the silo charge strip (--mh-below +
   45 px) and over the weapon row, left of the context chips and FIRE (the chips' row starts 202 px from the right edge); the
   dock is at x 8 px (x 142 px up to 360 px tall, chat.css). Head, lines and staff line stack; the lines scroll. From 800 px
   wide the head sits beside the lines. 568 x 320 has no such gap: the box takes the chips' place (Chariot, pod
   destination) while it is open, FIRE and Launch stay clear. */
@media (max-height:500px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{left:246px;bottom:-69px;width:min(344px,calc(100vw - 460px));max-height:calc(100vh - var(--mh-below,150px) - 120px);overflow:hidden;display:flex;flex-direction:column}/* [R8-B3] bottom 4 px over the selected weapon slot, which stands 11 px above the row (844x390 overlapped slot 1 by 7 px) */
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log{flex:1 1 auto;min-height:0;max-height:none}
}
@media (min-width:800px) and (max-height:500px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-content:start}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-head{grid-column:1;grid-row:1;align-self:stretch;border-bottom:0;border-right:2px solid var(--ch-ink);box-shadow:1px 0 0 var(--ch-navy-hi)}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log{grid-column:2;grid-row:1;contain:size}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-foot{grid-column:1/-1;grid-row:2;border-top:2px solid var(--ch-ink)}
}
@media (max-height:360px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{left:112px;bottom:-4px;max-height:calc(100vh - var(--mh-below,106px) - 103px)}/* [R8-B3] clear of the raised selected slot */
}
/* [R8-B3] from 700 px wide the hotbar's first slot reaches under the box; with the kit's 44 px touch slots (ui-batch) the selected
   one stands 5 px above the row, so the box ends 6 px higher there (same top: the strip stays clear) */
@media (min-width:700px) and (max-height:360px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{bottom:2px;max-height:calc(100vh - var(--mh-below,106px) - 109px)}
}
/* [R8-B3] wide touch screens (tablets, 1280x720 touch): the log box opened over the crest card (the card sits under the minimap
   there, top 204 px). Head beside the lines, staff line under both; from 640 px tall the box stays in the left column under
   the card (its top at least 4 px under the card's bottom, 303 px), lower than that it sits right of the card, under the
   silo charge strip. Its bottom stays 8 px over the dock (whose top is 226 px over the screen's bottom here). */
@media (min-width:901px) and (min-height:521px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{width:min(344px,calc(100vw - 28px));max-height:calc(100vh - 541px - env(safe-area-inset-bottom,0px));overflow:hidden;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-content:start}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-head{grid-column:1;grid-row:1;align-self:stretch;border-bottom:0;border-right:2px solid var(--ch-ink);box-shadow:1px 0 0 var(--ch-navy-hi)}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log{grid-column:2;grid-row:1;max-height:none;min-height:0;contain:size}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-foot{grid-column:1/-1;grid-row:2;border-top:2px solid var(--ch-ink)}
}
@media (min-width:901px) and (min-height:521px) and (max-height:639px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{left:248px;width:min(344px,calc(100vw - 290px));max-height:calc(100vh - var(--mh-below,220px) - 279px - env(safe-area-inset-bottom,0px))}
}
@media (max-height:340px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{width:min(344px,calc(100vw - 362px));z-index:5}
 /* [R8-B3] the chips under the open box (Chariot, pod destination) step aside while it is open: a tap meant for one hit the
    log's Full / Quick / Off instead. Launch and FIRE stay. */
 body.mh-on:not(.mh-lastlight):has(.chat-dock[data-mode=battle] .chat-logbox:not([hidden])) #hud-actions :is(#chariot-enter,#hud-dest-cycle){visibility:hidden}
}
/* slimmer head (32 px segments) and staff line where the box is short */
@media (max-width:560px) and (min-height:501px) and (max-height:679px),(max-height:360px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-head{padding:4px}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-seg{min-height:32px}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-foot{padding:3px 8px 4px;font-size:12px;line-height:14px}
}
/* [phone HUD] after the ui-batch merge (kit touch-targets.css: 44 px weapon slots on touch; the 12 px floor and the input-glyph
   keycaps under the slots): on a touch phone under 634 px tall the weapon row (now 50 px) fills the gap between the crest card
   and the chat dock, so the open log's head (Full / Quick / Off) sat on it. The popover log takes the weapon row's place while
   it is open (the row steps aside, as the chips do on short landscape phones), between the crest card (4 px under it) and the
   Chariot chip (2 px over it), with a slimmer head and staff line. */
@media (max-width:560px) and (min-height:501px) and (max-height:633px) and (pointer:coarse){
 body.mh-on:not(.mh-lastlight):has(.chat-dock[data-mode=battle] .chat-logbox:not([hidden])) #match-hud .h2 .h2-hot{visibility:hidden}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{bottom:calc(100% + 18px);max-height:calc(100vh - var(--mh-top,115px) - 390px)}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-head{padding:2px 4px}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log-foot{padding:1px 8px 2px}
}
/* [phone HUD] mouse in a narrow window: the weapon row stands 48 px tall now (12 px keycaps), 2 px into the chat dock; it sits
   4 px higher. Under 634 px tall the open log box (head, lines, staff line stacked) stays under the crest card (4 px gap) and
   its lines scroll (a full log grew it over the card). */
@media (max-width:560px) and (min-height:501px) and (pointer:fine){
 body.mh-on:not(.mh-lastlight) #match-hud .h2 .h2-hot{bottom:calc(var(--h2-pad) + 166px)}
}
@media (max-width:560px) and (min-height:501px) and (max-height:633px) and (pointer:fine){
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-logbox{max-height:calc(100vh - var(--mh-top,115px) - 364px);overflow:hidden}
 body.mh-on:not(.mh-lastlight) .chat-dock[data-mode=battle] .chat-log{flex:1 1 auto;min-height:0}
}
/* versus card skip hint (M46): the kit's own chip (match-intro.js skipHint, .mi-skip in match-intro.css); battle-intro.js
   turns it off on the first match */
/* Owner playtest r8 (battle-readability.js): silo charge strip under the team plate, the floating use prompt, ward / mark
   status chips above the hotbar; battle-map.js class picks. Words carry every state, colour only tints it. */
#silo-charge{position:fixed;left:50%;top:calc(var(--mh-below,var(--mh-top,112px)) + 4px);translate:-50% 0;z-index:6;display:flex;gap:4px;pointer-events:none;font:12px/1 var(--ui-label);text-transform:uppercase;color:var(--ui-ink)}
#silo-charge[hidden],#use-prompt[hidden],#battle-status[hidden]{display:none}
body:not(.in-battle) #silo-charge,body:not(.in-battle) #battle-status{display:none}
.sc-chip{display:grid;grid-template-columns:auto auto;align-items:center;gap:2px 4px;min-width:62px;padding:3px 5px 4px;background:var(--ui-parchment);border:2px solid var(--ui-ink);box-shadow:2px 2px 0 #231a2e55}
.sc-chip b{font:inherit;padding:1px 3px;background:var(--ui-ink);color:var(--ui-parchment)}
.sc-chip em{font:inherit;font-style:normal;white-space:nowrap}
.sc-bar{grid-column:1/-1;display:block;height:4px;background:#231a2e33;overflow:hidden}.sc-bar i{display:block;height:100%;width:0;background:var(--ui-shade)}
.sc-chip[data-team="0"] .sc-bar i{background:#2a9d9a}.sc-chip[data-team="1"] .sc-bar i{background:#b0507f}
.sc-chip[data-team="0"]{background:linear-gradient(#d9fbf6,#b7ece4)}.sc-chip[data-team="1"]{background:linear-gradient(#fbe1ee,#efc0d8)}
.sc-chip[data-state="armed"] .sc-bar i{background:#c98a10}.sc-chip[data-state="armed"]{border-color:#8a5a00;box-shadow:2px 2px 0 #231a2e55,inset 0 0 0 1px #ffd27a}
.sc-chip[data-state="neutral"]{opacity:.82}
body.mh-on.in-battle:not(.in-defense):has(#silo-charge:not([hidden])) #message{top:calc(var(--mh-top,150px) + 44px)}
#use-prompt{position:fixed;left:0;top:0;z-index:7;display:flex;align-items:center;gap:6px;padding:4px 8px 4px 4px;pointer-events:none;background:var(--ui-parchment);border:2px solid var(--ui-ink);box-shadow:2px 2px 0 #231a2e66;color:var(--ui-ink);font:12px/1.1 var(--ui-body);white-space:nowrap;will-change:transform}
#use-prompt kbd{min-width:18px;padding:3px 5px;text-align:center;font:12px/1 var(--ui-label);color:var(--ui-gold-hi);background:var(--ui-ink);border:1px solid var(--ui-gold)}
#use-prompt.touch{padding-left:8px;font-weight:700}
#use-prompt::after{content:'';position:absolute;left:50%;bottom:-8px;margin-left:-6px;border:6px solid transparent;border-top-color:var(--ui-ink);border-bottom:0}
#battle-status{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 136px);translate:-50% 0;z-index:6;display:flex;gap:6px;pointer-events:none}
.bs-chip{display:flex;align-items:center;gap:5px;padding:4px 8px;background:var(--ui-parchment);border:2px solid var(--ui-ink);box-shadow:2px 2px 0 #231a2e55;color:var(--ui-ink);font:12px/1 var(--ui-label);text-transform:uppercase;white-space:nowrap}
.bs-chip i{width:10px;height:10px;background:var(--ui-gold);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}
.bs-chip[data-kind=ward]{background:linear-gradient(#fff6d8,#ffe7a6)}.bs-chip[data-kind=ward] i{background:#2a9d9a;clip-path:polygon(50% 0,100% 20%,90% 70%,50% 100%,10% 70%,0 20%)}
.bs-chip[data-kind=mark]{background:linear-gradient(#ffe1e6,#ffc2cc)}.bs-chip[data-kind=mark] i{background:#d8405e}
.bs-chip[data-kind=weak]{background:linear-gradient(#ece2ff,#d6c6f5)}.bs-chip[data-kind=weak] i{background:#73547f;clip-path:polygon(0 0,100% 0,50% 100%)}
.bs-chip[data-kind=next] i{background:var(--ui-shade)}
#spawn-map-class{margin:0 0 10px}@media (min-height:501px){.spawn-map-dialog:has(#spawn-map-class:not([hidden])) canvas{width:min(100%,calc((100dvh - 236px - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px))) * 720 / 440))}}.spawn-map-class-head{margin:0 0 4px;font:12px/1 var(--ui-label);letter-spacing:.06em;color:var(--ui-shade)}
#spawn-map-classes{display:flex;gap:6px;flex-wrap:wrap}#spawn-map-classes button{display:grid;gap:3px;text-align:left;min-width:120px}
#spawn-map-classes button small{font:12px/1.2 var(--ui-body);opacity:.8}#spawn-map-classes button.current b::after{content:var(--spawn-tag-now,' · now');font-weight:400}#spawn-map-classes button.queued b::after{content:var(--spawn-tag-next,' · next');font-weight:400}
#spawn-map-class-note{margin:6px 0 0;font:12px/1.4 var(--ui-body);color:var(--ui-ink)}#spawn-map-class[hidden]{display:none}
@media (max-width:560px){#silo-charge{gap:2px}.sc-chip{min-width:0;padding:2px 3px 3px;grid-template-columns:auto}.sc-chip em{font-size:12px}#battle-status{bottom:calc(env(safe-area-inset-bottom,0px) + 168px)}}
/* R8-B4: the strip clears the silo tokens and objective ribbon (--mh-below, match-hud.js); on portrait phones it sits under the
   minimap (--mh-top + 67 px) and over the crest card (+112 px); on landscape phones it is centred right of the crest card */
@media (max-width:560px) and (min-height:501px){#silo-charge{top:calc(var(--mh-top,115px) + 71px)}}
@media (max-height:500px){#silo-charge{left:calc(254px + env(safe-area-inset-left,0px));right:calc(8px + env(safe-area-inset-right,0px));translate:none;justify-content:safe center;gap:2px}
 .sc-chip{min-width:0;padding:2px 3px 3px;grid-template-columns:auto}.sc-chip em{font-size:12px}}
/* R8-B4 after the 12 px font floor (ui-batch raised the strip's 8 px labels to 12 px): the compact strip keeps its old height
   (tighter rows) and, on portrait phones, its width (bounded, the chips share it, a long label ends in an ellipsis) */
@media (max-width:560px),(max-height:500px){.sc-chip{row-gap:1px;padding:1px 3px 2px;min-width:0}.sc-chip b{padding:0 2px}.sc-chip em{overflow:hidden;text-overflow:ellipsis}}
@media (max-width:560px) and (min-height:501px){#silo-charge{left:calc(8px + env(safe-area-inset-left,0px));right:calc(8px + env(safe-area-inset-right,0px));translate:none;justify-content:center}.sc-chip{flex:0 1 auto}}
