.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  touch-action: pan-y;
}
.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .3); }

.lightbox-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  min-width: 48px;
  max-width: 96px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.lightbox-nav span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .85;
}
.lightbox-nav:hover span { opacity: 1; background: rgba(255, 255, 255, .28); }
.lightbox-prev { left: 0; justify-content: flex-start; padding-left: 6px; }
.lightbox-next { right: 0; justify-content: flex-end; padding-right: 6px; }

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: .8rem;
  background: rgba(255, 255, 255, .14);
  padding: 4px 12px;
  border-radius: 20px;
}

body.lightbox-locked { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .lightbox-img { transition: opacity .12s ease; }
}
