/* The battle fits the available screen, including short desktop windows. */
.combat-mode-label{display:none}
body.combat-focus .wave-box .combat-mode-label{display:block;font:700 7px/1.2 var(--body);color:#a9f5e4;letter-spacing:.3px}
body.combat-edge .wave-box{flex-direction:column;gap:2px}
body.combat-focus [data-combat-view]{display:inline-flex;align-items:center;justify-content:center}
body.combat-focus .combat-stage{grid-template-rows:44px auto minmax(0,1fr)}
body.combat-focus .combat-stage>.arena{grid-row:3}
body.combat-focus .combat-stage>.arena-top{grid-row:1}
body.combat-focus .combat-stage>.boss-duel{position:relative;inset:auto;grid-row:2;max-width:none;margin:0;padding:5px 8px;pointer-events:auto;height:auto;min-width:0;z-index:10}
body.combat-focus .combat-stage>.boss-duel .duel-heading{font:800 11px/1.2 var(--body);gap:6px}
body.combat-focus .combat-stage>.boss-duel .duel-heading>b{font:700 10px var(--body)}
body.combat-focus .combat-stage>.boss-duel .duel-health{height:3px;margin:3px 0}
body.combat-focus .combat-stage>.boss-duel .duel-command{display:flex;align-items:center;gap:7px;margin:0}
body.combat-focus .combat-stage>.boss-duel .duel-command>div{flex:1;min-width:0;gap:2px}
body.combat-focus .combat-stage>.boss-duel #duel-cast{font:800 12px/1.15 var(--body);color:#ffe1a5}
body.combat-focus .combat-stage>.boss-duel #duel-counter{display:block;font:10px/1.25 var(--body);color:#e7f7ef}
body.combat-focus .combat-stage>.boss-duel #duel-target{display:none}
body.combat-focus .combat-stage>.boss-duel #boss-guard,body.combat-focus .combat-stage>.boss-duel #world-power{display:block;flex:none;width:88px;min-width:44px;height:44px;min-height:44px;max-width:100px;padding:4px;font:800 10px/1.15 var(--body);pointer-events:auto;border-radius:7px}
body.combat-focus .combat-stage>.boss-duel #world-power{background:#193e35;color:#b9ffcc;border:1px solid #81d3a1}
body.combat-focus .combat-stage>.arena .arena-guard{display:none!important}
body.combat-edge .combat-stage>.boss-duel{position:absolute;top:4px;left:calc(var(--combat-left) + 2 * var(--combat-gap));right:calc(var(--combat-right) + 2 * var(--combat-gap));height:90px;overflow:hidden}
body.combat-edge .combat-stage:has(>.boss-duel:not([hidden]))>.arena{top:98px;height:calc(100% - 98px)}
body.combat-edge .combat-stage>.boss-duel #duel-counter{font-size:10px;line-height:1.2}
body.combat-edge .combat-stage>.boss-duel .duel-command>div{justify-content:center}
body.combat-edge .combat-stage>.boss-duel .duel-command{height:58px}
body.combat-edge .combat-stage>.boss-duel .duel-health{margin:3px 0}
body.combat-edge .combat-stage>.boss-duel .duel-heading{height:13px}
body.combat-edge .combat-selection{bottom:6px}
/* The two orbiting rails grow on a desktop; the playfield keeps its full aspect. */
@media(orientation:landscape) and (min-width:1101px){
 body.combat-edge{--combat-left:144px;--combat-right:220px;--combat-gap:8px}
 body.combat-edge .battle-head{width:var(--combat-left);grid-template-rows:48px 68px 100px 48px;gap:7px}
 body.combat-edge .combat-menu-button,body.combat-edge .audio-launch,body.combat-edge .compact-speed,body.combat-edge #pause{height:48px}
 body.combat-edge .wallet-ribbon{height:68px;grid-template-rows:31px 29px;padding:3px 7px!important}
 body.combat-edge .wallet-ribbon .noah-amount>b{font-size:20px}
 body.combat-edge .wallet-ribbon .noah-market>b{font-size:11px}
 body.combat-edge .battle-head>.arena-top{height:100px;grid-template-rows:52px 44px}
 body.combat-edge .battle-head .wave-box{height:52px;max-height:52px}
 body.combat-edge .battle-head .wave-box strong{font-size:20px}
 body.combat-edge .arena-top>.life-chip{height:52px;font-size:18px}
 body.combat-edge .battle-head .battle-stats{height:44px}
 body.combat-edge .battle-head .battle-stat b{font-size:27px}
 body.combat-edge .battle-head .battle-stat small{font-size:9px}
 body.combat-edge .wave-box .combat-mode-label{font-size:8px}
 body.combat-edge .combat-palette{grid-template-rows:124px 164px 48px;row-gap:8px}
 body.combat-edge .combat-palette>.mobile-tactics{grid-template-rows:60px 60px}
 body.combat-edge .combat-palette .tactic-card{height:60px;grid-template-columns:38px minmax(0,1fr);grid-template-rows:1fr 12px;padding:4px}
 body.combat-edge .combat-palette .tactic-card .spell-art{width:38px;height:42px}
 body.combat-edge .combat-palette .tactic-card b{font-size:13px}
 body.combat-edge .combat-palette .tactic-card::after{font-size:9px}
 body.combat-edge .mobile-tactics>#scan-button{height:60px}
 body.combat-edge .mobile-tactics>#scan-button::before{font-size:15px}
 body.combat-edge .combat-palette>.build-dock,body.combat-edge.heist-mode .combat-palette>.build-dock{grid-template-rows:80px 80px}
 body.combat-edge .combat-palette .tower-card{height:80px}
 body.combat-edge .combat-palette .tower-card .tower-art{width:44px;height:44px;min-width:44px;min-height:44px}
 body.combat-edge .combat-palette .tower-card strong{font-size:14px}
 body.combat-edge .combat-palette .tower-card small{font-size:12px}
 body.combat-edge .mobile-combat-tools>.wave-button{height:48px;font-size:14px}
 body.combat-edge .combat-stage>.boss-duel{height:90px;padding:8px 10px}
 body.combat-edge .combat-stage>.boss-duel .duel-heading{font-size:13px;height:16px}
 body.combat-edge .combat-stage>.boss-duel #duel-cast{font-size:15px}
 body.combat-edge .combat-stage>.boss-duel #duel-counter{font-size:12px}
 body.combat-edge .combat-stage>.boss-duel #boss-guard,body.combat-edge .combat-stage>.boss-duel #world-power{width:105px;max-width:110px;font-size:12px}
 body.combat-edge .combat-stage:has(>.boss-duel:not([hidden]))>.arena{top:98px;height:calc(100% - 98px)}
}
.retry-preparation h2{max-width:560px;font-size:30px;margin:8px 0}
.retry-preparation>.retry-plan-cost{font:700 14px/1.4 var(--body);color:#cbfff0;margin:8px 0}
.retry-preparation>b{font:700 12px var(--body);color:#e5c4ff}
.retry-preparation>div button{min-height:48px}
.retry-preparation>div button b{font-size:19px}
.retry-preparation>p{max-width:520px}
.practice-outcome-note{font:13px/1.6 var(--body);color:#b9e8db;padding:35px 5px 0}
.challenge-preview .challenge-boss{display:flex;align-items:center;gap:12px;margin:14px 0}
.challenge-boss .remix-boss-sprite{width:70px;height:70px;min-width:70px}
.challenge-boss>div{display:flex;flex-direction:column;gap:5px}
.challenge-boss b{font:800 27px/1.1 var(--heading);color:#b7ffe8}
.challenge-boss span{font:12px var(--body);color:#d8c6e5}
.challenge-rules{display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:#152d31;border:1px solid #5f9386;border-radius:8px;font:12px/1.3 var(--body);color:#bfffe6}
@media(max-width:900px),(max-height:550px){
 .retry-preparation{padding:10px}
 .retry-preparation h2{font-size:23px;margin:5px 0}
 .retry-preparation>.retry-plan-cost{font-size:11px;margin:5px 0}
 .retry-preparation>b{font-size:10px}
 .retry-preparation>p{font-size:10px;margin:6px 0}
 .retry-preparation>div{gap:8px}
 .retry-preparation>div button{padding:7px;min-height:48px}
 .retry-preparation>div button b{font-size:16px}
 .retry-preparation>div button small{font-size:8px}
 .practice-outcome-note{font-size:11px;padding:24px 4px 0}
 dialog:has(.challenge-preview){width:calc(100vw - 16px);max-width:900px;max-height:calc(100dvh - 12px);margin:auto}
 .challenge-preview{padding:12px!important}
 .challenge-preview h2{font-size:28px;margin:6px 0}
 .challenge-preview>p{font-size:12px;line-height:1.3;margin:8px 0}
 .challenge-preview>.note{padding:6px 8px;min-height:0;line-height:1.3}
 .challenge-preview .challenge-boss{margin:8px 0}
 .challenge-boss .remix-boss-sprite{width:42px;height:42px;min-width:42px}
 .challenge-boss b{font-size:23px}
 .challenge-rules{font-size:11px;padding:7px;gap:4px}
 .challenge-preview .share-link{font-size:10px;padding:8px;min-height:40px}
 .challenge-preview .modal-actions{margin-top:9px;display:grid;grid-template-columns:1fr 1.5fr;gap:8px}
 .challenge-preview .modal-actions button{min-height:44px;font-size:11px;padding:7px}
}
@media(orientation:landscape) and (max-height:550px){
 .challenge-preview{display:grid;grid-template-columns:1fr 1.4fr;gap:6px 12px}
 .challenge-preview>.modal-top,.challenge-preview>h2{grid-column:1}
 .challenge-preview>.modal-top{height:18px;margin:0}
 .challenge-preview>.modal-top .icon-button{position:absolute;right:4px;top:4px;width:44px;height:44px}
 .challenge-preview h2{font-size:25px;line-height:1;margin:0}
 .challenge-preview .challenge-boss{grid-column:1;grid-row:3/5;margin:0}
 .challenge-preview .challenge-rules{grid-column:2;grid-row:1/4;margin-right:40px}
 .challenge-preview>p:not(.note){grid-column:1;grid-row:5;margin:0;font-size:11px}
 .challenge-preview>.share-label{display:none}
 .challenge-preview>.share-link{grid-column:2;grid-row:4/6;align-self:start}
 .challenge-preview>.note{grid-column:1/-1;font-size:10px;margin:0}
 .challenge-preview>.modal-actions{grid-column:1/-1;margin:0}
}
