/* Health belongs below each portrait; three visible combatants in co-op. */
#battleDialog .rpg-arena{height:290px;min-height:240px;overflow:hidden}
#battleDialog .rpg-arena .fighter{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;width:44%;height:82%;top:auto;bottom:10px;transform-origin:50% 65%}
#battleDialog .rpg-arena .fighter[hidden]{display:none!important}
#battleDialog .rpg-player{left:3%;right:auto}
#battleDialog .rpg-opponent{right:3%;left:auto}
#battleDialog .rpg-arena .battle-facing{display:block;width:100%;height:calc(100% - 78px);min-height:85px;flex:none}
#battleDialog .rpg-arena .fighter img,#battleDialog .rpg-arena .fighter canvas.pet-rig{width:100%;height:100%;object-fit:contain}
#battleDialog .rpg-arena .battle-hud{position:static;max-width:none;width:100%;box-sizing:border-box;min-height:74px;padding:6px 8px;border-radius:10px;z-index:3;background:#111c2de8;flex:none}
#battleDialog .rpg-arena .battle-name{font-size:12px;line-height:1.2;white-space:normal;overflow-wrap:anywhere;display:block}
#battleDialog .rpg-arena .battle-role{font-size:9px;line-height:1.2;display:block;color:#c6b4df}
#battleDialog .rpg-arena .battle-health{margin-top:4px;gap:3px}
#battleDialog .rpg-arena .battle-health b{font-size:9px}
#battleDialog .rpg-arena .battle-hud>span:last-child{font-size:10px}
#battleDialog .rpg-arena.is-coop52 .fighter{width:30%;height:76%;bottom:10px}
#battleDialog .rpg-arena.is-coop52 .rpg-player{left:2%}
#battleDialog .rpg-arena.is-coop52 .rpg-ally{left:34%}
#battleDialog .rpg-arena.is-coop52 .rpg-opponent{left:auto;right:2%}
#battleDialog .rpg-arena.is-coop52 .battle-hud{padding:5px;min-height:84px}
#battleDialog .battle-caption{max-width:94%;top:5px;font-size:11px}
.battle-damage52{position:absolute;left:50%;top:34%;transform:translateX(-50%);z-index:10;font:900 26px system-ui;color:#ffd2d2;text-shadow:0 2px 3px #070710,2px 0 #070710,-2px 0 #070710;pointer-events:none;animation:damage52 1.05s ease-out both}
.battle-damage52[data-heal=true]{color:#b8ffce}
@keyframes damage52{0%{opacity:0;translate:0 8px}15%{opacity:1}75%{opacity:1}100%{opacity:0;translate:0 -28px}}
@media(max-width:360px){#battleDialog .rpg-arena .battle-name{font-size:10px}#battleDialog .rpg-arena{height:265px}}
@media(prefers-reduced-motion:reduce){.battle-damage52{animation:none}}

#battleDialog .rpg-arena .battle-motion52{width:100%;height:calc(100% - 84px);min-height:85px;flex:none;transform-origin:50% 90%;will-change:transform}
#battleDialog .rpg-arena .battle-motion52 .battle-facing{width:100%;height:100%;min-height:0}
#battleDialog .rpg-arena .fighter::before{bottom:84px}

#battleDialog .rpg-arena .battle-motion52{height:calc(100% - 94px);margin-bottom:10px}

/* Explicit combat preference works on Android even when the system reduces motion. */
.battle-motion-setting54{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0;font-size:12px}.battle-motion-setting54 select{width:auto;max-width:55%;min-height:40px;padding:6px}
#battleDialog [data-combat-motion=gentle] .battle-intro43{animation:none}
#battleDialog [data-combat-motion=gentle] .spell-fx{animation:none;opacity:.9;font-size:40px}
#battleDialog [data-combat-motion=gentle] .battle-confetti{animation:none}
#battleDialog [data-combat-motion=full] .battle-damage52{animation:damage52 1.05s ease-out both}

#battleDialog [data-combat-motion=full] .projectile,#battleDialog [data-combat-motion=full] .curse{animation:spell-travel .75s ease-out forwards!important}
#battleDialog [data-combat-motion=full] .projectile.reverse,#battleDialog [data-combat-motion=full] .curse.reverse{animation-name:spell-return!important}
#battleDialog [data-combat-motion=full] .shield,#battleDialog [data-combat-motion=full] .heal{animation:spell-pulse .8s ease-out forwards!important}
#battleDialog [data-combat-motion=full] .battle-confetti{animation:win-sparkle 1.7s ease-out both!important}
#battleDialog [data-combat-motion=full] .battle-damage52{animation:damage52 1.05s ease-out both!important}
#battleDialog [data-combat-motion=full] .battle-intro43{animation:battle-intro-fade43 1.15s ease-in-out both!important}
#battleDialog [data-combat-motion=full] .battle-intro43::before,#battleDialog [data-combat-motion=full] .battle-intro43::after{animation:battle-intro-mist43 1.1s ease-out both!important}
#battleDialog [data-combat-motion=full].battle-intro-active .rpg-player{animation:battle-arrival-player43 1s ease-out both!important}
#battleDialog [data-combat-motion=full].battle-intro-active .rpg-opponent{animation:battle-arrival-enemy43 1s ease-out both!important}
