/* Chapter 05: the complete Instagram profile scrolls as one native surface. */
.chapter:nth-of-type(5) .feed-panel,
.chapter:nth-of-type(5) .feed-panel.clean {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}
.chapter:nth-of-type(5) .feed-panel > .feed-mode {
  flex: none;
  position: relative;
  z-index: 1;
}
.chapter:nth-of-type(5) .instagram-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-gutter: stable;
}
.chapter:nth-of-type(5) .feed-scroll {
  overflow: visible;
  height: auto;
  min-height: 0;
  max-height: none;
}
.chapter:nth-of-type(5) .feed-filters { overflow-x: auto; overflow-y: hidden; }
@media (max-width: 700px) and (orientation: portrait) {
  .chapter:nth-of-type(5) .feed-panel,
  .chapter:nth-of-type(5) .feed-panel.clean {
    height: clamp(390px, 58dvh, 560px);
    min-height: 0;
  }
}
@media (orientation: landscape) and (max-height: 550px) and (max-width: 1000px) {
  .chapter:nth-of-type(5) .chapter-head,
  .chapter:nth-of-type(5) .chapter-head.tight {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    align-items: end;
    gap: 12px;
    margin-bottom: 12px;
  }
  .chapter:nth-of-type(5) .chapter-head h2 {
    font-size: clamp(31px, 4.8vw, 43px);
    line-height: .94;
    margin-top: 6px;
  }
  .chapter:nth-of-type(5) .chapter-lead { margin: 0; font-size: 12px; }
  .chapter:nth-of-type(5) .feed-panel,
  .chapter:nth-of-type(5) .feed-panel.clean {
    height: clamp(220px, 65dvh, 300px);
    min-height: 0;
  }
  .chapter:nth-of-type(5) .instagram-scroll { overflow-y: auto; }
}
@media (orientation: landscape) and (max-height: 400px) and (max-width: 700px) {
  .chapter:nth-of-type(5) .chapter-head h2 { font-size: 31px; }
  .chapter:nth-of-type(5) .chapter-lead { font-size: 11px; }
}
