/* Seven lanes on every screen; each half owns two distinct rows. */
.arena{padding-inline:clamp(8px,2vw,32px)}
.enemy-grid,.player-grid{--board-gap:clamp(4px,.9vw,16px);container-type:inline-size;grid-template-columns:repeat(7,minmax(0,1fr));column-gap:var(--board-gap);row-gap:18px;justify-content:normal;justify-items:center}
.board-slot{width:100%;max-width:calc(var(--unit-height)*.76);height:var(--unit-height);min-width:0}
/* Enlarge the portrait frame with the artwork, up to the available grid lane.
   This keeps shoulders/equipment intact without entering the adjacent lane. */
.battle-character .unit-art{--art-width:min(170%,calc((100cqw - 6 * var(--board-gap))/7));inset:10px auto 19px;left:calc((100% - var(--art-width))/2);width:var(--art-width)}
/* Contain preserves the sides of wide artwork instead of cropping arms or weapons. */
.battle-character .unit-art img{width:100%;height:190%;object-fit:contain;object-position:center top}
.battle-character .unit-info{left:0;right:0}
.battle-character .character-name{gap:2px}
.battle-character .character-name strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle-character .character-aura{inset:7px 0 12px}
.battle-character:before{left:2%;right:2%}
.combat-pose{position:absolute;inset:0;pointer-events:none;overflow:visible;transform-origin:50% 65%;z-index:1}
/* Keep character textures reusable during attacks. Cast light is painted by
   the VFX surface; changing a bitmap blur on every strike rerasterized the art. */
.battle-character.casting .unit-art img,.battle-character.attacking .unit-art img{filter:drop-shadow(0 3px 3px #050918aa)}
/* CombatVfx owns the float animation and uses compositor transforms for anchors. */
.damage-number{left:0;top:0;animation:none;text-shadow:0 2px 3px #07091a;will-change:transform,opacity}
@media(max-width:750px){
 .enemy-grid,.player-grid{--board-gap:4px;grid-template-columns:repeat(7,minmax(0,1fr));row-gap:18px}
 .battle-character .character-name{flex-wrap:wrap;row-gap:1px}
 .battle-character .character-name strong{width:100%;font-size:12px;line-height:1.1}
 .battle-character .rank-star .arena-icon{width:8px;height:8px}
 .battle-character .unit-art{bottom:24px}
}
