/* Fortress v3: two visible opponents, readable attack ownership, thumb commands. */
.fortress-duel{grid-template-columns:minmax(0,1fr) 320px;gap:14px;--friendly:#98f2d0;--hostile:#ffc080}
.duel-scoreboard{grid-column:1/-1;display:grid;grid-template-columns:1fr 36px 1fr;align-items:center;gap:12px}
.duel-player{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;background:linear-gradient(110deg,#203f3a,#10242c);padding:14px 18px 0;border:1px solid #42675e;border-radius:17px;overflow:hidden}
.duel-player.enemy{background:linear-gradient(110deg,#3f3028,#1c222c);border-color:#6c5542}
.duel-avatar{width:42px;height:42px;display:grid;place-items:center;border:1px solid #9de7ca66;border-radius:13px;color:var(--friendly);background:#152a2c;font-size:20px;font-weight:800}
.enemy .duel-avatar{color:var(--hostile);border-color:#ffc08066;background:#382c27}
.duel-player-name{min-width:0}.duel-player-name strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:18px}.duel-player-name small{font-size:9px;margin-top:5px;letter-spacing:.07em;color:#b1cdc3}.enemy .duel-player-name small{color:#d9c3b0}
.duel-player[data-connected=true] .duel-player-name small:before{content:'● ';color:#98f2d0}.duel-player[data-connected=false]{opacity:.65}
.duel-player-score{text-align:right;white-space:nowrap}.duel-player-score b{color:var(--friendly);font-size:24px;font-variant-numeric:tabular-nums}.enemy .duel-player-score b{color:var(--hostile)}.duel-player-score small{font-size:9px;color:#b7c8cd;margin-top:3px}
.duel-player progress{grid-column:1/-1;width:calc(100% + 36px);margin:0 -18px;height:5px;border:0;appearance:none;background:#263f43}.duel-player progress::-webkit-progress-bar{background:#263f43}.duel-player progress::-webkit-progress-value{background:var(--friendly);transition:width .2s}.duel-player.enemy progress::-webkit-progress-value{background:var(--hostile)}.duel-player progress::-moz-progress-bar{background:var(--friendly)}.duel-player.enemy progress::-moz-progress-bar{background:var(--hostile)}
.duel-versus{text-align:center;font-size:11px;color:#a3b7ba;font-weight:900;letter-spacing:.08em}
.duel-status{grid-column:1/-1;border:1px solid #345753;border-radius:10px;padding:11px 14px;background:#152c2d;color:#bfead9;font-size:13px;line-height:1.4;min-height:42px}.duel-status[data-alert=true]{background:#38292a;border-color:#8b5a4f;color:#ffd4b6}
.duel-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.duel-field{min-width:0;background:#10232b;border:1px solid #375b56;border-radius:18px;padding:11px;overflow:hidden}.duel-field.enemy{border-color:#66503f;background:#241f20}
.duel-field-heading{display:flex;align-items:start;justify-content:space-between;gap:10px;min-height:39px;background:none;padding:1px 2px 10px}.duel-field-heading strong{font-size:12px;color:var(--friendly);overflow-wrap:anywhere}.duel-field-heading span{font-size:10px;color:#b7c7c9;text-align:right;min-width:65px}.enemy .duel-field-heading strong{color:var(--hostile)}
.fortress-duel .duel-map{width:100%;max-width:none;max-height:none;min-width:0;aspect-ratio:.86;border-radius:12px;border:1px solid #44625f;isolation:isolate}.duel-field.enemy .duel-map{border-color:#6a5545}.duel-field>small{font-size:10px;line-height:1.5;color:#b8cbce;display:block;padding:10px 2px 0;min-height:42px}
.fortress-duel .tower-site{width:44px;height:44px;min-height:44px;border-radius:11px;box-shadow:0 4px 12px #0005}.fortress-duel .tower-site>svg{width:38px;height:38px}.fortress-duel .enemy-site{border-color:#cb9d6a55;background:#231f1888}.fortress-duel .enemy-site[aria-pressed=true]{outline-color:#ffc080}.fortress-duel .tower-site.emp-disabled{border-color:#d99bff;filter:saturate(.4);box-shadow:0 0 0 3px #b18aff55,0 0 18px #c189ff60}.fortress-duel .emp-disabled:after{content:'EMP';position:absolute;top:-13px;background:#d9b4ff;color:#271d37;font-size:8px;font-weight:900;padding:2px 4px;border-radius:4px}
.duel-controls{gap:10px;position:sticky;top:10px;max-height:calc(100dvh - 20px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.duel-controls .resources{padding:12px 15px;border-radius:14px}.duel-controls .resources b{font-size:26px}.duel-controls .control-section{padding:15px;border-radius:14px}.duel-controls .control-section h3{font-size:17px;margin:0 0 13px}.duel-controls .tabs{flex:none}.duel-controls .tab{min-height:44px;font-size:12px;padding:8px}
.duel-controls .wave-presets{gap:6px;margin-bottom:12px}.duel-controls .wave-preset{background:linear-gradient(135deg,#183a37,#10222b);padding:10px 4px;min-height:88px}.duel-controls .wave-preset[aria-pressed=true]{border-color:#98f2d0;box-shadow:inset 0 0 0 1px #98f2d050}.duel-controls .wave-preset strong{font-size:11px;line-height:1.3}.duel-controls .wave-preset small{font-size:9px;margin-top:4px;color:#c1d3d3}.squad-glyph{display:block;color:#98f2d0;font-size:25px;height:34px;line-height:30px}.duel-controls .wave-preset:nth-child(2) .squad-glyph{color:#ffd195}
.formation-choices .choice{min-height:57px;padding:8px 6px}.formation-choices .choice strong{font-size:11px}.formation-choices .choice small{font-size:9px;line-height:1.4;margin-top:4px}.duel-tip{font-size:12px;color:#b4cacf;line-height:1.55;margin:12px 0}.duel-controls .wave-row strong{font-size:12px}.duel-controls .wave-row small{font-size:10px}.duel-controls .wave-customize summary,.duel-tower-options summary{font-size:12px;min-height:44px;color:#bee7d7;cursor:pointer;display:flex;align-items:center}
.sabotage-panel{border-top:1px solid #4e405e;margin-top:8px;padding-top:13px}.sabotage-panel strong{display:block;color:#dfc6ff;font-size:12px}.sabotage-panel small{font-size:11px;line-height:1.5;margin:6px 0 10px;color:#cbbdda}.duel-emp{width:100%;background:#2d243d;color:#e5caff;border:1px solid #79618e;font-size:12px;min-height:44px}.duel-emp:disabled{opacity:.5}
.duel-launch{position:sticky;bottom:0;z-index:2;background:#112830;padding:12px;border:1px solid #4a7a69;border-radius:15px;box-shadow:0 -6px 20px #07141b90}.duel-launch-summary{font-size:11px;line-height:1.5;margin:0;color:#cce9df;overflow-wrap:anywhere}.duel-launch .cost-hint{margin:5px 0;display:block;font-size:10px;min-height:16px}.duel-send{width:100%;min-height:48px;margin-top:3px;font-size:14px;background:linear-gradient(110deg,#baf4ca,#7ddfc8);color:#102e2a;box-shadow:0 3px 12px #68e7b522;font-weight:800}
.duel-investment+ .duel-investment{margin-top:18px;border-top:1px solid #385552;padding-top:16px}.duel-investment>strong{font-size:13px}.duel-investment button{width:100%;font-size:12px;min-height:44px}.duel-tower-options .choices{margin-top:4px}.duel-tower-options .choice{font-size:10px;min-height:44px}.duel-tower-options>.quiet{font-size:11px;min-height:44px;width:100%;color:#f0c295;margin-top:5px}
.duel-battle-caption{display:flex;justify-content:space-between;gap:8px;margin:12px 2px;color:#acc4c9;font-size:11px;line-height:1.5}.duel-battle-log{border:1px solid #2d4950;padding:0 13px 8px;border-radius:12px;background:#0e2028}.duel-battle-log summary{font-size:12px;min-height:44px;display:flex;align-items:center;color:#bfd7dc;cursor:pointer}.duel-events{list-style:none;padding:0;margin:0}.duel-events li{font-size:11px;line-height:1.5;padding:7px 0;border-top:1px solid #ffffff09;overflow-wrap:anywhere}.duel-events .self{color:#aae9ce}.duel-events .enemy{color:#efc69e}
@media(min-width:1500px){.match-shell:has(.fortress-duel){max-width:1450px}.duel-map{aspect-ratio:1}.duel-controls{width:340px}.fortress-duel{grid-template-columns:minmax(0,1fr) 340px}}
@media(min-width:701px) and (max-width:1099px){.duel-fields{grid-template-columns:1fr}.fortress-duel .duel-map{aspect-ratio:1.3}.fortress-duel{grid-template-columns:minmax(0,1fr) 285px}.duel-player{padding:12px 12px 0;gap:8px;grid-template-columns:32px 1fr auto}.duel-avatar{width:32px;height:32px;font-size:16px}.duel-player-name strong{font-size:15px}.duel-player-score b{font-size:19px}}
@media(max-width:700px){
  .match-shell:has(.fortress-duel){padding-bottom:230px}.fortress-duel{grid-template-columns:1fr;gap:10px}.duel-scoreboard{gap:5px;grid-template-columns:1fr 20px 1fr}.duel-player{grid-template-columns:28px minmax(0,1fr);padding:10px 9px 0;gap:6px;border-radius:12px}.duel-avatar{width:28px;height:30px;font-size:14px;border-radius:8px}.duel-player-name strong{font-size:13px}.duel-player-name small{font-size:7px;letter-spacing:0}.duel-player-score{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:4px}.duel-player-score b{font-size:19px}.duel-player-score small{font-size:8px}.duel-player progress{width:calc(100% + 18px);margin:0 -9px;height:4px}.duel-versus{font-size:9px}
  .duel-status{padding:9px 11px;font-size:11px;min-height:38px}.duel-fields{grid-template-columns:1fr;gap:12px}.duel-field{padding:10px;border-radius:14px}.duel-field-heading{min-height:30px;padding-bottom:8px}.duel-field-heading strong{font-size:12px}.fortress-duel .duel-map{width:100%;aspect-ratio:1.3;max-width:none;max-height:none;min-width:0}.duel-field>small{padding-top:7px;min-height:0;font-size:10px}.fortress-duel .tower-site{width:44px;height:44px;min-height:44px}.duel-battle-caption{font-size:10px;flex-wrap:wrap}
  .duel-controls{position:fixed;top:auto;bottom:0;left:0;right:0;max-height:76dvh;gap:5px;padding:8px 10px max(8px,env(safe-area-inset-bottom));border-radius:18px 18px 0 0;overflow-y:auto}.duel-controls .resources{padding:0 5px 3px;border:0;background:none}.duel-controls .resources b{font-size:21px}.duel-controls .tab{min-height:44px;font-size:12px;padding:7px}.duel-controls .duel-launch{padding:0 4px 3px;border:0;background:#10232d;box-shadow:none;bottom:-8px;border-radius:0}.duel-controls:not(.controls-open) .duel-launch-summary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;margin:4px 0}.duel-controls:not(.controls-open) .duel-launch .cost-hint{display:none}.duel-controls .duel-send{min-height:44px;font-size:13px}.duel-controls .control-section{padding:13px}.duel-controls .control-section h3{font-size:16px}.duel-controls .action-feedback{font-size:10px;margin:0;padding:0 4px}.duel-controls.controls-open .duel-launch{padding:8px 4px}.duel-controls.controls-open .sheet-close{top:-8px;min-height:44px;background:#10232d}.duel-controls .wave-preset{min-height:77px}.duel-controls .wave-preset strong{font-size:11px}.duel-controls .cost-hint{font-size:10px}
}
@media(prefers-reduced-motion:reduce){.duel-player progress::-webkit-progress-value{transition:none}}
