/* Workbench geometry inherits every user-selected light/dark palette. */
body{font-family:"Segoe UI",Arial,sans-serif;font-variant-numeric:tabular-nums}button,input,select,textarea{font:inherit}.workbench-nav{padding:16px 28px!important;box-shadow:none!important;border-bottom:1px solid var(--border)!important}.workbench-nav h1{font-size:17px;letter-spacing:.13em}.workbench-nav p{font:10px ui-monospace,monospace;letter-spacing:.12em}.workbench-nav button{border-radius:4px!important}.workbench-tabs{max-width:1440px!important;padding-top:20px!important;border-bottom:1px solid var(--border)}.workbench-tabs button{border-radius:0!important;background:transparent!important;color:var(--muted)!important;font-size:13px;letter-spacing:.03em;border-bottom:3px solid transparent}.workbench-tabs button[aria-selected="true"]{color:var(--ink)!important;border-bottom-color:var(--accent);font-weight:800}.workbench-panel{max-width:1440px!important;padding-top:26px!important}.workbench-heading{display:flex;justify-content:space-between;align-items:center;padding:0 0 22px;border-bottom:1px solid var(--border)}.bench-kicker{font:10px ui-monospace,monospace;letter-spacing:.17em;color:var(--muted);margin:0 0 8px}.workbench-heading h2{font-size:29px;line-height:1.2;font-weight:750;letter-spacing:-.035em;margin:0}.bench-edition{font:10px ui-monospace,monospace;color:var(--muted);letter-spacing:.12em;border:1px solid var(--border);padding:8px 12px}.bench-dashboard{display:flex;flex-direction:column;margin-bottom:28px}.bench-section{padding:16px 0;border-bottom:1px solid var(--border);min-width:0}.bench-section-label{display:flex;align-items:center;gap:10px;margin-bottom:14px}.bench-section-label h3{font-size:11px;font-weight:750;letter-spacing:.12em;text-transform:uppercase;margin:0}.bench-section-number{font:10px ui-monospace,monospace;color:var(--accent);border:1px solid var(--border);padding:3px 6px}.bench-tallies{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.bench-tallies>div{border-left:2px solid var(--border);padding-left:14px;display:flex;flex-direction:column;gap:6px}.bench-tallies span{font:10px ui-monospace,monospace;letter-spacing:.08em;color:var(--muted)}.bench-tallies strong{font-size:29px;font-weight:750;line-height:1}.bench-account-line{display:flex;justify-content:flex-end;gap:20px;color:var(--muted);font-size:11px;margin-top:15px}.bench-account-line button{font-size:11px}.bench-dashboard #stageProgress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}.bench-stage-summary p{font:11px ui-monospace,monospace;margin-bottom:9px}.bench-stage-summary>div,.bench-stage-summary>div>div{height:4px!important;border-radius:0!important}.bench-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.bench-tools>button{font-size:12px;padding:10px 13px;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--ink);min-height:40px}.bench-tools>.bench-primary{background:var(--active)!important;color:var(--on-active)!important;border-color:transparent;font-weight:750}.bench-tools>label{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);margin-left:auto}.bench-tools select{background:var(--raised);border:1px solid var(--border);color:var(--ink);font-size:12px;padding:8px;border-radius:4px;max-width:180px}.bench-alliance{margin-top:14px;font-size:11px;color:var(--muted)}.bench-alliance summary{cursor:pointer;font-weight:600}.bench-alliance #allianceProgress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;padding-top:12px}.workbench-content{display:grid;grid-template-columns:215px minmax(0,1fr);gap:28px}.bench-faction-index{position:sticky;top:130px;align-self:start;border-right:1px solid var(--border);padding-right:20px;max-height:calc(100vh - 150px);overflow:auto}.bench-faction-index>h3{font:10px ui-monospace,monospace;letter-spacing:.16em;color:var(--muted);margin:0 0 16px}.bench-faction-index>.muted{font-size:10px;margin-top:20px}.bench-index-entry{display:flex;align-items:center;text-align:left;width:100%;gap:9px;background:transparent;border-bottom:1px solid var(--border);padding:12px 0;font-size:11px;line-height:1.4}.bench-index-entry>span:not(.bench-mark){flex:1}.bench-index-entry>b{font:11px ui-monospace,monospace;color:var(--muted)}.bench-index-entry .bench-mark{width:27px;height:30px;min-width:27px;border:none;padding:1px}.bench-filter{background:transparent!important;border:none!important;box-shadow:none!important;border-radius:0!important;padding:0 0 16px!important;margin-bottom:14px!important;border-bottom:1px solid var(--border)!important}.bench-filter input,.bench-filter select{border-radius:4px!important;min-height:40px}.bench-filter input{min-width:220px}.bench-ledger{min-width:0}.bench-ledger #undoImportButton{border-radius:4px!important}.bench-ledger #unitGrid{display:flex;flex-direction:column;gap:12px}.bench-ledger #unitGrid>*{margin-top:0!important}.bench-ledger .faction-list{border-radius:5px;box-shadow:none;scroll-margin-top:140px}.bench-ledger .faction-summary{padding:17px 18px;gap:14px}.bench-ledger .faction-summary h3{font-size:17px;font-weight:750;letter-spacing:-.025em}.bench-ledger .faction-summary .muted{font-size:10px}.bench-mark{display:inline-flex;align-items:center;justify-content:center;width:42px;min-width:42px;height:46px;padding:8px;border:1px solid var(--border);border-radius:3px;background:var(--raised);color:var(--accent);flex-shrink:0}.bench-mark-icon{display:block;width:100%;height:100%;background:currentColor;mask-image:var(--badge-url);-webkit-mask-image:var(--badge-url);mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-mode:luminance}.bench-monogram{font:11px ui-monospace,monospace;font-weight:750}.bench-ledger .collection-row>summary{font-size:12px;gap:10px}.bench-ledger .collection-row>summary>.bench-mark{width:24px;height:26px;min-width:24px;border:none;background:transparent;padding:1px;color:var(--muted)}.bench-ledger .collection-row>summary>span:nth-child(2){flex:1}.bench-ledger .collection-row>summary:after{font-size:17px;color:var(--muted)}.bench-ledger .faction-body{padding:3px 16px 10px}.unit-painting-record,.spearhead-painting-record{border-radius:3px!important;background:var(--subtle)!important;padding:16px!important;box-shadow:none!important}.unit-painting-record>div>div:last-child{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.painting-counter{background:transparent!important;border:none!important;border-left:1px solid var(--border)!important;border-radius:0!important;padding:8px 10px!important;gap:6px;flex-wrap:wrap}.painting-counter>div:first-child{flex:1}.painting-counter>div:last-child{gap:5px}.painting-counter button{min-width:32px;min-height:32px;border:1px solid var(--border);border-radius:3px!important;font-size:15px!important}.painting-counter span:first-child{font-size:10px!important}.painting-counter span:last-child{font-size:15px!important}.nested-painting-record{border-radius:3px!important;background:var(--surface)!important}.nested-painting-record .painting-counter button{min-width:28px;min-height:28px}.library-row,.duplicate-row,.settings-row{border-radius:4px!important}footer.glass{box-shadow:none!important}.app-footer{margin-top:24px;padding:12px 16px 16px;text-align:center;font-size:13px;color:var(--muted)}.app-footer-version{margin:0 0 4px}.app-footer-links{display:flex;flex-wrap:wrap;justify-content:center;column-gap:4px}.app-footer-links a{display:inline-flex;align-items:center;min-height:44px;padding:0 10px;border-radius:8px}.app-footer-links a:hover{background:var(--raised)}footer a{text-decoration:underline;color:var(--accent)}
@media(max-width:1050px){.workbench-nav{padding:14px 16px!important}.workbench-content{grid-template-columns:165px minmax(0,1fr);gap:18px}.bench-tools>label{margin-left:0}.unit-painting-record>div>div:last-child{grid-template-columns:repeat(2,minmax(0,1fr))}.bench-tallies{gap:12px}.bench-tallies strong{font-size:25px}.bench-index-entry{font-size:10px}}
@media(max-width:760px){.workbench-nav{position:static!important}.workbench-tabs{padding-left:12px!important;padding-right:12px!important}.workbench-tabs button{font-size:12px;padding:12px 10px!important}.workbench-panel{padding:20px 12px!important}.workbench-heading h2{font-size:25px}.bench-edition{font-size:9px;padding:7px}.bench-kicker{font-size:9px;letter-spacing:.06em}.workbench-content{display:block}.bench-faction-index{display:none}.bench-tallies{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 8px}.bench-tallies strong{font-size:25px}.bench-tallies span{font-size:9px}.bench-tallies>div{padding-left:9px}.bench-dashboard #stageProgress{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.bench-alliance #allianceProgress{grid-template-columns:repeat(2,minmax(0,1fr))}.bench-tools{gap:7px}.bench-tools>button{min-height:44px;font-size:11px;flex:1 1 auto;padding:9px 10px}.bench-tools>label{width:100%;margin-top:5px;justify-content:space-between}.bench-tools select{min-width:140px}.bench-ledger .faction-summary{gap:10px;padding:14px 29px 14px 11px;position:relative}.bench-mark{width:32px;height:36px;min-width:32px;padding:5px}.bench-ledger .faction-summary>div:nth-child(2){flex:1;min-width:0}.bench-ledger .faction-summary h3{font-size:15px}.bench-ledger .faction-counts{width:100%;padding-left:42px;text-align:left;margin-left:0;display:flex;flex-direction:row;flex-wrap:wrap;gap:5px 12px}.bench-ledger .faction-counts b{font-size:12px}.bench-ledger .faction-summary>.expand-marker{position:absolute;right:12px;top:16px}.bench-ledger .faction-body{padding-left:10px;padding-right:10px}.bench-ledger .collection-row>summary{min-height:48px;flex-wrap:wrap}.bench-ledger .collection-row>summary>.muted{padding-left:34px}.bench-filter input{min-width:0}.bench-filter>div:last-child{width:100%}.painting-counter{padding:7px!important}.painting-counter button,.nested-painting-record .painting-counter button{min-width:44px;min-height:44px}.painting-counter>div:last-child{display:flex!important}.painting-counter span:last-child{font-size:14px!important}.unit-painting-record,.spearhead-painting-record{padding:12px!important}.bench-account-line{justify-content:space-between;font-size:10px;gap:8px}.bench-ledger .faction-list{scroll-margin-top:12px}}
.bench-utilities>summary{display:none}.bench-utility-body{margin-top:0!important}.bench-heading-actions{display:flex;align-items:center;gap:14px}.bench-heading-actions>.bench-primary{background:var(--active);color:var(--on-active);border:1px solid transparent;border-radius:4px;padding:11px 16px;font-size:12px;font-weight:750;min-height:44px}.bench-tool-drawer>summary{list-style:none;cursor:pointer}.bench-tool-drawer>summary:after{content:'−';margin-left:auto;color:var(--muted)}.bench-tool-drawer:not([open])>summary:after{content:'+'}.bench-tool-drawer:not([open])>summary{margin-bottom:0}.painting-counter span:last-child{white-space:nowrap}
@media(max-width:760px){.bench-utilities{width:100%;margin-top:10px}.bench-utilities>summary{display:inline-block;cursor:pointer;list-style:none;border:1px solid var(--border);padding:8px 11px;font-size:11px;border-radius:4px}.bench-utilities>summary:after{content:' +';padding-left:10px}.bench-utilities[open]>summary:after{content:' −'}.bench-utility-body{margin-top:12px!important}.bench-heading-actions{gap:0}.bench-heading-actions .bench-edition{display:none}.bench-heading-actions>.bench-primary{padding:10px 12px;font-size:11px}.workbench-heading h2{font-size:22px}.workbench-heading{gap:12px}.bench-tallies{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.bench-tallies>div{padding-left:6px}.bench-tallies span{font-size:8px;line-height:1.4;letter-spacing:0;min-height:24px}.bench-tallies strong{font-size:22px}.painting-counter{display:grid!important;grid-template-columns:1fr}.painting-counter>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:5px}.painting-counter>div:last-child{justify-content:flex-end}}

.workbench-heading h2,.faction-summary h3,.collection-row b,.bench-index-entry span,.unit-painting-record h3{overflow-wrap:anywhere}.collection-row>summary>span:nth-child(2){min-width:0}

.unit-completion-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.5rem}.complete-all-button{min-height:36px;padding:.4rem .65rem;border:1px solid var(--border);border-radius:4px;font-size:12px;font-weight:600;color:var(--ink);background:var(--surface)}.complete-all-button:disabled{opacity:.55;cursor:default}@media(max-width:640px){.complete-all-button{min-height:44px}.unit-painting-record>div>div:first-child{flex-wrap:wrap;gap:.5rem}}

.editable-stage-count{display:flex;align-items:center;gap:.25rem;white-space:nowrap}.editable-stage-count input{width:3.5rem;min-width:0;padding:.25rem;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:inherit;font:inherit;text-align:center;-moz-appearance:textfield}.editable-stage-count input::-webkit-inner-spin-button,.editable-stage-count input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.editable-stage-count input:focus{outline:2px solid var(--accent);outline-offset:1px}@media(max-width:640px){.editable-stage-count input{min-height:44px}}

.catalogue-toolbar{display:flex;flex-wrap:wrap;gap:.75rem;margin:1rem 0}.catalogue-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;padding:1rem;border:1px solid var(--border);margin-bottom:1rem}.catalogue-editor label{font-size:13px}.catalogue-editor input:not([type=checkbox]),.catalogue-editor select,.catalogue-toolbar>input{display:block;width:100%;padding:.5rem;background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:4px}.catalogue-toolbar>input{width:auto;flex:1}.catalogue-editor button,.catalogue-toolbar button,.catalogue-review-row button{min-height:44px;padding:.5rem .75rem;border:1px solid var(--border);background:var(--raised);color:var(--ink);border-radius:4px}.catalogue-review-row{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding:.75rem 0;border-bottom:1px solid var(--border)}@media(max-width:640px){.catalogue-editor{grid-template-columns:1fr}.catalogue-review-row{align-items:flex-start;flex-wrap:wrap}}

.catalogue-editor.hidden{display:none}

.doubles-setup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}@media(max-width:640px){.doubles-setup-grid{grid-template-columns:1fr}}

.offline-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;margin-bottom:1rem;font-size:12px}.offline-toolbar button{min-height:44px;padding:.5rem .65rem;border:1px solid var(--border);background:var(--raised);color:var(--ink);border-radius:4px}.offline-play-only #collectionTab,.offline-play-only #retrySave,.offline-play-only button[onclick="reloadServerCollection()"],.offline-play-only button[onclick="openModal('jsonModal')"]{display:none}

.offline-play-only button[onclick="exportProgress()"],.offline-play-only #saveStatus{display:none}

.nested-unit-heading{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px}.nested-unit-heading h4{overflow-wrap:anywhere}.nested-unit-heading .unit-model-count{justify-self:center;text-align:center;white-space:nowrap}.nested-unit-heading .unit-completion-actions{justify-self:end;min-width:0}.nested-unit-heading .complete-all-button{white-space:normal}@media(max-width:380px){.nested-unit-heading{grid-template-columns:minmax(0,1fr) auto;gap:10px}.nested-unit-heading h4{grid-column:1/-1}.nested-unit-heading .unit-model-count{justify-self:center}}

.phase-guide-note{font-size:.8rem;margin:.6rem 0;color:var(--text-muted,#94a3b8)}.phase-army{margin-top:1.25rem;border-top:1px solid var(--border,#334155);padding-top:1rem}.phase-army h4{font-weight:750;font-size:1rem}.phase-army-effects{margin:.8rem 0 1rem}.phase-army-effects>h5{font-size:.85rem;font-weight:700}.phase-unit-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:12px}.phase-unit-card{border:1px solid var(--border,#334155);background:var(--surface,#1e293b);border-radius:8px;min-width:0;align-self:start}.phase-unit-card>summary{padding:12px;display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;font-weight:700}.phase-unit-models{font-size:.75rem;white-space:nowrap;color:var(--accent,#fbbf24)}.phase-unit-body{padding:0 12px 12px}.phase-move{font-size:1rem;margin:.5rem 0}.phase-move strong{font-size:1.6rem;color:var(--accent,#fbbf24)}.phase-ability{padding:10px 0;border-top:1px solid var(--border,#334155);margin-top:8px}.phase-ability h5{font-weight:700;font-size:.85rem}.phase-rule-timing{font-size:.7rem;color:var(--accent,#fbbf24);margin:.3rem 0}.phase-rule-text{font-size:.85rem;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.phase-weapon-scroll{overflow-x:auto;margin:10px 0}.phase-weapon-table{border-collapse:collapse;min-width:550px;font-size:.75rem;width:100%}.phase-weapon-table th,.phase-weapon-table td{padding:6px;text-align:left;border-bottom:1px solid var(--border,#334155)}.phase-full-warscroll,.phase-passives{margin-top:12px;border-top:1px solid var(--border,#334155);padding-top:8px}.phase-full-warscroll>summary,.phase-passives>summary{font-size:.8rem;cursor:pointer;color:var(--accent,#fbbf24)}.phase-unit-stats{font-size:.8rem;margin:8px 0}.phase-no-action{margin:10px 0}.phase-guide-footer{margin-top:20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.phase-loadout{white-space:pre-wrap;margin:6px 0}

#unitLibraryModal,#spearheadModal{overscroll-behavior:contain}#unitLibraryModal>.glass,#spearheadModal>.glass{height:85vh;height:85dvh;max-height:calc(100dvh - 32px);min-height:0;overflow:hidden}#unitLibraryModal>.glass>:not(#libraryList),#spearheadModal>.glass>:not(#spearheadList){flex-shrink:0}#libraryList,#spearheadList{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;flex:1 1 0}@media(max-width:480px){#unitLibraryModal>.glass,#spearheadModal>.glass{padding:16px;height:calc(100vh - 32px);height:calc(100dvh - 32px)}}
/* 0.8.8 battle reference and tracking */
.phase-unit-card{border:2px solid #64748b;border-radius:12px;margin:12px 0;overflow:hidden}.phase-unit-card>summary{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px;cursor:pointer;background:var(--surface,#182436)}.phase-unit-models{margin-left:auto;text-align:center;min-width:100px;white-space:nowrap}.phase-unit-body{padding:14px}.phase-ability{border:1px solid #64748b;border-radius:10px;padding:14px;margin:12px 0}.phase-ability h5{font-weight:700}.rule-verb{display:block;margin-top:12px;color:var(--accent,#fbbf24)}.phase-rule-text{white-space:pre-wrap}.phase-relevant,.phase-other{grid-column:1/-1;min-width:0}.phase-other>summary{padding:14px;border:1px solid #64748b;border-radius:10px;cursor:pointer}.phase-other .phase-unit-card{margin:12px 0}.phase-army-effects{border:1px solid #64748b;border-radius:12px;padding:14px;margin:12px 0}.phase-army h4{font-weight:700;margin-top:20px}.battle-header{position:sticky;top:0;z-index:30;background:var(--surface,#142033);border:2px solid #64748b;border-radius:12px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px;margin-bottom:14px}.battle-header strong{flex:1 1 240px}.battle-header button,.battle-header select,.unit-track button,.guided-panel button{border:1px solid #64748b;border-radius:8px;padding:8px 12px;background:var(--surface,#182436);color:inherit;min-height:40px}.battle-header button:disabled,.unit-track button:disabled{opacity:.4}.phase-reference{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}.phase-reference button{border:1px solid #64748b;border-radius:10px;padding:12px;text-align:left;background:var(--surface,#182436);color:inherit}.phase-reference button[aria-current=step]{border:2px solid #fbbf24;box-shadow:inset 0 0 0 1px #fbbf24}.phase-reference small{display:block;font-size:12px;margin-top:8px;opacity:.8}.guided-panel,.core-cards,.account-section{padding:16px;border:1px solid #64748b;border-radius:12px;margin:16px 0}.guided-panel strong,.core-cards h3,.account-section h4{font-weight:700}.guided-panel p,.core-cards p{margin:10px 0}.core-cards a{text-decoration:underline}.unit-track{padding:12px;border:1px solid #64748b;border-radius:10px;margin-bottom:14px}.unit-track-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:8px 0}.unit-track input[type=number]{width:72px;margin:4px 8px;padding:8px;border:1px solid #64748b;border-radius:6px;background:var(--surface,#182436);color:inherit}.unit-track button.flag-active{background:#0369a1;color:white;border-color:#7dd3fc}.unit-track details{margin-top:12px}.unit-track summary{cursor:pointer}.unit-search{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:14px 0}.unit-search input[type=search],#playGlossary input{display:block;padding:10px;border:1px solid #64748b;border-radius:8px;background:var(--surface,#182436);color:inherit;margin-top:6px}.keyword-chip{display:inline-block;border:1px solid #64748b;border-radius:20px;padding:4px 8px;margin:3px;cursor:pointer}.offline-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:16px}.offline-toolbar button{border:1px solid #64748b;padding:10px 14px;border-radius:8px}.offline-toolbar #offlineStatus,.offline-toolbar>.muted{flex-basis:100%;display:block;margin:2px 0}[hidden]{display:none!important}@media(max-width:600px){.phase-reference{grid-template-columns:repeat(2,minmax(0,1fr))}.battle-header{position:sticky}.phase-unit-card>summary{align-items:start}.phase-unit-models{min-width:80px}.unit-search input{max-width:100%}}

.phase-relevant{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:12px}.phase-relevant>p{grid-column:1/-1}.phase-other[open]{display:block}.phase-other .phase-unit-card{width:100%}.guided-panel button:disabled{opacity:.4}.account-section input{background:var(--raised);color:var(--ink);border:1px solid var(--border);border-radius:8px;padding:10px;width:100%}

.battle-header{top:var(--battle-nav-height,90px)}.battle-tools{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:12px 0}.battle-tools select,.battle-tools button{background:var(--surface);color:var(--ink);border:1px solid #64748b;border-radius:8px;padding:8px 12px;min-height:40px}#battleSaveStatus{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.guided-effect{margin:12px 0}
/* 0.8.9 readable, compact battle layout */
body{font-size:16px;line-height:1.5}.text-xs{font-size:13px!important;line-height:1.45!important}.text-sm{font-size:15px!important;line-height:1.5!important}.muted,.phase-guide-note{color:var(--muted)!important}.workbench-nav h1{font-size:18px}.workbench-nav p,.bench-kicker,.bench-section-label h3,.bench-faction-index h3{font-size:12px}.bench-index-entry{font-size:14px}.nested-painting-record h4{font-size:15px!important;line-height:1.4}.nested-painting-record .unit-model-count{font-size:13px!important}.painting-counter{font-size:14px!important;gap:10px}.painting-counter button{min-width:36px;min-height:36px}.painting-counter input{font-size:15px!important;min-height:36px}.spearhead-painting-record{background:transparent!important;border:0!important;padding:0 16px 16px!important;border-radius:0!important}.spearhead-record-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 0}.nested-unit-heading{grid-template-columns:minmax(0,1.3fr) auto auto;gap:14px}.unit-completion-actions button{font-size:13px!important}.play-page-heading{display:flex;gap:16px;align-items:start;justify-content:space-between;margin-bottom:12px}.play-page-heading h2{font-size:22px;font-weight:750;margin:0}.match-tools{min-width:150px}.match-tools>summary{cursor:pointer;padding:8px 12px;border:1px solid var(--border);border-radius:8px;text-align:right}.match-tools[open]{flex:1;max-width:850px;padding:12px;background:var(--surface);border:1px solid var(--border);border-radius:12px}.match-tools[open]>summary{text-align:left;margin-bottom:12px}.match-tools .offline-toolbar{padding:0 0 14px}.phase-reference{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.phase-reference button{padding:8px 12px;min-height:42px;font-size:14px;flex:0 1 auto}.phase-reference button[aria-current=step]{background:var(--active);color:var(--on-active);border-color:var(--active);box-shadow:none}.phase-navigation-controls{display:flex;align-items:center;gap:14px;margin:12px 0}.phase-navigation-controls span{flex:1;text-align:center;font-weight:650}.phase-navigation-controls button{border:1px solid var(--border);padding:8px 14px;border-radius:8px;background:var(--surface);color:var(--ink);min-height:42px}.phase-navigation-controls button:disabled{opacity:.4}.core-cards{margin:12px 0;padding:12px 16px}.core-cards h3{font-size:15px}.core-cards p{margin:6px 0;font-size:15px}.core-cards a{font-size:13px}.phase-guide{padding:16px!important}.phase-guide-note{font-size:14px}.phase-army{padding-top:12px;margin-top:16px}.phase-army h4{font-size:18px}.phase-army-effects{border:0;padding:0;margin:10px 0}.phase-army-effects:empty{display:none}.persistent-army-summary{padding:12px 14px;background:var(--subtle);border-radius:8px}.persistent-army-summary h5{font-size:14px}.effect-label{display:inline-block;margin:6px 8px 0 0;padding:3px 8px;border:1px solid var(--border);border-radius:8px;font-size:14px}.current-round-effects{margin:8px 0;font-size:14px}.current-round-effects p{margin:5px 0}.current-round-effects small{color:var(--muted);font-size:13px}.army-rule-reference{margin:10px 0}.army-rule-reference>summary,.unit-manage>summary{cursor:pointer;padding:8px 0;font-size:14px;color:var(--accent)}.phase-relevant{grid-template-columns:repeat(auto-fit,minmax(min(100%,560px),1fr));gap:16px}.phase-unit-card{margin:8px 0;border:1px solid var(--muted);border-radius:12px}.phase-unit-card>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 14px;padding:14px;background:var(--surface)}.phase-unit-card>summary>span:first-child{font-size:17px;font-weight:750}.phase-unit-models{font-size:13px;margin-left:0;min-width:0;white-space:normal}.unit-summary-attacks{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 14px;font-size:14px;font-weight:400}.unit-summary-attacks>span{display:inline-block}.unit-summary-attacks b{color:var(--accent)}.phase-unit-body{padding:0 14px 14px}.phase-status-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.phase-status-chips button{border:1px solid var(--border);border-radius:16px;font-size:13px;padding:5px 10px;color:var(--ink);background:var(--subtle);min-height:34px}.phase-status-chips button[aria-pressed=true]{background:var(--active);color:var(--on-active);border-color:var(--active)}.phase-ability{border:0;border-left:3px solid var(--accent);background:var(--subtle);border-radius:0 8px 8px 0;padding:12px 14px}.phase-ability h5{font-size:16px}.phase-rule-text{font-size:15px;line-height:1.55;max-width:75ch}.phase-rule-timing{font-size:13px}.phase-weapon-table{font-size:14px}.phase-weapon-table th,.phase-weapon-table td{padding:8px 6px}.compact-weapon-profiles{display:none}.compact-weapon-profiles article{padding:12px 0;border-bottom:1px solid var(--border);font-size:15px}.compact-weapon-profiles h5{font-weight:700}.compact-weapon-profiles p{margin:5px 0}.weapon-attack-total b{font-size:18px;color:var(--accent)}.unit-manage{border-top:1px solid var(--border);margin-top:12px}.unit-track{border:0;padding:0}.unit-track details{padding:8px 0}.unit-track-row{gap:12px}.match-context{padding:14px 16px;margin:12px 0;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.match-context>summary{font-weight:650;cursor:pointer}.score-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.score-details strong.text-4xl{font-size:24px}.battle-header{padding:10px 12px;border:1px solid var(--muted)}.battle-tools{margin:8px 0}.guided-panel{padding:12px 16px;margin:12px 0}.admin-account-actions{padding:14px;border:1px solid var(--border);border-radius:10px}.admin-account-actions h3{font-weight:700}.admin-account-actions p{font-size:14px;margin-top:8px}
@media(max-width:700px){.play-page-heading{flex-wrap:wrap}.match-tools{width:100%}.phase-reference button{flex:1 1 110px}.phase-unit-card>summary{grid-template-columns:minmax(0,1fr)}.phase-unit-models{justify-self:start}.compact-weapon-profiles{display:block}.phase-weapon-scroll{display:none}.phase-relevant{grid-template-columns:minmax(0,1fr)}.phase-navigation-controls{gap:8px}.phase-navigation-controls span{font-size:14px}.nested-unit-heading{grid-template-columns:minmax(0,1fr) auto}.nested-unit-heading h4{grid-column:1/-1}.unit-model-count{justify-self:start!important}.unit-completion-actions{justify-self:end}.unit-track-row>label{max-width:100%}.battle-header strong{flex-basis:100%}}
#displaySettingsModal{z-index:60}#adminAccountModal{z-index:60}
.alliance-bucket{margin:12px 0;border:0}.alliance-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer;padding:12px 0;border-bottom:2px solid var(--accent)}.alliance-summary h3{font-size:21px;font-weight:750}.alliance-summary span{font-size:14px;color:var(--muted)}.alliance-body{padding-top:12px;display:flex;flex-direction:column;gap:14px}.bench-alliance-index{margin:10px 0}.bench-alliance-index>summary{font-size:15px;font-weight:750;cursor:pointer;padding:8px 0;border-bottom:1px solid var(--border);color:var(--accent)}.bench-alliance-index .bench-index-entry{padding:10px 0 10px 8px}.alliance-body .faction-summary{padding:14px 16px}.alliance-body .faction-summary h3{font-size:18px}.bench-filter select#allianceFilter{display:none}@media(max-width:700px){.alliance-summary{align-items:start}.alliance-summary h3{font-size:20px}.alliance-summary span{font-size:13px;text-align:right}.alliance-body .faction-summary{padding:12px}}
/* Keep model counts centred independently of title/button length. */
.nested-unit-heading{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.nested-unit-heading .unit-model-count{justify-self:center!important}.nested-unit-heading .unit-completion-actions{justify-self:end}
@media(max-width:700px){.nested-unit-heading{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.nested-unit-heading h4{grid-column:1/-1}.nested-unit-heading .unit-model-count{grid-column:2}.nested-unit-heading .unit-completion-actions{grid-column:3}}
.bench-tallies span{font-size:12px}.bench-stage-summary p{font-size:13px}.bench-account-line{font-size:13px}.bench-filter input,.bench-filter select{font-size:14px!important}.unit-search input[type=search]{font-size:15px}.unit-track-row span{font-size:15px}
/* 0.8.10 phase reference workspace, based on the supplied interaction recording. */
.reference-surface{--phase-colour:#475569;--phase-ink:#fff;max-width:1280px;margin:auto}.reference-surface[data-phase=hero],.reference-rule-card[data-phase=hero]{--phase-colour:#817519;--phase-ink:#fff}.reference-surface[data-phase=movement],.reference-rule-card[data-phase=movement]{--phase-colour:#536164;--phase-ink:#fff}.reference-surface[data-phase=shooting],.reference-rule-card[data-phase=shooting]{--phase-colour:#086674;--phase-ink:#fff}.reference-surface[data-phase=charge],.reference-rule-card[data-phase=charge]{--phase-colour:#a23c14;--phase-ink:#fff}.reference-surface[data-phase=combat],.reference-rule-card[data-phase=combat]{--phase-colour:#951f2b;--phase-ink:#fff}.reference-surface[data-phase=end],.reference-rule-card[data-phase=end]{--phase-colour:#57446d;--phase-ink:#fff}.reference-rule-card[data-phase=any]{--phase-colour:#475569;--phase-ink:#fff}.reference-header{position:static;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 0;border:0;border-radius:0;background:transparent;margin:0}.reference-header label{display:flex;align-items:center;gap:6px;font-size:13px}.reference-header select,.reference-header button{padding:6px 10px;font-size:14px;min-height:36px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--ink)}.reference-header select{max-width:200px}.reference-header .reference-score{font-weight:700;margin-left:auto}.reference-header #battleSaveStatus{max-width:170px;color:var(--muted);font-size:12px}.reference-surface .phase-reference{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:5px;margin:8px 0;overflow:auto}.reference-surface .phase-reference button{min-height:38px;min-width:65px;padding:8px 4px;border-radius:5px;font-size:14px;background:var(--subtle);border:1px solid transparent;text-align:center}.reference-surface .phase-reference button[aria-current=step]{background:var(--phase-colour);color:var(--phase-ink);border-color:var(--phase-colour)}.reference-workspace-bar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:10px 0;padding-bottom:10px;border-bottom:1px solid var(--border)}.reference-view-tabs{display:flex;gap:6px}.reference-view-tabs button{padding:6px 10px;border-radius:4px;font-size:14px;background:transparent;color:var(--muted)}.reference-view-tabs button[aria-selected=true]{background:var(--raised);color:var(--ink);font-weight:700}.reference-scope{margin-left:auto}.reference-scope,.reference-assistance{display:flex;gap:6px;align-items:center;font-size:13px;color:var(--muted)}.reference-workspace-bar select{padding:5px 8px;background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:4px;font-size:13px}.reference-surface .phase-navigation-controls{gap:10px;margin:6px 0 12px}.reference-surface .phase-navigation-controls span{font-size:14px;color:var(--muted);font-weight:400}.reference-surface .phase-navigation-controls button{font-size:13px;min-height:34px;padding:5px 10px}.reference-section{margin:10px 0 18px;border:0;border-top:1px solid var(--border);padding-top:8px}.reference-section>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:6px 0;font-size:16px;font-weight:650;cursor:pointer;list-style:revert}.reference-section>summary>span{font-size:12px;font-weight:400;color:var(--muted)}.reference-rule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:12px;align-items:start;margin-top:10px}.reference-rule-card{border:1px solid var(--border);border-radius:5px;overflow:hidden;background:var(--surface);align-self:start}.reference-rule-card>header{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:8px 12px;background:var(--phase-colour,var(--accent));color:var(--phase-ink,#fff);font-size:13px;font-weight:650}.reference-rule-card>header small{font-size:12px;font-weight:400}.reference-rule-body{padding:12px}.reference-rule-title{display:flex;align-items:start;gap:10px;justify-content:space-between}.reference-rule-title h4{font-size:17px;font-weight:750;margin:0}.reference-rule-title button{padding:0 6px;color:var(--accent);font-size:20px}.reference-rule-source{font-size:12px;color:var(--muted);margin:4px 0 10px}.reference-rule-copy{font-size:15px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.reference-rule-copy .rule-verb{display:inline;margin:0;color:inherit;font-weight:750}.reference-keywords{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin-top:12px}.reference-keywords .keyword-chip{font-size:12px;border-radius:4px;padding:3px 7px}.reference-rule-body>small{display:block;margin-top:10px;color:var(--muted)}.reference-use{margin-top:12px;border:1px solid var(--border);border-radius:5px;padding:6px 10px;background:var(--raised);color:var(--ink);font-size:13px}.quick-reference table{width:100%;border-collapse:collapse;font-size:14px;margin-top:6px}.quick-reference th,.quick-reference td{padding:6px 8px;text-align:left;border-bottom:1px solid var(--border)}.quick-reference th{font-weight:600;color:var(--muted);font-size:12px;background:var(--subtle)}.quick-reference td:last-child{max-width:650px;font-variant-numeric:tabular-nums}.quick-reference td button{text-align:left;padding:0;color:var(--ink);font-size:14px;text-decoration:underline;text-decoration-color:var(--border);text-underline-offset:3px}.quick-reference td small{font-size:12px;color:var(--muted);margin-left:10px}.reference-empty{padding:16px 0;color:var(--muted);font-size:14px}.reference-roster>section{margin:16px 0}.reference-roster h3{font-size:17px;font-weight:700}.reference-roster-role{font-size:12px;text-transform:uppercase;color:var(--muted);margin:14px 0 5px}.reference-unit-row{border:1px solid var(--border);border-radius:5px;background:var(--surface);margin:5px 0}.reference-unit-row>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;padding:8px 12px;cursor:pointer;font-size:15px}.reference-unit-row>summary b{font-size:14px;color:var(--accent)}.reference-unit-row>summary small{grid-column:1/-1;font-size:12px;color:var(--muted);font-weight:400}.reference-unit-row>div{padding:0 12px 12px}.reference-unit-editor{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0;font-size:14px}.reference-unit-editor label{display:flex;gap:6px;align-items:center}.reference-unit-editor input,.reference-allocation input{width:65px;padding:6px;background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:5px;font-size:15px}.reference-unit-editor button,.reference-favourite{padding:7px 10px;border:1px solid var(--border);border-radius:5px;background:var(--raised);color:var(--ink);font-size:14px}.reference-unit-editor button:disabled{opacity:.45}.reference-unit-help{font-size:12px;color:var(--muted);margin:4px 0}.allocation-alert{font-size:14px;color:var(--accent);padding:10px;border-left:3px solid var(--accent);background:var(--subtle)}#playUnitModal,#playRulesModal{z-index:65}#keywordModal{z-index:75}.reference-dialog{display:flex;flex-direction:column;max-width:900px;width:100%;max-height:90vh;max-height:90dvh;background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:10px;overflow:hidden}.reference-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 20px;border-bottom:1px solid var(--border);flex-shrink:0}.reference-dialog>header h2{font-size:23px;font-weight:750}.reference-dialog>header button{padding:4px 8px;font-size:20px}.reference-dialog-body{padding:16px 20px;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0}.reference-dialog-body h3{font-size:17px;font-weight:700;margin:16px 0 6px}.reference-dialog-body details{margin:10px 0}.reference-dialog-body details>summary{cursor:pointer;font-size:14px;font-weight:650}.reference-dialog-body .phase-weapon-table{min-width:550px}.reference-dialog-body .phase-rule-text{font-size:15px}.reference-allocation{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0;font-size:14px}.reference-keyword-dialog{max-width:480px}.reference-keyword-dialog .reference-dialog-body{font-size:16px}.reference-surface .guided-panel{margin:8px 0 14px;padding:10px 12px;background:var(--subtle);border:0;border-left:3px solid var(--accent);border-radius:0}.reference-surface .guided-panel .muted{display:none}.reference-surface .guided-panel p{font-size:14px;margin:6px 0}.reference-surface #referencePanel_score{padding:12px 0}.reference-surface #referencePanel_score>h3{font-size:18px;font-weight:700}.reference-surface #referencePanel_score>p{font-size:14px;color:var(--muted)}.reference-surface .score-details{margin-top:0}.reference-surface .unit-search{margin:4px 0 12px;font-size:13px}.reference-surface .unit-search input[type=search]{padding:7px 10px;font-size:14px}
@media(max-width:700px){.reference-surface .phase-reference{display:flex;flex-wrap:nowrap;gap:4px;padding-bottom:5px}.reference-surface .phase-reference button{flex:0 0 75px;min-width:75px}.reference-header select{max-width:150px}.reference-header .reference-score{margin-left:0}.reference-header #battleSaveStatus{flex:1;text-align:right;max-width:none}.reference-workspace-bar{gap:8px}.reference-scope{margin-left:0}.reference-section>summary{align-items:start;flex-wrap:wrap}.reference-rule-grid{grid-template-columns:minmax(0,1fr)}.quick-reference td{font-size:13px;overflow-wrap:anywhere}.quick-reference td small{display:block;margin:2px 0 0}.reference-dialog>header{padding:12px}.reference-dialog>header h2{font-size:20px}.reference-dialog-body{padding:12px}.reference-unit-editor{gap:8px}.reference-unit-editor button{min-height:38px}}
.reference-section>summary::after{content:"⌄";margin-left:auto;font-size:18px;color:var(--muted)}.reference-section[open]>summary::after{transform:rotate(180deg)}.reference-unit-row>summary>span:first-child::before{content:"▸";margin-right:8px;color:var(--muted)}.reference-unit-row[open]>summary>span:first-child::before{content:"▾"}

/* 0.8.11 focused warscroll and selectable attack profiles. */
#playWeaponModal{z-index:70}.reference-weapon-dialog{max-width:620px}.reference-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(80px,1fr));gap:8px;margin:12px 0}.reference-stats>div{background:var(--subtle);border:1px solid var(--border);border-radius:6px;padding:10px;text-align:center}.reference-stats dt{font-size:12px;color:var(--muted);margin-bottom:5px}.reference-stats dd{font-size:22px;font-weight:750;margin:0}.reference-attack-links{display:grid;gap:6px}.reference-attack-links .reference-attack-link{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;text-align:left;padding:10px 12px;border:1px solid var(--border);border-radius:5px;background:var(--raised);color:var(--ink);text-decoration:none;font-size:14px}.reference-attack-link span{font-weight:650}.reference-attack-links .reference-attack-link small{font-size:12px;color:var(--muted);margin:0;white-space:nowrap}.reference-attack-total{padding:12px;background:var(--subtle);border-left:3px solid var(--accent);font-size:14px}.reference-dialog-body>.phase-status-chips{margin:10px 0}.reference-attack-link:hover,.reference-attack-link:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media(max-width:700px){.reference-attack-links .reference-attack-link{align-items:start;flex-direction:column;gap:3px;min-height:44px}.reference-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* 0.8.12 collection workspace uses the same geometry as Play Mode. */
.collection-workspace-bar{margin:10px 0 0}.bench-dashboard{margin-bottom:14px}.bench-tallies>div{border:1px solid var(--border);background:var(--surface);border-radius:6px;padding:10px 12px}.bench-tallies{gap:8px}.bench-tallies strong{font-size:24px}.bench-tallies span{font-size:11px}.bench-section-number{display:none}.bench-section-label h3{text-transform:none;font-size:16px;letter-spacing:0}.bench-section{padding:12px 0}.bench-tool-drawer>summary{margin-bottom:0}.bench-tool-drawer[open] .bench-tools{margin-top:12px}.bench-dashboard .bench-account-line{margin-top:10px}#collectionPanel[data-collection-view=collection] #dashboard-overview>.bench-section-label,#collectionPanel[data-collection-view=collection] #dashboard-overview>.bench-account-line,#collectionPanel[data-collection-view=collection] #dashboard-stages{display:none}#collectionPanel[data-collection-view=collection] #dashboard-overview{border:0;padding-bottom:0}.faction-list[data-alliance=Order]{--faction-colour:#086674}.faction-list[data-alliance=Chaos]{--faction-colour:#951f2b}.faction-list[data-alliance=Destruction]{--faction-colour:#346b36}.faction-list[data-alliance=Death]{--faction-colour:#57446d}.bench-ledger .faction-summary{border-top:4px solid var(--faction-colour,var(--accent));border-radius:5px 5px 0 0}.collection-unit-list{display:flex;flex-direction:column;gap:6px}.collection-unit-row{border:1px solid var(--border);border-radius:5px;background:var(--surface)}.collection-unit-row>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:10px 12px;cursor:pointer;font-size:15px;list-style:none}.collection-unit-row>summary>span{font-weight:650}.collection-unit-row>summary>span:before{content:'▸';margin-right:8px;color:var(--muted)}.collection-unit-row[open]>summary>span:before{content:'▾'}.collection-unit-row>summary>b{font-size:14px;color:var(--accent)}.collection-unit-row>summary>small{grid-column:1/-1;color:var(--muted);font-size:12px}.collection-unit-row .nested-painting-record{border:0!important;padding:12px!important}.collection-stage-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.collection-unit-actions{display:flex;justify-content:flex-end;margin-bottom:10px}.collection-stage-grid .painting-counter{display:flex;flex-direction:column;gap:10px;border:1px solid var(--border)!important;border-radius:6px!important;background:var(--surface)!important}.collection-more>summary{cursor:pointer;font-size:13px;border:1px solid var(--border);border-radius:5px;padding:6px 10px;list-style:none}.collection-more>div{display:flex;flex-wrap:wrap;gap:10px;padding:10px 0}.collection-more button,.collection-more a{min-height:34px}.unit-completion-actions{flex-wrap:wrap}.core-phase-section{margin:16px 0}.collection-reset{color:var(--error)!important}@media(max-width:700px){.collection-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bench-tallies{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.bench-tallies>div{padding:8px}.bench-tallies span{font-size:10px;min-height:0}.bench-tallies strong{font-size:21px}.collection-unit-row>summary{font-size:14px}.collection-stage-grid .painting-counter button{min-height:44px;min-width:44px}}

#collectionLedgerWorkspace[hidden]{display:none!important}

#welcomeModal,#paintImportModal,#adminMatchesModal{z-index:70}.welcome-dialog{max-width:600px}#welcomeContent h3{font-size:22px}#welcomeContent p{font-size:16px;line-height:1.6;margin:12px 0}.paint-mapping{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.paint-row{display:flex;justify-content:space-between;padding:12px}.paint-row small{display:block;color:var(--muted);margin-top:4px}.paint-preview-table{overflow:auto}.paint-preview-table table{width:100%;text-align:left;margin:16px 0}.paint-preview-table th,.paint-preview-table td{padding:8px;border-bottom:1px solid var(--border)}#paintWorkspace[hidden]{display:none!important}#collectionPanel[data-collection-view=paints] #dashboard-stages{display:none}@media(max-width:700px){.paint-mapping{grid-template-columns:repeat(2,minmax(0,1fr))}}

.app-shell{display:grid;grid-template-columns:210px minmax(0,1fr);gap:16px;flex:1;max-width:1600px;width:100%;margin:auto}.app-sidebar{align-self:start;position:sticky;top:95px;padding:20px 12px;border-right:1px solid var(--border);max-height:calc(100vh - 110px);overflow:auto;font-size:14px}.app-sidebar button{display:block;width:100%;text-align:left;padding:9px;border-radius:5px}.app-sidebar summary{cursor:pointer;font-weight:650;padding:10px 6px}.sidebar-section{border-top:1px solid var(--border);margin-top:8px}.sidebar-section>div{padding-left:8px}.sidebar-section details{padding-left:8px}.app-sidebar .bench-index-entry{font-size:12px}.app-sidebar .bench-index-entry b{margin-left:auto}.app-sidebar .bench-alliance-index>summary{font-size:13px}.app-main{min-width:0}.workbench-content{display:block}.home-panel{padding:32px 24px}.home-panel h2{font-size:28px;font-weight:750}.home-panel>p{margin:12px 0}.home-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:24px}.home-cards button{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:20px;text-align:left}.home-cards b{display:block;font-size:20px;margin-bottom:10px}.home-cards span{font-size:14px;color:var(--muted)}@media(max-width:850px){.app-shell{display:block}.app-sidebar{position:static;max-height:none;border-right:0;border-bottom:1px solid var(--border);display:flex;flex-wrap:wrap;gap:10px;padding:12px}.sidebar-section{flex:1;min-width:150px;border:1px solid var(--border);border-radius:5px;margin:0}.sidebar-home{width:auto!important}.app-sidebar .sidebar-section>div{padding:0 8px 8px}.app-main .workbench-panel{padding:16px 12px!important}}

.reference-weapon-summary{font-size:12px;font-weight:400;color:var(--muted);line-height:1.6;margin-top:4px;white-space:normal}.reference-attack-link>div{min-width:0}.play-page-heading{display:block}.play-page-heading h2{margin-bottom:12px}.match-tools,.match-tools[open]{width:100%;max-width:none;margin-bottom:14px;border-radius:6px}.match-tools>summary{text-align:left}.match-tools[data-tools-view=setup] #matchUtilities,.match-tools[data-tools-view=utilities] #playSetupTools{display:none}.match-tools .reference-workspace-bar{margin-top:0}.match-tools .reference-view-tabs{flex-wrap:wrap}

.paint-workspace-title{font-size:24px;font-weight:750;margin:16px 0}.build-mismatch{border:1px solid var(--border);border-left:4px solid var(--accent);padding:12px;margin:12px;color:var(--ink);background:var(--surface)}

/* Deployment reserves use the same bordered reference layout. */
.reference-reserve-bucket{margin-top:1rem;padding:1rem;border:1px solid var(--border);border-radius:12px;background:var(--subtle)}
.reference-reserve-choice{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin:.75rem 0;color:var(--ink)}
.reference-reserve-choice select{width:auto;min-width:8rem}

.mobile-play-exit{display:none}
@media(max-width:780px){
 body.mobile-play .workbench-nav,body.mobile-play .collection-save-bar,body.mobile-play .app-sidebar{display:none!important}
 body.mobile-play #playPanel{position:fixed;inset:0;z-index:45;height:100dvh;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;margin:0;padding:0;background:var(--page)}
 body.mobile-play .reference-surface{max-width:none;margin:0;padding:.5rem;padding-bottom:max(.75rem,env(safe-area-inset-bottom))}
 body.mobile-play .reference-header{top:0;padding-top:max(.5rem,env(safe-area-inset-top))}
 body.mobile-play .mobile-play-exit{display:inline-flex}
}

.guided-start-cards{margin-top:1rem}.guided-start-cards .reference-rule-copy{margin:.75rem 0;font-size:15px}.guided-start-cards h4{font-size:18px;font-weight:700}.guided-start-note{font-size:13px;color:var(--muted);margin:1rem 0}#gameStartModal{z-index:65}.guided-start-reopen{margin:.5rem 0}

/* 0.9: readable Collection typography on desktop and mobile. */
#collectionPanel{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:16px;line-height:1.5;letter-spacing:normal;font-weight:400}
#collectionPanel .text-xs,#collectionPanel .text-sm{font-size:14px!important;line-height:1.5}
#collectionPanel button,#collectionPanel select,#collectionPanel input,#collectionPanel textarea{font-family:inherit;letter-spacing:normal;line-height:1.4}
#collectionPanel button,#collectionPanel .settings-button,#collectionPanel .bench-tools>label{font-size:14px!important}
#collectionPanel input:not([type=checkbox]),#collectionPanel select,#collectionPanel textarea{font-size:16px!important}
#collectionPanel .bench-kicker,#collectionPanel .bench-edition{font-family:inherit;font-size:12px!important;line-height:1.5;letter-spacing:.035em}
#collectionPanel .workbench-heading h2{font-family:inherit;font-size:clamp(26px,3vw,34px);font-weight:650;line-height:1.25;letter-spacing:-.02em}
#collectionPanel .bench-section-label h3,#collectionPanel .bench-filter,#collectionPanel .bench-tools,#collectionPanel .bench-account-line{font-family:inherit;font-size:14px;line-height:1.5;letter-spacing:normal}
#collectionPanel .bench-tallies span{font-family:inherit;font-size:13px!important;line-height:1.5;letter-spacing:normal}
#collectionPanel .bench-tallies strong{font-family:inherit;font-size:30px;line-height:1.25;font-weight:650;font-variant-numeric:tabular-nums}
#collectionPanel .faction-summary h3,#collectionPanel .unit-painting-record h3{font-family:inherit;font-size:18px!important;font-weight:650;line-height:1.35;letter-spacing:normal;text-transform:none;color:var(--ink)!important}
#collectionPanel .faction-summary,#collectionPanel .collection-row{font-size:15px;line-height:1.5;letter-spacing:normal}
#collectionPanel .collection-row b{font-size:16px;font-weight:600}
#collectionPanel .collection-unit-row>summary{font-size:16px;line-height:1.5;gap:8px 14px;padding:14px}
#collectionPanel .collection-unit-row>summary>span{font-weight:600;min-width:0;overflow-wrap:anywhere;color:var(--ink)}
#collectionPanel .collection-unit-row>summary>b{font-size:15px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
#collectionPanel .collection-unit-row>summary>small{font-size:14px;line-height:1.6;color:var(--muted)}
#collectionPanel .painting-counter span:first-child{font-size:13px!important;font-weight:600;color:var(--ink)!important}
#collectionPanel .painting-counter span:last-child,#collectionPanel .painting-counter input{font-size:16px!important;color:var(--ink)!important;font-variant-numeric:tabular-nums}
#collectionPanel .painting-counter button{font-size:17px!important;min-width:40px;min-height:40px}
#collectionPanel .painting-counter{padding:12px!important;gap:10px}
#collectionPanel .collection-more>summary,#collectionPanel .collection-unit-actions,#collectionPanel .spearhead-record-tools{font-size:14px;line-height:1.5}
#collectionPanel :is(button,input,select,textarea,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:760px){
 #collectionPanel .collection-unit-row>summary{padding:12px;gap:7px 10px}
 #collectionPanel .painting-counter button{min-width:44px;min-height:44px}
 #collectionPanel .bench-tallies{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}
 #collectionPanel .bench-tallies>div{min-width:0}
}
#collectionPanel .faction-summary .muted{font-size:14px!important;line-height:1.5}
.app-sidebar #factionIndex .bench-index-entry{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.5}
.app-sidebar #factionIndex .bench-index-entry>b{font-family:inherit;font-size:13px;font-variant-numeric:tabular-nums}
/* 0.9.2: Beginner forms and phase attack assistance use the selected display palette. */
.reference-dialog-body :is(input,select),.reserve-copy-choice select,.ability-table select,.move-status select{background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:.6rem;padding:.6rem;max-width:100%;font:inherit}
.reference-dialog-body select option,.reserve-copy-choice select option{background:var(--surface);color:var(--ink)}
.reference-dialog-body :is(input,select):focus-visible,.reserve-copy-choice select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.beginner-form,.beginner-panel,.reinforcement-reference{background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:.8rem;padding:1rem;margin:1rem 0;line-height:1.6}
.beginner-form :is(h3,h4),.beginner-panel h3{font-size:1.2rem;margin:.8rem 0;font-weight:700;color:var(--ink)}
.beginner-form>label,.reference-dialog-body>label,.move-status{display:flex;flex-direction:column;gap:.4rem;margin:.8rem 0}
.beginner-form nav,.reinforcement-reference{display:flex;flex-wrap:wrap;gap:.6rem}.reinforcement-reference>*{flex-basis:100%}
.beginner-choices,.attack-guide-profiles{display:grid;gap:1rem;margin:1rem 0}.beginner-choice{padding:1rem;border:1px solid var(--border);border-radius:.7rem;background:var(--surface)}
.beginner-choice.chosen{border:2px solid var(--accent)}.beginner-choice label{display:flex;align-items:center;gap:.7rem;font-size:1.1rem}.beginner-choice input[type=radio]{width:1.2rem;height:1.2rem;accent-color:var(--accent)}
.choice-advice,.weapon-condition{background:var(--subtle);border-left:3px solid var(--accent);color:var(--ink);padding:.65rem;margin:.65rem 0;line-height:1.5}.reference-attack-link .weapon-condition{font-size:.9rem}
.ready-attack,.beginner-form button,.reinforcement-reference button{border:1px solid var(--accent);border-radius:.6rem;padding:.65rem .9rem;background:var(--raised);color:var(--ink);font:inherit;font-weight:600;margin:.4rem 0;white-space:normal;text-align:left}
.ready-attack{width:100%}.ready-attack:hover{background:var(--active);color:var(--on-active)}
.ability-table table,.reference-dialog-body table{width:100%;border-collapse:collapse;line-height:1.5}.ability-table :is(th,td),.reference-dialog-body :is(th,td){padding:.7rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--border)}
.table-current{background:var(--subtle);box-shadow:inset 3px 0 var(--accent)}.ability-table p{white-space:pre-wrap;margin:.5rem 0}
.attack-guide-profiles .reference-stat-boxes{margin:.7rem 0}.reference-dialog-body p{margin:.65rem 0}.reference-dialog-body details>summary{padding:.65rem 0;font-weight:600;cursor:pointer}
body:has(.beginner-form) .phase-reference button{white-space:normal;min-width:7rem;line-height:1.3}
/* Faction browsing, focused guidance and sticky Collection import. */
#collectionPanel .collection-sticky-bar{position:sticky;top:76px;z-index:35;background:var(--page);padding:.7rem 0;border-bottom:1px solid var(--border)}
#collectionPanel[data-collection-view=paints] .sticky-import-units{display:none}.collection-sticky-bar .sticky-import-units{margin-left:auto;order:2;min-height:44px}
.spearhead-browser-layout{display:grid;grid-template-columns:minmax(160px,210px) minmax(0,1fr);gap:1rem}.spearhead-browser-index{align-self:start;position:sticky;top:0;max-height:66vh;overflow:auto;overscroll-behavior:contain;padding-right:.6rem;border-right:1px solid var(--border)}
.spearhead-browser-index details{margin:.4rem 0}.spearhead-browser-index summary{font-size:1rem;font-weight:700}.spearhead-browser-index button{display:block;width:100%;text-align:left;padding:.7rem .6rem;border-radius:.4rem;color:var(--ink)}.spearhead-browser-index button[aria-current=page]{background:var(--active);color:var(--on-active)}
.spearhead-browser-detail{min-width:0}.browse-weapon-grid{display:grid;gap:.7rem}.browse-weapon-grid h4{font-weight:700;font-size:1rem}.browse-unit>summary{font-size:1.05rem}.browse-weapon-grid .reference-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:700px){#collectionPanel .collection-sticky-bar{top:0}.spearhead-browser-layout{grid-template-columns:minmax(0,1fr)}.spearhead-browser-index{position:static;max-height:250px;border-right:0;border-bottom:1px solid var(--border);padding-bottom:.6rem}.collection-sticky-bar{gap:.5rem}.collection-sticky-bar .reference-view-tabs{flex-wrap:wrap}.sticky-import-units{flex-shrink:0}}
#collectionPanel .collection-sticky-bar{top:var(--collection-sticky-top,76px)}
@media(max-width:760px){#collectionPanel .collection-sticky-bar{top:0}}
/* 0.9.6: readable type and a quieter hobby workbench. Fonts are bundled for offline play. */
@font-face{font-family:'Atkinson Hyperlegible Next';src:url('/webfonts/atkinson-next-regular.ttf') format('truetype');font-style:normal;font-weight:200 800;font-display:swap}
@font-face{font-family:'Atkinson Hyperlegible Next';src:url('/webfonts/atkinson-next-italic.ttf') format('truetype');font-style:italic;font-weight:200 800;font-display:swap}
:root{--ui-font:'Atkinson Hyperlegible Next',system-ui,-apple-system,'Segoe UI',sans-serif}
body.font-sans,#collectionPanel,.app-sidebar #factionIndex .bench-index-entry{font-family:var(--ui-font)!important;font-size:16px;line-height:1.5}
button,input,select,textarea{font-family:inherit}.workbench-nav h1{letter-spacing:.02em;font-weight:650}.workbench-nav p,.bench-kicker,.bench-edition{font-family:inherit;letter-spacing:.025em}.reference-rule-copy{font-size:16px;line-height:1.6}.muted{font-size:14px}.workbench-nav{padding:12px 22px!important}.bench-utilities{position:relative}.bench-utilities>summary{cursor:pointer;font-size:14px;padding:8px 12px;border:1px solid var(--border);border-radius:6px}.bench-utilities[open]>.bench-utility-body{position:absolute;right:0;top:100%;min-width:300px;max-width:min(460px,90vw);padding:16px;background:var(--surface);border:1px solid var(--border);box-shadow:0 8px 24px #0002;z-index:45}.workbench-nav .bench-utility-body>button{background:var(--raised)!important;color:var(--ink)!important;border:1px solid var(--border)}
.app-sidebar #factionIndex .bench-index-entry{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 6px}.app-sidebar .bench-mark{width:24px;height:24px;flex-shrink:0}.app-sidebar .bench-index-entry>span:not(.bench-mark){overflow-wrap:anywhere}.app-sidebar .bench-index-entry>b{padding:1px 6px;background:var(--raised);border-radius:4px;text-align:right;font-weight:500}.sidebar-home[aria-current=page]{background:var(--raised);font-weight:650}.app-sidebar summary[aria-selected=true]{color:var(--accent);background:var(--raised)!important}.app-sidebar{top:80px;padding:14px 10px}.sidebar-section{border-top:0}
.collection-compact-summary{margin:12px 0 4px;font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}#collectionPanel[data-collection-view=collection] #dashboard-overview{display:none}#collectionPanel:not([data-collection-view=collection]) .collection-compact-summary{display:none}.collection-row .unit-painting-record{padding:12px 0!important;border:0!important;border-radius:0!important;background:transparent!important}.collection-row .collection-editor-identity{display:none}.collection-row .unit-completion-actions{margin-left:auto}.collection-stage-grid .painting-counter{border:0!important;border-top:2px solid var(--border)!important;border-radius:0!important}.collection-unit-row>summary>small{font-size:14px}.unit-completion-actions button{min-height:40px}
.home-panel{max-width:950px}.home-activity{margin:22px 0}.home-activity>p{color:var(--muted);font-size:16px}.home-resume{display:block;width:100%;padding:16px 18px;margin:14px 0;text-align:left;background:var(--surface);border:1px solid var(--border);border-left:4px solid var(--accent);border-radius:6px}.home-resume b,.home-resume span{display:block}.home-resume span{color:var(--muted);margin-top:5px}.home-cards button{padding:18px}.home-cards b{font-size:19px}
#playPanel.is-setup>.play-page-heading{display:none}.setup-wizard{max-width:780px;margin:12px auto;padding:24px!important;background:var(--surface);border:1px solid var(--border);border-radius:10px}.setup-wizard>header{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px;color:var(--muted)}.setup-exit{padding:8px 0;min-height:44px}.setup-wizard .setup-progress{margin:14px 0 4px;font-size:14px;color:var(--muted)}.setup-wizard progress{display:block;width:100%;height:5px;accent-color:var(--accent);margin:0 0 22px}.setup-wizard h3{font-size:28px;line-height:1.25;margin-bottom:14px;font-weight:650;scroll-margin-top:100px}.setup-wizard h4{margin:16px 0;font-size:20px}.setup-wizard>p{font-size:16px;line-height:1.6}.setup-fields{display:grid;grid-template-columns:1.3fr 1fr;gap:14px;margin:22px 0}.setup-fields label{padding:16px;border:1px solid var(--border);border-radius:8px;background:linear-gradient(135deg,var(--raised),var(--surface));background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 9%,var(--surface)),var(--surface));font-size:16px;font-weight:600}.setup-fields input,.setup-fields select{display:block;width:100%;min-height:48px;background:var(--surface)!important;color:var(--ink);border:1px solid var(--border);border-radius:5px;padding:10px;margin-top:10px;font-weight:400}.setup-wizard .beginner-choices{border:0;padding:0;margin:22px 0;display:grid;gap:12px}.setup-wizard .beginner-choice{background:var(--surface);border-radius:6px;padding:16px}.setup-wizard .beginner-choice.chosen{border-color:var(--accent);box-shadow:inset 3px 0 var(--accent)}.setup-wizard .beginner-choice label{display:flex;gap:12px;align-items:start}.setup-wizard .beginner-choice input{margin-top:5px;width:20px;height:20px;flex-shrink:0}.setup-wizard .choice-advice{border-top:1px solid var(--border);padding-top:12px;color:var(--muted);font-size:15px;line-height:1.5}.setup-wizard footer{position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--border);padding:14px 0 0;margin-top:24px;display:flex;justify-content:space-between}.setup-wizard footer button{min-height:48px;min-width:96px}.setup-review{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;margin:24px 0}.setup-review dt{color:var(--muted)}.setup-review dd{font-weight:600}
.reference-surface>.phase-navigation-controls{position:sticky;top:var(--battle-header-height,60px);z-index:20;background:var(--surface);padding:10px;border:1px solid var(--border);border-radius:6px}.reference-surface>.phase-navigation-controls button{min-height:44px}.reference-header{gap:8px}.reference-workspace-bar{padding:8px 0}.guided-start-reopen{font-size:14px}.reference-header label{font-size:14px}.reference-header #battleSaveStatus{font-size:12px}
@media(max-width:850px){.app-sidebar{padding:8px 12px;gap:6px}.sidebar-section{min-width:0;flex:1;margin:0}.app-sidebar>.sidebar-home{min-height:44px;padding:8px 12px}.sidebar-section>summary{padding:10px}.sidebar-section[open]{flex-basis:100%;order:2}.home-panel{padding:22px 16px}.home-panel>p{margin:8px 0}.home-cards{grid-template-columns:1fr;gap:10px;margin-top:16px}.home-cards button{padding:14px}.home-cards b{margin-bottom:4px}.home-activity{margin:16px 0}.setup-wizard{padding:18px!important;margin:0;border-radius:0;border-left:0;border-right:0}.setup-fields{grid-template-columns:1fr;gap:10px}.setup-wizard h3{font-size:25px;scroll-margin-top:12px}.setup-review{grid-template-columns:1fr;gap:4px}.setup-review dd{margin-bottom:12px}.reference-surface>.phase-navigation-controls{top:var(--battle-header-height,60px)}}
/* Keep the utility disclosure visible at every viewport, including desktop. */
.bench-utilities>summary{display:block;min-height:44px;list-style:none}.bench-utilities>summary:after{content:' +';margin-left:8px}.bench-utilities[open]>summary:after{content:' −'}
body.learning-play .workbench-nav,body.learning-play .collection-save-bar,body.learning-play .app-sidebar{display:none!important}body.learning-play .app-shell{display:block;max-width:900px}#playPanel.is-learning>.play-page-heading{display:none}#playPanel.is-learning{max-width:850px;padding:24px 18px}.learning-card{width:100%;margin:0 auto}.learning-step-body>p{font-size:16px;line-height:1.6;margin:16px 0}.learning-step-body>.guided-panel{border:0;padding:0;background:transparent}.learning-step-body .reference-rule-grid{grid-template-columns:minmax(0,1fr)}.learning-step-body .reference-section{margin-top:18px;border-radius:6px}.learning-extra{margin:20px 0 0;border-top:1px solid var(--border);padding-top:12px}.learning-extra>summary{cursor:pointer;font-size:15px;font-weight:600;padding:8px 0;min-height:44px}.learning-tools button{min-height:44px}.learning-card footer{z-index:5}.learning-card .reference-rule-copy{line-height:1.6}.learning-card h3{line-height:1.3}.learning-card .reference-roster{margin-top:12px}@media(max-width:850px){#playPanel.is-learning{padding:12px 0}.learning-card,.setup-wizard{border-radius:8px;border:1px solid var(--border);width:calc(100% - 20px);margin:0 auto;padding:18px!important}.bench-utilities[open]>.bench-utility-body{right:auto;left:0;min-width:0;width:min(360px,calc(100vw - 36px));max-height:70vh;overflow:auto}.learning-card h3{scroll-margin-top:14px}}
#customColourModal{z-index:80}.custom-colour-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.custom-colour-fields label{font-size:14px}.custom-colour-fields input{display:block;width:100%;height:48px;margin-top:8px;border:1px solid var(--border);background:var(--surface);padding:4px}#customColourPreview{padding:18px;background:var(--page);border:1px solid var(--border);border-radius:8px}#customColourPreview article{padding:16px;background:var(--surface);color:var(--ink);border-radius:6px}#customColourPreview h3{font-size:22px;font-weight:600}#customColourPreview p{margin:12px 0}#customColourPreview button{background:var(--active);color:var(--on-active);padding:10px 14px;border-radius:5px}.learning-tools #battleSaveStatus{display:block;font-size:14px}.learning-card .guided-panel{margin:0;padding:0;border:0;background:transparent}
.home-spearhead-menu{background:var(--surface);border:1px solid var(--border);border-radius:6px;align-self:start}.home-spearhead-menu>summary{padding:18px;cursor:pointer;list-style:none;position:relative}.home-spearhead-menu>summary b{display:block;font-size:19px;font-weight:650;margin-bottom:10px}.home-spearhead-menu>summary span{font-size:14px;color:var(--muted);padding-right:18px;display:block}.home-spearhead-menu>summary:after{content:'⌄';position:absolute;right:18px;top:18px}.home-spearhead-menu[open]>summary:after{content:'⌃'}.home-spearhead-actions{padding:0 18px 18px;border-top:1px solid var(--border)}.home-spearhead-actions button{display:block;width:100%;min-height:44px;padding:12px;margin-top:10px;border:1px solid var(--border);background:var(--subtle);text-align:left}.home-spearhead-actions button:disabled{opacity:.45}.home-new-game{margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}.home-new-game h3{font-size:16px;font-weight:650;margin-bottom:10px}.home-new-game label{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}.home-new-game select{padding:8px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--ink);min-height:44px}.home-new-game strong{display:block;font-size:16px}.home-new-game button span{display:block;font-size:14px;margin-top:4px;color:var(--muted)}@media(max-width:850px){.home-spearhead-menu>summary{padding:14px}.home-spearhead-menu>summary b{margin-bottom:4px}.home-spearhead-actions{padding:0 14px 14px}}
/* Keep ability cards balanced and their actions comfortably tappable. */
.reference-rule-grid{align-items:stretch}.reference-rule-grid>.reference-rule-card{align-self:stretch;display:flex;flex-direction:column;height:auto;margin:0}.reference-rule-card>header{background:var(--active);color:var(--on-active);padding:12px 16px;line-height:1.45;overflow-wrap:anywhere}.reference-rule-card .reference-rule-body{padding:16px}.reference-rule-card .reference-rule-title{margin:0 0 12px;align-items:start}.reference-rule-card h4{margin:0 0 12px;font-size:20px;line-height:1.3}.reference-rule-card .reference-rule-title h4{margin:0}.reference-rule-card .reference-rule-copy p{margin:10px 0;line-height:1.55}.reference-rule-card .reference-rule-copy p:first-child{margin-top:0}.reference-rule-card .reference-rule-copy p:last-child{margin-bottom:0}.reference-rule-grid{gap:14px}.ready-attack{display:block;min-height:48px;width:100%;padding:12px 16px;margin:12px 0 4px;border:1px solid var(--border);border-radius:6px;background:var(--raised);color:var(--ink);font-size:16px;font-weight:600;line-height:1.45;white-space:normal;text-align:left;text-decoration:none!important}.ready-attack:hover{background:var(--active);color:var(--on-active)}.unit-destroyed-button{min-height:44px;white-space:normal}.reference-unit-editor{align-items:center;gap:10px}.attack-guide-profiles label{display:block;margin:12px 0}.attack-guide-profiles label input{display:block;max-width:180px;margin-top:8px;min-height:44px}.attack-guide-profiles .reference-rule-card{margin:14px 0}#attackGuideContent>.allocation-alert{font-size:15px;line-height:1.5}@media(max-width:700px){.reference-rule-grid{grid-template-columns:minmax(0,1fr)}.reference-rule-card h4{font-size:19px}.reference-rule-card .reference-rule-body{padding:14px}.ready-attack{padding:12px;font-size:15px}.reference-unit-editor>button{min-height:44px}}

/* Pending review: center and wrap Shoot/Fight actions inside the quick-reference table. */
.quick-reference td button.ready-attack,
.reference-unit-detail button.ready-attack,
button.ready-attack {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 16px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.45;
  text-decoration: none;
}
/* Beginner explains one decision at a time, with help in place. */
.learning-explanation{margin:14px 0;border:1px solid var(--border);border-radius:6px;background:var(--subtle)}.learning-explanation>summary{padding:12px 14px;cursor:pointer;min-height:44px;font-weight:600;list-style:none}.learning-explanation>summary:after{content:' +';float:right}.learning-explanation[open]>summary:after{content:' −'}.learning-explanation>div{padding:0 14px 14px;font-size:16px;line-height:1.6}.learning-explanation p+p{margin-top:10px}.learning-card footer button,.setup-wizard footer button{max-width:75%;white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.4}.learning-card footer button:first-child,.setup-wizard footer button:first-child{max-width:22%;min-width:64px}.deployment-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0}.deployment-plan{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:14px;border:1px solid var(--border);border-radius:8px;background:var(--surface);cursor:pointer}.deployment-plan.chosen{border-color:var(--accent);box-shadow:inset 3px 0 var(--accent)}.deployment-plan input{margin-top:4px}.deployment-diagram{display:block;width:100%;max-width:100%;height:auto;grid-column:1/-1}.deployment-plan>span{grid-column:1/-1;font-size:14px;color:var(--muted);line-height:1.5}.deployment-diagram text{font-family:inherit;font-size:16px}.learning-units{margin:20px 0}.learning-units>h4{font-size:18px;font-weight:600;margin-bottom:12px}.learning-units .reference-unit-row{margin:10px 0}.learning-units .reference-unit-row>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:center;min-height:60px;padding:14px}.learning-units .reference-unit-row>summary>small{grid-column:1/-1;font-size:14px;line-height:1.5;white-space:normal}.learning-units .reference-unit-row>summary>span{overflow-wrap:anywhere;line-height:1.4}.learning-units .reference-unit-row>div{padding:14px}.learning-units .reference-attack-link{margin-top:8px}.reserve-status{padding:12px;margin:12px 0;border-left:3px solid var(--accent);background:var(--subtle);font-size:15px}.reserve-status p{margin:8px 0}.learning-extra h5{margin-top:14px;font-weight:600}
#collectionPanel[data-collection-view=paints] #collectionDashboard,#collectionPanel[data-collection-view=paints] .bench-heading-actions>.bench-primary{display:none}.app-shell{grid-template-columns:240px minmax(0,1fr)}.app-sidebar #factionIndex .bench-index-entry{font-size:14px!important}.app-sidebar .bench-index-entry>span:not(.bench-mark){overflow-wrap:normal;word-break:normal}#accountModal>div>div:first-child{position:sticky;top:0;background:var(--surface);z-index:1;padding-bottom:10px}
@media(max-width:850px){.app-shell{display:block}.deployment-plans{grid-template-columns:minmax(0,1fr)}.learning-card footer button{font-size:15px}.learning-units .reference-unit-row>summary{padding:12px}.reference-attack-links .reference-attack-link{display:block}.reference-attack-link>em{display:block;margin-top:8px}.reference-attack-links .reference-attack-link>div{overflow-wrap:anywhere}.reference-attack-link .reference-weapon-summary{font-size:14px}.learning-card{padding:16px!important}}

.completion-checkbox{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}.completion-checkbox input{width:18px;height:18px;flex:0 0 18px;accent-color:var(--accent)}.completion-checkbox:has(input:disabled){cursor:default}

.final-score-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.final-score-inputs label{display:grid;gap:8px}.final-score-scroll{overflow-x:auto}.final-score-scroll table{width:100%;border-collapse:collapse}.final-score-scroll td,.final-score-scroll th{padding:8px;text-align:left;border-bottom:1px solid var(--border)}#finalScoreReview input,#finalScoreReview select{width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--ink)}#finalScoreReview input{max-width:180px}#finalScoreReview [aria-invalid=true]{outline:2px solid var(--accent)}.final-score-summary{padding:16px;border:1px solid var(--border);border-radius:8px;font-weight:700}#finalScoreError{font-weight:600}.final-score-scroll{margin-top:16px}@media(max-width:480px){.final-score-inputs{grid-template-columns:1fr}.final-score-scroll td,.final-score-scroll th{padding:6px;font-size:14px}}
.collection-progress-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}.collection-progress-filters button{min-height:44px;padding:8px 14px;border:1px solid var(--border);border-radius:24px;background:var(--surface);color:var(--ink);font-weight:600}.collection-progress-filters button[aria-pressed=true]{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}.collection-filter-status{margin:0 0 16px;color:var(--muted);font-size:.85rem}
.collection-status-bubbles{display:none}.collection-status-bubbles button{min-height:44px;border:1px solid var(--border);border-radius:24px;background:var(--surface);color:var(--ink);padding:7px 10px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:.85rem;white-space:normal;line-height:1.3}.collection-status-bubbles button.stage-full{border-color:var(--accent);background:var(--accent);color:var(--on-accent)}.collection-status-bubbles button.stage-partial{border-color:var(--accent)}.collection-status-bubbles button:focus-visible,.collection-progress-filters button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.collection-unit-row>summary>.collection-status-bubbles:before{content:none}
.collection-stage-panel{width:min(100%,400px);padding:24px;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--ink);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}.stage-panel-heading,.stage-panel-footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.stage-panel-heading h3{font-size:1.15rem;font-weight:700}.collection-stage-panel p{margin:12px 0;font-size:.9rem;overflow-wrap:anywhere}.collection-stage-panel button{min-height:44px;padding:8px 14px;border:1px solid var(--border);border-radius:8px;background:var(--raised);color:var(--ink)}.stage-panel-counter{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:end;gap:12px}.stage-panel-counter label{display:grid;gap:6px}.stage-panel-counter input{min-width:0;width:100%;min-height:48px;padding:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface);text-align:center;font-size:1.3rem;color:var(--ink)}.stage-panel-footer{margin-top:16px;justify-content:flex-end}.stage-panel-footer button:last-child{background:var(--accent);color:var(--on-accent)}#collectionStageError{font-weight:600}
@media(max-width:640px){#collectionPanel .collection-row>summary{display:grid;grid-template-columns:28px minmax(0,1fr) 20px!important;gap:8px!important;padding:14px!important}#collectionPanel .collection-row>summary>.bench-mark{grid-column:1;grid-row:1}#collectionPanel .collection-row>summary>span:nth-child(2){grid-column:2;grid-row:1}#collectionPanel .collection-row>summary:after{grid-column:3;grid-row:1;text-align:center}#collectionPanel .collection-row>summary>.muted{grid-column:2/-1;grid-row:2;padding-left:0;width:auto}#collectionPanel .collection-row>summary>.collection-status-bubbles{grid-column:1/-1;grid-row:3;width:100%}.collection-row>summary>.collection-status-bubbles,.collection-unit-row>summary>.collection-status-bubbles{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.collection-unit-row>summary>small{display:none}.collection-desktop-counters,.nested-painting-record>.collection-stage-grid{display:none}.unit-painting-record{padding:14px!important}.unit-painting-record .collection-editor-identity,.unit-painting-record .collection-editor-model-count{display:none}.unit-painting-record .unit-completion-actions{justify-content:flex-start;width:100%}.collection-row>summary b,.collection-unit-row>summary>span{overflow-wrap:anywhere}.collection-stage-panel{padding:20px}.collection-progress-filters{gap:6px}.collection-progress-filters button{padding:8px 12px}}
/* Quick play shares the contained learning layout while keeping direct controls. */
#playPanel.is-quick #matchTools{display:none}#playPanel.is-quick .quick-card{max-width:1050px;margin:0 auto;padding-bottom:32px}#playPanel.is-quick{padding-bottom:100px}.quick-card>header{display:flex;justify-content:space-between;align-items:center;gap:12px}.quick-controls{display:grid;grid-template-columns:100px minmax(140px,1fr) minmax(180px,1.5fr);gap:12px;margin:16px 0}.quick-controls label,.quick-commander-setup label,.quick-match-actions label{display:grid;gap:6px}.quick-card input,.quick-card select,.quick-card textarea{max-width:100%;min-width:0;min-height:44px;padding:9px 12px;border:1px solid var(--border);border-radius:8px;color:var(--ink);background:var(--surface);font:inherit}.quick-card select{background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--accent) 15%,var(--surface)))}.quick-card select option{background:var(--surface);color:var(--ink)}.quick-card textarea{width:100%;min-height:80px}.quick-workspace-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin-bottom:16px}.quick-workspace-tabs>button{min-height:44px;padding:8px 18px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--ink)}.quick-workspace-tabs>button[aria-selected=true]{background:var(--accent);color:var(--on-accent)}.quick-workspace-tabs label{margin-left:auto;display:flex;align-items:center;gap:8px;font-size:.9rem}.quick-setup,.quick-opponent-setup,.quick-deployment,.quick-round-notes,.quick-phase-reference,.quick-core-reminders,.quick-reserves{border:1px solid var(--border);border-radius:10px;margin:12px 0;background:var(--surface);overflow:hidden}.quick-card details>summary{padding:12px;cursor:pointer;overflow-wrap:anywhere}.quick-setup>div,.quick-opponent-setup>div,.quick-deployment>div,.quick-phase-reference>div{padding:0 12px 12px}.quick-setup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.quick-commander-setup{display:grid;gap:12px;align-content:start;padding:12px;min-width:0}.quick-card h3{margin:20px 0 12px;font-size:1.25rem}.quick-card h4{margin:12px 0;font-size:1.05rem;font-weight:700}.quick-card h5{font-weight:700;margin:12px}.quick-card p{margin:12px 0;line-height:1.55;overflow-wrap:anywhere}.quick-deployment>p,.quick-round-notes>p,.quick-round-notes>label,.quick-opponent-setup>p{margin:12px}.quick-unit-section{margin:20px 0}.quick-workspace-body{max-height:none;overflow:visible;overscroll-behavior:auto;padding:0 10px 10px 0}.quick-workspace-body[data-quick-view="reference"]{max-height:min(70dvh,850px);overflow-y:auto;overscroll-behavior:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}.quick-match-actions .settings-button{margin:4px}.quick-reference-note{color:var(--muted)}.quick-score-dock{position:fixed;right:20px;bottom:calc(20px + env(safe-area-inset-bottom));z-index:75;display:flex;align-items:center;gap:12px;border:1px solid var(--border);border-radius:14px;padding:14px 18px;min-height:48px;background:var(--accent);color:var(--on-accent);font-weight:700;box-shadow:0 4px 16px #0003}.quick-score-dock.hidden{display:none}.quick-score-drawer{position:fixed;inset:0;background:#0007;z-index:100;display:flex;justify-content:flex-end}.quick-score-drawer.hidden{display:none}.quick-score-panel{width:min(100%,430px);height:100dvh;display:flex;flex-direction:column;background:var(--surface);color:var(--ink);border-left:1px solid var(--border);animation:quick-score-side .18s ease-out}.quick-score-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-bottom:1px solid var(--border);flex-shrink:0}.quick-score-panel h2{font-size:1.25rem;font-weight:700}.quick-score-panel button{min-height:44px;padding:10px 14px;border:1px solid var(--border);border-radius:8px;background:var(--raised);color:var(--ink)}#quickScoreContent{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:20px 20px calc(20px + env(safe-area-inset-bottom))}#quickScoreContent input,#quickScoreContent select,#quickScoreContent textarea{width:100%;min-width:0;min-height:44px;background:var(--surface);color:var(--ink);border:1px solid var(--border);padding:10px;border-radius:8px}#quickScoreContent label{display:grid;gap:6px}#quickScoreContent p{margin:16px 0;font-size:.9rem}#quickScoreContent ul{padding:12px 20px}#quickScoreContent .bench-primary{width:100%;margin-top:20px;background:var(--accent);color:var(--on-accent)}.quick-score-context,.quick-score-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:20px}#quickScorePreview{border:1px solid var(--border);padding:12px;border-radius:8px;font-weight:600}#quickScoreError{font-weight:700}
@keyframes quick-score-side{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes quick-score-bottom{from{transform:translateY(100%)}to{transform:translateY(0)}}
@media(max-width:640px){#playPanel.is-quick .quick-card{padding:16px}.quick-controls{grid-template-columns:90px minmax(0,1fr);gap:10px}.quick-phase-control{grid-column:1/-1}.quick-workspace-tabs label{width:100%;margin-left:0;justify-content:space-between}.quick-workspace-tabs label select{flex:1;min-width:0}.quick-setup-grid{grid-template-columns:1fr}.quick-workspace-body{padding-right:4px}.quick-workspace-body[data-quick-view="reference"]{max-height:65dvh}.quick-score-dock{left:16px;right:16px;bottom:calc(12px + env(safe-area-inset-bottom));justify-content:space-between}.quick-score-drawer{align-items:flex-end}.quick-score-panel{width:100%;height:auto;max-height:90dvh;border-left:0;border-top:1px solid var(--border);border-radius:16px 16px 0 0;animation:quick-score-bottom .18s ease-out}.quick-score-panel>header{padding:14px 20px}#quickScoreContent{padding-top:16px}}
@media(prefers-reduced-motion:reduce){.quick-score-panel{animation:none}}

.learning-score-option,.learning-score-calculator{margin-top:20px;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.learning-score-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.learning-score-fields label,.learning-score-calculator details label{display:grid;gap:6px;margin:12px 0}.learning-score-calculator select,.learning-score-calculator input,.learning-score-calculator textarea{width:100%;min-width:0;min-height:44px;padding:10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--ink)}.learning-score-preview{padding:12px;border:1px solid var(--border);border-radius:8px;font-weight:600}.learning-score-actions{display:flex;flex-wrap:wrap;gap:8px}.learning-score-option button{margin:4px}#learningScoreError{font-weight:700}@media(max-width:640px){.learning-score-fields{grid-template-columns:1fr}.learning-score-actions button{width:100%;min-height:44px}}

/* Learning review: themed progress and compact visible unit status. */
.setup-wizard progress{appearance:none;width:100%;height:.45rem;border:0;border-radius:1rem;background:var(--subtle);overflow:hidden;color:var(--accent)}
.setup-wizard progress::-webkit-progress-bar{background:var(--subtle);border-radius:1rem}
.setup-wizard progress::-webkit-progress-value{background:linear-gradient(90deg,var(--accent),var(--active));border-radius:1rem}
.setup-wizard progress::-moz-progress-bar{background:linear-gradient(90deg,var(--accent),var(--active));border-radius:1rem}
.unit-status-badges{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.35rem}
.unit-status-badges small{font-size:.75rem;padding:.15rem .45rem;border:1px solid var(--border);border-radius:1rem;color:var(--ink);background:var(--subtle);white-space:normal;overflow-wrap:anywhere}
.learning-reserves{margin-block:1rem;padding:1rem;border:1px solid var(--border);border-radius:.75rem;background:var(--surface)}
.learning-reserves h5{font-size:1rem;margin-top:1rem}.ability-condition{padding:.65rem;border-left:3px solid var(--accent);background:var(--subtle);color:var(--ink)}

/* Staged table tracking: shared palette and existing entry gradients. */
.tracked-table-summary,.tracked-table-effects,.depravity-tracking{border:1px solid var(--border);border-radius:.7rem;background:var(--surface);color:var(--ink);padding:.85rem;margin-block:.75rem;overflow-wrap:anywhere}
.tracked-table-summary article,.tracked-table-effects article{border-top:1px solid var(--border);padding-block:.6rem}
#tableTrackingBody label,.depravity-tracking label{display:grid;gap:.4rem;margin-block:.75rem}
#tableTrackingBody label:has(input[type=checkbox]){display:flex;align-items:center}
.table-resolution-preview{padding:.75rem;border:1px solid var(--border);border-radius:.5rem;background:var(--subtle)}

/* Shared local search stays within reach in all play modes. */
.play-search-bar{position:sticky;top:var(--play-search-top,76px);z-index:30;background:var(--page);padding:.6rem 0;margin-bottom:.75rem}
.play-search-trigger{display:flex;align-items:center;gap:.6rem;min-height:44px;padding:.65rem 1rem;border:1px solid var(--entry-border,var(--border));border-radius:.65rem;background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink));text-align:left;overflow-wrap:anywhere}
.play-search-bar .play-search-trigger{width:100%}.play-search-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.play-search-dialog{width:min(100%,850px);max-height:90dvh;display:flex;flex-direction:column;overflow:hidden;background:var(--surface);color:var(--ink)}
.play-search-controls{padding:1rem;display:grid;gap:.5rem;border-bottom:1px solid var(--border);flex-shrink:0}
.play-search-controls label{font-size:.85rem}.play-search-controls input,.play-search-controls select{width:100%;min-height:44px;padding:.65rem;border:1px solid var(--border);border-radius:.5rem}
.play-search-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1rem}
.play-search-result{display:grid;grid-template-columns:5rem minmax(0,1fr);width:100%;gap:.25rem .75rem;padding:.8rem;text-align:left;border:1px solid var(--border);border-radius:.5rem;margin-bottom:.5rem;background:var(--surface);color:var(--ink)}
.play-search-result span{font-size:.8rem;color:var(--muted)}.play-search-result small{grid-column:2;color:var(--muted)}.play-search-result strong,.play-search-result small{overflow-wrap:anywhere}.play-search-result:hover,.play-search-result:focus-visible{background:var(--subtle);outline:2px solid var(--accent)}
#playSearchPreview>button{min-height:44px;padding:.5rem 1rem;border:1px solid var(--border);border-radius:.5rem;margin-bottom:1rem}#playSearchPreview h3{font-size:1.2rem;font-weight:700}#playSearchPreview p{margin:.75rem 0;overflow-wrap:anywhere}#playSearchPreview[hidden],#playSearchResults[hidden]{display:none}
@media(max-width:640px){.play-search-bar{padding:.5rem; padding-top:max(.5rem,env(safe-area-inset-top));margin-bottom:0}.play-search-dialog{max-height:95dvh}.play-search-controls{padding:.75rem}.play-search-result{grid-template-columns:4rem minmax(0,1fr)}}

/* Admin rules corrections use the same entry gradients and palette. */
.admin-unit-rule-dialog{width:min(100%,1050px);max-height:92dvh;display:flex;flex-direction:column;background:var(--surface);color:var(--ink);overflow:hidden}
.admin-unit-rule-dialog>.reference-dialog-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:1rem}.admin-unit-rule-dialog label{display:grid;gap:.4rem;margin:.6rem 0}.admin-rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.admin-rule-grid>*{min-width:0}.admin-unit-rule-dialog input,.admin-unit-rule-dialog textarea,.admin-unit-rule-dialog select{width:100%;min-height:44px;padding:.65rem;border:1px solid var(--border);border-radius:.5rem}.admin-unit-rule-dialog textarea{min-height:100px}.admin-unit-rule-dialog details,.admin-unit-rule-dialog fieldset{padding:.75rem;border:1px solid var(--border);border-radius:.5rem;margin-block:.75rem}.admin-unit-rule-dialog summary{cursor:pointer;min-height:44px;padding:.5rem}.admin-unit-rule-dialog button{min-height:44px;padding:.5rem .8rem;border:1px solid var(--border);border-radius:.5rem;background:var(--raised);color:var(--ink)}.admin-unit-rule-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.8rem;max-height:280px;overflow:auto;padding:.75rem;background:var(--subtle)}.admin-rule-actions{display:flex;flex-wrap:wrap;gap:.5rem}.unit-rule-refresh{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.35rem;font-size:.8rem;color:var(--muted)}.unit-rule-refresh button{min-height:36px;padding:.25rem .5rem;text-decoration:underline;color:var(--ink)}#adminRulePublish{background:var(--accent);color:var(--on-accent)}
@media(max-width:640px){.admin-rule-grid{grid-template-columns:minmax(0,1fr);gap:.25rem}.admin-unit-rule-dialog{max-height:95dvh}}

/* Paints is a page within the shared main column, above the footer. */
.app-main>#paintsPanel{width:100%;min-width:0;padding:26px 24px;box-sizing:border-box}

/* Shared themed confirmations, prompts and notices. Native dialog supplies focus trapping. */
dialog.app-dialog{position:fixed;inset:0;margin:auto;width:min(32rem,calc(100vw - 2rem));max-height:calc(100dvh - 2rem);padding:0;border:1px solid var(--border);border-radius:14px;overflow:auto;overscroll-behavior:contain;background:var(--surface);color:var(--ink);font:inherit;box-shadow:0 14px 55px #0005}
dialog.app-dialog:not([open]){display:none}dialog.app-dialog::backdrop{background:#0008;backdrop-filter:blur(3px)}.app-dialog-header{padding:1rem 1.25rem;border-bottom:1px solid var(--border);background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink))}.app-dialog-header h2{font-size:1.2rem;font-weight:700;margin:0}.app-dialog-body{padding:1.25rem}.app-dialog-body p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin:0}.app-dialog-body label{display:grid;gap:.5rem;margin-top:1rem}.app-dialog-body label[hidden]{display:none}.app-dialog-body input{width:100%;min-width:0;min-height:44px;padding:.7rem;border:1px solid var(--border);border-radius:8px}.app-dialog-actions{display:flex;justify-content:flex-end;gap:.75rem;padding:0 1.25rem 1.25rem;background:var(--surface);border:0}.app-dialog-actions button{min-height:44px;padding:.65rem 1rem;border:1px solid var(--border);border-radius:8px;background:var(--raised);color:var(--ink);font:inherit}.app-dialog-actions button[hidden]{display:none}#appDialogAccept{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}#appDialogAccept.danger{background:var(--error);border-color:var(--error);color:var(--on-accent)}.app-dialog-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:480px){.app-dialog-actions button{flex:1}.app-dialog-header,.app-dialog-body{padding:1rem}.app-dialog-actions{padding:0 1rem 1rem}}

.pile-in-help{margin-block:1rem;padding:1rem;border:1px solid var(--border);border-radius:.65rem;background:var(--surface);color:var(--ink)}.pile-in-help h4{font-weight:700;margin:0 0 .75rem}.pile-in-help ol{list-style:decimal;padding-left:1.4rem}.pile-in-help li{margin-block:.8rem}.pile-in-help li p{margin:.3rem 0;line-height:1.6}

.ability-availability{display:inline-block;font-size:.85rem;font-weight:600;line-height:1.5;color:var(--muted);margin-left:.35rem;overflow-wrap:anywhere}.ability-availability.is-ready,.reserve-ready{color:var(--ink);background:var(--subtle);border:1px solid var(--accent);border-radius:.4rem;padding:.2rem .45rem}.reference-rule-title h4{overflow-wrap:anywhere}

.opponent-turn-question{padding:1rem;border:1px solid var(--border);border-radius:.65rem;background:var(--surface);margin-block:1rem}.opponent-turn-question h4{font-weight:700;margin:0 0 .65rem}.opponent-turn-question>div{display:flex;flex-wrap:wrap;gap:.6rem}.opponent-turn-question button{min-height:44px;padding:.65rem .9rem;border:1px solid var(--border);border-radius:.5rem;background:var(--raised);color:var(--ink)}.opponent-unit-reference{margin-block:.8rem}.opponent-unit-reference>summary{padding:.75rem;cursor:pointer;overflow-wrap:anywhere}.opponent-unit-reference>div{padding:.75rem}.opponent-unit-reference .compact-weapon-profiles{margin-top:1rem}.opponent-warscrolls{scroll-margin-top:7rem}@media(max-width:640px){.opponent-turn-question button{width:100%}}

/* One scroll surface for Quick Play; only the all-phase Reference has an inner scroller. */
.play-search-bar{width:100%;max-width:1050px;margin-inline:auto;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:center;border-bottom:1px solid var(--border)}
#playPanel.is-learning>.play-search-bar,#playPanel.is-setup>.play-search-bar{max-width:780px}.play-search-bar>.play-search-trigger{grid-column:1;grid-row:1;min-width:0}.play-search-bar>.unit-rule-refresh{grid-column:2;grid-row:1;margin:0;gap:.6rem;max-width:260px;flex-wrap:wrap;justify-content:flex-end}
#playPanel .setup-wizard h3,.opponent-warscrolls{scroll-margin-top:calc(var(--play-search-top,0px) + var(--play-search-height,70px) + 12px)}
@media(max-width:640px){.play-search-bar{grid-template-columns:minmax(0,1fr);gap:.25rem}.play-search-bar>.unit-rule-refresh{grid-column:1;grid-row:2;max-width:none;justify-content:space-between}.play-search-bar{top:var(--play-search-top,0px)}}

.weapon-profile-kind>span{display:inline-block;padding:.2rem .55rem;border:1px solid var(--border);border-radius:.4rem;background:var(--subtle);color:var(--ink);font-size:.85rem;font-weight:600}

/* Expanded Spearhead choices only grow their own Home card. */
.home-cards{align-items:start}.home-cards>button,.home-cards>.home-spearhead-menu{align-self:start}

/* Keep scoring clear of phase navigation on every viewport. */
.quick-score-dock{bottom:calc(var(--play-navigation-clearance,96px) + env(safe-area-inset-bottom))}
.reference-rule-title{flex-wrap:wrap;align-items:center;gap:10px}.reference-rule-title h4{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}
.reference-rule-title .ability-use-pill{flex:0 0 auto;min-width:64px;min-height:44px;padding:8px 14px;border:1px solid var(--accent);border-radius:999px;background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--accent) 16%,var(--surface)));color:var(--ink);font-weight:650;white-space:nowrap}
.reference-rule-title .ability-use-pill[aria-pressed=true]{background:var(--accent);color:var(--on-accent)}.reference-rule-title .ability-use-pill:disabled{opacity:.55;cursor:not-allowed}.ability-use-pill:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.learning-score-history{padding:12px;border:1px solid var(--border);border-radius:10px}.learning-score-history label,.attack-support label{display:grid;gap:6px;margin:12px 0}.learning-score-history input,.learning-score-history select,.learning-score-history textarea,.attack-support input[type=text]{width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;color:var(--ink);background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--accent) 12%,var(--surface)));font:inherit}.learning-score-history textarea{min-height:80px}.attack-support .support-confirm{display:flex;align-items:flex-start;gap:10px;padding:8px 0}.support-confirm input{width:22px;height:22px;flex-shrink:0;accent-color:var(--accent)}
@media(max-width:640px){.quick-score-dock{bottom:calc(var(--play-navigation-clearance,96px) + env(safe-area-inset-bottom))}}

/* Faction trackers share the account's palette and ordinary form controls. */
.faction-tracking,.faction-unit-state{border:1px solid var(--border);border-radius:12px;padding:1rem;margin-block:1rem;min-width:0;overflow-wrap:anywhere}
.faction-tracking summary{cursor:pointer;font-weight:700;min-height:44px;align-content:center}
.faction-tracking label,.faction-unit-state label,.faction-resolution label{display:grid;gap:.4rem;margin-block:.75rem}
.faction-tracking input,.faction-tracking select,.faction-unit-state input,.faction-resolution input,.faction-resolution select{max-width:100%;min-height:44px;border-radius:8px;padding:.55rem;background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink));border:1px solid var(--border)}
label.faction-confirm{display:flex;align-items:center;gap:.65rem}
.faction-confirm input{flex:0 0 22px;width:22px;min-height:22px}
.faction-resolution button,.faction-tracking button,.final-save-actions button{min-height:44px}
.final-save-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-block:1rem}
/* Adaptive companion: one match, three presentation levels. */
.companion-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,230px);gap:12px;margin:18px 0;padding:16px;border:1px solid var(--entry-border,var(--border));border-radius:12px;background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink))}.companion-context{display:grid;gap:5px;overflow-wrap:anywhere}.companion-context span{font-size:14px}.companion-toolbar label{display:grid;gap:6px;font-size:14px}.companion-toolbar select,.companion-score-dialog :is(input,select,textarea){font:inherit;font-size:16px;width:100%;min-width:0;min-height:44px;padding:10px;border:1px solid var(--entry-border,var(--border));border-radius:8px;background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink))}.companion-toolbar select option,.companion-score-dialog select option{background:var(--surface);color:var(--ink)}.companion-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px}.companion-actions button,.companion-score-dialog button{min-height:44px;padding:10px 16px;border-radius:8px;border:1px solid var(--border);background:var(--raised);color:var(--ink)}.companion-choice{margin:18px 0;padding:16px;border:1px solid var(--border);border-radius:12px;min-width:0}.companion-choice legend{padding:0 6px;font-size:18px;font-weight:650}.companion-option{display:flex;align-items:center;gap:12px;padding:14px;margin:10px 0;border:1px solid var(--border);border-radius:10px;background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink));min-height:64px}.companion-option.selected{outline:2px solid var(--accent);outline-offset:0}.companion-option input[type=radio]{width:22px;height:22px;flex-shrink:0;accent-color:var(--accent)}.companion-option span{display:grid;gap:4px;min-width:0}.companion-option small{font-size:14px;line-height:1.5}.companion-choice p{font-size:14px}.companion-state,.companion-phase-help{margin:16px 0;padding:12px;border:1px solid var(--border);border-radius:10px}.companion-state>summary,.companion-phase-help>summary,.companion-phase-rules>summary{min-height:44px;padding:10px 0;font-weight:650}.companion-state p,.companion-phase-hint{margin:10px 0;overflow-wrap:anywhere}.companion-score-dialog{width:min(100%,720px);max-height:90dvh;display:flex;flex-direction:column;overflow:hidden}.companion-score-dialog>.reference-dialog-body{overflow-y:auto;min-height:0;overscroll-behavior:contain;padding:16px 16px max(16px,env(safe-area-inset-bottom))}.companion-score-dialog label{display:grid;gap:6px;margin:12px 0}.companion-score-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.companion-score-dialog .bench-primary{background:var(--accent);color:var(--on-accent)}.keyword-chip{min-height:44px;min-width:44px;vertical-align:middle}.companion-toolbar :is(button,select):focus-visible,.companion-choice input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:640px){.companion-toolbar{grid-template-columns:minmax(0,1fr);padding:12px}.companion-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.companion-actions button{padding:10px 6px}.companion-score-fields{grid-template-columns:minmax(0,1fr);gap:0}.companion-choice{padding:12px}.companion-option{padding:12px}.companion-score-dialog{max-height:94dvh}.companion-toolbar strong{font-size:16px}}
.companion-twist{margin:14px 0}.companion-twist label{display:grid;gap:6px}.companion-twist textarea{width:100%;min-height:80px;padding:10px;font-size:16px;border:1px solid var(--entry-border,var(--border));border-radius:8px;background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink))}

/* Compact keeps units and phase controls ahead of optional explanations. */
.companion-compact .setup-progress{display:none}.companion-compact .learning-step-body{min-width:0}.companion-compact-workspace{display:grid;gap:12px;min-width:0}.companion-phase-picker{display:grid;gap:6px;font-size:14px}.companion-phase-picker select{width:100%;min-width:0;min-height:44px;font:inherit;font-size:16px;padding:10px;border:1px solid var(--entry-border,var(--border));border-radius:8px;background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink))}.companion-phase-picker option{background:var(--surface);color:var(--ink)}.companion-compact .quick-unit-section{min-width:0;overflow-wrap:anywhere}.companion-compact .learning-tools{margin-top:12px}.companion-compact .companion-toolbar{margin-block:12px}.companion-phase-abilities>h4{margin:0 0 8px}
@media(max-width:640px){.companion-compact .companion-toolbar{padding:10px}.companion-compact-workspace{gap:10px}.companion-compact .reference-unit-row>summary{min-height:44px;flex-wrap:wrap}.companion-compact .reference-unit-row>summary>*{min-width:0;overflow-wrap:anywhere}}

#attackGuideModal .phase-navigation-controls button{white-space:normal;overflow-wrap:anywhere;min-width:0}

/* Compact reference workspace: profiles stay visible; rule prose opens on demand. */
.companion-reference-workspace{min-width:0;width:100%;max-width:1180px;margin:auto;padding:16px}.companion-reference-workspace>header{display:flex;justify-content:space-between;align-items:center;gap:12px}.companion-reference-workspace :is(select,textarea){font:inherit;font-size:16px;min-height:44px;min-width:0;width:100%;padding:10px;border:1px solid var(--entry-border,var(--border));border-radius:8px;background:linear-gradient(135deg,var(--entry-start,var(--surface)),var(--entry-end,var(--raised)));color:var(--entry-ink,var(--ink))}.companion-reference-workspace option{background:var(--surface);color:var(--ink)}.companion-reference-workspace button,.companion-reference-workspace summary{min-height:44px}.companion-reference-workspace summary{cursor:pointer;padding:10px 0}.companion-reference-workspace>details{margin:12px 0;border:1px solid var(--border);border-radius:10px;padding:0 12px}.companion-reference-workspace label:not(.companion-all-abilities){display:grid;gap:5px}.companion-reference-controls{display:grid;grid-template-columns:80px minmax(110px,1fr) minmax(130px,1fr);gap:10px;margin:12px 0}.companion-reference-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);align-items:start;gap:16px}.companion-profile-card{min-width:0;margin:10px 0;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.companion-profile-card>header{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.companion-profile-card h4{margin:0;font-weight:700}.companion-profile-card .phase-unit-stats{font-size:14px;margin:8px 0}.companion-profile-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px}.companion-profile-table :is(th,td){padding:6px 2px;text-align:center;overflow-wrap:anywhere}.companion-profile-table thead{background:var(--raised)}.companion-profile-table tbody th{text-align:left;border-top:1px solid var(--border);padding-top:10px}.companion-profile-table small{font-weight:400}.companion-ability-row{border:1px solid var(--border);border-radius:9px;padding:0 10px;margin:8px 0}.companion-ability-row summary span{display:grid;gap:3px}.companion-ability-row summary small{font-size:12px;color:var(--muted)}.companion-all-abilities{display:flex;align-items:center;gap:8px;min-height:44px}.companion-all-abilities input{width:22px;height:22px}.companion-reference-setup{min-width:0}.companion-reference-setup label{margin:10px 0}.companion-reference-workspace .companion-profile-army h3,.companion-reference-abilities h3{font-size:18px;margin:12px 0}
@media(max-width:700px){.companion-reference-workspace{padding:10px}.companion-reference-grid{grid-template-columns:minmax(0,1fr)}.companion-reference-controls{grid-template-columns:64px minmax(90px,1fr) minmax(100px,1fr);gap:6px}.companion-profile-card{padding:10px}.companion-profile-table{font-size:12px}}

.companion-reference-jumps{display:flex;gap:10px;margin:10px 0}.companion-reference-jumps a{display:flex;align-items:center;min-height:44px;padding:8px 16px;border:1px solid var(--border);border-radius:8px;color:var(--ink);background:var(--raised)}.companion-reference-abilities,.companion-profile-army{scroll-margin-top:12px}

/* Keep army tables aligned with their card, including narrow mobile dialogs. */
.ability-table{box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin-inline:0;text-align:start}
.ability-table>.overflow-x-auto{box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin-inline:0}
.ability-table table{table-layout:fixed;width:100%;max-width:100%;margin-inline:0}
.ability-table :is(th,td){overflow-wrap:anywhere;text-align:start}
.ability-table :is(th,td):first-child{width:4.5rem;white-space:nowrap}
.ability-table .ability-table-effect{white-space:pre-wrap;margin-block:.5rem}
@media(max-width:480px){.ability-table :is(th,td){padding:.5rem}.ability-table :is(th,td):first-child{width:3.5rem}.depravity-tracking{padding:.65rem}}

/* Saved-match administration: native checkboxes and wrapping rows at every width. */
#adminMatchesModal{z-index:80}#adminMatchesModal .reference-dialog{width:min(100%,900px);max-height:calc(100dvh - 32px);font-size:16px}#adminMatchesModal .reference-dialog>header h2{font-size:1.25rem;line-height:1.3}.admin-matches-body{min-width:0}.admin-matches-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.admin-matches-toolbar .admin-matches-filter{display:flex;flex-direction:row;align-items:flex-start;gap:10px;margin:0;flex:1 1 260px;min-width:0;line-height:1.5;cursor:pointer}.admin-matches-filter span{min-width:0;overflow-wrap:anywhere}#adminMatchesModal input[type=checkbox]{appearance:auto;width:20px;height:20px;min-width:20px;min-height:20px;flex:0 0 20px;padding:0;margin:2px 0 0;accent-color:var(--accent);border-radius:4px}.admin-matches-toolbar>button{flex:0 0 auto;min-height:44px;margin:0}.admin-match-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid var(--border)}.admin-match-row>div{min-width:0}.admin-match-row h3{font-size:1rem;line-height:1.4;margin:0;overflow-wrap:anywhere}.admin-match-row p{overflow-wrap:anywhere}.admin-match-row button{min-height:44px;white-space:normal}.enhancement-advice{border-left:3px solid var(--accent);padding:4px 12px;margin-top:12px;background:var(--subtle)}.enhancement-advice p{margin:8px 0;overflow-wrap:anywhere;line-height:1.6}@media(max-width:600px){.admin-match-row{grid-template-columns:minmax(0,1fr);gap:8px}.admin-match-row button{width:100%}.admin-matches-toolbar>button{width:100%}}
/* Current task first, with recovery always within reach. */
.companion-battle-strip{position:sticky;top:0;z-index:25;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;margin-block:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--ink);box-shadow:0 3px 10px #0002;scroll-margin-top:110px}
.companion-battle-strip>div{display:grid;gap:3px;min-width:0}.companion-battle-strip span{font-size:13px;color:var(--muted)}.companion-battle-strip nav{display:flex;flex-wrap:wrap;gap:6px}.companion-battle-strip button,.defending-guide button{min-height:44px;min-width:44px;padding:8px 12px;border:1px solid var(--border);border-radius:8px;background:var(--raised);color:var(--ink)}.companion-battle-strip p{flex-basis:100%;font-size:13px;line-height:1.4;margin:0;overflow-wrap:anywhere}.companion-battle-strip button:disabled{opacity:.5}.companion-current-action{padding:16px;margin-block:16px;border:1px solid var(--border);border-left:4px solid var(--accent);border-radius:10px;background:var(--surface);color:var(--ink)}.companion-current-action h4{font-size:20px;margin:4px 0}.companion-current-action p{line-height:1.5;margin:8px 0}.companion-current-action small{display:block;color:var(--muted);margin-block:8px}.companion-current-action button{min-height:44px;padding:10px 16px;border-radius:8px}.companion-step-explanation>summary{min-height:44px;align-content:center;cursor:pointer;font-weight:650;padding:10px 0}.defending-guide{width:min(100%,680px);max-height:90dvh;display:flex;flex-direction:column}.defending-guide>.reference-dialog-body{overflow-y:auto;min-height:0;padding:16px;overscroll-behavior:contain}.defending-guide label{display:grid;gap:6px}.defending-guide select{width:100%;min-width:0;min-height:44px;font-size:16px;padding:8px;background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:8px}.defending-guide li{margin:12px 0;line-height:1.5}.defending-guide .unit-defence{display:block;font-size:20px;margin-block:12px}.companion-battle-strip :focus-visible,.defending-guide :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:420px){.companion-battle-strip{padding:8px;gap:6px}.companion-battle-strip>div{flex-basis:100%}.companion-battle-strip nav{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.companion-battle-strip button{padding:8px 6px}.companion-current-action{padding:12px}.companion-current-action h4{font-size:18px}}
.rules-updates-dialog{width:min(100%,1000px);max-height:92dvh;display:flex;flex-direction:column;min-width:0}.rules-updates-dialog>.reference-dialog-body{overflow-y:auto;min-height:0;padding:16px;overscroll-behavior:contain}.rules-updates-filters{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rules-updates-filters label{display:grid;gap:6px}.rules-updates-filters :is(input,select){width:100%;min-width:0;min-height:44px;padding:10px;font-size:16px;background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:8px}.rules-update-featured{padding:16px;border:1px solid var(--border);border-left:4px solid var(--accent);border-radius:10px;margin:12px 0}.rules-updates-dialog a{color:var(--accent);text-decoration:underline;overflow-wrap:anywhere}.rules-updates-dialog p{line-height:1.5;margin-block:10px}.rules-updates-dialog summary{cursor:pointer;min-height:44px;align-content:center}.rules-updates-dialog button{min-height:44px}.rules-updates-dialog :focus-visible{outline:2px solid var(--accent);outline-offset:3px}@media(max-width:640px){.rules-updates-filters{grid-template-columns:minmax(0,1fr)}.rules-updates-dialog>.reference-dialog-body{padding:12px}}
/* 1.0.2 empty collection (UI-065, UI-067): one way in, no zero tallies or bulk tools until there are units. */
#collectionPanel.collection-is-empty :is(.collection-undo-row,.hobby-projects,#collectionFilterStatus,.collection-workspace-bar,#collectionCompactSummary,#collectionDashboard,.bench-filter,#collectionProgressFilters,.bench-heading-actions .bench-primary){display:none!important}
.collection-empty-state h3{font-size:1.25rem;font-weight:800;margin:0 0 6px}
.collection-empty-state p{margin:0 auto 14px;max-width:46ch;color:var(--muted)}
.collection-empty-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.collection-empty-actions button{min-height:44px;padding:8px 14px;border:1px solid var(--border);border-radius:10px;background:var(--raised);color:var(--ink);font-weight:600}
.collection-empty-actions .bench-primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
/* 1.0.2 Paints empty states (UI-073, UI-074): the way to add paint comes first; shelf tools wait until there is paint. */
#paintWorkspace.paint-shelf-empty :is(.settings-label,.reference-unit-help,.bench-tools,#paintOwnedSort){display:none!important}
#paintWorkspace.paint-shelf-empty>.settings-button{display:none!important}
.paint-empty{text-align:center;padding:24px 12px}
.paint-empty h3{font-size:1.15rem;font-weight:800;margin:0 0 6px}
.paint-empty p{margin:0 auto 12px;max-width:44ch;color:var(--muted)}
.paint-empty-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.paint-empty-actions button{min-height:44px;padding:8px 14px;border:1px solid var(--border);border-radius:10px;background:var(--raised);color:var(--ink);font-weight:600}
.paint-empty-actions .bench-primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
/* 1.0.2 paint catalogue toggles (UI-005, UI-070, UI-071) and table header (S8). */
.paint-membership .paint-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:6px 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--ink);font-weight:600;white-space:nowrap}
.paint-membership .paint-toggle.is-on{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.paint-colour-table th{white-space:nowrap}
.paint-colour-table th button{white-space:nowrap}
/* 1.0.2 (owner, 6 Nov): the "thinking" indicator: the HobbyKnife shield turning like a coin, beside the message.
   With reduced motion it pulses gently instead of turning. */
.hk-loading{display:flex;align-items:center;justify-content:center;gap:12px;padding:28px 12px;color:var(--muted);font-weight:600;text-align:left}
.hk-loading-mark{display:inline-grid;place-items:center;width:40px;height:40px;flex:none;perspective:200px}
.hk-loading-mark i{font-size:28px;color:var(--accent);animation:hk-turn 1.6s cubic-bezier(.45,0,.55,1) infinite;transform-style:preserve-3d;will-change:transform}
.hk-loading-sm{padding:10px 0;justify-content:flex-start;font-size:.92rem}.hk-loading-sm .hk-loading-mark{width:24px;height:24px}.hk-loading-sm .hk-loading-mark i{font-size:18px}
.hk-loading-lg{flex-direction:column;gap:16px;padding:0;font-size:1.05rem;color:inherit}.hk-loading-lg .hk-loading-mark{width:72px;height:72px}.hk-loading-lg .hk-loading-mark i{font-size:56px}
@keyframes hk-turn{0%{transform:rotateY(0)}100%{transform:rotateY(360deg)}}
@keyframes hk-pulse{0%,100%{opacity:1}50%{opacity:.35}}
@media(prefers-reduced-motion:reduce){.hk-loading-mark i{animation:hk-pulse 1.6s ease-in-out infinite}}
