/* Shared viewport environment and safe-area ownership contract. */
:root{
  --lm-app-height:100vh;
  --lm-visual-height:100vh;
  --lm-safe-top:env(safe-area-inset-top,0px);
  --lm-safe-right:env(safe-area-inset-right,0px);
  --lm-safe-bottom:env(safe-area-inset-bottom,0px);
  --lm-safe-left:env(safe-area-inset-left,0px);
  --lm-keyboard-inset:0px;
  --lm-topbar:44px;
}
@supports(height:100dvh){:root{--lm-app-height:100dvh}}
html.lm-ios.lm-browser-mode{--lm-safe-top:0px}
html.lm-ios.lm-standalone{--lm-safe-top:env(safe-area-inset-top,0px)}
html.lm-embedded{--lm-safe-top:0px;--lm-safe-right:0px;--lm-safe-bottom:0px;--lm-safe-left:0px}
html.lm-ios.lm-embedded,html.lm-android.lm-embedded{--lm-safe-top:0px;--lm-safe-right:0px;--lm-safe-bottom:0px;--lm-safe-left:0px}
html.lm-keyboard-open{--lm-safe-bottom:0px}
html,body{width:100%;height:var(--lm-app-height);min-height:0}

html.lm-ios .lm-safe-page-header{box-sizing:border-box}
html.lm-ios .lm-safe-page-own-top>.lm-safe-page-header{
  height:calc(var(--lm-safe-header-height,44px) + var(--lm-safe-top))!important;
  min-height:calc(var(--lm-safe-header-height,44px) + var(--lm-safe-top))!important;
  flex-basis:calc(var(--lm-safe-header-height,44px) + var(--lm-safe-top))!important;
  padding-top:var(--lm-safe-top)!important;
  background:var(--t-bar,#fff)!important;
}
html.lm-ios .lm-safe-page-footer{box-sizing:border-box}
html.lm-ios .lm-safe-page-own-bottom>.lm-safe-page-footer{
  height:calc(var(--lm-safe-footer-height,58px) + var(--lm-safe-bottom))!important;
  min-height:calc(var(--lm-safe-footer-height,58px) + var(--lm-safe-bottom))!important;
  flex-basis:calc(var(--lm-safe-footer-height,58px) + var(--lm-safe-bottom))!important;
  padding-bottom:var(--lm-safe-bottom)!important;
  box-sizing:border-box;
}
