.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gallery-modal:has(.studio-slideshow) {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 16px;
  overflow: hidden;
}

.studio-slideshow {
  position: relative;
  width: min(1280px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: min(900px, calc(100vh - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #000;
}

.studio-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 62px 82px 22px;
  background: #000;
}

.studio-stage > img,
.studio-stage > video {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  margin: auto;
  background: #000;
}

.studio-stage > [hidden] { display: none !important; }

.studio-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(189, 151, 97, .72);
  border-radius: 50%;
  background: rgba(8, 7, 6, .88);
  color: var(--gold);
  font: 300 2.6rem/1 var(--serif);
  cursor: pointer;
  transform: translateY(-50%);
}

.studio-arrow:hover,
.studio-arrow:focus-visible { background: var(--gold); color: #080706; }
.studio-arrow-left { left: 16px; }
.studio-arrow-right { right: 16px; }

.studio-caption-bar {
  flex: 0 0 64px;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: .8rem 2rem;
  border-top: 1px solid rgba(189, 151, 97, .3);
  background: #0d0b09;
  color: #c8beb2;
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.studio-caption-bar [data-studio-caption] { grid-column: 2; text-align: center; }
.studio-caption-bar [data-studio-counter] { grid-column: 3; justify-self: end; color: var(--gold); }
.studio-slideshow .gallery-close {
  z-index: 5;
  top: 12px;
  right: 12px;
  background: rgba(8, 7, 6, .92);
}

@media (max-width: 800px) {
  .gallery-modal:has(.studio-slideshow) { padding: 0; }
  .studio-slideshow {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-left: 0;
    border-right: 0;
  }
  .studio-stage { padding: 58px 12px 64px; }
  .studio-arrow {
    top: auto;
    bottom: 12px;
    width: 44px;
    height: 44px;
    font-size: 2.2rem;
  }
  .studio-arrow-left { left: 12px; }
  .studio-arrow-right { right: 12px; }
  .studio-caption-bar {
    flex-basis: 58px;
    padding: .7rem 1rem;
    font-size: .62rem;
  }
}
