/* Shared mobile dock positioning; desktop layout is unchanged. */
@media (max-width:800px) {
  :root {
    --fh-visible-height:100dvh;
    --fh-viewport-bottom:0px;
    --fh-dock-height:86px;
    --fh-dock-bottom:calc(18px + max(env(safe-area-inset-bottom, 0px), var(--fh-viewport-bottom)));
  }
  body.toolPageOpen .view.active:is(#visual, #av, #player, #download, #docs, #units, #localvideo, #youtube):not(.mobilePreviewOpen) {
    height:var(--fh-visible-height)!important;
    min-height:0!important;
    box-sizing:border-box!important;
  }
  body.toolPageOpen .view.active:is(#visual, #av, #player, #download, #docs, #units, #localvideo, #youtube).fh-has-dock {
    padding-bottom:calc(var(--fh-dock-height) + var(--fh-dock-bottom) + 24px)!important;
    scroll-padding-bottom:calc(var(--fh-dock-height) + var(--fh-dock-bottom) + 24px);
  }
  body.toolPageOpen .view.active:is(#visual, #av, #player, #download, #docs, #units, #localvideo, #youtube) .studioBottom,
  body.toolPageOpen #player.active .audioToolbar {
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    top:auto!important;
    bottom:var(--fh-dock-bottom)!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    box-sizing:border-box!important;
    z-index:10020!important;
    border-radius:18px!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
  }
  body.toolPageOpen #youtube.active .ytDrawer {
    bottom:calc(var(--fh-dock-bottom) + var(--fh-dock-height) + 8px)!important;
    max-height:calc(var(--fh-visible-height) - var(--fh-dock-height) - 110px)!important;
  }
}
