/* ============================================================
   Lightbox styling — token-driven, so it follows the theme.
   The prototype had this inline in a script tag; it belongs here.
   ============================================================ */

.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: var(--scrim);
  display: grid; place-items: center;
  padding: 4vw; cursor: zoom-out;
}
.lightbox-inner { width: min(1100px, 92vw); }
.lightbox-inner img {
  width: 100%; height: auto; max-height: 82vh; object-fit: contain;
  border-radius: var(--radius);
}
.lightbox-caption {
  color: #fff; font-size: .88rem; margin: 12px 0 0; opacity: .85;
  max-width: 70ch;
}

/* ---------- moving through a gallery ----------
   Absolute, not grid children: the lightbox is a grid, and three children would put
   the buttons in the layout instead of over it. Monochrome SVG, no glyphs. */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: #fff; cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.lightbox-nav--prev { left: max(1.5vw, 10px); }
.lightbox-nav--next { right: max(1.5vw, 10px); }
.lightbox-nav svg { width: 22px; height: 22px; display: block; }
.lightbox-nav path {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .55); }
.lightbox-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lightbox-count {
  display: inline-block; margin-right: .45rem; opacity: .7;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-nav--prev { left: 6px; }
  .lightbox-nav--next { right: 6px; }
}
