﻿/* ============== Lightbox ============== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(251, 251, 253, 0.92);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-stage {
  max-width: 88vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 0;
}
.lb-viewport {
  max-width: 88vw;
  max-height: 78vh;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
  background: var(--bg);
  touch-action: none;
  cursor: zoom-in;
  vertical-align: middle;
}
.lb-viewport.is-zoomed { cursor: grab; }
.lb-viewport.is-dragging { cursor: grabbing; }
.lb-viewport img {
  display: block;
  max-width: 88vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform-origin: center center;
  transition: opacity 0.4s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}
.lightbox.open .lb-viewport img.ready { opacity: 1; }
.lb-cap {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-3);
}
.lb-cap span:last-child { color: var(--ink-4); font-family: var(--mono); }
.lb-close {
  position: fixed;
  top: 24px; right: 28px;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.lb-close:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-gray);
}
.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.lb-arrow:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-gray);
}
.lb-arrow.prev { left: 28px; }
.lb-arrow.next { right: 28px; }
.lb-arrow.hidden { display: none; }

