/* Multi-video collections use normal document scrolling on phones and tablets.
   The shared site CSS locks body scroll for the full-screen single-work pages.
   This stylesheet is linked only on collection pages. */
@media (max-width: 800px) {
  html {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: visible;
  }
  .project-page.collection-page {
    height: auto;
    min-height: 100vh; /* fallback for older Safari */
    min-height: 100svh;
    overflow: visible;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    align-content: start;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  }
  .collection-stage {
    align-self: start;
    min-width: 0;
    grid-template-rows: auto auto;
  }
  .collection-stage .video-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  /* Two legible, tappable choices per row on a phone, not three cramped ones. */
  .collection-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }
  .collection-list li,
  .collection-choice,
  .collection-track { min-width: 0; }
  .collection-track strong { overflow-wrap: anywhere; }

  /* Navigation follows the entire list in the document flow. It never
     floats over a second row, including behind Safari's bottom controls. */
  .collection-page .project-nav {
    position: static;
    grid-column: 1;
    grid-row: 4;
    width: 100%;
    height: auto;
    min-height: 76px;
    padding: 0;
    border-top: 1px solid var(--line);
    background: var(--ink);
  }
  .collection-page .project-nav-side > a { min-height: 76px; }
}
@media (min-width: 601px) and (max-width: 800px) {
  .collection-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .collection-list { padding: 14px; column-gap: 10px; }
  .collection-track strong { font-size: 14px; }
}
