.lightbox-trigger { cursor: zoom-in; }
.lightbox-trigger:focus-visible { outline: 3px solid #600ceb; outline-offset: 4px; }
.photo-lightbox {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 64px 64px 48px;
  border: 0;
  background: rgb(10 10 16 / 96%);
  color: #fff;
  overscroll-behavior: contain;
}
.photo-lightbox[open] { display: grid; place-items: center; }
.photo-lightbox::backdrop { background: rgb(10 10 16 / 90%); }
.photo-lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  pointer-events: none;
}
.photo-lightbox img {
  display: block;
  width: 100%;
  min-height: 0;
  flex: 1;
  object-fit: contain;
  pointer-events: auto;
}
.photo-lightbox figcaption {
  flex: 0 0 auto;
  max-width: 70ch;
  max-height: 20%;
  overflow: auto;
  padding-top: 12px;
  text-align: center;
  white-space: pre-wrap;
  pointer-events: auto;
}
.photo-lightbox button {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 50%;
  background: #24242c;
  color: #fff;
  font: 32px/1 sans-serif;
  cursor: pointer;
}
.photo-lightbox button[hidden] { display: none; }
.photo-lightbox button:hover { background: #444450; }
.photo-lightbox button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.photo-lightbox__close { top: 12px; right: 12px; }
.photo-lightbox__prev { top: calc(50% - 22px); left: 8px; }
.photo-lightbox__next { top: calc(50% - 22px); right: 8px; }
.photo-lightbox__counter { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); }
@media (max-width: 600px) {
  .photo-lightbox { padding: 64px 12px 70px; }
  .photo-lightbox__prev, .photo-lightbox__next { top: auto; bottom: 10px; }
}
/* No animations: navigation also respects prefers-reduced-motion. */
