/* Shared viewport environment and safe-area ownership contract. */
:root{
  --lm-app-height:100vh;
  --lm-visual-height:100vh;
  --lm-device-top-gap:0px;
  --lm-device-bottom-gap:0px;
  --lm-system-safe-top:env(safe-area-inset-top,0px);
  --lm-system-safe-bottom:env(safe-area-inset-bottom,0px);
  --lm-safe-top:var(--lm-system-safe-top);
  --lm-safe-right:env(safe-area-inset-right,0px);
  --lm-safe-bottom:var(--lm-system-safe-bottom);
  --lm-bar-safe-top:calc(var(--lm-system-safe-top) + var(--lm-device-top-gap));
  --lm-bar-safe-bottom:calc(var(--lm-system-safe-bottom) + var(--lm-device-bottom-gap));
  --lm-bar-extra-bottom:var(--lm-device-bottom-gap);
  --lm-frame-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-system-safe-top:0px}
#app,.lm-safe-page-own-top{--lm-safe-top:var(--lm-bar-safe-top)}
html.lm-embedded{--lm-system-safe-top:0px;--lm-system-safe-bottom:0px;--lm-safe-top:0px;--lm-safe-right:0px;--lm-safe-bottom:0px;--lm-frame-safe-bottom:0px;--lm-safe-left:0px;--lm-bar-safe-top:0px;--lm-bar-safe-bottom:0px;--lm-bar-extra-bottom: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-embedded.lm-chat-footer-owner{--lm-bar-safe-top:var(--lm-primary-bar-safe-top,0px);--lm-bar-safe-bottom:var(--lm-primary-bar-safe-bottom,0px);--lm-bar-extra-bottom:var(--lm-device-bottom-gap);--lm-safe-bottom:var(--lm-bar-safe-bottom)}
html.lm-keyboard-open,html.lm-embedded.lm-keyboard-open,html.lm-android-overlay-keyboard,html.lm-embedded.lm-android-overlay-keyboard{--lm-safe-bottom:0px;--lm-frame-safe-bottom:0px;--lm-bar-safe-bottom:0px;--lm-bar-extra-bottom:0px}
html.lm-android-keyboard-active,html.lm-embedded.lm-android-keyboard-active{--lm-safe-bottom:0px;--lm-frame-safe-bottom:0px;--lm-bar-safe-bottom:0px;--lm-bar-extra-bottom:0px}
html:not(.lm-ios):not(.lm-embedded) body.chat-chrome-lock #app-body{padding-top:0}
html,body{width:100%;height:var(--lm-app-height);min-height:0}
textarea:not([readonly]){scrollbar-width:none;-ms-overflow-style:none}
textarea:not([readonly])::-webkit-scrollbar{display:none;width:0;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;
}
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-bar-safe-bottom))!important;
  min-height:calc(var(--lm-safe-footer-height,58px) + var(--lm-bar-safe-bottom))!important;
  flex-basis:calc(var(--lm-safe-footer-height,58px) + var(--lm-bar-safe-bottom))!important;
  padding-bottom:var(--lm-bar-safe-bottom)!important;
  box-sizing:border-box;
}

html.lm-device-calibrated-top:not(.lm-ios):not(.lm-embedded) .settings-connections{--lm-safe-header-height:var(--connections-header-height,56px)}
html.lm-device-calibrated-top:not(.lm-ios):not(.lm-embedded) .settings-persona{--lm-safe-header-height:var(--persona-head-height,56px)}
html.lm-device-calibrated-top:not(.lm-ios):not(.lm-embedded) .lm-safe-page-own-top>.lm-safe-page-header{
  height:calc(var(--lm-safe-header-height,50px) + var(--lm-safe-top))!important;
  min-height:calc(var(--lm-safe-header-height,50px) + var(--lm-safe-top))!important;
  flex-basis:calc(var(--lm-safe-header-height,50px) + var(--lm-safe-top))!important;
  padding-top:var(--lm-safe-top)!important;
  box-sizing:border-box;
}
html.lm-device-calibrated-bottom:not(.lm-ios):not(.lm-embedded) .lm-safe-page-own-bottom>.lm-safe-page-footer{
  height:calc(var(--lm-safe-footer-height,58px) + var(--lm-bar-safe-bottom))!important;
  min-height:calc(var(--lm-safe-footer-height,58px) + var(--lm-bar-safe-bottom))!important;
  flex-basis:calc(var(--lm-safe-footer-height,58px) + var(--lm-bar-safe-bottom))!important;
  padding-bottom:var(--lm-bar-safe-bottom)!important;
  box-sizing:border-box;
}
