.editorial-gallery {
  --gallery-width: min(88%, 1240px);
  --column-gap: clamp(24px, 2.2vw, 32px);
  --row-gap: clamp(16px, 1.6vw, 24px);
  --story-gap: clamp(48px, 4.5vw, 64px);
  --pair-width: 1060px;
}

.editorial-gallery > :is(.section-tight, .beauty-gallery, .portrait-gallery, .swim-stories) {
  width: var(--gallery-width);
  margin: var(--story-gap) auto;
  padding: 0;
}

.editorial-gallery h2.display {
  font-size: clamp(28px, 3.3vw, 48px);
  margin: 0 0 var(--row-gap);
}

.editorial-gallery .section-tight:has(> div[class$="-gallery"]) {
  max-width: var(--pair-width);
}
.editorial-gallery .section-tight > div[class$="-gallery"] {
  gap: var(--row-gap) var(--column-gap);
  margin-top: 0;
}
.editorial-gallery .vintage-spread {
  max-width: 850px;
  justify-self: center;
}

.beauty-gallery, .portrait-gallery {
  display: grid;
  gap: var(--story-gap);
}
.beauty-set, .portrait-set, .editorial-gallery .underwater-sheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--row-gap) var(--column-gap);
  width: min(100%, var(--pair-width));
  margin-inline: auto;
  align-items: center;
}
.beauty-set.trio {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.beauty-set img, .portrait-set img {
  width: 100%;
  height: auto;
  display: block;
}
.portrait-set:has(> :only-child) {
  grid-template-columns: minmax(0, 480px);
  justify-content: center;
}
.editorial-gallery .underwater-sheet .underwater-frame {
  grid-column: auto;
}
.undertow-continuation {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--pair-width);
  margin-inline: auto;
  gap: var(--row-gap);
}
.undertow-continuation img {
  display: block;
  width: 100%;
  height: auto;
}
.undertow-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--row-gap) var(--column-gap);
  align-items: center;
}
.undertow-portrait {
  max-width: 660px;
  justify-self: center;
}
.editorial-gallery .swim-story {
  padding: 40px 0 0;
}
.editorial-gallery .swim-story + .swim-story {
  margin-top: var(--row-gap);
}
.editorial-gallery .swim-spread {
  --row-height: 540px;
  gap: var(--column-gap);
}
.editorial-gallery .swim-spread + .swim-spread {
  margin-top: var(--row-gap);
}
.editorial-gallery .gilded-hero {
  object-position: 50% 34%;
}

@media (max-width: 700px) {
  .undertow-pair { grid-template-columns: minmax(0, 1fr); }
  .editorial-gallery {
    --gallery-width: 90%;
    --column-gap: 14px;
    --row-gap: 16px;
    --story-gap: 40px;
  }
  .beauty-set, .beauty-set.trio, .portrait-set, .editorial-gallery .underwater-sheet {
    grid-template-columns: minmax(0, 1fr);
  }
  .editorial-gallery .swim-spread {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--row-gap) var(--column-gap);
    align-items: center;
  }
  .editorial-gallery .swim-spread img { width: 100%; }
  .swim-spread img:only-child, .swim-spread img:nth-child(3):last-child {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 82%;
  }
}
