
/* V63 — only in CSS-rotated portrait fallback: remove nested node-list scrolling.
   The complete expanded node list becomes part of the left rail, so one
   continuous swipe can reach every node (e.g. all 20 Central Red Army nodes). */
html.force-css-landscape .left-rail .route-overview.is-nodes-expanded .route-overview__nodes ol {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
}
html.force-css-landscape .left-rail .route-overview__nodes ol {
  scrollbar-width: none;
}
html.force-css-landscape .left-rail .route-overview__nodes ol::-webkit-scrollbar {
  display: none;
}

/* V62: mobile history card content scroll fix.
   Scope: the mobile history card only; the header and node navigation remain fixed. */
@media (max-width: 760px), (orientation: landscape) and (max-height: 560px) {
  .node-detail.mobile-history-card {
    overflow: hidden !important;
  }

  .node-detail.mobile-history-card .node-detail__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    scroll-behavior: auto;
  }

  /* Allow a vertical card scroll to begin on an image without removing
     the existing horizontal multi-image gesture. */
  .node-detail.mobile-history-card .history-media-gallery {
    touch-action: pan-y;
  }

  /* The full introduction belongs to the card's scroll area on phones.
     Do not clip it behind the former expand/collapse viewport. */
  .node-detail.mobile-history-card .node-detail__copy-wrap,
  .node-detail.mobile-history-card.is-copy-expanded .node-detail__copy-wrap {
    max-height: none !important;
    overflow: visible !important;
  }
  .node-detail.mobile-history-card .node-detail__copy-wrap::after {
    display: none !important;
  }
  .node-detail.mobile-history-card .detail-copy-toggle,
  .node-detail.mobile-history-card .detail-copy-toggle.is-visible {
    display: none !important;
  }

  .node-detail.mobile-history-card .node-detail__actions {
    flex: 0 0 auto;
  }
}