/* GZ-009: source-specific calibration. Values describe the close-up roster
   framing (height/top in % of crop, x in % of source width). Each card type
   derives its own shot size; PNG aspect ratios and alpha remain untouched.
   Liang/Xie use the approved redraws, not the retired full-body portraits. */
[data-character="liang"] { --crop-height:235; --crop-top:-2; --crop-x:-53.4%; }
[data-character="xie"]   { --crop-height:220; --crop-top:0; --crop-x:-50%; }
[data-character="qi"]    { --crop-height:145; --crop-top:-.5; --crop-x:-56.6%; }
[data-character="zhi"]   { --crop-height:120; --crop-top:-3.2; --crop-x:-57.7%; }
[data-character="yan"]   { --crop-height:150; --crop-top:1.2; --crop-x:-49.9%; }
[data-character="qin"]   { --crop-height:153; --crop-top:1.5; --crop-x:-45.5%; }
[data-character="chi"]   { --crop-height:190; --crop-top:-.5; --crop-x:-49%; }
[data-character="jing"]  { --crop-height:148; --crop-top:-1.1; --crop-x:-59.3%; }
[data-character="zheng"] { --crop-height:175; --crop-top:4.8; --crop-x:-54.1%; }
#roster.sel-roster button[data-character] .roster-crop > img {
  height:calc(var(--crop-height) * 1%); top:calc(var(--crop-top) * 1%);
  width:auto; max-width:none; right:auto; bottom:auto; left:50%;
  transform:translateX(var(--crop-x)); object-fit:contain;
}
/* Upgrade/recruit cards use a wider shoulder/chest shot, eyes around 23%.
   Scope to individual portraits: bond relationship artwork retains contain. */
.upg-card .upg-art-stage[data-character]:not(.bond-card-art) > .upg-art {
  height:calc(var(--crop-height) * .6%);
  top:calc(5% + var(--crop-top) * .6%);
  width:auto; max-width:none; left:50%; right:auto; bottom:auto;
  transform:translateX(var(--crop-x)); object-fit:contain;
  mask-image:linear-gradient(#000 70%,transparent 100%);
}
/* A bounded crop keeps transparent shoulders/hands out of HP text and input.
   The close-up remains the same inside independent and paired HUD cards. */
.party-slot > .party-portrait {
  position:absolute; display:block; left:0; top:0; bottom:0; width:80px;
  overflow:hidden; pointer-events:none; float:none; margin:0;
}
.party-slot[data-character] > .party-portrait > img {
  height:calc(var(--crop-height) * 1%); top:calc(var(--crop-top) * 1%);
  width:auto; max-width:none; left:50%; right:auto; bottom:auto;
  transform:translateX(var(--crop-x)); object-fit:contain;
}
@media(max-height:500px) { .party-slot > .party-portrait { width:38px; } }


/* Portrait fallback uses four narrow text slots; keep decoration out of labels. */
@media(max-width:600px) and (min-height:501px) { .party-slot > .party-portrait { display:none; } }
