/* Fullscreen image lightbox + zoomable thumbs */
.cb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: oklch(0.08 0.02 290 / 0.92);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  animation: cb-lightbox-in 0.28s ease both;
}
@keyframes cb-lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cb-lightbox-img {
  max-width: min(96vw, 1200px);
  max-height: min(82vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 64px oklch(0 0 0 / 0.55);
  user-select: none;
}
.cb-lightbox-caption {
  font-family: var(--font-labels, 'DM Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint, #888);
  text-align: center;
  max-width: 90vw;
}
.cb-lightbox-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid oklch(1 0 0 / 0.12);
  background: oklch(1 0 0 / 0.08);
  color: var(--text, #f0f0f0);
  font-size: 16px;
  cursor: none;
}
.cb-lightbox-close:hover {
  background: oklch(1 0 0 / 0.16);
}

.cb-zoomable {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: none;
  overflow: hidden;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.cb-zoomable img {
  transition: transform 0.35s var(--spring, cubic-bezier(0.22, 1, 0.36, 1));
}
.cb-zoomable:hover img {
  transform: scale(1.03);
}
.cb-zoomable-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  background: oklch(0 0 0 / 0.45);
  border: 1px solid oklch(1 0 0 / 0.15);
  opacity: 0.85;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .cb-lightbox { animation: none; }
  .cb-zoomable img { transition: none; }
}
