/* Opt-in to the photograph's own composition; never a site-wide img reset. */
.image-frame--native {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  align-self: center;
}
.image-frame--native > img {
  display: block;
  width: 100%;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  transform: none !important;
}

/* The opening gallery photograph is a complete composition, not a texture. */
.visual > img.image-frame--full {
  object-fit: contain !important;
  transform: none !important;
}
.visual:has(> img.image-frame--full.on) { background: #e9e7e3; }

/* Keep still-photo chapters within the scrubbed stage, without zoom cropping. */
.slide:has(.media > img) .media { top: 3%; bottom: 3%; }
.slide .media > img {
  object-fit: contain !important;
  object-position: 50% 25% !important;
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  /* Still photographs read at native height; video chapters keep their stage. */
  #chapters .slide:has(.media > img) { display: block; height: auto; }
  #chapters .slide:has(.media > img) .media {
    position: relative;
    inset: auto;
    grid-column: auto;
    width: 100%;
    height: auto;
  }
  #chapters .slide:has(.media > img) .media > img { width: 100%; height: auto; }
}

/* Small screens follow the photograph, with gallery controls in their own row. */
@media (max-width: 980px) {
  .visual:has(> img.image-frame--full.on) {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
  }
  .visual > img.image-frame--full.on {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    aspect-ratio: auto !important;
  }
  .visual:has(> img.image-frame--full.on)::after { display: none; }
  .visual:has(> img.image-frame--full.on) .vtools {
    position: relative;
    inset: auto;
    padding: 14px 20px;
    background: #161510;
  }
}
