/* Final single-scroll guard.
   This file loads after page/module CSS so normal app pages use the browser
   viewport as the only vertical scroll container. Fixed panels, drawers,
   modals, dropdowns, and message/search overlays keep their own scroll rules. */
body.app-body{
  height:auto !important;
  min-height:100%;
  overflow-x:visible !important;
  overflow-x:clip !important;
  overflow-y:visible !important;
}

body.app-body .app-shell,
body.app-body .main.page-shell,
body.app-body .site-shell.page-shell,
body.app-body .main-grid,
body.app-body .main-inner,
body.profile-page .profile-main-inner,
body.profile-page .profile-page,
body.profile-page .profile-body-card,
body.profile-page .profile-body-content,
body.profile-page .profile-detail-shell,
body.profile-page .profile-detail-page,
body.profile-page .detail-page-shell,
body.profile-page .module-page,
body.profile-page .blog-detail-page,
body.profile-page .media-page-shell,
body.profile-page .schedule-watch-page,
body.profile-page .watch-detail-page,
body.profile-page .drills-module-wrap,
body.profile-page .workout-display-page,
body.profile-page .food-journal-page,
body.profile-page .training-log-page,
body.app-body .events-wrap,
body.app-body .events-wrap-detail,
body.app-body .event-detail-shell,
body.app-body .location-detail-page,
body.app-body .facility-detail-page{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
}

/* Phone layouts use the viewport as the outer canvas. Individual modules keep
   their existing 12px-16px content gutters, so cards and media gain width
   without touching the screen edge. */
@media (max-width: 640px){
  body.app-body.profile-page,
  body.app-body .app-shell,
  body.app-body .main.page-shell,
  body.app-body .site-shell.page-shell,
  body.app-body .main-grid,
  body.app-body .main-inner,
  body.app-body .main-inner-default,
  body.profile-page .profile-main-inner,
  body.profile-page .profile-page,
  body.profile-page .profile-body-card,
  body.profile-page .profile-body-content{
    box-sizing:border-box !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  body.app-body.profile-page,
  body.profile-page .main.page-shell,
  body.profile-page .site-shell.page-shell,
  body.profile-page .main-grid,
  body.profile-page .main-inner.profile-main-inner,
  body.profile-page .profile-page,
  body.profile-page .profile-body-card,
  body.profile-page .profile-body-content{
    padding-left:0 !important;
    padding-right:0 !important;
  }

  body.app-body.profile-page.profile-subpage-shell
  .profile-page .profile-body-card .profile-body-content
  .module-card-grid.module-card-grid{
    box-sizing:border-box !important;
    width:calc(100vw - 28px) !important;
    max-width:calc(100vw - 28px) !important;
    min-width:0 !important;
    margin-left:calc(50% - 50vw + 14px) !important;
    margin-right:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
  }
}
