/* Cover the screen while keeping content clear of iPhone cutouts and Home indicator. */
:root {
  --docere-safe-top: env(safe-area-inset-top, 0px);
  --docere-safe-right: env(safe-area-inset-right, 0px);
  --docere-safe-bottom: env(safe-area-inset-bottom, 0px);
  --docere-safe-left: env(safe-area-inset-left, 0px);
}
html.docere-installed, html.docere-installed body { background: #fff; }
#docere-top-edge { display: none; }
.app-install { max-width: 760px; margin-inline: auto; }
.app-install-heading { display: flex; align-items: center; gap: 20px; }
.app-install-icon { flex: 0 0 80px; border: 1px solid #dce3ea; border-radius: 19px; box-shadow: 0 5px 18px #152e4710; }
.app-install-heading h2 { margin: 0 0 8px; color: #172b43; }
.app-install-heading p { margin: 0 0 8px; }
.app-install-steps { margin: 24px 0; padding-left: 26px; }
.app-install-steps li { padding-left: 7px; margin-bottom: 18px; line-height: 1.5; }
.app-install-steps li::marker { color: #245b87; font-weight: 750; }
.app-install-steps strong, .app-install-steps span { display: block; }
.app-install-steps strong { color: #172b43; }
.app-install-steps span, .app-install-note { color: #526579; font-size: 14px; }
.app-installed-notice { padding: 12px 14px; border: 1px solid #bad6c3; border-radius: 10px; background: #f1f8f3; color: #28533b; }
.app-install-link { margin-top: 18px; font-size: 14px; }
.app-security-install { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 20px; }
.app-security-install p { margin: 0; }
@media (max-width:760px), (orientation:landscape) and (max-height:600px) and (max-width:1100px) {
  html.docere-installed { --docere-app-top: max(12px, var(--docere-safe-top)); }
  :root body {
    box-sizing: border-box;
    min-height: 100dvh;
    padding: var(--docere-app-top, var(--docere-safe-top)) var(--docere-safe-right) var(--docere-safe-bottom) var(--docere-safe-left);
  }
  :root body.login-page {
    padding: max(24px, var(--docere-safe-top)) max(20px, var(--docere-safe-right)) max(24px, var(--docere-safe-bottom)) max(20px, var(--docere-safe-left));
  }
  :root body:has(.calendar-view-week) .workspace-body > main { padding-bottom: 16px; }
  :root .login-page input:not([type="checkbox"]):not([type="radio"]),
  :root #setup-form input, :root .recovery-management input:not([type="checkbox"]) { font-size: 16px; min-height: 44px; }
  .app-install-heading { align-items: flex-start; gap: 14px; }
  .app-install-icon { width: 64px; height: 64px; flex-basis: 64px; border-radius: 15px; }
  .app-install-heading h2 { font-size: 19px; line-height: 1.3; }
  .app-install-heading p { font-size: 13px; }
  .app-install .eyebrow { font-size: 10px; }
  .app-install-steps { margin-top: 20px; }
  .app-install .control { min-height: 44px; }
  .rotation-editor { height: calc(100dvh - var(--docere-app-top, var(--docere-safe-top)) - var(--docere-safe-bottom)); }
  /* Use a real painted box taller than WebKit's edge-sampling margin/border
     thresholds, including when iOS reports a zero top inset. Reserve its space. */
  html.docere-installed #docere-top-edge {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--docere-app-top);
    z-index: 25;
    pointer-events: none;
    background: #fff;
    opacity: 1;
    filter: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: none;
  }
}
@media (display-mode: standalone) { html, body { background: #fff; } }
@media (forced-colors: active) {
  html.docere-installed #docere-top-edge { background: Canvas; }
}
