.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(250, 250, 247, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: lb-enter 0.32s var(--ease-out-expo) both;
}

.image-lightbox[hidden] { display: none; }

.image-lightbox-image {
  max-width: 90vw;
  max-height: 85dvh;
  width: auto;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px rgba(28,27,24,0.18), 0 0 0 1px rgba(28,27,24,0.06) inset;
  transition: opacity 0.32s var(--ease-out-expo), transform 0.32s var(--ease-out-expo);
  animation: lb-enter 0.38s 0.05s var(--ease-out-expo) both;
}

.image-lightbox-image.lb-transitioning {
  opacity: 0;
  transform: scale(0.96);
}

.image-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-2);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.18s var(--ease-spring);
}

.image-lightbox-close:hover {
  background: rgba(255,255,255,0.14);
  transform: scale(1.1);
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-pill);
  background: rgba(250,250,247,0.80);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background  0.2s ease,
    transform   0.22s var(--ease-spring),
    opacity     0.2s ease;
  opacity: 0.7;
  z-index: 10;
}

.image-lightbox-nav:hover {
  background: rgba(250,250,247,0.95);
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}

.image-lightbox-nav:active {
  transform: translateY(-50%) scale(0.94);
}

.image-lightbox-nav.lb-prev { left: 1.25rem; }
.image-lightbox-nav.lb-next { right: 1.25rem; }

.image-lightbox-nav[hidden] { display: none; }

.image-lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  align-items: center;
}

.image-lightbox-counter span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.25s ease, transform 0.25s var(--ease-spring);
}

.image-lightbox-counter span.lb-dot-active {
  background: var(--accent);
  transform: scale(1.3);
}
