/* Lightbox (assets/js/lightbox.js). Native <dialog>; the page behind is inert. */
.lb-open { overflow: hidden; }

.lb {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  background: transparent;
  color: #fff;
}
.lb::backdrop { background: rgb(0 0 0 / 0.92); }

.lb__fig {
  margin: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  grid-template-rows: 1fr auto;
}
.lb__img {
  max-width: 100vw;
  max-height: calc(100vh - 3.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.6);
}
.lb__cap {
  padding: 0.6rem 1rem 0.8rem;
  font: 600 0.95rem var(--font-sans);
  color: rgb(255 255 255 / 0.85);
  letter-spacing: 0.02em;
}

.lb__btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  font: 400 2rem/1 var(--font-serif);
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.lb__btn:hover { background: rgb(255 255 255 / 0.28); }
.lb__btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.lb__btn--close { top: 0.75rem; right: 0.75rem; }
.lb__btn--prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb__btn--next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb__btn[hidden] { display: none; }
@media (min-width: 960px) {
  .lb__btn { width: 3.5rem; height: 3.5rem; }
  .lb__btn--prev { left: 1.5rem; }
  .lb__btn--next { right: 1.5rem; }
}

/* Gallery items become links; keep the visual identical and show it's clickable. */
.gallery a {
  display: block;
  scroll-snap-align: start;
  border-radius: var(--radius);
  cursor: zoom-in;
}
.gallery a:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
