/* Lavender Lotus Studio 9.3.53 — iPhone Home Screen / standalone hardening.
   Additive only. Keeps the approved Studio visuals intact. */
:root{
  --lls-safe-top: env(safe-area-inset-top, 0px);
  --lls-safe-right: env(safe-area-inset-right, 0px);
  --lls-safe-bottom: env(safe-area-inset-bottom, 0px);
  --lls-safe-left: env(safe-area-inset-left, 0px);
  --lls-visual-height: 100dvh;
  --lls-keyboard-inset: 0px;
}

/* iOS Home Screen can report standalone through either CSS or navigator.standalone. */
@media (display-mode: standalone){
  html,body{min-height:100%;min-height:100dvh}
  body{overscroll-behavior-y:none}
  .v8-mobile-dock{
    bottom:max(8px,var(--lls-safe-bottom)) !important;
    padding-bottom:max(7px,var(--lls-safe-bottom)) !important;
  }
  .studio-update-banner,
  #studioUpdateAvailable{
    bottom:calc(98px + var(--lls-safe-bottom)) !important;
  }
}

html.lls-standalone,html.lls-standalone body{
  min-height:100%;
  min-height:var(--lls-visual-height,100dvh);
}
html.lls-standalone body{
  overscroll-behavior-y:none;
  -webkit-tap-highlight-color:transparent;
}

/* Never let the app dock overlap the tail of a page in standalone mode. */
html.lls-standalone body:not(.vdp-mobile-editor-active){
  padding-bottom:calc(156px + var(--lls-safe-bottom)) !important;
}
html.lls-standalone .content{
  padding-bottom:calc(196px + var(--lls-safe-bottom)) !important;
}

/* Long forms must stay above the iOS Home Screen keyboard and home indicator. */
@media (max-width:760px){
  html.lls-standalone .dialog-layer{
    height:var(--lls-visual-height,100dvh) !important;
    max-height:var(--lls-visual-height,100dvh) !important;
  }
  html.lls-standalone .modal.financial-entry-modal,
  html.lls-standalone .modal.scope-change-modal{
    height:min(88dvh,760px,var(--lls-visual-height,100dvh)) !important;
    max-height:calc(var(--lls-visual-height,100dvh) - 8px) !important;
  }
  html.lls-standalone .financial-entry-modal .modal-footer,
  html.lls-standalone .scope-change-modal .modal-footer,
  html.lls-standalone .modal-footer{
    padding-bottom:calc(14px + max(var(--lls-safe-bottom),var(--lls-keyboard-inset))) !important;
  }
  html.lls-keyboard-open .v8-mobile-dock,
  html.lls-keyboard-open .tax-quick-button{
    display:none !important;
  }
  html.lls-keyboard-open body,
  html.lls-keyboard-open .content{
    padding-bottom:24px !important;
  }
}
