/* The accepted reading rail is unchanged; the extra half-screen belongs to closing. */
html.has-page-close #portfolioStory {
  height: calc(470svh + 50svh) !important;
  min-height: calc(470svh + 50svh) !important;
  background: transparent;
  z-index: 15;
  pointer-events: none;
}
html.has-page-close #portfolioStorySticky {
  clip-path: inset(0 0 0 var(--page-close-edge, 0%));
  -webkit-clip-path: inset(0 0 0 var(--page-close-edge, 0%));
  pointer-events: auto;
}
html.has-page-close #portfolioStory[data-page-close="open"] #portfolioStorySticky {
  pointer-events: none;
}
/* Two native sticky frames share the closing interval. Neither is translated. */
html.has-page-close #directory {
  margin-top: calc(-100svh - 50svh) !important;
  scroll-margin-top: -50svh;
  height: calc(250vh + 50svh);
  /* The shared frame starts at the viewport edge, without the old section gap. */
  padding-top: 0 !important;
  opacity: 1;
  visibility: visible;
}
/* Keep the original fluid shader's initial pinholes under cover until it plays. */
html.has-page-close #directory[data-page-close-content="waiting"] .work-gallery {
  visibility: hidden;
}
@media (max-width: 760px) {
  html.has-page-close #portfolioStory {
    height: calc(490svh + 50svh) !important;
    min-height: calc(490svh + 50svh) !important;
  }
  html.has-page-close #directory { height: calc(240vh + 50svh); }
}
