/* Same whole-image fit for every character; ZIP pixels and transparent margins stay untouched. */
img[data-character-id],.compact-stage .main-cast img[data-character-id],body[data-game-screen="play"] :is(.contact-circle,.avatar,.encounter-face) img[data-character-id],.type-art img[data-character-id],.profile-portrait img[data-character-id]{position:static!important;inset:auto!important;display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center bottom!important;margin:0!important;transform:none!important;translate:none!important;scale:none!important;zoom:1!important;filter:none!important;mask-image:none!important;-webkit-mask-image:none!important}
.compact-stage .main-cast{top:0;width:62%;height:100%;overflow:hidden}
.profile-portrait{overflow:hidden}
[data-character-error-note]{display:block;color:#9a294f;background:#fff7f2;font-size:12px;padding:4px}

/* Face-focused display adjustments. Original ZIP assets remain byte-for-byte unchanged. */
img[data-character-sex="female"]{--portrait-face-y:38%}
img[data-character-sex="male"]{--portrait-face-y:25%}
.gacha :is(.portrait,.roulette-portrait) img[data-character-id]{transform:scale(1.15)!important;transform-origin:50% var(--portrait-face-y)}
.profile-portrait img[data-character-id]{transform:scale(1.10)!important;transform-origin:50% var(--portrait-face-y)}
/* Round timeline/contact portraits show the face instead of the whole torso. */
body[data-game-screen="play"] :is(.avatar,.contact-circle) img[data-character-id]{transform:translate(var(--round-face-x,0%),var(--round-face-y,calc(50% - var(--portrait-face-y)))) scale(3.2)!important;transform-origin:50% var(--portrait-face-y)}
/* Encounter cards need the whole face through the chin, rather than a tiny-avatar close-up. */
body[data-game-screen="play"] .encounter-face img[data-character-id]{object-position:center top!important;transform:scale(2)!important;transform-origin:center top}
.compact-stage .main-cast{overflow:visible}
@media(max-width:800px){
 .compact-stage .main-cast img[data-character-id]{transform:scale(1.15)!important;transform-origin:50% var(--portrait-face-y)}
 .compact-stage .self-visual{translate:10px 0}
 .compact-stage .male-visual{translate:-10px 0}
}
@media(min-width:801px){
 /* Both positions scale about the same point in the stage. */
 .compact-stage .main-cast{transform:scale(1.10);transform-origin:80.645161% 32%}
 .compact-stage .male-visual{transform-origin:19.354839% 32%}
 .compact-stage .self-brief{top:calc(32% + 20px)}
 .compact-stage .male-brief{top:calc(35% + 20px)}
 .compact-stage :is(.self-brief,.male-brief) strong{font-size:23px}
 .compact-stage :is(.self-brief,.male-brief) p{font-size:12px}
 .compact-stage :is(.you-label,.new-invitation){font-size:10px}
 .compact-stage .relationship-badge{font-size:9px}
}

/* V2.7: translate male switch icons only; retain existing 3.2 scale and origin.
   Coordinates are measured at the nose tip on the original 1470 x 1529 PNG. */
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="0"]{--round-face-x:-10.045781557%;--round-face-y:0.147155003%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="1"]{--round-face-x:9.417920209%;--round-face-y:-8.642903859%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="2"]{--round-face-x:9.627207325%;--round-face-y:0.356442119%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="3"]{--round-face-x:8.162197515%;--round-face-y:-5.294310007%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="4"]{--round-face-x:-6.697187704%;--round-face-y:10.611510791%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="6"]{--round-face-x:-12.347939830%;--round-face-y:-23.711576194%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="7"]{--round-face-x:21.975147155%;--round-face-y:6.425768476%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="8"]{--round-face-x:1.883584042%;--round-face-y:-17.223675605%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="9"]{--round-face-x:8.580771746%;--round-face-y:-23.083714846%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="10"]{--round-face-x:15.068672335%;--round-face-y:2.449313277%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="11"]{--round-face-x:4.604316547%;--round-face-y:1.821451929%}
body[data-game-screen="play"] .contact-circle img[data-character-sex="male"][data-character-id="12"]{--round-face-x:16.742969261%;--round-face-y:-23.502289078%}
