
/* An expanded project fits and anchors playback in its own scrolling surface. */
:is(body.project-page .video-focused,.project-focused-card.video-focused) :is(.project-image,.current-visual){height:min(66dvh,620px);max-height:66dvh;aspect-ratio:auto;background:#000;overflow:hidden}
:is(body.project-page .video-focused,.project-focused-card.video-focused) :is(.project-image,.current-visual) :is(video,iframe){display:block;width:100%;height:100%;max-height:none;object-fit:contain}

/* Native looping films fit their aspect ratio; YouTube retains room for its controls. */
@media(max-width:760px){
 :root .video-focused.video-self-hosted :is(.project-image.film-preview,.current-visual.film-preview){
  aspect-ratio:var(--video-ratio,16/9)!important;height:auto;min-height:0;max-height:none;
 }
}

/* Desktop YouTube grows beyond its preview; native footage and phone geometry stay unchanged. */
@media(min-width:761px){
 :root .research-masonry>.video-focused:not(.video-self-hosted){
  --video-native-width:960px!important;--video-native-height:540px!important;
  max-width:min(960px,calc(60dvh * 16 / 9));
 }
}
