.galleryLightbox[hidden] {
  display: none;
}

.galleryLightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

.galleryLightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 22, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.galleryLightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  height: min(92vh, 920px);
  display: grid;
  place-items: center;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #0f1115;
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.32);
}

.galleryLightbox__figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.galleryLightbox__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0f1115;
}

.galleryLightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.9);
  color: #111827;
  cursor: pointer;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}

.galleryLightbox__close:hover {
  transform: scale(1.03);
  background: #fff;
}

.galleryLightbox__close:focus-visible {
  outline: 2px solid rgba(224, 106, 42, 0.55);
  outline-offset: 2px;
}

.galleryLightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.9);
  color: #111827;
  cursor: pointer;
  font-size: 2rem;
  display: grid;
  place-items: center;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}

.galleryLightbox__nav:hover {
  transform: translateY(-50%) scale(1.03);
  background: #fff;
}

.galleryLightbox__nav--prev {
  left: 10px;
}

.galleryLightbox__nav--next {
  right: 10px;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .galleryLightbox__dialog {
    border-radius: 18px;
    height: min(84vh, 680px);
  }

  .galleryLightbox__nav {
    width: 42px;
    height: 42px;
    font-size: 1.9rem;
  }

  .galleryLightbox__close {
    width: 40px;
    height: 40px;
  }
}