/* Full campaign labels and 12-character nicknames share a stable hero row.
   Keep accepted avatars large; both sides reserve identical identity/health/control columns. */
#battle .head .nick{
  flex:1;
  min-width:0;
  max-width:none;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
  line-height:1.2;
}
@media(min-width:1000px){
  body.pc #battle>.combat-side,
  body.pc #battle>.combat-side.player{
    --hero-identity-width:clamp(280px,22vw,340px);
    --hero-controls-width:clamp(180px,14vw,246px);
    width:min(1280px,100%);
    grid-template-columns:var(--hero-identity-width) minmax(0,1fr) var(--hero-controls-width);
  }
  body.pc #battle .head{min-height:var(--hero-portrait)}
  body.pc #battle .head .nick{white-space:normal;overflow:visible;text-overflow:clip}
  body.pc #battle .hpbig{height:22px}
}
@media(max-width:999px){
  body:not(.pc) #battle.active{justify-content:safe center}
  body:not(.pc) #battle .pfoot-sp{display:none}
  body:not(.pc) #battle .pfoot{gap:5px}
  body:not(.pc) #battle .pfoot>.bctrl{flex:0 0 170px;width:170px}
  body:not(.pc) #battle .pfoot>.bctrl .bbtn{width:100%;max-width:none;justify-content:center}
  #battle .head{min-height:56px}
  #battle .head .nick{font-size:14px;line-height:1.15}
  /* Three short lines of a wide nickname still fit alongside the 56px avatar. */
  body:not(.pc) #battle .pfoot .head.player{flex:1;min-width:0;gap:6px}
  body:not(.pc) #battle .pfoot .head.player .nick{
    max-width:none;white-space:normal;overflow:visible;text-overflow:clip;
    overflow-wrap:anywhere;
  }
  #battle .hpbig{height:18px}
}
