.fullscreen-setup[hidden],.combat-options[hidden]{display:none!important}
.fullscreen-setup,.combat-options{position:fixed;inset:0;z-index:210;display:grid;place-items:center;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));background:#070b17f5;overflow:auto}
.fullscreen-card{max-width:480px;width:100%;color:#e7f6f4}
.fullscreen-card h2{font:900 clamp(32px,8vw,48px)/.95 var(--heading);margin:12px 0;color:#c5ff69}
.fullscreen-card p{font:15px/1.4 var(--body);margin:12px 0;color:#c4d9de}
.fullscreen-card ol{padding-left:24px;font:14px/1.6 var(--body);margin:12px 0}
.fullscreen-card li{padding:3px 0}
.fullscreen-card small{font:11px/1.4 var(--body);color:#9eb7bc;display:block;margin:14px 0}
.fullscreen-card button{min-height:48px;width:100%}
.combat-menu-button{display:none}
.combat-options-card{width:min(400px,100%);padding:14px;border:1px solid #4b837c;border-radius:14px;background:#111f30}
.combat-options-card header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:10px}
.combat-options-card h2{font:800 24px var(--heading);margin:0}
.combat-options-card header button{width:44px;height:44px;color:#bcffed;background:#1b3440;border:1px solid #5b9492;border-radius:8px}
.combat-options-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.combat-focus .combat-options-grid>button{position:static!important;display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-height:48px;height:auto!important;width:100%!important;max-width:none!important;padding:8px!important;font:12px var(--body);border:1px solid #467b7b;border-radius:8px;color:#bcffed;background:#142c36}
body.combat-focus .combat-options-grid .back-button::after{content:'Campaign';font:12px var(--body)}
body.combat-focus .combat-options-grid .audio-launch>span{display:block}
body.combat-focus .combat-options-grid .audio-launch::before{display:none}
body.combat-focus .combat-options-grid .overdrive-card{font-size:12px}
body.combat-focus .combat-options-grid .overdrive-card>strong,body.combat-focus .combat-options-grid .overdrive-card small{font-size:10px;display:block}
body.combat-focus .combat-options-grid .overdrive-card .heat-track{width:100%;height:4px}
/* Quality29: framed command rails, complete battlefield, no controls over the routes. */
body.combat-focus .tower-art{display:block!important;visibility:visible;opacity:1;background-image:url('assets/mycelium-sprites-v2.png');background-size:300% 300%;background-repeat:no-repeat}
body.combat-focus .tower-card.unaffordable{opacity:1;filter:none;background:#19172b;border-color:#4e4262}
body.combat-focus .tower-card.unaffordable small{color:#ffb6a8}
body.combat-focus .tower-card.selected{border-color:#c5ff69;box-shadow:inset 0 0 20px #b0ff4919,0 0 9px #b0ff491a}
body.combat-focus .tower-card strong{display:block;color:#f3efff}
body.combat-focus .audio-launch::after{content:'SOUND';display:block;font:600 7px/1 var(--body);letter-spacing:.4px}
body.combat-focus .audio-launch[data-audio-state=off]::after{content:'TAP SOUND';color:#fff1ac}
body.combat-focus .audio-launch[data-audio-state=on]{box-shadow:inset 0 0 18px #ff5fcf20;border-color:#ff8dde!important}
body.combat-focus .battle-actions>.life-chip{display:flex;align-items:center;justify-content:center;gap:4px;min-width:52px;min-height:44px;height:44px;padding:4px;background:#301c35e8;border:1px solid #e4a4e0;border-radius:8px;color:#ff9adf;font:700 14px var(--body)}
body.combat-focus .life-chip::after{content:'+';font:700 12px var(--body);color:#e5ffb7}
body.combat-focus .life-chip.empty{border-color:#ff709b;color:#ffadc3}
/* Tower details are a small overlay; the build catalogue always remains available. */
body.combat-focus .combat-stage{position:relative}
body.combat-focus .combat-selection{position:absolute;z-index:14;bottom:6px;left:6px;right:6px;height:70px;width:auto;grid-row:auto;background:linear-gradient(110deg,#111b31f5,#1a142ef5);border:1px solid #9be9d9;border-radius:9px;box-shadow:0 5px 24px #0008}
body.combat-focus .combat-selection>.quick-evolve{display:flex;padding:5px 96px 5px 8px;gap:8px}
body.combat-focus .combat-selection .quick-evolve>div{display:flex;flex-direction:column;min-width:0;max-width:none;padding:0!important;gap:3px}
body.combat-focus .combat-selection .quick-evolve b{font-size:18px;line-height:1}
body.combat-focus .combat-selection .quick-evolve small{display:block;font:7px/1.2 var(--body);white-space:nowrap;max-width:180px;overflow:hidden;text-overflow:ellipsis}
body.combat-focus .combat-selection .quick-evolve span{display:block;font:10px/1.15 var(--body)}
body.combat-focus .combat-selection .quick-evolve .text-button{display:none}
body.combat-focus .combat-selection .quick-evolve .primary{width:100px;min-width:90px;max-width:110px;min-height:44px;height:48px;font:700 11px/1.2 var(--body);padding:4px;margin:0}
body.combat-focus .combat-selection-close{width:88px!important;min-height:44px;height:100%;top:0;font:700 11px/1.2 var(--body);padding:5px;border-radius:0 8px 8px 0;background:#172c38;border-left:1px solid #5b8c8f}
body.combat-focus .combat-stage:has(.arena.aiming) .combat-selection{display:none}
.combat-orientation{overflow:auto}
.rotate-card{gap:12px}
.rotate-card>[data-fullscreen-setup],.rotate-card>[data-portrait-play]{margin:0;min-height:44px;width:100%}
body.combat-edge{--combat-left:104px;--combat-right:168px;--combat-gap:6px}
body.combat-edge .app-shell{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);background:radial-gradient(ellipse at 50% 25%,#231535,#080b17 75%)}
body.combat-edge #main{position:relative;display:block;padding:0;gap:0}
body.combat-edge .battle-layout,body.combat-edge .battle-layout>div:first-child{position:absolute;inset:0;display:block;min-height:0;max-width:none}
body.combat-edge .combat-stage{position:absolute;inset:0;display:block}
body.combat-edge .combat-stage>.arena{position:absolute;inset:0 calc(var(--combat-right) + 2 * var(--combat-gap)) 0 calc(var(--combat-left) + 2 * var(--combat-gap));width:auto;height:100%;border:0;border-radius:8px;background:radial-gradient(ellipse,#281630,#090d19 80%)}
body.combat-edge .arena-world{will-change:auto}
body.combat-edge .battle-head{position:absolute;inset:6px auto 6px 6px;width:var(--combat-left);height:auto;min-height:0;z-index:12;display:grid!important;grid-template-columns:1fr 1fr;grid-template-rows:44px 56px 84px 44px;gap:5px;align-content:center;margin:0;padding:0}
body.combat-edge .battle-head .battle-title{display:none!important}
body.combat-edge .battle-actions{display:contents!important;padding:0;max-width:none}
body.combat-edge .combat-menu-button,body.combat-edge .audio-launch,body.combat-edge .compact-speed,body.combat-edge #pause{min-width:44px;width:100%;height:44px;min-height:44px;border-radius:9px;box-shadow:inset 0 1px 0 #ffffff12}
body.combat-edge .combat-menu-button{display:block;grid-column:1;grid-row:1;background:linear-gradient(#22324a,#131e32);border:1px solid #547c93;color:#ddfff1;font-size:22px}
body.combat-edge .audio-launch{grid-column:2;grid-row:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:1px}
body.combat-edge .audio-launch::before{font-size:20px}
body.combat-edge .audio-launch>span{display:none}
body.combat-edge .compact-speed{grid-column:1;grid-row:4;font-size:17px;padding:2px;background:#17323c;border-color:#65999d}
body.combat-edge #pause{grid-column:2;grid-row:4;font-size:15px;background:#25203b;border-color:#746083}
body.combat-edge .wallet-ribbon{position:relative!important;inset:auto!important;transform:none;grid-column:1/-1;grid-row:2;width:100%;height:56px;min-height:56px;margin:0;padding:2px 4px!important;display:grid;grid-template-columns:1fr;grid-template-rows:26px 22px;gap:0;z-index:13;border:1px solid #ba6eac;border-radius:9px;background:linear-gradient(120deg,#361930e8,#122638e8);box-shadow:inset 0 1px 0 #ffffff13}
body.combat-edge .wallet-ribbon .noah-balance,body.combat-edge .wallet-ribbon .noah-market{min-height:0;height:auto;min-width:0;justify-content:space-between;align-items:center;gap:3px;padding:0;display:flex;flex-direction:row}
body.combat-edge .wallet-ribbon .noah-token{display:none}
body.combat-edge .wallet-ribbon .noah-amount{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:2px}
body.combat-edge .wallet-ribbon .noah-amount>b{font-size:17px}
body.combat-edge .wallet-ribbon .noah-amount em{font:700 7px var(--body)}
body.combat-edge .combat-wallet-kind{font-size:7px;max-width:40px;line-height:1.1}
body.combat-edge .wallet-ribbon .noah-market>b{font:700 9px/1.3 monospace;white-space:nowrap;overflow-wrap:normal}
body.combat-edge .wallet-ribbon .noah-market>small{display:none}
body.combat-edge .wallet-ribbon .noah-market::before{content:'PRICE';font:7px var(--body);color:#a3e8dd}
body.combat-edge .battle-head>.arena-top{position:relative;inset:auto;transform:none;grid-column:1/-1;grid-row:3;width:100%;height:84px;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:44px 36px;gap:2px;padding:0;z-index:12;background:#101b2ee8;border:1px solid #4a637f;border-radius:9px;pointer-events:auto}
body.combat-edge .battle-head .wave-box{grid-column:1;grid-row:1;width:100%;min-width:0;max-width:none;padding:0!important;height:44px;max-height:44px;display:flex;justify-content:center;align-items:center;background:transparent;border:0}
body.combat-edge .battle-head .wave-box strong{font-size:17px;line-height:1.2;white-space:normal;text-align:center}
body.combat-edge .battle-head .wave-box .swarm-readout{display:none!important}
body.combat-edge .arena-top>.life-chip{grid-column:2;grid-row:1;width:100%;height:44px;min-height:44px;min-width:44px;display:flex;align-items:center;justify-content:center;gap:3px;padding:1px;border:1px solid #aa6aab;border-radius:8px;background:#332039e8;color:#ffa2dc;font:700 15px var(--body);pointer-events:auto}
body.combat-edge .battle-head .battle-stats{grid-column:1/-1;grid-row:2;display:flex;justify-content:space-around;width:100%;height:36px;gap:0}
body.combat-edge .battle-head .battle-stat{min-width:0;padding:0;max-width:50px;background:none;border:0}
body.combat-edge .battle-head .battle-stat b{font-size:21px;margin:0;line-height:1}
body.combat-edge .battle-head .battle-stat small{font-size:7px;letter-spacing:.2px}
body.combat-edge .field-tools{display:none!important}
body.combat-edge .combat-palette{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:var(--combat-right);max-height:calc(100% - 8px);display:grid;grid-template-columns:1fr;grid-template-rows:92px 120px 44px;gap:4px;z-index:12;padding:0}
body.combat-edge .combat-palette>.mobile-tactics{grid-row:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:44px 44px;gap:4px;justify-content:stretch}
body.combat-edge .combat-palette .tactic-card{position:relative;width:100%;height:44px;min-height:44px;min-width:44px;display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:1fr 10px;gap:0 2px;padding:2px;border-radius:9px;text-align:left;overflow:hidden;background:linear-gradient(130deg,#2a173c,#0e192d);border:1px solid var(--tactic);box-shadow:inset 0 0 18px color-mix(in srgb,var(--tactic) 13%,transparent)}
body.combat-edge .combat-palette .tactic-card .spell-art{position:static;grid-column:1;grid-row:1/3;width:30px;height:34px;align-self:center;transform:none}
body.combat-edge .combat-palette .tactic-card b{grid-column:2;grid-row:1;display:block;font:700 10px/1 var(--body);align-self:center;word-break:normal;color:#fff1ff}
body.combat-edge .combat-palette .tactic-card small{display:none}
body.combat-edge .combat-palette .tactic-card::after{content:attr(data-state);grid-column:2;grid-row:2;display:block;font:700 7px/1 var(--body);letter-spacing:.3px;color:var(--tactic)}
body.combat-edge .combat-palette .tactic-card:disabled{opacity:.8;filter:none}
body.combat-edge .combat-palette .tactic-card.armed{border-color:#fff4ae;box-shadow:0 0 13px color-mix(in srgb,var(--tactic) 50%,transparent)}
body.combat-edge .mobile-tactics>#scan-button{width:100%;height:44px;min-width:44px;min-height:44px;margin:0;border:1px solid #67c8c5;border-radius:9px;background:linear-gradient(120deg,#153947,#142133);color:#b8fff1;font-size:0;padding:2px}
body.combat-edge .mobile-tactics>#scan-button::before{font:700 11px var(--body)}
body.combat-edge .mobile-tactics>#scan-button small{display:none}
body.combat-edge .combat-palette>.build-dock,body.combat-edge.heist-mode .combat-palette>.build-dock{grid-row:2;grid-column:1;display:grid!important;grid-template-columns:1fr 1fr;grid-template-rows:58px 58px;gap:4px;justify-content:stretch}
body.combat-edge .combat-palette .tower-card{width:100%;height:58px;min-width:44px;min-height:44px;padding:1px 2px;position:relative;gap:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:9px;overflow:hidden;background:linear-gradient(130deg,#241c37,#101c2d);border-color:#65557d;box-shadow:inset 0 1px 0 #ffffff14}
body.combat-edge .combat-palette .tower-card .tower-art{display:block!important;width:30px;height:30px;min-width:30px;min-height:30px;flex:none;filter:drop-shadow(0 0 4px #acddff45)}
body.combat-edge .combat-palette .tower-card>span:last-child{display:flex;flex-direction:column;align-items:center;gap:0}
body.combat-edge .combat-palette .tower-card strong{display:block;font:700 11px/1 var(--body);color:#f5f1ff}
body.combat-edge .combat-palette .tower-card small{display:block;font:700 10px/1 var(--body);margin:1px 0 0}
body.combat-edge .combat-palette .tower-card.selected{border-color:#c5ff69;background:linear-gradient(130deg,#34412a,#16272c);box-shadow:inset 0 0 22px #adff4b18,0 0 9px #adff4b24}
body.combat-edge.heist-mode .combat-palette .tower-card:nth-child(3){grid-column:auto;flex-direction:column;gap:0}
body.combat-edge .combat-palette>.mobile-combat-tools{grid-column:1;grid-row:3;display:block;min-height:44px}
body.combat-edge .mobile-combat-tools>.wave-button{width:100%;min-height:44px;height:44px;font:800 11px/1.1 var(--body);padding:3px;background:linear-gradient(115deg,#c9ff4f,#a2f66a);border:1px solid #d7ff99;box-shadow:0 0 15px #b6ff5120;color:#10251d;border-radius:9px}
body.combat-edge .combat-selection{left:calc(var(--combat-left) + 3 * var(--combat-gap));right:calc(var(--combat-right) + 3 * var(--combat-gap));height:70px;width:auto}
body.combat-edge .combat-selection .quick-evolve b{font-size:17px}
body.combat-edge .combat-stage .boss-duel{left:6px;right:6px;top:4px;max-width:none;padding:4px 8px;background:#170f20df;pointer-events:none}
body.combat-edge .combat-stage .arena-guard{left:6px;bottom:4px;min-width:100px}
body.combat-edge #toast{left:calc(var(--combat-left) + 16px);bottom:5px;max-width:calc(100vw - var(--combat-left) - var(--combat-right) - 44px);font-size:11px;padding:7px;pointer-events:none}
body.combat-edge .aim-overlay{padding:0 6px 5px;gap:4px;flex-wrap:wrap}
body.combat-edge .aim-overlay span{padding:7px;font:700 9px/1.2 var(--body);letter-spacing:.3px;max-width:calc(100% - 96px)}
body.combat-edge .aim-overlay button{min-height:44px;min-width:88px;padding:4px;font-size:11px;border-radius:8px}
body.combat-edge .combat-options-grid [data-action="settings"]::after{content:'Sound & graphics';font:12px var(--body)}
body.combat-edge .combat-options-grid [data-combat-view]::after{content:'Fullscreen';font:12px var(--body)}
@media(orientation:landscape) and (max-height:340px){.fullscreen-card{max-width:600px;display:grid;grid-template-columns:1fr 1.5fr;gap:4px 20px}.fullscreen-card>.eyebrow,.fullscreen-card>h2,.fullscreen-card>p{grid-column:1}.fullscreen-card>ol{grid-column:2;grid-row:1/4;font-size:12px;margin:0}.fullscreen-card>small{grid-column:1/-1;margin:3px 0}.fullscreen-card>button{grid-column:1/-1;min-height:44px}.fullscreen-card h2{font-size:28px;margin:4px 0}.fullscreen-card p{font-size:12px;margin:0}.fullscreen-setup{padding:10px 24px}}
@media(orientation:landscape) and (max-width:730px){body.combat-edge{--combat-left:92px;--combat-right:152px;--combat-gap:4px}body.combat-edge .combat-selection{height:64px}body.combat-edge .combat-selection>.quick-evolve{padding-right:70px;gap:3px}body.combat-edge .combat-selection-close{width:64px!important;font-size:10px}body.combat-edge .combat-selection .quick-evolve .primary{min-width:76px;width:76px;font-size:10px}body.combat-edge .combat-selection .quick-evolve b{font-size:14px}body.combat-edge .combat-selection .quick-evolve small{display:none}}
body.combat-edge #pause{font-size:0!important;padding:0}
body.combat-edge #pause::before{content:'Ⅱ';font:700 22px var(--body)}
body.combat-edge #pause[aria-pressed=true]::before{content:'▶';font-size:18px}
@media(orientation:portrait){body.combat-focus .combat-palette>.build-dock{display:grid!important}body.combat-focus .combat-selection{height:68px}body.combat-focus .combat-selection .quick-evolve>div{max-width:none}body.combat-focus .combat-selection>.quick-evolve{padding-right:80px;gap:4px}body.combat-focus .combat-selection-close{width:72px!important;font-size:10px}body.combat-focus .combat-selection .quick-evolve .primary{min-width:76px;width:76px;font-size:10px}body.combat-focus .combat-selection .quick-evolve b{font-size:16px}body.combat-focus .combat-selection .quick-evolve small{display:none}body.combat-focus .combat-selection .quick-evolve span{font-size:9px}}
@media(orientation:landscape) and (max-height:275px){body.combat-edge .battle-head{inset:2px auto 2px 6px;gap:3px}body.combat-edge .combat-palette{grid-template-rows:92px 104px 44px;gap:3px;max-height:calc(100% - 2px)}body.combat-edge .combat-palette>.build-dock,body.combat-edge.heist-mode .combat-palette>.build-dock{grid-template-rows:50px 50px}body.combat-edge .combat-palette .tower-card{height:50px}body.combat-edge .combat-palette .tower-card .tower-art{height:24px;min-height:24px;width:24px;min-width:24px}body.combat-edge .combat-palette .tower-card strong{font-size:10px}}
body.combat-edge .combat-palette .tower-card.unaffordable small{font-size:8px;white-space:nowrap}
@media(orientation:portrait){body.combat-focus .battle-layout>div:first-child{grid-template-rows:minmax(0,1fr) 180px;align-content:stretch;gap:6px}body.combat-focus .combat-stage{grid-template-rows:44px minmax(0,1fr)}body.combat-focus .combat-stage>.arena{height:100%!important;aspect-ratio:auto!important}body.combat-focus .combat-rotate-tip{margin:1px auto 2px}}
@media(orientation:portrait) and (min-height:650px){body.combat-focus .battle-layout>div:first-child{grid-template-rows:minmax(0,1fr) 220px}body.combat-focus .combat-palette{grid-template-rows:80px 88px 44px}body.combat-focus .combat-palette>.build-dock{grid-template-rows:88px}body.combat-focus .combat-palette .mobile-tactics .tactic-card{padding-left:40px}body.combat-focus .combat-palette .mobile-tactics .spell-art{width:38px;height:48px;top:15px}body.combat-focus .combat-palette .tower-card .tower-art{width:46px;height:46px}body.combat-focus .combat-palette .tower-card strong{font-size:15px}}
