/* A real mobile page scrolls in the document so Safari can retract its own UI.
 * Desktop templates and the desktop phone preview retain their existing layout. */
html.aj-document-scroll{position:static;inset:auto;width:100%;height:auto;min-height:100%;max-height:none;overflow-y:auto;overflow-x:clip;overscroll-behavior-y:auto;background:#081017}
html.aj-document-scroll body{height:auto;min-height:100svh;max-height:none;inset:auto;width:100%;overflow:visible;overflow-x:clip;overscroll-behavior-y:auto;background:#081017}
html.aj-document-scroll:not(.aj-chat-open) body{position:static}
html.aj-document-scroll .aj-document-shell{height:auto!important;min-height:100svh;max-height:none!important;overflow:visible!important}
html.aj-document-scroll .aj-mobile-scroll{flex:1 0 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;overflow-x:clip!important;overflow-y:visible!important;overscroll-behavior-y:auto!important}
html.aj-document-scroll .aj-mobile-navigation,html.aj-document-scroll .aj-mobile-nav-handle{position:fixed!important}
/* Do not sweep the wide menu across Safari's bottom-edge color sampling band.
 * Its initial 18px downward transform crossed the edge during the fade-in. */
html.aj-document-scroll.aj-mobile-at-search .aj-mobile-navigation:not(.is-collapsed){transform:none}
html.aj-document-scroll .aj-mobile-party-sheet{position:fixed!important;inset:0;top:var(--aj-visual-top,0px);height:var(--aj-visual-height,100dvh);max-height:var(--aj-visual-height,100dvh)}
/* Keep document scrolling locked while an existing modal owns the screen.
 * Inline locks used by Terms and the native dialog API remain effective. */
html.aj-document-scroll.aj-chat-open,html.aj-document-scroll.aj-faq-open,html.aj-document-scroll.aj-mobile-sheet-open{overflow-y:hidden}
html.aj-document-scroll.aj-faq-open body,html.aj-document-scroll.aj-mobile-sheet-open body{overflow-y:hidden}
