/* Status belongs to a stable row, outside moving and oversized character art. */
body #event-scene#event-scene#event-scene#event-scene.combat-scene .battle-stage{display:flex;flex-direction:column;min-height:0!important;overflow:visible;height:auto!important;flex:none!important}
#event-scene.combat-scene .battle-hud-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5%;padding:44px 3% 8px;flex:none;position:relative;z-index:10;pointer-events:auto}
#event-scene.combat-scene .battle-player-huds{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:12px;align-items:start;min-width:0}
#event-scene.combat-scene .battle-player-huds .fighter-hud{position:static;width:auto;min-width:0;padding:8px;box-sizing:border-box;border:1px solid #9f947044;background:#142019d9;text-align:center;overflow-wrap:anywhere}
#event-scene.combat-scene .fighter-hud-name{display:block;color:#e4d8b8;font-size:13px;margin-bottom:5px}
body #event-scene#event-scene#event-scene#event-scene.combat-scene .battle-hud-row .enemy-hud{position:static;width:auto;min-width:0;padding:8px;box-sizing:border-box;align-self:start;background:#211b16c9;border:1px solid #9f947044}
#event-scene.combat-scene .battle-arena{position:relative;flex:none;height:clamp(210px,30vh,310px);min-height:210px}
body #event-scene#event-scene#event-scene#event-scene.combat-scene .battle-arena :is(.battle-party,.battle-enemy){height:calc(80% - 28px)!important;max-height:310px;bottom:24px}
body #event-scene#event-scene#event-scene#event-scene.combat-scene{overflow-y:auto!important}
/* Grow the battle when statuses or expanded details need more than one screen. */
body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])):not(.intro-101){height:auto!important;overflow-y:auto!important;min-height:100dvh!important}
body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) main.app-shell{height:auto!important;min-height:calc(100dvh - 16px)!important}
body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #game-panel{flex:none!important}
body.battle-fit-117:has(#event-scene.combat-scene:not([hidden])) #map-stage-page:has(#event-scene.combat-scene:not([hidden])){flex:none!important;height:auto!important;grid-template-rows:28px 54px auto!important}
body #event-scene#event-scene#event-scene#event-scene.combat-scene{height:auto!important;min-height:0!important;flex:none!important}
body #event-scene#event-scene#event-scene#event-scene.combat-scene .event-scene-copy{max-height:none!important;overflow:visible!important}
body #event-scene#event-scene#event-scene#event-scene.combat-scene #combat-panel{max-height:none!important;overflow:visible!important}
/* The summary stays in normal flow so it cannot escape the clipped action area. */
body #event-scene#event-scene#event-scene#event-scene.combat-scene .combat-tools,
body #event-scene#event-scene#event-scene#event-scene.combat-scene .combat-tools[open]{position:static;inset:auto;order:10;flex:1 0 100%;width:100%;max-width:100%;max-height:none;box-sizing:border-box;overflow:visible;padding:8px 0;border:0;border-top:1px solid #9f947044;background:none;box-shadow:none;min-width:0}
body #event-scene#event-scene#event-scene#event-scene.combat-scene .combat-tools>summary{position:sticky;top:0;z-index:2;padding:10px 8px;min-height:38px;box-sizing:border-box;background:#1c291f;cursor:pointer;color:#e4d8b8}
@media(max-width:600px){
 #event-scene.combat-scene .battle-hud-row{gap:8px;padding:42px 8px 8px;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
 #event-scene.combat-scene .battle-player-huds{grid-template-columns:1fr;gap:6px}
 #event-scene.combat-scene .battle-player-huds .fighter-hud{padding:6px}
 #event-scene.combat-scene .enemy-card{flex-wrap:wrap}
 #event-scene.combat-scene .enemy-card h3{flex-basis:100%;font-size:15px!important;letter-spacing:0}
 #event-scene.combat-scene .enemy-card #combat-round{white-space:nowrap}
}

