/* Phase-independent screen allocation. Only the actual window changes board geometry. */
.workspace{position:relative}.match-journal p[data-team="0"]{color:#f0a4ad}.match-journal p[data-team="1"]{color:#a5c9f2}.match-journal p[data-team=neutral]{color:#bdcbd5}
.fan-hand{--card-width:76px;--card-height:104px;--step:62px;height:136px;max-width:100%;margin:0 auto}.hand-card .card{width:var(--card-width);height:var(--card-height);font-size:23px;padding:8px}.hand-card .card strong{font-size:29px}.hand-card.is-selected:after{content:'SELECTED';bottom:-16px}.hand-card.deployed .card{opacity:.52;filter:saturate(.4)}.hand-card.deployed:after{display:none}.packet-caption{position:absolute;top:calc(var(--card-height) + 5px);left:-10px;width:calc(var(--card-width) + 20px);text-align:center;color:#c7d4dd;font:11px Segoe UI,sans-serif;line-height:1.2;pointer-events:none}.deployment-fan .hand-card.is-selected:after{display:none}.deployment-fan .hand-card:hover,.deployment-fan .hand-card:focus-within,.deployment-fan .hand-card.is-selected{z-index:30}.deployment-tray{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.deployment-tray:has(.packet-group:only-child){grid-template-columns:1fr}.packet-group{min-width:0}.packet-group h3{font-size:12px;text-align:center;margin:0 0 2px}.hand-dock{padding:8px 16px;min-height:0}.context-content{min-width:0}.hand-tools{height:28px;flex-wrap:nowrap}.phase-actions{min-height:28px;padding-top:0;max-height:44px;overflow:auto}.phase-actions .note{display:none}.phase-place .phase-actions{font-size:12px;line-height:1.3;min-height:28px}.phase-place .phase-actions .action-hint{font-size:12px}.phase-overview #score-presentation{max-height:194px;overflow:auto}.score-review{position:absolute;left:16px;right:16px;bottom:3px;margin:0;padding:0;z-index:70;background:#15232d}.score-review[open]{max-height:55%;overflow:auto;padding:12px;border:1px solid var(--line);bottom:28px;box-shadow:0 5px 20px #0006}.secondary{position:relative;margin:0 16px;align-self:center}.secondary[open]{position:absolute;bottom:28px;left:0;right:0;max-height:60%;overflow:auto;z-index:71;background:#15232d;padding:12px;border:1px solid var(--line)}.workspace:has(.score-review) .secondary:not([open]){margin-left:auto;margin-right:16px;width:max-content}.workspace:has(.score-review) .secondary:not([open])>summary{font-size:10px}.workspace:has(.score-review) .score-review:not([open]){right:auto;bottom:8px;max-width:48%}.score-review:not([open])>summary{font-size:10px}
.results-overlay{position:absolute;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:12px;background:#07111a38;pointer-events:auto}.results-overlay .battle-results{display:flex;flex-direction:column;gap:0;width:min(690px,91%);max-height:100%;margin:0;padding:0;min-height:0;background:#152632f2;box-shadow:0 6px 24px #0005;border:1px solid #7c775f;border-top:3px solid #d6bc83;border-radius:6px}.results-scroll{padding:12px 16px;overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin}.results-scroll>.result-heading{display:block}.results-scroll .result-heading h2{font-size:22px;margin:3px 0}.results-scroll .result-heading p{font-size:12px;margin:4px 0 8px}.results-scroll>.result-heading .eyebrow{display:none}.results-scroll>table{margin:0}.results-scroll th,.results-scroll td{padding:3px 8px!important;line-height:1.25}.results-scroll>.status-note{font-size:11px;line-height:1.3;margin:7px 0 0}.results-actions{flex:none;display:flex;justify-content:space-between;gap:10px;padding:9px 14px;border-top:1px solid #44535e;background:#172b37}.results-actions button{min-height:34px;font-size:12px}.results-overlay .result-details{display:block}.results-overlay .result-details h3{margin-top:14px}.results-overlay .result-details p{font-size:12px}.battle-stage:has(.results-overlay) #troops{pointer-events:none}
.battle-stage.drop-allowed{outline:2px solid #b9d3ac;outline-offset:-2px}.battle-stage.drop-rejected{outline:2px dashed #dbb28d;outline-offset:-2px}#drag-card{pointer-events:none}#drag-card .card{width:76px;height:104px;box-shadow:0 7px 14px #0006}#drag-card .card strong{font-size:29px}.hand-card:has([data-card]:active){z-index:40}
@media(min-width:951px){.workspace,.phase-result .workspace,.phase-end .workspace{height:calc(100dvh - 48px);min-height:0;display:grid;grid-template-rows:132px minmax(0,1fr) 210px 28px;grid-template-areas:'phase' 'field' 'context' 'secondary'}.workspace>.phase-header{grid-area:phase;height:132px;min-height:132px;padding:12px 18px;align-items:start;overflow:hidden}.workspace>.phase-header h2{font-size:22px}.phase-header:has(+.pegging-strip)>div{width:33%}.phase-header:has(+.pegging-strip) .turn-label{position:absolute;top:105px;left:18px;font-size:10px;padding:3px;margin:0}.workspace>.pegging-strip{position:absolute;top:7px;right:12px;width:63%;height:116px;padding:0;z-index:10;grid-area:auto}.pegging-strip .pegging-table,.pegging-strip .pegging-table.targeting{height:116px;grid-template-columns:82px minmax(0,1fr) 125px;gap:3px 8px;padding:6px 8px;border-radius:6px}.pegging-strip .running-count{font-size:32px}.pegging-strip .sequence-history,.pegging-strip .targeting .sequence-history{max-height:92px}.pegging-strip .play-area{font-size:11px;letter-spacing:0}.pegging-strip .target-table-note{font-size:11px;line-height:1.4}.pegging-strip .pegging-feedback{max-height:16px;overflow:hidden;font-size:11px;padding:0}.phase-header:has(+.pegging-strip) p{font-size:12px;line-height:1.35}.workspace>.field{grid-area:field;min-height:0;padding:0 12px;display:grid;grid-template-rows:30px minmax(0,1fr) 22px;position:relative}.workspace .battle-stage,.workspace .battle-stage canvas{height:100%;width:100%;min-height:0}.fieldhead{padding:0 6px 2px;height:30px;min-height:0}.field>.inspect{height:22px;padding:3px 6px;min-height:0}.field>#action-error:not(:empty){position:absolute;bottom:22px;left:18px;right:18px;z-index:60;background:#27313a;border:1px solid #a5896c;padding:6px}.workspace>.hand-dock,.phase-result .hand-dock,.phase-end .hand-dock,.phase-combat .hand-dock,.phase-reveal .hand-dock{grid-area:context;height:210px;min-height:0;padding:8px 16px;align-items:start}.phase-result .context-content,.phase-end .context-content{align-self:start}.phase-result .starter-feature small,.phase-end .starter-feature small,.phase-combat .starter-feature small{display:block}.workspace>.secondary{grid-area:secondary}.workspace>.score-review{grid-area:auto}.phase-result .hand-dock .phase-actions,.phase-end .hand-dock:has(.phase-actions:empty) .phase-actions{display:none}}
@media(max-width:950px){.workspace,.phase-result .workspace,.phase-end .workspace{display:grid;grid-template-rows:156px 380px auto 28px;grid-template-areas:'phase' 'field' 'context' 'secondary';height:auto;min-height:calc(100dvh - 48px)}.workspace>.phase-header{grid-area:phase;min-height:156px;height:156px}.phase-header:has(+.pegging-strip)>div{max-width:40%}.phase-header:has(+.pegging-strip) .turn-label{display:none}.workspace>.pegging-strip{position:absolute;top:6px;right:8px;width:57%;height:140px;padding:0;z-index:10}.pegging-strip .pegging-table,.pegging-strip .pegging-table.targeting{height:140px;grid-template-columns:75px minmax(0,1fr);gap:4px}.pegging-strip .play-area,.pegging-strip .target-table-note{grid-row:2;grid-column:1/-1;min-height:32px;margin:0}.pegging-strip .sequence-history,.pegging-strip .targeting .sequence-history{max-height:74px}.pegging-strip .pegging-feedback{display:none}.workspace>.field{grid-area:field;display:grid;grid-template-rows:30px minmax(0,1fr) 22px;min-height:0;padding:0 6px}.workspace .battle-stage,.workspace .battle-stage canvas{height:100%;min-height:0;width:100%}.workspace>.hand-dock{grid-area:context;min-height:210px}.workspace>.secondary{grid-area:secondary}.deployment-tray{grid-template-columns:1fr;gap:8px}.results-overlay{padding:6px}.results-overlay .battle-results{width:96%}.results-scroll{padding:10px}.results-scroll .result-heading h2{font-size:20px}.results-scroll th,.results-scroll td{font-size:11px!important}.results-actions{padding:7px}.phase-header:has(+.pegging-strip) h2{font-size:18px}.phase-header:has(+.pegging-strip) p{font-size:11px}.fan-hand{--card-width:76px;--card-height:104px;--step:58px}.hand-tools{flex-wrap:wrap;height:auto;min-height:28px}.phase-overview #score-presentation{max-height:none}.hand-dock:has(#score-presentation){min-height:0}.score-review{position:relative;left:auto;right:auto;bottom:auto;grid-area:auto}.score-review[open]{position:absolute;left:8px;right:8px;bottom:28px}}
@media(max-width:570px){.fan-hand{--card-width:62px;--card-height:88px;--step:38px;height:126px}.hand-card .card{font-size:21px;padding:6px}.hand-card .card strong{font-size:26px}.packet-caption{font-size:10px;left:-3px;width:calc(var(--card-width) + 6px)}.hand-dock{grid-template-columns:50px minmax(0,1fr)}.phase-header:has(+.pegging-strip)>div{max-width:39%}.phase-header:has(+.pegging-strip) h2{font-size:16px}.pegging-strip .running-count{font-size:25px}.pegging-strip .table-card{width:29px;height:42px;font-size:12px}.pegging-strip .table-card strong{font-size:15px}.pegging-strip .played-owner{font-size:9px}.pegging-strip .pegging-table,.pegging-strip .pegging-table.targeting{grid-template-columns:66px minmax(0,1fr)}.results-scroll .result-heading p{font-size:11px}}
.packet-caption{left:0;width:var(--card-width);font-size:11px;white-space:nowrap;transform:rotate(calc(-1 * var(--angle)));transform-origin:center}.phase-place .deployment-fan{height:150px}.phase-place .phase-actions{margin-top:1px;max-height:30px}.results-overlay .battle-results{background:#152632e6;width:min(620px,86%)}
/* Closed technical disclosures must fit their reserved footer row. */
.workspace>.secondary:not([open]){padding:0;min-height:0;line-height:18px}.phase-result .musket-reload,.phase-end .musket-reload{display:none}
.workspace>.secondary:not([open]){height:20px;overflow:hidden}.workspace>.secondary:not([open])>summary{padding:0;min-height:0;line-height:18px}.hand-tools{height:24px;min-height:24px}.hand-tools button{min-height:24px;padding:3px 8px}.hand-dock .phase-actions button{min-height:32px;padding:5px 12px}.phase-place .deployment-fan{height:146px}
.phase-peg:not(.inspect-mode):has(.spell-squad-action) .squad-label{pointer-events:none}
/* Starter and hand cards share one responsive size and the same face styling. */
:root{--playing-card-width:76px;--playing-card-height:104px;--playing-card-font:23px;--playing-card-suit:29px;--playing-card-padding:8px}
.fan-hand{--card-width:var(--playing-card-width);--card-height:var(--playing-card-height)}
.workspace>.hand-dock{grid-template-columns:calc(var(--playing-card-width) + 12px) minmax(0,1fr)}
.hand-dock .starter-feature>.card,.hand-dock .hand-card>.card{width:var(--playing-card-width);height:var(--playing-card-height);padding:var(--playing-card-padding);border-radius:7px;font-size:var(--playing-card-font);position:relative}
.hand-dock .starter-feature>.card{border:2px solid #d1cbbf;flex:none}
.hand-dock .starter-feature .card strong,.hand-dock .hand-card .card strong{font-size:var(--playing-card-suit);align-self:flex-end}
.hand-dock .starter-feature .card-repeat,.hand-dock .hand-card .card-repeat{display:flex;text-align:left}
@media(max-width:570px){:root{--playing-card-width:62px;--playing-card-height:88px;--playing-card-font:21px;--playing-card-suit:26px;--playing-card-padding:6px}}
.hand-dock .starter-feature .card-repeat,.hand-dock .hand-card .card-repeat{color:inherit;font-family:inherit;line-height:normal}
/* Decorative Variant A sits behind the unchanged, fully interactive board. */
.ship-outline-layer{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:-1}
.fieldhead,.field>.inspect{position:relative;z-index:2}

/* Disabled overlapping cards stay solid; muting must never reveal the card beneath. */
.hand-card.unplayable .card,.hand-card.unplayable:hover .card,.hand-card.deployed .card,.hand-card .card:disabled{opacity:1;filter:saturate(.45);background-color:#d4d1ca;cursor:default}
.hand-card.unplayable:not(.is-selected):hover{transform:rotate(var(--angle));z-index:var(--order)}
.game-shell .hull-corner[data-hud-slot=local]{left:6px;right:auto}.game-shell .hull-corner[data-hud-slot=opponent]{right:6px;left:auto}

.played-card.new-play.local-play{animation-name:play-red}.played-card.new-play.opponent-play{animation-name:play-blue}

/* Only interactive preparation overlays follow the local team, never the deck fill. */
.game-shell{--placement-color:#ed777c}.game-shell[data-local-player="1"]{--placement-color:#79a9f0}
.game-shell.phase-place .battle-stage.drop-allowed{outline-color:var(--placement-color)}
.game-shell.phase-place .deployment-fan .hand-card.is-selected>.card{border-color:var(--placement-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--placement-color) 36%,transparent)}
#deployment-drag[data-placement-owner="0"] .card{border-color:#ed777c}#deployment-drag[data-placement-owner="1"] .card{border-color:#79a9f0}
.game-shell .investment-squad-action:focus-visible{outline-color:var(--placement-color)}.game-shell .investment-hover[data-kind=preview]{color:var(--placement-color);border-color:var(--placement-color)}
