/* Size each portrait card from its image, not the total dialogue height. */
html body #modal.story-modal .v239-stage:has(>.story-film-cast){
 display:block!important;min-height:0!important;
}
html body #modal.story-modal .v239-stage>.story-film-cast{
 position:relative!important;inset:auto!important;width:92%!important;
 margin:24px auto 0!important;height:auto!important;min-height:0!important;
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 align-items:start!important;gap:10px!important;overflow:visible!important;
}
html body #modal.story-modal .v239-stage>.story-film-cast.single-performer{
 grid-template-columns:minmax(0,1fr)!important;width:min(64%,280px)!important;
}
html body #modal.story-modal .story-film-cast>.story-film-performer{
 position:relative!important;align-self:start!important;display:block!important;
 height:auto!important;min-height:0!important;aspect-ratio:auto!important;
 margin:0!important;overflow:hidden!important;
}
html body #modal.story-modal .story-film-performer>img{
 position:relative!important;inset:auto!important;display:block!important;
 width:100%!important;height:auto!important;max-height:none!important;
 object-fit:contain!important;object-position:center top!important;transform:none!important;
}
html body #modal.story-modal .story-film-performer>video{
 position:absolute!important;inset:0 auto auto 0!important;display:block!important;
 width:100%!important;height:auto!important;max-height:none!important;
 object-fit:contain!important;object-position:center top!important;transform:none!important;
}
html body #modal.story-modal .story-film-performer>figcaption{
 position:relative!important;inset:auto!important;display:block!important;
 padding:8px 6px!important;margin:0!important;background:#0c0e10!important;z-index:3!important;
}
html body #modal.story-modal .v239-stage:has(>.story-film-cast)>.v239-stage-copy{
 padding-top:20px!important;min-height:0!important;
}

/* Bring JP's full-length source into the same conversational scale as the other portrait.
   Restrict this crop to the split portrait cards; scene clips and profile art retain their framing. */
html body #modal.story-modal .story-film-cast>.story-film-performer:has(>img:is([src*="player-jp-v2440/"],[src*="/male-jp-"]))>:is(img,video){
 transform:translateY(5%) scale(1.75)!important;
 transform-origin:50% 0%!important;
}

/* Use an eyes-open frame extracted from JP's existing footage for the frozen neutral/reflective portrait. */
html body #modal.story-modal .story-film-performer>img:is([src*="player-jp-v2440/portrait.webp"],[src*="/male-jp-reflective.webp"]){
 content:url("jp-eyes-open-v24110.webp");
}

/* A friendly default expression, with the serious reflective portrait kept separately. */
html body #modal.story-modal .story-film-performer>img:is([src*="player-jp-v2440/portrait.webp"],[src*="/male-jp-welcoming.webp"]){
 content:url("jp-relaxed-smile-v24111.png");
}
/* The former neutral idle would replace the new smile with the old frowning face. */
html body #modal.story-modal .story-film-performer:has(>img:is([src*="player-jp-v2440/portrait.webp"],[src*="/male-jp-welcoming.webp"]))>video{
 display:none!important;
}
