/* Decoded head-and-shoulder art shares a square canvas. Keep the full atlas
   cell: zooming it would clip hair, ears, horns, and the authored bust edge. */
@media (min-width:601px) {
  .battle-profiles .battle-profile {
    height:auto;
    aspect-ratio:auto;
  }

  .battle-profiles .battle-profile .profile-face {
    position:relative;
    inset:auto;
    display:block;
    width:100%;
    height:auto;
    aspect-ratio:1;
    transform:none;
    clip-path:none;
  }

  /* setPortrait supplies these only after the relevant image has decoded.
     The existing full-body background remains the missing-art fallback. */
  .battle-profiles .battle-profile .profile-face.has-profile-art {
    background-image:var(--portrait-texture);
    background-position:var(--portrait-position,center);
    background-size:var(--portrait-size,contain);
    background-repeat:no-repeat;
    clip-path:none;
  }

  .battle-profiles .profile-enemy .profile-face {
    background-image:url('/assets/corruption-vector.webp');
    background-position:center;
    background-size:contain;
  }

  .battle-profiles .profile-enemy .profile-face.has-profile-art {
    background-image:url('/assets/battle-profile-corruption.webp');
    background-position:center;
    background-size:contain;
  }

  /* Labels participate in layout below the portrait instead of covering it. */
  .battle-profiles .battle-profile .profile-caption {
    position:relative;
    inset:auto;
    margin:4px 3% 0;
    padding:8px 9px;
    gap:5px;
    transform:none;
  }

  .battle-profiles .battle-profile .profile-caption>strong {
    font-size:clamp(15px,1.5vw,21px);
    line-height:1.15;
    letter-spacing:0;
    overflow-wrap:anywhere;
  }

  .battle-profiles .battle-profile .profile-badge {
    font-size:clamp(10px,1vw,12px);
    padding:3px 5px;
    gap:4px;
  }

  .battle-profiles .battle-profile .profile-badge .team-brand-icon {
    width:16px;
    height:16px;
  }

  /* Each cut-in cell is a size container, so its square portrait fits both
     the narrow desktop columns and the shorter tablet rows without stretching. */
  .combo-lineup .combo-card { container-type:size; }

  .combo-lineup .combo-card.has-profile-art .combo-portrait {
    inset:auto;
    top:4px;
    left:50%;
    width:min(calc(100cqw - 8px),calc(100cqh - 36px));
    height:auto;
    aspect-ratio:1;
    background-image:var(--portrait-texture);
    background-position:var(--portrait-position,center);
    background-size:var(--portrait-size,contain);
    background-repeat:no-repeat;
    transform:translateX(-50%);
    clip-path:none;
    filter:none;
    visibility:visible;
  }
}

@media (min-width:601px) and (max-width:760px) {
  .battle-profiles .battle-profile .profile-caption {
    margin:2px 0 0;
    padding:4px 3px;
    gap:3px;
  }

  .battle-profiles .battle-profile .profile-caption>strong { font-size:12px; }
  .battle-profiles .battle-profile .profile-badge { font-size:10px; padding:0; }
  .battle-profiles .battle-profile .profile-badge .team-brand-icon { width:14px; height:14px; }
}

/* Phone profile popups remain removed by battle-responsive.css. */
