/* RZ-LABEL house-mbar-sticky-20261124-CT
   Phone-only: Hall swipe links sit on their own line under the top chrome
   (logo, Sign in, Find, Menu). On every house site, scrolling down hides that
   chrome and keeps the swipe row sticky at the top; scrolling up brings the
   chrome back. Desktop and print are unchanged. */
@media (max-width: 768px) {
  /* --- Hall: un-crowd Sign in / Find / Menu by giving the swipe row the full width under them --- */
  nav.hn .hn-wrap,
  .hn-bar .hn-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 4px;
    row-gap: 0;
  }
  nav.hn .hn-home,
  .hn-bar .hn-home {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }
  nav.hn .rz-acct,
  .hn-bar .rz-acct,
  nav.hn .hn-btn,
  .hn-bar .hn-btn {
    order: 2;
    flex: 0 0 auto;
  }
  nav.hn ul.hn-top,
  .hn-bar ul.hn-top {
    order: 10;
    flex: 1 1 100% !important;
    flex-basis: 100% !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
  }

  /* Sticky header shell: stays at the top; chrome can collapse without covering the icon bar */
  .rz-sticky-head {
    position: sticky !important;
    top: 0;
    z-index: 140;
    box-sizing: border-box;
    background-color: var(--cream, var(--panel, var(--rz-obsidian, #0B0B0F)));
  }
  /* Keep Hall's paper and the dark-house headers from going transparent over the page */
  nav.hn .hn-bar.rz-sticky-head,
  .hn-bar.rz-sticky-head {
    background-color: var(--cream, #F6F1E8);
  }
  header.topbar.rz-sticky-head,
  header.gl-top.rz-sticky-head,
  header.dhx-house-header.rz-sticky-head,
  header.rz-top.rz-sticky-head,
  header.top.rz-sticky-head {
    background-color: var(--panel, var(--rz-ink-deep, var(--rz-obsidian, #0B0B0F)));
  }

  .rz-chrome-hide {
    overflow: hidden;
    max-height: 96px;
    opacity: 1;
    transition: max-height 0.22s ease, opacity 0.18s ease, margin 0.22s ease, padding 0.22s ease, border-width 0.22s ease;
  }
  html.rz-chrome-hidden .rz-chrome-hide {
    min-height: 0 !important;
    max-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0;
    margin: 0 !important;
    padding: 0 !important;
    border-width: 0 !important;
    pointer-events: none;
    visibility: hidden;
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    flex-basis: 0 !important;
  }
  html.rz-chrome-hidden .rz-chrome-hide img,
  html.rz-chrome-hidden .rz-chrome-hide svg,
  html.rz-chrome-hidden .rz-chrome-hide picture {
    max-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  html.rz-chrome-hidden .rz-sticky-head {
    /* Only the swipe row remains; keep 44px targets */
    min-height: 44px;
  }
  /* Fallback when an ancestor (often body overflow-x:hidden) breaks position:sticky */
  .rz-sticky-head.rz-fixed-head {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  .rz-sticky-spacer {
    display: block;
    width: 100%;
    pointer-events: none;
    visibility: hidden;
  }


  /* Phone: tighten the reserved space after the last Library/reader "door" card so
     the house-ad that follows is not sitting under a large empty gap. Ads stay. */
  section.doors.wrap {
    padding-bottom: 0.5rem;
  }
  section.doors.wrap + .ha-spot,
  section.doors.wrap + .ha-spot-foot,
  .doors-grid + .ha-spot,
  .doors-grid + .ha-spot-foot,
  .ha-spot-foot {
    margin-top: 0.5rem;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .rz-chrome-hide {
    transition: none !important;
  }
}

@media print {
  .rz-sticky-head { position: static !important; }
  html.rz-chrome-hidden .rz-chrome-hide {
    max-height: none !important;
    opacity: 1 !important;
    pointer-events: auto;
  }
}
