/* v34: compact field controls, readable position effects and action history. */
.combat-arena{--combat-positive:#94f2ce;--combat-negative:#ff8591}
.combat-arena.combat-live{padding-top:12px}
.combat-arena .combat-phase-label{margin-bottom:8px}
.combat-arena .combat-battle-scoreboard{margin-bottom:10px;gap:10px}
.combat-arena .combat-hud-team:has(.combat-hud-navigation){grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:7px 12px}
.combat-arena .combat-hud-team:has(.combat-hud-navigation) .combat-hud-identity{grid-column:1;grid-row:1/3}
.combat-arena .combat-hud-team:has(.combat-hud-navigation) .combat-hud-stats{grid-column:2;grid-row:2}
.combat-hud-navigation{display:flex;justify-content:flex-end;align-items:center;gap:5px;flex-wrap:wrap;grid-column:2;grid-row:1;min-width:0}
.combat-arena .combat-hud-navigation .btn{min-height:28px;padding:5px 8px;font-size:11px;line-height:1.2;border:1px solid #bda1da40;border-radius:6px;white-space:normal;background:#bc96d611;color:#e7dcf5;box-shadow:none}
.combat-arena .combat-hud-navigation .btn:hover{color:#fff;background:#bd99dc24;border-color:#c7a7e2}
.combat-arena .combat-spell-selection-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.combat-arena .combat-spell-selection-actions .btn{min-height:38px;padding:9px 12px;font-size:13px}
.combat-arena.combat-selection-wizard .combat-selection{padding-top:8px;padding-bottom:10px}
.combat-arena .combat-auto-squad{padding:12px 14px;margin-bottom:14px}
.combat-arena .combat-draft-spells .combat-section-heading{margin-bottom:12px}
.combat-arena .combat-draft-spells .combat-section-heading h3{font-size:clamp(25px,2.4vw,38px);margin-top:3px}
.combat-arena .combat-sideline-unit.combat-sideline-minimal{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:7px;padding:8px;min-height:0}
.combat-arena .combat-sideline-minimal .combat-sideline-portrait{width:36px;height:43px;border-radius:6px;margin:0}
.combat-arena .combat-sideline-minimal .combat-sideline-info{min-width:0;text-align:left;display:grid;gap:3px}
.combat-arena .combat-sideline-minimal .combat-sideline-info strong{font-size:12px;line-height:1.25;overflow-wrap:anywhere}
.combat-arena .combat-sideline-minimal .combat-sideline-info>b{font-size:19px;line-height:1.1;color:var(--combat-positive)}
.combat-arena .combat-sideline-minimal.recovering .combat-sideline-info>b{color:var(--combat-negative)}
.combat-arena .combat-sideline-minimal .combat-sideline-return{grid-column:1/-1;min-height:30px;padding:5px;font-size:11px;margin:0}
.combat-arena .combat-recovery-note{display:grid;gap:4px;margin:5px 0 8px;padding:7px;border-radius:7px;min-height:0;background:#5dbeaf0d;border-color:#74d2c42e}
.combat-arena .combat-recovery-note>span{font-size:12px;font-weight:800;color:var(--combat-positive)}
.combat-arena .combat-recovery-note>small{font-size:10px;color:#d7c7e5}
.combat-arena .combat-card-actions:has(.combat-heatseeker){grid-template-columns:1fr 1fr}
.combat-arena .combat-card-actions:has(.combat-heatseeker)>.combat-card-action-wrap:last-child{grid-column:1/-1}
.combat-arena .combat-heatseeker{background:linear-gradient(110deg,#176b80,#2a4d83);color:#d8faff;border-color:#84d9ea}
.combat-frozen-badge{display:inline-flex;align-items:center;gap:4px;border:1px solid #75d6ff70;color:#a9e9ff;background:#2f6d8f30;border-radius:5px;padding:4px 7px;font-size:12px;font-weight:800}
.combat-freeze-value{color:#a9e9ff!important}
.combat-balanced .combat-abilities{margin-top:7px}
.combat-balanced .combat-abilities>summary{padding:9px 8px}
.combat-balanced .combat-abilities .combat-effect{padding:8px 9px;gap:4px;border-left:2px solid #af91d7;background:#120c1a40;border-radius:0 6px 6px 0;margin-bottom:6px;font-size:13px;line-height:1.45}
.combat-balanced .combat-effect>b{font-size:14px;color:#ffe49c}
.combat-balanced .combat-effect .ability-kind{font-size:9px;line-height:1.3;text-transform:uppercase;letter-spacing:.07em;color:#bfa6d4}
.combat-balanced .combat-effect .ability-paragraphs{gap:5px}
.combat-balanced .combat-effect .ability-fine-print{padding-top:5px;margin-top:2px;font-size:12px;line-height:1.4}
.combat-balanced .combat-target-attributes{gap:6px}
.combat-balanced .combat-target-traits>span{border-radius:5px;padding:4px 6px;font-size:11px}
.combat-arena .effect-positive,.combat-arena .ability-token.is-gain{color:var(--combat-positive)}
.combat-arena .effect-negative,.combat-arena .ability-token.is-loss{color:var(--combat-negative)}
.combat-arena .effect-neutral{color:#baaac8}
.combat-position-overview .combat-equipped-grid{gap:18px}
.combat-position-overview .combat-equipped-team-heading{margin-bottom:10px}
.combat-effects-team-base{display:flex;align-items:center;flex-wrap:wrap;gap:10px 15px;padding:12px;background:#64c8bc0c;border:1px solid #77d0c12e;border-radius:9px;margin-bottom:10px}
.combat-effects-team-base>strong{font-size:12px;letter-spacing:.1em;color:#a5eee1}
.combat-effects-team-base>span{display:grid;gap:4px;font-variant-numeric:tabular-nums}
.combat-effects-team-base small{font-size:10px;line-height:1.2;color:#c5b6d2}
.combat-effects-team-base b{font-size:17px;color:#f0e9f8}
.combat-effects-team-base .combat-energy-rule{margin-left:auto}
.combat-effects-team-base .combat-energy-rule b{font-size:13px;color:#ffe399}
.combat-effects-position-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.combat-position-overview .combat-equipped-grid .combat-position-effects{padding:12px;margin:0;border:1px solid #ba96d540;border-radius:9px;background:#20152bb5;min-width:0}
.combat-position-effects h4{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:0 0 10px;font-size:20px;color:#e2c6fc}
.combat-position-effects h4>span{font:500 9px/1.3 var(--font-body,system-ui);color:#bfa7d0;text-align:right}
.combat-position-deltas{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.combat-position-deltas>span{display:grid;gap:3px;padding:7px 4px;background:#0907144d;text-align:center;border-radius:5px}
.combat-position-deltas b{font-size:21px;font-variant-numeric:tabular-nums}
.combat-position-deltas small{font-size:9px;color:#c9b8d7;line-height:1.25}
.combat-position-sources{list-style:none;padding:0;margin:9px 0 0;display:grid;gap:7px}
.combat-position-sources li{display:grid;gap:3px;font-size:10px;line-height:1.3;color:#bda9cc}
.combat-position-sources b{font-size:10px;font-weight:700}
.combat-position-effects>p{margin:9px 0 0;font-size:11px;color:#b9a9c7}
.combat-effect-sources{margin-top:12px;border-top:1px solid #b697cc33;padding-top:8px}
.combat-effect-sources>summary{font-size:12px!important;font-weight:750;color:#d2c1e2;cursor:pointer;padding:7px 0}
.combat-position-overview .combat-effect-sources article{padding:12px;margin:8px 0;border-radius:7px}
.combat-position-overview .combat-effect-sources article h4{font-size:17px;margin:0 0 8px}
.combat-position-overview .combat-effect-sources article p{font-size:13px;line-height:1.45;margin:7px 0}
.combat-position-overview .combat-effect-sources article p>b{font-size:11px;margin-bottom:3px}
/* Explicit action labels and colors: outcomes remain the exact saved events. */
.combat-history-event{--event-color:#cdb4e5;--event-bg:#ad85d315}
.combat-history-attack,.combat-history-impact,.combat-history-shed{--event-color:#ffba86;--event-bg:#e8833215}
.combat-history-protect,.combat-history-safePlay{--event-color:#8ad5ff;--event-bg:#3d9ed51c}
.combat-history-move{--event-color:#c6b3ff;--event-bg:#9f79ef1a}
.combat-history-rally,.combat-history-recovery{--event-color:#91efbd;--event-bg:#58cc8b17}
.combat-history-heatseeker,.combat-history-freeze{--event-color:#9ee9ff;--event-bg:#6bd7f51a}
.combat-history-spell,.combat-history-ability{--event-color:#e2adff;--event-bg:#bc72e817}
.combat-history-receiveHit,.combat-history-sideline{--event-color:#ff9ca5;--event-bg:#dc627217}
.combat-history-result{--event-color:#ffe49c;--event-bg:#e7bd5019}
.combat-history-turn,.combat-history-endTurn{--event-color:#8ee3d8;--event-bg:#67cbb416}
.combat-log.combat-history .combat-history-event{padding:13px 0;gap:13px;border-top-color:#ae8dc92b}
.combat-history .combat-history-event-heading>span{color:var(--event-color);background:var(--event-bg);border:1px solid color-mix(in srgb,var(--event-color) 35%,transparent);border-radius:5px;padding:5px 8px;font-size:10px;line-height:1.25}
.combat-history .combat-history-event-heading>span i{font-style:normal;margin-right:6px}
.combat-history .combat-history-event-heading>strong{font-size:14px}
.combat-log.combat-history .combat-history-content>p{font-size:15px;line-height:1.5}
.combat-history .combat-history-time{font-size:11px}
.combat-history .combat-history-time>b{font-size:14px}
.combat-history .combat-history-impact-stats{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0}
.combat-history .combat-history-impact-stat{display:grid;gap:2px;padding:6px 9px;border-radius:5px;background:#100b1c60}
.combat-history .combat-history-impact-stat.loss b{color:#ff9ca5}
.combat-history .combat-history-impact-stat.none b{color:#ac9aba}
.combat-history .combat-history-impact-stat small{font-size:10px;color:#bfadcc}
.combat-history .combat-history-reaction{font-size:13px;line-height:1.5;margin:5px 0}
.combat-history .combat-history-energy{display:inline-flex;gap:5px;align-items:center;margin-top:6px;font-size:10px;color:#baa9c7}
.combat-history .combat-history-energy b{color:#ffe19a}
@media(max-width:1100px){.combat-effects-position-grid{grid-template-columns:1fr}.combat-arena .combat-hud-team:has(.combat-hud-navigation){grid-template-columns:minmax(0,1fr)}.combat-arena .combat-hud-team:has(.combat-hud-navigation) .combat-hud-identity{grid-column:1;grid-row:1}.combat-arena .combat-hud-team:has(.combat-hud-navigation) .combat-hud-stats{grid-column:1;grid-row:3}.combat-hud-navigation{grid-column:1;grid-row:2;justify-content:flex-start}.combat-effects-team-base .combat-energy-rule{margin-left:0}}
@media(max-width:620px){.combat-arena .combat-hud-navigation .btn{min-height:30px;padding:4px 5px;font-size:9px}.combat-arena .combat-hud-navigation{gap:4px}.combat-arena .combat-sideline-unit.combat-sideline-minimal{grid-template-columns:1fr;justify-items:center;padding:6px}.combat-arena .combat-sideline-minimal .combat-sideline-info{text-align:center}.combat-arena .combat-sideline-minimal .combat-sideline-info strong{font-size:10px}.combat-arena .combat-sideline-minimal .combat-sideline-info>b{font-size:17px}.combat-arena .combat-recovery-note>span{font-size:10px}.combat-arena .combat-recovery-note>small{font-size:9px}.combat-arena .combat-spell-selection-actions{justify-content:flex-start}.combat-arena .combat-spell-selection-actions .btn{font-size:11px;min-height:34px;padding:7px 9px}.combat-effects-position-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.combat-log.combat-history .combat-history-content>p{font-size:13px}.combat-position-overview .combat-equipped-grid .combat-position-effects{padding:9px}.combat-position-effects h4{font-size:18px}.combat-position-effects h4>span{font-size:8px}.combat-position-deltas small{font-size:8px}.combat-position-deltas b{font-size:18px}.combat-position-deltas>span{padding:5px 2px}}
/* Keep every own card aligned; Heatseeker is a short second control, not a second card header. */
.combat-arena.combat-balanced .combat-card-actions{height:96px;grid-template-rows:96px;align-content:start}
.combat-arena.combat-balanced .combat-card-actions .combat-card-action{height:100%;min-height:0;max-height:96px;padding:7px 5px;font-size:12px;line-height:1.2;gap:3px;box-sizing:border-box}
.combat-arena.combat-balanced .combat-card-actions:has(.combat-heatseeker){grid-template-rows:66px 30px}
.combat-arena.combat-balanced .combat-card-actions:has(.combat-heatseeker)>.combat-card-action-wrap:last-child{grid-row:2}
.combat-arena.combat-balanced .combat-card-actions .combat-heatseeker{height:30px;min-height:30px;border:1px solid #78d4e96b;border-bottom:0;border-radius:0;padding:4px 7px;font-size:11px;background:linear-gradient(110deg,#176b80,#2a4d83);flex-wrap:nowrap}
.combat-arena.combat-balanced .combat-card-actions .combat-heatseeker .combat-action-cost{font-size:10px}
.combat-position-overview .combat-position-cap-note{font-size:11px;line-height:1.45;color:#c4b2d1;margin:9px 0}
