/* Phase 11: preserve dedicated shell rows against iPad fullscreen viewport changes. */
html:fullscreen, html:fullscreen body { height: 100%; min-height: 0; }
.deck { height: 100dvh; min-height: 0; }
html:fullscreen .deck {
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(70px, auto) minmax(0, 1fr) auto;
}
html:fullscreen #stage, .deck.is-pseudo-fullscreen #stage { min-height: 0; overflow: hidden; }
html:fullscreen .deck-footer, .deck.is-pseudo-fullscreen .deck-footer {
  min-height: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html:fullscreen .masthead, .deck.is-pseudo-fullscreen .masthead {
  padding-top: max(9px, env(safe-area-inset-top, 0px));
}
.deck.is-pseudo-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: minmax(70px, auto) minmax(0, 1fr) auto;
}
/* The PNG has 4.85% transparent space before the first visible letter. */
.intro-logo #introPfhscLogo { transform: translateX(-4.85%); }
@media (max-width: 700px) {
  html:fullscreen .deck, .deck.is-pseudo-fullscreen {
    grid-template-rows: minmax(61px, auto) minmax(0, 1fr) auto;
  }
}
/* Short mobile landscape: one chapter scroll, with the whole Instagram panel in flow. */
@media (orientation: landscape) and (max-height: 550px) and (max-width: 1000px) {
  .chapter:nth-of-type(5) { overflow-y: auto; padding-bottom: 28px; }
  .chapter:nth-of-type(5) .social-layout {
    display: block;
    height: auto;
    min-height: 0;
    width: 100%;
  }
  .chapter:nth-of-type(5) .feed-panel,
  .chapter:nth-of-type(5) .feed-panel.clean {
    display: block;
    width: min(100%, 650px);
    height: auto;
    min-height: 0;
    max-width: 650px;
    margin: 0;
  }
  .chapter:nth-of-type(5) .feed-scroll {
    overflow: visible;
    min-height: 0;
    max-height: none;
    height: auto;
  }
  .chapter:nth-of-type(5) .social-side { margin-top: 22px; min-height: 0; }
}
