/* Shared layout for the approved tactical HUD. The world canvas is unchanged. */
#map-conquests{padding:3px 9px;background:#1e2c22;color:#efdcad;font:600 11px/1.4 system-ui;text-align:left}
#map-conquests[hidden],#map-conquests small{display:none}
#map-panel.expanded #map-conquests{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:3px 10px}
#map-panel.expanded #map-conquests[hidden]{display:none}
#map-panel.expanded #map-conquests small{display:flex;align-items:center;gap:5px;color:#dae0d4;font:11px/1.4 system-ui}
.capture-key{width:7px;height:7px;display:inline-block;transform:rotate(45deg);border:1px solid #edd391}
.capture-key.mine{background:#edd391}
.capture-key.ally{background:#a3d2c4;border-color:#a3d2c4}
.capture-key.lost{border-color:#d2d5ce}
.status-resupply{grid-column:1/-1;margin:3px 0 0;color:#d7cf9d;font-size:11px;line-height:1.35}
:root{--panel:#1c281eee;--line:#77816b;--ink:#eeeedb;--muted:#b1b9a5;--accent:#e5ab54;--drawer:444px;--cloth:#777b5d;--cloth-dark:#565c48;--helmet:#777b5b}
body{font-family:Inter,Segoe UI,system-ui,sans-serif}body[data-team="1"]{--cloth:#777d70;--cloth-dark:#525a50;--helmet:#636d60}[hidden]{display:none!important}button{border-color:#818c71;background:#253226;border-radius:4px}button:hover:not(:disabled){background:#3e5037}button:focus-visible{outline:2px solid #f3c77b;outline-offset:3px}kbd{display:inline-flex;justify-content:center;align-items:center;min-width:23px;padding:1px 5px;border:1px solid #adaf8e;border-radius:3px;font:12px/1.6 ui-monospace,monospace;color:#f1efdc;background:#303b2b}button.primary{background:linear-gradient(110deg,#edb762,#d99a41);color:#211d15;border-color:#f1c57e}button.primary:hover:not(:disabled){background:#f4c879}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap;border:0!important}
header.game-topbar{height:54px;padding:0 18px;gap:24px;background:#18241bf5;box-shadow:0 2px 12px #0003;border-bottom:1px solid #7a826a;position:relative;z-index:12}.game-brand{text-decoration:none;color:#ecebd6;font-size:13px;font-weight:800;letter-spacing:.04em;white-space:nowrap}.helmet-mark{font-size:27px;vertical-align:middle;margin-right:8px;color:#d2d6b8}#phase-banner{position:static;transform:none;display:flex;align-items:center;background:none;border:0;padding:0;width:auto;white-space:nowrap;text-align:left;font-size:12px}#phase-banner strong{font-size:11px;letter-spacing:.07em}#phase-note{display:none}.game-clock{display:flex;align-items:center;gap:9px;font-size:11px;white-space:nowrap;color:#c5ccb9;margin-left:auto}.game-clock time{font-size:14px;color:#f4efd7;font-variant-numeric:tabular-nums}.clock-mark{font-size:21px}.game-actions{display:flex;gap:8px}.game-actions button{padding:5px 9px;font-size:11px;display:flex;align-items:center;gap:7px;background:#293527}.game-actions button:disabled{opacity:.35}main{height:calc(100dvh - 54px);min-height:360px}#field{outline:0}#sound-cues{z-index:6}.overlay{z-index:20}.overlay .card{max-height:calc(100dvh - 92px);overflow:auto;scrollbar-width:thin;border-radius:7px;border-color:#78876a;box-shadow:0 25px 70px #0009}.help-details{border-top:1px solid #63735a;margin-top:20px;padding-top:12px;font-size:12px;color:#b7c4a8}.help-details summary{cursor:pointer}.help-details .controls{line-height:1.8}.overlay .card h1{font-size:30px}.overlay .eyebrow{font-size:10px}
.topbar-performance{display:flex;align-items:center;gap:9px;min-width:0;white-space:nowrap;color:#d6dec8;font:10px/1.3 ui-monospace,monospace;font-variant-numeric:tabular-nums}#performance{margin:0}#performance-main{color:#eef2dc}#performance-extra{color:#aebda6}.kill-feed{position:absolute;top:12px;left:50%;transform:translateX(-50%);z-index:8;width:max-content;max-width:min(420px,calc(100% - 32px));display:flex;flex-direction:column;align-items:center;gap:5px;pointer-events:none}.kill-feed-item{max-width:100%;display:flex;align-items:center;gap:8px;padding:5px 10px;border:1px solid #9a9b7999;border-radius:4px;background:#18241be8;box-shadow:0 2px 8px #0005;color:#eeeedd;font:11px/1.3 Inter,Segoe UI,sans-serif;animation:feed-arrive .18s ease-out}.kill-feed-label{flex:none;font:700 9px/1 ui-monospace,monospace;letter-spacing:.07em;color:#e7bd73}.kill-feed-item.tank .kill-feed-label{color:#e29372}.kill-feed-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes feed-arrive{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}body:not(.in-room) .kill-feed{display:none}
@media(max-width:1150px){#performance-extra{display:none}}@media(max-width:600px){.topbar-performance{font-size:9px;max-width:125px;flex:none}.game-clock .clock-mark{display:none}.kill-feed{top:8px}.kill-feed-item{font-size:10px;padding:4px 7px;gap:5px}.kill-feed-label{font-size:8px}}@media(prefers-reduced-motion:reduce){.kill-feed-item{animation:none}}
.kill-feed-icon{width:24px;height:24px;object-fit:contain;object-position:center 18%;border-radius:3px;background:#34412f}.score-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.score-tabs button{font-size:12px;padding:8px 12px}.score-tabs button.active{color:#201c12;background:#e0b96e;border-color:#efcd8b}.score-history{max-height:min(50dvh,520px);overflow:auto;border:1px solid #53614b;border-radius:4px}.score-history[hidden],.match-score-scroll[hidden]{display:none}.score-history-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto auto;grid-template-rows:auto auto;align-items:center;column-gap:10px;padding:8px 10px;border-bottom:1px solid #53614b;font-size:12px}.score-history-row:last-child{border-bottom:0}.score-history-icon{grid-row:1/3;width:30px;height:30px;object-fit:contain;object-position:center 18%;border-radius:3px;background:#3c4937}.score-history-who{grid-column:2;grid-row:1;font-weight:700;overflow-wrap:anywhere}.score-history-row small{grid-column:2;grid-row:2;color:#c7d0ba}.score-history-row time{grid-column:3;grid-row:1/3;color:#c7d0ba;font-variant-numeric:tabular-nums}.score-history-row strong{grid-column:4;grid-row:1/3;color:#f0cc82;white-space:nowrap}@media(max-width:600px){.score-history-row{grid-template-columns:24px minmax(0,1fr) auto;gap:5px;padding:7px}.score-history-icon{width:22px;height:22px}.score-history-row strong{grid-column:3;grid-row:1}.score-history-row time{grid-column:3;grid-row:2}.score-overlay>section{padding:14px}}
.score-history-row{grid-template-columns:58px minmax(0,1fr) auto auto}.score-history-icons{grid-column:1;grid-row:1/3;display:flex;align-items:center;gap:2px}.score-history-icons img{width:27px;height:30px;object-fit:contain;object-position:center 18%;border-radius:3px;background:#3c4937}@media(max-width:600px){.score-history-row{grid-template-columns:42px minmax(0,1fr) auto}.score-history-icons img{width:20px;height:23px}}
.score-history-who{font-weight:400;color:#d5d8d2}.score-owner{font-weight:800;white-space:nowrap}.score-owner.team-0.slot-0{color:#ff9385}.score-owner.team-0.slot-1{color:#d95b65}.score-owner.team-1.slot-0{color:#a7d6ff}.score-owner.team-1.slot-1{color:#6da9e5}.score-person-name{font-weight:400;color:#d5d8d2}.score-faction-mark{display:inline-flex;position:relative;align-items:center;justify-content:center;width:14px;height:14px;margin-right:3px;vertical-align:-2px;flex:none}.score-faction-mark.soviet{color:#e34c45;font:900 14px/1 system-ui;text-shadow:0 0 1px #ffd38f}.score-faction-mark.german{background:#e8e7dc;border:1px solid #8b8f83;border-radius:1px;box-sizing:border-box}.score-faction-mark.german::before,.score-faction-mark.german::after{content:"";position:absolute;background:#252824}.score-faction-mark.german::before{width:4px;height:10px}.score-faction-mark.german::after{width:10px;height:4px}.score-tabs button{display:inline-flex;align-items:center;gap:3px}.score-tabs .score-faction-mark{margin-right:1px}.kill-feed-text{color:#d5d8d2}.kill-feed{max-width:min(560px,calc(100% - 32px))}
.kill-feed-icon,.score-history-icons img{background:linear-gradient(145deg,#ddd7bd,#b7b39f);border:1px solid #eee1bd;box-shadow:inset 0 0 0 1px #6a695744,0 1px 2px #0007;box-sizing:border-box}
.kill-feed{gap:4px;max-width:min(520px,calc(100% - 24px))}.kill-feed-item{gap:5px;padding:3px 7px;border:1px solid #767e6f80;background:rgba(246,243,231,.78);box-shadow:0 1px 4px #18221945;color:#293129;font-size:10px;line-height:1.25}.kill-feed-label{font-size:8px;color:#68512b}.kill-feed-item.tank .kill-feed-label{color:#924f35}.kill-feed-text,.kill-feed .score-person-name{color:#303a34}.kill-feed .score-owner.team-0.slot-0{color:#a02f31}.kill-feed .score-owner.team-0.slot-1{color:#842737}.kill-feed .score-owner.team-1.slot-0{color:#225b90}.kill-feed .score-owner.team-1.slot-1{color:#194777}.kill-feed-icon{width:20px;height:20px;background:#e6e2d5;border-color:#c9c7ba;box-shadow:none}@media(max-width:600px){.kill-feed-item{gap:4px;padding:3px 6px;font-size:9px}.kill-feed-label{font-size:7px}.kill-feed-icon{width:18px;height:18px}}
.score-history-row{grid-template-columns:64px minmax(0,1fr) auto auto}.score-history-icons img{width:30px;height:33px}
@media(max-width:600px){.score-history-row{grid-template-columns:48px minmax(0,1fr) auto}.score-history-icons img{width:22px;height:25px}}
.score-history-row{grid-template-columns:minmax(0,1fr) auto auto}.score-history-who,.score-history-row small{grid-column:1}.score-history-row time{grid-column:2}.score-history-row strong{grid-column:3}.score-identity-icon{display:inline-block;width:30px;height:33px;margin-right:5px;object-fit:contain;object-position:center 18%;vertical-align:middle;border-radius:3px;background:linear-gradient(145deg,#ddd7bd,#b7b39f);border:1px solid #eee1bd;box-shadow:inset 0 0 0 1px #6a695744,0 1px 2px #0007;box-sizing:border-box}.score-owner .score-identity-icon{vertical-align:middle}@media(max-width:600px){.score-history-row{grid-template-columns:minmax(0,1fr) auto}.score-history-row time{grid-column:2;grid-row:2}.score-history-row strong{grid-column:2;grid-row:1}.score-identity-icon{width:23px;height:26px}}
.hud.player-status{top:auto;left:16px;bottom:24px;width:256px;max-width:none;max-height:none;overflow:visible;padding:12px;display:grid;grid-template-columns:60px minmax(0,1fr);gap:4px 10px;background:linear-gradient(120deg,#263226ee,#17231aee);border:1px solid #7d876b;box-shadow:0 3px 18px #0003;font:11px/1.45 Inter,Segoe UI,sans-serif;pointer-events:none}.player-status h2{font:700 12px/1.3 Inter,Segoe UI,sans-serif;text-transform:uppercase;letter-spacing:.04em;margin:0 0 4px}.player-status div{margin:0}#status-name{font-size:10px;color:#b6c1ab;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:5px}#status-portrait{height:90px;overflow:hidden;align-self:center}#status-portrait img{width:100%;height:100%;object-fit:contain;transform:none}#health-label{font-size:10px}.health-track{height:6px;background:#59634a;margin:5px 0 8px!important;border:1px solid #9ba78a55}.health-track i{display:block;background:#b6cc90;width:100%;height:100%;transition:width .15s}.health-track i.low{background:#df9074}.weapon-status{display:flex;gap:8px;align-items:center;justify-content:space-between}#status-weapon{font-size:11px}#status-ammo{font-size:17px;color:#f4efd8;font-variant-numeric:tabular-nums;white-space:nowrap}#status-meta{grid-column:1/-1;border-top:1px solid #73806766;padding-top:5px;font-size:10px;color:#c2ccb5}#status-alert{grid-column:1/-1;font-size:11px;color:#f5b784;padding-top:4px}
#loadout.quickbar{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);display:flex;align-items:end;gap:7px;flex-wrap:nowrap;max-width:none;z-index:4}#quick-items{display:flex;gap:4px}.item-slot{position:relative;width:67px;min-height:78px;padding:5px 3px 6px;display:flex;flex-direction:column;align-items:center;justify-content:end;background:#203020eb;border:1px solid #7e896c;box-shadow:0 2px 10px #0002}.item-slot svg{width:57px;height:39px;filter:drop-shadow(1px 2px 2px #0007)}.item-slot kbd{position:absolute;top:4px;left:5px;font-size:10px;min-width:16px;line-height:1.4;border:0;background:none;padding:0}.item-name{font-size:9px;line-height:1.2;white-space:nowrap;color:#eeefdc;max-width:100%;overflow:hidden;text-overflow:ellipsis}.item-count{position:absolute;top:5px;right:5px;font-size:9px;font-variant-numeric:tabular-nums;color:#cbd5b8}.item-slot.selected,.item-slot[aria-pressed=true]{border:2px solid #efbc63;background:#414b2fe8;padding:4px 2px 5px}.item-slot:disabled{opacity:.45}.item-slot.selected:disabled{opacity:.65}#quick-crew{background:var(--panel);border:1px solid var(--line);padding:6px 7px}#quick-crew>span{font-size:9px;letter-spacing:.1em;display:block;margin-bottom:5px;color:#c3ccb6}#quick-seats{display:flex;gap:4px}#quick-seats button{width:27px;height:27px;padding:0;font-size:11px}#quick-seats button.current-seat{background:#c89644;color:#151a12;opacity:1;border-color:#e8c57a}#quick-exit{padding:8px;font-size:10px;background:var(--panel)}#quick-exit kbd{font-size:10px;min-width:15px;padding:0 3px}#action-note{position:absolute;top:calc(50% + 55px);bottom:auto!important;left:50%!important;transform:translateX(-50%);font-size:12px;color:#f0d8a2;background:#17241de8;border:1px solid #7d8a65;padding:8px 12px;pointer-events:none;z-index:7;max-width:calc(100% - 32px)}
#map-panel{width:210px;bottom:24px;right:16px;background:#17271deb;border-color:#858c70;box-shadow:0 3px 18px #0003}#minimap{height:164px}.map-heading{padding:4px 6px;gap:4px}.map-heading #map-caption{font-size:10px;padding:0}#map-status{font-size:8px;max-width:80px;overflow:hidden;text-overflow:ellipsis}.map-zoom{padding:5px;grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}.map-zoom button{min-height:25px;font-size:9px}#map-follow{display:block}#map-near{font-size:9px}#map-panel.expanded{z-index:16;right:auto;bottom:auto;width:min(760px,92vw)}#map-panel.expanded #map-follow{display:block}#map-panel.expanded .map-zoom{grid-template-columns:32px 40px 32px 1fr 1fr}#map-panel.expanded .map-zoom>*{grid-column:auto}.credit{bottom:2px;right:16px;padding:1px 4px;font-size:8px;z-index:2;background:#122119ad}.credit a{color:#bec9ad}.in-room .player-status{display:grid}body:not(.in-room) .player-status,body:not(.in-room) #loadout{display:none}
.equipment-panel{position:absolute;right:16px;top:16px;bottom:24px;width:min(var(--drawer),calc(100% - 32px));padding:17px;background:linear-gradient(125deg,#293529f5,#19251bf5);border:1px solid #8c9276;box-shadow:0 12px 36px #0006;z-index:10;border-radius:5px;overflow:auto;scrollbar-width:thin}.panel-heading{display:flex;justify-content:space-between;align-items:start;gap:16px;padding-bottom:12px;border-bottom:1px solid #84917466}.panel-heading h2{font-size:20px;line-height:1.2;letter-spacing:.025em;margin:0}.panel-heading p{font-size:11px;color:#b9c4ad;margin:5px 0 0}.close-button{padding:0;width:28px;height:28px;font:24px/1 sans-serif;background:none;border:0;color:#e9e9cf}.equipment-layout{display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px;align-items:center;padding-top:15px;min-height:270px}#inventory-figure{height:270px;display:flex;align-items:center;justify-content:center}#inventory-figure img{max-width:100%;height:245px;object-fit:contain}#inventory-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}#inventory-items .item-slot{width:100%;min-height:81px}#inventory-items .item-slot svg{width:76px;height:44px}#inventory-items .item-name{font-size:10px}#inventory-items .item-count{font-size:10px}#item-detail{border-block:1px solid #7c896266;margin-top:13px;padding:13px 0;display:grid;grid-template-columns:55px minmax(0,1fr);gap:5px 10px;align-items:center}#item-preview svg{width:55px;height:43px}#item-detail h3{font-size:13px;margin:0 0 3px}#item-detail p{font-size:11px;color:#c2cbb5;margin:0;line-height:1.5}#item-use{grid-column:2;justify-self:start;margin-top:5px;font-size:11px;padding:6px 12px}.panel-footnote{font-size:10px;line-height:1.5;color:#b4bfa6;text-align:center;margin:16px 0 0}.panel-footnote kbd{font-size:10px;min-width:16px;line-height:1.3;padding:0 3px}#vehicle-tabs,#settings-tabs{display:flex;gap:7px;margin-top:15px}#vehicle-tabs button,#settings-tabs button{flex:1;font-size:12px;padding:8px 10px;background:#34422e}#vehicle-tabs [aria-selected=true],#settings-tabs [aria-selected=true]{background:#dda650;color:#211d14;border-color:#efc579;font-weight:650}#vehicle-summary{margin-top:16px;padding-top:12px;border-top:1px solid #7c896266;font-size:12px;color:#d4dec2}#vehicle-exit{display:block;margin:17px auto 0;padding:7px 22px;font-size:12px}#vehicle-exit kbd{margin-right:7px}#crew-hud{pointer-events:auto;border:0;padding:0;margin-top:20px}#crew-hud .crew-header,#crew-hud .crew-hint{display:none}#crew-hud .crew-layout{display:grid!important;grid-template-columns:135px minmax(0,1fr);gap:15px;margin-top:15px}#crew-hud .crew-diagram{position:relative;width:135px;height:222px}#crew-hud .crew-list{display:flex;flex-direction:column;justify-content:center}#crew-hud .crew-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 5px;padding:7px 5px;border-bottom:1px solid #6d7b5366;min-width:0}#crew-hud .crew-row span:first-child{font-size:11px}#crew-hud .crew-row span:nth-child(2){font-size:10px}#crew-hud .crew-take{font-size:10px;padding:5px}#crew-hud .crew-shortcut{font-size:9px}#crew-hud .crew-front{font-size:9px}.inventory-open #loadout{display:none}.inventory-open #map-panel:not(.expanded){right:calc(var(--drawer) + 32px);width:170px}.inventory-open #map-panel:not(.expanded) #minimap{height:130px}
.menu-backdrop{position:absolute;inset:0;z-index:18;background:#0c160fb3;display:flex;align-items:safe center;justify-content:center;padding:20px;overflow:auto}.settings-card{width:min(650px,100%);border:1px solid #929a7d;background:linear-gradient(120deg,#2a3628f5,#19251bf5);box-shadow:0 25px 90px #0007;border-radius:6px;padding:24px;margin:auto}.settings-card h2{font-size:24px}.session-strip{display:flex;justify-content:space-between;gap:12px;margin:12px 0;color:#c5ceb7;font-size:11px}.session-strip strong{font-variant-numeric:tabular-nums;color:#eee9d3;margin-left:5px}.session-strip #connection{font-size:10px}.settings-pane{margin-top:16px;padding:14px;border:1px solid #6f805d88;background:#111d1477;min-height:210px}.volume-row{display:grid;grid-template-columns:160px 1fr 38px;gap:14px;align-items:center;padding:9px 0;font-size:12px;color:#e0e5d1}.volume-row input{accent-color:#b8ca95;height:17px;padding:0;background:transparent;border:0}.volume-row output{text-align:right;font-size:11px;font-variant-numeric:tabular-nums}.small-link{display:block;font-size:10px;color:#b0bda2;margin-top:14px}.display-row{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:15px;font-size:12px;color:#dce3ca}.display-row input[type=checkbox]{width:20px;height:20px;accent-color:#dca753}.settings-note{font-size:11px;color:#aebba1;line-height:1.6}.settings-pane .zoom{position:static;border:0;background:none;padding:0}.diagnostics{border-top:1px solid #60715577;padding-top:12px;font-size:11px;color:#bcc6ae}.diagnostics summary{cursor:pointer}.shortcut-list{display:grid;grid-template-columns:100px minmax(0,1fr);gap:12px;margin:4px 0;font-size:12px}.shortcut-list dt{color:#e6c58c;font-family:ui-monospace,monospace}.shortcut-list dd{margin:0;color:#cbd4be}.menu-buttons{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.menu-buttons>button{flex:1;font-size:12px;min-height:40px;white-space:nowrap}#start-now{flex-basis:100%}.danger-button{background:#4c302740;border-color:#ce8870;color:#f1b197}.danger-button:hover:not(:disabled){background:#724330}.settings-card .panel-footnote{font-size:11px;font-style:italic}
@media(max-width:1150px){header.game-topbar{gap:16px}.game-brand{font-size:11px}.hud.player-status{width:220px;grid-template-columns:45px minmax(0,1fr);gap:4px 8px;padding:10px}.player-status h2{font-size:10px}#status-ammo{font-size:15px}#loadout.quickbar{left:calc(50% + 8px)}.item-slot{width:56px;min-height:72px}.item-slot svg{width:49px}.item-name{font-size:8px}.item-count{font-size:8px}#map-panel{width:180px}#minimap{height:142px}:root{--drawer:410px}.equipment-layout{grid-template-columns:115px minmax(0,1fr)}.inventory-open #map-panel:not(.expanded){display:none}}
@media(max-width:900px){header.game-topbar{gap:12px;padding:0 12px}.game-brand{font-size:0}.helmet-mark{font-size:27px;margin:0}.game-actions button{padding:5px 7px}.game-clock{gap:6px}#phase-banner strong{font-size:10px}.hud.player-status{width:220px;bottom:112px}#map-panel{bottom:24px;width:170px}#minimap{height:132px}#loadout.quickbar{left:16px;bottom:24px;transform:none}.item-slot{width:62px}.inventory-open .player-status{bottom:24px}}
@media(max-width:600px){header.game-topbar{height:48px;gap:8px}.game-brand{display:none}.game-clock{margin-left:auto}.game-clock #elapsed-label{display:none}.game-clock time{font-size:12px}.game-actions button{min-height:30px;gap:4px;padding:3px 6px}.game-actions button span{display:none}.game-actions kbd{border:0;background:none;min-width:17px;padding:0}#phase-banner strong{font-size:9px}main{height:calc(100dvh - 48px);min-height:300px}.hud.player-status{left:10px;bottom:110px;width:182px;grid-template-columns:36px 1fr;padding:8px;gap:3px 6px}#status-portrait{height:74px}.player-status h2{font-size:9px}#status-name,#health-label,#status-meta{font-size:9px}#status-ammo{font-size:13px}#status-weapon{font-size:10px}#loadout.quickbar{left:10px!important;right:10px;bottom:25px!important;max-width:none;display:flex;flex-wrap:nowrap;justify-content:center;gap:5px}#quick-items{flex:1;gap:3px}.item-slot{flex:1;width:calc((100vw - 38px)/6);min-height:70px;max-width:70px;padding:4px 1px}.item-slot svg{width:100%;max-width:50px;height:35px}.item-slot .item-name{font-size:8px}.item-slot kbd{font-size:9px}.item-slot .item-count{font-size:7px;right:3px}#map-panel{right:10px;bottom:110px;width:145px}#minimap{height:110px}.map-zoom{grid-template-columns:repeat(6,minmax(0,1fr));padding:3px;gap:2px}.map-zoom button,#map-near{font-size:8px;padding:2px}.map-heading #map-caption{font-size:8px}#map-status{display:none}.credit{bottom:2px;right:10px;left:auto;font-size:7px}.equipment-panel{right:8px;top:8px;bottom:8px;width:calc(100% - 16px);padding:15px}.equipment-layout{grid-template-columns:100px minmax(0,1fr);gap:8px;min-height:235px}#inventory-figure{height:235px}#inventory-items .item-slot{max-width:none;min-height:70px}.inventory-open .player-status{display:none}.inventory-open #loadout{display:none!important}.settings-card{padding:16px}.menu-backdrop{padding:10px}.settings-card h2{font-size:21px}.settings-pane{padding:10px}.volume-row{grid-template-columns:120px 1fr 32px;gap:8px;font-size:11px}.menu-buttons{gap:6px}.menu-buttons>button{font-size:10px;padding:7px}.settings-card .panel-footnote{font-size:10px}.session-strip{font-size:10px;flex-wrap:wrap}.shortcut-list{font-size:11px;grid-template-columns:85px 1fr;gap:10px}.overlay .card{max-height:calc(100dvh - 70px);padding:18px}.grid{grid-template-columns:1fr}.game-clock .clock-mark{font-size:18px}#quick-crew{padding:5px}#quick-seats button{width:23px;height:25px}#quick-exit{font-size:9px;padding:6px}#crew-hud .crew-layout{grid-template-columns:110px minmax(0,1fr);gap:10px}#crew-hud .crew-diagram{width:110px;height:181px}}
@media(max-height:610px) and (min-width:601px){.equipment-panel{top:8px;bottom:8px;padding:12px}.equipment-layout{min-height:190px;padding-top:7px}#inventory-figure{height:190px}#inventory-items .item-slot{min-height:63px}#inventory-items .item-slot svg{height:30px}#item-detail{padding:7px 0;margin-top:7px}.panel-footnote{margin-top:8px}.panel-heading{padding-bottom:8px}.settings-card{padding:16px}.settings-pane{min-height:180px}.volume-row{padding:6px 0}}
@media(prefers-reduced-motion:reduce){.health-track i{transition:none}}
#inventory-items .item-slot.inspected{outline:2px solid #bfd596;outline-offset:-2px;background:#425535e8}#inventory-items .item-slot.inspected[data-item=medkit]{border-color:#c8dfaa}.menu-buttons .danger-button{border-color:#cb8d75;color:#edb398}

/* Full external vehicle portraits; only infantry status cards use a bust crop. */
/* Crew art and hit targets share one native-aspect frame at every panel width. */
#crew-hud .crew-layout-tank{grid-template-columns:160px minmax(0,1fr);align-items:center}
#crew-hud .crew-diagram.crew-tank,#crew-hud .crew-diagram.crew-car{width:100%;height:auto;aspect-ratio:var(--crew-aspect);align-self:center}
#crew-hud .crew-art{position:absolute;inset:0;overflow:hidden;pointer-events:none}
#crew-hud .crew-art .crew-cutaway{max-width:none}
#crew-hud .crew-tank .crew-seat{width:21px;height:21px;font-size:10px;border-radius:50%;box-shadow:0 1px 4px #000b}
#crew-hud .crew-tank .crew-seat-free{background:#243b27b8}
@media(max-width:600px){#crew-hud .crew-layout-tank{grid-template-columns:135px minmax(0,1fr)}}
@media(max-width:380px){#crew-hud .crew-layout-tank{grid-template-columns:115px minmax(0,1fr);gap:8px}}

#status-portrait{position:relative}
#status-portrait img{display:block;transform:none}
#status-portrait.infantry-portrait img{position:absolute;top:-2px;left:50%;width:180px;max-width:none;height:auto;transform:translateX(-50%)}
.hud.player-status.vehicle-status{width:294px;grid-template-columns:112px minmax(0,1fr)}
#status-portrait.vehicle-portrait{height:84px;overflow:visible}
#status-portrait.vehicle-portrait img{position:static;width:100%;height:100%;object-fit:contain;object-position:center;transform:none;filter:drop-shadow(0 3px 3px #0005)}
.angled-car-portrait{position:relative;width:100%;height:100%;display:block}
.angled-car-portrait svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;filter:drop-shadow(0 2px 2px #0009)}
#status-portrait .angled-car-portrait img{width:100%;height:100%;object-fit:contain}

/* Transparent side margins may extend behind the column; the whole figure fits vertically. */
.equipment-layout{grid-template-columns:150px minmax(0,1fr);min-height:310px}
#inventory-figure{height:310px;overflow:hidden}
#inventory-figure img{display:block;width:auto;max-width:none;height:100%;object-fit:contain;filter:drop-shadow(0 4px 4px #0005)}
.vehicle-view .equipment-layout{grid-template-columns:minmax(0,1fr);min-height:0;gap:8px;padding-top:10px}
.vehicle-view #inventory-figure{height:160px;overflow:visible}
.vehicle-view #inventory-figure img{width:100%;max-width:100%;height:100%;object-fit:contain}
.vehicle-view #inventory-figure .angled-car-portrait img{width:100%;max-width:100%;height:100%;object-fit:contain}
.vehicle-view #inventory-items{grid-template-columns:repeat(2,minmax(0,1fr))}
.vehicle-view #inventory-items .item-slot{min-height:72px}
.vehicle-view #item-detail{margin-top:7px;padding:7px 0}
.vehicle-view #vehicle-summary{margin-top:8px;padding-top:7px}
.vehicle-view #vehicle-exit{margin-top:8px}
.vehicle-view .panel-footnote{margin-top:8px}

@media(max-width:1150px){
 .hud.player-status.vehicle-status{width:252px;grid-template-columns:86px minmax(0,1fr)}
 #status-portrait.infantry-portrait img{width:164px}
 .equipment-layout{grid-template-columns:135px minmax(0,1fr)}
}
@media(max-width:900px){
 .vehicle-view #inventory-figure{height:160px}
}
@media(max-width:600px){
 .hud.player-status.vehicle-status{width:182px;grid-template-columns:62px minmax(0,1fr)}
 #status-portrait.infantry-portrait img{width:140px}
 #status-portrait.vehicle-portrait{height:66px}
 .vehicle-status #status-weapon{font-size:9px}
 .vehicle-status #status-ammo{font-size:12px}
 .equipment-panel{top:auto;bottom:8px;max-height:68dvh}
 .equipment-layout{grid-template-columns:110px minmax(0,1fr);min-height:250px}
 #inventory-figure{height:250px}
 .vehicle-view #inventory-figure{height:150px}
 .vehicle-view .equipment-layout{min-height:0;gap:8px}
}
@media(max-height:610px) and (min-width:601px){
 .equipment-layout{min-height:210px;grid-template-columns:120px minmax(0,1fr)}
 #inventory-figure{height:210px}
 .vehicle-view .equipment-layout{grid-template-columns:minmax(0,1fr);min-height:0;gap:8px}
 .vehicle-view #inventory-figure{height:145px}
}


#tester-panel .settings-card{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 90px);overflow:auto}#tester-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}#tester-fields label,.tester-model{display:grid;gap:6px;font-size:13px}#tester-fields input,.tester-model select{width:100%;padding:9px;color:var(--ink);background:#19251b;border:1px solid #6c775a;border-radius:4px}.tester-presets{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.tester-enabled{display:flex;align-items:center;gap:8px}.tester-enabled input{width:20px;height:20px}.tester-presets button{padding:9px;font-size:12px}#tester-preview table{width:100%;border-collapse:collapse;font-size:12px}#tester-preview td,#tester-preview th{padding:8px;text-align:right;border-bottom:1px solid #59664c}#tester-message{font-size:13px;color:#efca82}@media(max-width:600px){#tester-fields{grid-template-columns:1fr}#tester-toggle{font-size:11px;padding:6px}}
.spawn-settings{margin:12px 0;padding:10px 12px;border:1px solid #687957;border-radius:5px;background:#263324}.spawn-settings label{display:grid;gap:5px;font-weight:700}.spawn-settings select,.spawn-choice-hud select{width:100%;padding:9px;background:#17241a;color:#f5ebca;border:1px solid #8b986c;border-radius:4px}.spawn-settings small,.spawn-choice-hud small{display:block;margin-top:6px;color:#c9d0b4;font-size:11px;line-height:1.4}.spawn-choice-hud{position:absolute;z-index:11;left:50%;bottom:112px;transform:translateX(-50%);width:min(370px,calc(100vw - 24px));padding:13px;background:#17241bef;border:1px solid #e0c178;border-radius:6px;box-shadow:0 6px 25px #0007;color:#f5ebca}.spawn-choice-hud[hidden]{display:none}.spawn-choice-hud label{display:grid;gap:7px;font-size:13px;font-weight:750}@media(max-width:600px){.spawn-choice-hud{bottom:86px}}
.tester-saved{margin:16px 0;padding:12px;border:1px solid #72835d;border-radius:5px}.tester-saved legend{padding:0 6px;color:#edca87}.tester-preset-row{display:flex;align-items:end;gap:8px;margin:8px 0}.tester-preset-row label{display:grid;gap:5px;flex:1;font-size:12px}.tester-preset-row input,.tester-preset-row select{width:100%;min-width:0;padding:9px;background:#19251b;color:var(--ink);border:1px solid #6c775a;border-radius:4px}.tester-preset-row button{min-height:37px}.tester-saved small{display:block;line-height:1.5;color:#bcc9ad}.tester-saved p{margin:8px 0 0;color:#efca82;font-size:12px}@media(max-width:600px){.tester-preset-row{flex-wrap:wrap}.tester-preset-row label{flex-basis:100%}}

.tester-field{display:grid;gap:6px;min-width:0}.tester-field-heading{display:flex;align-items:center;gap:8px}.tester-field-heading label{font-size:13px}.tester-info-button{width:20px;height:20px;min-height:20px;padding:0;border:1px solid #91a47d;border-radius:50%;color:#f0d49a;background:#30412b;font:bold 12px Georgia,serif;line-height:18px;text-align:center}.tester-info-button[aria-expanded=true]{background:#d2a85e;color:#1a2419}.tester-field-help{grid-column:1/-1;margin:2px 0 0;padding:9px 11px;border-left:2px solid #d7ac62;background:#243222;color:#dce3cc;font-size:12px;line-height:1.55}.tester-field-help[hidden]{display:none}.tester-model{margin:12px 0}.tester-model .tester-field-heading{display:flex}.tester-visual{border:1px solid #6d805b;border-radius:6px;padding:14px;margin:18px 0;background:#223022}.tester-visual h3{font-size:16px;margin:0 0 6px;color:#edca87}.tester-visual .settings-note{margin:6px 0 12px}.tester-visual-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.tester-visual-controls label{display:grid;gap:5px;font-size:12px}.tester-visual-controls select,.tester-distance-number input{min-width:0;width:100%;padding:8px;background:#19251b;color:var(--ink);border:1px solid #6c775a;border-radius:4px}.tester-distance-controls{display:grid;grid-template-columns:auto minmax(80px,1fr) 90px;align-items:center;gap:10px;margin:14px 0}.tester-distance-controls>label:first-child{font-size:12px}.tester-distance-controls input[type=range]{width:100%;accent-color:#d9ad65}.tester-distance-number{display:flex;align-items:center;gap:4px;font-size:12px}#tester-aim-canvas{display:block;width:100%;height:auto;border:1px solid #566d50;border-radius:6px;background:#17231a}.tester-visual-summary{font-size:13px;line-height:1.5;color:#f0d49a;font-variant-numeric:tabular-nums;margin:10px 0 3px}#tester-range-note{color:#c1ceb3}.tester-actions{position:sticky;bottom:-1px;z-index:2;display:flex;flex-wrap:wrap;gap:8px;padding:12px 0;background:linear-gradient(#243024eb,#243024 25%);border-top:1px solid #667858}.tester-actions button{min-height:38px}#tester-global-message{font-size:12px;color:#efca82;line-height:1.5}@media(max-width:600px){.tester-visual-controls{grid-template-columns:1fr 1fr}.tester-distance-controls{grid-template-columns:1fr 84px}.tester-distance-controls>label:first-child{grid-column:1/-1}.tester-actions button{flex:1 1 46%}}

#tester-panel .settings-card{display:flex;flex-direction:column;overflow:hidden}#tester-form,.calibration-content{min-height:0;overflow-y:auto;padding-right:4px}
.calibration-pane{display:flex;flex-direction:column;min-height:0}.calibration-pane[hidden]{display:none}
.calibration-tabs{display:flex;gap:4px;margin:6px 0 12px}.calibration-tabs button{flex:1}.calibration-tabs button[aria-selected=true]{background:#e2bf7b;color:#1c261c;border-color:#ecd396}
.calibration-table{width:100%;border-collapse:collapse;font-size:14px}.calibration-table th,.calibration-table td{padding:7px 4px;border-bottom:1px solid #54654d;text-align:left}.calibration-table tbody th{font-weight:500}.calibration-table input{max-width:100%;width:7em;accent-color:#deb86f}.calibration-table output{display:inline-block;min-width:3.2em;text-align:right;font-variant-numeric:tabular-nums}
.calibration-content>label{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.calibration-content select,.calibration-content input[type=number]{background:#19251b;color:var(--ink);border:1px solid #6c775a;border-radius:4px;padding:6px}.calibration-status{color:#efca82;font-size:13px}
@media(max-width:600px){.calibration-table{font-size:12px}.calibration-table input[type=range]{width:100%}.calibration-table input[type=number]{width:5em}}#tester-panel .tester-actions{position:static;flex:none;margin-top:8px;padding-bottom:0;background:#243024}
#spawn-map-instruction{margin:0 0 8px;padding:8px 10px;border:1px solid #d9bb75;background:#34452b;color:#fff0c5;font-size:13px;font-weight:650;line-height:1.4}#map-panel.expanded #minimap.spawn-picking{cursor:crosshair}
#set-main-base{display:block;margin:5px 6px 7px;padding:7px 12px;background:#aa8547;border-color:#e1bb72;color:#17231c;font-weight:700}#set-main-base[hidden]{display:none}#set-main-base:disabled{opacity:.5}#set-main-base[aria-pressed="true"]{background:#ebc57b;box-shadow:0 0 0 2px #f8dc9c77}

#team-score{white-space:nowrap;color:#f1d195;border-color:#88936b;font-weight:700;padding:7px 12px;font-size:14px}.score-overlay{position:fixed;inset:0;z-index:40;background:#10190fd9;display:flex;align-items:center;justify-content:center;padding:20px}.score-overlay[hidden]{display:none}.score-overlay>section{width:min(850px,100%);max-height:90dvh;overflow:auto;background:#243024;border:1px solid #929e76;border-radius:8px;padding:26px;box-shadow:0 20px 80px #0009}.score-overlay h2{margin:0;color:#f0cc82}.match-score-scroll{overflow-x:auto}.score-overlay table{width:100%;border-collapse:collapse}.score-overlay th,.score-overlay td{padding:12px 10px;border-bottom:1px solid #53614b;text-align:right}.score-overlay th:first-child,.score-overlay td:first-child{text-align:left}.score-self{background:#414c32}#match-result-total{font-size:26px;font-weight:700;color:#ebcb8b;margin:20px 0}#match-result-note{color:#c3c8b1}@media(max-width:900px){.game-topbar .game-brand{font-size:12px}#team-score{font-size:12px;padding:5px}.game-clock{display:none}}
/* Entry flow: choose an action before showing room settings. */
#entry .entry-connection-status{margin:0 0 12px;color:#c6df97;font-size:12px}
#camera-controls{position:absolute;right:16px;top:16px;z-index:3;display:flex;align-items:center;gap:4px;user-select:none}
#camera-controls[hidden]{display:none}
#camera-controls button{min-width:0;padding:3px;background:#17241edb;border:1px solid #71836380;border-radius:5px;color:#efe9cb;touch-action:none}
#camera-controls>button:not(#camera-north){width:30px;height:32px;font-size:21px}
#camera-controls>button#camera-center-selection[aria-pressed]{width:39px;height:39px;display:grid;place-items:center;color:#c5d0bf}
#camera-controls>button#camera-center-selection[hidden][aria-pressed]{display:none}
#camera-center-selection svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#camera-center-selection .closed,#camera-center-selection[aria-pressed="true"] .open{display:none}
#camera-center-selection[aria-pressed="true"] .closed{display:inline}
#camera-controls #camera-center-selection[aria-pressed="true"]{color:#ffe0a2;background:#553f20;border:2px solid #efbd67}
#camera-center-selection[aria-pressed="true"] .lock-body{fill:#edb353;stroke:#ffd994}
#camera-center-selection[aria-pressed="true"] .lock-key{stroke:#44321e;stroke-width:2.6}
#camera-controls #camera-north{position:relative;width:68px;height:98px;border:0;background:transparent}
#camera-dial{display:block;width:64px;height:64px}
#camera-bearing{display:block;font:11px ui-monospace,monospace;margin-top:-2px}
.camera-reset-hint{display:block;margin-top:3px;font:10px system-ui;color:#efe9cb}
.map-options{padding:4px 6px 6px;border-top:1px solid #71836344}
.map-options label{display:flex;align-items:center;gap:6px;font:10px system-ui;color:#dedfc5;cursor:pointer}
.map-options input[type=checkbox]{width:13px;height:13px;margin:0;accent-color:#e3a04c}
#map-panel.expanded .map-options{padding:7px 10px}
#map-panel.expanded .map-options label{font-size:12px}
#map-panel.expanded{max-height:calc(100% - 24px);overflow-y:auto;overscroll-behavior:contain}
@media(max-width:600px){#camera-controls{top:8px;right:8px;gap:1px}#camera-controls #camera-north{width:54px;height:83px}#camera-dial{width:50px;height:50px}#camera-controls>button:not(#camera-north){width:26px;height:28px}}
#entry .entry-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#entry .entry-action{display:grid;text-align:left;align-content:center;gap:5px;min-height:90px;padding:15px 18px}
#entry .entry-action strong{font-size:18px}
#entry .entry-action span{font-size:12px;font-weight:400;color:inherit;opacity:.86}
#entry .entry-browser{margin-top:18px;padding:16px;border:1px solid #52644e;border-radius:6px;background:#18251b}
#entry .entry-browser-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
#entry .entry-browser-heading h2{margin:0;color:#edca87;font-size:17px}
#entry .entry-browser-heading p{margin:3px 0 0;color:#b3bcae;font-size:12px}
#entry .entry-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
#entry #entry-rooms-status{min-height:20px;margin:0 0 9px;font-size:12px;color:#c5d8ad}
#entry .entry-rooms-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:min(42vh,370px);overflow:auto;scrollbar-width:thin}
#entry .entry-room-card{min-width:0;display:grid;gap:7px;padding:13px;background:#223126;border:1px solid #4e624f;border-radius:5px}
#entry .entry-room-card h3{margin:0;font-size:15px;overflow-wrap:anywhere}
#entry .entry-room-card p{margin:0;color:#b8c5b3;font-size:11px}
#entry .entry-room-card .entry-room-tags{display:flex;flex-wrap:wrap;gap:5px}
#entry .entry-room-card .entry-room-tags span{padding:2px 6px;background:#344936;border-radius:3px;font-size:10px}
#entry .entry-room-card button{justify-self:start;min-width:120px;margin-top:3px}
#entry .entry-empty{grid-column:1/-1;padding:18px;border:1px dashed #61745c;color:#b3bcae;font-size:13px}
#entry #entry-code{margin-top:12px}
#entry #entry-forms .entry-panels{display:block;margin-top:12px}
#entry #entry-forms .entry-panel[hidden]{display:none}
#entry #entry-forms .join-room-panel{max-width:720px;margin:auto}
#entry .entry-back{margin-bottom:8px;padding:6px 10px;background:transparent;border-color:transparent;color:#d5e5a0}
#entry .join-roster{padding:12px;background:#142017;border:1px solid #52644e;border-radius:4px}
#entry .join-roster h2{margin:0 0 6px;font-size:14px;color:#edca87}
#entry .join-roster p{margin:0;color:#b3bcae;font-size:12px}
#entry .join-roster ul{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0 0;padding:0}
#entry .join-roster li{display:flex;justify-content:space-between;gap:8px;padding:7px 9px;background:#223126;font-size:12px}
#entry .join-roster li small{color:#b3bcae}
.entry-card.entry-view-join{width:min(720px,100%)}
@media(max-width:700px){#entry .entry-rooms-list,#entry .entry-action-grid,#entry .join-roster ul{grid-template-columns:1fr}#entry .entry-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#entry .entry-rooms-list{max-height:45vh}#entry .entry-action{min-height:70px}}

/* Shared order controls for infantry and vehicle drivers. */
.orders-panel{font-size:11px}.orders-heading{display:flex;align-items:center;justify-content:space-between;color:#c4ceb6;font-size:9px;letter-spacing:.12em;margin-bottom:7px}.orders-heading kbd{font-size:10px;min-width:19px;padding:0 4px}.orders-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px}.orders-switch button{padding:6px 8px;font-size:11px}.orders-switch kbd{font-size:9px;min-width:14px;padding:0 3px}.orders-switch button[aria-pressed=true]{background:#505333;border-color:#e5b667;color:#fff0c3}.orders-panel #orders-unit{display:block;font-size:11px;color:#e8d59c;margin-top:10px}.orders-panel #orders-status{margin:4px 0 8px;color:#d1dcc3;font-size:11px;line-height:1.4;overflow-wrap:anywhere}.orders-panel #orders-status.orders-warning{color:#f2c090}.orders-actions{display:flex;gap:5px;flex-wrap:wrap}.orders-actions button{padding:4px 7px;font-size:10px}.orders-actions kbd{font-size:9px;min-width:14px;padding:0 3px}.orders-panel #orders-note{margin:8px 0 0;padding-top:7px;border-top:1px solid #82937044;color:#bbc8ad;font-size:10px;line-height:1.6;white-space:pre-line}.orders-stage{display:block;font-size:9px;color:#aebda3;margin-top:7px}#field.orders-cursor{cursor:default}@media(max-width:600px){.orders-panel #orders-note{font-size:9px}.orders-switch button{padding:5px 3px;font-size:10px}}
.orders-panel.vehicle-orders .orders-new-pace{display:none}
.orders-camera-actions{display:flex;gap:5px}
.orders-actions #orders-track[aria-pressed=true]{background:#505333;border-color:#e5b667;color:#fff0c3}
.orders-new-pace{margin-top:10px;padding-top:8px;border-top:1px solid #82937044}.orders-new-pace>span,.orders-route-heading{display:block;color:#c4ceb6;font-size:10px;margin-bottom:5px}.orders-pace{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.orders-pace button{padding:5px 4px;font-size:10px}.orders-pace button:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#f4cc78;margin-right:5px}.orders-pace #orders-pace-run:before{background:#8edbd3}.orders-pace #orders-pace-crawl:before{background:#b8a3e2}.orders-pace button[aria-pressed=true]{border-color:#e5b667;background:#505333;color:#fff0c3}.orders-pace #orders-pace-run[aria-pressed=true]{border-color:#8edbd3;background:#294b47;color:#c7f1ec}.orders-pace #orders-pace-crawl[aria-pressed=true]{border-color:#b8a3e2;background:#41364f;color:#eee1ff}
#orders-route{margin-top:10px}#orders-waypoints{list-style:none;margin:0;padding:0;max-height:120px;overflow-y:auto;scrollbar-width:thin}#orders-waypoints li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 6px;margin-bottom:3px;border-left:2px solid #f4cc78;background:#121d164d}#orders-waypoints li.orders-running{border-color:#8edbd3}#orders-waypoints li.orders-crawling{border-color:#b8a3e2}#orders-waypoints small{display:block;font-size:9px;color:#aebda3}#orders-waypoints select{width:83px;padding:4px 5px;font-size:11px;min-height:29px}.orders-legend{display:block;font-size:9px;line-height:1.5;color:#b7c5a9;margin-top:5px}
.orders-patrol{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}.orders-patrol button{padding:5px 7px;font-size:11px}.orders-patrol #orders-reverse-loop{grid-column:1/-1}.orders-patrol button[aria-pressed=true]{border-color:#e5b667;background:#505333;color:#fff0c3}.orders-patrol #orders-loop[aria-pressed=true],.orders-patrol #orders-reverse-loop[aria-pressed=true]{border-color:#8edbd3;background:#294b47;color:#c7f1ec}.orders-patrol-help{display:block;margin-top:4px;font-size:9px;line-height:1.4;color:#b7c5a9}

/* The order controls grow upward from the soldier or vehicle status card. */
#hud.hud.player-status{display:flex;flex-direction:column;gap:0;padding:0;max-height:calc(100% - 40px);overflow:hidden;z-index:7}
.squad-role-badge{position:absolute;right:0;top:26px;display:grid;place-items:center;width:18px;height:18px;border:1px solid #c9b273;border-radius:50%;background:#253226;color:#f6dfa2;z-index:2;pointer-events:none}.squad-role-badge svg{width:13px;height:13px}
 .orders-travel-defaults{display:flex;align-items:center;gap:8px;margin:7px 0;font-size:11px;color:#d8dec9}.orders-travel-defaults select{min-width:0;flex:1;padding:4px;background:#223024;color:#f3e6bc;border:1px solid #788366;border-radius:3px}
#hud .orders-travel-defaults{order:5;margin:2px 0;font-size:10px}
#hud .orders-ending{order:7;display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:0}
#hud .orders-ending[hidden],#hud .orders-ending [hidden]{display:none!important}
#hud .orders-ending legend{font-size:11px}
#hud #orders-end-stance-row{display:flex;align-items:center;gap:5px;font-size:10px}
#hud #orders-end-stance{min-width:0;width:95px;min-height:26px;padding:3px;font-size:10px}
#hud .orders-ending .orders-end-row{font-size:10px;margin:0}
#hud .orders-ending-actions{grid-column:1/-1}
#hud .orders-ending-actions button{min-height:27px;padding:3px 7px;font-size:10px}
#squad-select{position:absolute;z-index:8;left:50%;bottom:112px;transform:translateX(-50%);width:min(560px,calc(100vw - 580px));pointer-events:auto;user-select:none;-webkit-user-select:none}
#squad-select[hidden],.inventory-open #squad-select{display:none!important}
#squad-select[hidden],.inventory-open #squad-select[hidden]{display:none!important}
.inventory-open #squad-select{display:block!important;left:calc((100% - var(--drawer) - 32px)/2);width:min(560px,calc(100% - var(--drawer) - 48px));z-index:12}
.inventory-open #loadout.quickbar{display:flex!important;left:calc((100% - var(--drawer) - 32px)/2)!important;z-index:12}
@media(max-width:900px){.inventory-open #squad-units{flex-wrap:wrap}.inventory-open #squad-select{bottom:103px}}
@media(max-width:600px){.inventory-open #squad-select{left:50%;top:72px;bottom:auto;width:calc(100% - 32px);z-index:12}.inventory-open .equipment-panel{padding-top:100px}.inventory-open #loadout.quickbar{left:50%!important;bottom:6px!important;z-index:12}}
#personal-gear{margin:16px 0 0;padding:10px;border:1px solid #6e7d61;border-radius:5px;background:#1e2b20aa}#personal-gear[hidden]{display:none}#personal-gear h3{margin:0 0 8px;font-size:12px;color:#dae2c9}#personal-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.personal-gear-item{min-width:0;padding:4px;background:#34432dcc;border:1px solid #718067;display:flex;align-items:center;gap:3px;font-size:10px}.personal-gear-item svg{width:26px;height:24px;flex:none}.personal-gear-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#squad-units{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;min-width:0}
#squad-units button{position:relative;flex:0 1 55px;min-width:0;max-width:55px;padding:0;display:flex;flex-direction:column;align-items:center;gap:3px;background:transparent;border:0;box-shadow:none;overflow:visible;font-size:10px;color:#f4f1dd;line-height:1.2;text-shadow:0 1px 3px #101b12,0 0 5px #101b12}
#squad-units .squad-face{position:relative;display:block;flex:none;width:40px;height:40px;border:2px solid #91a184;border-radius:50%;overflow:hidden;background:#394332;box-shadow:0 2px 7px #0008;transition:transform .16s ease}
#squad-units .squad-face img{position:absolute;top:-2px;left:50%;width:125px;max-width:none;height:auto;transform:translateX(-50%);pointer-events:none}
#squad-units button.squad-vehicle{flex-basis:70px;max-width:70px;gap:1px}
#squad-units .squad-vehicle .squad-face{display:grid;place-items:center;width:68px;height:40px;border:0;border-radius:0;overflow:visible;background:transparent;box-shadow:none}
#squad-units .squad-vehicle .squad-face img{position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;transform:none;filter:drop-shadow(0 2px 2px #000c)}
#squad-units .squad-vehicle-crew{position:absolute;right:0;top:28px;display:grid;place-items:center;min-width:15px;height:15px;padding:0 2px;border:1px solid #b4c4a0;border-radius:3px;background:#1b2b21;color:#f5edcd;font-size:9px;font-weight:700;text-shadow:none}
#squad-units .squad-name{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-weight:650}
#squad-units button kbd{position:absolute;top:-3px;left:1px;padding:1px 3px;background:#17251ce8;color:#f0ddb0;font-size:9px;border:1px solid #8b9a7d;border-radius:3px;text-shadow:none}
#squad-units button[aria-pressed="true"] .squad-face,#squad-units button[aria-pressed="true"] .squad-camera-icon{border-color:#efc577;box-shadow:0 0 0 2px #edbd63a8,0 2px 8px #0008}
#squad-units button:hover,#squad-units button:focus-visible{z-index:9}
#squad-units button:hover .squad-face,#squad-units button:focus-visible .squad-face{transform:scale(1.5)}
#squad-units button .squad-surname{display:none;position:absolute;bottom:calc(100% + 7px);left:50%;transform:translateX(-50%);width:max-content;max-width:180px;padding:5px 8px;background:#19271ff2;border:1px solid #92a183;border-radius:4px;box-shadow:0 3px 10px #0008;white-space:normal;text-align:center;font-size:11px;z-index:2}
#squad-units button:hover .squad-surname,#squad-units button:focus-visible .squad-surname{display:block}
#squad-units .squad-camera-icon{display:grid;place-items:center;width:40px;height:40px;border:2px solid #91a184;border-radius:50%;background:#1b2b21da;font-size:25px;line-height:1;text-shadow:none}
#squad-units button.squad-dead{opacity:.55}
.squad-group-tools{display:flex;justify-content:center;gap:5px;margin-bottom:4px}.squad-group-tools button{padding:3px 7px;background:#1b2b21e8;color:#f3e4bd;border:1px solid #a99768;border-radius:4px;font-size:10px}.squad-group-tools button[hidden],.squad-group-members[hidden]{display:none!important}.squad-group-tools button:disabled{opacity:.55}
.squad-group-tools{flex-wrap:wrap;align-items:center}.squad-group-hint{flex-basis:100%;text-align:center;padding:2px 5px;border-radius:3px;background:#1b2b21df;color:#f0dfb2;font-size:10px;line-height:1.3}.squad-group-hint[hidden]{display:none}
#team-bot-orders{display:grid;justify-content:center;gap:4px;margin:3px 0 6px;max-width:100%}
#team-bot-orders[hidden],body:not(.in-room) #team-bot-orders,body.training-observer #team-bot-orders{display:none!important}
.team-bot-order{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:8px;max-width:100%;padding:3px 5px 3px 8px;border:1px solid #89976c;border-radius:4px;background:#1b2b21ed;color:#f3e4bd;font-size:11px}
.team-bot-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-bot-order>div{display:flex;flex:none;gap:3px}
.team-bot-order button{display:flex;align-items:center;gap:3px;min-height:28px;padding:3px 6px;font-size:11px;line-height:1.1;background:#283b2d;border-color:#7f9068;white-space:nowrap}
.team-bot-order button svg{width:15px;height:15px;flex:none}
.team-bot-order button[aria-pressed="true"]{background:#5a5631;border-color:#e0bd71;color:#fff1ca}
.match-bot-task{color:#c7d0ba;font-size:11px}
#squad-units .squad-group .squad-face{display:grid;place-items:center;background:#293c31;border-color:#c4aa70}.squad-group-symbol{font-size:20px;letter-spacing:-7px;padding-right:7px;color:#e8d09a;text-shadow:1px 2px 2px #000}
#squad-units button.squad-group-candidate .squad-face{border-color:#f0cb73;box-shadow:0 0 0 3px #f0cb73a0}
#unit-group{padding:8px 10px;border-top:1px solid #84957577;background:#1b2a20ed;color:#eee6cd;font-size:11px}#unit-group[hidden]{display:none!important}.unit-group-header,.unit-group-modes{display:flex;align-items:center;justify-content:space-between;gap:5px}.unit-group-header strong{font-size:12px;color:#ecd6a1}.unit-group-header button{padding:3px 7px}.unit-group-modes{margin:6px 0}.unit-group-modes button{flex:1;padding:5px}.unit-group-modes button[aria-pressed=true],.unit-group-members button[aria-pressed=true]{background:#5e4c2a;border-color:#eac277;color:#fff3cf}#unit-group small{display:block;color:#c7d1b7;line-height:1.35}.unit-group-members{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:4px;margin-top:7px;max-height:130px;overflow-y:auto}.unit-group-members button{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0;padding:4px 2px;font-size:10px}.unit-group-members img{width:34px;height:34px;object-fit:cover;object-position:50% 12%;border-radius:50%;background:#364333}.unit-group-members span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.free-camera #hud.hud.player-status{display:none}
body.free-camera #field{cursor:grab}
body.free-camera #field:active{cursor:grabbing}
@media(max-width:950px){#squad-select{top:6px;bottom:auto;width:min(520px,calc(100vw - 20px))}}
@media(max-width:480px){#squad-units{gap:2px}#squad-units button{font-size:9px}#squad-units .squad-face,#squad-units .squad-camera-icon{width:36px;height:36px}#squad-units .squad-face img{width:112px}#squad-units button kbd{font-size:8px}}
@media(hover:none){#squad-units .squad-face{transition:none}#squad-units button:hover .squad-face{transform:none}}
@media(prefers-reduced-motion:reduce){#squad-units .squad-face{transition:none}}
.squad-count-field small{color:#b5c4aa;font-size:10px;line-height:1.45}
.squad-names-panel{margin:10px 0;padding:12px 14px;border:1px solid #637258;border-radius:5px;background:#17251c}
.squad-names-panel[hidden]{display:none!important}
.squad-names-panel h3{margin:0 0 5px;color:#e5ebcf;font-size:14px}
.squad-names-panel p{margin:0 0 9px;color:#b9c6b1;font-size:11px;line-height:1.45}
.squad-name-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:185px;overflow-y:auto;scrollbar-width:thin}
.squad-name-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 5px;align-items:center;min-width:0;padding:6px 8px;border:1px solid #50634d;border-radius:4px;background:#1d2d20}
.squad-name-row span{grid-column:1/-1;color:#d9e5c3;font-size:11px;font-weight:700}
.squad-name-row input{grid-column:1/-1;min-width:0;width:100%;font-size:11px}
.squad-name-row small{grid-column:1/-1;color:#adbea6;font-size:9px}
.squad-name-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;margin-top:9px}.squad-name-actions button{font-size:11px}
.squad-name-status{display:block;min-height:1.3em;margin-top:5px;color:#cbd9ba;font-size:10px}
@media(max-width:760px){.squad-name-list{grid-template-columns:1fr;max-height:230px}}
#sound-cues{z-index:8}
body:not(.in-room) #hud.hud.player-status{display:none}
#hud.orders-expanded{width:300px}
#hud .status-main{display:grid;grid-template-columns:60px minmax(0,1fr);gap:4px 10px;padding:12px;flex:none;min-width:0}
#hud.vehicle-status .status-main{grid-template-columns:112px minmax(0,1fr)}
.status-fuel{margin:6px 0;color:#e3dec4}
.fuel-line{display:flex;justify-content:space-between;gap:5px;font-size:11px;font-variant-numeric:tabular-nums}
.fuel-line strong{color:#f0d293;white-space:nowrap}
.fuel-meter{height:5px;margin-top:3px;border-radius:2px;background:#192017;overflow:hidden}
.fuel-meter i{display:block;height:100%;background:#b99a54}
.fuel-meter.fuel-low i{background:#e18b60}
#fuel-note{display:block;margin-top:4px;color:#f0cd93;font-size:10px}
.status-fuel[hidden],#fuel-note[hidden],.fuel-transfer[hidden]{display:none}
.fuel-transfer select{grid-column:1/-1}.fuel-transfer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-top:6px;pointer-events:auto}
.fuel-transfer select,.fuel-transfer button{width:100%;min-width:0;font-size:11px;padding:4px 5px}
.fuel-transfer button{min-height:30px}
#hud .orders-panel{position:static;left:auto;top:auto;width:auto;max-height:none;min-height:0;overflow:visible;display:flex;flex-direction:column;flex:0 1 auto;padding:10px 12px;border:0;border-bottom:1px solid #83917488;border-radius:0;background:transparent;box-shadow:none;pointer-events:auto}
#hud .orders-panel[hidden],#hud #orders-body[hidden],#hud #orders-route[hidden],#hud #orders-note[hidden]{display:none!important}
#hud #orders-body{display:flex;flex-direction:column;gap:7px;min-height:0;flex:0 1 auto;overflow:hidden}
#hud #orders-status{order:0;margin:0;color:#f0dfad;font-size:12px;font-weight:700}
#hud #orders-unit{order:1;margin:0 0 2px;color:#b9c8ac;font-size:10px;font-weight:400}
#hud .orders-actions{order:2}
#hud .orders-combat{order:1;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;margin:0;padding:0;border:0;color:#d5dfc9;font-size:10px}
#hud .orders-combat>span{flex:1;min-width:0;line-height:1.3}
#hud .orders-combat-options{display:flex;gap:4px;flex:none}
#hud .orders-combat-options input{position:absolute;width:1px;height:1px;opacity:0}
#hud .orders-combat-options label{display:grid;place-items:center;width:34px;height:30px;border:1px solid #728265;border-radius:4px;background:#1b281e;color:#c5d0bc;cursor:pointer}
#hud .orders-combat-options input[hidden]+label{display:none}
#hud .orders-combat-options svg{width:19px;height:19px}
#hud .orders-combat-options label:hover{background:#354535;color:#fff4d8}
#hud .orders-combat-options input:checked+label{border-color:#e5b667;background:#665637;color:#fff0c3;box-shadow:inset 0 0 0 1px #d8b66b66}
#hud .orders-combat-options input:focus-visible+label{outline:2px solid #d4edce;outline-offset:2px}
#hud .orders-combat-options input:disabled+label{opacity:.5;cursor:default}
#hud .orders-new-pace{order:3;display:flex;align-items:center;gap:8px;margin:0;padding:6px 0 0}
#hud .orders-new-pace .orders-pace{width:100%}
#hud .orders-panel.vehicle-orders .orders-new-pace{display:none}
#hud .orders-new-pace>span{margin:0;white-space:nowrap}
#hud .orders-patrol{grid-template-columns:1fr 38px 38px}
#hud .orders-patrol #orders-reverse-loop{grid-column:auto}
#hud .orders-pace{flex:1;min-width:0}
#hud .orders-patrol{order:4;margin:0}
#hud .orders-patrol-help{order:5;margin:0}
#hud #orders-route{order:6;display:flex;flex-direction:column;min-height:0;flex:0 1 auto;margin:0;padding:7px;border:1px solid #72826588;border-radius:4px;background:#111d14aa}
#hud #orders-waypoints{min-height:0;max-height:min(170px,22vh);flex:0 1 auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
#hud #orders-waypoints li{align-items:flex-start;gap:5px}
#hud #orders-waypoints li>span:first-child{padding-top:7px;white-space:nowrap}
#hud .orders-point-controls{display:flex;align-items:flex-start;gap:5px;flex:none}
#hud .orders-point-pace,#hud .orders-point-combat{width:34px;color:#c5d0bc}
#hud .orders-point-pace summary,#hud .orders-point-combat summary{display:grid;place-items:center;width:34px;height:32px;padding:2px;border:1px solid #e5b667;border-radius:5px;background:#5b5030;color:#fff0c3;cursor:pointer;list-style:none}
#hud .orders-point-pace summary{font-size:18px;line-height:1}
#hud .orders-point-pace summary::-webkit-details-marker,#hud .orders-point-combat summary::-webkit-details-marker{display:none}
#hud .orders-point-combat summary svg,#hud .orders-point-menu svg{width:20px;height:20px}
#hud .orders-point-pace summary:hover,#hud .orders-point-combat summary:hover,#hud .orders-point-pace[open] summary,#hud .orders-point-combat[open] summary{background:#76623a;border-color:#f3d18b}
#hud .orders-point-pace summary:focus-visible,#hud .orders-point-combat summary:focus-visible,#hud .orders-point-menu button:focus-visible{outline:2px solid #d4edce;outline-offset:2px}
#hud .orders-point-menu{display:none;flex-direction:column;gap:3px;padding-top:3px}
#hud .orders-point-pace[open] .orders-point-menu,#hud .orders-point-combat[open] .orders-point-menu{display:flex}
#hud .orders-point-menu button{display:grid;place-items:center;width:34px;height:32px;padding:2px;border:1px solid #728265;border-radius:5px;background:#1b281e;color:#c5d0bc;cursor:pointer;font-size:18px}
#hud .orders-point-menu button[hidden]{display:none!important}
#hud .orders-point-menu button:hover{background:#354535;color:#fff4d8}
#hud #orders-waypoints select{width:108px;max-width:100%;min-height:27px;padding:3px;font-size:9px}
#hud #stance-toggle{margin-top:6px;padding:3px 8px;font-size:10px;min-height:25px;border-color:#7a8b6c;background:#233126;color:#dbe7ce}
#hud #stance-toggle[hidden]{display:none!important}
#hud #stance-toggle[aria-pressed=true]{border-color:#b8a3e2;background:#41364f;color:#eee1ff}
#hud .orders-route-guide{order:3;display:flex;align-items:center;gap:4px;margin:-1px 0 -2px;color:#bdc9ad;font-size:10px}
#hud .orders-route-guide button{display:grid;place-items:center;width:19px;height:19px;padding:0;border-radius:50%;font-size:12px;font-weight:700;line-height:1}
#hud .orders-launch{order:4;display:grid;grid-template-columns:1fr 1fr;gap:5px}
#hud .orders-launch button{padding:5px 3px;font-size:10px}
#hud .orders-launch button[aria-pressed="true"]{background:#5b5030;border-color:#e5b667;color:#fff1c8}
#hud .orders-legend{flex:none}
#hud .orders-stage{order:7;margin:0}
#hud #orders-note{margin:7px 0 8px;padding:6px 0 0;line-height:1.4}
#hud .orders-heading{margin:0 0 5px;padding-top:5px;border-top:1px solid #82937044}
#hud .orders-switch button{min-height:30px}
#hud #orders-saved{margin:8px 0 0;padding:5px 8px;border:1px solid #d5bb755c;border-radius:4px;background:#5a543329;color:#e8d59c;font-size:10px;line-height:1.35}
#hud #orders-saved[hidden]{display:none!important}
@media(max-width:1150px){#hud .status-main{grid-template-columns:45px minmax(0,1fr);gap:4px 8px;padding:10px}#hud.vehicle-status .status-main{grid-template-columns:86px minmax(0,1fr)}}
@media(max-width:900px){#hud.hud.player-status{max-height:calc(100% - 128px)}}
@media(max-width:600px){#hud.hud.player-status{max-height:calc(100% - 126px)}#hud.orders-expanded{width:min(300px,calc(100vw - 170px))}#hud .status-main{grid-template-columns:36px minmax(0,1fr);gap:3px 6px;padding:8px}#hud.vehicle-status .status-main{grid-template-columns:62px minmax(0,1fr)}#hud .orders-panel{padding:7px 8px}#hud .orders-actions button{padding:4px 5px}#hud .orders-new-pace{display:block}#hud .orders-pace{margin-top:4px}#hud #orders-waypoints{max-height:85px}.inventory-open #hud.hud.player-status{display:flex;z-index:11;top:54px;bottom:auto;left:10px;right:auto;max-height:32vh;overflow:auto;width:min(272px,calc(100vw - 20px))}.inventory-open #hud .status-main{display:none}}
@media(max-height:760px){#hud .orders-patrol-help,#hud .orders-legend,#hud .orders-stage{display:none}#hud #orders-waypoints{max-height:110px}}
@media(max-height:760px){#hud.orders-expanded #orders-body{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}#hud .unit-group-members{max-height:80px}}
@media(max-height:650px){#hud.hud.player-status{overflow-y:auto;scrollbar-width:thin}#hud .orders-panel{flex-shrink:0}}
@media(max-width:600px) and (max-height:760px){#hud #orders-note{display:none}}
@media(max-height:600px){#hud #orders-note{display:none}#hud #orders-waypoints{max-height:75px}}

/* Keep the current unit available without covering the battlefield. */
.game-actions #fullscreen-toggle .fullscreen-icon{display:inline;font-size:17px;line-height:1}
#fullscreen-toggle[aria-pressed="true"]{border-color:#e5b667;background:#505333;color:#fff0c3}
#hud.orders-compact{width:272px}
#hud.orders-compact .status-main{display:grid}
#hud.orders-compact .orders-panel{padding:7px 10px}
#hud.orders-compact #orders-saved{display:none}
#hud #orders-compact{display:flex;align-items:center;justify-content:space-between;gap:7px}
#hud #orders-compact-status{min-width:0;font-size:10px;line-height:1.3;color:#f0dfad}
#hud .orders-compact-actions{display:flex;gap:4px;flex:none}
#hud .orders-compact-actions button,#hud #orders-collapse{padding:4px 6px;font-size:9px;white-space:nowrap}
#hud #orders-collapse{align-self:flex-end;margin:0 0 4px}

/* The map and compass share a side; the unit card always occupies the other. */
#map-panel:not(.expanded){width:264px;top:auto;bottom:24px;overflow:hidden;opacity:.83;transition:opacity .16s ease}
#map-panel:not(.expanded)[data-side="left"]{left:16px;right:auto}
#map-panel:not(.expanded)[data-side="right"]{left:auto;right:16px}
#map-panel:not(.expanded) #minimap{height:192px}
body.map-left #camera-controls{left:16px;right:auto}
body.map-left #hud.hud.player-status{left:auto;right:16px}
.inventory-open #map-panel:not(.expanded){display:none}
#map-panel,#hud,#camera-controls,#loadout{user-select:none;-webkit-user-select:none}
body.map-dragging *{user-select:none!important;-webkit-user-select:none!important}
#hud.hud.player-status,#camera-controls,#loadout{opacity:.79;transition:opacity .16s ease}
#hud.hud.player-status:hover,#hud.hud.player-status:focus-within,#camera-controls:hover,#camera-controls:focus-within,#loadout:hover,#loadout:focus-within,#map-panel:not(.expanded):hover,#map-panel:not(.expanded):has(button:focus-visible),#map-panel.controls-open{opacity:1}
#map-panel .map-side-controls{display:flex;align-items:center;gap:3px}
#map-panel .map-side-controls button{min-width:27px;min-height:25px;padding:1px 5px;font-size:16px;line-height:1}
#map-panel .map-side-controls button[aria-pressed="true"]{background:#665637;border-color:#e1b76b}
#map-panel .map-options{display:flex;align-items:center;justify-content:flex-end;gap:5px}
#map-panel:not(.expanded) :is(.map-heading,.map-options,.map-zoom){position:absolute;left:0;right:0;z-index:2;background:#17271df0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease,visibility .12s}
#map-panel:not(.expanded):is(:hover,.controls-open) :is(.map-heading,.map-options,.map-zoom),#map-panel:not(.expanded):has(button:focus-visible) :is(.map-heading,.map-options,.map-zoom){opacity:1;visibility:visible;pointer-events:auto}
#map-panel:not(.expanded) .map-heading{top:0;min-height:31px;padding:3px 5px}
#map-panel:not(.expanded) #map-status{display:none}
#map-panel:not(.expanded) .map-options{top:31px;min-height:25px;border-top:1px solid #71836344;padding:3px 7px}
#map-panel:not(.expanded) .map-zoom{bottom:0;grid-template-columns:27px 32px 27px minmax(0,1fr) minmax(0,1fr);gap:3px;padding:4px}
#map-panel:not(.expanded) .map-zoom>*{grid-column:auto}
#map-panel:not(.expanded) .map-zoom button{min-height:27px;padding:2px 3px;font-size:9px}
#map-panel:not(.expanded) #map-near,#map-panel:not(.expanded) #map-follow{display:block}
#map-panel .map-controls-toggle{display:none}
#map-panel.expanded{opacity:1;overflow-y:auto}
#map-panel.expanded .map-heading,#map-panel.expanded .map-options,#map-panel.expanded .map-zoom{position:static;opacity:1;visibility:visible;pointer-events:auto}
#map-panel.expanded .map-zoom{grid-template-columns:32px 40px 32px 1fr 1fr}
#map-panel.expanded .map-zoom>*{grid-column:auto}
.game-actions .fullscreen-shortcut{font-size:9px;line-height:1.3;min-width:0;padding:1px 3px}
@media(max-width:1150px){#map-panel:not(.expanded){width:220px}#map-panel:not(.expanded) #minimap{height:164px}}
@media(max-width:900px){#map-panel:not(.expanded){width:190px}#map-panel:not(.expanded) #minimap{height:144px}}
@media(max-width:600px){#hud.orders-compact{width:min(272px,calc(100vw - 20px))}#map-panel:not(.expanded){width:145px;bottom:auto;top:102px}#map-panel:not(.expanded)[data-side="left"]{left:10px}#map-panel:not(.expanded)[data-side="right"]{right:10px}#map-panel:not(.expanded) #minimap{height:110px}body.map-left #camera-controls{left:8px;right:auto}body.map-left #hud.hud.player-status{right:10px;left:auto}#map-panel:not(.expanded) .map-zoom{grid-template-columns:23px 25px 23px 1fr 1fr}#map-panel:not(.expanded) .map-zoom button{font-size:8px;padding:2px}#map-panel:not(.expanded) .map-side-controls button{min-width:22px;padding:1px 3px}#map-panel:not(.expanded) .map-heading #map-caption{font-size:8px}}
@media(hover:none){#hud.hud.player-status,#camera-controls,#loadout,#map-panel:not(.expanded){opacity:1}#map-panel:not(.expanded) .map-controls-toggle{display:block;position:absolute;top:3px;right:3px;z-index:4;min-width:28px;min-height:26px;padding:0 4px;background:#17271de0;font-size:20px;line-height:1}}
@media(prefers-reduced-motion:reduce){#hud.hud.player-status,#camera-controls,#loadout,#map-panel:not(.expanded),#map-panel:not(.expanded) :is(.map-heading,.map-options,.map-zoom){transition:none}}
/* Expanded map fills the battlefield; controls occupy a narrow movable rail. */
#map-panel:not(.expanded) #map-help-toggle{display:none}
#map-panel.expanded{display:grid;grid-template-columns:minmax(0,1fr) 204px;grid-template-rows:auto auto auto minmax(0,1fr);width:calc(100vw - 32px);height:calc(100dvh - 82px);max-height:calc(100% - 20px);overflow:hidden;opacity:1}
#map-panel.expanded #minimap{grid-column:1;grid-row:1/5;width:100%;height:100%;min-width:0;min-height:0;max-height:none}
#map-panel.expanded .map-heading,#map-panel.expanded .map-options,#map-panel.expanded .map-zoom{grid-column:2;min-width:0;align-self:start;background:#17271d}
#map-panel.expanded .map-heading{grid-row:1;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:5px;padding:8px}
#map-panel.expanded #map-toggle{order:2;width:100%;text-align:left}
#map-panel.expanded #map-status{display:none}
#map-panel.expanded #map-help-toggle{order:1;margin-left:auto;min-width:27px;min-height:27px;padding:2px 6px;font-weight:700}
#map-panel.expanded .map-options{grid-row:2;justify-content:flex-start;padding:9px 8px}
#map-panel.expanded .map-zoom{grid-row:3;display:grid;grid-template-columns:32px minmax(0,1fr) 32px;gap:5px;align-content:start;padding:9px 8px;border-top:1px solid #71836366}
#map-panel.expanded .map-zoom>*{grid-column:auto}
#map-panel.expanded .map-zoom #map-follow,#map-panel.expanded .map-zoom #map-near{grid-column:1/-1}
#map-panel.expanded .map-zoom button{min-height:31px}
#map-panel.expanded[data-side="left"]{grid-template-columns:204px minmax(0,1fr)}
#map-panel.expanded[data-side="left"] #minimap{grid-column:2}
#map-panel.expanded[data-side="left"] :is(.map-heading,.map-options,.map-zoom,.map-orders){grid-column:1}
#map-panel.expanded .map-legend{display:none;position:absolute;z-index:6;top:14px;left:14px;width:min(430px,calc(100% - 245px));max-height:calc(100% - 28px);overflow:auto;padding:14px 16px;text-align:left;line-height:1.65;border:1px solid #a1ad88;border-radius:5px;background:#17251cf5;box-shadow:0 5px 24px #0008}
#map-panel.expanded.help-open .map-legend{display:block}
#map-panel.expanded[data-side="left"] .map-legend{left:218px}
#map-panel.expanded #spawn-map-instruction:not([hidden]){display:block;position:absolute;top:15px;left:50%;transform:translateX(-50%);z-index:5;max-width:min(460px,calc(100% - 250px));text-align:center}
#map-panel:not(.expanded) .map-orders{display:none}
#map-orders[hidden],#map-orders-actions[hidden],#map-orders-pace[hidden]{display:none!important}
#map-panel.expanded .map-orders{grid-column:2;grid-row:4;min-height:0;overflow-y:auto;padding:9px 8px 15px;border-top:1px solid #71836366;background:#17271d;color:#e9ead6;font-size:11px;scrollbar-width:thin}
.map-orders strong{display:block;margin-bottom:7px;font-size:12px}.map-orders p{margin:6px 0;color:#bdc9ad;line-height:1.4}.map-orders-modes,.map-orders-tools{display:flex;gap:4px;margin-bottom:5px}.map-orders button{min-width:0;min-height:30px;flex:1;padding:3px 5px;font-size:10px;white-space:normal}.map-orders button[aria-pressed="true"],.map-orders button.tool-active{background:#665637;border-color:#e1b76b;color:#fff4cb}.map-orders button:disabled{opacity:.45}.map-orders-combat{display:block;margin:9px 0 7px;color:#bdc9ad}.map-orders-combat select{width:100%;margin-top:4px;font-size:11px}.map-orders #map-orders-points{margin:8px 0 0;padding-left:22px;max-height:140px;overflow-y:auto;scrollbar-width:thin}.map-orders #map-orders-points li{padding:2px 0}.map-orders #map-orders-points select{max-width:88px;margin-left:4px;font-size:10px}.map-orders #map-orders-hint{padding-top:5px;border-top:1px solid #71836355;font-size:10px}
@media(max-width:600px){#map-panel.expanded{width:calc(100vw - 16px);height:calc(100dvh - 64px);grid-template-columns:minmax(0,1fr) 132px}#map-panel.expanded[data-side="left"]{grid-template-columns:132px minmax(0,1fr)}#map-panel.expanded .map-heading{padding:4px;gap:2px}#map-panel.expanded .map-options{padding:5px 4px}#map-panel.expanded .map-zoom{padding:5px 4px;grid-template-columns:25px minmax(0,1fr) 25px;gap:3px}#map-panel.expanded .map-zoom button{font-size:9px;min-height:28px;padding:2px 3px}#map-panel.expanded .map-side-controls button{min-width:22px;padding:1px 3px}#map-panel.expanded .map-legend{width:calc(100% - 158px);font-size:10px}#map-panel.expanded[data-side="left"] .map-legend{left:144px}#map-panel.expanded #spawn-map-instruction:not([hidden]){max-width:calc(100% - 152px)}#map-panel.expanded .map-orders{padding:6px 4px 10px}.map-orders button{font-size:9px;padding:2px}.map-orders strong{font-size:10px}}

/* The large map uses the very same order card and squad picker as the battlefield. */
#map-panel.expanded,#map-panel.expanded[data-side="left"]{grid-template-columns:285px minmax(0,1fr) 182px;grid-template-rows:auto auto auto minmax(0,1fr)}
#map-panel.expanded #minimap,#map-panel.expanded[data-side="left"] #minimap{grid-column:2;grid-row:1/5}
#map-panel.expanded :is(.map-heading,.map-options,.map-zoom),#map-panel.expanded[data-side="left"] :is(.map-heading,.map-options,.map-zoom){grid-column:3}
#map-panel.expanded #hud.hud.player-status{position:relative;grid-column:1;grid-row:1/5;align-self:start;top:auto;bottom:auto;left:auto;right:auto;width:100%;max-height:100%;min-height:0;opacity:1;box-shadow:none;border:0;border-right:1px solid #71836388;border-radius:0;background:#17271d;overflow:hidden}
#map-panel.expanded #hud.orders-expanded{width:100%}
#map-panel.expanded #hud .orders-panel{min-height:0;flex:0 1 auto}
#map-panel.expanded #hud .orders-combat{flex-wrap:wrap}
#map-panel.expanded #hud .orders-combat>span{max-width:100%}
#map-panel.expanded #hud .orders-combat-options{width:100%}
#map-panel.expanded #hud .orders-combat-options label{flex:1}
#map-panel.expanded #hud #orders-waypoints{max-height:min(27vh,270px)}
#map-panel.expanded #squad-select{position:absolute;z-index:5;top:auto;bottom:10px;left:285px;right:182px;width:auto;min-width:0;transform:none;display:flex;align-items:center;justify-content:center;padding:14px 8px 4px;background:linear-gradient(transparent,#15271cca);border:0;border-radius:8px}
#map-panel.expanded #squad-select[hidden]{display:none!important}
#map-panel.expanded #squad-units{width:100%}
#map-panel.expanded .map-orders{display:none!important}
#map-panel .map-spawns{display:none}
#map-panel.expanded .map-spawns{display:block;grid-column:3;grid-row:4;min-width:0;overflow:auto;padding:6px;scrollbar-width:thin}
.map-spawns details{border:1px solid #718363;border-radius:4px;background:#1e2d22;padding:5px;font-size:12px}
#team-pin-tooltip{position:fixed;z-index:90;pointer-events:none;max-width:min(240px,calc(100vw - 16px));box-sizing:border-box;padding:6px 9px;border:1px solid #c9ab6b;border-radius:4px;background:#1a261ef5;color:#fff4d5;font:600 13px/1.35 system-ui;overflow-wrap:anywhere;box-shadow:0 2px 6px #0006}
#team-pin-tooltip[hidden]{display:none}
#team-pin-tools{margin-bottom:4px}
#team-pin-note{box-sizing:border-box;width:100%;min-width:0;font:inherit}
#team-pin-save{margin-bottom:4px}
.team-pin-actions{display:flex;gap:4px}
.team-pin-actions button:first-child{flex:2}
.team-pin-actions button:last-child{flex:1}
#team-pin-place[aria-pressed="true"]{background:#e2bf7b;color:#1c261e}
#map-panel.placing-pin #minimap{cursor:crosshair}
.map-spawns summary{cursor:pointer;font-weight:700;padding:4px 0}
.map-spawns label{display:grid;gap:3px;margin:6px 0}
.map-spawns select,.map-spawns button{max-width:100%;width:100%;min-width:0;font-size:12px}
.map-spawns small{color:#efd395}
.map-spawns small:not([hidden]){display:block;margin-top:6px}
#spawn-assignments{white-space:pre-line;color:#cfdbc3}
#map-panel.expanded #set-main-base:not([hidden]){display:block;margin:8px 0;padding:8px 5px;line-height:1.3;white-space:normal}
#map-panel.expanded .map-legend,#map-panel.expanded[data-side="left"] .map-legend{left:300px;max-width:calc(100% - 500px)}
@media(max-width:900px){#map-panel.expanded,#map-panel.expanded[data-side="left"]{grid-template-columns:225px minmax(0,1fr) 132px}#map-panel.expanded #squad-select{left:225px;right:132px}#map-panel.expanded .map-legend,#map-panel.expanded[data-side="left"] .map-legend{left:235px;max-width:calc(100% - 380px)}#map-panel.expanded #squad-units{justify-content:flex-start;overflow-x:auto;scrollbar-width:thin}#map-panel.expanded #squad-units button{flex:none}}
@media(max-width:600px){#map-panel.expanded,#map-panel.expanded[data-side="left"]{grid-template-columns:150px minmax(0,1fr) 88px}#map-panel.expanded #squad-select{left:150px;right:88px}#map-panel.expanded #hud .orders-panel{padding:6px}#map-panel.expanded #hud .status-main{display:none}#map-panel.expanded #hud .orders-actions button{font-size:9px}#map-panel.expanded #hud .orders-combat{flex-wrap:wrap}#map-panel.expanded #hud .orders-combat>span{max-width:100%}#map-panel.expanded #hud .orders-combat-options{width:100%}#map-panel.expanded #hud .orders-combat-options label{width:32px;height:28px}#map-panel.expanded #hud .orders-launch{grid-template-columns:1fr}#map-panel.expanded .map-heading,#map-panel.expanded .map-options,#map-panel.expanded .map-zoom{padding:3px}#map-panel.expanded .map-legend,#map-panel.expanded[data-side="left"] .map-legend{left:155px;max-width:calc(100% - 250px)}}
#squad-units button[aria-pressed="true"] .squad-face{border-width:3px;border-color:#ffda84;box-shadow:0 0 0 4px #f8ce6fbf,0 0 15px 5px #f3bf5d9c,0 2px 9px #000b;transform:scale(1.1)}
#squad-units button.squad-vehicle[aria-pressed="true"] .squad-face{border:0;box-shadow:none;transform:none}
#squad-units button.squad-vehicle[aria-pressed="true"] .squad-face img{filter:drop-shadow(0 0 4px #f7ce75) drop-shadow(0 2px 3px #000c)}
#squad-units button.squad-vehicle:hover .squad-face,#squad-units button.squad-vehicle:focus-visible .squad-face,#squad-units button.squad-vehicle[aria-pressed="true"]:hover .squad-face,#squad-units button.squad-vehicle[aria-pressed="true"]:focus-visible .squad-face{transform:scale(1.18)}
#squad-units button.squad-vehicle:focus-visible{outline:2px solid #f0c56c;outline-offset:3px;border-radius:3px}
#squad-units button[aria-pressed="true"] .squad-name{background:#735525f0;color:#fff5d5;border:1px solid #f8ce72;border-radius:4px;padding:2px 4px;box-shadow:0 1px 8px #0008;text-shadow:none}
#squad-units button[aria-pressed="true"]::after{content:"✓";position:absolute;top:-8px;right:-3px;z-index:2;display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#e8b95c;color:#18251b;font-size:12px;font-weight:800;text-shadow:none;box-shadow:0 1px 5px #0009}
#squad-units button.squad-vehicle[aria-pressed="true"]::after{border-radius:3px}
@media(max-width:480px){#squad-units button.squad-vehicle{flex-basis:56px;max-width:56px}#squad-units .squad-vehicle .squad-face{width:54px;height:36px}#squad-units .squad-vehicle-crew{top:24px}}
@media(hover:none){#squad-units button.squad-vehicle:hover .squad-face,#squad-units button.squad-vehicle[aria-pressed="true"]:hover .squad-face{transform:none}}
#squad-units button[aria-pressed="true"]:hover .squad-face,#squad-units button[aria-pressed="true"]:focus-visible .squad-face{transform:scale(1.5)}
#map-panel.expanded[data-side="left"]{grid-template-columns:182px minmax(0,1fr) 285px}
#map-panel.expanded[data-side="left"] #hud.hud.player-status{grid-column:3;border-right:0;border-left:1px solid #71836388}
#map-panel.expanded[data-side="left"] :is(.map-heading,.map-options,.map-zoom){grid-column:1}
#map-panel.expanded[data-side="left"] .map-spawns{grid-column:1}
#match-countdown{position:fixed;left:50%;top:22%;z-index:35;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;min-width:180px;padding:12px 24px;color:#f4e5bd;background:#17231cee;border:2px solid #e9bd73;border-radius:8px;box-shadow:0 8px 40px #000b;pointer-events:none;text-align:center;text-shadow:0 2px 4px #000c}#match-countdown[hidden]{display:none}#match-countdown-label{font-size:14px;letter-spacing:.2em;font-weight:800}#match-countdown-number{font:900 clamp(58px,10vw,108px)/1 system-ui;color:#ffdb91}#match-countdown-sub{font-size:12px}#match-countdown.started{border-color:#f0d6a0;min-width:280px}#match-countdown.started #match-countdown-label{font-size:22px}#match-countdown.started #match-countdown-number{display:none}@media(max-width:600px){#match-countdown{top:15%;min-width:125px;padding:8px 12px}#match-countdown-label{font-size:11px}#match-countdown-sub{font-size:10px}}
#phase-banner:not(.official){background:#4a3a25f0;border-color:#d7ae69}#phase-banner.official{background:#24412bef;border-color:#bcd688;box-shadow:0 0 0 1px #d5eda632}
#room-ready{position:fixed;left:50%;top:22%;z-index:34;transform:translateX(-50%);width:min(680px,calc(100vw - 32px));padding:26px 30px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;pointer-events:none;color:#f8ecc7;background:linear-gradient(160deg,#263525f5,#111e16f4);border:2px solid #e4c17a;border-radius:9px;box-shadow:0 12px 48px #000b;text-shadow:0 2px 4px #000b}#room-ready[hidden]{display:none}#room-ready.visible{animation:room-ready-notice 10s both}#room-ready strong{font:900 clamp(23px,4vw,42px)/1.1 system-ui;letter-spacing:.12em;color:#ffdc97}#room-ready span{font:800 clamp(16px,2.5vw,28px)/1.2 system-ui}#room-ready small{font-size:13px;color:#d7dfc9}@keyframes room-ready-notice{0%{opacity:0;transform:translate(-50%,10px)}7%,75%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-8px)}}@media(max-width:600px){#room-ready{top:16%;padding:18px 14px}}
#map-panel.expanded[data-side="left"] #squad-select{left:182px;right:285px}
#map-panel.expanded[data-side="left"] .map-legend{left:192px;max-width:calc(100% - 490px)}
#map-panel.expanded #hud :is(#orders-collapse,#orders-compact,.orders-heading,.orders-switch,#orders-saved){display:none!important}
#unit-crew{flex:none;padding:0 10px 8px;border-top:1px solid #83917455;pointer-events:auto}
#unit-crew[hidden],#orders-priority[hidden],#orders-combat-row[hidden],#orders-target-state[hidden]{display:none!important}
/* The route editor replaces the order controls in the same card. */
#hud .orders-route-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px;margin-bottom:5px}
#hud .orders-route-toolbar .orders-route-heading{margin:0}
#hud .orders-route-toolbar button{padding:3px 6px;font-size:10px;white-space:nowrap}
#hud.route-editing .orders-route-toolbar .orders-route-heading{flex-basis:100%}
#hud.route-editing #orders-fit-route{color:#f3d28c;border-color:#a78c58}
#hud .orders-route-toolbar button[hidden]{display:none!important}
#hud #orders-route-summary{list-style:none;margin:0;padding:0;max-height:100px;overflow-y:auto;scrollbar-width:thin}
#hud #orders-route-summary li{margin:0;border-bottom:1px solid #72826544}
#hud #orders-route-summary li:last-child{border-bottom:0}
#hud #orders-route-summary button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:25px;padding:2px 4px;border:0;background:transparent;color:#dce6ce;text-align:left;font-size:10px}
#hud #orders-route-summary button:hover,#hud #orders-route-summary button:focus-visible{background:#384c38;outline:1px solid #e5b667}
#hud .orders-summary-icons{display:flex;align-items:center;gap:5px;font-size:15px}
#hud .orders-summary-icons svg{width:16px;height:16px}

/* The unit card keeps its footprint while switching control modes. */
#hud.hud.player-status:not(.vehicle-status){width:min(300px,calc(100vw - 20px))}
#map-panel.expanded #hud.hud.player-status{width:100%}
#hud .orders-topline{order:0;display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:24px}
#hud .orders-topline #orders-status{flex:1;min-width:0;padding-top:3px;line-height:1.3}
#hud .orders-topline #orders-collapse{flex:none;align-self:flex-start;margin:0}
#hud .orders-actions :is(#orders-pause,#orders-resume){min-width:73px}
#hud .orders-actions :is(#orders-pause,#orders-resume)[hidden]{display:none!important}
#hud .orders-motion-patrol{order:5;display:flex;align-items:center;gap:6px;min-width:0}
#hud .orders-motion-patrol .orders-new-pace{order:unset;display:block;flex:none;margin:0;padding:0}
#hud .orders-motion-patrol .orders-pace{display:flex;width:auto;gap:3px;margin:0}
#hud .orders-motion-patrol .orders-pace button{display:grid;place-items:center;width:31px;height:32px;min-width:31px;padding:1px;font-size:0}
#hud .orders-motion-patrol .orders-pace button:before{display:none}
#hud .orders-motion-patrol .orders-pace svg{width:28px;height:28px}
#hud .orders-motion-patrol .orders-patrol{order:unset;display:grid;flex:1;min-width:0;grid-template-columns:minmax(0,1fr) 30px 30px;gap:3px;margin:0}
#hud .orders-motion-patrol .orders-patrol button{min-width:0;height:32px;padding:3px;font-size:10px;white-space:nowrap}
#hud .orders-motion-patrol .orders-patrol :is(#orders-loop,#orders-reverse-loop){font-size:17px}
#hud .orders-panel.vehicle-orders .orders-motion-patrol .orders-new-pace{display:none}
#hud .orders-point-pace svg{width:28px;height:28px}
#hud .orders-point-pace summary,#hud .orders-point-pace .orders-point-menu button{padding:1px}
#hud #orders-waypoints .orders-point-pace summary,#hud #orders-waypoints .orders-point-menu button{font-size:0}
#hud #orders-route-summary .orders-summary-icons svg{width:17px;height:17px}
.pace-figure{display:block}
.pace-german{display:none}body[data-team="1"] .pace-soviet{display:none}body[data-team="1"] .pace-german{display:block}
#loadout #status-motion{position:relative;display:grid;place-items:center;flex:0 0 43px;width:43px;height:78px;padding:0;border:1px solid #748366;border-radius:4px;background:#203020eb;color:#d9dbc3;box-shadow:0 2px 10px #0002;cursor:pointer}
#loadout #status-motion[hidden]{display:none!important}
#loadout #status-motion:focus-visible{outline:2px solid #efbc63;outline-offset:2px}
#loadout #status-motion:disabled{cursor:not-allowed;opacity:.58}
#status-motion .status-motion-figure svg{display:block;width:39px;height:64px;filter:drop-shadow(1px 2px 2px #0007)}
#status-motion .status-motion-fire{display:none;position:absolute;right:0;top:16px;font-size:20px;line-height:1;color:#f66043;text-shadow:0 0 5px #ffb24b}
#status-motion .status-motion-hurt{display:none;position:absolute;left:3px;bottom:10px;font-size:18px;line-height:1;color:#f24540;text-shadow:0 1px 2px #111}
#status-motion.is-firing .status-motion-fire{display:block;animation:status-fire .28s steps(2,end) infinite}
#status-motion.is-hurt .status-motion-hurt{display:block;animation:status-hurt .3s steps(2,end) infinite}
@keyframes status-fire{50%{opacity:.2;transform:scale(.7)}}
@keyframes status-hurt{50%{opacity:0}}
@media(prefers-reduced-motion:reduce){#status-motion.is-firing .status-motion-fire,#status-motion.is-hurt .status-motion-hurt{animation:none}}
@media(max-width:600px){#loadout #status-motion{flex:0 0 30px;width:30px;height:70px}#status-motion .status-motion-figure svg{width:27px;height:54px}}
#hud:not(.route-editing) #orders-waypoints{display:none!important}
#hud.route-editing{height:min(750px,calc(100% - 40px));max-height:calc(100% - 40px)}
#hud.route-editing .orders-panel,#hud.route-editing #orders-body,#hud.route-editing #orders-route{flex:1;min-height:0}
#hud.route-editing #orders-body>:not(#orders-route):not(#orders-ending),#hud.route-editing :is(#orders-note,.orders-heading,.orders-switch,#orders-collapse,#orders-route-summary,.orders-legend,#unit-crew){display:none!important}
#hud.route-editing #orders-route{order:0;padding:9px}
#hud.route-editing #orders-waypoints{display:block;flex:1;max-height:none;overflow-y:auto}
#hud.route-editing #orders-waypoints li{min-height:60px;padding:8px 6px;margin-bottom:5px}
#hud.route-editing #orders-waypoints li>span:first-child{white-space:normal}
#hud.route-editing .orders-point-controls{align-items:center;flex-wrap:wrap;justify-content:flex-end}
#hud.route-editing .orders-point-remove{width:28px;min-height:28px;padding:1px 4px;border-color:#a78c76;color:#f2d3bd;font-size:21px;line-height:1}
#hud.route-editing .orders-point-remove:hover{background:#69432f;border-color:#e5ad89}
#hud.route-editing .status-main{padding:6px 10px;grid-template-columns:42px minmax(0,1fr)}
#hud.route-editing #status-portrait{height:48px}
#hud.route-editing .status-main :is(.weapon-status,#status-meta){display:none!important}
#hud.route-editing .status-main .health-track{margin:3px 0!important}
#map-panel.expanded #hud.route-editing{height:100%;max-height:100%}
#map-panel.expanded #hud.route-editing #orders-waypoints{max-height:none}
.unit-crew-header{display:flex;justify-content:space-between;align-items:center;padding:5px 0;color:#becdad;font-size:9px;letter-spacing:.04em}
.unit-crew-header button{padding:3px 7px;font-size:10px}
.unit-crew-seats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
.unit-crew-slot{min-width:0}
.unit-crew-member{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:4px 1px;background:transparent;border:1px solid transparent;border-radius:4px}
.unit-crew-slot .unit-crew-member{width:100%}
.unit-crew-actions{display:flex;gap:2px;justify-content:center;margin-top:3px}
.unit-crew-actions button{min-width:0;padding:2px 3px;font-size:8px;line-height:1.2}
.crew-row-actions{grid-column:1/-1;display:flex;gap:4px;margin-top:4px}
.crew-row-actions button{flex:1;min-width:0;padding:3px 4px;font-size:10px}
.unit-crew-face{position:relative;display:block;width:28px;height:28px;border:2px solid #9eaf90;border-radius:50%;overflow:hidden;background:#26372b;color:#cfe1bb;font:22px/24px system-ui}
.unit-crew-face img{position:absolute;top:-2px;left:50%;width:90px;max-width:none;height:auto;transform:translateX(-50%);pointer-events:none}
.unit-crew-role{font-size:8px;max-width:100%;line-height:1.2;text-align:center;overflow-wrap:anywhere}
.unit-crew-name{font-size:9px;font-weight:650;line-height:1.2;text-align:center;max-width:100%;overflow-wrap:anywhere;color:#f4edcf}
.unit-crew-member[aria-pressed=true]{background:#73633988;border-color:#eac16b;color:#fff1c8}
.unit-crew-member[aria-pressed=true] .unit-crew-face{border-color:#ffda84;box-shadow:0 0 0 2px #f4c56588}
.unit-crew-member.allied{opacity:.65}.unit-crew-member.allied .unit-crew-face{border-color:#95bdd3}
.unit-crew-member:not(:disabled):hover,.unit-crew-member:focus-visible{background:#65745288}
#quick-crew,#quick-exit{display:none!important}
#hud #orders-priority,#hud #orders-target-state{order:3;color:#cbd9b8;font-size:10px;line-height:1.4}
#orders-priority>div{display:flex;gap:4px;margin-top:5px}#orders-priority button{flex:1;padding:6px 4px;font-size:10px}
#orders-target[aria-pressed=true]{background:#775c2c;border-color:#f3ca74;color:#fff1c8}
#orders-target-state{color:#f3ca74!important}
#field.priority-cursor,#map-panel.priority-cursor canvas{cursor:crosshair}
.squad-vehicle-badge{position:absolute;bottom:15px;right:0;padding:0 2px;border-radius:3px;color:#f1d997;background:#17251ee8;font-size:9px;pointer-events:none}
@media(max-width:900px){#map-panel.expanded[data-side="left"]{grid-template-columns:132px minmax(0,1fr) 225px}#map-panel.expanded[data-side="left"] #squad-select{left:132px;right:225px}#map-panel.expanded[data-side="left"] .map-legend{left:142px;max-width:calc(100% - 380px)}}
@media(max-width:600px){#map-panel.expanded[data-side="left"]{grid-template-columns:88px minmax(0,1fr) 150px}#map-panel.expanded[data-side="left"] #squad-select{left:88px;right:150px}#map-panel.expanded[data-side="left"] .map-legend{left:93px;max-width:calc(100% - 250px)}}
.entry-return{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:12px;border:1px solid #b7a56c;background:#6e60302e;color:#eee5c7;font-size:13px}.entry-return[hidden]{display:none}.entry-return button{flex:none}
.chat-unread{min-width:19px;padding:2px 5px;border-radius:10px;background:#d9ac5c;color:#172218;font:700 11px/1.3 system-ui;text-align:center}.chat-unread[hidden]{display:none}
.chat-panel{position:absolute;z-index:17;top:58px;right:16px;width:min(370px,calc(100vw - 32px));max-height:min(510px,calc(100vh - 85px));display:flex;flex-direction:column;gap:10px;padding:15px;border:1px solid #a79c70;border-radius:6px;background:linear-gradient(150deg,#283527f5,#141f18f7);box-shadow:0 18px 55px #000a;color:#e7e4d0;font-size:13px}.chat-panel[hidden]{display:none}.chat-heading{display:flex;align-items:start;justify-content:space-between;border-bottom:1px solid #73806088;padding-bottom:8px}.chat-kicker{color:#d4b671;font:700 10px/1.3 monospace;letter-spacing:.17em}.chat-heading h2{margin:2px 0 0;font-size:20px}.chat-heading>button{font-size:24px;line-height:1;min-width:32px;min-height:32px}.chat-channels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.chat-channels button{min-width:0;padding:8px 4px;font-size:12px}.chat-channels button.active{background:#bc9652;color:#142117;border-color:#e7c780;font-weight:700}.chat-recipient{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;color:#c9cfba}.chat-recipient[hidden]{display:none}.chat-recipient select{min-width:0}.chat-messages{min-height:130px;max-height:235px;overflow:auto;display:flex;flex-direction:column;gap:7px;padding:8px;background:#0d1a12a8;border:1px solid #52634c}.chat-message{padding:7px 9px;border-left:2px solid #83a38b;background:#283b2b9c}.chat-message.own{border-left-color:#d7b365}.chat-message>div{display:flex;justify-content:space-between;gap:8px}.chat-message strong{overflow-wrap:anywhere;color:#e9d6a7;font-size:11px}.chat-message time{flex:none;color:#9dad9a;font:10px monospace}.chat-message p{margin:4px 0 0;overflow-wrap:anywhere;white-space:pre-wrap;line-height:1.4}.chat-empty{margin:auto;color:#aebba5;text-align:center}.chat-form{display:flex;gap:6px}.chat-form input{min-width:0;flex:1}.chat-form button{flex:none}.chat-note{min-height:14px;margin:0;color:#aebba5;font-size:11px}@media(max-width:600px){.chat-panel{top:52px;right:8px;width:calc(100vw - 16px);max-height:calc(100vh - 65px)}.chat-messages{max-height:30vh}}
.voice-controls{border-top:1px solid #73806088;padding-top:10px;display:grid;gap:7px}.voice-heading{display:flex;justify-content:space-between;gap:8px;align-items:center}.voice-heading strong{color:#e9d6a7;font-size:12px}.voice-heading span{color:#bfceb5;font-size:11px;text-align:right}.voice-actions{display:flex;gap:6px}.voice-actions button{font-size:11px;min-width:0;padding:7px;flex:1}.voice-actions button[hidden]{display:none}.voice-actions #voice-push{flex:1.7;border-color:#b99756}.voice-actions #voice-push.talking{background:#c58c4c;color:#162017;border-color:#f2cb82}.voice-controls small{color:#aab69e;font-size:10px;line-height:1.35}.voice-controls audio{display:none}@media(max-width:600px){.chat-panel{overflow-y:auto}}
.voice-actions #voice-team-push{grid-column:1/-1;min-height:32px;touch-action:none;user-select:none}
.voice-actions #voice-team-push[aria-pressed=true],#chat-toggle.voice-team-only{background:#325645;color:#eef8dd;border-color:#b0d5a0}
#chat-toggle.voice-active{border-color:#90b894;color:#d7eed2}#chat-toggle.voice-talking:not(.voice-team-only){background:#9a713d;color:#fff3d1;border-color:#e8c782}
.chat-panel{max-height:min(620px,calc(100vh - 85px));overflow-y:auto}.chat-messages{flex:1 1 150px}.voice-controls{flex:none}
.voice-actions{display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.3fr) minmax(0,1.15fr);align-items:stretch}.voice-actions #voice-join{grid-column:1/-1}.voice-actions button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:48px;white-space:normal;line-height:1.2}.voice-actions button .voice-action-icon{width:20px;height:20px;flex:none;fill:none;stroke:#d8c58a;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.voice-actions #voice-push{flex:auto}.voice-actions #voice-mic[aria-pressed=true]{background:#7f9f74;border-color:#b9dda4;color:#162415;font-weight:700}.voice-actions #voice-mic[aria-pressed=true] .voice-action-icon{stroke:#162415}
.chat-alerts{position:fixed;z-index:19;top:64px;left:16px;width:min(380px,calc(100vw - 24px));display:grid;gap:6px;pointer-events:none}.chat-alert{padding:9px 12px;border:1px solid #bca570;border-left:4px solid #d8b365;border-radius:4px;background:#1b2b20ed;box-shadow:0 5px 18px #0008;color:#f0efdd;overflow-wrap:anywhere}.chat-alert-team{border-left-color:#93b6a1}.chat-alert-private{border-left-color:#e9cf8f}.chat-alert strong{display:block;font-size:11px;letter-spacing:.02em;color:#e9d6a7}.chat-alert p{margin:4px 0 0;font-size:13px;line-height:1.35;white-space:pre-wrap}@media(max-width:600px){.chat-alerts{top:54px;left:8px;width:calc(100vw - 16px)}.chat-alert{padding:7px 10px}}
.voice-invite,.reconnect-notice{position:fixed;z-index:20;background:#1b2b20f5;color:#f0eddd;border:1px solid #bca570;box-shadow:0 8px 25px #0009;border-radius:5px}.voice-invite[hidden],.reconnect-notice[hidden]{display:none}.voice-invite{top:64px;right:16px;max-width:min(440px,calc(100vw - 32px));padding:8px 10px;display:flex;align-items:center;gap:9px;font-size:12px}.voice-invite>span:first-child{color:#e4bd73;font-size:18px}.voice-invite #voice-invite-join{background:#d5aa60;color:#1b241a;font-weight:700;white-space:nowrap}.voice-invite #voice-invite-dismiss{padding:3px 7px}.reconnect-notice{top:64px;left:50%;transform:translateX(-50%);padding:7px 12px;font-size:12px;white-space:nowrap}#room-idle-warning{top:100px;width:max-content;max-width:calc(100vw - 16px);white-space:normal;display:flex;align-items:center;gap:12px}.room-idle-warning strong{color:#ffe0a2}.room-idle-warning button{font-size:12px;flex:none}.room-idle-warning [role=timer]{font-variant-numeric:tabular-nums}.battlefield-review #hud,.battlefield-review #squad-select,.battlefield-review #loadout,.battlefield-review #action-note,.battlefield-review #crew-hud{display:none!important}@media(max-width:600px){.voice-invite{top:54px;right:8px;left:8px;max-width:none}.reconnect-notice{top:54px;white-space:normal;width:max-content;max-width:calc(100vw - 16px)}}
.chat-panel{width:min(390px,calc(100vw - 32px));max-height:min(740px,calc(100vh - 85px));gap:7px;padding:12px}.chat-heading{position:relative;min-height:82px;overflow:hidden;padding-bottom:5px}.chat-heading>div{position:relative;z-index:1;max-width:158px}.chat-heading>button{position:relative;z-index:2}.chat-operator{position:absolute;right:23px;bottom:-32px;width:185px;height:auto;pointer-events:none;filter:drop-shadow(0 3px 8px #0009)}.chat-messages{flex:1 1 255px;min-height:150px;max-height:350px;gap:3px;padding:5px}.chat-message{padding:4px 7px}.chat-message strong{font-size:10px}.chat-message time{font-size:9px}.chat-message p{margin:2px 0 0;font-size:12px;line-height:1.3}@media(max-width:600px){.chat-panel{top:52px;right:8px;width:calc(100vw - 16px);max-height:calc(100vh - 65px);padding:10px}.chat-heading{min-height:74px}.chat-operator{width:160px;bottom:-29px}.chat-messages{min-height:105px}}

/* Group controls share the soldier's mode switch; only the roster lives here. */
#unit-group{pointer-events:auto;flex:none}
.unit-group-header{align-items:flex-start}
.unit-group-actions{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.unit-group-actions button:disabled{opacity:.5}
.unit-group-members{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;max-height:140px;gap:4px;overflow-y:auto;scrollbar-width:thin}
.unit-group-member{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 5px;padding:3px;border:1px solid #71816b77;border-radius:4px;background:#1220179c}
.unit-group-member>button[data-group-member]{display:flex;flex-direction:row;justify-content:flex-start;width:100%;gap:7px;text-align:left;padding:2px 4px}
.unit-group-member>button[data-group-member] img{width:30px;height:30px;flex:none}
.unit-group-member>button[data-group-member] span{white-space:normal;line-height:1.2}
.unit-group-health{grid-column:1;height:5px;margin:0 4px 3px;background:#544c3b;border:1px solid #aab99c66;border-radius:3px;overflow:hidden}
.unit-group-health i{display:block;height:100%;background:#bad58c}
.unit-group-health i.low{background:#de9071}
.unit-group-member-actions{grid-column:2;grid-row:1 / span 2;display:flex;align-items:center;gap:3px}
.unit-group-member-actions button{min-width:25px;min-height:27px;padding:1px 4px;font-size:16px}
.unit-group-member-actions button:disabled{opacity:.4}
.unit-group-member{grid-template-rows:minmax(31px,auto) 20px;gap:2px;min-width:0;min-height:57px}
.unit-group-member>button[data-group-member]{grid-column:1/-1;gap:4px;min-width:0;padding:2px}
.unit-group-member>button[data-group-member] img{width:24px;height:24px}
.unit-group-member>button[data-group-member] span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:9px;line-height:1.15}
.unit-group-health{grid-row:2;align-self:center;height:4px;margin:0 1px}
.unit-group-member-actions{grid-row:2;gap:2px}
.unit-group-member-actions button{min-width:19px;min-height:19px;padding:0 2px;font-size:12px;line-height:1}
#hud.route-editing .unit-group-members{max-height:110px}
#unit-group .unit-group-formation{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:7px 0;padding:6px;border:1px solid #82917077;border-radius:5px;background:#152319a8}
#unit-group .unit-group-formation-row{display:flex;flex-direction:column;align-items:stretch;gap:3px;min-width:0}
#unit-group .unit-group-formation-row>span{min-width:0;color:#d9dec6;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
#unit-group .unit-group-setting-current{display:grid;place-items:center;width:100%;min-width:0;min-height:31px;padding:2px;background:#364031;border-color:#aa9663;color:#f2e2b2}
#unit-group .unit-group-setting-icon{display:grid;place-items:center;flex:none;width:22px;height:22px;font-size:20px;line-height:1}
#unit-group .unit-group-setting-icon svg{width:22px;height:22px}
#unit-group .unit-group-setting-menu{position:fixed;inset:auto;z-index:9999;width:min(260px,calc(100vw - 16px));max-height:min(70vh,260px);overflow:auto;margin:0;padding:4px;border:1px solid #a69d70;border-radius:6px;background:#17241b;box-shadow:0 12px 34px #0009}
#unit-group .unit-group-setting-menu:not(:popover-open){display:none}
#unit-group .unit-group-setting-menu button{display:flex;align-items:center;gap:8px;width:100%;min-height:31px;padding:3px 7px;text-align:left;font-size:10px}
#unit-group .unit-group-setting-menu button[aria-pressed=true]{background:#695632;border-color:#edc47b;color:#fff0c4}
.orders-help-dialog:not([open]){display:none}
.orders-help-dialog[open]{position:fixed;inset:0;box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-height:min(84vh,750px);margin:auto;padding:16px;border:1px solid #a69d70;border-radius:8px;background:#1b281e;color:#e4e9d7;box-shadow:0 18px 60px #000b;overflow:auto;font-size:13px;line-height:1.5}
.orders-help-dialog::backdrop{background:#0b140dcc}
.orders-help-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid #85916c66;padding-bottom:9px}
.orders-help-head h2{margin:0;font-size:18px;color:#f0dda5}
.orders-help-head button{flex:none;min-width:30px;min-height:30px;font-size:22px;line-height:1}
.orders-help-content h3{margin:14px 0 4px;color:#e6ce8e;font-size:13px}
.orders-help-content p{margin:4px 0 9px}
.orders-help-content kbd{display:inline-block;border:1px solid #899878;border-radius:3px;padding:0 4px;background:#354436;color:#fff0c4;font-size:11px;white-space:nowrap}
.orders-ending{flex:none;min-width:0;margin:6px 0 0;padding:4px 6px 6px;border:1px solid #72826588;border-radius:4px}
.orders-ending legend{padding:0 4px;font-size:12px;font-weight:600;color:#e6cf9e}
.orders-ending-actions{display:flex;align-items:center;gap:4px}
.orders-ending-actions button[aria-pressed=true]{background:#695632;border-color:#edc47b;color:#fff0c4}
.cannon-ammo{display:flex;flex-direction:column;gap:4px;align-self:center}.cannon-ammo[hidden]{display:none}.cannon-ammo button{padding:7px 9px;min-width:74px;font-size:12px}.cannon-ammo button[aria-pressed="true"]{background:#665b30;border-color:#e7c477;color:#fff0b7}#inventory-cannon-ammo{flex-direction:row;margin-bottom:10px}.item-slot .item-reserve{display:block;font-size:10px;line-height:1.2;color:#dbd5ba;white-space:nowrap}.item-slot:has(.item-reserve:not(:empty)){padding-bottom:18px}.item-reserve:not(:empty){position:absolute;bottom:3px;left:0;right:0;text-align:center}

.connection-diagnostics{margin-top:8px;font-size:12px;border-top:1px solid #5d694f;padding-top:7px}.connection-diagnostics summary{cursor:pointer;color:#dfc78b}.connection-diagnostics p{margin:7px 0}.connection-diagnostics small{display:block;margin-top:5px}.connection-diagnostics button{font-size:12px;padding:6px 10px}
.vehicle-count-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:4px 0 8px}.vehicle-count-grid .option-field{min-width:0;display:grid;gap:4px;font-size:11px;color:#cbd3bd}.vehicle-count-grid select{width:100%;padding:7px 8px}

/* One optional mouse station per driver; the seated crew remains unchanged. */
.crew-driver-control{display:flex;align-items:center;justify-content:center;gap:4px;margin-top:5px;font-size:11px;line-height:1.2;cursor:pointer;color:#f0dfaa;grid-column:1/-1}
.crew-driver-control input{width:15px;height:15px;margin:0;flex-shrink:0;accent-color:#e5b658}
.crew-row .crew-driver-control{justify-content:flex-start;font-size:13px}

/* Use the measured gap between cards instead of limiting the roster to 560px. */
main>#squad-select,body.inventory-open main>#squad-select{left:var(--squad-left,300px);right:var(--squad-right,300px);width:auto;top:auto;bottom:var(--squad-bottom,112px);transform:none}
main>#squad-select[data-narrow="true"],body.inventory-open main>#squad-select[data-narrow="true"]{top:10px;bottom:auto}
#squad-select[data-rows="1"] #squad-units{display:flex;flex-wrap:nowrap;justify-content:center;overflow:visible}
#squad-select[data-rows="1"] #squad-units button{flex-shrink:0}
#squad-select[data-rows="2"] #squad-units{display:grid;grid-template-columns:repeat(var(--squad-columns),minmax(44px,70px));justify-content:center;gap:10px 5px;overflow:visible}
#squad-select[data-rows="2"] #squad-units button{width:100%;justify-self:center}
#squad-select[data-scroll="true"] #squad-units{justify-content:start;overflow-x:auto;scrollbar-width:thin;padding:9px 4px}
#map-panel.expanded #squad-select{flex-direction:column;gap:4px}
#map-panel .map-options .map-squad-position{display:none}
#map-panel.expanded .map-options{flex-direction:column;align-items:stretch}
#map-panel.expanded .map-squad-position{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:3px}
#map-panel.expanded .map-squad-position select{width:auto;max-width:100%;padding:3px 4px;font-size:12px}
#map-panel.expanded[data-squad-position="top"] #squad-select{top:10px;bottom:auto;padding:4px 8px 14px;background:linear-gradient(#15271cca,transparent)}
#map-panel.expanded[data-squad-position="top"] .squad-surname{top:calc(100% + 7px);bottom:auto}
#map-panel.expanded[data-squad-position="hidden"] #squad-select{display:none}
body.map-top #map-panel:not(.expanded){top:16px;bottom:auto}
body.map-top #camera-controls{top:auto;bottom:24px}
#map-panel.expanded #map-side-vertical{display:none}
@media(max-width:600px){#map-panel:not(.expanded){top:auto;bottom:24px}body.map-top #map-panel:not(.expanded){top:10px}body.map-top #camera-controls{top:auto;bottom:24px}}

/* The station choice overlays the portrait area without adding another row. */
.unit-crew-slot{position:relative}
.unit-crew-slot>.crew-driver-control{position:absolute;top:2px;left:calc(50% + 9px);width:22px;height:22px;margin:0;padding:0;border-radius:50%;background:#18251ee8;border:1px solid #a8af91;z-index:2}
.unit-crew-slot>.crew-driver-control input{width:12px;height:12px;padding:0;cursor:pointer}
.unit-crew-slot>.crew-driver-control:focus-within{outline:2px solid #f3c77b;outline-offset:1px}
.unit-crew-slot>.crew-driver-control:has(input:checked){border-color:#edc477;background:#625331}
.unit-crew-slot>.crew-driver-control:has(input:disabled){opacity:.45}

.kill-feed-item{background:rgba(246,243,231,.2);border-color:#d8d5c349;box-shadow:none;animation:feed-fade 4.5s linear both}
.kill-feed-text,.kill-feed-label{text-shadow:0 0 3px #fff9,0 1px 2px #fff8}
.kill-feed-icon{background:#e6e2d533;border-color:#c9c7ba66}
@keyframes feed-fade{0%{opacity:0}5%,72%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.kill-feed-item{animation:none}}

#training-strategy-label{min-width:190px;max-width:245px;font-size:11px}
#training-strategy{margin-top:3px}
#training-view-link{display:flex;align-items:center;gap:9px;flex-wrap:wrap;width:100%;font-size:12px}
#training-view-link[hidden],#training-strategy-label[hidden]{display:none}
#training-view-open{color:#e8c487;text-decoration:underline}
#training-observer-banner{position:absolute;z-index:5;top:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;max-width:min(850px,90vw);padding:7px 10px;border:1px solid #d2ad69;border-radius:5px;background:#18251ee9;color:#efe6cf;font-size:12px}
#training-observer-banner[hidden]{display:none}
#diagnostic-controls{flex-basis:100%;display:flex;align-items:center;flex-wrap:wrap;gap:10px}
#diagnostic-controls[hidden],#diagnostic-perspective[hidden],#diagnostic-fog-control[hidden]{display:none}
#diagnostic-perspective{display:flex;align-items:center;gap:6px;white-space:nowrap}
#diagnostic-team{width:auto;padding:4px 6px;font-size:12px}
#training-observer-banner.diagnostic-observer{width:max-content;max-width:min(960px,calc(100% - 16px));box-sizing:border-box;flex-wrap:wrap;row-gap:5px}
#training-observer-banner.diagnostic-observer>span{order:1;flex-basis:100%}
#diagnostic-fog-control{display:flex;align-items:center;gap:6px;white-space:nowrap}
#diagnostic-darkness{width:clamp(72px,8vw,112px);margin:0;accent-color:#e1ba72}
#diagnostic-darkness-value{min-width:4ch;text-align:right;font-variant-numeric:tabular-nums}
.training-observer #room-ready{display:none}
#training-observer-banner strong{white-space:nowrap;color:#f1c67e}
#training-observer-banner button{white-space:nowrap;padding:5px 8px}
body.training-observer #hud,body.training-observer #loadout,body.training-observer #crew-hud,body.training-observer #chat-toggle,body.training-observer #inventory-toggle,body.training-observer #menu-toggle,body.training-observer #tester-toggle,body.training-observer #squad-group-tools{display:none!important}
body.training-observer #field{cursor:grab}
body.training-observer #field:active{cursor:grabbing}
@media(max-width:700px){#training-observer-banner{top:4px;left:8px;right:8px;transform:none;flex-wrap:wrap;font-size:10px}#training-observer-banner strong{white-space:normal}}

/* Sapper tasks stay inside the existing unit panel on either map. */
.sapper-panel{pointer-events:auto;padding:8px 12px;border-top:1px solid #82916a;background:#1c2a20c9;flex-shrink:0;font-size:12px}.sapper-panel[hidden]{display:none}.sapper-heading,.sapper-actions{display:flex;align-items:center;gap:6px}.sapper-heading{justify-content:space-between}.sapper-heading button{padding:3px 8px;min-height:26px}.sapper-actions{margin-top:5px;flex-wrap:wrap}.sapper-actions button{padding:5px 8px;min-height:34px;font-size:12px}.sapper-actions button.active{border-color:#e6b961;background:#9f7a3b77}.sapper-actions img{width:30px;height:25px;object-fit:contain;vertical-align:middle;margin-right:4px}.sapper-panel [data-message]{margin:5px 0;color:#e7cd94}.sapper-panel ol{max-height:84px;overflow:auto;padding:0;margin:4px 0;list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:3px}.sapper-panel li{padding:3px 6px;background:#101d1880}.sapper-panel details{font-size:11px}.sapper-panel details:not([open]){display:none}.sapper-panel details[open]{max-height:160px;overflow:auto}.sapper-panel p{line-height:1.4}
#training-observer-follow[aria-pressed="true"]{background:#d5b56f;color:#1b251d}

.sapper-actions svg{width:26px;height:22px;vertical-align:middle;margin-right:4px;flex-shrink:0}
.sapper-auto{display:flex;align-items:center;gap:6px;font-size:12px;cursor:pointer}.sapper-auto input{width:16px;height:16px;min-width:16px;margin:0;accent-color:#d6b36a}.sapper-panel [data-planning-stock]{font-size:11px;margin:4px 0}.sapper-stock-last{color:#f0c24b}.sapper-stock-needed{color:#efa05b}.sapper-panel li.sapper-stock-needed{border-left:2px dashed #efa05b}.sapper-panel li.sapper-stock-last{border-left:2px solid #f0c24b}
.sapper-mine-tools{display:flex;align-items:end;gap:4px;pointer-events:auto;flex-shrink:0}
.sapper-mine-tools[hidden]{display:none!important}
.sapper-mine-tools svg{overflow:visible}
#map-panel.expanded .sapper-mine-tools{grid-column:1/-1;justify-content:center;border-top:1px solid #71836388;padding-top:6px}
#map-panel.expanded .sapper-mine-tools .item-slot{flex:1;min-width:0;width:62px;min-height:66px}
#map-panel.expanded .sapper-mine-tools svg{max-width:100%;height:32px}
#match-bots{margin:12px 0;padding:12px;border:1px solid #53634c;border-radius:6px}
#match-bots h3,#match-bots h4{margin:0 0 8px}
.match-bot-teams{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:16px}
.match-bot-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:6px}
.match-bot-row span{margin-right:auto}
.match-bot-row select,.match-bot-row button{width:auto;max-width:100%;padding:6px 8px}
.score-overlay.match-finale{--final-accent:#e8d49e;--final-border:#a48c5b}
.score-overlay.match-finale[data-outcome="victory"]{--final-accent:#ffe1a1;--final-border:#d5b774}
.score-overlay.match-finale[data-outcome="defeat"]{--final-accent:#ece3d8;--final-border:#a89988}
.score-overlay.match-finale>section{border-top:4px solid var(--final-border);background:#222e24;box-shadow:0 16px 70px #0009}
.match-finale .panel-heading{
 position:relative;isolation:isolate;align-items:end;min-height:clamp(150px,23vw,215px);padding:18px;border:1px solid var(--final-border);border-radius:5px;overflow:hidden;background:#181d18;
}
.match-finale .panel-heading::before{
 content:"";position:absolute;inset:0;z-index:-1;background:
 linear-gradient(90deg,#141813ed,#1418137a 48%,#14181312),
 linear-gradient(0deg,#141813c9,transparent 52%),
 url("/assets/t34-tiger-standoff-v3.webp") center 52%/cover;
}
.match-finale[data-outcome="defeat"] .panel-heading::before{filter:saturate(.25) brightness(.78)}
.match-finale #match-result-close{position:absolute;top:9px;right:9px;min-width:36px;min-height:36px;padding:3px 9px;background:#182119;box-shadow:0 1px 6px #100d08aa}
.match-finale #match-result-title{font-size:clamp(26px,5vw,48px);line-height:1.08;color:var(--final-accent);overflow-wrap:anywhere}
.match-finale .match-result-heading p{font-size:clamp(13px,2.5vw,16px);color:#f2ebdd}
.match-result-emblem:not([hidden]){
 display:grid;place-items:center;width:38px;height:38px;margin-bottom:9px;border:1px solid var(--final-border);border-radius:50%;background:#182019dd;color:var(--final-accent);font-weight:700;
}
.match-result-emblem .score-faction-mark{margin:0;transform:scale(1.45)}
.match-finale #match-result-total{font-size:clamp(20px,4vw,34px);color:#fff3cd;font-variant-numeric:tabular-nums;border-block:1px solid #85936a;padding:10px 0}
@media(max-width:600px){
 .match-finale>section{padding:14px}
 .match-finale th,.match-finale td{padding:8px 5px;font-size:12px}
}
@media(prefers-reduced-motion:no-preference){.match-finale>section{animation:match-finale-in .35s ease-out}@keyframes match-finale-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}}

/* Each waypoint separates travel settings from actions on arrival. */
#hud.route-editing #orders-waypoints li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
#hud.route-editing #orders-waypoints li>span:first-child{padding-top:0}
#hud.route-editing .orders-point-controls{grid-column:1/-1;display:flex;flex-direction:column;align-items:stretch;gap:7px;min-width:0}
#hud .orders-point-phase{display:flex;align-items:flex-start;gap:5px;min-width:0}
#hud .orders-point-phase[hidden]{display:none}
#hud .orders-point-caption{flex:0 0 104px;padding-top:8px;font-size:11px;line-height:1.35;color:#dce5d3}
#hud .orders-point-arrival{border-top:1px solid #71836355;padding-top:7px}
#hud .orders-point-phase details{flex:none}
#hud .orders-point-phase>button{flex:none}

.map-orders .map-point-phase{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:5px 0;font-size:10px}
.map-orders .map-point-phase[hidden]{display:none}

#hud .orders-point-controls{container-type:inline-size}
@container (max-width:230px){#hud .orders-point-phase{flex-wrap:wrap}#hud .orders-point-caption{flex-basis:100%;padding-top:0}}
.orders-end-row:not([hidden]){display:flex;align-items:center;gap:6px;padding:6px 0;font-size:12px}
.orders-end-row input{width:auto;flex:none;margin:0}
 .escort-panel{pointer-events:auto;flex-shrink:0;margin:7px 0;padding:8px;border:1px solid #6a7359;border-radius:5px;background:#253023db;font-size:12px}.escort-panel[hidden],.escort-panel [hidden]{display:none!important}.escort-heading,.escort-row,.escort-member{display:flex;gap:7px;align-items:center;justify-content:space-between}.escort-heading{margin-bottom:5px}.escort-heading button{padding:1px 7px}.escort-row{flex-wrap:wrap;margin:5px 0}.escort-row select{max-width:100%;min-width:0;font-size:12px;padding:4px}.escort-row>select{flex:1;width:135px}.escort-row label{display:flex;align-items:center;gap:6px}.escort-panel button{font-size:12px;padding:4px 7px}.escort-status,.escort-help{margin:5px 0;line-height:1.4}.escort-status{color:#dfd4a9}.escort-help{color:#cbd0bc}.escort-limit{display:flex;gap:6px;align-items:center;margin:6px 0;font-size:11px}.escort-limit input{width:auto;flex:none;margin:0}.escort-row label,.escort-row button{white-space:nowrap}.escort-panel details{margin-top:5px}.escort-panel summary{cursor:pointer}.escort-panel [data-escort-list]{max-height:120px;overflow-y:auto;scrollbar-width:thin}.escort-help{max-height:130px;overflow-y:auto;scrollbar-width:thin}.escort-member{margin:3px 0}.escort-member button:first-child{flex:1;text-align:left}
/* One policy for the occupied vehicle, including compact and map panels. */
.orders-vehicle-profile{display:grid;gap:5px;padding:8px 0;border-bottom:1px solid #71836366;margin-bottom:6px}
.orders-vehicle-profile[hidden]{display:none!important}
.orders-vehicle-profile>strong{font:600 11px system-ui;letter-spacing:.035em;color:#e4d8b5}
.vehicle-profile-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.vehicle-profile-options button{display:grid;justify-items:center;gap:3px;min-width:0;min-height:44px;padding:5px 2px;font:10px/1.2 system-ui;background:#27362bd9;border:1px solid #81906b;border-radius:4px}
.vehicle-profile-options button svg{width:19px;height:19px}
.vehicle-profile-options button[aria-pressed="true"]{border-color:#e6be66;background:#5b5936;color:#ffe6a6;box-shadow:inset 0 0 0 1px #d2b46d66}
.orders-vehicle-profile p{margin:0!important;font:10px/1.35 system-ui;color:#c3ccb9}
.vehicle-profile-emergency>strong,.vehicle-profile-emergency p{color:#ffbd83}
.item-slot.read-only:disabled{opacity:.85;cursor:default}
.item-slot.cannon-slot{box-sizing:border-box;gap:2px;border-radius:4px}
.cannon-slot .cannon-select{display:flex;flex-direction:column;align-items:center;gap:0;width:100%;min-height:0;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
.cannon-slot .cannon-select svg{height:32px;width:100%}
.cannon-slot .cannon-select:disabled,.cannon-slot .cannon-stock:disabled{opacity:.85;cursor:default}
.cannon-slot .cannon-stock{position:relative;display:flex;align-items:center;justify-content:space-between;gap:2px;box-sizing:border-box;width:100%;min-height:16px;margin:0;padding:0 3px 4px;border:1px solid #7c896b66;border-radius:2px;background:#1c2c1ee8;color:#e4e6cf;font:9px/1.15 system-ui;overflow:hidden}
.cannon-stock-label{display:flex;align-items:center;gap:3px}
.cannon-stock .cannon-stock-label kbd{position:static;min-width:0;padding:0;border:0;background:none;font-size:7px;line-height:1;color:#b8c3a5}
.cannon-stock-count{font-variant-numeric:tabular-nums;font-weight:600}
.cannon-stock-track{position:absolute;left:0;right:0;bottom:0;height:3px;background:#111e16}
.cannon-stock-track i{display:block;height:100%;background:#d1ba7e}
.cannon-stock[data-shell="he"] .cannon-stock-track i{background:#c68f6b}
.cannon-stock[aria-pressed="true"]{border-color:#e9bd63;color:#ffe5a5;background:#4b4d30}
.cannon-stock.empty{color:#e6a085}
.item-slot.station-weapon .item-name{white-space:normal;overflow:visible;text-overflow:clip;text-align:center;font-size:10px;line-height:1.2}
#field.group-selecting{cursor:crosshair}
#squad-units .squad-surname{pointer-events:none}
#group-selection-box{position:fixed;z-index:18;pointer-events:none;box-sizing:border-box;border:1px solid #f0ce7a;background:#dfc16b1c;box-shadow:0 0 0 1px #17251d66,inset 0 0 0 1px #f0ce7a22}
.escort-settings{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:5px 0}.escort-settings label{display:flex;flex-direction:column;gap:3px;min-width:0}.escort-settings select{width:100%}

/* The portrait and its health remain clickable as one unit. */
#squad-units .squad-health{display:block;width:75%;max-width:50px;height:5px;border:1px solid #253126;border-radius:3px;background:#162017;overflow:hidden;box-shadow:0 0 0 1px #e8e5ce77;pointer-events:none}
.squad-health i{display:block;height:100%;background:#aec993}
.squad-health[data-level="medium"] i{background:#ebbf69}
.squad-health[data-level="low"] i{background:#eb836d}
.squad-activity{display:inline-flex;gap:1px;pointer-events:none;font-style:normal}
#squad-units .squad-activity{position:absolute;left:0;top:19px;z-index:3}
.squad-activity::before,.squad-activity::after{display:none;box-sizing:border-box;width:14px;height:14px;align-items:center;justify-content:center;border:1px solid #f1e1bd;border-radius:3px;color:white;font:bold 11px/1 system-ui;text-shadow:none;box-shadow:0 1px 3px #0009}
[data-combat*="f"]>.squad-activity::before{display:flex;content:'✴';background:#77511e;color:#ffe29b}
[data-combat*="i"]>.squad-activity::after{display:flex;content:'!';background:#963e32}
.unit-group-member [data-group-member]{position:relative}
.unit-group-member .squad-activity{position:absolute;left:0;bottom:0}

.unit-limit-row{display:grid;grid-template-columns:minmax(6em,1fr) 5em auto;gap:.65rem;align-items:center;margin-block:.5rem}
.unit-limit-row input[type=number]{width:100%;box-sizing:border-box;min-width:0}
.unit-limit-row .check-row{margin:0;white-space:nowrap}
#match-unit-balance{margin:1rem 0}
#match-unit-balance h3{font-size:1.12rem;margin:0 0 .55rem;color:#f2e6c0}
.unit-balance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}
.unit-balance-grid table{border-collapse:collapse;width:100%;background:#1b261e;font-variant-numeric:tabular-nums}
.unit-balance-grid caption{padding:.45rem .6rem;text-align:left;font-weight:700;background:#354135;color:#f5ebcd}
.unit-balance-grid caption select{float:right;max-width:62%;min-width:0;font:inherit;font-size:.85em;padding:.15rem .35rem}
.unit-balance-grid caption span{margin-right:.4rem}
.score-overlay .unit-balance-grid :is(th,td){padding:.25rem .45rem;text-align:right}
.score-overlay .unit-balance-grid th:first-child{text-align:left}
.unit-balance-grid thead th{font-size:.75rem;line-height:1.2;color:#c5cbb6}
.unit-balance-grid tbody th{font-size:.82rem;font-weight:500;white-space:nowrap}
.unit-balance-grid img{display:inline-block;width:2.5rem;height:1.8rem;object-fit:contain;vertical-align:middle;margin-right:.35rem}
.unit-balance-grid tbody td:last-child{color:#eed49c;font-weight:700}
@media(max-width:700px){.unit-balance-grid{grid-template-columns:1fr}.unit-limit-row{gap:.35rem}}
