/**
 * Clearance for fixed bottom tab bar (.sh-tabbar.global-nav, 70px img-tabs).
 * Include after compiled _next CSS on pages with global-nav.
 */

/* Shrine chat — lv-inner is the scroll container */
#screen-shrine .lv-inner {
  padding-top: calc(22px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

#screen-shrine .lv-inner.chat .lv-head {
  top: env(safe-area-inset-top, 0px);
}

/* Compiled CSS sets insufficient bottom padding on these screens */
#screen-saju,
#screen-spread {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
}

#screen-result,
#screen-myshrine,
#screen-readings {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Home — shrine-home removes .screen padding; sh-wrap holds bottom content */
body:has(.sh-tabbar.global-nav) .sh-wrap {
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

/* BGM toggle on notched devices */
body:has(.sh-tabbar.global-nav) .bgm-toggle {
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
}
