/* Korovka v138: native scrolling belongs to .workspace only.
   The bottom navigation is an ordinary flex sibling of the React app,
   never tied to CSS fixed, JS scroll coordinates, or a compositor layer. */
@media (max-width:760px) {
  html.k138-shell {
    height:100% !important;
    overflow:hidden !important;
    overscroll-behavior-y:none !important;
  }
  html.k138-shell body {
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
    height:100dvh !important;
    max-height:100dvh !important;
    min-height:0 !important;
    margin:0 !important;
    overflow:hidden !important;
    overscroll-behavior-y:none !important;
  }
  html.k138-shell body > #root {
    flex:1 1 auto !important;
    min-height:0 !important;
    min-width:0 !important;
    width:100% !important;
    overflow:hidden !important;
  }
  html.k138-shell #root > .app {
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  html.k138-shell #root .app > main.workspace,
  html.k138-shell #root .app > .workspace {
    flex:1 1 auto !important;
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    max-height:100% !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior-y:contain !important;
    -webkit-overflow-scrolling:touch;
    padding-bottom:16px !important;
  }
  html.k138-shell #root .mobile-bottom-nav:not(.k138-nav-bar) {
    display:none !important;
    pointer-events:none !important;
  }
  html.k138-shell body > .mobile-bottom-nav.k138-nav-bar {
    display:grid !important;
    position:static !important;
    inset:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    flex:0 0 auto !important;
    order:9999 !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    margin:0 !important;
    box-sizing:border-box !important;
    transform:none !important;
    translate:none !important;
    filter:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    animation:none !important;
    transition:none !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:3px !important;
    align-items:stretch !important;
    padding:3px 8px max(6px,env(safe-area-inset-bottom,0px)) !important;
    background:rgba(255,255,255,.98) !important;
    border-top:1px solid #e1eafa !important;
    box-shadow:0 -5px 24px #10294a15 !important;
    z-index:45 !important;
  }
}
@media (min-width:761px) {
  html body > .mobile-bottom-nav.k138-nav-bar { display:none !important; }
}
