.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--lightbox-bg);
  display: flex;
  flex-direction: column;
}
.lightbox[hidden] { display: none; }

.lightbox__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  min-height: 0;
  position: relative;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: calc(100svh - 140px);
  object-fit: contain;
}
@media (min-width: 640px) {
  .lightbox__stage img { max-height: calc(100svh - 96px); }
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, .72);
  border-radius: 50%;
  border: none;
  color: var(--on-dark);
  opacity: .7;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  transition: opacity var(--dur-fade) var(--ease-standard);
}
.lightbox__close:hover, .lightbox__close:focus-visible,
.lightbox__nav:hover, .lightbox__nav:focus-visible { opacity: 1; }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }

.lightbox__caption {
  flex-shrink: 0;
  padding: 14px var(--pad);
  border-top: 1px solid rgba(var(--on-dark-rgb), .15);
  font-family: 'Manrope', sans-serif;
  font-size: var(--caption-size);
  color: var(--on-dark);
  min-height: 1.4em;
}
.lightbox__caption .sep { color: rgba(var(--on-dark-rgb), .6); margin: 0 10px; }

.swipe-hint {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(var(--on-dark-rgb), .7);
  font-size: .75rem;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: .1em;
  animation: swipe-pulse 1.6s ease-in-out infinite;
}
@keyframes swipe-pulse {
  0%, 100% { opacity: .3; transform: translate(-50%, 0); }
  50% { opacity: .8; transform: translate(-50%, -4px); }
}
