.gallery-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 64px 72px;
  border: 0;
  background: rgba(0, 0, 0, .96);
  color: #fff;
}
.gallery-viewer[open] { display: flex; align-items: center; justify-content: center; }
.gallery-viewer::backdrop { background: #000c; }
.gallery-viewer button {
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font: 400 48px/1 Arial, sans-serif;
}
.gallery-viewer button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.gallery-viewer .gallery-photo { display: flex; padding: 0; max-width: 100%; cursor: zoom-out; }
.gallery-photo img { display: block; max-width: 100%; max-height: calc(100dvh - 128px); width: auto; height: auto; object-fit: contain; }
.gallery-close, .gallery-previous, .gallery-next { position: absolute; width: 52px; height: 52px; }
.gallery-close { top: 8px; right: 12px; }
.gallery-previous { left: 8px; top: calc(50% - 26px); }
.gallery-next { right: 8px; top: calc(50% - 26px); }
.gallery-count { position: absolute; bottom: 20px; left: 0; width: 100%; text-align: center; font: 14px Arial, sans-serif; }
.archive-grid a { cursor: zoom-in; }
@media (max-width: 600px) {
  .gallery-viewer { padding: 64px 8px 88px; }
  .gallery-photo img { max-height: calc(100dvh - 152px); }
  .gallery-previous, .gallery-next { top: auto; bottom: 8px; }
}
