/* FineME v320 — keep the immersive video feed inside the visible viewport. */

/* Desktop/tablet: the global app bar stays in normal flow. The video page then
   owns exactly the remaining viewport and only the inner stream scrolls. */
.fm-v320.fm-video-page{
  height:100vh!important;
  height:100dvh!important;
  min-height:100vh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
}
.fm-v320.fm-video-page .fm-page{
  width:100%!important;
  max-width:none!important;
  height:calc(100vh - 64px)!important;
  height:calc(100dvh - 64px)!important;
  min-height:0!important;
  max-height:calc(100dvh - 64px)!important;
  margin:0!important;
  padding:0 18px 10px!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
.fm-v320.fm-video-page .video-phase5-toolbar.fm-video-toolbar-v277{
  flex:0 0 auto!important;
  position:relative!important;
  top:auto!important;
}
.fm-v320.fm-video-page .shadow-video-layout.fm-video-layout-v277{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:100%!important;
  overflow:hidden!important;
  align-items:stretch!important;
}
.fm-v320.fm-video-page .shadow-video-stream.fm-video-stream-v277{
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  box-sizing:border-box!important;
}
.fm-v320.fm-video-page .fm-video-card-v277,
.fm-v320.fm-video-page .fm-video-card-v278{
  height:100%!important;
  min-height:100%!important;
  max-height:100%!important;
}
.fm-v320.fm-video-page .fm-video-side-guide{
  align-self:start!important;
  max-height:100%!important;
  overflow:auto!important;
}

/* The app bar is 58 px in the current public mobile shell. Reserve the fixed
   bottom navigation too, so captions/actions never continue below the screen. */
@media (max-width:700px){
  .fm-v320.fm-video-page .fm-page{
    height:calc(100vh - 58px)!important;
    height:calc(100dvh - 58px)!important;
    max-height:calc(100dvh - 58px)!important;
    padding:0 0 calc(70px + env(safe-area-inset-bottom))!important;
  }
  .fm-v320.fm-video-page .shadow-video-layout.fm-video-layout-v277{
    min-height:0!important;
    height:auto!important;
  }
  .fm-v320.fm-video-page .shadow-video-stream.fm-video-stream-v277{
    width:100vw!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
  }
}

/* Very short landscape windows: keep controls usable instead of forcing the
   old 520/560 px minimum height and making the whole document scroll. */
@media (max-height:620px) and (min-width:701px){
  .fm-v320.fm-video-page .video-phase5-toolbar.fm-video-toolbar-v277{
    min-height:52px!important;
    padding-top:5px!important;
    padding-bottom:5px!important;
  }
  .fm-v320.fm-video-page .fm-video-title-v277 small{display:none!important}
}
