/* Shared mobile bottom anchor. Cap anomalous iOS safe-area values to the home-indicator region. */
@media screen and (max-width:1024px) {
  html body > nav.bottom-nav.kovra-loans-nav-root:not(.kovra-business-nav),
  html body > nav.bottom-nav.kovra-business-nav {
    position:fixed!important;
    top:auto!important;
    left:10px!important;
    right:10px!important;
    bottom:clamp(10px,env(safe-area-inset-bottom,0px),34px)!important;
    inset-block-start:auto!important;
    width:auto!important;
    margin:0!important;
    translate:none!important;
    transform:none!important;
    -webkit-transform:none!important;
    transition-property:background-color,border-color,color,box-shadow!important;
    will-change:auto!important;
  }
  html body > nav.bottom-nav :is(#moreButton,#moreCurrentButton,#businessMoreButton) > .kovra-notification-unread-badge {
    position:absolute!important;
    top:3px!important;
    right:5px!important;
    left:auto!important;
    display:grid!important;
    place-items:center!important;
    width:auto!important;
    min-width:18px!important;
    max-width:32px!important;
    height:18px!important;
    min-height:18px!important;
    max-height:18px!important;
    margin:0!important;
    padding:0 4px!important;
    border-radius:999px!important;
    font-size:10px!important;
    font-weight:850!important;
    line-height:1!important;
    white-space:nowrap!important;
    transform:none!important;
    pointer-events:none!important;
  }
  /* iOS 26 installed PWA: WebKit can paint fixed/sticky layers against a
     cold-start viewport shortened by the status-bar safe inset (~59 CSS px).
     This is a native compositor issue: offsetting a fixed nav using 100dvh,
     visualViewport, screen.height or z-index cannot reliably solve it.
     Use a DOCUMENT-positioned bar, not a fixed compositor layer. 100vh is
     the stable standalone screen height. Scroll compensation in the small
     companion script keeps this absolute bar visible while the page scrolls.
     Scope strictly to installed iPhones; Android and browser view unchanged. */
  @media (orientation:portrait) {
    html.kovra-ios-installed body:has(> nav.bottom-nav) {
      position:relative!important;
      min-height:100vh!important;
      --kovra-ios-nav-clearance:clamp(12px,calc(env(safe-area-inset-bottom,0px) - 20px),18px);
    }
    html.kovra-ios-installed body.kovra-business-page {
      height:100vh!important;
    }
    html.kovra-ios-installed .business-shell {
      height:100vh!important;
    }
    html.kovra-ios-installed body > nav.bottom-nav.kovra-loans-nav-root:not(.kovra-business-nav),
    html.kovra-ios-installed body > nav.bottom-nav.kovra-business-nav {
      position:absolute!important;
      inset:auto 10px auto 10px!important;
      top:calc(100vh - var(--kovra-ios-nav-height,82px) - var(--kovra-ios-nav-clearance,14px) + var(--kovra-ios-document-scroll,0px))!important;
      inset-block-start:calc(100vh - var(--kovra-ios-nav-height,82px) - var(--kovra-ios-nav-clearance,14px) + var(--kovra-ios-document-scroll,0px))!important;
      bottom:auto!important;
      inset-block-end:auto!important;
      transform:none!important;
      -webkit-transform:none!important;
      translate:none!important;
      will-change:auto!important;
    }
    html.kovra-ios-installed body > nav.bottom-nav.kovra-business-nav {
      --kovra-ios-nav-height:76px;
    }
  }
}
