/* Battle fills the usable screen; overlay HUD is presentation-only. */
body:not(.at-home) .lab{width:100%;max-width:none;height:var(--app-height,100dvh);margin:0;border-radius:0;padding-left:max(env(safe-area-inset-left,0px),var(--mini-safe-left,0px));padding-right:max(env(safe-area-inset-right,0px),var(--mini-safe-right,0px))}
body:not(.at-home) header{padding-top:8px;padding-bottom:4px}body:not(.at-home) footer{padding:6px 14px 2px;gap:10px}body:not(.at-home) .note{margin:2px 85px 5px 12px}body:not(.at-home) #loadout{margin:4px 12px 0}body:not(.at-home) .arena{width:100%}
#eventIntroIcon{font:900 clamp(100px,24vw,240px)/1 Onest;color:#ceff49;text-shadow:0 0 70px #a8e84955;margin:22px 0}#bossIntro [hidden]{display:none!important}
#pauseActions[hidden],#pauseLoadout[hidden]{display:none!important}
@media(orientation:landscape) and (min-width:480px){
 body{--battle-top:max(env(safe-area-inset-top,0px),var(--mini-safe-top,0px));--battle-bottom:max(env(safe-area-inset-bottom,0px),var(--mini-safe-bottom,0px));--battle-left:max(env(safe-area-inset-left,0px),var(--mini-safe-left,0px));--battle-right:max(env(safe-area-inset-right,0px),var(--mini-safe-right,0px))}
 body:not(.at-home) .lab{display:block;position:relative;isolation:isolate;padding:0}
 body:not(.at-home) .arena{position:absolute;inset:var(--battle-top) var(--battle-right) var(--battle-bottom) var(--battle-left);width:auto;height:auto!important;min-height:0;max-height:none;aspect-ratio:auto}
 body:not(.at-home) header{position:absolute;z-index:4;left:calc(var(--battle-left) + 8px);top:calc(var(--battle-top) + 8px);width:calc((100% - var(--battle-left) - var(--battle-right)) * .43 - 12px);height:38px;padding:3px 7px;gap:7px;border:1px solid #8ca89230;border-radius:12px;background:#0c191cce;backdrop-filter:blur(6px)}
 body:not(.at-home) header b,body:not(.at-home) #homeButton,body:not(.at-home) #soundToggle{display:none}
 body:not(.at-home) header small{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:9px;letter-spacing:0;margin:0 auto 0 0}
 body:not(.at-home) header button{height:30px;width:30px;flex:none;border-radius:9px;font-size:17px}
 body:not(.at-home) .hud{position:absolute;z-index:4;right:calc(var(--battle-right) + 8px);top:calc(var(--battle-top) + 8px);width:calc((100% - var(--battle-left) - var(--battle-right)) * .57 - 12px);height:38px;padding:3px 10px;gap:12px;border:1px solid #8ca89230;border-radius:12px;background:#0c191cce;backdrop-filter:blur(6px)}
 body:not(.at-home) .hud strong{font-size:clamp(18px,3vw,28px);letter-spacing:-.8px;white-space:nowrap;line-height:1}
 body:not(.at-home) .hud time{font-size:13px}body:not(.at-home) #hearts{font-size:18px}body:not(.at-home) .hud div{gap:10px;flex:none}
 body:not(.at-home) #progressionHud,body:not(.at-home) footer,body:not(.at-home) #loadout,body:not(.at-home) .note{display:none}
 body:not(.at-home) .xp{position:absolute;z-index:3;left:calc(var(--battle-left) + 10px);right:calc(var(--battle-right) + 10px);top:calc(var(--battle-top) + 51px);height:3px;margin:0;border-radius:4px;pointer-events:none}
 body:not(.at-home):has(.arena.impact) header,body:not(.at-home):has(.arena.impact) .hud,body:not(.at-home):has(.arena.impact) .xp{visibility:hidden}
 .fullscreen-quick{right:calc(var(--battle-right) + 8px);bottom:calc(var(--battle-bottom) + 8px);height:28px;width:32px;padding:0;font-size:0}.fullscreen-quick:before{content:'⛶';font-size:17px}
 .hint{font-size:9px;right:48px;bottom:9px}.arena.has-moved .hint{display:none}.large-arena .arena #message{top:64px;left:12px;max-width:55%;width:auto;font-size:10px}.large-arena .arena.event-active #message{top:var(--hunt-banner-bottom,122px)}
 #skipScene,#reviewFreeze{top:10px}#reviewEnding{top:48px}
 #overlay{padding:16px 7%;overflow-y:auto;justify-content:safe center}#overlay h1{font-size:28px;max-width:none;margin:0 0 8px}#overlay p{font-size:12px;line-height:1.4;max-width:440px;margin:5px 0}#overlay button{padding:10px 20px;margin-top:8px;font-size:12px}
 #pauseActions{display:flex;gap:10px;justify-content:center;max-width:440px}#pauseActions button{background:#25372f;color:#dce7d5;border:1px solid #71866355}#overlay #pauseLoadout{font-size:9px;color:#8fa59a;margin-top:9px}.share-result{padding:10px 18px}
 #upgradeOverlay{padding:12px 4%;justify-content:safe center;scroll-padding-block:12px}.upgrade-kicker{font-size:8px}#upgradeHeading{font-size:24px;margin:5px 0}#upgradeOverlay>p{font-size:10px;margin:0 0 9px}#upgradeOptions{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.upgrade-card{padding:12px 9px;min-height:108px;gap:8px}.upgrade-card>div{min-width:0}.upgrade-card b{font-size:11px}.upgrade-card small{font-size:10px;line-height:1.3}.upgrade-card em{font-size:9px}.upgrade-card>span{font-size:22px;min-width:22px}.upgrade-footnote{font-size:9px;margin-top:9px}
 #appMenu,:is(#recordShare,#challengeDialog){position:fixed;inset:var(--battle-top) var(--battle-right) var(--battle-bottom) var(--battle-left);width:min(760px,calc(100% - var(--battle-left) - var(--battle-right) - 24px));max-height:calc(var(--app-height,100dvh) - var(--battle-top) - var(--battle-bottom) - 16px);margin:auto;padding:15px 18px;border-radius:16px;overflow-y:auto;scroll-padding-top:58px}
 #appMenu .menu-heading,:is(#recordShare,#challengeDialog) .menu-heading{position:sticky;top:-15px;z-index:2;background:#101d1d;padding:9px 0;border-bottom:1px solid #43574866}.menu-heading h2{font-size:21px}.menu-heading button{height:32px;width:32px;flex:none}.menu-kicker{margin:9px 0;font-size:8px}.menu-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:12px}.menu-links button,.menu-links a{padding:10px 12px;font-size:11px;min-height:40px}#appMenu h3{font-size:21px;margin:10px 0}.profile-stats{grid-template-columns:2fr 1fr 1fr;gap:8px}.profile-stats div{padding:9px 12px}.profile-stats div:first-child{grid-column:auto}.profile-stats strong{font-size:25px}.menu-primary,.menu-secondary{padding:10px;margin-top:9px}.audio-mixer{padding:12px;margin:12px 0}.audio-mixer p{margin-bottom:10px}.audio-mixer input{height:30px}.rules-list li{margin:10px 0}
 :is(#recordShare,#challengeDialog)[open]{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);column-gap:18px;align-items:start}:is(#recordShare,#challengeDialog) .menu-heading{grid-column:1/-1}:is(#recordShare,#challengeDialog) .record-card-preview{grid-column:1;grid-row:2/9;position:sticky;top:50px;margin-top:10px}.record-card-preview img{max-height:clamp(64px,22dvh,125px);object-fit:contain}.record-card-preview>div{padding:10px 14px}.record-card-preview strong{font-size:clamp(24px,4vw,35px)}.record-card-preview b{font-size:12px}.record-card-preview small{font-size:9px}:is(#recordShare,#challengeDialog)>p,:is(#recordShare,#challengeDialog)>.menu-primary,:is(#recordShare,#challengeDialog)>.menu-secondary{grid-column:2;min-width:0;overflow-wrap:anywhere}#shareStatus{font-size:11px;line-height:1.4;margin:10px 0}#shareCaption{font-size:11px;margin:10px 0}
 #bossIntro{display:grid;grid-template-columns:minmax(0,44fr) minmax(0,56fr);grid-template-rows:auto minmax(0,1fr) auto auto;gap:0;padding:calc(var(--battle-top) + 12px) calc(var(--battle-right) + 20px) calc(var(--battle-bottom) + 12px) calc(var(--battle-left) + 20px)}
 #bossIntro img,#eventIntroIcon{grid-column:1;grid-row:1/5;width:100%;height:100%;max-height:100%;min-height:0;margin:0;object-fit:contain;text-align:center;align-content:center;font-size:100px}#bossIntro img{width:94%;height:94%;align-self:center;justify-self:center}.boss-alert{grid-column:2;grid-row:1;justify-self:center;max-width:100%;font-size:9px;letter-spacing:.1em;margin-bottom:7px;padding:6px 10px}#bossIntro h1{grid-column:2;grid-row:2;font-size:clamp(19px,3.4vw,32px);align-self:center;margin:6px 0;overflow-wrap:normal}#bossIntro p{grid-column:2;grid-row:3;text-align:center;font-size:8px;line-height:1.4;letter-spacing:.08em}.boss-intro-controls{grid-column:2;grid-row:4;justify-content:center;margin-top:9px}.boss-intro-controls button{height:30px}
 body.at-home .lab{width:100%;max-width:none;height:var(--app-height,100dvh);margin:0;border-radius:0;padding-left:var(--battle-left);padding-right:var(--battle-right)}body.at-home #home{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:34px minmax(0,1fr) 42px 30px;padding:12px 20px;gap:8px;overflow-y:auto}.home-top{grid-column:1/-1;gap:10px}.home-top>b{font-size:26px}.home-top button{height:30px;width:30px}.home-title{grid-column:1;grid-row:2;margin:auto 0}.home-title h1{font-size:clamp(25px,4vw,36px);margin:7px 0}.home-title p{font-size:10px}.home-kicker{font-size:6px}.home-stage{grid-column:2;grid-row:2/5;min-height:0;max-height:none;margin:0;align-self:stretch}.home-play{grid-column:1;grid-row:3;padding:10px 15px;font-size:12px}.home-how{grid-column:1;grid-row:4;padding:0;font-size:9px;gap:3px}.home-how b{font-size:11px}.home-foot{display:none}.home-quote{right:40px;font-size:13px;min-height:38px}
}
@media(max-height:340px) and (orientation:landscape){#home{padding:9px 14px!important;gap:5px!important;grid-template-rows:30px minmax(0,1fr) 36px 28px!important}.home-title h1{font-size:25px}.home-title p{font-size:9px}.home-kicker{display:none}.home-top small{display:none}.home-quote{font-size:12px}.home-how{font-size:8px}.upgrade-card{padding:8px;min-height:90px}.upgrade-card small{font-size:9px}.upgrade-footnote{font-size:8px}#upgradeHeading{font-size:22px}#bossIntro h1{font-size:clamp(18px,3vw,27px)}#overlay h1{font-size:25px}}

@media(orientation:landscape) and (min-width:480px){.challenge-target{font-size:10px!important;padding:5px 8px;margin-block:6px!important}.challenge-comparison{font-size:11px;margin:6px auto}#overlay .share-result{margin-top:7px;padding:8px 12px;font-size:11px}#challengeDialog #challengeStatus,#challengeCaption{font-size:11px;line-height:1.4}#challengeDialog .menu-heading{top:-15px}.challenge-retry{font-size:10px;padding:5px}}
