/* A uniform camera keeps art, touch targets and spell aiming on the same plane. */
.arena-world{position:absolute;left:0;top:0;width:100%;height:100%;transform-origin:0 0}
.arena-world canvas,.arena-world .neon-presentation{position:absolute;inset:0;width:100%;height:100%}
.arena-world .pad-layer{position:absolute;inset:0}
.battle-layout>div:first-child{min-width:0}
.field-tools,.mobile-combat-tools,.compact-speed,[data-combat-view]{display:none}
@media(max-width:900px),(max-width:1100px) and (max-height:550px){
 [data-combat-view]{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font-size:19px}
 .incoming-species{min-width:0;flex-wrap:wrap}
}
body.combat-focus{overflow:hidden;overscroll-behavior:none}
body.combat-focus>.noah-header{display:none}
body.combat-focus .app-shell{position:fixed;inset:0;margin:0;width:100%;max-width:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);height:100vh;height:100dvh;display:flex;flex-direction:column;gap:0;background:#090916;overflow:hidden}
body.combat-focus .topbar,body.combat-focus .main-nav,body.combat-focus .app-footer{display:none}
body.combat-focus #main{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 4px 4px;gap:4px}
body.combat-focus .wallet-ribbon{position:relative!important;inset:auto!important;flex:none;width:100%;height:40px;min-height:40px;margin:0;padding:0 8px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;border-width:0 0 1px;border-radius:0;box-shadow:none;z-index:10;background:#151323}
body.combat-focus .wallet-ribbon .noah-balance,body.combat-focus .wallet-ribbon .noah-market{min-height:40px;padding:2px 0;display:flex;align-items:center;gap:7px;border:0;text-align:left;overflow:hidden}
body.combat-focus .wallet-ribbon .noah-token{width:25px;height:25px;font-size:12px;flex:none}
body.combat-focus .wallet-ribbon .noah-amount{display:flex;align-items:center;gap:6px;min-width:0}
body.combat-focus .wallet-ribbon .noah-amount>small{max-width:74px;font:6px/1.35 monospace;letter-spacing:.4px}
body.combat-focus .wallet-ribbon .noah-amount>b{font-size:18px;white-space:nowrap}
body.combat-focus .wallet-ribbon .noah-amount em{font-size:9px}
body.combat-focus .wallet-ribbon .noah-market{flex-direction:column;align-items:flex-end;justify-content:center;gap:0}
body.combat-focus .wallet-ribbon .noah-market>small{font:6px/1.3 monospace;letter-spacing:.5px}
body.combat-focus .wallet-ribbon .noah-market>b{font-size:14px;line-height:1.2}
body.combat-focus #wallet-balance-detail,body.combat-focus #wallet-change,body.combat-focus .wallet-journey,body.combat-focus .wallet-open{display:none}
body.combat-focus .battle-head{height:44px;min-height:44px;flex:none;margin:0;gap:4px;align-items:center}
body.combat-focus .battle-title{gap:0;flex:none}
body.combat-focus .battle-title>div{display:none}
body.combat-focus .back-button{width:44px;height:44px}
body.combat-focus .battle-actions{display:flex!important;flex-wrap:nowrap;flex:1;justify-content:flex-end;gap:4px;min-width:0}
body.combat-focus .battle-actions>.small-button{padding:5px;min-width:44px;height:44px;min-height:44px;font-size:11px;white-space:nowrap}
body.combat-focus .audio-launch{width:44px}
body.combat-focus .audio-launch>span{display:none}
body.combat-focus .audio-launch::before{content:'♫';font-size:19px}
body.combat-focus .speed-console{display:none}
body.combat-focus .compact-speed{display:block;width:65px;height:44px;min-width:0;color:#bafbef;background:#182737;border:1px solid #427277;border-radius:7px;font:700 16px monospace;padding:3px}
body.combat-focus .battle-coach,body.combat-focus .heist-proof,body.combat-focus .world-console,body.combat-focus .battle-hint,body.combat-focus .wave-preview,body.combat-focus .boss-live{display:none!important}
body.combat-focus .battle-layout{display:flex;flex-direction:column;align-items:stretch;flex:1;min-height:0;gap:0;grid-template-columns:none}
body.combat-focus .battle-layout>div:first-child{display:grid;grid-template-rows:minmax(0,1fr) 56px 56px 44px;gap:4px;flex:1;min-height:0}
body.combat-focus .arena{aspect-ratio:auto!important;height:100%;min-height:0;width:100%;border-radius:10px;background:radial-gradient(ellipse at 30% 60%,#27324b,#101326 65%);touch-action:none}
body.combat-focus .arena .arena-world{will-change:transform;touch-action:none}
body.combat-focus .arena .pad-button{width:6%;min-width:44px;min-height:44px}
body.combat-focus .arena-top{left:6px;right:6px;top:6px;z-index:3;gap:4px}
body.combat-focus .wave-box{padding:4px 6px;min-width:76px;max-width:115px}
body.combat-focus .wave-box>small:first-child,body.combat-focus .wave-box>.meter{display:none}
body.combat-focus .wave-box strong{font-size:18px;margin:0;line-height:1.1}
body.combat-focus .swarm-readout{font:7px/1.3 monospace;letter-spacing:0}
body.combat-focus .battle-stat{min-width:53px;padding:4px 6px}
body.combat-focus .battle-stat small{font-size:6px;letter-spacing:.4px}
body.combat-focus .battle-stat b{font-size:19px;line-height:1.1;margin:0}
body.combat-focus .battle-stats{gap:4px}
body.combat-focus .mobile-tactics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;gap:4px}
body.combat-focus .mobile-tactics .tactic-card{min-height:0;height:56px;padding:5px 3px 5px 34px;border-radius:7px}
body.combat-focus .mobile-tactics .spell-art{width:32px;top:11px;left:0}
body.combat-focus .mobile-tactics .tactic-card b{font-size:13px;line-height:1.05}
body.combat-focus .mobile-tactics .tactic-card small{font-size:7px;line-height:1.1;letter-spacing:0}
body.combat-focus .build-dock{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) 44px;margin:0;gap:4px}
body.combat-focus .tower-card{min-height:0;height:56px;padding:3px;display:flex;align-items:center;justify-content:center;gap:2px;border-radius:7px;overflow:hidden}
body.combat-focus .tower-card .tower-art{width:25px;height:33px;min-width:25px;flex:none}
body.combat-focus .tower-card>span:last-child{min-width:0}
body.combat-focus .tower-card strong{font-size:12px;line-height:1.1}
body.combat-focus .tower-card small{font-size:9px}
body.combat-focus .overdrive-card{min-width:44px;min-height:44px;height:56px;padding:3px;font-size:0;border-radius:7px}
body.combat-focus .overdrive-card>strong{font-size:0}
body.combat-focus .overdrive-card>strong::before{content:'ϟ';font-size:20px}
body.combat-focus .overdrive-card small{display:none}
body.combat-focus .battle-bottom,body.combat-focus .battle-sidebar{display:none!important}
body.combat-focus .mobile-combat-tools{display:grid;grid-template-columns:1fr 1fr .85fr 1.35fr;gap:4px;min-height:44px}
body.combat-focus .mobile-combat-tools>button{min-height:44px;min-width:0;padding:3px;border:1px solid #477376;border-radius:6px;background:#14242c;color:#b4f9e8;font-size:10px;line-height:1.15;overflow:hidden}
body.combat-focus .mobile-combat-tools>.wave-button{background:#c5ff49;color:#162013;margin:0;width:auto}
body.combat-focus #scan-button{font-size:0;margin:0}
body.combat-focus #scan-button::before{content:attr(data-short-label);font:700 11px var(--body)}
body.combat-focus #scan-button small{display:none}
body.combat-focus .field-tools{position:absolute;bottom:6px;right:6px;display:flex;align-items:center;gap:3px;z-index:4}
body.combat-focus .field-tools button{min-width:44px;height:44px;padding:5px;border:1px solid #a4fbe28c;background:#0d1b2eea;color:#c6fff1;border-radius:7px;font-size:12px}
body.combat-focus .field-tools button[hidden]{display:none}
body.combat-focus .field-tools .field-hint{font:8px/1.25 monospace;max-width:75px;padding:4px;background:#101425bb;color:#d4fff0;border-radius:4px}
body.combat-focus .arena:has(.arena-guard:not([hidden])) .field-hint{display:none}
body.combat-focus .arena.aiming .field-tools{display:none}
body.combat-focus .arena-caption{display:none}
body.combat-focus .quick-evolve{bottom:56px;width:calc(100% - 12px);max-width:470px;padding:6px;gap:5px}
body.combat-focus .quick-evolve>div{gap:1px;min-width:0}
body.combat-focus .quick-evolve small{font-size:7px}
body.combat-focus .quick-evolve b{font-size:17px}
body.combat-focus .quick-evolve span{font-size:9px}
body.combat-focus .quick-evolve button{font-size:10px;padding:5px;min-height:44px}
body.combat-focus .quick-evolve .primary{min-width:100px;max-width:126px}
body.combat-focus .quick-evolve .text-button{min-width:44px}
body.combat-focus .arena-guard{bottom:7px;left:7px;right:auto;min-height:44px;padding:6px 10px;font-size:12px;z-index:5}
body.combat-focus .arena.aiming .arena-guard{display:none!important}
body.combat-focus .boss-duel{position:absolute;top:52px;left:6px;right:6px;margin:0;padding:6px 8px;border-radius:7px;z-index:3;background:#231526ec}
body.combat-focus .boss-duel[hidden]{display:none}
body.combat-focus .boss-duel .duel-heading{font-size:10px;line-height:1.1}
body.combat-focus .duel-health{height:3px;margin:3px 0}
body.combat-focus .duel-command{margin:0}
body.combat-focus #duel-cast{font-size:10px}
body.combat-focus #duel-counter,body.combat-focus #duel-target,body.combat-focus #boss-guard{display:none}
body.combat-focus .boss-arrival{padding:12px}
body.combat-focus .boss-arrival h2{font-size:28px}
body.combat-focus .boss-arrival p{font-size:11px}
body.combat-focus .heist-opening{padding:12px}
body.combat-focus .heist-opening h2{font-size:24px}
body.combat-focus .heist-opening button{min-height:58px;padding:9px}
body.combat-focus .pause-cover h2{font-size:32px}
body.combat-focus #toast{max-width:80vw;bottom:230px;font-size:11px;padding:9px;pointer-events:none}
@media(orientation:landscape){
 body.combat-focus .wallet-ribbon{position:absolute!important;top:env(safe-area-inset-top,0px)!important;left:calc(env(safe-area-inset-left,0px) + 52px)!important;width:204px;height:44px;min-height:44px;padding:0 5px;z-index:11;gap:4px;background:transparent;border:0}
 body.combat-focus .wallet-ribbon .noah-token{display:none}
 body.combat-focus .wallet-ribbon .noah-amount>small{display:none}
 body.combat-focus .wallet-ribbon .noah-amount>b{font-size:16px}
 body.combat-focus .wallet-ribbon .noah-market>b{font-size:11px}
 body.combat-focus .battle-actions{padding-left:210px}
 body.combat-focus .battle-layout>div:first-child{grid-template-columns:minmax(0,1fr) 188px;grid-template-rows:62px 112px minmax(88px,1fr);gap:4px}
 body.combat-focus .arena{grid-column:1;grid-row:1/4}
 body.combat-focus .mobile-tactics{grid-column:2;grid-row:1}
 body.combat-focus .mobile-tactics .tactic-card{height:62px;padding:4px;align-items:center;text-align:center;justify-content:flex-end}
 body.combat-focus .mobile-tactics .spell-art{width:25px;left:calc(50% - 12px);top:0}
 body.combat-focus .mobile-tactics .tactic-card b{font-size:11px;text-align:center}
 body.combat-focus .mobile-tactics .tactic-card small{display:none}
 body.combat-focus .build-dock{grid-column:2;grid-row:2;grid-template-columns:1fr 1fr 44px;grid-template-rows:54px 54px}
 body.combat-focus .tower-card{height:54px}
 body.combat-focus .overdrive-card{grid-column:3;grid-row:1/3;height:112px}
 body.combat-focus .mobile-combat-tools{grid-column:2;grid-row:3;grid-template-columns:1fr 1fr;align-content:start;grid-auto-rows:44px}
 body.combat-focus #toast{bottom:15px;left:20px;transform:none;max-width:35vw}
 body.combat-focus .field-hint{display:none}
 body.combat-focus .boss-duel{top:45px}
}

body.combat-focus .opening-ghost{display:none}
body.combat-focus .battle-head{display:flex;flex-direction:row!important;flex-wrap:nowrap}
body.combat-focus .battle-title{display:flex;width:44px;max-width:44px}
body.combat-focus .pause-cover{display:none!important}
body.combat-focus #pause[aria-pressed="true"]{background:#3c2446;border-color:#ff8cd7;color:#ffc7ed}
body.combat-focus.heist-mode .build-dock{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(orientation:landscape){body.combat-focus.heist-mode .build-dock{grid-template-columns:1fr 1fr;grid-template-rows:54px 54px}body.combat-focus.heist-mode .build-dock .tower-card:nth-child(3){grid-column:1/3}}
@media(max-width:360px){
 body.combat-focus .compact-speed{width:52px;font-size:14px}
 body.combat-focus #pause{width:44px;font-size:0}
 body.combat-focus #pause::before{content:'Ⅱ';font-size:18px}
 body.combat-focus #pause[aria-pressed="true"]::before{content:'▶'}
}

/* Tactical overview: routes remain visible; all controls live outside the world. */
.combat-stage[hidden],.combat-palette[hidden]{display:none!important}
.combat-rotate-tip{display:none}
body.combat-focus .wallet-ribbon{height:32px;min-height:32px;gap:8px}
body.combat-focus .wallet-ribbon .noah-balance,body.combat-focus .wallet-ribbon .noah-market{min-height:32px;padding:0;flex-direction:row;align-items:center;gap:5px}
body.combat-focus .wallet-ribbon .noah-market{justify-content:flex-end}
body.combat-focus .wallet-ribbon .noah-amount>small,body.combat-focus .wallet-ribbon .noah-market>small{display:none}
body.combat-focus .wallet-ribbon .noah-token{height:22px;width:22px}
body.combat-focus .wallet-ribbon .noah-amount>b{font-size:16px}
body.combat-focus .wallet-ribbon .noah-market>b{font-size:13px}
body.combat-focus [data-combat-view]{display:none!important}
body.combat-focus .battle-actions{max-width:none!important;gap:4px}
body.combat-focus #pause{width:44px;font-size:0}
body.combat-focus #pause::before{content:'Ⅱ';font-size:18px}
body.combat-focus #pause[aria-pressed=true]::before{content:'▶'}
body.combat-focus .combat-rotate-tip{display:block;flex:none;margin:0;padding:2px 5px 4px;text-align:center;font:10px/1.4 var(--body);color:#a7d8d7}
body.combat-focus .battle-layout>div:first-child{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 164px;gap:4px}
body.combat-focus .combat-stage{grid-column:1;grid-row:1;min-width:0;min-height:0;display:grid;grid-template-rows:44px minmax(0,1fr);gap:4px}
body.combat-focus .combat-stage>.arena-top{position:relative;inset:auto;display:flex;align-items:center;gap:4px;z-index:4;min-width:0;height:44px;background:#121724;border:1px solid #34384f;border-radius:8px;padding:0 3px}
body.combat-focus .combat-stage .wave-box{background:none;border:0;min-width:58px;max-width:70px;padding:0 2px;flex:1}
body.combat-focus .combat-stage .wave-box strong{font-size:16px}
body.combat-focus .combat-stage .swarm-readout{font-size:6px}
body.combat-focus .combat-stage .battle-stat{background:none;border:0;padding:0 3px;min-width:40px}
body.combat-focus .combat-stage .battle-stat b{font-size:18px}
body.combat-focus .combat-stage .battle-stat small{font-size:6px}
body.combat-focus .combat-stage .battle-stats{gap:1px;flex:none}
body.combat-focus .combat-stage .field-tools{position:relative;inset:auto;display:flex;gap:1px;margin-left:auto;flex:none}
body.combat-focus .combat-stage .field-tools button{min-width:44px;width:44px;height:44px;border:0;background:transparent;padding:3px;border-radius:6px;font-size:12px}
body.combat-focus .field-tools button[aria-pressed=true]{color:#cfff73;background:#c7ff5514}
body.combat-focus .field-tools button:disabled{opacity:.3}
body.combat-focus .field-tools .field-hint{display:none}
body.combat-focus .field-tools button[data-native-fullscreen]{display:none}
body.combat-focus .combat-stage>.arena{grid-column:auto;grid-row:auto;width:100%;height:100%;min-width:0;min-height:0;aspect-ratio:auto!important;border-radius:10px;background:radial-gradient(ellipse at 50% 50%,#29223d,#0a1020 80%)}
body.combat-focus .combat-palette{grid-column:1;grid-row:2;display:grid;grid-template-rows:56px 56px 44px;gap:4px;min-width:0;min-height:0}
body.combat-focus .combat-palette>.mobile-tactics{grid-column:1;grid-row:1}
body.combat-focus .combat-palette>.build-dock{grid-column:1;grid-row:2;grid-template-columns:repeat(4,minmax(0,1fr)) 44px;grid-template-rows:56px}
body.combat-focus.heist-mode .combat-palette>.build-dock{grid-template-columns:repeat(3,minmax(0,1fr))}
body.combat-focus .combat-palette>.mobile-combat-tools{grid-column:1;grid-row:3;grid-template-columns:1fr 1fr .85fr 1.35fr;align-content:stretch;grid-auto-rows:auto}
body.combat-focus .combat-palette .tactic-card{height:56px;min-height:44px}
body.combat-focus .combat-selection{display:none;grid-column:1;grid-row:2;position:relative;min-height:0;min-width:0;border:1px solid #80e7cc;border-radius:8px;background:#101e2c}
body.combat-focus .combat-palette:has(.quick-evolve:not([hidden]))>.build-dock{display:none}
body.combat-focus .combat-selection:has(.quick-evolve:not([hidden])){display:block}
body.combat-focus .combat-selection>.quick-evolve{position:static;transform:none;inset:auto;width:100%;max-width:none;height:100%;padding:4px 47px 4px 6px;border:0;box-shadow:none;gap:5px;background:transparent;border-radius:8px;min-width:0}
body.combat-focus .combat-selection-close{position:absolute;right:0;top:0;width:44px;height:100%;min-height:44px;border:0;border-left:1px solid #466269;background:transparent;color:#bfffea;font-size:22px;z-index:2}
body.combat-focus .combat-selection .quick-evolve>div{min-width:0;flex:1;gap:1px}
body.combat-focus .combat-selection .quick-evolve b{font-size:15px;line-height:1.05}
body.combat-focus .combat-selection .quick-evolve small{font-size:6px;line-height:1.2;max-width:170px}
body.combat-focus .combat-selection .quick-evolve span{font-size:8px;line-height:1.15}
body.combat-focus .combat-selection .quick-evolve .primary{min-width:86px;max-width:112px;min-height:44px;font-size:9px;padding:4px}
body.combat-focus .combat-selection .quick-evolve .text-button{min-width:44px;max-width:44px;min-height:44px;font-size:8px;padding:2px}
body.combat-focus .mobile-combat-tools>.wave-button{font-size:10px;font-weight:800}
body.combat-focus .combat-stage .arena-guard{bottom:6px;left:6px}
body.combat-focus .arena:has(.quick-evolve:not([hidden])) .arena-guard{bottom:6px}
body.combat-focus .combat-stage .boss-duel{top:6px}
body.combat-focus .arena.aiming~.combat-palette .combat-selection{display:none}
@media(orientation:landscape){
 body.combat-focus .combat-rotate-tip{display:none}
 body.combat-focus .wallet-ribbon{left:calc(env(safe-area-inset-left,0px) + 50px)!important;width:166px;height:44px;min-height:44px;padding:0 3px;gap:5px}
 body.combat-focus .wallet-ribbon .noah-balance,body.combat-focus .wallet-ribbon .noah-market{min-height:44px}
 body.combat-focus .wallet-ribbon .noah-amount>b{font-size:14px}
 body.combat-focus .wallet-ribbon .noah-market>b{font-size:10px}
 body.combat-focus .battle-actions{padding-left:168px}
 body.combat-focus .battle-layout>div:first-child{grid-template-columns:minmax(0,1fr) 176px;grid-template-rows:minmax(0,1fr);gap:5px}
 body.combat-focus .combat-stage{grid-column:1;grid-row:1;grid-template-rows:44px minmax(0,1fr)}
 body.combat-focus .combat-palette{grid-column:2;grid-row:1;grid-template-rows:48px 92px minmax(88px,1fr);gap:4px}
 body.combat-focus .combat-palette>.mobile-tactics{grid-row:1;grid-column:1;gap:3px}
 body.combat-focus .combat-palette .tactic-card{height:48px;padding:2px 2px 2px 22px;justify-content:center;text-align:left;align-items:center}
 body.combat-focus .combat-palette .tactic-card .spell-art{width:24px;height:24px;left:0;top:10px}
 body.combat-focus .combat-palette .tactic-card b{font-size:10px;line-height:1;word-break:normal}
 body.combat-focus .combat-palette .tactic-card small{display:none}
 body.combat-focus .combat-palette>.build-dock{grid-row:2;grid-column:1;grid-template-columns:1fr 1fr 44px;grid-template-rows:44px 44px;gap:4px}
 body.combat-focus.heist-mode .combat-palette>.build-dock{grid-template-columns:1fr 1fr;grid-template-rows:44px 44px}
 body.combat-focus .combat-palette .tower-card{height:44px;padding:2px;gap:1px;flex-direction:column}
 body.combat-focus .combat-palette .tower-card .tower-art{width:22px;height:22px;min-width:22px}
 body.combat-focus .combat-palette .tower-card strong{font-size:10px;line-height:1}
 body.combat-focus .combat-palette .tower-card small{font-size:8px;margin:0}
 body.combat-focus .combat-palette .overdrive-card{grid-column:3;grid-row:1/3;height:92px}
 body.combat-focus .combat-palette>.mobile-combat-tools{grid-row:3;grid-column:1;grid-template-columns:1fr 1fr;grid-auto-rows:44px;gap:4px;align-content:start}
 body.combat-focus .combat-selection{height:92px}
 body.combat-focus .combat-selection>.quick-evolve{display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:36px 44px;padding:4px 3px;gap:3px}
 body.combat-focus .combat-selection .quick-evolve>div{grid-column:1;grid-row:1;padding-right:0}
 body.combat-focus .combat-selection .quick-evolve b{font-size:14px}
 body.combat-focus .combat-selection .quick-evolve small{font-size:6px}
 body.combat-focus .combat-selection .quick-evolve span{font-size:8px}
 body.combat-focus .combat-selection .quick-evolve .text-button{grid-column:2;grid-row:2;width:44px}
 body.combat-focus .combat-selection .quick-evolve .primary{grid-column:1;grid-row:2;min-width:0;max-width:none;width:100%}
 body.combat-focus .combat-selection-close{height:44px;top:0;width:44px;background:#101e2c;border:0}
 body.combat-focus #toast{bottom:8px;left:15px;max-width:45vw}
}
@media(orientation:landscape) and (max-height:300px){
 body.combat-focus .battle-head{height:44px;min-height:44px}
 body.combat-focus .combat-palette{grid-template-rows:44px 88px minmax(88px,1fr);gap:2px}
 body.combat-focus .combat-palette .tactic-card{height:44px}
 body.combat-focus .combat-palette>.build-dock{gap:0;grid-template-rows:44px 44px}
 body.combat-focus .combat-selection{height:88px}
}
/* On wide phones the readout joins the top bar, giving the entire height to the map. */
body.combat-focus.combat-wide .battle-head{display:grid!important;grid-template-columns:44px 140px minmax(0,1fr) auto;gap:4px}
body.combat-focus.combat-wide .battle-title{grid-column:1;grid-row:1}
body.combat-focus.combat-wide .wallet-ribbon{width:140px;gap:3px}
body.combat-focus.combat-wide .wallet-ribbon .noah-market>b{font-size:9px}
body.combat-focus.combat-wide .battle-actions{grid-column:4;grid-row:1;padding-left:0;flex:none;gap:3px}
body.combat-focus.combat-wide .battle-head>.arena-top{position:relative;inset:auto;grid-column:3;grid-row:1;height:44px;display:flex;align-items:center;gap:2px;z-index:12;min-width:0;padding:0 2px;border:1px solid #34384f;border-radius:7px;background:#121724}
body.combat-focus.combat-wide .battle-head .wave-box{min-width:52px;max-width:64px;padding:0 2px;border:0;background:none;flex:1}
body.combat-focus.combat-wide .battle-head .wave-box strong{font-size:15px}
body.combat-focus.combat-wide .battle-head .swarm-readout{font-size:6px}
body.combat-focus.combat-wide .battle-head .battle-stat{min-width:38px;padding:0 2px;border:0;background:none}
body.combat-focus.combat-wide .battle-head .battle-stat b{font-size:17px}
body.combat-focus.combat-wide .battle-head .battle-stats{gap:0;flex:none}
body.combat-focus.combat-wide .battle-head .field-tools{position:relative;inset:auto;margin-left:auto;display:flex;gap:0}
body.combat-focus.combat-wide .battle-head .field-tools button{height:44px;width:44px;min-width:44px;padding:0;border:0;background:transparent}
body.combat-focus.combat-wide .combat-stage{grid-template-rows:minmax(0,1fr)}
@media(orientation:portrait){
 body.combat-focus .battle-layout>div:first-child{grid-template-rows:auto 164px;align-content:center}
 body.combat-focus .combat-stage{grid-template-rows:44px auto}
 body.combat-focus .combat-stage>.arena{height:auto!important;aspect-ratio:960/600!important}
}
body.combat-focus.combat-wide .battle-head .wave-box{height:40px;overflow:hidden;display:flex;flex-direction:column;justify-content:center}
body.combat-focus.combat-wide .battle-head .wave-box strong{font:700 15px/1.05 var(--heading);margin:0}
body.combat-focus.combat-wide .battle-head .swarm-readout{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:60px;font:6px/1.3 monospace;letter-spacing:0;margin:2px 0 0}
body.combat-focus .combat-stage>.arena-top,body.combat-focus.combat-wide .battle-head>.arena-top{pointer-events:auto}
body.combat-focus .combat-stage .wave-box,body.combat-focus.combat-wide .battle-head .wave-box{padding:1px 2px!important;min-height:0;max-height:40px}
body.combat-focus .swarm-readout{font:7px/1.2 monospace!important;letter-spacing:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;margin-top:2px}
body.combat-focus.combat-wide .battle-head .swarm-readout{font-size:6px!important}
/* Portrait keeps the complete board at its natural ratio and uses the rest for touch controls. */
@media(orientation:portrait){
 body.combat-focus .battle-layout>div:first-child{grid-template-rows:auto minmax(164px,1fr);align-content:stretch}
 body.combat-focus .combat-palette{grid-template-rows:minmax(56px,1fr) minmax(56px,1fr) 44px}
 body.combat-focus .combat-palette>.build-dock{grid-template-rows:minmax(0,1fr)}
 body.combat-focus .combat-palette .tactic-card,body.combat-focus .combat-palette .tower-card,body.combat-focus .combat-palette .overdrive-card{height:100%}
 body.combat-focus .combat-palette .tower-card{flex-direction:column;gap:2px}
}
@media(orientation:portrait) and (min-height:740px){
 body.combat-focus .combat-palette .mobile-tactics .tactic-card{padding:6px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center}
 body.combat-focus .combat-palette .mobile-tactics .spell-art{position:static;width:clamp(38px,8dvh,70px);height:auto}
 body.combat-focus .combat-palette .mobile-tactics .tactic-card b{font-size:15px;text-align:center;line-height:1.1}
 body.combat-focus .combat-palette .mobile-tactics .tactic-card small{font-size:8px;line-height:1.3}
 body.combat-focus .combat-palette .tower-card .tower-art{width:clamp(36px,8dvh,66px);height:clamp(36px,8dvh,66px)}
 body.combat-focus .combat-palette .tower-card strong{font-size:17px}
 body.combat-focus .combat-palette .tower-card small{font-size:11px}
 body.combat-focus .combat-selection>.quick-evolve{display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:minmax(0,1fr) 44px;padding:7px;gap:4px}
 body.combat-focus .combat-selection .quick-evolve>div{grid-column:1/-1;grid-row:1;padding-right:40px;gap:5px}
 body.combat-focus .combat-selection .quick-evolve b{font-size:23px}
 body.combat-focus .combat-selection .quick-evolve small{font-size:8px;max-width:none}
 body.combat-focus .combat-selection .quick-evolve span{font-size:12px}
 body.combat-focus .combat-selection .quick-evolve .primary{grid-column:1;grid-row:2;min-width:0;max-width:none;width:100%;font-size:12px}
 body.combat-focus .combat-selection .quick-evolve .text-button{grid-column:2;grid-row:2;width:44px;font-size:8px}
 body.combat-focus .combat-selection-close{height:44px;border:0}
}
body.combat-focus .mobile-combat-tools>.wave-button{white-space:normal;line-height:1.2}
body.combat-focus .combat-stage .swarm-readout,body.combat-focus.combat-wide .battle-head .swarm-readout{white-space:normal;max-height:22px}
@media(orientation:portrait){
 body.combat-focus .combat-palette>.build-dock>.overdrive-card{grid-column:5;grid-row:1;height:100%;display:flex;flex-direction:column;justify-content:center;gap:4px}
 body.combat-focus .combat-palette>.build-dock>.overdrive-card .heat-track{width:100%;flex:none}
}
.combat-wallet-kind{display:none}
body.combat-focus .wallet-ribbon .noah-amount{flex-direction:column;align-items:flex-start;gap:0}
body.combat-focus .combat-wallet-kind{display:block;font:6px/1.1 monospace;letter-spacing:.5px;color:#dab8df}
body.combat-focus .wallet-ribbon .noah-amount em{font-size:7px}
/* Mobile25: make the first choice an intentional landscape experience. */
.combat-orientation[hidden]{display:none}
.combat-orientation{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:24px max(24px,env(safe-area-inset-right));background:#080a17f5;backdrop-filter:blur(10px)}
.rotate-card{max-width:360px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:16px}
.rotate-card h2{font:900 clamp(36px,10vw,48px)/.95 var(--heading);color:#f4eaff;margin:0}
.rotate-card p{font:500 20px/1.3 var(--body);margin:0;color:#cbd0ed}
.rotate-card>strong{color:#c5ff69;font:700 15px var(--body)}
.rotate-card>small{color:#a3afbd;font:12px/1.5 var(--body);max-width:280px}
.rotate-card>button{min-height:48px;padding:10px 24px;margin-top:8px}
.rotate-phone{width:60px;height:104px;border:3px solid #7bffe7;border-radius:14px;display:grid;place-items:center;margin:28px;box-shadow:0 0 30px #51ffd728;transform:rotate(-90deg)}
.rotate-phone::before{content:'';width:20px;height:4px;position:absolute;top:7px;border-radius:5px;background:#7bffe7}
.rotate-phone span{font:36px var(--body);color:#e891ff}
@media(prefers-reduced-motion:no-preference){.rotate-phone{animation:turn-phone 2.5s ease-in-out 3}@keyframes turn-phone{0%,20%{transform:rotate(0)}65%,100%{transform:rotate(-90deg)}}}
.combat-rotate-tip{display:none}
body.combat-focus .combat-rotate-tip{display:block;align-self:center;min-height:36px;padding:4px 12px;border:0;border-radius:20px;background:#12322e;color:#aef7dd;font:12px var(--body);margin:0}
body.combat-focus .combat-selection-close{width:88px!important;height:44px!important;top:0;right:0;border:0;border-radius:0 7px 0 7px;background:#214a48!important;color:#cefff2;font:700 10px/1.2 var(--body);padding:5px;white-space:normal}
body.combat-focus .combat-selection .quick-evolve>div{padding-right:84px!important}
body.combat-focus .combat-selection .quick-evolve b{font-size:15px!important}
body.combat-focus .combat-selection .quick-evolve small{font-size:7px!important}
body.combat-focus .combat-stage .arena-guard{min-width:108px;min-height:44px;font:700 12px var(--body);padding:8px 12px}
/* The two visual rows stay compact rather than stretching across a tall phone. */
@media(orientation:portrait){
 body.combat-focus .battle-layout>div:first-child{grid-template-rows:auto 180px;align-content:center;gap:8px}
 body.combat-focus .combat-palette{grid-template-rows:64px 64px 44px;gap:4px}
 body.combat-focus .combat-palette .mobile-tactics .tactic-card{padding:4px 3px 4px 32px;display:flex;flex-direction:column;justify-content:center;align-items:start;text-align:left;gap:2px}
 body.combat-focus .combat-palette .mobile-tactics .spell-art{position:absolute;width:30px;height:38px;top:10px;left:0}
 body.combat-focus .combat-palette .mobile-tactics .tactic-card b{font-size:12px;text-align:left;line-height:1.1}
 body.combat-focus .combat-palette .mobile-tactics .tactic-card small{font-size:7px}
 body.combat-focus .combat-palette .tower-card .tower-art{width:32px;height:32px;min-width:32px}
 body.combat-focus .combat-palette .tower-card strong{font-size:13px}
 body.combat-focus .combat-palette .tower-card small{font-size:10px}
 body.combat-focus .combat-selection{height:64px}
 body.combat-focus .combat-selection>.quick-evolve{display:flex;padding:3px 4px;gap:3px}
 body.combat-focus .combat-selection .quick-evolve>div{padding-right:0!important;max-width:calc(100% - 175px);gap:2px}
 body.combat-focus .combat-selection .quick-evolve small{display:none}
 body.combat-focus .combat-selection .quick-evolve span{font-size:9px}
 body.combat-focus .combat-selection .quick-evolve .primary{width:88px;min-width:88px;max-width:88px;font-size:10px;margin-right:84px}
 body.combat-focus .combat-selection .quick-evolve .text-button{display:none}
 body.combat-focus .combat-selection-close{top:9px;right:0;border-radius:7px}
}
@media(orientation:landscape){
 body.combat-focus .combat-rotate-tip{display:none}
 body.combat-focus .combat-selection .quick-evolve>div{grid-column:1/-1}
 body.combat-focus .combat-selection .quick-evolve span{display:none}
 body.combat-focus .combat-stage .boss-duel{padding:5px 8px;max-width:460px;left:5px;right:5px;pointer-events:none}
 body.combat-focus .combat-stage .boss-duel .duel-heading{font-size:9px}
 body.combat-focus .combat-stage #duel-cast{font-size:12px}
 body.combat-focus .combat-stage .boss-duel .duel-command{margin-top:3px}
}
/* Saver removes decorative CSS animation as well as the canvas post-processing pass. */
body.battery-saver .arena *,body.battery-saver .wallet-ribbon *,body.battery-saver .tactic-card *,body.battery-saver .tower-card *{animation:none!important}
body.combat-focus .arena-guard::after{content:attr(data-shield-help);display:block;font:8px/1.3 var(--body);opacity:.85}
