#gallery-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#gallery-backdrop.active {
  display: flex;
}

#gallery-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  user-select: none;
}

#gallery-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  padding: 0.25rem 0.5rem;
}

#gallery-close:hover { opacity: 1; }

#gallery-prev,
#gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  opacity: 0.6;
}

#gallery-prev:hover,
#gallery-next:hover { opacity: 1; background: rgba(255, 255, 255, 0.2); }

#gallery-prev { left: 1rem; }
#gallery-next { right: 1rem; }

#gallery-dots {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.85rem;
  min-height: 8px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  padding: 0;
}

.gallery-dot.active { background: #fff; }

.credit-img[data-images] {
  cursor: zoom-in;
}
