:root{color-scheme:dark;font-family:Segoe UI,system-ui,sans-serif;background:#111813;color:#e5e9da;font-size:13px}*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer;background:#273329;border:1px solid #465240;color:#e5e9da;border-radius:5px;padding:9px 12px}button:hover{background:#354330}button:disabled{opacity:.42;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #efbd68;outline-offset:2px}input,select{border:1px solid #465240;background:#162019;border-radius:5px;padding:10px;color:#e5e9da;min-width:0}.primary{background:#edbb63;color:#172019;border-color:#edbb63;font-weight:700}.primary:hover{background:#ffd489}
header{height:76px;flex-shrink:0;border-bottom:1px solid #39442f;display:flex;align-items:center;justify-content:space-between;padding:0 23px;gap:15px;background:#151d17}.brand{display:flex;align-items:center;gap:12px}.brand b{display:grid;place-items:center;width:42px;height:42px;background:#edbb63;color:#18201a;border-radius:3px;font-size:20px}.brand strong{display:block;letter-spacing:.16em;font-size:15px}.brand small{display:block;letter-spacing:.17em;font-size:9px;color:#92a089;margin-top:5px}.score{display:flex;gap:17px;align-items:center;font:26px Consolas,monospace}#blue-score{color:#89bfdd}#red-score{color:#e09780}.versus{font:10px Segoe UI,sans-serif;color:#a9b39c;letter-spacing:.2em}.session{display:flex;align-items:center;gap:12px}#timer{font:16px Consolas,monospace;color:#bec9b0}#timer.low{color:#e0533f;font-weight:700}.pill{font-size:9px;letter-spacing:.1em;border:1px solid #647457;border-radius:20px;padding:6px 9px;color:#b5c7a3}
main{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 286px}#battlefield{position:relative;min-width:0;min-height:0;background:#182319;overflow:hidden}#game{width:100%;height:100%;position:absolute;inset:0}#game canvas{display:block}#map-caption{position:absolute;left:50%;top:17px;transform:translateX(-50%);color:#e5e9c6;letter-spacing:.18em;font-size:10px;text-align:center;white-space:nowrap;max-width:calc(100% - 140px);overflow:hidden;text-overflow:ellipsis;pointer-events:none;text-shadow:0 2px 4px #000}
aside{padding:20px 18px;overflow-y:auto;border-left:1px solid #39442f;background:#151d17}.eyebrow{font-size:9px;letter-spacing:.15em;color:#edbb63;font-weight:600}#room-label{color:#b8c7a3;margin-left:7px;font-family:Consolas,monospace}.players{margin:12px 0;font-size:12px}.players div{display:flex;justify-content:space-between;gap:9px;padding:5px 0}.players small{color:#90a482}#ready{width:100%}.objective-title{font-size:10px;letter-spacing:.1em;color:#a9b69b;margin:22px 0 10px}#objectives div{display:flex;justify-content:space-between;gap:10px;padding:7px 9px;border:1px solid #39482f;margin:5px 0;border-radius:4px;font-size:10px}.blue{color:#6db8ff}.red{color:#ff7a66}.ally{color:#ff6fe0}
.requisition{display:flex;align-items:center;justify-content:space-between;margin:23px 0 10px;border-top:1px solid #39442f;padding-top:18px}.requisition span{font-size:10px;letter-spacing:.1em;color:#adba9f}.requisition strong{font:22px Consolas,monospace;color:#edbb63}.deck{display:grid;grid-template-columns:1fr 1fr;gap:7px}.deck button{display:flex;flex-direction:column;align-items:flex-start;padding:9px;gap:5px}.deck b{font-size:11px}.deck strong{font:17px Consolas,monospace;color:#edbb63}.deck small{font-size:9px;color:#a2b497}.small{color:#8f9e82;font-size:10px;line-height:1.5}
#selection-info{font-size:11px;color:#b0bea4;min-height:40px;line-height:1.5}.orders{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 16px}.orders button{font-size:10px;padding:7px 8px}.orders button.active{border-color:#edbb63;color:#edbb63}kbd{font:9px Consolas,monospace;color:#9fad92;background:#111810;padding:2px 3px;margin-left:4px;border-radius:2px}#minimap{display:block;width:100%;height:auto;border:1px solid #607153;border-radius:3px;cursor:crosshair}.controls{display:grid;gap:5px;font-size:10px;color:#8a9f7c;margin-top:14px}
.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#11180fb0;backdrop-filter:blur(2px);z-index:5;padding:20px}.overlay[hidden]{display:none}.briefing{width:min(440px,100%);padding:33px;background:#18221af2;border:1px solid #637752;border-radius:9px;box-shadow:0 16px 80px #0007}.briefing h1{font-size:39px;letter-spacing:-.03em;margin:11px 0}.briefing h2{font-size:28px;margin:12px 0}.briefing p{color:#acbba1;line-height:1.65;font-size:13px}.briefing label{display:block;font-size:11px;color:#a0b18f;margin:22px 0 7px}.briefing>input,.briefing>select,.briefing>.primary{width:100%;margin-bottom:10px}.briefing small{display:block;color:#8a9f7b;font-size:10px;margin-top:20px}.join-row{display:flex;gap:8px}.join-row input{flex:1;letter-spacing:.16em;text-transform:uppercase}
#match-overlay{pointer-events:none;background:#11180f80}#match-overlay .briefing{max-width:380px;padding:26px}#order-hint{position:absolute;bottom:20px;left:20px;font-size:11px;color:#d2dfbf;border:1px solid #536347;background:#182219e6;border-radius:4px;padding:9px 13px;pointer-events:none}#toast{position:absolute;bottom:60px;left:20px;max-width:calc(100% - 40px);padding:10px 13px;background:#252d1bf0;border:1px solid #bd9853;border-radius:4px;color:#f0d292;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s}#toast.visible{opacity:1}
footer{height:31px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background:#111812;border-top:1px solid #39442f;font-size:10px;color:#899c79;gap:15px}
@media(max-width:900px){main{grid-template-columns:minmax(0,1fr) 230px}aside{padding:13px}header{padding:0 14px}.brand small{display:none}.session .pill{display:none}.score{gap:8px;font-size:21px}}@media(max-height:700px){header{height:60px}.objective-title{margin-top:14px}.requisition{margin-top:14px}.controls{gap:3px}}

#leave[hidden]{display:none}#mode-help{font-size:11px;min-height:36px;margin:4px 0 12px}.briefing{max-height:100%;overflow:auto}.briefing label[for="mode"]{margin-top:8px}

.exit-button{border-color:#906550;color:#ecc1a6;background:#34281f}.exit-button:hover{background:#493329}#leave{width:100%;margin-top:8px}#leave-overlay{pointer-events:auto;width:100%;margin-top:12px}
#pause-banner{position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:6;background:#1d281cf0;border:1px solid #edbb63;color:#f2e6c4;border-radius:6px;padding:8px 14px;display:flex;flex-direction:column;align-items:center;gap:2px;letter-spacing:.06em}
#pause-banner strong{color:#edbb63;font-size:15px}
#pause-banner small{color:#b5c7a3;font-size:10px}
#pause.active,.orders button.active{border-color:#edbb63;color:#edbb63}
.legend{font-size:9.5px;color:#b5c7a3;margin:-8px 0 14px;line-height:1.9}
.badge{font-size:8.5px;letter-spacing:.08em;border-radius:3px;padding:1px 4px;color:#11180f;font-weight:700}
.badge.spotted{background:#e8a54a}.badge.engaged{background:#e0533f;color:#fff}.badge.ambush{background:#7fb59a}
.briefing [hidden]{display:none}.briefing label[for="difficulty"]{margin-top:8px}
.briefing label[for="map-choice"],.briefing label[for="mission"]{margin-top:8px}#mission-brief{margin:-4px 0 8px;color:#b5c7a3}
#mission-brief.alert{color:#edbb63;font-weight:600}
#pause-banner[hidden]{display:none}
.briefing label[for="pace"]{margin-top:8px}
.training-label{display:block;color:#a9b69b;font-size:9px;letter-spacing:.08em;margin:0 0 6px}#training{width:100%;padding:8px;margin-bottom:9px;font-size:11px}#selection-info{white-space:pre-line}.fieldwork-key{border-left:2px solid #c09b66;padding-left:8px}.support{align-items:center}.planning{margin-bottom:5px}.planning button{font-size:9px;padding:7px}#smoke:disabled,#bombard:disabled{opacity:.42}
#setup-banner{position:absolute;bottom:64px;left:50%;transform:translateX(-50%);z-index:6;background:#1d281cf2;border:1px solid #8fc2dd;color:#f2e6c4;border-radius:6px;padding:10px 16px;display:flex;flex-direction:column;align-items:center;gap:6px;max-width:min(520px,90%);text-align:center}
#setup-banner[hidden],#setup-banner.folded{display:none}#setup-fold{position:absolute;top:-22px;left:50%;transform:translateX(-50%);width:44px;height:22px;padding:0;line-height:1;font-size:12px;background:#1d281cf2;color:#9bd0ec;border:1px solid #8fc2dd;border-bottom:0;border-radius:6px 6px 0 0;cursor:pointer}#setup-banner strong{color:#9bd0ec;letter-spacing:.08em}#setup-banner small{color:#b5c7a3;font-size:10.5px;line-height:1.5}
#ace-rendezvous{position:absolute;top:42px;right:12px;z-index:6;width:min(290px,calc(100% - 24px));padding:9px 11px;background:#142630ef;border:1px solid #80c9e6;border-radius:5px;box-shadow:0 5px 20px #0008;color:#e1f4f7;font-size:11px;line-height:1.4}
#ace-rendezvous[hidden]{display:none}#ace-rendezvous strong{display:block;color:#9ee4f6;letter-spacing:.09em;font-size:10px}#ace-rendezvous span{display:block;margin:4px 0 7px}#ace-rendezvous>div{display:flex;gap:6px}#ace-rendezvous button{flex:1;padding:6px 8px;font-size:10px;border-color:#6296a6}

/* Battlefield first: fixed command deck with independently scrolling panels. */
main{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 252px}
header{height:62px}.brand small{font-size:8px}
#command-dock{display:grid;grid-template-columns:216px minmax(350px,1fr) minmax(290px,390px);gap:0;padding:0;overflow:hidden;border-left:0;border-top:2px solid #798165;background:linear-gradient(#252b24,#161e18);box-shadow:0 -5px 20px #0005}
#command-dock>section{min-width:0;min-height:0;padding:12px 16px;border-right:1px solid #444c3c;overflow:auto}.overview .eyebrow{margin-bottom:9px}#minimap{max-height:120px;object-fit:contain;border-radius:0}#force-roster{display:flex;gap:4px;flex-wrap:wrap;margin-top:9px}#force-roster button{font:10px Consolas,monospace;padding:5px 6px}#force-roster button.active{border-color:#edbb63;color:#edbb63}
.card-heading{display:flex;justify-content:space-between;align-items:center;color:#8f9e82;font-size:9px;letter-spacing:.12em;margin-bottom:8px}.card-heading b{color:#edbb63}
#unit-card{min-height:105px;display:flex;gap:15px}.card-empty{color:#b0bea4;align-self:center;line-height:1.7}.unit-portrait{width:118px;flex-shrink:0;background:radial-gradient(ellipse,#414b36,#1a211b);border:1px solid #535b43;display:flex;align-items:center;justify-content:center;position:relative}.unit-portrait svg{width:100%;height:92px}.unit-portrait span{position:absolute;bottom:4px;color:#b7c19f;font:9px Consolas,monospace;letter-spacing:.1em}.unit-details{flex:1;min-width:0}.unit-details h2{font-size:18px;color:#ece5ca;margin:0 0 3px}.unit-details .crew{color:#aabb98;font-size:10px;line-height:1.4}.unit-meters{display:grid;grid-template-columns:1fr 1fr;gap:6px 15px;margin-top:8px}.unit-meter{font-size:9px;color:#bbc7aa}.unit-meter label{display:flex;justify-content:space-between;gap:4px}.unit-meter meter{display:block;width:100%;height:9px;accent-color:#a4b67c}
#selection-info{font-size:10px;min-height:0;margin-top:6px;line-height:1.45;max-height:42px;overflow:auto}.unit-console .orders{margin:8px 0 0;gap:5px}.unit-console .orders button{padding:7px;font-size:10px}
.operations nav{display:flex;gap:4px;border-bottom:1px solid #465240;padding-bottom:8px}.operations nav button{flex:1;font-size:10px;padding:6px 3px}.operations nav button.active{color:#edbb63;border-color:#a08d5e;background:#33382a}.operation-content{padding-top:8px}.dock-panel[hidden]{display:none}.requisition{margin:0 0 7px;padding:0;border:0}.requisition strong{font-size:19px}.training-label{display:none}#training{font-size:10px;padding:5px;margin-bottom:6px}.deck{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.deck button{padding:6px;gap:3px}.deck button small{display:none}.deck button b{font-size:10px}.deck button strong{font-size:14px}.deck button[data-kind="mortar"]{grid-column:auto;flex-direction:column;align-items:flex-start}.deck button[data-kind="mortar"] small{display:none}#requisition-help{margin:7px 0 0}.objective-title{margin:10px 0 5px}#objectives{display:flex;gap:4px}#objectives div{flex:1;flex-direction:column;padding:5px}.players{margin:5px 0}#ready,#leave{width:auto;padding:6px 9px}.legend{margin:0 0 9px}#order-hint{bottom:10px;padding:6px 10px;font-size:10px}#toast{bottom:45px}#setup-banner{bottom:46px;padding:8px 12px}.controls{margin-top:0}.briefing{padding:22px}.briefing h1{font-size:30px}.briefing label{margin-top:10px}
@media(max-width:1100px){#command-dock{grid-template-columns:170px minmax(320px,1fr) 290px}#command-dock>section{padding:10px}.unit-portrait{width:92px}.session{gap:6px}header{padding:0 12px}.brand strong{font-size:12px}}
@media(max-width:800px){main{grid-template-rows:minmax(0,1fr) 270px}#command-dock{grid-template-columns:minmax(270px,1fr) 250px}.overview{display:none}.brand small,#invite,.session .pill{display:none}.brand b{width:30px;height:30px}.brand strong{font-size:10px}.score{font-size:17px}.session button{font-size:10px;padding:6px}.unit-details h2{font-size:15px}.unit-portrait{width:75px}#tip{display:none}}
@media(max-height:720px){main{grid-template-rows:minmax(0,1fr) 220px}header{height:48px}#command-dock>section{padding:8px 12px}#unit-card{min-height:86px}.unit-portrait svg{height:76px}.unit-console .orders button{padding:5px}.unit-meter meter{height:7px}footer{height:23px}.briefing{padding:16px}.briefing p{margin:8px 0}.briefing label{margin-top:6px}.briefing>input,.briefing>select{padding:6px;margin-bottom:4px}.briefing small{margin-top:8px}}

body.compact-deck main{grid-template-rows:minmax(0,1fr) 190px}body.compact-deck #command-dock{grid-template-columns:170px minmax(350px,1fr) 360px}body.compact-deck #unit-card{min-height:76px}body.compact-deck .unit-portrait{width:80px}body.compact-deck .unit-portrait svg{height:65px}body.compact-deck .unit-details h2{font-size:16px}body.compact-deck .crew{display:none}body.compact-deck .unit-meters{margin-top:4px;gap:4px 12px}body.compact-deck #selection-info{max-height:15px}body.compact-deck .unit-console .orders button{padding:5px}body.compact-deck #minimap{max-height:92px}body.compact-deck #command-dock>section{padding:8px 12px}body.compact-deck .requisition{margin-bottom:4px}body.compact-deck .deck button{padding:4px}body.compact-deck #training{margin-bottom:4px}body.compact-deck #requisition-help{display:none}
@media(max-width:800px){body.compact-deck #command-dock{grid-template-columns:minmax(270px,1fr) 250px}body.compact-deck main{grid-template-rows:minmax(0,1fr) 210px}#layout-preview{font-size:9px}}

body.compact-deck #command-dock{grid-template-columns:235px minmax(350px,1fr) 340px}body.compact-deck .overview{display:flex;flex-direction:column;gap:6px;align-items:stretch}body.compact-deck .overview .eyebrow{grid-column:1/-1;margin-bottom:0}body.compact-deck #force-roster{margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start;gap:3px}body.compact-deck #force-roster button{padding:6px 3px;font-size:9px}body.compact-deck #minimap{width:160px;height:100px;max-height:100px;align-self:center;object-fit:contain}
@media(max-width:800px){body.compact-deck #command-dock{grid-template-columns:minmax(270px,1fr) 250px}body.compact-deck .overview{display:none}}

body.compact-deck .unit-details .crew{display:block;font-size:9px;line-height:1.25}#unit-card .crew[hidden]{display:none}body.compact-deck .requisition strong{font-size:16px}body.compact-deck .deck button strong{font-size:12px}body.compact-deck .deck button b{font-size:9px}body.compact-deck #training{padding:3px}body.compact-deck .operations{display:flex;flex-direction:column;overflow:hidden}body.compact-deck .operations nav{flex-shrink:0}body.compact-deck .operation-content{overflow:auto;min-height:0}

@media(min-width:801px) and (max-width:1000px){body.compact-deck #command-dock{grid-template-columns:170px minmax(280px,1fr) 280px}body.compact-deck #minimap{width:144px;height:90px}body.compact-deck #command-dock>section{padding:8px}.brand small{display:none}}

/* Unit tiles: aligned silhouettes, labels and a separate condition strip. */
#command-dock {background:linear-gradient(180deg,#2b3027 0%,#1b231d 100%);border-top-color:#8e9170}
#command-dock .eyebrow {color:#d6bc83;letter-spacing:.13em}
.unit-console .card-heading {padding-bottom:6px;border-bottom:1px solid #a7aa7626}
.unit-portrait {border-color:#737954;border-radius:4px;box-shadow:inset 0 0 20px #11180b88}
.unit-details h2 {font-weight:600;letter-spacing:.025em;display:flex;align-items:center;gap:7px}.unit-details h2 span{min-width:0;overflow-wrap:anywhere}.unit-map-icon{display:block;width:32px;height:32px;flex-shrink:0}.unit-meter label {color:#aebb9f}.unit-meter label span {color:#e0dcc1;font-family:Consolas,monospace}
.unit-details .crew-grade{color:#e0c989;font-size:11px;font-weight:600;line-height:1.4}
.transport-load{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;color:#dfd4b7;font-size:11px;margin:3px 0}.transport-load-status{min-width:0;overflow-wrap:anywhere}.transport-load button{padding:3px 7px;font-size:11px}
.unit-details .main-load{display:flex;align-items:center;gap:8px;color:#f0c77e;font:600 11px Consolas,monospace;line-height:1.5}.main-load-label{min-width:0;white-space:normal}.main-load progress{width:110px;height:9px;flex:none;accent-color:#d7b463}
#force-roster button,body.compact-deck #force-roster button {
  position:relative;display:grid;grid-template-columns:24px minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;align-items:center;gap:0 3px;
  height:30px;min-width:0;padding:2px 3px 3px;background:linear-gradient(#394333,#252f24);
  border:1px solid #58614a;border-radius:3px;box-shadow:inset 0 1px #acb08a12;
}
.roster-symbol {grid-row:1 / span 2;display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 24px}#force-roster .roster-symbol svg,#force-roster .roster-symbol img {width:22px;height:22px;object-fit:contain}#force-roster .roster-symbol img {object-fit:cover}
.roster-label {font:9px 'Segoe UI',sans-serif;color:#d6ddc3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.roster-condition {grid-column:2;font:600 10px/10px Consolas,monospace;color:#d6ddc3;font-variant-numeric:tabular-nums;text-align:left}.roster-condition:empty{display:none}
#force-roster button[data-strength="mid"] .roster-condition {color:#f0b44a}
#force-roster button[data-strength="low"] .roster-condition {color:#ff7b62}
#force-roster button[data-ammo]::before {content:"";position:absolute;right:3px;bottom:2px;width:8px;height:3px;border-radius:2px;background:#e8b54a;box-shadow:0 0 0 1px #1a1408}
#force-roster button[data-ammo="empty"]::before {background:#d95b45}
#force-roster button:hover {border-color:#aeb88a;background:#424d38}
#force-roster button.active,body.compact-deck #force-roster button.active {border-color:#e5c17e;background:linear-gradient(#5a5840,#393b2a);box-shadow:inset 0 0 0 1px #e6c17b30}
#force-roster button[data-contact="true"],body.compact-deck #force-roster button[data-contact="true"] {background:linear-gradient(#394333,#252f24) left top / 27px 100% no-repeat,repeating-linear-gradient(45deg,rgba(237,187,99,.30) 0 5px,rgba(237,187,99,0) 5px 11px),linear-gradient(#394333,#252f24)}
#force-roster button[data-state="spotted"]::after {content:"";position:absolute;top:3px;right:3px;width:5px;height:5px;border-radius:50%;background:#e8c56a;box-shadow:0 0 0 1px #2a2418}
#force-roster button[data-state="pinned"],body.compact-deck #force-roster button[data-state="pinned"] {border-color:#d95b45;box-shadow:inset 0 0 0 1px #d95b45}
body.compact-deck #minimap {width:134px;height:84px;max-height:84px;border-color:#778461;box-shadow:0 2px 8px #0004}
body.compact-deck .overview {gap:6px}
body.compact-deck #force-roster {gap:4px;grid-template-columns:repeat(3,minmax(0,1fr))}
.deck button,.deck button[data-kind="mortar"],body.compact-deck .deck button {
  display:grid;grid-template-columns:28px minmax(0,1fr);gap:2px 4px;padding:5px 5px;
  align-items:center;position:relative;border-radius:3px;background:linear-gradient(#303b2c,#222c22);border-color:#56604a;
}

/* Equipment the army did not have yet in this war period. */
.deck button[hidden],body.compact-deck .deck button[hidden] {display:none}
.deck-symbol {grid-row:1/3;display:flex;align-items:center}.deck-symbol .unit-map-icon {width:28px;height:28px}
.deck button b,body.compact-deck .deck button b {font-size:9px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.deck button strong,body.compact-deck .deck button strong {font-size:11px;line-height:1.1;color:#d9bf85}
.deck button:hover:not(:disabled) {border-color:#d3b97d;background:#3a4330}
.operations nav button {border-radius:3px;letter-spacing:.025em}.operations nav button.active {background:#464733;border-color:#a28f60}
.unit-console .orders button {border-radius:3px;background:linear-gradient(#303a2c,#202a21);border-color:#505c45}
.unit-console .orders button:hover:not(:disabled) {border-color:#a9b182;background:#3d4934}
@media(min-width:801px) and (max-width:1000px){body.compact-deck #force-roster{grid-template-columns:repeat(3,minmax(0,1fr))}body.compact-deck #minimap{width:102px;height:64px}body.compact-deck #force-roster button{height:30px}.roster-label{font-size:8px}}

/* Paused battles still accept orders beneath the status banner. */
#pause-banner {pointer-events:none}
/* Room code on the waiting screen. */
#match-code{margin:18px 0 6px;padding:14px;border:1px dashed #637752;border-radius:7px;text-align:center}#match-code[hidden]{display:none}#match-code span{display:block;font-size:10px;letter-spacing:.14em;color:#a0b18f}#match-code strong{display:block;font:34px Consolas,monospace;letter-spacing:.18em;color:#edbb63;margin:6px 0 10px;user-select:all}#match-code .code-actions{display:flex;gap:6px}#match-code .code-actions button{flex:1}#match-players{margin:12px 0;padding:4px 12px;border:1px solid #39482f;border-radius:7px}#match-players::before{content:"IN THE ROOM";display:block;font-size:9px;letter-spacing:.15em;color:#a0b18f;padding:4px 0 2px}#match-players[hidden]{display:none}#match-players div{padding:3px 0;align-items:baseline}#match-players small{margin:0;font-size:11px}#ready-overlay{width:100%;margin:14px 0 8px}#ready-overlay[hidden]{display:none}

#copy-code {pointer-events:auto}

.unit-portrait img{width:100%;height:auto;object-fit:contain}.deck-symbol img,.roster-symbol img{width:100%;height:100%;object-fit:contain}
#copy-link,#ready-overlay,#next-battle-settings,#match-code-value{pointer-events:auto}
#overlay-key{position:absolute;bottom:48px;left:20px;display:flex;gap:12px;font-size:10px;color:#d2dfbf;background:#182219d9;border:1px solid #536347;border-radius:4px;padding:5px 9px;pointer-events:none}#overlay-key[hidden],#overlay-key span[hidden]{display:none}#overlay-key span{display:flex;align-items:center;gap:6px}#overlay-key i{display:inline-block;width:16px;height:9px;border-radius:2px}#key-sight i{background:#f0d0861a;border:1.5px solid #f0d086}#key-range i{background:#e0844f14;border:1.5px solid #e0844f}

.weapon-status{font:10px Consolas,monospace;color:#e8bd73;margin:3px 0;}
.weapon-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.weapon-row .weapon-status{margin:0}#shell-choice{font:10px Consolas,monospace;padding:1px 2px;min-width:0;width:auto;background:#1b2619;color:#e8bd73;border:1px solid #5a6a4c}
.main-gun-controls{display:flex;flex-direction:column;gap:4px;min-width:0}.main-gun-controls .main-load{flex-wrap:wrap}.main-gun-controls progress{max-width:100%}.main-gun-controls #shell-choice{align-self:flex-start;max-width:100%}

/* Operation briefing fills the menu while retaining a clear route back to battle. */
#lobby{position:fixed;inset:62px 0 31px;z-index:40;overflow:auto;align-items:flex-start;padding:22px;background:radial-gradient(ellipse at 20% 0,#3e4938d9,#111912f5 75%)}
#lobby[hidden]{display:none}
#lobby .operation-shell{width:100%;max-width:1180px;max-height:none;overflow:visible;padding:24px;border:1px solid #657156;border-radius:8px;background:linear-gradient(120deg,#293327,#19251e);box-shadow:0 20px 60px #0008}
.operation-heading{height:auto;padding:0 0 18px;background:none;border:0;display:flex;justify-content:space-between;align-items:center}.operation-heading h1{font-size:29px;margin:5px 0 0}.operation-heading p{margin:0;color:#aab69d;font-size:12px;text-align:right;line-height:1.6}
.operation-tabs{display:flex;gap:6px;border-bottom:1px solid #57634b;padding-bottom:14px;margin-bottom:20px}.operation-tabs button{min-width:140px;border-radius:3px;background:#18251c}.operation-tabs button[aria-pressed="true"]{color:#f3c475;border-color:#c6a465;background:#454332}
.operation-body{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:26px}.operation-stage{min-width:0}.briefing-title{display:flex;justify-content:space-between;gap:15px;align-items:center}.briefing-title h2{font-size:23px;margin:5px 0 9px}.briefing-tag{font-size:9px;letter-spacing:.12em;white-space:nowrap;padding:7px;border:1px solid #59664d;color:#b8c49f}.operation-stage #briefing-objective{min-height:38px;font-size:12px;line-height:1.5;color:#c3cdb8;margin:0 0 13px}
.setup-map{position:relative;border:1px solid #788069;border-radius:4px;overflow:hidden;background:#34412d}#setup-map{width:100%;height:auto;display:block;aspect-ratio:1.6}.setup-map-key{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:center;gap:16px;padding:7px 8px;background:#132018dd;font-size:9px;color:#e0e2ce}.setup-map-key span{display:flex;gap:5px;align-items:center}.setup-map-key i{width:10px;height:8px}.blue-zone{background:#87bcd4}.red-zone{background:#d48b73}#map-preview-note{font-size:10px;margin:7px 0 12px;color:#abb69b}
.briefing-facts{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:0 0 14px;padding:12px 0;border-top:1px solid #4b5844;border-bottom:1px solid #4b5844}.briefing-facts dt{color:#a3b093;font-size:9px;text-transform:uppercase;letter-spacing:.08em}.briefing-facts dd{margin:5px 0 0;color:#f0d09a;font-size:12px}
.mission-controls,.setup-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.operation-shell label{display:block;font-size:11px;color:#b9c7a7;margin:10px 0 6px}.operation-shell input,.operation-shell select{width:100%;min-width:0;font-size:12px;padding:9px}.briefing-settings{border-left:1px solid #4b5844;padding-left:26px;min-width:0}.briefing-settings .primary{width:100%;margin:2px 0 15px;padding:12px}.briefing-settings #mode-help{min-height:44px;line-height:1.6;margin:12px 0}.briefing-settings .small{color:#a5b599;font-size:11px;line-height:1.6}.join-block{border-top:1px solid #4b5844;padding-top:7px}.join-row input{width:0;min-width:0}.join-row button{flex-shrink:0}
.scenario-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:20px}.scenario-list button{text-align:left;padding:10px;border-radius:3px}.scenario-list button b,.scenario-list button span{display:block}.scenario-list button b{font-size:12px;color:#e7d3a5;margin-bottom:3px}.scenario-list button span{font-size:10px;color:#b1bd9d}.scenario-list button[aria-pressed="true"]{border-color:#d0ae6b;background:#454332}.campaign-note{padding:35px 15px;min-height:330px}.campaign-note h2{font-size:26px;color:#e8c58a}.campaign-note p{max-width:480px;line-height:1.8;color:#b9c5aa}.operation-shell [hidden]{display:none!important}
@media(max-width:850px){#lobby{padding:14px}.operation-body{grid-template-columns:1fr}.briefing-settings{border-left:0;border-top:1px solid #4b5844;padding:18px 0 0}.operation-heading p{display:none}.operation-tabs button{flex:1;min-width:0;padding:9px 6px}.operation-shell .operation-heading h1{font-size:25px}#lobby .operation-shell{padding:18px}.briefing-tag{max-width:120px;overflow:hidden;text-overflow:ellipsis}}
@media(max-height:720px){#lobby{inset:48px 0 23px;padding:14px}.operation-heading{padding-bottom:12px}.operation-tabs{margin-bottom:14px;padding-bottom:10px}#lobby .operation-shell{padding:18px}.operation-body{gap:20px}}

.operation-shell[data-category='campaign'] .operation-body{grid-template-columns:minmax(0,1fr) 320px}
@media(max-width:850px){.operation-shell[data-category='campaign'] .operation-body{grid-template-columns:1fr}}

#setup-map{height:270px;object-fit:contain;aspect-ratio:auto;background:#1d2b21}.operation-shell[data-category='scenarios'] #setup-map{height:220px}
@media(max-width:850px){#setup-map,.operation-shell[data-category='scenarios'] #setup-map{height:230px}}

.scenario-list{grid-template-columns:repeat(4,minmax(0,1fr))}.map-force{position:absolute;top:46%;transform:translateY(-50%);width:135px;text-align:center;pointer-events:none}.friendly-force{left:16px}.enemy-force{right:16px}.map-force .eyebrow{font-size:8px}.map-force strong{display:block;font-size:11px;color:#d9d8bb}.map-force svg,.map-force img{width:100%;height:88px;object-fit:contain;display:block;margin:4px 0}
@media(max-width:850px){.scenario-list{grid-template-columns:repeat(2,minmax(0,1fr))}.map-force{display:none}}

.operation-tabs #cancel-setup{margin-left:auto;color:#ecc1a6;background:#34281f;border-color:#906550}
/* Connection errors and other feedback remain visible above the full menu. */
#toast{z-index:60}
body.landing #toast{position:fixed;bottom:42px;left:50%;transform:translateX(-50%);max-width:calc(100% - 28px)}

.cover-rating{font:10px Consolas,monospace;margin:3px 0;line-height:1.3;color:#a9afac}.cover-rating[data-grade="partial"]{color:#e9c45e}.cover-rating[data-grade="strong"]{color:#79c982}.cover-rating[data-grade="unknown"]{color:#858d87}

/* Visible border grips; resizing keeps the map and each panel usable. */
#command-dock,#command-dock>section{position:relative}
#command-dock{overflow:visible}#command-dock>section{overflow:auto}
.panel-resizer{position:absolute;z-index:20;touch-action:none;background:#b5b59a44;border:1px solid #b5b59a88;border-radius:3px}
.panel-resizer.horizontal{top:-5px;left:calc(50% - 28px);width:56px;height:8px;cursor:ns-resize}
.panel-resizer.vertical{left:0;top:8px;width:7px;height:35px;cursor:ew-resize}
.panel-resizer:hover,.panel-resizer:focus-visible{background:#edbb63;border-color:#fff1c3;outline:1px solid #fff1c3}
.resizing-panels{user-select:none}.resizing-panels canvas{pointer-events:none}
@media(max-width:800px){.panel-resizer.vertical{display:none}#reset-panels{font-size:9px;padding:5px}}
/* Engagement readiness: steady, shaken, broken and lost shares of the starting force. */
.score{position:relative}.sector-strip{position:absolute;left:50%;top:calc(100% + 1px);transform:translateX(-50%);display:flex;align-items:center;gap:6px;white-space:nowrap}.sector-strip[hidden]{display:none}.sector-pips{display:flex;gap:4px}
.sector-pip{position:relative;display:block;width:22px;height:12px;border:1px solid #6d7b5d;border-radius:2px;background:#2a2f27;overflow:hidden}
/* Field layout: pips stay equal (each sector is one share of points); the TEMPO readout
   beside HOLD carries the weighted reinforcement and income share. */
.sector-tempo{font-size:9px;letter-spacing:.12em;color:#efc467}.sector-tempo[hidden]{display:none}
.sector-pip[data-side=blue]{border-color:#4ea8ff}.sector-pip[data-side=red]{border-color:#ff5c47}
.sector-pip[data-state=paying][data-side=blue]{background:#4ea8ff;box-shadow:0 0 6px #4ea8ffaa}.sector-pip[data-state=paying][data-side=red]{background:#ff5c47;box-shadow:0 0 6px #ff5c47aa}
.sector-pip[data-state=idle][data-side=blue]{background:#4ea8ff44}.sector-pip[data-state=idle][data-side=red]{background:#ff5c4744}
.sector-pip[data-state=contested]{border-color:#efc467;background:repeating-linear-gradient(135deg,#efc46766 0 3px,#2a2f27 3px 6px)}
.sector-pip[data-state=capturing]::after{content:'';position:absolute;inset:0 auto 0 0;width:var(--capture,0%);background:currentColor}.sector-pip[data-state=capturing][data-side=blue]{color:#4ea8ff}.sector-pip[data-state=capturing][data-side=red]{color:#ff5c47}
.sector-count{font-size:9px;letter-spacing:.12em;color:#b8c7a3}
.score .side{display:flex;flex-direction:column;align-items:center;gap:4px}.ready-bar{display:flex;width:74px;height:5px;background:#2a2f27;border-radius:2px;overflow:hidden}.ready-bar i{display:block;height:100%}.ready-bar .steady{background:#9fc27a}.ready-bar .shaken{background:#e0a050}.ready-bar .broken{background:#e0604c}.ready-bar .lost{background:#3a3f36}

/* Selected unit situation: what it is doing, why it is (not) firing, what suppression costs it. */
.situation{display:grid;gap:3px;margin:5px 0 4px;font:11px/1.3 Consolas,monospace}.situation-row{display:grid;grid-template-columns:54px minmax(0,1fr);gap:6px;color:#c9cfbf;overflow-wrap:anywhere}.situation-row b{font-weight:600;color:#858d87;letter-spacing:.04em}.situation-row[data-tone="warn"]{color:#e9c45e}.situation-row[data-tone="bad"]{color:#f08a6b}

/* After-action report on the end-of-battle overlay. */
#after-action{margin:10px 0 12px;text-align:left;font-size:12px;max-width:min(760px,92vw)}#after-action p{margin:6px 0}#after-action .lessons{margin:6px 0 8px;padding-left:18px;color:#e9c45e}#after-action .lessons li{margin:2px 0}
#after-action h4{margin:12px 0 5px;font-size:9px;letter-spacing:.15em;text-transform:uppercase;color:#858d87;font-weight:600}
#after-action .moments{list-style:none;margin:0;padding:0;display:grid;gap:3px}#after-action .moment{display:grid;grid-template-columns:3.2em minmax(7em,11em) 1fr;gap:10px;align-items:baseline;width:100%;margin:0;padding:6px 10px;text-align:left;font-size:12px;line-height:1.35;background:#1b221c;border:1px solid #2f362d;border-left:3px solid #7d8a80;border-radius:3px;color:#e5e9da}
#after-action .moment.good{border-left-color:#8fc27a}#after-action .moment.bad{border-left-color:#c97a66}#after-action .moment.even{border-left-color:#e9c45e}#after-action .moment:hover:not(:disabled),#after-action .moment:focus-visible{background:#243026;border-color:#56644f;border-left-color:inherit}#after-action .moment:disabled{cursor:default;opacity:1}
#after-action .moment-time{font:11px/1.35 Consolas,monospace;color:#edbb63}#after-action .moment-place{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#b8c7a3;overflow-wrap:anywhere}#after-action .moment-text{min-width:0}
#after-action .report-commanders{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:6px}#after-action .report-commander{display:grid;gap:2px;min-width:0;padding:8px 10px;background:#1b221c;border:1px solid #2f362d;border-top:2px solid #6db8ff;border-radius:3px}#after-action .report-commander.foe{border-top-color:#d9776a}#after-action .report-commander.you{background:#202b22;border-color:#56644f;border-top-color:#6db8ff}
#after-action .report-name{font-size:13px;color:#e5e9da;overflow-wrap:anywhere}#after-action .report-side,#after-action .report-best{font-size:11px;color:#9aa598}#after-action .report-score{font:12px/1.4 Consolas,monospace;color:#e5e9da}
#after-action .report-units{margin-top:12px}#after-action .report-units>summary{cursor:pointer;font-size:9px;letter-spacing:.15em;text-transform:uppercase;color:#858d87;font-weight:600}
@media (max-width:560px){#after-action .moment{grid-template-columns:3.2em 1fr}#after-action .moment-text{grid-column:1/-1}}
#room-session{margin:0 0 12px;text-align:left;font-size:12px;pointer-events:auto}#room-session h4{margin:12px 0 5px;font-size:9px;letter-spacing:.15em;text-transform:uppercase;color:#858d87;font-weight:600}#room-session table{border-collapse:collapse;width:100%;font:11px/1.35 Consolas,monospace}#room-session th,#room-session td{padding:3px 8px;border-bottom:1px solid #2f362d;text-align:right;white-space:nowrap}#room-session th:first-child,#room-session td:first-child{text-align:left;white-space:normal;overflow-wrap:anywhere}#room-session th{color:#858d87;font-weight:600}#room-session tr.you td{color:#e9c45e}
#room-session .session-battles{margin:8px 0 0;padding-left:26px;max-height:9em;overflow-y:auto;color:#9aa598;font-size:11px;line-height:1.6}#room-session .session-battles .won{color:#a9cf98}#room-session .session-battles .lost{color:#c48b7c}
/* After a battle the way onward stays in reach while the report scrolls. */
#match-overlay[data-report="after-action"] .match-actions{position:sticky;bottom:-26px;margin:0 -26px -26px;padding:10px 26px 16px;background:#18221a;border-top:1px solid #2f362d;z-index:1;display:flex;flex-wrap:wrap;gap:6px;align-items:stretch}
#match-overlay[data-report="after-action"] .match-actions>button{width:auto;margin:0;flex:0 1 auto;padding:7px 12px;font-size:12px}#match-overlay[data-report="after-action"] .match-actions>button.primary{flex:1 1 170px;font-size:13px}
#after-action .report-table{overflow-x:auto;max-height:38vh;overflow-y:auto}#after-action table{border-collapse:collapse;width:100%;font:11px/1.35 Consolas,monospace}#after-action th,#after-action td{padding:3px 8px;border-bottom:1px solid #2f362d;white-space:nowrap;text-align:left}#after-action th{color:#858d87;font-weight:600;position:sticky;top:0;background:#161b16}#after-action tr.lost td{color:#c48b7c}
/* The end-of-battle panel can be tall with the report: keep it inside the map area and scroll it, so its buttons stay reachable. */
#match-overlay .briefing{max-height:100%;overflow:auto;box-sizing:border-box;pointer-events:auto} /* the card scrolls; the dimmed overlay around it stays click-through */#match-overlay[data-report="after-action"] .briefing{width:min(780px,100%);max-width:none}#after-action .report-table{max-height:30vh}
/* The overlay lets clicks through to the map; the report (so it can scroll) and the replay button opt back in. */
#save-replay,#watch-replay{pointer-events:auto;width:100%;margin-top:8px}#after-action{pointer-events:auto}#match-overlay[data-report="after-action"] .briefing{pointer-events:auto}
#feedback-card{margin:10px 0 12px;padding:12px 14px;border:1px solid #3a4436;border-radius:10px;background:#141a14;text-align:left;font-size:13px;max-width:min(520px,92vw);pointer-events:auto}
#feedback-card h3{margin:4px 0 8px;font-size:15px;color:#e9c45e}
#feedback-stars{display:flex;gap:6px}
#feedback-stars button{background:none;border:1px solid #3a4436;color:#6d766d;font-size:20px;line-height:1;padding:4px 8px;border-radius:6px;cursor:pointer}
#feedback-stars button.on{color:#e9c45e;border-color:#8a7a3f}
#feedback-prompt{display:block;margin:8px 0 4px;color:#c8cfc6;font-size:12px}
#feedback-text{width:100%;box-sizing:border-box;background:#0f130f;color:#dfe4db;border:1px solid #3a4436;border-radius:6px;padding:6px 8px;font:12px/1.4 Consolas,monospace;resize:vertical}
.feedback-actions{display:flex;align-items:center;gap:8px;margin-top:8px}
.feedback-privacy{color:#858d87;font-size:11px}
#feedback-status{color:#8fcbb1;font-size:12px}
#feedback-stars[hidden],#feedback-prompt[hidden],#feedback-text[hidden],#feedback-send[hidden],#feedback-skip[hidden]{display:none}
#feedback-send:disabled{opacity:.5;cursor:not-allowed}
/* Replay viewer: a control strip across the top of the battlefield. */
#replay-bar{position:absolute;left:50%;top:10px;transform:translateX(-50%);z-index:6;display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center;width:min(820px,calc(100% - 32px));padding:7px 10px;background:#141d16ee;border:1px solid #4b5844;border-radius:7px;box-shadow:0 6px 18px #0008}
#replay-bar .eyebrow{color:#edbb63;letter-spacing:.16em;font-size:10px}#replay-bar button{padding:5px 10px;min-width:40px}#replay-bar select{padding:5px 6px;font-size:12px}
#replay-seek{flex:1 1 220px;min-width:120px;padding:0;accent-color:#edbb63}#replay-time{font-family:Consolas,monospace;font-size:12px;min-width:92px;text-align:center}#replay-scan{color:#a5b599;font-size:11px}
#replay-bar[hidden]{display:none}#map-caption[hidden]{display:none}#replay-bar:not([hidden])~#map-caption{display:none}#open-replay{width:100%}

/* The campaign command desk reuses the game's unit art and readable force cards. */
#battlegroup[hidden]{display:none}#battlegroup{position:fixed;inset:0;z-index:80;background:#0e1713ee;overflow:auto;padding:20px}
.group-shell{max-width:1500px;margin:auto;border:1px solid #687157;background:linear-gradient(135deg,#303b2e,#17231e);box-shadow:0 10px 50px #0009;padding:22px}
.group-header{height:auto;padding:0 0 14px;background:none;align-items:flex-start;border-bottom:1px solid #667255}.group-header h1{margin:6px 0;color:#ead4a6;font-size:25px}.group-header p{margin:0;color:#b5c5a8;font-size:12px}.group-header>div:last-child{display:flex;align-items:center;gap:20px}#group-supply{color:#ecc479;font:20px Consolas,monospace}#group-brief{color:#cad0b4;line-height:1.6}
.group-body{display:grid;grid-template-columns:255px minmax(0,1fr);gap:16px}.group-pool{padding:12px;background:#15221d;border:1px solid #495844;min-width:0}.group-body h3{font-size:11px;letter-spacing:.08em;color:#cfc399;margin:0 0 12px}#group-reserves{display:flex;flex-direction:column;gap:7px}#group-platoons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.group-platoon{min-width:0;padding:12px;background:#253128;border:1px solid #52604b;display:flex;flex-direction:column;gap:8px}.group-platoon h3{margin:0 0 4px}.group-team{display:flex;gap:9px;align-items:center;text-align:left;min-height:108px;width:100%;padding:9px;background:linear-gradient(120deg,#3b4935,#202e26);border:1px solid #5c6a4f;border-radius:2px}.group-team:hover,.group-team.selected{border-color:#e4c379;background:linear-gradient(120deg,#51543a,#2c392b)}.group-team.destroyed{opacity:.45}.group-art{width:76px;flex-shrink:0}.group-art svg,.group-art img{width:100%;height:66px;object-fit:contain}.group-team-info{min-width:0;display:flex;flex-direction:column;gap:5px}.group-team b{color:#eee5c8;font-size:13px;overflow-wrap:anywhere}.group-team-info>span{font-size:11px;color:#cad1b5}.group-team small{font-size:10px;color:#b1be9f}.crew-dots{display:flex;gap:3px;flex-wrap:wrap}.crew-dots i{width:7px;height:8px;border:1px solid #9caf81;background:#84a16c}.crew-dots .missing{background:#30372e;border-color:#545c4e}.group-team.empty{border-style:dashed;justify-content:center;color:#96a489;background:#1c2922}.group-inspector{border:1px solid #687157;background:#17251e;margin-top:16px;padding:14px}.group-detail-art{width:110px;flex-shrink:0}.group-detail-art svg,.group-detail-art img{width:100%;height:90px;object-fit:contain}#group-details{display:flex;gap:18px;align-items:center}.group-detail-text h2{font-size:18px;color:#e4d3a7;margin:0 0 9px}.group-detail-text p{font-size:11px;color:#bdcbae;line-height:1.5;margin:4px 0}.group-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.group-actions input{max-width:200px;font-size:12px}.group-actions button{font-size:11px}.group-footer{display:flex;align-items:center;gap:14px;margin:14px 0}#group-feedback{flex:1;font-size:12px;color:#c5d2af;line-height:1.4}#group-ready{font:12px Consolas,monospace;color:#dbc68f}#group-history:empty{display:none}.group-result{border-top:1px solid #52604b;padding:12px 0}.group-result summary{cursor:pointer;color:#e2ca92}.group-result p{display:inline-block;width:33%;font-size:11px;color:#b7c5ab;margin:8px 0}.group-result .loss{color:#df9b83}
@media(max-width:1100px){.group-body{grid-template-columns:210px minmax(0,1fr)}.group-art{width:48px}.group-team{gap:5px;padding:7px}.group-platoon{padding:8px}.group-team b{font-size:11px}}
@media(max-width:800px){#battlegroup{padding:8px}.group-shell{padding:12px}.group-header{flex-wrap:wrap;gap:10px}.group-header h1{font-size:20px}.group-body{grid-template-columns:1fr}.group-pool{max-height:250px;overflow:auto}#group-reserves{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#group-platoons{grid-template-columns:1fr}.group-platoon{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.group-platoon h3{grid-column:1/-1}.group-footer{flex-wrap:wrap}#group-feedback{flex-basis:100%}.group-result p{width:50%}}

#group-map-preview{margin:0 0 15px;color:#d5c190}#group-map-preview summary{cursor:pointer;font-size:12px;padding:6px 0}#group-map-canvas{display:block;width:min(100%,640px);height:auto;border:1px solid #657154;margin-top:8px}

/* Opposing force artwork faces inward; labels retain their normal direction. */
#preview-enemy-token svg,#preview-enemy-token img{transform:scaleX(-1)}

/* Landing uses the whole desk; battlefield controls return on joining or replay. */
body.landing main{grid-template-rows:minmax(0,1fr)!important}
body.landing #command-dock,body.landing>header .score,body.landing>header #timer,body.landing>header #view,body.landing>header #pause,body.landing>header #layout-preview,body.landing>header #reset-panels,body.landing>header #battle-menu,body.landing>header #invite,body.landing #order-hint,body.landing #map-caption{display:none!important}
body.landing #lobby .operation-shell{max-width:1420px;padding:clamp(18px,2.5vw,38px)}
body.landing #setup-map{height:clamp(250px,35vh,390px)}
.operation-tabs{flex-wrap:wrap}.operation-tabs button{flex:1}
.manual-intro{display:grid;grid-template-columns:minmax(240px,.8fr) 1.4fr;gap:32px;align-items:start;margin-bottom:24px}.manual-intro h2{font-size:clamp(25px,3vw,38px);color:#f0d6a4;line-height:1.15}.manual-basics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding-top:15px}.manual-basics h3,.manual-footer h3{font-size:13px;color:#dfc895;margin:0 0 7px}.manual-basics p,.manual-footer p{margin:0;font-size:12px}.manual-armies{display:flex;align-items:center;gap:8px;padding:16px 0;border-top:1px solid #526048;border-bottom:1px solid #526048;margin-bottom:22px}.manual-armies p{margin:0 0 0 15px;font-size:11px}.manual-armies button[aria-pressed="true"],#manual-roster button[aria-pressed="true"]{border-color:#edbb63;background:#3e4430;color:#f7d28b}
.manual-body{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(0,1.3fr);gap:30px}#manual-roster{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start}#manual-roster button{text-align:left;min-width:0;padding:10px;display:grid;grid-template-columns:56px minmax(0,1fr) 28px;gap:8px;align-items:center}#manual-roster img,#manual-roster svg{width:56px;height:48px;object-fit:contain}#manual-roster strong{font-size:12px;display:block}#manual-roster small{font-size:10px;color:#9fb193;display:block;margin-top:4px}.manual-unit-heading{display:flex;align-items:center;gap:22px;padding:18px;background:radial-gradient(ellipse at 0 50%,#56614155,transparent 80%);border:1px solid #58634c;border-radius:5px}.manual-unit-art{width:190px;flex-shrink:0}.manual-unit-art img,.manual-unit-art svg{width:100%;height:140px;object-fit:contain}.manual-unit-heading h2{margin:6px 0;font-size:26px;color:#f0d4a0}.manual-unit-heading p{margin:0}.manual-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px;margin:16px 0}.manual-stats div{padding:7px 9px;background:#14211a;border:1px solid #3c4d37}.manual-stats dt{font-size:10px;color:#a8b69b}.manual-stats dd{font-size:14px;margin:3px 0 0;color:#e6d7ad}.manual-matchup-box{margin:0 0 16px;overflow-x:auto}.manual-matchup-box h3{color:#edbb63;font-size:12px;margin-bottom:5px}.manual-matchups{border-collapse:collapse;width:100%;font-size:12px}.manual-matchups th{color:#a8b69b;font-size:10px;font-weight:normal;text-align:left;padding:4px 8px;border-bottom:1px solid #3c4d37}.manual-matchups td{padding:5px 8px;border-bottom:1px solid #22301f;color:#e6d7ad}
.manual-tactics{display:grid;grid-template-columns:1fr 1fr;gap:20px}.manual-tactics h3{color:#edbb63;font-size:12px;margin-bottom:5px}.manual-tactics p{font-size:13px;margin:0}.manual-footer{display:grid;grid-template-columns:1fr 1fr auto;gap:24px;align-items:center;margin-top:28px;padding-top:20px;border-top:1px solid #526048}
.manual-period{max-width:480px;margin:0 0 24px}.manual-period-heading,.manual-period-stops{display:flex;justify-content:space-between;gap:12px;font-size:12px}.manual-period-heading label{color:#dfc895}.manual-period-heading output{color:#f7d28b}.manual-period input{display:block;width:100%;min-height:32px;margin:6px 0 0;accent-color:#edbb63;cursor:pointer}.manual-period input:focus-visible{outline:2px solid #edbb63;outline-offset:3px}.manual-period-stops{color:#a8b69b}.manual-period p{margin:8px 0 0}#manual-roster .manual-unavailable{opacity:.65}.manual-availability{padding:16px;border:1px solid #58634c;color:#dfc895}
@media(max-width:850px){.manual-intro,.manual-body{grid-template-columns:1fr}.manual-basics{padding:0}.manual-armies{flex-wrap:wrap}.manual-armies p{width:100%;margin:6px 0}.manual-footer{grid-template-columns:1fr 1fr}.manual-footer button{grid-column:1/-1}.operation-tabs button{min-width:calc(50% - 8px)}}
@media(max-width:500px){.manual-basics,.manual-tactics,.manual-footer{grid-template-columns:1fr}.manual-unit-heading{gap:8px;padding:10px}.manual-unit-art{width:105px}.manual-unit-art img{height:95px}.manual-unit-heading h2{font-size:20px}.manual-stats{grid-template-columns:1fr 1fr}#manual-roster{grid-template-columns:1fr}#manual-roster button{grid-template-columns:56px minmax(0,1fr) 28px;padding:7px;gap:8px}#manual-roster img,#manual-roster svg{width:42px;height:36px}.manual-footer button{grid-column:auto}}

/* Battle desks share live controls; landing keeps its own full-width layout. */
#panel-layouts{width:min(880px,calc(100vw - 32px));box-sizing:border-box;max-height:calc(100dvh - 40px);overflow:auto;padding:24px;background:linear-gradient(130deg,#303c2d,#17231e);color:#d7dfc4;border:1px solid #72805f;border-radius:8px;box-shadow:0 20px 80px #000a}
#panel-layouts::backdrop{background:#07110bc9}#panel-layouts h2{margin:5px 0;color:#f0d6a4}.layout-heading{display:flex;justify-content:space-between;align-items:center}.layout-candidates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.layout-candidates>button{text-align:left;padding:12px;min-width:0}.layout-candidates>button[aria-pressed="true"]{border-color:#edbb63;background:#414831;box-shadow:inset 0 0 0 1px #edbb63}.layout-candidates strong{display:block;margin:13px 0 7px;color:#ecd3a1}.layout-candidates small{display:block;line-height:1.5;color:#b9c6a9}.layout-diagram{height:100px;display:grid;grid-template-columns:1fr 2.5fr 1fr;gap:3px;text-align:center;font-size:9px}.layout-diagram>*{display:flex;align-items:center;justify-content:center;font-style:normal;font-weight:normal;border:1px solid #7f8d66;background:#4e5b40;color:#ebdfb9;border-radius:2px}.layout-diagram b{background:#1a2b20;color:#a9bd97}.layout-diagram.split{grid-template-rows:1fr 25px}.layout-diagram.split i{grid-row:1/3}.layout-diagram.split i:last-of-type{grid-column:3}.layout-diagram.split em{grid-column:2;grid-row:2}.layout-diagram.deck{grid-template-rows:1fr 30px}.layout-diagram.deck b{grid-column:1/-1}.layout-options{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.layout-options label{font-size:12px;display:flex;align-items:center;gap:8px}.layout-options select{width:auto}.layout-options input{width:auto}.side-panel-resizer{display:none}
#practice-menu{width:min(420px,calc(100vw - 28px));box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid #72805f;border-radius:8px;color:#d7dfc4;background:linear-gradient(130deg,#303c2d,#17231e);box-shadow:0 20px 80px #000a}
#practice-menu::backdrop{background:#07110bc9}#practice-menu h2{margin:5px 0;color:#f0d6a4}#practice-menu p{line-height:1.5;color:#b9c6a9}#practice-menu label{display:block;margin:16px 0 6px}#practice-menu select,#practice-menu button{display:block;width:100%;box-sizing:border-box;margin:8px 0}#practice-menu [hidden]{display:none}#practice-menu-exit{margin-top:20px}
@media(min-width:1101px){
 body[data-battle-layout="split"] main,body[data-battle-layout="rails"] main{grid-template-columns:var(--map-panel-width,220px) minmax(0,1fr) var(--orders-panel-width,280px);grid-template-rows:minmax(0,1fr) var(--unit-panel-height,230px);grid-template-areas:"overview battlefield operations" "overview unit operations"}
 body[data-battle-layout="rails"] main{grid-template-rows:240px minmax(0,1fr);grid-template-areas:"overview battlefield operations" "unit battlefield operations"}
 body[data-minimap-side="right"][data-battle-layout="split"] main,body[data-minimap-side="right"][data-battle-layout="rails"] main{grid-template-columns:var(--orders-panel-width,280px) minmax(0,1fr) var(--map-panel-width,220px);grid-template-areas:"operations battlefield overview" "operations unit overview"}
 body[data-minimap-side="right"][data-battle-layout="rails"] main{grid-template-areas:"operations battlefield overview" "operations battlefield unit"}
 body[data-battle-layout="split"] #command-dock,body[data-battle-layout="rails"] #command-dock{display:contents}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) #battlefield{grid-area:battlefield}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) #command-dock>section{position:relative;min-width:0;min-height:0;border:1px solid #4f6045;padding:12px;background:linear-gradient(140deg,#2d382a,#17231e);overflow:auto}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) .overview{grid-area:overview;display:flex;flex-direction:column;gap:10px;container-type:inline-size}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) .unit-console{grid-area:unit}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) .operations{grid-area:operations}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) #minimap{width:100%;height:auto;max-width:256px;align-self:center;flex-shrink:0}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) #force-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;max-height:none;overflow:visible}
@container (min-width:170px){body:is([data-battle-layout="split"],[data-battle-layout="rails"]) #force-roster{grid-template-columns:repeat(3,minmax(0,1fr))}}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) #deck{grid-template-columns:repeat(2,minmax(0,1fr))}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) .operations nav{flex-wrap:wrap}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) .operations nav button{flex:1 1 40%;font-size:11px}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) .panel-resizer{display:none}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) .side-panel-resizer.vertical{display:block;position:absolute;z-index:8;right:0;top:calc(50% - 28px);width:7px;height:56px;cursor:ew-resize;background:#a5b181;border-radius:4px;touch-action:none;opacity:.6}
 body:is([data-battle-layout="split"],[data-battle-layout="rails"]) .operations .side-panel-resizer.vertical{left:0;right:auto}
 body[data-minimap-side="right"] .overview .side-panel-resizer.vertical{left:0;right:auto}
 body[data-minimap-side="right"] .operations .side-panel-resizer.vertical{right:0;left:auto}
 body[data-battle-layout="split"] .side-panel-resizer.horizontal{display:block;position:absolute;z-index:8;top:0;left:calc(50% - 28px);width:56px;height:7px;cursor:ns-resize;background:#a5b181;border-radius:4px;touch-action:none;opacity:.6}
 body[data-battle-layout="rails"] #unit-card{flex-wrap:wrap;gap:10px}
 body[data-battle-layout="rails"] .unit-details{flex:1 1 100%;min-width:0}
 body[data-battle-layout="rails"] .unit-portrait{width:100%;height:100px}
 body[data-battle-layout="rails"] .orders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-battle-layout="rails"] #selection-info{line-height:1.5}
}
body[data-battle-layout="deck"][data-minimap-side="right"] .overview{order:3}body[data-battle-layout="deck"][data-minimap-side="right"] .unit-console{order:2}body[data-battle-layout="deck"][data-minimap-side="right"] .operations{order:1}
body[data-battle-layout="deck"][data-minimap-side="right"] #command-dock{grid-template-columns:340px minmax(350px,1fr) 235px}
body[data-battle-layout="deck"][data-minimap-side="right"] .panel-resizer.vertical{display:none}
body.landing main{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"battlefield"!important}
.side-panel-resizer:focus-visible{outline:2px solid #edbb63;opacity:1}
.panel-folded{display:none!important}
body[data-visible-panels="0"] #command-dock{display:none}
.panel-pull-tab{position:fixed;z-index:25;min-width:58px;height:25px;padding:3px 7px;border:1px solid #a5b181;border-radius:4px;background:#263328e8;color:#e6dbb7;font:10px Consolas,monospace;letter-spacing:.05em;box-shadow:0 2px 8px #0008;touch-action:none;user-select:none}
.panel-pull-tab:hover,.panel-pull-tab:focus-visible{background:#46563b}
body.landing .panel-pull-tab{display:none}
@media(min-width:1101px){
 body[data-battle-layout="rails"][data-unit-folded] main{grid-template-rows:minmax(0,1fr);grid-template-areas:"overview battlefield operations"}
 body[data-battle-layout="rails"][data-minimap-side="right"][data-unit-folded] main{grid-template-areas:"operations battlefield overview"}
}
@media(max-width:1100px){body[data-battle-layout] #command-dock{grid-template-columns:170px minmax(320px,1fr) 290px}body[data-minimap-side="right"] .overview{order:3}body[data-minimap-side="right"] .unit-console{order:2}body[data-minimap-side="right"] .operations{order:1}body[data-minimap-side="right"] #command-dock{grid-template-columns:290px minmax(320px,1fr) 170px}}
@media(max-width:800px){body[data-battle-layout] #command-dock{grid-template-columns:minmax(270px,1fr) minmax(250px,.8fr)}body[data-minimap-side="right"] #command-dock{grid-template-columns:minmax(250px,.8fr) minmax(270px,1fr)}.layout-candidates{grid-template-columns:1fr}.layout-diagram{height:70px}.layout-candidates>button{display:grid;grid-template-columns:130px minmax(0,1fr);column-gap:16px}.layout-diagram{grid-row:1/3}.layout-candidates strong{margin:0}.layout-options{align-items:flex-start}#panel-layouts{padding:16px}}
.commander-profile{display:none;align-items:center;gap:10px;margin-left:auto;margin-right:20px}.commander-profile label{font-size:11px;color:#c2cbae;white-space:nowrap}.commander-profile input{width:170px;padding:7px 10px;font-size:13px}body.landing .commander-profile{display:flex}.join-block>p{margin:5px 0 10px}#join{white-space:nowrap}
@media(max-width:600px){body.landing>header{height:auto;min-height:62px;flex-wrap:wrap;padding:10px 12px;gap:8px}body.landing .commander-profile{margin:0;gap:7px}body.landing .commander-profile input{width:125px}body.landing>header .session{display:none}body.landing #lobby{top:var(--landing-header-height,62px)}}
/* Give selected-unit commands the wide side of the desk. */
body:not(.ace-seat) #command-dock>.unit-console{display:flex;flex-direction:column}
body:not(.ace-seat) .unit-console>.card-heading{order:0;flex-shrink:0}
body:not(.ace-seat) #unit-orders{order:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex-shrink:0}
body:not(.ace-seat) #unit-card{order:2;flex-shrink:0}
body:not(.ace-seat) #selection-info{order:3;flex-shrink:0}
body:not(.ace-seat) #unit-orders>button{font-size:12px;line-height:1.2;min-height:36px;padding:6px 8px}
body:not(.ace-seat) #unit-orders kbd{font-size:10px;white-space:nowrap}
body:not(.ace-seat).compact-deck #unit-orders>button{min-height:32px;padding:4px 6px}
@media(min-width:1101px){
 body:not(.ace-seat)[data-battle-layout="split"] #command-dock>.unit-console{display:grid;grid-template-columns:clamp(220px,28%,280px) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) 16px;gap:7px 14px;overflow:hidden}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-console .card-heading{grid-column:1/-1}
 body:not(.ace-seat)[data-battle-layout="split"] #unit-card{grid-column:1;grid-row:2;overflow:auto;min-height:0;gap:8px}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-portrait{width:64px;align-self:start;height:62px}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-portrait svg{height:58px}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-portrait span{font-size:8px}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-details h2{font-size:14px;gap:4px}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-details{display:flex;flex-direction:column;align-self:flex-start}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-details>:is(h2,.crew-grade,.main-gun-controls,.transport-load){order:-2}
 body:not(.ace-seat)[data-battle-layout="split"] .main-load{flex-wrap:wrap;gap:2px}
 body:not(.ace-seat)[data-battle-layout="split"] .main-load progress{width:100%;height:5px}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-map-icon{width:24px;height:24px}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-meters{order:-1;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 8px;margin-top:5px}
 body:not(.ace-seat)[data-battle-layout="split"] #selection-info{grid-column:1;grid-row:3;margin:0;overflow:hidden}
 body:not(.ace-seat)[data-battle-layout="split"] #unit-orders{grid-column:2;grid-row:2/4;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start;margin:0;gap:5px;overflow:auto}
 body:not(.ace-seat)[data-battle-layout="split"] #unit-orders>button{font-size:clamp(12px,.9vw,14px);min-height:38px}
 /* Narrow desks have two status columns: give gun and vehicle cards room. */
 @media(max-width:1439px){
  body:not(.ace-seat)[data-battle-layout="split"]:not([data-mortar-controls]):not(.compact-deck)[data-unit-details] main{--unit-panel-default-height:260px}
  body:not(.ace-seat)[data-battle-layout="split"]:not([data-mortar-controls])[data-weapon-row] main{--unit-panel-default-height:270px}
  body:not(.ace-seat)[data-battle-layout="split"]:not([data-mortar-controls]):not(.compact-deck)[data-weapon-row] main{--unit-panel-default-height:300px}
 }
 body:not(.ace-seat)[data-battle-layout="split"][data-mortar-controls] main{--unit-panel-default-height:330px}
 /* The status card takes the spare width and flows its rows into columns, so
    every value fits at the default height; orders keep a compact 4×4 grid. */
 body:not(.ace-seat)[data-battle-layout="split"] #command-dock>.unit-console{grid-template-columns:minmax(0,1fr) clamp(340px,38%,480px)}
 /* A mortar's mission row and Release fire need a fifth column of orders. */
 body:not(.ace-seat)[data-battle-layout="split"][data-mortar-controls] #command-dock>.unit-console{grid-template-columns:minmax(0,1fr) clamp(420px,48%,600px)}
 body:not(.ace-seat)[data-battle-layout="split"] #unit-card{container-type:inline-size}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-details{display:flex;flex-flow:column wrap;align-content:flex-start;height:100%;column-gap:14px}
 body:not(.ace-seat)[data-battle-layout="split"] .unit-details>*{width:calc((100% - 14px)/2);flex-shrink:0;margin-top:0;margin-bottom:3px}
 /* Wide cards use three columns; narrow ones give the portrait's width to values. */
 /* From 380 px three columns, so a tank's armour and weapon rows stay on the card
    (two columns overflowed sideways at 1280 x 720). Narrow columns stack each
    situation label above its value instead of breaking words. */
 @container (min-width:380px){body:not(.ace-seat)[data-battle-layout="split"] .unit-details>*{width:calc((100% - 28px)/3)}}
 /* The split card's three columns hold the live readouts and no more (#1098 review: with an enemy in sight the last
    item fell into a hidden fourth column). The unchanging reference lines move to the unit name's tooltip there. */
 @container (min-width:380px){body:not(.ace-seat)[data-battle-layout="split"] .unit-details>:is(.crew,.combat-ranges,.armor-status){display:none}
  /* Each live row is its own item, so the rows can continue in the next column instead of moving there as one block. */
  body:not(.ace-seat)[data-battle-layout="split"] .unit-details>.situation{display:contents}
  body:not(.ace-seat)[data-battle-layout="split"] .unit-details>.situation>.situation-row{width:calc((100% - 28px)/3);flex-shrink:0;margin:0 0 3px;font:11px/1.3 Consolas,monospace}}
 @container (min-width:380px) and (max-width:479px){body:not(.ace-seat)[data-battle-layout="split"] .situation-row{grid-template-columns:1fr;gap:0;overflow-wrap:normal}}
 @container (max-width:620px){body:not(.ace-seat)[data-battle-layout="split"] #unit-card>.unit-portrait{display:none}}
 /* Below 1280 px the card is too narrow for columns: keep one scrolling column. */
 @container (max-width:300px){body:not(.ace-seat)[data-battle-layout="split"] .unit-details{display:block;height:auto}body:not(.ace-seat)[data-battle-layout="split"] .unit-details>*{width:auto;margin-top:revert;margin-bottom:revert}}
 @media(max-width:1279px){body:not(.ace-seat)[data-battle-layout="split"][data-mortar-controls] #command-dock>.unit-console{grid-template-columns:minmax(0,1fr) 360px}}
 body:not(.ace-seat)[data-battle-layout="split"] #unit-orders>button{font-size:clamp(11px,.8vw,13px);line-height:1.1;padding:3px 5px;overflow-wrap:anywhere}
 body:not(.ace-seat)[data-battle-layout="split"] #unit-orders kbd{font-size:9px}
 body:not(.ace-seat)[data-battle-layout="rails"] #unit-orders{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-battle-layout="rails"] .unit-portrait img{max-height:100%;width:auto;max-width:100%}
}

@media(max-width:600px){body:not(.ace-seat) #unit-orders{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact setup controls align by their labels; primary actions fit their text. */
.operation-shell .mission-controls{display:flex;flex-wrap:wrap;gap:12px 20px;padding:0 0 18px;margin-bottom:18px;border-bottom:1px solid #4b5844}
.operation-shell .mission-controls label{margin-top:0}
.operation-shell .mission-controls>div{min-width:0;max-width:100%}
.operation-shell .mission-controls select,.operation-shell .briefing-settings select{width:auto;max-width:100%;field-sizing:content;min-width:140px}
.operation-shell .setup-pair{display:flex;flex-wrap:wrap;gap:0 12px;max-width:100%}
.operation-shell #pace{min-width:100px}
.operation-shell .briefing-settings .primary{width:auto;flex:0 0 auto;align-self:center;margin:2px 0 15px;padding:9px 14px}
.operation-shell .join-row{align-items:center;flex-wrap:wrap;gap:8px}
.operation-shell .join-row #room{width:135px;flex:0 1 135px;min-width:110px}
.operation-shell .join-row #join{margin:0}
@media(max-width:500px){.operation-shell .setup-pair{display:flex;flex-wrap:wrap}.operation-shell .setup-pair>div{max-width:100%}.operation-shell .mission-controls{gap:12px;margin-bottom:14px;padding-bottom:14px}}

/* Keep the command desk anchored while each tab changes its content. */
body.landing #lobby{align-items:stretch;justify-content:center;overflow:hidden}
body.landing #lobby .operation-shell{height:100%;max-height:100%;display:flex;flex-direction:column;overflow:hidden;min-height:0}
body.landing .operation-heading,body.landing .operation-tabs{flex-shrink:0}
body.landing .operation-body{flex:1;min-height:0;overflow:hidden;align-items:stretch}
body.landing .operation-stage,body.landing .briefing-settings{min-height:0;overflow:auto;scrollbar-gutter:stable}
body.landing #field-manual{flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable}
body.landing #setup-map,body.landing .operation-shell[data-category='scenarios'] #setup-map{height:clamp(250px,35vh,390px)}
body.landing .briefing-settings .scenario-list{grid-template-columns:repeat(2,minmax(0,1fr));margin:14px 0 20px}
body.landing .briefing-settings .scenario-list button{padding:8px;min-width:0}
@media(max-width:850px){body.landing .operation-body{display:block;overflow:auto;scrollbar-gutter:stable}body.landing .operation-stage,body.landing .briefing-settings{min-height:auto;overflow:visible;scrollbar-gutter:auto}body.landing .briefing-settings{margin-top:20px}}

.group-team-slot{display:flex;flex-direction:column;gap:0;min-width:0}.group-team-slot .group-team{border-radius:3px 3px 0 0;flex:1}.group-return{padding:6px 9px;text-align:right;font-size:10px;border-top:0;border-radius:0 0 3px 3px;color:#e9c882;background:#1c2a21}.group-return:hover{background:#394331}.group-team[draggable="true"]{cursor:grab}.group-team[draggable="true"]:active{cursor:grabbing}.group-pool.drop-ready,.group-team.drop-ready{outline:2px dashed #edbb63;outline-offset:-3px;background:#3d4a30}

/* Deck codes: the compact deck shows one line per unit (icon, code, cost) so all twelve fit; full names stay in the detailed layout and the tooltip. */
.deck button i{display:none;font-style:normal}
body.compact-deck .deck{gap:3px}body.compact-deck .deck button{grid-template-columns:24px minmax(0,1fr) auto;grid-template-rows:auto;height:24px;padding:1px 4px;gap:0 3px}body.compact-deck .requisition{margin-bottom:4px}body.compact-deck #training{margin-bottom:4px}
body.compact-deck .deck button b{display:none}
body.compact-deck .deck button i{display:block;font-size:9.5px;letter-spacing:-.01em;font-weight:600;color:#d6ddc3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
body.compact-deck .deck-symbol{grid-row:auto}body.compact-deck .deck-symbol .unit-map-icon{width:24px;height:24px}
body.compact-deck .deck button strong{font-size:10px}
@media(max-width:1100px){body.compact-deck .deck{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Status chip and panel: frame rate, downloads, alerts. */
#status-chip{position:relative;font-size:10px;letter-spacing:.06em;padding:5px 9px;border-radius:20px;font-variant-numeric:tabular-nums;min-width:62px}
#status-chip.slow{border-color:#c99a4a;color:#f0cf8a}#status-chip.bad{border-color:#d0604b;color:#ffb3a3}
#status-badge{position:absolute;top:-6px;right:-6px;min-width:15px;height:15px;padding:0 3px;border-radius:8px;font-size:9px;line-height:15px;text-align:center;color:#11180f;background:#9fc28a}
#status-badge.warn{background:#e8b04f}#status-badge.error{background:#e8604c;color:#fff}
#status-panel{user-select:text;-webkit-user-select:text;cursor:auto;position:fixed;top:64px;right:14px;z-index:60;width:min(420px,calc(100vw - 28px));max-height:calc(100vh - 90px);overflow-y:auto;padding:10px 14px 14px;background:#151d17f5;border:1px solid #4b5a3e;border-radius:6px;box-shadow:0 8px 28px #0008;font-size:11px;color:#d7dcc8}
#status-panel h3{margin:12px 0 5px;font-size:10px;letter-spacing:.12em;color:#a9b69b;font-weight:600;text-transform:uppercase}
.status-head{display:flex;justify-content:space-between;align-items:center}.status-actions{display:flex;gap:6px;align-items:center}#status-copy{padding:0 10px;font-size:11px;line-height:22px;min-height:0}#status-close{padding:0 8px;font-size:16px;line-height:22px}
.status-row{display:flex;justify-content:space-between;gap:12px;padding:3px 0;border-bottom:1px solid #26301f}.status-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#a9b69b}.status-row b{font-weight:500;white-space:nowrap;font-variant-numeric:tabular-nums}
.status-row.warn b{color:#f0cf8a}.status-row.bad b{color:#ff9d8a}
#status-log{max-height:190px;overflow-y:auto}.status-entry{display:flex;gap:8px;padding:3px 0;border-bottom:1px solid #26301f;line-height:1.35}.status-entry time{color:#7f8f72;font-variant-numeric:tabular-nums;flex-shrink:0}
.status-entry.warn span{color:#f0cf8a}.status-entry.error span{color:#ff9d8a}.status-entry em{font-style:normal;color:#7f8f72}

/* Persistent identity and settings belong together at the right of the top bar. */
body>header{height:auto;min-height:62px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
.header-preferences{display:flex;align-items:center;gap:10px;margin-left:auto;flex-shrink:0}
#begin{flex-shrink:0;white-space:nowrap;padding:8px 11px}
#begin[hidden],#setup-notes[hidden]{display:none}
#setup-notes{flex-shrink:0;white-space:nowrap;padding:8px 10px}
#begin kbd{color:#3d3b24;background:#f8d69b}
#begin[data-confirmed]{color:#e8f5dc;background:#2f6b3a;border-color:#7fc28a}#begin[data-confirmed] kbd{color:#1f3a24;background:#bfe6c4}
.setup-players{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}.setup-players[hidden]{display:none}
.setup-player{padding:2px 8px;border:1px solid #6d7b5d;border-radius:10px;font-size:11px;color:#d7dfc4;background:#1a2418}
.setup-player[data-state=ready]{color:#e8f5dc;border-color:#7fc28a;background:#2a4f30}.setup-player[data-state=offline]{color:#a3a39a;border-style:dashed}
.header-preferences .commander-profile{display:flex;margin:0;gap:8px}
.header-preferences .commander-profile input{width:125px}
.header-preferences .commander-profile input[readonly]{background:transparent;border-color:transparent;color:#edcf91;cursor:default}
.settings-circle{width:38px;height:38px;padding:8px;border-radius:50%;display:grid;place-items:center;color:#edcf91;flex-shrink:0}
.settings-circle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
#game-settings,#room-settings{width:min(560px,calc(100vw - 28px));box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid #72805f;border-radius:8px;color:#d7dfc4;background:linear-gradient(130deg,#303c2d,#17231e);box-shadow:0 20px 80px #000a}
#game-settings::backdrop,#room-settings::backdrop{background:#07110bc9}
/* Settings drops down under its gear over the live battlefield, which stays
   visible so each change can be seen as it is made. On wide screens an
   explanation panel to its left describes the setting being pointed at. */
#game-settings{inset:var(--settings-top,64px) var(--settings-right,12px) auto auto;margin:0;width:auto;max-width:none;max-height:none;padding:0;overflow:visible;border:0;border-radius:0;background:none;box-shadow:none}
#game-settings[open]{display:flex;align-items:flex-start;gap:10px;animation:settings-drop .16s ease-out}
#game-settings::backdrop{background:transparent}
#game-settings>.settings-panel,#settings-explain{box-sizing:border-box;border:1px solid #72805f;border-radius:8px;background:linear-gradient(130deg,#303c2d,#17231e);box-shadow:0 20px 80px #000a}
#game-settings>.settings-panel{position:relative;width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - var(--settings-top,64px) - 12px);overflow:auto;padding:20px 22px 18px}
#settings-explain{width:300px;padding:18px 20px;max-height:calc(100dvh - var(--settings-top,64px) - 12px);overflow:auto}
#settings-explain h3{margin:6px 0 8px;font-size:17px;color:#f0d6a4}#settings-explain p{font-size:13px;line-height:1.55;margin:0 0 10px;color:#c9d4b8}
#settings-explain ul{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:6px}#settings-explain ul:empty{display:none}
#settings-explain li{font-size:12px;line-height:1.45;color:#afbea2;padding:7px 9px;border:1px solid #47533f;border-radius:5px}#settings-explain li b{display:block;color:#ecd9b0;font-size:13px}
#settings-explain li[aria-current="true"]{border-color:#e0bb63;background:#3a3d2a;color:#d7dfc4}#settings-explain li[aria-current="true"] b::after{content:" · current";color:#e0bb63;font-weight:400;font-size:11px}
#settings-explain .settings-explain-state{color:#e0bb63;font-size:12px}
.settings-row.settings-explained{box-shadow:inset 3px 0 #e0bb63;padding-left:12px;margin-left:-12px}
/* The explanation panel carries the descriptions; they stay readable to screen readers. */
@media(min-width:900px){#game-settings:not(.controls-editing) .settings-row p{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}}
#game-settings.controls-editing #settings-explain{display:none}
@media(max-width:899px){#settings-explain{display:none}.settings-row.settings-explained{box-shadow:none;padding-left:0;margin-left:0}}
@keyframes settings-drop{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){#game-settings[open]{animation:none}}
.settings-hint{font-size:12px;line-height:1.5;margin:0 0 6px;color:#afbea2}
#game-settings h2,#room-settings h2{margin:5px 0;color:#f0d6a4}
.settings-section{margin-top:22px}.settings-section h3{font-size:11px;letter-spacing:.12em;color:#b2c3a1;margin-bottom:8px;text-transform:uppercase}
.settings-row{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:15px 0;border-top:1px solid #526048}
.settings-row label,.settings-row strong{font-size:14px;color:#ecd9b0;font-weight:600}.settings-row p{font-size:12px;line-height:1.5;margin:5px 0 0;color:#afbea2}
.settings-row input[type=checkbox]{width:19px;height:19px;flex-shrink:0;accent-color:#edbb63}.settings-row select,.settings-row button{width:auto;flex-shrink:0;max-width:48%}
.badge-ally-rows{display:flex;flex-wrap:wrap;gap:8px 14px;padding:4px 0 10px}.badge-ally-row{display:flex;align-items:center;gap:6px;font-size:13px;color:#ecd9b0}.badge-ally-row select{width:auto}
@media(max-width:1100px){.header-preferences .commander-profile label{display:none}.header-preferences .commander-profile input{width:95px}.header-preferences{gap:6px}body>header{gap:8px}}
@media(max-width:600px){body>header .session{order:4;flex-wrap:wrap;width:100%;justify-content:flex-end}#begin{padding:7px 9px;font-size:11px}#begin kbd{display:none}.header-preferences .commander-profile input{width:100px}.settings-circle{width:34px;height:34px;padding:6px}.brand strong{display:none}#room-settings,#game-settings>.settings-panel{padding:16px}.settings-row{gap:10px}.settings-row select{font-size:11px}}

/* Shared section labels keep unit families together at every column count. */
#deck>.unit-group-title,#manual-roster>.unit-group-title{grid-column:1/-1;margin:9px 0 0;padding:5px 0 2px;border-top:1px solid #46543c;color:#c8bc94;font-size:10px;font-weight:600;line-height:1.3;letter-spacing:.07em;text-transform:uppercase}
#deck>.unit-group-title:first-child,#manual-roster>.unit-group-title:first-child{margin-top:0;padding-top:0;border-top:0}
body.compact-deck #deck>.unit-group-title{margin-top:5px;padding-top:4px;font-size:9px}
body.compact-deck #deck>.unit-group-title:first-child{margin-top:0;padding-top:0}
@media(min-width:851px){#manual-unit{position:sticky;top:0;align-self:start}}

/* Shared, expandable field reference in the manual and the battle Help panel. */
.guide-topics{margin:20px 0;min-width:0}.guide-topics h3{color:#dfc895;font-size:14px}.guide-topics details{border-bottom:1px solid #46543c;padding:10px 0}.guide-topics summary{cursor:pointer;color:#e5d6b3;font-size:13px;font-weight:600;line-height:1.5}.guide-topics summary:focus-visible{outline:2px solid #edbb63;outline-offset:3px}.guide-topics details p{font-size:12px;line-height:1.65;margin:9px 0 3px;color:#acbba1}.guide-topics details[open]{padding-bottom:14px}
.control-sheet{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0;padding:14px;border:1px solid #526048;border-radius:5px;background:#1d281d;min-width:0}.control-heading{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;gap:8px;border-bottom:1px solid #526048;padding-bottom:8px}.control-heading h3{margin:0;color:#dfc895;font-size:15px}.control-status{font-size:11px;color:#b6c9a9}.control-group h4{color:#dfc895;font-size:12px;margin:0 0 6px}.control-row{display:grid;grid-template-columns:minmax(84px,1fr) minmax(0,2fr);gap:8px;padding:4px 0;border-top:1px solid #354335;font-size:11px;line-height:1.35;color:#b6c9a9}.control-row kbd{align-self:start;justify-self:start;margin:0;white-space:normal;color:#e7d2a1}.control-row.pending{opacity:.65}
#help-controls{grid-template-columns:1fr;margin-top:12px}#help-controls .control-heading{grid-column:auto}
@media(max-width:850px){.control-sheet{grid-template-columns:1fr}.control-heading{grid-column:auto}}
#ping-bar{position:absolute;left:12px;top:10px;z-index:4;display:flex;flex-wrap:wrap;gap:4px;margin:0;padding:4px;background:#141d16d9;border:1px solid #4b5844;border-radius:6px;max-width:calc(100% - 24px)}#ping-bar[hidden],#plan-tools[hidden]{display:none}#plan-tools{display:flex;flex-wrap:wrap;gap:4px;margin:0}#plan-toggle{white-space:nowrap}#ping-bar button{font-size:11px;padding:5px 9px}
.reserves[hidden],#panel-reinforcements #deck[hidden],#panel-reinforcements #training[hidden],#panel-reinforcements #requisition-help[hidden],#panel-reinforcements .training-label[hidden]{display:none}.reserve-grade{display:flex;gap:6px;align-items:center;margin:0 0 5px}.reserve-grade[hidden]{display:none}.reserve-grade select{flex:1;min-width:0}#reserve-list{display:grid;gap:4px}#reserve-list button{display:grid;grid-template-columns:1fr auto;gap:2px 8px;text-align:left;padding:6px 9px}#reserve-list b{font-size:11px}#reserve-list strong{font-size:10px;color:#edbb63;align-self:center}#reserve-list small{grid-column:1/-1;font-size:9px;color:#9fb08f}#reserve-status{margin:6px 0 0;min-height:14px}

#sight-status { position:absolute; bottom:80px; left:50%; transform:translateX(-50%); max-width:85%; padding:8px 12px; z-index:40; color:#dff6ff; background:#142932ed; border:1px solid #7fd4f0; border-radius:5px; font-size:12px; pointer-events:none; text-align:center; }
/* Practice is visibly distinct even when its editor panel is closed. */
#practice-status{position:absolute;top:8px;left:8px;right:8px;z-index:6;padding:7px 10px;border:1px solid #edbb63;border-radius:4px;background:#1d281cf0;color:#f2e6c4;font-size:11px;text-align:center;pointer-events:none}
#practice-controls{padding:4px;min-width:0}
#practice-controls fieldset{min-width:0;border:1px solid #506247;padding:8px;margin:8px 0}
#practice-controls legend{font-size:11px;color:#e0ce9e}
#practice-controls label{display:block;margin:5px 0;font-size:11px}
#practice-controls select{width:100%;min-width:0}
#practice-controls .practice-toggle{display:flex;align-items:center;gap:6px}
#practice-controls input[type=checkbox]{width:auto;margin:0}
.practice-row{display:flex;gap:5px;flex-wrap:wrap;margin:5px 0}
.practice-row>*{flex:1;min-width:70px}
#practice-controls button{font-size:11px;padding:6px}
#practice-controls button[aria-pressed=true]{border-color:#edbb63;color:#edbb63}
#practice-controls .small{margin:6px 0}
#practice-controls summary{cursor:pointer;font-size:11px}

body.practice-room #map-caption{top:46px}
body.practice-room #ping-bar{top:67px}

.blast-table{width:100%;border-collapse:collapse;font-size:11px;margin:8px 0}.blast-table caption{text-align:left;padding:4px 0}.blast-table th,.blast-table td{text-align:left;padding:3px 5px;border-bottom:1px solid #465240}.blast-table tr[data-band="red"] td:first-child{color:#f27466}.blast-table tr[data-band="yellow"] td:first-child{color:#f0cd56}.blast-table tr[data-band="grey"] td:first-child{color:#c4cbd0}.blast-results{padding-left:18px;font-size:10px;line-height:1.5;max-height:240px;overflow:auto}.blast-results li{margin:7px 0}.blast-results strong{display:block;color:#e5d3a0}

/* Optional support prototype: stable list rows survive countdown updates. */
#support-prototype{margin-top:12px;border-top:1px solid #506247;padding-top:8px}
#support-prototype h3{font-size:13px;color:#edbb63}
#support-prototype label{display:block;font-size:11px;margin:7px 0}
#support-prototype input[type=checkbox]{width:auto}
#support-prototype select{width:100%}
#support-prototype button{font-size:11px;padding:6px}
.support-list{list-style:none;padding:0;margin:8px 0}
.support-list li{border:1px solid #506247;padding:7px;margin:6px 0}
.support-list strong{font-size:11px;color:#e5d3a0}
/* Co-op tank control lives with the selected crew and the Battle panel. */
.tank-handoff{border-top:1px solid #58614d;margin-top:8px;padding:8px 0;display:flex;align-items:center;flex-wrap:wrap;gap:6px}.tank-handoff p{flex-basis:100%;margin:0 0 4px}.tank-handoff label{font-size:11px}.tank-handoff select{min-width:0;max-width:100%;flex:1}.tank-handoff button{white-space:normal}.tank-crew-row{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.tank-crew-row button{white-space:normal;overflow-wrap:anywhere;flex:1}#tank-crews h3{font-size:12px;margin:14px 0 8px}
.tank-handoff[hidden],#tank-crews[hidden]{display:none}

.unit-console .orders #platoon-assignment{grid-column:1/-1;width:100%;margin:0;padding:0 0 6px;border-top:0;border-bottom:1px solid #58614d}#platoon-assignment small{flex-basis:100%;font-size:10px;line-height:1.3}#platoon-assignment button{flex:2}#platoon-assignment select{flex:1;min-width:70px}
.unit-console .orders #tank-handoff{grid-column:1/-1;width:100%}.tank-handoff select{padding:6px;font-size:11px}

/* Command-post attachments separate current control from retained ownership. */
.tank-command-post{border:1px solid #4c5b43;border-radius:5px;margin:10px 0;padding:8px;background:#1b251d;min-width:0}.tank-command-post header{height:auto;min-height:0;padding:4px 0;background:transparent;border:0;display:flex;justify-content:space-between;gap:6px;font-size:11px;overflow-wrap:anywhere}.tank-command-post header small{color:#a9b69b;font-size:10px}.tank-command-post .tank-crew-row{position:relative;margin:8px 0 0 10px;border-left:2px solid #8a9b6b;padding-left:6px;gap:4px}.tank-command-post .tank-tile{display:flex;align-items:center;gap:6px;text-align:left;min-width:0;flex:1 1 140px;padding:6px}.tank-tile>span:last-child{min-width:0}.tank-tile b,.tank-tile small{display:block;font-size:10px}.tank-tile small{font-size:9px;color:#afbea2;margin-top:3px}.tank-tile .roster-symbol{flex:0 0 32px;width:32px;height:24px}.tank-tile[draggable=true]{cursor:grab}.tank-command-post .tank-transfer{flex:0 1 auto;font-size:10px;padding:5px}.tank-ghost{border-left-style:dashed!important}.tank-ghost .tank-tile{opacity:.6;border-style:dashed}.tank-drop-target{outline:2px dashed #edbb63;background:#303b26}.tank-move-here{width:100%;margin-top:8px;color:#edbb63;border-style:dashed;font-size:11px}#players[hidden]{display:none}

.manual-unit-intro{min-width:0;flex:1}.manual-unit-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.manual-unit-title h2{overflow-wrap:anywhere}.manual-reference{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:10px}.manual-reference label{font-size:11px;display:flex;align-items:center;gap:5px;white-space:nowrap;flex-shrink:0}.manual-reference input{margin:0;width:auto}.manual-loadout{border-top:1px solid #46543c;margin:16px 0;padding-top:10px}.manual-loadout h3{font-size:13px;color:#edbb63;margin:0 0 8px}.manual-loadout dl{margin:0}.manual-loadout dl>div{display:grid;grid-template-columns:minmax(100px,.7fr) minmax(0,1.3fr);gap:12px;padding:6px 0;border-bottom:1px solid #2b3b2a}.manual-loadout dt{font-size:11px;color:#a8b69b}.manual-loadout dd{font-size:12px;color:#e6d7ad;margin:0}#manual-roster .unit-map-icon{width:28px;height:28px}.combat-ranges{margin:5px 0;color:#dfc895}

.manual-matchup-army th{font-size:11px;font-weight:600;color:#edbb63;padding-top:14px;padding-bottom:7px}.manual-matchups tbody+tbody .manual-matchup-army th{border-top:8px solid #1a281e}

/* Campaign operation desk: redraws only when campaign state or selection changes. */
#operation-desk{position:fixed;inset:0;z-index:80;overflow:auto;background:#111b17f5;padding:24px;color:#e9eadb}
#operation-desk .operation-shell{max-width:1380px;margin:auto;padding:24px;background:#202b24;border:1px solid #59644d;border-radius:8px}
#operation-desk .operation-shell header,.operation-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
#operation-desk .operation-shell h1{margin:6px 0;font-size:30px}#operation-desk .operation-shell h2{font-size:16px;color:#e4ce99}#operation-desk .operation-shell p{color:#c2cbb9}
.operation-toolbar{border-top:1px solid #4c5948;border-bottom:1px solid #4c5948;padding:12px 0;margin:16px 0}.operation-toolbar p{flex:1;margin:0;min-width:220px}
.operation-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px}#operation-map{display:block;width:100%;border:1px solid #a0a279;border-radius:4px;background:#78815a}
.operation-place{font:bold 19px Georgia,serif;fill:#303d32}.operation-caption{font:10px system-ui,sans-serif;fill:#4c5240}.operation-map-heading{font:600 10px system-ui,sans-serif;fill:#46513e;letter-spacing:.12em}.operation-map-note{font:9px system-ui,sans-serif;fill:#505943}.operation-counter{cursor:pointer}.operation-counter-caption{font:8px system-ui,sans-serif;fill:#f1e9cf}.operation-report-mark{font:bold 12px system-ui,sans-serif;fill:#ffd5a2}.operation-counter:focus{outline:none}.operation-counter:focus>rect{stroke:#ad741b;stroke-width:3}.operation-sector{cursor:pointer}.operation-sector:focus{outline:none}.operation-sector:focus polygon{stroke:#6a5225;stroke-width:3}
.operation-force{display:flex;flex-direction:column;gap:5px;text-align:left;width:100%;padding:11px;margin-bottom:8px;background:#2c3b31;border:1px solid #596b55}.operation-force.selected{border-color:#b9dcea;background:#385244}.operation-force small{line-height:1.4;color:#c4cdb8}.operation-force span{font-size:12px;color:#e1d1a9}
#operation-territory{width:100%;height:auto;border:1px solid #667657}#operation-sector-info{font-size:12px;line-height:1.6}
#operation-battles{display:flex;gap:8px;flex-wrap:wrap}.operation-battle{border-color:#d5b568;padding:12px;background:#4c452e}
#operation-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:14px 0}.operation-team{display:flex;flex-direction:column;gap:10px;padding:14px;background:#17231d;border:1px solid #435440}.operation-team span{font-size:12px;color:#c2cbb9}.operation-team button{margin-top:auto}
#operation-feedback{min-height:24px;color:#edcf8f}#operation-desk .operation-shell details{padding:12px 0;border-top:1px solid #445341}#operation-desk .operation-shell summary{cursor:pointer;color:#e0d2ab}#operation-log{line-height:1.7;font-size:13px}
@media(max-width:850px){#operation-desk{padding:8px}#operation-desk .operation-shell{padding:12px}.operation-layout{grid-template-columns:1fr}.operation-layout aside{display:grid;grid-template-columns:1fr 1fr;gap:12px}.operation-layout aside h2{grid-column:1/-1}}

#operation-desk .operation-shell header{height:auto;min-height:0;padding:0 0 12px;background:transparent;border:0;align-items:flex-start}#operation-desk .operation-shell header p{margin:0}

#operation-report{padding:16px;margin:16px 0;background:#19251d;border:1px solid #718062;border-radius:4px}#operation-report h2{margin-top:0;color:#edd6a1}.operation-report-body{display:grid;grid-template-columns:minmax(300px,1fr) minmax(260px,1fr);gap:20px}.operation-report-maps{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-content:start}.operation-report-maps figure{margin:0}.operation-report-maps canvas{width:100%;height:auto;border:1px solid #718062}.operation-report-maps figcaption{font-size:12px;color:#c2cbb9;margin-top:6px}#operation-report p,#operation-report li{font-size:13px;line-height:1.5}#operation-report p:first-child{margin-top:0}
@media(max-width:850px){.operation-report-body{grid-template-columns:1fr}}

/* Campaign platoons remain visible beneath the tactical map. */
#force-roster.platoon-roster,body.compact-deck #force-roster.platoon-roster,body:is([data-battle-layout="split"],[data-battle-layout="rails"]) #force-roster.platoon-roster{display:flex;flex-direction:column;gap:10px}.force-platoon{width:100%;border-top:1px solid #53614a;padding-top:5px;min-width:0}#force-roster .platoon-select,body.compact-deck #force-roster .platoon-select{display:block;width:100%;height:auto;padding:4px 0;text-align:left;border:0;background:transparent;box-shadow:none;color:#e3c78d;font:11px 'Segoe UI',sans-serif;white-space:normal}.platoon-condition{display:block;color:#aebc9d;font-size:10px;margin:2px 0 6px}.platoon-teams{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.operation-contact{width:100%;padding:12px;background:#17231d;border:1px solid #697257}.operation-contact h3{margin:0;color:#e3c78d}.operation-lineup{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}.operation-lineup label,#operation-platoon-editor label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#dfd4b3}.operation-lineup select,#operation-platoon-editor select{width:100%;min-width:0;max-width:100%}#operation-platoon-editor{padding-top:12px}.requisition[hidden],#fixed-force-note[hidden]{display:none}@media(max-width:850px){.operation-lineup{grid-template-columns:1fr}}

.scenario-list > h3,.scenario-list > p{grid-column:1 / -1;margin:8px 0 2px}

/* Keep the common range workflow above optional editor and diagnostics. */
#practice-explosions{border-top:1px solid #506247;padding-top:8px;margin:10px 0}
#practice-explosions h3{font-size:13px;color:#edbb63;margin:0 0 6px}
#practice-exercise-picker button{width:100%}
#practice-blast-play{border-color:#ad965e;color:#f2d18e}
#practice-aim-status{color:#f2d18e;min-height:2.4em}
#practice-objective{line-height:1.45}
body.practice-aiming #game canvas{cursor:crosshair}
#practice-edit-details{border-top:1px solid #506247;padding-top:10px;margin-top:12px}

.historical-cards{display:contents}

#infantry-at-status, #infantry-at-help { display: block; margin: 4px 0; line-height: 1.4; }
.mortar-mission-controls { grid-column: 1 / -1; padding: 6px 0; }
.mortar-mission-controls > div { display: flex; gap: 4px; flex-wrap: wrap; }
#mortar-mission-status { display: block; font-size: 12px; margin-bottom: 5px; color: #b9d5db; }

#command-status { display: block; font-size: 12px; margin-bottom: 5px; color: #b9d5db; }
#command-help { display: block; margin-bottom: 6px; line-height: 1.4; }

#mortar-mission-status, #mortar-mission-controls > small { display: block; margin-top: 5px; }
/* Between-battle setup: controls fit the dialog and hidden scenario rows stay hidden. */
#room-settings .setup-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#room-settings .setup-pair>div{min-width:0}#room-settings label{display:block;margin:12px 0 5px}#room-settings select{width:100%;max-width:100%}#room-settings [hidden]{display:none}#room-settings p{line-height:1.5}#room-settings .small{color:#a8b69d}#room-settings #next-apply{margin-top:8px}@media(max-width:600px){#room-settings .setup-pair{grid-template-columns:minmax(0,1fr)}}

#umpire-panel{position:absolute;top:18px;left:18px;z-index:4;width:min(370px,calc(100% - 36px));max-height:55%;overflow:auto;padding:10px 12px;background:#17251fec;border:1px solid #b9baa6;border-radius:5px;font-size:12px;color:#e8e6d8}#umpire-panel[hidden],#umpire-report[hidden]{display:none}#umpire-panel p{line-height:1.5}#umpire-panel button{margin:8px 0;max-width:100%;white-space:normal}#umpire-panel label{display:block;font-size:11px}#umpire-panel input{width:auto}#umpire-report{padding:12px;border:1px solid #bfc2b0;background:#26372d;border-radius:5px;max-height:45vh;overflow:auto}#umpire-report h3{margin-top:0;color:#f0dfb4}#umpire-report p{font-size:12px;line-height:1.5}

#match-overlay[data-report="umpire"] .briefing{pointer-events:auto;width:min(780px,100%);max-width:none}#umpire-report{pointer-events:auto}

#ace-vehicles{margin:12px 0;padding:10px;border:1px solid #637752;border-radius:5px;background:#243125}
#ace-briefing{margin:12px 0;padding:10px;border:1px solid #637752;border-radius:5px;background:#243125}
#ace-briefing[hidden]{display:none}
#ace-briefing h3{margin:0 0 6px;color:#e3c78d;font-size:13px}
#ace-briefing p{margin:6px 0;line-height:1.4}
#ace-briefing details{margin-top:8px}
#ace-briefing summary{cursor:pointer;color:#e3c78d}
#ace-briefing ul{max-height:190px;overflow:auto;margin:6px 0 0;padding-left:20px;font-size:11px;line-height:1.5}
#enemy-contact{margin:12px 0;padding:10px;border:1px solid #945a53;border-radius:5px;background:#352822;color:#dfd4c2}
#enemy-contact[hidden]{display:none}
#enemy-contact h3{display:flex;align-items:center;gap:5px;margin:0 0 6px;color:#eea999;font-size:11px;letter-spacing:.06em}
#enemy-contact strong{display:block;color:#f3e1ca;font-size:13px}
#enemy-contact p{margin:6px 0;font-size:11px;line-height:1.4}
#enemy-contact small{color:#b9aa9e;line-height:1.4}
#ace-vehicles[hidden]{display:none}
/* Battle sector Ace trade-out desk (owner mockup v2, 2026-11-22) */
#ace-trade{margin:12px 0;padding:8px;border:1px solid #637752;border-radius:5px;background:#1d281f}
#ace-trade[hidden]{display:none}
/* Battle sector Ace requests (owner ping_system.txt): a second bar under the ping bar, no plate, 50% buttons. */
#request-bar{position:absolute;left:12px;top:48px;z-index:4;display:flex;flex-wrap:wrap;gap:4px;max-width:calc(100% - 24px)}
#request-bar[hidden],#request-tools[hidden]{display:none}
/* Same size as the Pings bar when open: no .orders margins (playtest 2026-11-22). */
#request-bar,#request-tools{margin:0}
#request-tools{display:flex;flex-wrap:wrap;gap:4px}
#request-bar button{background:#202b2280;border:1px solid #5d6b5588;color:#eef1e4;text-shadow:0 0 2px #000;position:relative}
#request-bar button.active{border-color:#e0b25e}
#request-bar button[data-wait]::after{content:attr(data-wait);position:absolute;right:-4px;top:-7px;font:10px Consolas,monospace;background:#0b120ccc;border-radius:6px;padding:0 4px;color:#e9d9a8}
/* Battle sector Ace net (mockup v2): commander chat top right with a glass plate and the army flag;
   unit chat bottom right with no plate. Both 3 lines, scroll with the wheel, never fade. */
#ace-com-chat,#ace-unit-chat{position:absolute;right:6px;width:min(412px,42%);z-index:6;display:flex}
#ace-com-chat{top:6px;height:58px;background:#16201840;border:1px solid #53634755;border-radius:5px;backdrop-filter:blur(3px)}
#ace-unit-chat{bottom:6px;height:52px}
#ace-com-chat[hidden],#ace-unit-chat[hidden]{display:none}
#ace-com-flag{flex:none;width:30px;height:19px;margin:6px 4px 0 6px;border-radius:2px;box-shadow:0 0 0 1px #0b120c}
#ace-com-log,#ace-unit-log{flex:1;overflow-y:auto;padding:3px 8px 3px 4px;font-size:12px;line-height:16px;color:#eef3e2;scrollbar-width:thin}
#ace-com-log{scrollbar-color:#e6dbb7aa transparent;text-shadow:0 0 2px #0b120c,0 0 1px #0b120c}
#ace-unit-log{scrollbar-color:#e6dbb780 transparent;text-shadow:0 0 3px #0b120c,0 0 2px #0b120c,0 1px 1px #0b120c}
#ace-com-log .t{color:#9fab95;font:10.5px Consolas,monospace;margin-right:5px}
#ace-com-log b{color:#e9d9a8;font-weight:600}
#ace-unit-log .tag{font:11px Consolas,monospace;color:#c8d6a8;margin-right:4px}
#ace-score-gauge{display:flex;align-items:center;gap:8px;margin:6px 4px}
#ace-score-gauge[hidden]{display:none}
#ace-score-gauge .track{fill:#0b120c88;stroke:#ffffff22;stroke-width:5}
#ace-score-gauge .ring{fill:none;stroke:#f2c879;stroke-width:5;stroke-linecap:round}
#ace-score-gauge text{font:700 12px Consolas,monospace;fill:#f2c879}
.ace-score-text{display:flex;flex-direction:column;font-size:11px;color:#c9cfb7;line-height:14px}
#ace-score-next{color:#9fab95}
.ace-trade-head{display:flex;justify-content:space-between;margin:0 0 6px;color:#c9cfb7;font:10px Consolas,monospace;letter-spacing:.08em;text-transform:uppercase}
#ace-trade-score{color:#f2c879}
#ace-trade-current{margin:0 0 6px;padding:6px 8px;border:1px solid #c79a4e88;border-radius:4px;background:#2a2a1c}
#ace-trade-lock{margin:0 0 6px;padding:5px 8px;border-radius:4px;background:#4a1f1a66;border:1px solid #b5524588;color:#ffb9ab}
#ace-trade-lock[hidden]{display:none}
#ace-trade-list{display:grid;gap:5px}
#ace-trade-list button{display:flex;justify-content:space-between;align-items:center;text-align:left;padding:6px 9px}
#ace-trade-list button .cost{font:600 12px Consolas,monospace;color:#f2c879}
#ace-trade-list button.free .cost{color:#9be29b}
#ace-trade-list button:disabled{opacity:.4}
.ace-trade-foot{margin:8px 0 0;color:#9fab95}
#ace-vehicles h3{margin:0 0 6px;color:#e3c78d;font-size:13px}
#ace-vehicle-list{display:grid;gap:5px}
#ace-vehicle-list button{text-align:left;white-space:normal}
#ace-vehicle-list .ace-vehicle-row{display:flex;gap:5px}
#ace-vehicle-list .ace-vehicle-row button:first-child{flex:1}

/* Setup: compact map, factual force/intel briefing, and one scrollable page. */
body.landing #lobby{align-items:flex-start;overflow:auto}
body.landing #lobby .operation-shell{width:100%;max-width:1320px;height:auto;min-height:100%;max-height:none;display:block;overflow:visible}
body.landing .operation-body{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:22px;overflow:visible;align-items:start}
body.landing .operation-stage,body.landing .briefing-settings,body.landing #field-manual{overflow:visible;scrollbar-gutter:auto}
body.landing .briefing-settings{padding-left:22px}
body.landing #battle-briefing{display:grid;grid-template-columns:minmax(210px,260px) minmax(0,1fr);gap:20px;align-items:start}
.setup-map-hint{display:block;margin-top:6px;font-size:10px;color:#f0d09a}.briefing-map-column{min-width:0}.briefing-map-column>.eyebrow{display:block;margin:0 0 10px}
.operation-shell #expand-setup-map{display:block;width:100%;min-width:0;padding:0;text-align:left;cursor:zoom-in}
.operation-shell #expand-setup-map:hover,.operation-shell #expand-setup-map:focus-visible{outline:2px solid #e7bb70;outline-offset:2px}
body.landing #setup-map,body.landing .operation-shell[data-category='scenarios'] #setup-map{width:100%;height:auto;aspect-ratio:1.6;object-fit:contain}
.operation-shell .setup-map-key{gap:5px;justify-content:space-around;font-size:8px;padding:5px 3px}
.operation-shell .setup-map-key span{gap:3px}.operation-shell .setup-map-key i{width:7px;height:6px}
#map-preview-note{line-height:1.45;margin:9px 0 0}
.briefing-summary{min-width:0}.briefing-summary .briefing-title{align-items:flex-start}.briefing-summary .briefing-title h2{font-size:23px;line-height:1.2}
.briefing-summary #briefing-objective{min-height:0;margin:4px 0 12px}
.briefing-summary .briefing-facts{grid-template-columns:1fr 1fr;margin:0 0 10px;padding:8px 0}
.briefing-summary .briefing-facts dd{font-size:11px}
.briefing-force{border-bottom:1px solid #4b5844;padding:8px 0}.briefing-force:last-of-type{border-bottom:0}
.briefing-force>.eyebrow{display:block;margin-bottom:5px}.briefing-force>strong{display:block;font-size:12px;color:#f0d09a}
.briefing-force p.small{line-height:1.45;margin:4px 0 0;font-size:11px}
#briefing-divisional-intel>strong{display:block;font-size:11px;color:#f0d09a}#briefing-divisional-intel>.intel-line{display:block}
.briefing-settings .mission-controls{grid-template-columns:1fr 1fr;gap:10px}.briefing-settings .mission-controls>div{min-width:0}.briefing-settings .mission-controls select{width:100%;min-width:0;field-sizing:fixed}
#setup-map-dialog{box-sizing:border-box;width:min(980px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:18px;border:1px solid #72805f;border-radius:8px;color:#d7dfc4;background:#18251e;box-shadow:0 20px 80px #000a}
#setup-map-dialog::backdrop{background:#07110bd9}#setup-map-dialog h2{margin:4px 0 12px;color:#f0d6a4}
#setup-map-expanded{display:block;width:100%;height:auto;aspect-ratio:1.6;object-fit:contain;background:#1d2b21}#setup-map-expanded-note{margin:8px 0 0}
@media(max-width:1180px){body.landing .operation-body{grid-template-columns:1fr}body.landing .briefing-settings{border-left:0;border-top:1px solid #4b5844;padding:18px 0 0}body.landing #battle-briefing{grid-template-columns:minmax(210px,280px) minmax(0,1fr)}}
@media(max-width:640px){body.landing #battle-briefing{grid-template-columns:1fr}.briefing-map-column{max-width:360px}.briefing-settings .mission-controls{grid-template-columns:1fr 1fr}.briefing-title{flex-wrap:wrap}}

body.landing #battle-briefing[hidden],body.landing .operation-body[hidden],body.landing #battle-map-controls[hidden]{display:none}
.operation-shell input[type="checkbox"]{width:auto;min-width:0;margin-right:6px}
body.landing .operation-shell[data-category="campaign"] .operation-body{grid-template-columns:minmax(0,1fr) 390px}
@media(max-width:1180px){body.landing .operation-shell[data-category="campaign"] .operation-body{grid-template-columns:1fr}body.landing .operation-stage,body.landing .briefing-settings{min-height:auto}}

.briefing-launch{display:flex;align-items:center;gap:18px;padding:12px 0 18px}
.rejoin-battle{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;margin:0 0 14px;background:#1a281f;border:1px solid #d0ae6b;border-radius:5px}.rejoin-battle>div{flex:1 1 260px}.rejoin-battle p{margin:4px 0 0;font-size:12px;color:#b9c5aa}
.briefing-launch #create{min-width:240px;padding:13px 18px;font-size:14px}
.briefing-launch #mode-help{margin:0;min-height:0;max-width:640px}
.briefing-launch[hidden]{display:none}
@media(max-width:640px){.briefing-launch{flex-direction:column;align-items:stretch;gap:8px}.briefing-launch #create{width:100%;min-width:0}}
.scenario-navigation{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 6px}.scenario-navigation a{padding:8px 12px;border:1px solid #637752;border-radius:4px;color:#f0d09a;font-size:12px;text-decoration:none}.scenario-navigation a:hover,.scenario-navigation a:focus-visible{background:#454332;outline:1px solid #e7bb70}.scenario-navigation[hidden]{display:none}
body.landing .operation-stage .scenario-list{display:block;margin-top:28px;border-top:1px solid #57634b;padding-top:18px}.scenario-intro h2{font-size:22px;margin:6px 0}.scenario-intro p{margin:5px 0 16px}.scenario-group{margin:20px 0;scroll-margin-top:16px}.scenario-group h3{color:#f0d09a;margin:0 0 6px}.scenario-card-grid,#historical-scenario-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.scenario-list button{min-width:0;white-space:normal}.scenario-list button span{line-height:1.5}.scenario-group>p{margin:0 0 10px}
body.landing .campaign-note{padding:0;min-height:0}.campaign-note>h2{margin:8px 0}.campaign-note>p{max-width:65ch}.campaign-role{padding:12px 14px;background:#1a281f;border:1px solid #637752;border-radius:5px;margin:16px 0}.campaign-role label{margin:0;font-size:12px}.campaign-role p.small{margin:8px 0 0;max-width:none;font-size:11px}
.campaign-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.campaign-entry{padding:18px;border:1px solid #536347;border-radius:5px;background:#1b291f;display:flex;flex-direction:column}.campaign-entry.featured{grid-column:1/-1;border-color:#ae9560}.campaign-entry h3{color:#edcf99;font-size:20px;margin:8px 0}.campaign-entry p{font-size:12px;line-height:1.6;margin:0 0 16px;max-width:none}.campaign-entry button{margin-top:auto;width:100%;white-space:normal}
.operation-shell[data-category="campaign"] #mode,.operation-shell[data-category="campaign"] label[for="mode"],.operation-shell[data-category="campaign"] #enemy-field,.operation-shell[data-category="campaign"] #setup-vs,.operation-shell[data-category="campaign"] label:has(#command-net),.operation-shell[data-category="campaign"] label:has(#command-net)+p{display:none}
@media(max-width:640px){.scenario-card-grid,#historical-scenario-list,.campaign-entry-grid{grid-template-columns:1fr}.campaign-entry.featured{grid-column:auto}.campaign-entry{padding:14px}.scenario-navigation a{flex:1;text-align:center}}

@media(max-width:1180px){body.landing .operation-shell[data-category="scenarios"] .operation-stage{display:contents}body.landing .operation-shell[data-category="scenarios"] #battle-briefing{order:1}body.landing .operation-shell[data-category="scenarios"] .briefing-settings{order:2}body.landing .operation-shell[data-category="scenarios"] #scenario-list{order:3}}
.scenario-intro{height:auto;display:block;padding:0;background:none;border:0}
.ace-command-card{padding:12px;margin:10px 0;border:1px solid #a68c59;border-radius:6px;background:linear-gradient(145deg,#34402b,#17271f)}.ace-command-card[hidden]{display:none}.ace-command-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.ace-command-heading>div{min-width:0}.ace-command-heading h3{font-size:16px;line-height:1.3;color:#efd19a;margin:7px 0}.ace-command-heading button{font-size:11px;white-space:normal;padding:7px 9px;min-width:78px}.ace-command-card #ace-seat-note{line-height:1.5;font-size:11px;color:#c6d3b6}.ace-command-card #ace-briefing{margin:10px 0;padding:10px;border-color:#536c4b;background:#192b21}.ace-command-card #ace-vehicles{margin:10px 0;padding:10px;background:#1a2b21;border-color:#637b50}.ace-command-card .tank-handoff{border-top:1px solid #5e714d;padding-top:10px;margin:10px 0}.ace-command-card .tank-handoff button{font-size:11px;padding:8px}
@media(max-width:540px){.ace-command-card{padding:9px}}
#ace-direct-controls{margin:10px 0;padding:10px;border:1px solid #5d7550;border-radius:4px;background:#18291f}#ace-direct-controls[hidden]{display:none}#ace-direct-controls.active{border-color:#edbb63;background:#343e28}#ace-direct-controls p{font-size:11px;line-height:1.5;color:#c3d0b4;margin:8px 0}#ace-direct-controls label{display:block;font-size:10px;color:#c4d1b2;margin-bottom:5px}#ace-mg-mount{width:100%;font-size:11px;padding:8px}.ace-direct-actions{display:grid;gap:5px;margin:8px 0}#ace-direct-controls button{font-size:11px;padding:8px;text-align:left}

#control-quick{display:flex;gap:6px;padding:0;margin:6px 0 8px;flex:none}#control-quick button{flex:1;min-height:28px;padding:3px 6px;font-size:12px}#control-quick button[aria-pressed="true"]{outline:2px solid #e0bb63;background:#394334}#control-bindings .control-row{display:flex;justify-content:space-between;gap:12px;padding:3px 0}#control-bindings h4{margin:12px 0 4px}#controls-settings .settings-row{flex-wrap:wrap}#controls-settings select{min-width:100px}

#game canvas.camera-dragging{cursor:grabbing!important}#edge-pan-speed{width:110px}#edge-pan-speed-value{display:block;text-align:right;font-variant-numeric:tabular-nums}#ace-follow[aria-pressed="true"]{outline:2px solid #e0bb63;background:#394334}

/* Ace has a vehicle desk; commander panel preferences remain separate. */
body.ace-seat #tank-crews,body.ace-seat .unit-console>.card-heading{display:none}
#ace-vehicle-panel[hidden],#ace-left-patrol[hidden],#unit-card[hidden],#selection-info[hidden],#ace-order-context[hidden],#ace-ammo-note[hidden],#ace-scout-controls[hidden],#ace-direct-controls[hidden],.ace-station[hidden]{display:none!important}
#ace-vehicle-panel{display:grid;grid-template-columns:110px minmax(210px,1fr) minmax(190px,.85fr);gap:10px 16px;min-width:0}
.ace-vehicle-identity{position:relative;grid-row:1/3;background:radial-gradient(ellipse at 50% 25%,#65734a55,transparent 75%);border-right:1px solid #566044;padding-right:10px}
#ace-vehicle-portrait{height:94px;display:flex;align-items:center;justify-content:center}
#ace-vehicle-portrait img,#ace-vehicle-portrait svg{width:100%;height:100%;object-fit:contain}
#ace-player-portrait{width:42px;height:58px;position:absolute;right:4px;top:45px;background:#1a271de8;border:1px solid #a7915d;border-radius:4px;overflow:hidden}
#ace-player-portrait img,#ace-player-portrait svg{width:100%;height:100%;object-fit:contain}
#ace-vehicle-name{font-size:17px;color:#f0d49a;margin:7px 0}#ace-vehicle-condition{font-size:10px;line-height:1.5;color:#bbc5a9}
.ace-weapon-board{grid-column:2;grid-row:1}
.ace-weapon-board h3,.ace-crew-board h3{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#e8c47e;margin:0 0 8px}
.ace-station{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,1fr);column-gap:8px;padding:4px 0;border-bottom:1px solid #45523c;font-size:11px}
.ace-station strong{color:#e6d8b2}.ace-station-role{grid-column:1;color:#99aa8e;font-size:9px}.ace-weapon-state{grid-column:2;grid-row:1/3;color:#e2c67d;align-self:center;text-align:right}
#ace-mg-stations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 8px}
#ace-mg-stations .ace-station{grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:3px 0;font-size:10px}
#ace-mg-stations .ace-weapon-state{font-size:9px;overflow-wrap:anywhere}
#ace-main-progress{grid-column:1/-1;width:100%;height:5px;margin-top:5px;accent-color:#d9b66a}
#ace-ammo-reserve{font-size:12px;color:#e9cf95;margin:9px 0 4px}#ace-special-rounds{margin:3px 0}
.ace-shell-label{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:10px}#ace-shell-buttons{display:flex;gap:4px;flex-wrap:wrap}#ace-shell-buttons button{font-size:10px;padding:5px 7px}#ace-shell-buttons button[aria-pressed="true"]{background:#75643b;border-color:#d4b56b;color:#fff0be}#ace-ammo-keys{display:block;font-size:9px;line-height:1.5;color:#abb99a;margin-top:5px}
#ace-ammo-note{display:block;color:#9aa98f;font-size:9px;line-height:1.5;margin-top:5px}
.ace-crew-board{grid-column:2/4;grid-row:2;display:grid;grid-template-columns:1fr 1fr 1fr;gap:2px 8px}
.ace-crew-board h3{grid-column:1/-1;font-size:9px;margin:0}.ace-crew-board p{font-size:10px;line-height:1.5;margin:0}
#ace-crew-morale{font-weight:bold;color:#d9c584}.ace-crew-board label{grid-column:3;grid-row:3;display:flex;justify-content:space-between;font-size:9px}
.ace-crew-board meter{grid-column:3;grid-row:4;width:100%;height:6px;margin:0}#ace-crew-control{grid-column:1/3}#ace-crew-activity{grid-column:1}#ace-armor-status{grid-column:2/4}
.ace-crew-condition{grid-column:1/-1;grid-row:2;min-width:0}
#ace-crew-seats{display:flex;flex-wrap:wrap;gap:3px 10px;list-style:none;margin:0;padding:0}
#ace-crew-seats[hidden]{display:none}
#ace-crew-seats li{display:flex;align-items:center;gap:5px;font-size:11px;line-height:1.5}
.ace-crew-pip{flex:none;width:7px;height:7px;border-radius:50%;background:#3ee05f;box-shadow:0 0 0 1px #e6d8b2}
.ace-crew-pip[data-crew="1"]{background:#ff3b30}
.ace-crew-pip[data-crew="2"]{background:#000}
#ace-part-damage{color:#f0ca7f}
#ace-weapon-control-slot{grid-column:3;grid-row:1;min-width:0}
#ace-weapon-control-slot #ace-direct-controls{margin:0;padding:8px;border:1px solid #62704c;background:#18251c;display:flex;flex-wrap:wrap;align-items:center;align-content:start;gap:6px;font-size:10px}
#ace-weapon-control-slot #ace-direct-status{flex:1 1 100%;font-size:9px}#ace-weapon-control-slot .ace-direct-actions{width:100%;display:flex;gap:5px;flex-wrap:wrap}
#ace-weapon-control-slot .ace-direct-actions button{flex:1 1 100%}#ace-weapon-control-slot button,#ace-weapon-control-slot select{font-size:11px;padding:5px}#ace-weapon-control-slot #ace-direct-order{display:none}
.ace-control-guide{font-size:10px;line-height:1.5}.ace-control-guide summary{cursor:pointer;color:#b7c49f}#ace-weapon-control-slot .ace-control-guide{flex:1 1 100%}#ace-weapon-control-slot .ace-control-guide p{margin:6px 0}
body.ace-seat #command-dock>.unit-console:not(.panel-folded){display:block;overflow:auto}body.ace-seat .unit-console>.orders{display:flex!important;flex-wrap:wrap;gap:4px;margin:0 0 8px!important;max-height:72px;overflow:auto}
body.ace-seat .unit-console>.orders button{font-size:10px;padding:5px}#ace-order-context{flex:1 1 100%;font-size:10px;color:#c8bc91;text-align:center}
body.ace-seat #ace-command{padding:10px}body.ace-seat .ace-command-heading{flex-wrap:wrap}body.ace-seat #ace-command-title{font-size:15px}
#ace-left-patrol{margin-top:auto;padding-top:14px;border-top:1px solid #6c7250}#ace-left-patrol .tank-handoff{display:flex;flex-wrap:wrap;gap:5px;padding:0;border:0}
#ace-left-patrol .tank-handoff p{width:100%;font-size:11px;line-height:1.5}#ace-left-patrol button{font-size:10px;padding:6px;flex:1 1 42%}
#ace-patrol-inspection #unit-card{display:block;margin-top:10px}#ace-patrol-inspection .unit-portrait{width:60px;height:45px;float:left;margin-right:8px}#ace-patrol-inspection .unit-portrait span{display:none}
#ace-patrol-inspection .unit-details{display:block;min-width:0}#ace-patrol-inspection h2{font-size:12px}#ace-patrol-inspection .unit-meters{grid-template-columns:1fr 1fr}
#ace-patrol-inspection .combat-ranges,#ace-patrol-inspection .cover-rating,#ace-patrol-inspection .crew{font-size:10px}#ace-patrol-inspection #selection-info{font-size:10px;line-height:1.5}
@media(max-width:1100px){
 body.ace-seat #ace-vehicle-panel{grid-template-columns:90px minmax(160px,1fr)}body.ace-seat .ace-vehicle-identity{grid-row:1}
 body.ace-seat .ace-weapon-board{grid-column:2;grid-row:1}body.ace-seat .ace-crew-board{grid-column:1/-1;grid-row:2}body.ace-seat #ace-weapon-control-slot{grid-column:1/-1;grid-row:3}body.ace-seat #ace-vehicle-name{font-size:14px}
}

#control-editor[hidden],#control-bind-escape[hidden],#control-show-shared-row[hidden],[data-control-scheme="custom"][hidden]{display:none!important}
#game-settings.controls-editing>.settings-panel{width:min(780px,calc(100vw - 24px))}#game-settings.controls-editing>.settings-panel>.settings-section:not(#controls-settings),#game-settings.controls-editing>.settings-panel>#controls-settings>details{display:none}
.control-editor-toolbar{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.control-editor-toolbar button{font-size:12px}.control-editor-toolbar select{min-width:110px}
#control-editor{margin-top:15px;padding-top:10px;border-top:1px solid #7d8154}#control-editor>label{display:block;margin-top:10px;font-size:12px}#control-editor-search{width:100%;box-sizing:border-box;margin:5px 0}
#control-editor-status{font-size:12px;color:#e5d29e}#control-editor-status[data-error="true"],#control-editor-errors{color:#f4b090}#control-editor-errors,#control-editor-warnings{white-space:pre-line;font-size:12px}
.control-editor-overlaps{font-size:11px;line-height:1.5;margin:8px 0;color:#b7c2a5}.control-editor-overlaps summary{cursor:pointer}
#control-editor-list{max-height:38vh;overflow:auto;border-top:1px solid #536247;border-bottom:1px solid #536247;padding:4px 0}
.control-edit-row{display:grid;grid-template-columns:minmax(120px,1fr) 85px auto auto auto;gap:6px;align-items:center;padding:5px 0}.control-edit-row strong{display:block;font-size:12px}.control-edit-row small{display:block;font-size:10px;color:#a5b595}.control-edit-row button{font-size:11px;padding:5px 7px}.control-edit-row kbd{font-size:11px;text-align:center;overflow-wrap:anywhere}
.control-editor-footer{display:flex;gap:8px;margin:12px 0}#control-quick[data-custom] button{font-size:11px;padding:3px 4px}
@media(max-width:580px){.control-edit-row{grid-template-columns:minmax(100px,1fr) 65px auto auto}.control-edit-row [data-reset-binding]{grid-column:4}.control-editor-toolbar button{font-size:11px}}

#game-settings.controls-editing #controls-settings>.settings-row,#game-settings.controls-editing #controls-settings>h3,#game-settings.controls-editing #control-scheme-note,#game-settings.controls-editing #controls-customize,#game-settings.controls-editing #control-editor>h3,#game-settings.controls-editing #control-editor>p:first-of-type{display:none}
#controls-save-status:empty{display:none}#game-settings.controls-editing #control-editor-list{max-height:32vh}.control-editor-footer{position:sticky;bottom:0;background:#202e24;padding:8px 0;z-index:2}

/* Photo mode changes presentation, never saved panel preferences or room state. */
#photo-toolbar{position:fixed;z-index:300;bottom:16px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:10px 14px;max-width:calc(100vw - 24px);width:max-content;box-sizing:border-box;background:#152219ed;border:1px solid #90a27b;border-radius:8px;box-shadow:0 5px 24px #0008}
#photo-toolbar[hidden]{display:none}#photo-toolbar label{display:flex;gap:6px;align-items:center}#photo-toolbar small,#photo-status{flex-basis:100%;text-align:center}#photo-status:empty{display:none}
body.photo-clean main{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;display:block!important;padding:0!important;margin:0!important}
body.photo-clean #battlefield,body.photo-clean #game{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border:0!important}
body.photo-clean>header,body.photo-clean>footer,body.photo-clean #command-dock,body.photo-clean #battlefield>:not(#game),body.photo-clean .panel-pull-tab,body.photo-clean .side-panel-resizer{display:none!important}

/* Orders are plotted in the desk and committed by the existing Execute action. */
#operation-orders{margin:14px 0;padding:12px;border:1px solid #54614d;border-radius:4px;background:#17221b}.operation-orders-header,.operation-orders-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.operation-orders-header h2{margin:0}.operation-orders-header span,.operation-orders-footer small{font-size:11px;color:#b3c3aa}.operation-order-list{display:grid;gap:6px;margin:10px 0}.operation-order-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(160px,2fr) auto;gap:10px;align-items:center;padding:8px;background:#243329}.operation-order-row strong,.operation-order-row small{display:block}.operation-order-row strong{font-size:12px;color:#e6d8b7}.operation-order-row small{font-size:10px;line-height:1.4;color:#a9baa1}.operation-order-row button{padding:6px 8px;font-size:11px}.operation-order-select{text-align:left}.operation-order-row[data-order="attack"] strong{color:#f5c47b}.operation-order-row[data-order="prepared"] strong{color:#c6d6a8}@media(max-width:650px){.operation-order-row{grid-template-columns:minmax(0,1fr) auto}.operation-order-row>div{grid-column:1/-1;grid-row:2}}

.operation-mission-brief{margin:10px 0;padding:12px;border-left:3px solid #b79b61;background:#1b291f}.operation-mission-brief p{margin:6px 0;font-size:12px;line-height:1.5}

/* The campaign desk shares navigation and saved commands; each route keeps its own setup. */
.campaign-intro{margin:8px 0 12px}.campaign-entry-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.campaign-entry.featured{grid-column:auto}.campaign-entry{padding:14px}.campaign-entry p{margin-bottom:12px}.campaign-entry h3{margin:6px 0;font-size:22px}.campaign-entry-actions{margin-top:auto;padding-top:12px;display:grid;gap:6px}.campaign-entry-actions button{margin:0;font-size:12px}.campaign-route-tag{font-size:11px;color:#b9c6ac}.campaign-role{margin:12px 0;padding:10px 12px}.campaign-role p.small{margin-top:5px;line-height:1.4}.campaign-recent{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.campaign-saved-command{text-align:left;min-width:0;padding:9px;background:#263c30;border:1px solid #637d64}.campaign-saved-command strong,.campaign-saved-command span,.campaign-saved-command small{display:block;overflow-wrap:anywhere}.campaign-saved-command strong{font-size:12px}.campaign-saved-command span,.campaign-saved-command small{font-size:10px;color:#c4cbb8;margin-top:3px}#campaign-resume h3{font-size:13px;margin:8px 0}#campaign-more{font-size:11px;margin-top:6px}
.operation-shell[data-category="campaign"] .briefing-settings label[for="mode"],.operation-shell[data-category="campaign"] #mode,.operation-shell[data-category="campaign"] #command-net-label,.operation-shell[data-category="campaign"] #command-net-note,.operation-shell[data-category="campaign"] .join-block{display:none}
@media(max-width:1000px){.campaign-entry-grid{grid-template-columns:1fr}.campaign-entry{display:grid;grid-template-columns:minmax(0,1fr) 190px;column-gap:16px}.campaign-entry>.eyebrow,.campaign-entry>h3,.campaign-entry>p,.campaign-entry>.campaign-route-tag{grid-column:1}.campaign-entry>.campaign-entry-actions{grid-column:2;grid-row:1/6;align-self:center;padding-top:0}.campaign-entry>label,.campaign-entry>select{grid-column:1}.campaign-recent{grid-template-columns:1fr}}
@media(max-width:640px){.campaign-entry{display:flex}.campaign-entry-actions{margin-top:4px}.campaign-entry h3{font-size:20px}.campaign-entry p{font-size:11px}.campaign-recent{grid-template-columns:1fr}.campaign-saved-command small{display:none}}

.campaign-entry-actions{margin-top:0;padding:4px 0 12px}.campaign-entry-actions button{min-height:34px}

@media(max-width:640px){.campaign-entry>.campaign-entry-actions{align-self:stretch;width:100%}.campaign-entry-actions button{min-height:44px}}
.operation-counter[data-team="0"]{cursor:grab;touch-action:none;user-select:none}.operation-counter.dragging{opacity:.3;cursor:grabbing}.operation-drag-ghost{opacity:.85;cursor:grabbing}.operation-sector[data-drop-available="true"] polygon{stroke:#477b87;stroke-width:2}.operation-sector[data-drop-available="false"] polygon{fill-opacity:.06}.operation-sector[data-drop-state="valid"] polygon{fill:#6195a6;fill-opacity:.3;stroke:#285971;stroke-width:3}.operation-sector[data-drop-state="invalid"] polygon{fill:#a66a53;fill-opacity:.3;stroke:#934c36;stroke-width:3}

#operation-map[data-counter-drag="true"]{touch-action:pinch-zoom}
.operation-recon-contact{padding:12px;margin:8px 0;border:1px solid #6d8969;background:#203025}.operation-recon-contact p{margin:6px 0}.operation-recon-contact button{margin:4px 8px 4px 0}

.operation-place{paint-order:stroke;stroke:#d9cba8;stroke-width:3px;stroke-linejoin:round;pointer-events:none}.operation-place.staged{font-size:15px}

/* Hover target preview: range, hit chance, penetration chance. */
.target-preview { position: fixed; z-index: 40; pointer-events: none; display: flex; flex-direction: column; gap: 2px;
  padding: 6px 8px; min-width: 150px; background: #1b221aee; border: 1px solid #6d7a58; border-radius: 3px;
  box-shadow: 0 4px 14px #0008; font: 11px/1.35 "Segoe UI", system-ui, sans-serif; color: #dfe6cf; }
.target-preview[hidden] { display: none; }
.target-preview b { color: #9fb079; font-weight: 600; letter-spacing: .04em; }
.target-preview span { display: flex; justify-content: space-between; gap: 12px; }
.target-preview .combined { border-top: 1px solid #4b5642; margin-top: 3px; padding: 3px 0 1px;
  background: linear-gradient(#ffd47910, #ffd47900); }
.target-preview .combined b { color: #ffd479; font-weight: 700; letter-spacing: .08em; }
.target-preview .combined strong { color: #ffe0a0; font-weight: 700; text-shadow: 0 0 8px #ffb73344; }
.target-preview small { color: #b8c1ac; font-size: 10px; }

/* Supporting rows sit a step down: the plate odds, the faces they split across and
   the per-round line are reference, not the answer. The plate block reads as one
   group -- same size, same colour, labels set in from the edge. */
.target-preview .plate-line { font-size: 9px; color: #a6b492; }
.target-preview .plate-line b { color: #8b9d76; font-size: 9px; }
.target-preview .plate { color: #a6b492; font-size: 9px; }
.target-preview .plate b { color: #8b9d76; font-size: 9px; }
.target-preview .rounds { display: block; color: #a6b492; font-size: 9px; }
.target-preview .rounds b { color: #8b9d76; font-size: 9px; }
.target-preview .note { color: #8b9581; font-size: 9px; }

#operation-ace-assignment{width:100%;min-width:0;max-width:100%}

/* Setup reads top-down: who plays and Begin, then the armies, AI, pace and period, then the
   briefing whose heading picks the mission and whose tag picks the battlefield. */
.setup-field{display:flex;flex-direction:column;min-width:0;max-width:100%}
.operation-shell .setup-field>label{margin:0 0 5px}
.operation-shell .briefing-launch{flex-wrap:wrap;align-items:flex-end;gap:10px 14px;padding:4px 0 16px}
.briefing-launch #mode-help{flex:1 1 260px;align-self:center}
.operation-shell .briefing-launch select,.operation-shell .setup-line select{width:auto;max-width:100%;field-sizing:content;min-width:120px}
/* Setup selectors match the Begin battle button's height; its label fills the button. */
.operation-shell .briefing-launch select,.operation-shell .setup-line select{box-sizing:border-box;height:47px;font-size:14px}
.briefing-launch #create{box-sizing:border-box;height:47px;padding:0 22px;font-size:18px}
.setup-line{padding:0 0 16px;margin:0 0 18px;border-bottom:1px solid #4b5844}
.setup-line-fields{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 14px}
.setup-vs{padding:0 0 11px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#a3b093}
#pace-field{padding-left:14px;border-left:1px solid #4b5844}
.operation-shell .setup-line #briefing-pace{margin:10px 0 0;font-size:11px;line-height:1.5;color:#a5b599;max-width:90ch}
.briefing-heading{margin:5px 0 9px;font-size:23px;line-height:1.2}
.operation-shell .title-select{width:auto;max-width:100%;field-sizing:content;min-width:0;padding:1px 4px 3px 0;font-size:23px;font-weight:700;color:#efe6cc;background-color:transparent;border:0;border-bottom:1px dashed #788069;border-radius:0;cursor:pointer}
.operation-shell .tag-select{width:auto;max-width:100%;field-sizing:content;min-width:0;padding:6px 8px;font-size:10px;letter-spacing:.06em;color:#b8c49f;background-color:transparent;border:1px solid #59664d;border-radius:0;cursor:pointer}
.operation-shell .title-select:hover,.operation-shell .tag-select:hover{border-color:#e7bb70;color:#f0d09a}
.operation-shell .title-select:focus-visible,.operation-shell .tag-select:focus-visible{outline:2px solid #e7bb70;outline-offset:2px}
.title-select option,.tag-select option{font-size:13px;font-weight:400;letter-spacing:0;color:#e5e9da;background:#162019}
.briefing-summary .briefing-title{flex-wrap:wrap;row-gap:4px}.briefing-summary .briefing-title>div:first-child{flex:1 1 280px;min-width:0}
.tag-field,.briefing-summary .briefing-tag{flex:0 0 auto;max-width:100%}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
/* Locked settings stay readable; a padlock and the tooltip explain why they cannot change here. */
.setup-field[data-locked] select{color:#c9cdb8;background-color:#1b261f;border-style:dashed;cursor:not-allowed;opacity:1}
.operation-shell label[data-locked]{cursor:not-allowed;color:#9aa78c}
.setup-field[data-locked]>label::after,.operation-shell label[data-locked]::after,.briefing-tag[data-locked]::before{content:"";display:inline-block;width:9px;height:10px;vertical-align:-1px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2 5V3.5a3 3 0 0 1 6 0V5h1v7H1V5Zm1.5 0h3V3.5a1.5 1.5 0 0 0-3 0Z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M2 5V3.5a3 3 0 0 1 6 0V5h1v7H1V5Zm1.5 0h3V3.5a1.5 1.5 0 0 0-3 0Z'/%3E%3C/svg%3E") center/contain no-repeat}
.setup-field[data-locked]>label::after,.operation-shell label[data-locked]::after{margin-left:6px}
.briefing-tag[data-locked]::before{margin-right:6px}
@media(max-width:640px){.operation-shell .briefing-launch{flex-direction:row;align-items:flex-end}.briefing-launch #create{flex:1 1 100%}#pace-field{padding-left:0;border-left:0}.setup-vs{display:none}}
/* Unit profiles: the manual's unit card in a dialog, opened from the briefing force, the battle overview and a selected unit's portrait. */
#unit-profile{box-sizing:border-box;width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:16px 18px;border:1px solid #72805f;border-radius:8px;color:#d7dfc4;background:#162019;box-shadow:0 18px 50px #000a}
#unit-profile::backdrop{background:#07110bd9}#unit-profile .layout-heading h2{margin:0;color:#f0d6a4;font-size:15px;letter-spacing:.06em}
.unit-profile-body{display:grid;gap:10px;margin-top:10px}.unit-profile-body .manual-matchups{width:100%}
.briefing-unit{display:inline;margin:0;padding:0 1px;border:0;border-bottom:1px dotted #c9a76a;border-radius:0;background:none;color:#e7d3a6;font:inherit;line-height:inherit;cursor:pointer}
.briefing-unit:hover{color:#f7d28b;border-bottom-style:solid}.briefing-unit:focus-visible{outline:2px solid #edbb63;outline-offset:1px}
button.unit-portrait{padding:0;color:inherit;font:inherit;cursor:pointer}button.unit-portrait:hover{border-color:#a99560}button.unit-portrait:focus-visible{outline:2px solid #edbb63;outline-offset:-2px}
.unit-overview-panel{margin:8px 0}.unit-overview-panel summary{cursor:pointer;font-weight:600;color:#f0d6a4}
.unit-overview-army h4{margin:10px 0 6px;font-size:11px;letter-spacing:.08em;color:#c6b78f;text-transform:uppercase}
.unit-overview-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
.unit-overview-unit{display:grid;grid-template-columns:44px minmax(0,1fr);gap:6px;align-items:center;min-width:0;padding:5px;text-align:left}
.unit-overview-unit img,.unit-overview-unit svg{width:44px;height:38px;object-fit:contain}
.unit-overview-unit strong{display:block;font-size:11px}.unit-overview-unit small{display:block;font-size:10px;color:#9fb193;margin-top:2px}
.unit-profile-open{display:inline-grid;place-items:center;width:17px;height:17px;margin-left:6px;padding:0;border:1px solid #8a8a5c;border-radius:50%;background:#262f22;color:#e3d7a6;font:italic 700 11px/1 Georgia,serif;vertical-align:2px;cursor:pointer}.unit-profile-open:hover{border-color:#a99560;color:#f0e6c0}.unit-profile-open:focus-visible{outline:2px solid #edbb63;outline-offset:1px}
/* The campaign desk keeps its launch cards above a 720p fold (#desk checks): the
   new-command note belongs with the new-campaign settings, and the page title
   already names the desk. */
#campaign-setup-note{margin:6px 0 12px}#campaign-note>.eyebrow{display:none}#campaign-note>h2{margin-top:0}#campaign-note .campaign-intro{margin:6px 0 10px}#campaign-note .campaign-role{margin:8px 0;padding:8px 12px}
@media(min-width:1001px) and (max-height:800px){#campaign-note .campaign-intro{display:none}}
/* A 720p Ace desk keeps the crew state above the console fold. On short
   screens the two standing-order buttons share a row under Auto weapons and
   the ammunition lines sit closer; no readout is removed. */
@media(max-height:760px){#ace-weapon-control-slot .ace-direct-actions button:not(#ace-auto-weapons){flex:1 1 40%}body.ace-seat .ace-weapon-board h3{margin-bottom:4px}body.ace-seat #ace-ammo-reserve{margin:4px 0 2px}body.ace-seat #ace-special-rounds{margin:0}body.ace-seat #ace-ammo-note{margin-top:2px}}
@media(min-width:901px){
  body.ace-seat .ace-crew-board{grid-column:1/-1;grid-row:1}
  body.ace-seat .ace-vehicle-identity{grid-column:1;grid-row:2/4}
  body.ace-seat .ace-weapon-board,body.ace-seat #ace-weapon-control-slot{grid-row:2}
}
.ace-camera-preview{position:absolute;inset:0;z-index:4;pointer-events:none;background:#a3b0a6;color:#f5edce;font-family:Consolas,monospace;overflow:hidden}
.ace-camera-preview[hidden]{display:none}
.ace-camera-preview canvas{width:100%;height:100%;display:block;pointer-events:none}
#game.ace-camera-active>canvas{opacity:0}
.ace-camera-bar{position:absolute;top:16px;left:88px;right:18px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;letter-spacing:1.5px;text-shadow:0 1px 3px #000}
.ace-camera-choices{display:flex;gap:5px;pointer-events:auto;letter-spacing:normal}
.ace-camera-choices button{font-size:12px;padding:7px 10px;background:#15231edb;border:1px solid #9ba88a;color:#f3ecd2}
.ace-camera-choices button[aria-pressed="true"]{border-color:#efd39a;background:#4b543be8}
.ace-camera-status{position:absolute;top:64px;left:18px;font-size:11px;letter-spacing:1px;text-shadow:0 1px 3px #000}
.ace-camera-instructions{position:absolute;bottom:18px;left:18px;right:18px;text-align:center;font-size:11px;text-shadow:0 1px 3px #000;background:#17241cb8;padding:8px}
.ace-camera-reticle{position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%);border:1px solid #e3dfb8b0;border-radius:50%;box-shadow:0 0 0 1px #17231b80}
.ace-camera-reticle:before,.ace-camera-reticle:after{content:"";position:absolute;background:#e8e0b8;box-shadow:0 0 2px #17231b}
.ace-camera-reticle:before{left:21px;top:-8px;width:1px;height:60px}.ace-camera-reticle:after{left:-8px;top:21px;width:60px;height:1px}
.ace-camera-preview[data-mode="chase"] .ace-camera-reticle{display:none}
.ace-camera-preview[data-mode="binoculars"]:after{content:"";position:absolute;inset:0;z-index:1;box-shadow:inset 0 0 0 35px #101910bc,inset 0 0 100px 45px #101910;pointer-events:none}
/* Controls, text and the aim reticle sit above the binocular mask so they stay readable. */
.ace-camera-bar,.ace-camera-status,.ace-camera-instructions,.ace-camera-reticle{z-index:2}
.ace-camera-reticle.held{border-color:#f0c470;box-shadow:0 0 0 1px #17231b80,0 0 6px #f0c47080}
.ace-camera-reticle[hidden]{display:none}
/* Roster feedback (owner design, 2026-11-10): blue buttons; a spotted pip (black, white when
   spotted) ringed by main-gun ammunition (green >80%, amber, red, black when empty); crew dots
   under a vehicle's short name; the name's colour follows hull + critical-part condition. */
#force-roster button[data-unit],body.compact-deck #force-roster button[data-unit]{position:relative;background:linear-gradient(#1560c0,#0f4fa3);border-color:#4f93e6;color:#f4f7fb}
#force-roster button[data-unit]:hover{background:linear-gradient(#1b6ed8,#1259b5);border-color:#8fbcf2}
#force-roster button[data-unit].active,body.compact-deck #force-roster button[data-unit].active{background:linear-gradient(#2a78d8,#1a5cb0);border-color:#e5c17e;box-shadow:inset 0 0 0 1px #e6c17b60;color:#fff}
#force-roster button[data-unit][data-contact="true"],body.compact-deck #force-roster button[data-unit][data-contact="true"]{background:linear-gradient(#1560c0,#0f4fa3) left top / 27px 100% no-repeat,repeating-linear-gradient(45deg,rgba(237,187,99,.42) 0 5px,rgba(237,187,99,0) 5px 11px),linear-gradient(#1560c0,#0f4fa3)}
#force-roster button[data-unit]::after,#force-roster button[data-unit]::before{display:none}
#force-roster .roster-pip{position:absolute;top:2px;right:2.5px;width:4px;height:4px;border-radius:50%;background:#000;box-shadow:0 0 0 1.5px var(--ammo-ring,transparent)}
#force-roster button[data-spotted="true"] .roster-pip{background:#fff}
#force-roster button[data-ammo-tone="full"]{--ammo-ring:#3ee05f}
#force-roster button[data-ammo-tone="mid"]{--ammo-ring:#ffb000}
#force-roster button[data-ammo-tone="low"]{--ammo-ring:#ff3b30}
#force-roster button[data-ammo-tone="empty"]{--ammo-ring:#000}
#force-roster .roster-crew{position:absolute;left:27px;right:3px;bottom:3px;display:flex;justify-content:safe center;gap:2px;overflow:hidden;padding:1px;pointer-events:none}
#force-roster .roster-crew:empty{display:none}
/* Crew pips are vertical pills in whole pixels (owner pick V1, 2026-11-10): round dots at
   3.5 px landed on half pixels and drew at different sizes from one vehicle to the next.
   Every name sits at the same height just below the spotted pip, the count or percentage
   under it, so neither runs behind the pip and ammunition ring. */
#force-roster button[data-unit],body.compact-deck #force-roster button[data-unit]{grid-template-rows:4px 10px 9px;align-items:start}
#force-roster button[data-unit] .roster-symbol{grid-row:1 / -1;align-self:center}
#force-roster button[data-unit] .roster-label{grid-column:2;grid-row:2;line-height:10px}
#force-roster button[data-unit] .roster-condition{grid-column:2;grid-row:3;line-height:9px}
#force-roster .roster-crew i{display:block;flex:none;width:3px;height:6px;border-radius:3px;background:#3ee05f;box-shadow:0 0 0 1px rgba(255,255,255,.85)}
#force-roster .roster-crew i[data-crew="1"]{background:#ff3b30}
#force-roster .roster-crew i[data-crew="2"]{background:#000}
#force-roster button[data-hull="mid"] .roster-label{color:#f0b44a}
#force-roster button[data-hull="low"] .roster-label{color:#ff7b62}
#force-roster button[data-hull] .roster-condition{display:none}
#force-roster button[data-abandoned="true"]{opacity:.55;border-style:dashed}
/* Grey roster theme (owner pick G3 warm stone, 2026-11-10; Settings → Roster buttons): black text and
   darker damage, ammunition and crew tones that read on a light button. */
body[data-roster-theme="grey"] #force-roster button[data-unit]{background:linear-gradient(#cfcbc2,#bbb6ab);border-color:#8b867b;color:#111}
body[data-roster-theme="grey"] #force-roster button[data-unit]:hover{background:linear-gradient(#dad6ce,#c6c1b6);border-color:#6f6b62}
body[data-roster-theme="grey"] #force-roster button[data-unit].active{background:linear-gradient(#e2ded4,#cbc6ba);border-color:#b9892c;box-shadow:inset 0 0 0 1px #b9892c90;color:#111}
body[data-roster-theme="grey"] #force-roster button[data-unit][data-contact="true"]{background:linear-gradient(#cfcbc2,#bbb6ab) left top / 27px 100% no-repeat,repeating-linear-gradient(45deg,rgba(214,140,20,.55) 0 5px,rgba(214,140,20,0) 5px 11px),linear-gradient(#cfcbc2,#bbb6ab)}
body[data-roster-theme="grey"] #force-roster button[data-unit] .roster-label,body[data-roster-theme="grey"] #force-roster button[data-unit] .roster-condition{color:#111}
body[data-roster-theme="grey"] #force-roster button[data-hull="mid"] .roster-label,body[data-roster-theme="grey"] #force-roster button[data-strength="mid"] .roster-condition{color:#9a4f00}
body[data-roster-theme="grey"] #force-roster button[data-hull="low"] .roster-label,body[data-roster-theme="grey"] #force-roster button[data-strength="low"] .roster-condition{color:#b3261e}
body[data-roster-theme="grey"] #force-roster button[data-ammo-tone="full"]{--ammo-ring:#178a32}
body[data-roster-theme="grey"] #force-roster button[data-ammo-tone="mid"]{--ammo-ring:#c27000}
body[data-roster-theme="grey"] #force-roster button[data-ammo-tone="low"]{--ammo-ring:#d32f2f}
body[data-roster-theme="grey"] #force-roster .roster-crew i{background:#178a32;box-shadow:0 0 0 1px rgba(255,255,255,.95)}
body[data-roster-theme="grey"] #force-roster .roster-crew i[data-crew="1"]{background:#d32f2f}
body[data-roster-theme="grey"] #force-roster .roster-crew i[data-crew="2"]{background:#000}

@media(min-width:1001px){#campaign-note .campaign-role{display:grid;grid-template-columns:auto 1fr;column-gap:20px}#campaign-note .campaign-role p{grid-column:1/-1}}
@media(min-width:901px) and (max-width:1100px){body.ace-seat #ace-vehicle-panel{grid-template-columns:70px minmax(0,1fr) minmax(160px,.75fr)}body.ace-seat #ace-weapon-control-slot{grid-column:3}body.ace-seat .ace-vehicle-identity{padding-right:5px}}
/* Ace crews: faces in the Ace desk and above your tank on the map. */
#ace-crew-seats:has(.ace-crew-card){display:grid;grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:3px 6px}
#ace-crew-seats li.ace-crew-card{display:grid;grid-template-columns:34px 1fr;column-gap:6px;align-items:center;padding:3px;border-radius:5px;cursor:pointer;font-size:12px}
#ace-crew-seats li.ace-crew-card{min-width:0}
#ace-crew-seats li.ace-crew-card strong{display:block;font-size:12px}
#ace-crew-seats li.ace-crew-card.chosen{background:#3a4630;outline:1px solid #d8c48e}
.ace-crew-face,.crew-anchor-face{display:inline-grid;place-items:center;background-color:#3d4a3c;background-repeat:no-repeat;color:#e7eadc;font-weight:bold;border:1px solid #8a7a52;border-radius:5px;overflow:hidden}
.ace-crew-card .ace-crew-face{width:34px;height:34px;grid-row:span 2;font-size:11px}
@media(min-width:901px){#ace-crew-seats:has(.ace-crew-card){grid-template-columns:repeat(auto-fit,minmax(96px,1fr))}}
@media(min-width:901px) and (max-height:800px){
 #ace-crew-seats li.ace-crew-card{grid-template-columns:26px minmax(0,1fr);column-gap:4px;padding:2px;font-size:10px;line-height:1.3}
 #ace-crew-seats li.ace-crew-card strong{font-size:10px}
 #ace-crew-seats .ace-crew-card .ace-crew-face{width:26px;height:26px}
}
.ace-crew-face.you{width:100%;height:100%;min-height:56px;font-size:20px;border-color:#d8c48e}
.ace-crew-face.wounded,.crew-anchor-face.wounded{box-shadow:inset 0 0 0 2px #c9573c}
.ace-crew-face.dead,.crew-anchor-face.dead{filter:grayscale(1) blur(.6px) brightness(.7);transform:rotate(-3deg)}
.ace-crew-person{margin:4px 0}
.ace-map-portraits{display:flex!important;align-items:center;justify-content:flex-start!important;gap:6px;width:max-content;margin:4px 0}
.ace-crew-anchor{position:absolute;left:0;top:0;z-index:4;pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:3px;will-change:transform}
.ace-crew-anchor[hidden]{display:none}
.crew-anchor-face.you{width:46px;height:46px;border:2px solid #d8c48e;font-size:16px;box-shadow:0 2px 6px #0009}
.crew-anchor-row{display:flex;gap:3px}
.crew-anchor-face.small{width:22px;height:22px;font-size:9px;position:relative}
.crew-anchor-face.small::after{content:attr(data-station);position:absolute;right:-1px;top:-1px;background:#17241c;color:#e7eadc;font-size:9px;line-height:11px;padding:0 2px;border-radius:3px}
.ace-crew-anchor small{background:#17241ccc;color:#e7eadc;font-size:10px;padding:0 5px;border-radius:3px}
@media (prefers-reduced-motion: reduce){.ace-crew-anchor{will-change:auto}}

#shell-choice option:disabled, #ace-shell-buttons button:disabled { text-decoration: line-through; opacity: .55; }
.map-rotation{display:inline-flex;gap:2px;align-items:center}.map-rotation button{min-width:28px;padding:5px 7px}.map-rotation #map-bearing{font-size:11px;white-space:nowrap}
/* Pictures panel: opened from the camera button beside feedback and settings. */
#photo-panel{position:fixed;top:64px;right:14px;z-index:60;width:min(460px,calc(100vw - 28px));max-height:calc(100vh - 90px);overflow-y:auto;box-sizing:border-box;padding:10px 14px 14px;background:#151d17f5;border:1px solid #4b5a3e;border-radius:6px;box-shadow:0 8px 28px #0008;font-size:12px;color:#d7dcc8}#photo-panel[hidden]{display:none}
.photo-panel-head{display:flex;justify-content:space-between;align-items:center}#photo-panel-close{padding:0 8px;font-size:16px;line-height:22px}
.photo-panel-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}#photo-panel-note{margin:6px 0 10px;line-height:1.5;color:#a9b69b}
#photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}#photo-gallery[hidden],#photo-viewer[hidden]{display:none}
.photo-thumb{display:grid;gap:3px;padding:4px;min-height:0;font-size:10px;color:#a9b69b}.photo-thumb img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:3px;display:block}
#photo-large{display:block;width:100%;border:1px solid #4b5a3e;border-radius:4px}
/* The profile key, printed in full. In the stylesheet because the page's security policy blocks inline styles. */
#presets-key-value{font-family:Consolas,monospace;word-break:break-all;border:1px solid #46502f;padding:.5rem .7rem;margin:0 0 .5rem}

/* Saved deployments opens below the top bar, so its own Presets button stays uncovered: a second
   click there lands on the backdrop and closes the dialog (owner, 2026-11-21). */
#deployment-presets{margin-top:112px;max-height:calc(100vh - 128px)}
/* Battle top bar, one row (owner design 2026-11-21, C:\Iron_Division\topbar-mockups): game cluster on the
   left (brand, VP and sector pips, clock, Begin battle, Connected + status chip), then callsign, the
   Deployment and View menus, Pause, stacked Battle/Exit and Copy/invite, and the tool buttons with
   Settings top-right. Nothing wraps to a second row. */
body:not(.landing)>header{flex-wrap:nowrap;height:auto;min-height:0;padding:6px 16px;gap:12px;justify-content:flex-start}
body:not(.landing)>header>*{flex-shrink:0}
body:not(.landing)>header .session{display:flex;align-items:center;gap:10px;margin-left:6px}
body:not(.landing)>header .header-preferences{margin-left:auto;gap:8px}
.header-status{display:flex;align-items:center;gap:6px}
body:not(.landing)>header .header-preferences>button:not(.settings-circle):not(.pf-trigger),body:not(.landing)>header .top-menu>button{padding:4px 8px}
/* Whole-pixel line height: 1.15 of 12 px made the buttons, the header and so the battlefield a fraction of a
   pixel tall, which left the canvas and its box misaligned and clicks a fraction off (2026-11-22). */
header .stacked{display:inline-flex;flex-direction:column;align-items:center;line-height:14px;padding:3px 8px;font-size:12px}
header #battle-menu.stacked span+span{border-top:1px solid #6b7860;margin-top:2px;padding-top:2px;align-self:stretch;text-align:center}
.top-menu{position:relative}
.top-menu>button::after{content:" ▾";font-size:10px;color:#9faa93}
.top-menu>button[aria-expanded="true"]{border-color:#edbb63}
.top-menu-list{position:absolute;top:calc(100% + 6px);right:0;z-index:70;display:flex;flex-direction:column;gap:5px;min-width:170px;padding:6px;background:#18211a;border:1px solid #4a5841;border-radius:5px;box-shadow:0 8px 20px #0008}
.top-menu-list[hidden]{display:none}
.top-menu-list>button{text-align:left;width:100%}
.top-menu-list .map-rotation{display:flex;gap:4px}.top-menu-list .map-rotation button{flex:1}
.top-menu-label{font-size:10px;letter-spacing:.12em;color:#9faa93;text-transform:uppercase;padding:2px 2px 0}
body:not(.landing)>header .settings-circle,body:not(.landing)>header .pf-trigger{width:30px;height:30px;padding:6px}
#deployment-presets{margin-top:84px;max-height:calc(100vh - 100px)}
/* Narrow desktops: the wordmark and map name fold away (the ID block stays; the battlefield heading
   names the operation) and the callsign drops its label. */
@media(max-width:1500px){body:not(.landing)>header .brand>div{display:none}body:not(.landing)>header .commander-profile label{display:none}body:not(.landing)>header{gap:8px;padding:6px 10px}}
/* The sector pips sit in the score block's own grid (not absolutely below it), so the bar ends just under them. */
body:not(.landing)>header .score{display:grid;grid-template-columns:auto auto auto;align-items:center;justify-items:center;column-gap:22px;row-gap:3px}
body:not(.landing)>header .score>.sector-strip{grid-column:1/-1;position:static;transform:none}
/* Phones and narrow windows (under 1000 px) may still wrap the bar rather than overflow it. */
@media(max-width:1000px){body:not(.landing)>header{flex-wrap:wrap;row-gap:6px}body:not(.landing)>header>*{flex-shrink:1;min-width:0}body:not(.landing)>header .header-preferences{flex-wrap:wrap;justify-content:flex-end;row-gap:6px;max-width:100%}}
/* Help text and battle toasts (owner picks 2026-11-21, C:\Iron_Division\ui-mockups-1121: 1B + toast v1). The help text
   is a faint glass strip lifted clear of the UNIT tab and kept between the side MAP / COMMAND tabs, wrapping when long;
   the toast rides just above it (--hint-stack, set by game.js as the strip changes height) in the same glass with a gold
   accent. Settings can hide the help text, or keep only important toasts. */
body:not(.landing) #order-hint{bottom:40px;left:70px;max-width:calc(100% - 140px);white-space:normal;line-height:1.35;padding:7px 12px;background:#1620184d;border:1px solid #53634766;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);color:#eef3e2;text-shadow:0 0 2px #0b120c}
body[data-help-text="off"] #order-hint{display:none}
body:not(.landing) #toast{bottom:var(--hint-stack,84px);left:70px;max-width:calc(100% - 140px);background:#1d24164d;border:1px solid #bd985366;border-left:3px solid #e0b25e;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);color:#f6dc9f;text-shadow:0 0 2px #0b120c,0 0 1px #0b120c;font-weight:600}
/* Ping bar (owner pick 2B): no plate, buttons at 50%, short labels (full names in the tooltips). */
#ping-bar{background:none;border:none;padding:0}
#ping-bar button{background:#202b2280;border-color:#5d6b5588;color:#eef1e4;text-shadow:0 0 2px #000}
#ping-bar button:hover:not(:disabled){background:#2f3d31b3}

/* Crew faces beside the selected unit, with no extra bars or invented skills. */
.unit-crew-faces{display:flex;flex-direction:column;gap:3px;flex:0 0 30px;align-self:flex-start}
.unit-crew-faces[hidden]{display:none!important}.unit-crew-faces .ace-crew-face{width:28px;height:28px;flex:none;font-size:10px}
body.compact-deck .unit-crew-faces{flex-basis:26px}body.compact-deck .unit-crew-faces .ace-crew-face{width:24px;height:24px}
/* One button rhythm; optional actions wrap rather than being cut off halfway. */
body.ace-seat .unit-console>#unit-orders{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(86px,1fr));grid-auto-rows:minmax(34px,auto);align-content:start;max-height:none;overflow:visible;gap:4px}
body.ace-seat #unit-orders>button,body:not(.ace-seat) #unit-orders>button{box-sizing:border-box;min-height:34px;padding:4px 6px;font-size:11px;line-height:1.2;white-space:normal}
body.ace-seat #unit-orders>div,body.ace-seat #ace-order-context{grid-column:1/-1}
body.ace-seat #unit-orders kbd{font-size:9px;white-space:nowrap}
body.ace-seat #ace-vehicle-panel{grid-template-columns:76px minmax(0,1fr) minmax(150px,.8fr);gap:6px 10px;align-items:start}
body.ace-seat .ace-vehicle-identity{grid-column:1;grid-row:2;padding-right:5px}
body.ace-seat .ace-weapon-board{grid-column:2;grid-row:2}
body.ace-seat #ace-weapon-control-slot{grid-column:3;grid-row:2}
body.ace-seat .ace-crew-board{grid-column:1/-1;grid-row:1;display:flex;flex-wrap:wrap;align-items:center;gap:3px 12px}
body.ace-seat .ace-crew-board>h3,body.ace-seat .ace-crew-condition{flex:1 1 100%}
body.ace-seat .ace-crew-board>p{flex:0 1 auto;max-width:100%}
body.ace-seat .ace-crew-board>label{gap:8px;margin:0}
body.ace-seat .ace-crew-board>meter{width:90px;height:5px;flex:0 0 90px}
body.ace-seat #ace-crew-seats:has(.ace-crew-card){grid-template-columns:repeat(5,minmax(0,1fr))}
body.ace-seat #ace-crew-seats li.ace-crew-card{grid-template-columns:28px minmax(0,1fr);padding:2px;column-gap:4px;font-size:10px}
body.ace-seat #ace-crew-seats .ace-crew-face{width:28px;height:28px}
body.ace-seat #ace-crew-seats li.ace-crew-card strong{font-size:10px}
body.ace-seat #ace-weapon-control-slot .ace-direct-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
body.ace-seat #ace-weapon-control-slot .ace-direct-actions button{min-height:32px;padding:4px;font-size:10px;line-height:1.2}
body.ace-seat #ace-vehicle-portrait{height:66px}body.ace-seat #ace-player-portrait{top:30px;width:30px;height:38px}
body.ace-seat #ace-vehicle-name{font-size:13px;margin:4px 0}
body.ace-seat #ace-ammo-reserve{font-size:11px;margin:4px 0 2px}
body.ace-seat #ace-main-progress{height:4px;margin-top:2px}
@media(max-width:700px){body.ace-seat #ace-vehicle-panel{grid-template-columns:66px minmax(0,1fr)}body.ace-seat #ace-weapon-control-slot{grid-column:1/-1;grid-row:3}body.ace-seat #ace-crew-seats:has(.ace-crew-card){grid-template-columns:repeat(auto-fit,minmax(90px,1fr))}}
#battle-exit-confirm{width:min(420px,calc(100vw - 32px));box-sizing:border-box;padding:22px;border:1px solid #72805f;border-radius:8px;background:#202d23;color:#d7dfc4}
#battle-exit-confirm::backdrop{background:#07110bc9}#battle-exit-confirm h2{font-size:19px;margin:0 0 12px}#battle-exit-confirm p{font-size:13px;line-height:1.5}#battle-exit-confirm form{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}#battle-exit-confirm button{min-width:80px;min-height:36px}
/* Keep crew state above the weapons even when the desk is resized shorter. */
body.ace-seat .ace-crew-board>h3{display:none}
body.ace-seat .ace-crew-condition{margin:0}
body.ace-seat #ace-crew-seats{margin:0}
body.ace-seat #ace-crew-seats li.ace-crew-card{min-height:0}
body.ace-seat .ace-crew-board>p{margin:0;font-size:10px;line-height:1.2}
body.ace-seat .ace-crew-board>label{font-size:10px}
body.ace-seat .ace-weapon-board h3{margin-bottom:4px}
body.ace-seat .ace-station{padding:3px 0}
body.ace-seat #ace-mg-stations{gap:3px}
body.ace-seat #ace-shell-buttons button{padding:3px;font-size:10px}
body.ace-seat #ace-special-rounds{margin:2px 0}
@media(min-width:1101px){
 body:not(.ace-seat)[data-battle-layout="split"]:has(.unit-crew-faces:not([hidden])) #command-dock>.unit-console{grid-template-columns:minmax(0,1fr) clamp(300px,34%,430px)}
 body:not(.ace-seat)[data-battle-layout="split"] #unit-card:has(.unit-crew-faces:not([hidden])){gap:5px}
}
@media(max-width:1279px){
 body.ace-seat #command-dock>.unit-console:not(.panel-folded){display:flex;flex-direction:column}
 body.ace-seat #ace-vehicle-panel{order:0;flex-shrink:0}
 body.ace-seat .unit-console>#unit-orders{order:1;flex-shrink:0;margin-top:8px!important}
}
body:not(.ace-seat) #unit-orders>button{overflow-wrap:anywhere}
body:not(.ace-seat)[data-battle-layout="split"] #unit-orders>button{padding:3px;font-size:11px;line-height:1.1}
/* Share the full crew row, then align weapons and a uniform action grid below. */
@media(min-width:1280px){
 body.ace-seat #command-dock>.unit-console:not(.panel-folded):has(#ace-vehicle-panel:not([hidden])){display:grid;grid-template-columns:60px minmax(0,1fr) 140px 300px;gap:6px 10px;align-items:start;overflow:auto}
 body.ace-seat #ace-vehicle-panel:not([hidden]){display:contents}
 body.ace-seat .unit-console>#unit-orders{grid-column:4;grid-row:2;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:auto;margin:0!important}
 body.ace-seat #unit-orders>button{font-size:10px;padding:3px;overflow-wrap:anywhere}
 body.ace-seat .ace-crew-board{gap:2px 10px}
 body.ace-seat .ace-map-portraits{margin:2px 0;line-height:1.2}
}
@media(min-width:1280px){
 body.ace-seat .ace-crew-condition{display:contents}
 body.ace-seat #ace-crew-seats{flex:1 1 100%}
 body.ace-seat .ace-crew-condition>p{margin:0;font-size:10px;line-height:1.2}
 body.ace-seat .ace-map-portraits{flex:0 1 auto;font-size:10px;gap:4px}
}
/* Battle sector Ace: the score beside the tank's roster button, and the vehicle's combat status under it
   (owner design 2026-11-22, C:/Iron_Division/BS_ace_ui). Fits the default 220 px roster panel at 1280x720.
   Gauges never show numbers: perforations mark the bands and the fill colour says nominal / damaged / destroyed. */
#roster-row{display:contents}
#roster-row:has(#ace-score-gauge:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);align-items:center;column-gap:7px}
/* The tank's button keeps its usual one-of-three-columns size; the score takes the other two. */
#roster-row:has(#ace-score-gauge:not([hidden])) #force-roster{grid-template-columns:minmax(0,1fr)}
#ace-score-gauge{display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:3px;flex:1;min-width:0;margin:0}
#ace-score-gauge[hidden]{display:none}
#ace-score-gauge .ace-score-text{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;gap:4px;font-size:10px;color:#97a08a;white-space:nowrap}
#ace-score-gauge .ace-score-text b{color:#f2c879;font:700 12px Consolas,monospace}
#ace-score-gauge #ace-score-next{overflow:hidden;text-overflow:ellipsis}
#ace-score-gauge .ace-score-bar{height:5px;background:#141a12;border:1px solid #3f4a37}
#ace-score-gauge .ace-score-bar i{display:block;height:100%;width:0;background:#f2c879}
#ace-readout{margin-top:6px;font-size:10px;color:#d9dcc6}
#ace-readout[hidden]{display:none}
#ace-readout .ar-top{display:flex;gap:6px;align-items:center}
#ace-readout #ar-art{width:104px;height:67px;flex:0 0 104px}
#ace-readout #ar-art img,#ace-readout #ar-art svg{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px #0008)}
#ace-readout .ar-id{min-width:0}
#ace-readout .ar-id strong{display:block;font-size:12px;line-height:1.2}
#ace-readout .ar-id small{display:block;color:#97a08a;font-size:10px;margin-top:2px}
#ace-readout #ar-alert{display:inline-block;margin-top:3px;font-size:10px;font-weight:700;letter-spacing:.06em;color:#fff;background:#d0533f;padding:1px 4px}
#ace-readout #ar-alert[hidden]{display:none}
#ace-readout .ar-hdr{font-size:9px;letter-spacing:.12em;color:#97a08a;margin:7px 0 3px}
#ace-readout .ar-loaded{display:flex;align-items:center;gap:5px;font-size:11px}
#ace-readout #ar-round{color:#edbb63}
#ace-readout #ar-state{margin-left:auto;font-size:10px;letter-spacing:.06em;color:#7fb069}
#ace-readout #ar-state.busy{color:#e2a23a}#ace-readout #ar-state.out{color:#d0533f}
#ace-readout .ar-bar{height:4px;background:#141a12;border:1px solid #3f4a37;margin:3px 0 4px}
#ace-readout .ar-bar i{display:block;height:100%;width:100%;background:#e2a23a}
#ace-readout .ar-shells{display:flex;gap:3px}
#ace-readout .ar-shells button{flex:1;min-width:0;height:20px;padding:0;font-family:inherit;font-weight:600;font-size:10px;color:#d9dcc6;background:#2b3625;border:1px solid #556048;border-radius:2px}
#ace-readout .ar-shells button.on{border-color:#edbb63;color:#edbb63;background:#3a3622}
#ace-readout .ar-shells button:disabled{color:#626a58;border-color:#3a4234}
#ace-readout .ar-shells sup{font-size:8px;color:#97a08a;margin-left:1px}
#ace-readout .ar-res{display:flex;justify-content:space-between;color:#97a08a;margin-top:4px}
#ace-readout #ar-reserve{color:#d9dcc6}
#ace-readout .ar-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:10px;row-gap:4px}
#ace-readout .ar-row{display:flex;align-items:center;gap:5px}
#ace-readout .ar-row .k{width:13px;font-weight:700;text-align:center}
#ace-readout .ar-row .k.you{color:#edbb63}
#ace-readout .ar-row .c{width:38px;letter-spacing:.02em}
#ace-readout .ar-row.off .k,#ace-readout .ar-row.off .c{color:#7d6a62;text-decoration:line-through}
#ace-readout .ar-g{position:relative;height:7px;background:#141a12;border:1px solid #3f4a37;flex:1}
#ace-readout .ar-g i{position:absolute;left:0;top:0;bottom:0}
#ace-readout .ar-g.ok i{width:100%;background:#7fb069}#ace-readout .ar-g.hurt i{width:66%;background:#e2a23a}
#ace-readout .ar-g.dead{border-color:#d0533f}#ace-readout .ar-g.dead i{display:none}
#ace-readout .ar-g.dead::after{content:"";position:absolute;left:2px;right:2px;top:50%;border-top:1px solid #d0533f}
#ace-readout .ar-perf{position:absolute;top:-1px;bottom:-1px;width:2px;background:#1d261a}
/* Tick positions as classes: the page's security policy (style-src 'self') blocks inline style attributes. */
#ace-readout .ar-perf.at25{left:25%}#ace-readout .ar-perf.at33{left:33%}#ace-readout .ar-perf.at60{left:60%}#ace-readout .ar-perf.at66{left:66%}
#ace-readout .ar-hull{height:9px}
