/* Army workspace controls stay reachable while long lists scroll. */
.army-toolbar { position:sticky; top:76px; z-index:15; padding:14px 18px; margin-bottom:18px; border:1px solid #78603a; border-radius:8px; background:#211b13; box-shadow:0 8px 24px #0005; }
.army-view-actions, .army-find-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.army-find-controls { margin-top:12px; align-items:end; }
.army-find-controls .field { flex:1 1 190px; }
.army-find-controls input, .army-find-controls select { width:100%; min-height:40px; }
.army-toolbar .button { width:auto; min-height:40px; padding:9px 13px; font-size:.84rem; }
.army-toolbar button[aria-pressed="true"] { background:var(--gold-bright); color:#17120b; border-color:var(--gold-bright); }
.army-toolbar [hidden], [data-list-builder] [hidden] { display:none !important; }
.army-toolbar-total { margin-left:auto; color:var(--gold-bright); font-weight:800; font-size:.86rem; }
.army-find-count { font-size:.8rem; color:var(--bone); }
.army-print-menu { position:relative; }
.army-print-menu > summary { cursor:pointer; list-style:none; }
.army-print-menu > summary::-webkit-details-marker { display:none; }
.army-print-popover { position:absolute; top:calc(100% + 8px); left:0; z-index:20; width:min(320px, calc(100vw - 36px)); padding:18px; border:1px solid #9d7a42; border-radius:8px; background:#211b13; box-shadow:0 12px 24px #0008; }
.army-print-popover p { margin:0 0 12px; color:var(--bone); font-size:.88rem; line-height:1.5; }
.army-print-popover .button { width:100%; margin-top:8px; }
.army-toolbar :focus-visible, .army-game-card:focus-visible { outline:3px solid var(--gold-bright); outline-offset:3px; }
.army-focused .site-header, .army-focused .site-footer, .army-focused .section-heading, .army-focused .builder-controls, .army-focused .unit-browser { display:none; }
.army-focused .standalone-main { padding-top:0; }
.army-focused .standalone-main #builder { padding-top:16px; }
.army-focused .army-toolbar { top:0; }
.army-focused .builder-shell { display:block; }
.army-focused .roster-list { max-height:none; overflow:visible; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:16px; align-items:start; }
.army-focused .slot-summary { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.army-focused .validation-box { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
.army-game-mode .slot-summary, .army-game-mode .gold-meter { display:none; }
.army-focused .roster-row, .army-game-card { scroll-margin-top:calc(var(--army-toolbar-height,170px) + 20px); }
.army-game-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,410px),1fr)); gap:20px; align-items:start; }
.army-game-card { container:army-card / inline-size; min-width:0; padding:20px; border:1px solid #78603a; border-radius:8px; background:#18130e; color:var(--bone); overflow-wrap:anywhere; }
.army-card-heading { display:flex; gap:14px; align-items:center; }
.army-card-heading > div { flex:1; min-width:0; }
.army-card-heading h3 { font-size:1.35rem; margin:4px 0; line-height:1.3; }
.army-card-heading p, .army-model-count { margin:4px 0; font-size:.86rem; }
.army-card-type { color:var(--gold-bright); font-weight:800; }
.army-card-art { width:74px; height:86px; object-fit:contain; }
.army-card-heading .button { flex:0 0 auto; width:auto; min-height:40px; padding:8px; }
.army-model-count { margin:14px 0; }
.army-game-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; margin:14px 0; }
.army-game-stats > div { padding:9px 4px; text-align:center; background:#ffffff08; border:1px solid #ffffff26; border-radius:5px; }
.army-game-stats dt { font-size:.7rem; font-weight:700; }
.army-game-stats dd { margin:4px 0 0; font-size:1.3rem; font-weight:850; color:var(--gold-bright); }
.army-game-card h4 { font-size:1rem; margin:14px 0 8px; }
.army-game-card p, .army-game-card li { line-height:1.5; }
.army-loadout p, .army-rule p { margin:5px 0 10px; font-size:.88rem; }
.army-loadout ul { padding-left:20px; font-size:.88rem; }
.army-rule { padding:9px 0; border-bottom:1px solid #ffffff18; }
.army-rule > strong { font-size:.9rem; color:var(--gold-bright); }
.army-reference { border-top:1px solid #78603a; margin-top:16px; }
.army-reference > summary { cursor:pointer; padding:14px 0; font-weight:800; color:var(--gold-bright); }
.army-reference .unit-stats-section { padding:12px 0; }
.army-reference .unit-weapon-table-wrap { overflow:visible; border:0; background:transparent; }
.army-reference .unit-weapon-table { display:block; width:100%; min-width:0; }
.army-reference .unit-weapon-table thead { display:none; }
.army-reference .unit-weapon-table tbody { display:grid; gap:10px; }
.army-reference .unit-weapon-table tr { display:grid; width:100%; grid-template-columns:repeat(7,minmax(0,1fr)); gap:1px; border:1px solid #e6c15a30; border-radius:6px; overflow:hidden; }
.army-reference .unit-weapon-table td { display:block; width:auto; min-width:0; padding:8px 6px; border:0; text-align:left; background:#ffffff08; }
.army-reference .unit-weapon-table td:first-child { grid-column:1 / -1; width:auto; padding:9px 10px; background:#e6c15a14; }
.army-reference .unit-weapon-table td::before { display:block; content:attr(data-label); margin-bottom:3px; color:#c9bfae; font-size:.58rem; font-weight:800; text-transform:uppercase; }
.army-reference .unit-weapon-table td:first-child::before { display:none; }
.army-reference .weapon-profile-cost { justify-content:flex-start; }
@container army-card (max-width:460px) {
  .army-reference .unit-weapon-table tr { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
.army-reference-note, .army-source, .army-related { font-size:.78rem; color:#ddd0b8; }
.army-source { margin-bottom:0; }
#army-print { display:none; }
@media (max-width:600px) {
  .army-toolbar { padding:10px; top:76px; }
  .army-view-actions { gap:6px; }
  .army-toolbar .button { font-size:.76rem; padding:8px; }
  .army-toolbar-total { margin:0; flex-basis:100%; }
  .army-find-controls { gap:8px; }
  .army-find-controls .field { flex:1 1 125px; }
  .army-find-controls [data-army-collapse] { min-height:32px; }
  .army-print-popover { left:auto; right:0; width:min(280px, calc(100vw - 36px)); }
  .army-focused .section-builder { padding:8px 0 24px; }
  .army-focused .roster-panel { padding:12px; }
  .army-game-card { padding:13px; }
  .army-card-art { width:52px; height:66px; }
  .army-card-heading h3 { font-size:1.15rem; }
  .army-game-stats dt { font-size:.64rem; }
}
@page { margin:14mm; }
@media print {
  html, body { background:white !important; color:black !important; margin:0 !important; padding:0 !important; font:10pt/1.4 Arial, sans-serif !important; }
  body > *:not(#army-print) { display:none !important; }
  #army-print { display:block !important; color:black; font:10pt/1.4 Arial, sans-serif; }
  #army-print *, #army-print *::before, #army-print *::after { color:black !important; background:transparent !important; box-shadow:none !important; text-shadow:none !important; }
  #army-print h1 { font:700 23pt/1.2 Georgia,serif; margin:6pt 0; }
  #army-print p { margin:4pt 0 7pt; }
  .army-print-heading { border-bottom:2px solid #000; padding-bottom:10pt; margin-bottom:12pt; }
  .army-print-validation { font-size:9pt; margin:8pt 0; }
  .army-print-overview { width:100%; border-collapse:collapse; margin:12pt 0; }
  .army-print-overview thead { display:table-header-group; }
  .army-print-overview tfoot { display:table-row-group; font-weight:bold; }
  .army-print-overview tr { break-inside:avoid; }
  .army-print-overview th, .army-print-overview td { padding:6pt 7pt; border-bottom:1px solid #bbb; text-align:left; vertical-align:top; }
  .army-print-overview th:not(:first-child), .army-print-overview td:not(:first-child) { text-align:right; white-space:nowrap; width:1%; }
  .army-print-overview thead th, .army-print-overview tfoot th, .army-print-overview tfoot td { border-block:1px solid #333; }
  .army-print-loadout { display:block; font-size:8.5pt; line-height:1.45; margin-top:2pt; overflow-wrap:anywhere; }
  .army-print-footer { font-size:8pt; break-inside:avoid; }
}
