/* Gallery — asymmetric floating collage, full width */

body.is-gallery-lightbox-open {
  overflow: hidden;
}

.gallery {
  --gallery-bg: #f3efe6;
  --gallery-paper: #faf8f3;
  --gallery-text: #2b2e1d;
  --gallery-muted: #6f6a62;
  --gallery-gold: #c9a96e;
  --gallery-rule: rgba(43, 46, 29, 0.12);
  --gallery-font: var(--font-primary, "Open Sans", Arial, sans-serif);
  --gallery-edge: clamp(1rem, 2.5vw, 2rem);

  position: relative;
  width: 100%;
  background: var(--gallery-bg);
  color: var(--gallery-text);
  overflow: hidden;
}

.gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 45% at 82% 8%, rgba(201, 169, 110, 0.1), transparent 62%),
    radial-gradient(ellipse 70% 40% at 12% 55%, rgba(201, 169, 110, 0.06), transparent 58%),
    linear-gradient(180deg, var(--gallery-paper) 0%, var(--gallery-bg) 28%, var(--gallery-bg) 100%);
  pointer-events: none;
}

.gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(43, 46, 29, 0.04), transparent 55%);
  pointer-events: none;
}

/* Masthead — asymmetric, full width */
.gallery__masthead {
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 7vh, 4.5rem) var(--gallery-edge) clamp(1.5rem, 3vh, 2rem);
  direction: rtl;
}

.gallery__masthead-top {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.35rem);
  max-width: 52rem;
  margin-inline: 0 0;
  margin-right: clamp(8%, 18vw, 22%);
  direction: ltr;
}

.gallery__issue {
  flex-shrink: 0;
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  letter-spacing: 0.28em;
  color: var(--gallery-muted);
}

.gallery__masthead-line {
  flex: 1;
  height: 1px;
  background: var(--gallery-rule);
}

.gallery__kicker {
  flex-shrink: 0;
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  letter-spacing: 0.24em;
  color: var(--gallery-gold);
}

.gallery__masthead-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: end;
  margin-top: clamp(1rem, 2.5vh, 1.65rem);
  padding-right: clamp(4%, 10vw, 14%);
}

.gallery__title {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.gallery__lede {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(0.95rem, 1.25vw, 1.1rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--gallery-muted);
}

/* Collage canvas — 3D stage */
.gallery__canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: clamp(110rem, 185vh, 130rem);
  padding: 0 var(--gallery-edge) clamp(5rem, 10vh, 7rem);
  perspective: clamp(720px, 95vw, 1500px);
  perspective-origin: 50% 35%;
  transform-style: preserve-3d;
}

.gallery__canvas::before {
  content: "";
  position: absolute;
  inset: 8% 5% 12%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(201, 169, 110, 0.08) 0%,
    transparent 68%
  );
  transform: translateZ(-120px);
  pointer-events: none;
}

.gallery__card {
  position: absolute;
  margin: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.gallery__card-float {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transform-style: preserve-3d;
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: transform;
}

.gallery__card.is-hover {
  z-index: 30 !important;
}

.gallery__card.is-hover .gallery__media {
  box-shadow:
    0 8px 16px rgba(43, 46, 29, 0.08),
    0 32px 64px rgba(43, 46, 29, 0.16),
    0 64px 120px rgba(43, 46, 29, 0.12),
    0 0 0 1px rgba(201, 169, 110, 0.22);
}

/* Asymmetric desktop positions */
.gallery__card--1 {
  top: 0;
  right: clamp(2%, 5vw, 6%);
  width: clamp(18rem, 46vw, 52rem);
  z-index: 4;
}

.gallery__card--1 .gallery__card-float {
  transform: rotateX(-4deg) rotateY(8deg) rotateZ(-1.2deg);
}

.gallery__card--1 .gallery__media {
  aspect-ratio: 16 / 10;
}

.gallery__card--2 {
  top: clamp(8rem, 14vh, 11rem);
  left: clamp(0%, 2vw, 4%);
  width: clamp(14rem, 32vw, 36rem);
  z-index: 2;
}

.gallery__card--2 .gallery__card-float {
  transform: rotateX(5deg) rotateY(-10deg) rotateZ(2.8deg);
}

.gallery__card--2 .gallery__media {
  aspect-ratio: 4 / 5;
}

.gallery__card--3 {
  top: clamp(16rem, 28vh, 22rem);
  right: clamp(10%, 18vw, 24%);
  width: clamp(12rem, 26vw, 30rem);
  z-index: 6;
}

.gallery__card--3 .gallery__card-float {
  transform: rotateX(-6deg) rotateY(12deg) rotateZ(-3.5deg);
}

.gallery__card--3 .gallery__media {
  aspect-ratio: 1 / 1;
}

.gallery__card--4 {
  top: clamp(28rem, 46vh, 36rem);
  left: clamp(6%, 12vw, 16%);
  width: clamp(15rem, 36vw, 40rem);
  z-index: 3;
}

.gallery__card--4 .gallery__card-float {
  transform: rotateX(3deg) rotateY(-6deg) rotateZ(1.6deg);
}

.gallery__card--4 .gallery__media {
  aspect-ratio: 3 / 4;
}

.gallery__card--5 {
  top: clamp(38rem, 62vh, 48rem);
  right: clamp(1%, 4vw, 8%);
  width: clamp(13rem, 30vw, 34rem);
  z-index: 5;
}

.gallery__card--5 .gallery__card-float {
  transform: rotateX(-4deg) rotateY(9deg) rotateZ(-2.4deg);
}

.gallery__card--5 .gallery__media {
  aspect-ratio: 5 / 4;
}

.gallery__card--6 {
  top: clamp(50rem, 78vh, 60rem);
  left: clamp(14%, 22vw, 28%);
  width: clamp(14rem, 34vw, 38rem);
  z-index: 4;
}

.gallery__card--6 .gallery__card-float {
  transform: rotateX(5deg) rotateY(-8deg) rotateZ(3deg);
}

.gallery__card--6 .gallery__media {
  aspect-ratio: 16 / 11;
}

.gallery__media {
  position: relative;
  overflow: hidden;
  background: #e8e3d8;
  transform: translateZ(2px);
  transform-style: preserve-3d;
  box-shadow:
    0 2px 0 rgba(43, 46, 29, 0.05),
    0 18px 36px rgba(43, 46, 29, 0.1),
    0 42px 80px rgba(43, 46, 29, 0.08);
  transition: box-shadow 0.45s ease;
}

.gallery__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.06) 28%,
    transparent 52%
  );
  pointer-events: none;
}

.gallery__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(1px);
  will-change: transform;
}

.gallery__caption {
  transform: translateZ(12px);
}

.gallery__open {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.gallery__open:focus-visible {
  outline: 2px solid var(--gallery-gold);
  outline-offset: -4px;
}

.gallery__caption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.75rem;
  align-items: start;
  padding-inline: 0.2rem;
  direction: rtl;
}

.gallery__fig-num {
  grid-row: 1 / span 2;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 300;
  line-height: 1;
  color: var(--gallery-gold);
}

.gallery__caption-title {
  margin: 0;
  font-size: clamp(0.88rem, 1.05vw, 1rem);
  font-weight: 500;
}

.gallery__caption-text {
  margin: 0;
  grid-column: 2;
  font-size: clamp(0.78rem, 0.95vw, 0.88rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--gallery-muted);
}

/* Lightbox */
.gallery__lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(243, 239, 230, 0.96);
  backdrop-filter: blur(10px);
}

.gallery__lightbox[hidden] {
  display: none;
}

.gallery__lightbox-dialog {
  position: relative;
  width: min(96vw, 1100px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gallery__lightbox-close {
  position: absolute;
  top: -0.25rem;
  left: 0;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--gallery-rule);
  border-radius: 999px;
  background: var(--gallery-paper);
  color: var(--gallery-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.gallery__lightbox-img {
  display: block;
  width: 100%;
  max-height: calc(92vh - 4rem);
  object-fit: contain;
  box-shadow: 0 24px 64px rgba(43, 46, 29, 0.14);
}

.gallery__lightbox-caption {
  margin: 0;
  text-align: center;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: var(--gallery-muted);
}

/* Tablet */
@media (max-width: 1100px) {
  .gallery__masthead-body {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .gallery__masthead-top {
    margin-right: 0;
  }

  .gallery__canvas {
    min-height: clamp(95rem, 210vh, 115rem);
  }

  .gallery__card--1 { width: clamp(16rem, 52vw, 40rem); }
  .gallery__card--2 { width: clamp(12rem, 38vw, 28rem); }
  .gallery__card--3 { width: clamp(11rem, 34vw, 24rem); right: 8%; }
  .gallery__card--4 { width: clamp(13rem, 42vw, 32rem); }
  .gallery__card--5 { width: clamp(12rem, 36vw, 28rem); }
  .gallery__card--6 { width: clamp(13rem, 40vw, 30rem); left: 10%; }
}

/* Mobile — stacked overlap collage */
@media (max-width: 768px) {
  .gallery__masthead {
    padding-top: clamp(2.5rem, 6vh, 3.5rem);
  }

  .gallery__title {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .gallery__canvas {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: clamp(3rem, 8vh, 4.5rem);
  }

  .gallery__card {
    position: relative;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: min(92vw, 22rem) !important;
    margin-top: clamp(-2.5rem, -8vw, -1.25rem);
    align-self: flex-start;
  }

  .gallery__card:first-child {
    margin-top: 0;
  }

  .gallery__card--1 { align-self: flex-end; margin-right: 2%; z-index: 3; }
  .gallery__card--2 { align-self: flex-start; margin-left: 4%; z-index: 2; }
  .gallery__card--3 { align-self: flex-end; margin-right: 8%; z-index: 5; }
  .gallery__card--4 { align-self: flex-start; margin-left: 10%; z-index: 1; }
  .gallery__card--5 { align-self: flex-end; margin-right: 3%; z-index: 4; }
  .gallery__card--6 { align-self: flex-start; margin-left: 6%; z-index: 2; }

  .gallery__card--1 .gallery__card-float { transform: rotateX(-3deg) rotateY(6deg) rotateZ(-1deg); }
  .gallery__card--2 .gallery__card-float { transform: rotateX(4deg) rotateY(-8deg) rotateZ(2deg); }
  .gallery__card--3 .gallery__card-float { transform: rotateX(-5deg) rotateY(10deg) rotateZ(-2.5deg); }
  .gallery__card--4 .gallery__card-float { transform: rotateX(3deg) rotateY(-5deg) rotateZ(1.2deg); }
  .gallery__card--5 .gallery__card-float { transform: rotateX(-3deg) rotateY(7deg) rotateZ(-1.8deg); }
  .gallery__card--6 .gallery__card-float { transform: rotateX(4deg) rotateY(-6deg) rotateZ(2.2deg); }

  .gallery__canvas {
    perspective: none;
  }

  .gallery__canvas::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .gallery__card {
    width: min(88vw, 19rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__card,
  .gallery__card-float,
  .gallery__image {
    transform: none !important;
  }
}

/* ============================================================
   Editorial mode — collage merges into fullscreen slider
   ============================================================ */
.gallery--editorial {
  overflow: clip;
  position: relative;
  z-index: 2;
}

.gallery--editorial .gallery__masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  flex-shrink: 0;
  text-align: center;
  direction: ltr;
  padding: clamp(2rem, 5vh, 3.25rem) var(--gallery-edge) clamp(0.75rem, 2vh, 1.25rem);
  will-change: transform, opacity;
  pointer-events: none;
}

.gallery--editorial .gallery__masthead-top,
.gallery--editorial .gallery__statement,
.gallery--editorial .gallery__lede {
  display: none;
}

.gallery--editorial .gallery__masthead-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.85rem, 2vh, 1.35rem);
  margin: 0;
  padding: 0;
  max-width: none;
}

.gallery--editorial .gallery__eyebrow {
  margin: 0;
  font-size: clamp(0.68rem, 0.85vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.38em;
  color: var(--gallery-muted);
}

.gallery--editorial .gallery__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 1vh, 0.65rem);
  line-height: 1;
  font-family: "Cormorant Garamond", Georgia, serif;
}

.gallery--editorial .gallery__title-line {
  display: block;
  will-change: transform, opacity;
  font-family: inherit;
}

.gallery--editorial .gallery__title-line--main {
  font-size: clamp(3.2rem, 9.5vw, 7.5rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gallery-text);
}

.gallery--editorial .gallery__title-line--sub {
  font-size: clamp(1rem, 2.2vw, 1.65rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gallery-gold);
  padding-left: 0.22em;
}

/* Scroll distance — pin stage, brief dwell while expanded */
.gallery--editorial .gallery__scroll {
  position: relative;
  width: 100%;
  height: 115vh;
}

.gallery--editorial .gallery__slides {
  display: none;
}

/* Fullscreen viewer */
.gallery--editorial .gallery__stage {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.gallery--editorial .gallery__viewer {
  position: relative;
  flex: 1;
  z-index: 2;
  display: block;
  min-height: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery--editorial .gallery__viewer-canvas {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ece9e0;
}

/* Autoplay — circular ring + pause/play, centered above counter */
.gallery--editorial .gallery__autoplay {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.gallery--editorial .gallery__autoplay-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.35rem, 3.2vw, 2.75rem);
  height: clamp(2.35rem, 3.2vw, 2.75rem);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 19, 15, 0.38);
  color: rgba(243, 239, 230, 0.88);
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0.82;
  transition: opacity 0.35s ease, background 0.35s ease, color 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery--editorial .gallery__autoplay-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.gallery--editorial .gallery__autoplay-ring-track {
  stroke: rgba(243, 239, 230, 0.22);
}

.gallery--editorial .gallery__autoplay-ring-progress {
  stroke: rgba(201, 169, 110, 0.95);
  will-change: stroke-dashoffset;
}

.gallery--editorial .gallery__autoplay-toggle:hover,
.gallery--editorial .gallery__autoplay-toggle:focus-visible {
  opacity: 1;
  background: rgba(20, 19, 15, 0.52);
  color: #f3efe6;
  transform: scale(1.06);
  outline: none;
}

.gallery--editorial .gallery__autoplay-icon {
  position: relative;
  z-index: 1;
  display: flex;
  width: 42%;
  height: 42%;
}

.gallery--editorial .gallery__autoplay-icon svg {
  width: 100%;
  height: 100%;
}

.gallery--editorial .gallery__autoplay-icon--play {
  display: none;
}

.gallery--editorial .gallery__viewer.is-autoplay-paused .gallery__autoplay-icon--pause {
  display: none;
}

.gallery--editorial .gallery__viewer.is-autoplay-paused .gallery__autoplay-icon--play {
  display: flex;
}

.gallery--editorial .gallery__viewer.is-autoplay-paused .gallery__autoplay-ring-progress {
  stroke-dashoffset: var(--gallery-ring-len, 126) !important;
}

.gallery--editorial .gallery__viewer-frame {
  position: relative;
  flex-shrink: 0;
  width: clamp(9.5rem, 14vmin, 13.5rem);
  height: clamp(9.5rem, 14vmin, 13.5rem);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #14130f;
  box-shadow: 0 22px 56px rgba(20, 19, 15, 0.28);
  border-radius: 8px;
}

.gallery--editorial .gallery__viewer-frame.is-expanding {
  will-change: width, height, border-radius;
}

.gallery--editorial .gallery__viewer-frame.is-sharp {
  aspect-ratio: auto;
  max-width: none;
  max-height: none;
}

.gallery--editorial .gallery__viewer-frame.is-fullbleed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

.gallery--editorial .gallery__viewer-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.45rem, 1vh, 0.75rem);
  padding: clamp(0.85rem, 2vh, 1.35rem) clamp(1rem, 4vw, 2.5rem)
    max(clamp(1rem, 2.5vh, 1.5rem), env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: linear-gradient(
    to top,
    rgba(20, 19, 15, 0.88) 0%,
    rgba(20, 19, 15, 0.5) 55%,
    transparent 100%
  );
  pointer-events: none;
}

.gallery--editorial .gallery__stage.is-immersive {
  background: #ece9e0;
}

.gallery--editorial .gallery__viewer.is-expanded .gallery__masthead {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gallery--editorial .gallery__viewer-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.gallery--editorial .gallery__viewer-frame.is-sharp .gallery__viewer-img {
  will-change: clip-path;
}

.gallery--editorial .gallery__viewer-img--current {
  z-index: 2;
}

.gallery--editorial .gallery__viewer-img--next {
  z-index: 1;
}

/* Nav arrows — bottom controls above counter */
.gallery--editorial .gallery__nav {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(2.75rem, 4vw, 3.75rem);
  height: clamp(2.75rem, 4vw, 3.75rem);
  margin: 0;
  border: 1px solid rgba(243, 239, 230, 0.55);
  border-radius: 50%;
  background: rgba(20, 19, 15, 0.38);
  color: #f3efe6;
  cursor: pointer;
  backdrop-filter: blur(8px);
  overflow: hidden;
  pointer-events: auto;
  transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease, color 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery--editorial .gallery__nav--prev,
.gallery--editorial .gallery__nav--next {
  left: auto;
  right: auto;
}

.gallery--editorial .gallery__nav-icon {
  display: flex;
  width: 42%;
  height: 42%;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery--editorial .gallery__nav-icon svg {
  width: 100%;
  height: 100%;
}

.gallery--editorial .gallery__nav:hover,
.gallery--editorial .gallery__nav:focus-visible {
  background: var(--gallery-gold);
  border-color: var(--gallery-gold);
  color: #1c1a12;
  transform: scale(1.08);
  outline: none;
}

.gallery--editorial .gallery__nav--next:hover .gallery__nav-icon,
.gallery--editorial .gallery__nav--next:focus-visible .gallery__nav-icon {
  transform: translateX(-3px);
}

.gallery--editorial .gallery__nav--prev:hover .gallery__nav-icon,
.gallery--editorial .gallery__nav--prev:focus-visible .gallery__nav-icon {
  transform: translateX(3px);
}

.gallery--editorial .gallery__viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-inline: clamp(0.5rem, 2vw, 1.25rem);
  pointer-events: auto;
}

.gallery--editorial .gallery__viewer-counter {
  margin: 0;
  letter-spacing: 0.22em;
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  color: rgba(243, 239, 230, 0.75);
}

/* Tablet + mobile — stacked editorial gallery (no sticky overlap) */
@media (max-width: 1024px) {
  .gallery--editorial {
    --gallery-edge: clamp(1rem, 4vw, 1.5rem);
  }

  .gallery--editorial .gallery__scroll {
    height: auto;
  }

  .gallery--editorial .gallery__stage {
    position: static;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
    gap: clamp(0.5rem, 1.5vh, 0.85rem);
  }

  .gallery--editorial .gallery__stage.is-immersive {
    background: var(--gallery-bg);
  }

  .gallery--editorial .gallery__masthead {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    flex-shrink: 0;
    padding: max(clamp(2rem, 6vh, 3.25rem), env(safe-area-inset-top, 0px))
      var(--gallery-edge) clamp(1rem, 3vh, 1.35rem);
    pointer-events: auto;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .gallery--editorial .gallery__masthead-body {
    gap: clamp(0.65rem, 2vh, 1rem);
  }

  .gallery--editorial .gallery__eyebrow {
    font-size: clamp(0.62rem, 2.6vw, 0.74rem);
    letter-spacing: 0.32em;
  }

  .gallery--editorial .gallery__title-line--main {
    font-size: clamp(2.35rem, 11vw, 3.75rem);
    letter-spacing: 0.1em;
  }

  .gallery--editorial .gallery__title-line--sub {
    font-size: clamp(0.82rem, 3.4vw, 1.05rem);
    letter-spacing: 0.42em;
    padding-left: 0.42em;
  }

  .gallery--editorial .gallery__viewer {
    position: relative;
    inset: auto;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 2.5vh, 1.25rem);
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0 var(--gallery-edge)
      max(clamp(2rem, 6vh, 3.25rem), env(safe-area-inset-bottom, 0px));
  }

  .gallery--editorial .gallery__viewer-canvas {
    position: relative;
    inset: auto;
    flex: none;
    order: 1;
    width: 100%;
    min-height: 0;
    padding: clamp(0.65rem, 2vw, 1rem);
    border-radius: clamp(4px, 1vw, 8px);
    overflow: hidden;
    background: var(--gallery-paper);
  }

  .gallery--editorial .gallery__viewer-frame {
    position: relative;
    order: 1;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
    aspect-ratio: 4 / 5;
    max-height: min(82vh, 52rem);
    border-radius: clamp(4px, 1vw, 6px);
    transform: none !important;
    box-shadow: 0 12px 32px rgba(20, 19, 15, 0.12) !important;
  }

  .gallery--editorial .gallery__viewer-meta {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    order: 2;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.65rem, 2vh, 0.85rem);
    width: 100%;
    background: transparent;
    padding: 0;
    pointer-events: auto;
  }

  .gallery--editorial .gallery__viewer-counter {
    order: 1;
    width: 100%;
    margin: 0;
    color: var(--gallery-muted);
  }

  .gallery--editorial .gallery__viewer-controls {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1.25rem, 8vw, 2.5rem);
    width: 100%;
    max-width: 18rem;
    padding-inline: 0;
  }

  .gallery--editorial .gallery__autoplay {
    order: 3;
  }

  .gallery--editorial .gallery__nav {
    border-color: rgba(43, 46, 29, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: var(--gallery-text);
    backdrop-filter: blur(6px);
  }

  .gallery--editorial .gallery__nav:hover,
  .gallery--editorial .gallery__nav:focus-visible {
    background: var(--gallery-gold);
    border-color: var(--gallery-gold);
    color: #1c1a12;
  }
}

@media (max-width: 480px) {
  .gallery--editorial .gallery__masthead {
    padding-top: max(clamp(1.75rem, 5vh, 2.5rem), env(safe-area-inset-top, 0px));
    padding-bottom: clamp(0.65rem, 2vh, 1rem);
  }

  .gallery--editorial .gallery__title-line--main {
    font-size: clamp(2rem, 13vw, 2.75rem);
    letter-spacing: 0.08em;
  }

  .gallery--editorial .gallery__title-line--sub {
    font-size: clamp(0.75rem, 3.8vw, 0.9rem);
    letter-spacing: 0.36em;
  }

  .gallery--editorial .gallery__viewer {
    gap: clamp(0.65rem, 2vh, 1rem);
    padding-bottom: max(clamp(1.5rem, 5vh, 2.25rem), env(safe-area-inset-bottom, 0px));
  }

  .gallery--editorial .gallery__viewer-canvas {
    padding: clamp(0.5rem, 2vw, 0.75rem);
  }

  .gallery--editorial .gallery__viewer-frame {
    max-height: min(78vh, 44rem);
    aspect-ratio: 3 / 4;
  }

  .gallery--editorial .gallery__viewer-controls {
    max-width: 16rem;
    gap: 1.25rem;
  }

  .gallery--editorial .gallery__nav {
    width: 2.65rem;
    height: 2.65rem;
  }

  .gallery--editorial .gallery__autoplay-toggle {
    width: 2.35rem;
    height: 2.35rem;
  }
}
