/* Gallery owns its canvas only. Section band, case spacing and type tokens are shared. */
.gallery-content[data-gallery-mount] {
  width: 84%;
  margin-inline: auto;
  padding-top: var(--case-description-gap, 3rem);
}
.gallery-canvas {
  position: relative;
  width: 100%;
  container-type: inline-size;
}
.gallery-item {
  position: absolute;
  left: var(--gallery-x);
  top: var(--gallery-y);
  width: var(--gallery-width);
  margin: 0;
}
.gallery-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--gallery-ratio);
  overflow: hidden;
  border-radius: 0;
  background: #edf0f2;
}
.gallery-frame[data-media-slot='gallery-15'],
.gallery-frame[data-media-slot='gallery-16'] {
  background: #fff;
}
.gallery-frame .gallery-media {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}
.gallery-slider-surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.gallery-slider-surface .gallery-media {
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.gallery-slider-surface .gallery-active { opacity: 1; }
/* Slider dots share the case slider rules in desktop-prototype/styles.css. */
.gallery-frame button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 6px #000;
}
.gallery-status {
  position: absolute;
  z-index: 1;
  inset: 0 auto auto 0;
  max-width: 100%;
  padding: 8px;
  color: #000;
  background: #edf0f2;
  font-size: var(--font-caption);
  line-height: var(--caption-line-height);
}
.gallery-status:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
  .gallery-slider-surface .gallery-media { transition: none; }
}
.gallery-caption {
  width: var(--gallery-caption-width, 100%);
  margin: var(--gallery-caption-gap) 0 0 var(--gallery-caption-offset);
  font-size: var(--font-caption);
  line-height: var(--caption-line-height);
  font-weight: 400;
  overflow-wrap: anywhere;
}
