/* Training and roster share the logical landscape surface, including portrait rotation. */
#build-view{background:linear-gradient(135deg,#e5f5dded,#e0f1cef5),url('./assets/stadiums/football.webp') center/cover!important}
#build-view .build-tools{overflow:hidden!important;padding:0;border:0;background:#f9fff3ed;box-shadow:none;min-height:0}
#build-view .unit-filters{position:relative;z-index:2;flex:0 0 38px;display:flex;background:#f9fff3;margin:0;border-bottom:2px solid #54845c}
#build-view .unit-filters button{flex:1;min-width:0;padding:0 2px;font-size:12px;min-height:36px}
#build-view .unit-picker{flex:1;overflow:auto!important;height:0;min-height:0;display:grid;grid-template-columns:1fr;grid-auto-rows:max-content;padding:5px 5px 10px;gap:6px;overscroll-behavior:contain}
#build-view .unit-card{position:relative;display:grid;grid-template-columns:46px minmax(0,1fr);grid-template-rows:22px 18px 18px 18px;min-height:88px!important;height:auto!important;padding:4px!important;text-align:left;cursor:pointer;gap:0 3px}
#build-view .unit-card .unit-icon{grid-column:1;grid-row:1/5;align-self:center;width:44px;height:62px}
#build-view .unit-card .glyph{display:none}
#build-view .unit-card .name{grid-column:2;grid-row:1;display:block;min-height:0;height:22px;width:100%;padding:0 21px 0 0;border:0;background:transparent;box-shadow:none;color:var(--navy);font-size:13px;text-align:left;white-space:nowrap;text-shadow:none}
#build-view .unit-card .role{grid-column:2;grid-row:2;font-size:11px;color:#405566;display:block;white-space:nowrap}
#build-view .unit-card .attack-targets{grid-column:2;grid-row:3;font-size:11px;color:#263c51;display:block;white-space:nowrap}
#build-view .unit-card .cost{grid-column:2;grid-row:4;position:static;font-size:11px;display:block}
#build-view .unit-card .player-info{position:absolute;right:3px;top:0;min-height:26px;width:25px;min-width:25px;padding:0;border:0;background:transparent;box-shadow:none;font-size:16px;color:#315d96;z-index:1;line-height:1}
#build-view .training-requirement{grid-column:2;grid-row:5;font-size:10px;line-height:1.2;color:#91501a;font-weight:850}
#build-view .training-locked{background:#e6e9e2!important;border-style:dashed!important}
#build-view .training-locked .unit-icon{opacity:.55}
#build-view #quick-placement{max-width:calc(100% - 192px);width:100%}
#quick-placement .quick-buttons{flex:1}
#quick-placement .quick-buttons button{flex:1;min-width:0;min-height:38px;white-space:nowrap}
#build-view .production-controls{gap:3px}
#build-view .production-controls #build-fit{font-size:11px;padding:0 6px}
#training-minimap{position:absolute;top:var(--pad-t);left:calc(var(--pad-l) + 285px);width:min(140px,14cqw);height:44px;z-index:12;border:1px solid #597e6a;border-radius:4px;touch-action:none;background:#193a31;cursor:pointer}
#app.production-open #match-progress{max-width:24cqw;font-size:clamp(10px,2.8cqh,13px)}
#app .economy #resource-label{display:block;font-size:10px;font-weight:850;color:#fff;text-shadow:0 1px 2px var(--navy)}
#grid[data-dragging]{cursor:grabbing}
.player-preview{display:block;width:100%;height:100%;min-height:0}
.preview-phase{display:block;font-size:11px;font-weight:850;text-align:center;color:#455869}
#dialog-body[data-kind=unit]{display:grid;grid-template-columns:minmax(110px,38%) 1fr;column-gap:16px;width:min(740px,96%)}
#dialog-body[data-kind=unit] h2,#dialog-body[data-kind=unit] .eyebrow,#dialog-body[data-kind=unit] button{grid-column:1/3}
#dialog-body[data-kind=unit] .player-preview{grid-column:1;grid-row:2/7;height:180px;background:linear-gradient(#d9f2ff,#d9edb9);border-radius:12px}
#dialog-body[data-kind=unit] .preview-phase{grid-column:1;grid-row:7}
#dialog-body[data-kind=unit] p:not(.eyebrow){grid-column:2;align-self:center}
#flow-screen[data-screen=home] .mode-grid{grid-template-columns:1fr}
#flow-screen[data-screen=home] .mode-card{min-height:clamp(43px,10cqh,82px)}
#flow-screen[data-screen=home] .mode-card[data-mode=roster]{background:#f0dfaa}
#flow-screen[data-screen=single] .flow-content,#flow-screen[data-screen=lobby] .flow-content{overflow:hidden}
.faction-stage{position:relative;perspective:900px;height:clamp(165px,48cqh,365px);width:min(740px,100%);margin:0 auto;touch-action:none;outline:none}
.faction-stage:after{content:'';position:absolute;bottom:0;left:15%;right:15%;height:12%;border-radius:50%;background:#29462b30;filter:blur(8px);pointer-events:none}
.faction-wheel{position:absolute;inset:0;transform-style:preserve-3d}
#flow-screen .faction-wheel .race-card{position:absolute;left:50%;top:50%;width:clamp(165px,25cqw,245px);height:clamp(155px,42cqh,320px);min-height:0;display:flex;gap:5px;padding:8px;border:0;background:linear-gradient(160deg,#deefffcc,#b5d0e6aa);border-radius:45% 45% 12px 12px;box-shadow:0 9px 12px #18314b24;outline:0;transition:transform .45s ease,opacity .45s ease;will-change:transform;justify-content:flex-end}
#flow-screen .faction-wheel .race-card[data-race=zerg]{background:linear-gradient(160deg,#e7f6c6dd,#acd695aa)}
#flow-screen .faction-wheel .race-card[data-race=protoss]{background:linear-gradient(160deg,#f3dcffdd,#c6abe4aa)}
#flow-screen .faction-wheel .race-card[data-race=random]{background:linear-gradient(160deg,#fff7bfdd,#efd195aa)}
#flow-screen .faction-wheel .race-card.selected:after{display:none}
#flow-screen .faction-wheel .race-card .race-emblem{flex:1;min-height:0;width:100%;max-height:75%;border:0;transform:none;background:transparent;border-radius:0;display:grid;place-items:center;font-size:70px}
#flow-screen .faction-wheel .race-card img{width:100%;height:100%;max-height:none;object-fit:contain;filter:drop-shadow(0 6px 3px #1c35432b)}
#flow-screen .faction-wheel .race-card strong{font-size:clamp(16px,3.5cqh,25px);white-space:nowrap}
#flow-screen .faction-wheel .race-card small{font-size:10px;line-height:1.35;max-width:none}
.wheel-arrow{position:absolute;top:45%;z-index:30;width:46px;min-height:48px!important;font-size:34px!important;padding:0!important}
.wheel-arrow.previous{left:0}.wheel-arrow.next{right:0}
#flow-screen[data-screen=roster] .flow-content{height:calc(100% - 52px);display:flex;flex-direction:column;margin:5px auto 0;padding:10px 14px;min-height:0}
#flow-screen[data-screen=roster] .eyebrow,#flow-screen[data-screen=roster] .flow-lead{display:none}
#flow-screen[data-screen=roster] .flow-content h1{font-size:24px;margin:0 0 6px}
.roster-tabs{display:flex;gap:6px;flex:none;margin-bottom:8px}
.roster-tabs button{min-height:36px;font-size:12px;padding:4px 12px}
.roster-tabs button[aria-pressed=true]{background:#ff9426}
.roster-layout{flex:1;min-height:0;display:grid;grid-template-columns:clamp(160px,24cqw,290px) minmax(0,1fr);gap:12px}
.roster-list{overflow:auto;min-height:0;overscroll-behavior:contain;touch-action:none;display:flex;flex-direction:column;gap:5px;padding:2px}
.roster-player{flex:none;display:flex;align-items:center;text-align:left;gap:8px;min-height:61px;padding:3px 8px}
.roster-player img{width:45px;height:51px;object-fit:contain}.roster-player strong{font-size:13px;display:block}.roster-player small{font-size:10px;display:block}.roster-player[aria-pressed=true]{background:#ffe5aa;border-color:#e47723}
.roster-detail{display:grid;grid-template-columns:minmax(100px,45%) 1fr;gap:14px;min-width:0;overflow:auto;min-height:0}
.roster-art{min-height:0;position:relative;background:linear-gradient(#ddf3ff,#b5d68d);border-radius:50% 50% 14px 14px;display:flex;flex-direction:column}
.roster-art .player-preview{flex:1;height:0;min-height:100px}.roster-art .preview-phase{flex:none;padding:4px}
.roster-copy h2{font-size:clamp(17px,4cqh,30px);margin:8px 0}.roster-copy p{font-size:clamp(11px,2.5cqh,17px);line-height:1.45;margin:7px 0}.roster-tech{color:#a45713;font-weight:850}
#flow-screen[data-screen=roster] .flow-actions{flex:none;margin-top:5px}#flow-screen[data-screen=roster] .flow-actions button{min-height:36px}
@container game (max-height:420px){#flow-screen[data-screen=home] .flow-content h1{font-size:23px}#flow-screen[data-screen=home] .flow-lead{margin:4px 0;font-size:11px}#flow-screen[data-screen=home] .mode-card small{display:none}#flow-screen[data-screen=home] .flow-content{padding-top:6px;padding-bottom:6px}#flow-screen[data-screen=home] .mode-card{min-height:43px}#flow-screen[data-screen=home] .mode-grid{gap:4px;margin-top:6px}#flow-screen[data-screen=roster] .flow-header{min-height:28px}#flow-screen[data-screen=roster] .flow-content{height:calc(100% - 35px);padding:5px 8px}.roster-tabs{margin-bottom:4px}.roster-copy p{margin:4px 0}.roster-copy h2{margin:4px 0}#flow-screen[data-screen=roster] .flow-content h1{font-size:18px;margin-bottom:4px}#dialog-body[data-kind=unit] .player-preview{height:140px}}
@container game (max-width:760px){#training-minimap{left:calc(var(--pad-l) + 252px);width:80px}#app.production-open #match-progress{max-width:22cqw;font-size:10px}#build-view #quick-placement{max-width:calc(100% - 155px)}#quick-placement .quick-buttons button{font-size:10px}#build-view .production-controls button{min-width:28px;padding:0 3px}.faction-stage{height:44cqh}.roster-detail{grid-template-columns:minmax(90px,42%) 1fr;gap:8px}.roster-copy p{font-size:11px}}
@media(prefers-reduced-motion:reduce){#flow-screen .faction-wheel .race-card{transition:none}}
#flow-screen .faction-wheel .race-card.selected{background:#deefff}
#flow-screen .faction-wheel .race-card[data-race=zerg].selected{background:#e7f6c6}
#flow-screen .faction-wheel .race-card[data-race=protoss].selected{background:#f3dcff}
#flow-screen .faction-wheel .race-card[data-race=random].selected{background:#fff7bf}
#flow-screen[data-screen=roster]{display:flex;flex-direction:column;overflow:hidden}
#flow-screen[data-screen=roster] .flow-header{width:100%;flex:none}
#flow-screen[data-screen=roster] .flow-content{flex:1;height:0;width:100%;min-height:0}
#flow-screen .flow-lead:empty{display:none}
#build-view .unit-card .player-select{position:absolute;inset:0;width:100%;height:100%;min-height:0;border:0;background:transparent;box-shadow:none;padding:0}
#build-view .unit-card .player-info{z-index:2}
#build-view .unit-card .player-select:focus-visible{outline:2px solid #e47723;outline-offset:-2px}
.roster-copy .attribute-tags,#dialog-body .attribute-tags{color:#245d82;font-weight:950}
.roster-copy .attribute-description,#dialog-body .attribute-description{font-size:clamp(11px,2.5cqh,14px);line-height:1.45;color:#435264}
.roster-copy .attribute-bonus,#dialog-body .attribute-bonus{color:#9a4319;font-weight:850}
.roster-copy{min-height:0;overflow:auto;overscroll-behavior:contain}
#dialog-body[data-kind=unit] button{position:sticky;bottom:0}
