/* The creatures own the scene. HUD information sits in the painted margins; controls stay in the lower 40% thumb zone. */
.battle-view{display:flex;flex-direction:column;height:100dvh;min-height:100dvh;padding-bottom:calc(10px + var(--safe));overflow-x:hidden;overflow-y:auto}
.battle-view .screen-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:5px;padding-bottom:0}
.battle-view .battle-stage,.battle-view .battle-stage.zone-cave,.battle-view .battle-stage.zone-outskirts{flex:1 1 200px;height:auto;min-height:190px;max-height:none;margin-bottom:38px;overflow:visible}
.battle-view .battle-world{top:4px;z-index:8}
.battle-view .status-box.enemy-status{top:20px;left:4px;right:4px;min-height:48px;padding:5px 10px}
.battle-view .status-box.enemy-status strong{font-size:13px}
.battle-view .status-box.ally-status{left:4px;right:auto;bottom:-38px;width:53%;min-width:0;min-height:44px;padding:4px 8px;z-index:10}
.battle-view .status-box.ally-status strong{font-size:10px}
.battle-view .status-box.ally-status .status-sub{display:flex;justify-content:space-between;font-size:9px;font-weight:700;color:#ffeccd;margin-top:2px}
.battle-view .status-box.ally-status .mp-sub{display:none}
.battle-view .status-box.ally-status .hp-track{height:5px;margin-top:3px}
.battle-view .enemy-intent{left:auto;right:4px;bottom:-38px;width:44%;min-height:44px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;padding:4px 7px;font-size:8.5px;line-height:1.15}
.battle-view .enemy-intent strong{font-size:9px}
.battle-view .enemy-intent span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.battle-view .actor.enemy{left:25%;top:17%;width:72%;height:72%;z-index:2;filter:drop-shadow(0 18px 8px #180721a8)}
.battle-view .actor.ally{left:-5%;bottom:8%;width:47%;height:57%;z-index:4;filter:drop-shadow(0 15px 8px #13071dd0)}
.battle-view .battle-stage.has-support .actor.enemy{left:19%;top:19%;width:63%;height:66%}
.battle-view .battle-stage .actor.support{right:-3%;top:48%;width:34%;height:36%;z-index:3}
.battle-view .battle-stage.has-support .status-box.enemy-status{top:20px;left:4px;right:4px;width:auto;min-height:48px}
.battle-view .battle-stage .status-box.support-status{top:73px;right:4px;width:112px;min-width:0;padding:3px 6px;z-index:8;font-size:9px}
.battle-view .battle-stage .status-box.support-status .status-sub{display:none}
.battle-view .battle-stage .status-box.support-status .hp-track{height:4px;margin-top:2px}
.battle-view .impact-burst{left:69%;top:45%;width:170px;height:170px;z-index:9;mix-blend-mode:screen;background:radial-gradient(circle,#fff 0,#ffeec6 8%,#ffbc709e 18%,#af6bfe80 32%,transparent 69%);animation:spotlight-burst .42s ease-out forwards}
.battle-view .impact-burst.on-ally{left:23%;top:67%}.battle-view .impact-burst.on-support{left:78%;top:67%}
.battle-view .battle-number{left:69%;top:27%;z-index:12;font-size:29px;animation:spotlight-number .6s cubic-bezier(.2,1.5,.3,1) both}
.battle-view .battle-number.ally{left:21%;top:46%}.battle-view .battle-number.support{left:78%;top:44%}
.battle-view .actor.ally.strike{animation:spotlight-lunge .4s cubic-bezier(.18,.7,.3,1) both}
.battle-view .actor.enemy.hit,.battle-view .actor.support.hit{animation:spotlight-recoil .4s ease-out both}
.battle-view .actor.ally.hit{animation:spotlight-recoil-ally .4s ease-out both}
.battle-view .battle-stage.skill-ally{isolation:isolate}
.battle-view .battle-stage.skill-ally:before{content:"";display:block;position:absolute;inset:15% -30% 0;border-radius:50%;z-index:5;pointer-events:none;background:radial-gradient(ellipse,#fff6c78c 0,#bb80ef9c 18%,#5d2c8b55 43%,transparent 70%);animation:spotlight-charge .62s ease-out both}
.battle-cutin{position:absolute;left:0;right:0;top:18%;bottom:9%;z-index:9;display:flex;align-items:center;justify-content:flex-start;pointer-events:none;overflow:hidden;animation:spotlight-cutin .44s ease-in-out both}
.battle-cutin:before{content:"";position:absolute;left:-20%;right:2%;top:30%;height:65%;transform:skewY(-12deg);background:linear-gradient(100deg,#180c30ee,#7a3b9ed9 48%,transparent);border-top:2px solid #ffe2a0;box-shadow:0 -10px 34px #e7a9ff78}
.battle-cutin.resonance-burst-cutin:before{background:linear-gradient(100deg,#12293ef2,#3b8f9de6 44%,#b76cffbb 78%,transparent);border-top-color:#9cfef0;box-shadow:0 -10px 38px #7cf7e8aa}
.battle-cutin-art{position:relative;z-index:1;width:62%;height:100%;filter:drop-shadow(0 0 18px #ffe7ad)}
.battle-cutin-art .creature-art{width:100%;height:100%}
.battle-cutin-copy{position:absolute;right:4%;bottom:15%;z-index:2;max-width:54%;display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.battle-cutin-copy small{font-size:10px;font-weight:800;letter-spacing:.08em;color:#ffdca0;text-shadow:0 1px 4px #180828}
.battle-cutin-copy strong,.battle-cutin strong{font:700 clamp(17px,5vw,25px) Georgia,'Noto Serif KR',serif;color:#fff1bc;text-align:right;text-shadow:0 2px 4px #250b30,0 0 18px #ffd18a}
.battle-view .battle-stage.perfect-flash:after{content:"";position:absolute;inset:0;z-index:11;pointer-events:none;border-radius:inherit;background:radial-gradient(circle at 68% 42%,#fffbe3aa 0,#ffd87844 42%,transparent 75%);animation:perfect-stage-flash .22s ease-out forwards}
@keyframes perfect-stage-flash{0%{opacity:1}100%{opacity:0}}
.battle-view .hp-track>span{transition:width .34s cubic-bezier(.22,1,.36,1)}
.battle-view .cmd-icon-img,.battle-view .dial-sigil .cmd-icon-img,.battle-view .dial-tap-button .cmd-icon-img{width:22px;height:22px;object-fit:contain;flex:none;filter:drop-shadow(0 1px 3px #140826)}
html.reduce-motion .battle-view .actor.ally.strike,html.reduce-motion .battle-view .actor.hit,html.reduce-motion .battle-view .impact-burst,html.reduce-motion .battle-cutin,html.reduce-motion .battle-view .battle-stage.skill-ally:before,html.reduce-motion .battle-view .battle-stage.perfect-flash:after{animation:none;opacity:0}
.battle-view .combat-dial{width:116px;height:116px;margin:0 auto 2px}
.battle-view .dial-center{inset:31px}.battle-view .dial-needle:before{height:43px}
.battle-view .dial-section{padding:6px 8px}.battle-view .dial-legend{margin:0 0 4px}
.battle-view .battle-log{height:auto;min-height:26px;padding:5px 8px;line-height:1.25}
.battle-view .combat-summary{min-height:24px}
.battle-view .dial-tap-button{position:static;transform:none;width:100%;min-height:48px;height:48px;margin:0}
@media(max-height:760px){.battle-view .screen-body{gap:4px;padding-bottom:0}.battle-view .battle-stage,.battle-view .battle-stage.zone-cave,.battle-view .battle-stage.zone-outskirts{flex:1 1 165px;height:auto;min-height:165px;max-height:none;margin-bottom:36px}.battle-view .combat-dial{width:104px;height:104px}.battle-view .dial-center{inset:27px}.battle-view .dial-needle:before{height:38px}.battle-view .dial-sigil .ui-icon{width:22px;height:22px}.battle-view .dial-tap-button{position:static;transform:none;width:100%;min-height:46px;height:46px}.battle-view .dial-quick button{min-height:44px}}
@media(max-width:360px){.battle-view .actor.enemy{left:23%;width:75%}.battle-view .actor.ally{left:-5%;width:49%}.battle-view .enemy-intent{width:44%}}
@media(prefers-reduced-motion:reduce){.battle-view .actor.ally.strike,.battle-view .actor.hit,.battle-view .impact-burst,.battle-view .battle-number,.battle-cutin,.battle-view .battle-stage.skill-ally:before{animation:none}}
@keyframes spotlight-lunge{0%{transform:translate(0,0) scale(.94)}55%{transform:translate(30px,-29px) scale(1.13)}100%{transform:translate(13px,-11px) scale(1.07)}}
@keyframes spotlight-recoil{0%{transform:translateX(0) scale(1)}24%{transform:translate(19px,-10px) scale(1.1)}50%{transform:translate(-9px,5px) scale(.94)}100%{transform:none}}
@keyframes spotlight-recoil-ally{0%{transform:none}30%{transform:translate(-13px,7px) scale(.93)}100%{transform:none}}
@keyframes spotlight-burst{0%{opacity:0;scale:.35}20%{opacity:1;scale:1.15}100%{opacity:0;scale:1.7}}
@keyframes spotlight-number{0%{opacity:0;scale:.5;translate:0 12px}35%{opacity:1;scale:1.25;translate:0 -5px}100%{opacity:1;scale:1;translate:0 -9px}}
@keyframes spotlight-charge{0%{opacity:0;scale:.5}35%{opacity:1;scale:1}100%{opacity:.8;scale:1.1}}
@keyframes spotlight-cutin{0%{opacity:0;transform:translateX(-45%)}22%{opacity:1;transform:translateX(0)}72%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(16%)}}
