.gallery-lightbox {
  position: fixed;
  inset: 0;
  margin: auto;
  width: max-content;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 56px 16px 16px;
  border: 0;
  border-radius: 6px;
  background: #14181f;
  color: #fff;
  overflow: auto;
}
.gallery-lightbox::backdrop { background: rgb(0 0 0 / 82%); }
.gallery-lightbox figure { margin: 0; }
.gallery-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  margin-inline: auto;
  object-fit: contain;
}
.gallery-lightbox figcaption { margin-top: 12px; font-size: .9rem; line-height: 1.5; text-align: center; }
.gallery-lightbox-close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e1e5ec;
  cursor: pointer;
}
.gallery-lightbox-close:hover { background: #303743; }
.gallery-lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

.gallery-lightbox-controls { display:flex; align-items:center; justify-content:center; gap:20px; margin-top:12px; }
.gallery-lightbox-controls[hidden] { display:none; }
.gallery-lightbox-controls button { width:44px; height:44px; border:1px solid #657184; border-radius:4px; background:#202731; color:#fff; font-size:24px; cursor:pointer; }
.gallery-lightbox-controls button:focus-visible { outline:2px solid white; outline-offset:2px; }
.gallery-lightbox img { max-height:calc(100dvh - 210px); }
