/* Forest Frontier v0.9.13 — Ruins balance correction and stable mobile navigation. */

/*
 * iOS can anchor a fixed element to the first layout viewport while a very long
 * document continues below it. During a Ruins expedition the app therefore owns
 * the vertical scroll, while the document viewport remains fixed. This keeps the
 * bottom navigation at the real bottom edge instead of inside the route map.
 */
@supports (height: 100dvh) {
  body.theme-ashen.screen-ruins-active {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body.theme-ashen.screen-ruins-active .app {
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scroll-padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 24px);
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
  }
}

body.theme-ashen .bottom-nav {
  box-sizing: border-box;
  min-height: var(--bottom-nav-height);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

body.theme-ashen.screen-ruins-active .ruins-leave-button {
  margin-bottom: 8px;
}
