/* The three title menus share a viewport with backup and site links.
   Explanatory pages and short landscape phones retain normal scrolling. */
@media (orientation:portrait), (min-height:521px) {
  body.top-screen-fit{
    display:flex;
    flex-direction:column;
    height:var(--appH,100dvh);
    min-height:var(--appH,100dvh);
  }
  body.top-screen-fit > .questMenuControls{
    flex:none;min-height:60px;padding-bottom:0;
  }
  body.top-screen-fit > .frame{
    display:grid;grid-template-columns:minmax(0,1fr);place-items:center;
    flex:1 1 0;min-height:0;max-width:none;width:100%;margin:0;
    padding:8px calc(20px + var(--safeR,0px)) 8px calc(20px + var(--safeL,0px));
  }
  body.top-screen-fit:not(.quest-title-menu) > .frame{
    padding-top:calc(68px + var(--safeT,0px));
  }
  body.top-screen-fit .portalMenuGroup{width:min(100%,1000px);}
  body.top-screen-fit .mapSymbolsTitleGroup{width:min(100%,960px);}
  body.top-screen-fit :is(.portalMenuGroup,.questMenuGroup,.mapSymbolsTitleGroup){min-width:0;}
  body.top-screen-fit > .frame > .home-nav{position:absolute;height:0;left:0;top:0;}
  body.top-screen-fit > [data-record-backup]{margin:0 auto;flex:none;}
  body.top-screen-fit > .footer-link{
    flex:none;margin:0;padding:0 20px calc(16px + var(--safeB,0px));
    gap:0 8px;font-size:12px;line-height:1.3;
  }
  body.top-screen-fit .footer-link a,
  body.top-screen-fit .footer-link button{
    display:inline-flex;align-items:center;justify-content:center;min-height:36px;
  }
  body.top-screen-fit.top-screen-expanded{height:auto;}
  body.top-screen-fit.top-screen-expanded > .frame{
    flex:none;height:var(--top-screen-frame-height);
  }
}
