/* Full-screen photo viewer, opened from a card strip or the drawer gallery. */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  background: rgba(6, 8, 11, 0.94);
  backdrop-filter: blur(4px);
}
.lightbox.open { display: grid; }

.lb-stage {
  margin: 0;
  max-width: min(1400px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.lb-stage img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  display: block;
  border: 1px solid var(--rule);
  background: #0b0e13;
  cursor: pointer;
  animation: lb-in 0.22s ease-out;
}
@keyframes lb-in { from { opacity: 0; transform: scale(0.985); } }
@media (prefers-reduced-motion: reduce) { .lb-stage img { animation: none; } }

.lb-stage figcaption {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 13px;
  color: var(--bone-dim);
  direction: rtl;
}
.lb-count { color: var(--bone-faint); font-size: 12px; }

.lightbox button {
  position: absolute;
  background: rgba(20, 24, 31, 0.86);
  border: 1px solid var(--rule);
  color: var(--bone);
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.14s, background 0.14s;
}
.lightbox button:hover { background: #1d232c; border-color: var(--bone-faint); }
.lightbox button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.lb-close { top: 18px; inset-inline-end: 18px; width: 40px; height: 40px; font-size: 17px; }
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 74px;
  font-size: 30px;
  line-height: 1;
  padding: 0;
}
/* The page is RTL; keep prev on the right so it matches reading order. */
.lb-prev { inset-inline-end: 18px; }
.lb-next { inset-inline-start: 18px; }

@media (max-width: 640px) {
  .lb-nav { width: 38px; height: 58px; font-size: 24px; }
  .lb-stage img { max-height: 74vh; }
}

/* Photos are interactive everywhere they appear. */
.shots span, .gallery a { cursor: zoom-in; }
