/* Self-hosted film: show only the studio's own controls and local poster. */
.inline-native-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; pointer-events:none; opacity:0; transition:opacity .25s; }
.media-frame.is-playing .inline-native-video { opacity:1; }
.media-frame:not(.is-playing) .inline-native-video { opacity:0; }
.viewer-video video { display:block; width:100%; height:100%; object-fit:contain; background:#08090b; }

/* Give the video a definite surface inside the fullscreen flex layout. */
#viewer-content:fullscreen,
#viewer-content:-webkit-full-screen {
  width:100%; height:100%; overflow:hidden;
  display:flex; flex-direction:column; justify-content:center;
  background:#08090b; color:white;
}
#viewer-content:fullscreen .viewer-video,
#viewer-content:-webkit-full-screen .viewer-video {
  flex:1 1 0; min-height:0; aspect-ratio:auto; overflow:hidden;
}
#viewer-content:fullscreen .viewer-native-video,
#viewer-content:-webkit-full-screen .viewer-native-video {
  position:absolute; inset:0; width:100%; height:100%; object-fit:contain;
}
#viewer-content:fullscreen .viewer-toolbar,
#viewer-content:-webkit-full-screen .viewer-toolbar { flex-shrink:0; }

/* Browsers without fullscreen still offer an edge-to-edge enlarged view. */
.viewer.is-expanded {
  width:100vw; height:100dvh; max-width:none; max-height:none;
  margin:0; border:0; border-radius:0; overflow:hidden;
  display:flex; flex-direction:column; animation:none; transform:none;
}
.viewer.is-expanded .viewer-top { flex-shrink:0; }
.viewer.is-expanded #viewer-content {
  flex:1; min-height:0; display:flex; flex-direction:column;
  background:#08090b;
}
.viewer.is-expanded .viewer-video { flex:1 1 0; min-height:0; aspect-ratio:auto; overflow:hidden; }
.viewer.is-expanded .viewer-native-video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.viewer.is-expanded .viewer-toolbar { flex-shrink:0; background:var(--paper); }
