/* ZNJ portrait homepage only.
   The shared top header remains visible once at the start of the document,
   but is never sticky over portrait chapters. Inner pages are unchanged. */
@media(max-width:900px){
  body.znj-home .site-head,
  body.znj-home .site-head.is-scrolled,
  body.znj-home.znj-mock .site-head{
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    box-shadow:none!important;
    z-index:90!important;
  }
  body.znj-home{
    padding-bottom:calc(72px + env(safe-area-inset-bottom))!important;
  }
  body.znj-home .znj-home-dock{
    display:grid!important;
    position:fixed!important;
    left:0!important;right:0!important;bottom:0!important;
    width:100%!important;max-width:none!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    align-items:stretch;gap:2px!important;
    padding:7px 5px calc(7px + env(safe-area-inset-bottom))!important;
    background:rgba(15,20,18,.95)!important;
    border-top:1px solid rgba(222,177,105,.46)!important;
    border-radius:18px 18px 0 0!important;
    box-shadow:0 -12px 40px rgba(0,0,0,.37)!important;
    -webkit-backdrop-filter:blur(20px);
    backdrop-filter:blur(20px);
    z-index:150!important;
  }
  body.znj-home .znj-home-dock a{
    min-width:0;min-height:52px!important;
    display:flex!important;flex-direction:column;
    align-items:center;justify-content:center;
    padding:5px 1px!important;gap:4px!important;
    border-radius:11px;
    color:#bbb7ac!important;
    font:700 clamp(8px,2.25vw,10px)/1.15 Manrope,Arial,sans-serif!important;
    text-align:center;text-decoration:none!important;
    transition:background .16s ease,color .16s ease;
    white-space:nowrap;
  }
  body.znj-home .znj-home-dock a span{
    font-size:clamp(19px,5vw,25px)!important;
    line-height:1!important;
  }
  body.znj-home .znj-home-dock a[aria-current="location"]{
    background:rgba(213,174,111,.16)!important;
    color:#f1cf9b!important;
  }
  body.znj-home .znj-home-dock a:focus-visible{
    outline:2px solid #e9c38a!important;
    outline-offset:-2px!important;
  }
  /* The bottom dock, not the top header, is the persistent navigation.
     Give the floating panel buttons breathing room. */
  body.znj-home .znj-mobile-home{
    --znj-m-header:0px;
    --znj-m-dock-space:calc(72px + env(safe-area-inset-bottom));
  }
  body.znj-home .znj-mobile-home > .znj-m-panel{
    scroll-margin-top:0!important;
    padding-bottom:max(80px,calc(var(--znj-m-dock-space) + 12px))!important;
  }
  body.znj-home .znj-mobile-home .znj-m-carousel-footer{
    padding-bottom:4px;
  }
  html:has(body.znj-home) {
    scroll-padding-top:0!important;
  }
  body.znj-home .znj-back-top{
    bottom:calc(87px + env(safe-area-inset-bottom))!important;
  }
}
@media(max-width:360px){
  body.znj-home .znj-home-dock a{
    font-size:8px!important;
    gap:3px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.znj-home .znj-home-dock a{transition:none!important}
}
