/* Keep every attribute inside its battle card, including wrapped expressions. */
body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-main{
 min-height:0!important;grid-template-rows:minmax(0,1fr)!important;
 grid-template-columns:minmax(0,34fr) minmax(0,66fr)!important;
}
body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-maths{
 grid-column:2!important;grid-row:1!important;min-height:0!important;height:100%!important;grid-template-rows:repeat(4,minmax(0,1fr))!important;
}
body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-picture{grid-column:1!important;grid-row:1!important}
body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-stat{
 grid-template-columns:18px minmax(0,1fr)!important;column-gap:3px!important;padding:2px 3px!important;
}
body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-stat-icon{
 width:18px!important;min-width:0!important;font-size:14px!important;
}
body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-formula{
 --formula-max:17px;font-size:var(--formula-fit,var(--formula-max))!important;
 min-height:0!important;height:100%!important;max-height:100%!important;
 padding:1px 2px!important;line-height:1.08!important;box-sizing:border-box!important;
 display:block!important;align-content:center;white-space:normal!important;
}
body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-pencil{display:none!important}
/* The footer already provides the coin controls; its former header track must not shrink the player panel. */
body.arena-active .arena-shell .arena-identity-hud{
 grid-template-columns:minmax(0,1fr) minmax(150px,.72fr) minmax(0,1fr)!important;
 align-items:stretch!important;
}
body.arena-active .arena-identity-hud .nr42-player-hud{grid-template-columns:minmax(0,1fr)!important;gap:0!important}
body.arena-active .arena-identity-hud>.nr42-player-hud{grid-column:1!important;grid-row:1!important;order:0!important}
body.arena-active .arena-identity-hud>.arena-round-centre{grid-column:2!important;grid-row:1!important;order:0!important}
body.arena-active .arena-identity-hud>.opponent-side-id{grid-column:3!important;grid-row:1!important;order:0!important}
body.arena-active .arena-identity-hud .nr42-player-hud>.battle-id-card{grid-column:1!important;grid-row:1!important}
body.arena-active .arena-identity-hud .nr42-player-hud>.nr42-bank-arena{display:none!important}
body.arena-active .arena-identity-hud .battle-id-card>.player-id-card,
body.arena-active .arena-identity-hud .battle-id-card>.battle-opponent-card{
 box-sizing:border-box!important;padding:4px 7px!important;gap:2px!important;
 margin:0!important;width:100%!important;height:100%!important;
}
body.arena-active .arena-identity-hud .battle-id-card .player-id-main{
 display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;gap:8px!important;
 align-items:center!important;min-height:0!important;max-height:50px!important;flex:0 1 50px!important;
}
body.arena-active .arena-identity-hud .battle-id-card .player-id-avatar{
 width:48px!important;height:48px!important;max-height:48px!important;min-height:0!important;
}
@media(max-width:1100px){
 body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-formula{--formula-max:15px}
}
@media(max-width:700px){
 body.arena-active .arena-shell .arena-identity-hud{grid-template-columns:minmax(0,1fr) 90px minmax(0,1fr)!important}
 body.arena-active .arena-identity-hud .battle-id-card .player-id-main{grid-template-columns:32px minmax(0,1fr)!important;gap:4px!important;max-height:36px!important;flex-basis:36px!important}
 body.arena-active .arena-identity-hud .battle-id-card .player-id-avatar{width:32px!important;height:32px!important;max-height:32px!important}
 body.arena-active .arena-identity-hud .battle-id-card .player-id-copy h3{font-size:11px!important}
 body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-main{grid-template-columns:minmax(0,1fr)!important}
 body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-maths{grid-column:1!important}
 body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-stat{grid-template-columns:14px minmax(0,1fr)!important;padding:1px 2px!important;column-gap:2px!important}
 body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-stat-icon{width:14px!important;font-size:12px!important}
 body.arena-active .versus-team-player .versus-card-grid .arena-card .ac-formula{--formula-max:12px}
}

/* Reserve a footer for the ally badge and the printed card number. */
.arena-card:has(> .nr193-card-ally) {
  box-sizing: border-box;
  padding-bottom: 21px !important;
}
.arena-card > .nr193-card-ally {
  inset: auto auto 2px 6px !important;
  line-height: 12px;
  pointer-events: none;
}
