/* Full photographs, without changing the gallery's existing layout. */
.gallery-hover-preview {
  position: fixed;
  z-index: 1000;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 8px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  background: var(--bg, #faf9f6);
  border: 1px solid var(--rule, #d5d2ce);
  box-shadow: 0 16px 60px #0005;
  cursor: zoom-in;
}
.gallery-hover-preview[hidden] { display: none; }
.gallery-hover-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(78vw, 1400px);
  max-height: 78dvh;
  object-fit: contain;
}
.gallery-viewer {
  border: 1px solid var(--rule, #d5d2ce);
  padding: 0;
  background: var(--bg, #faf9f6);
  color: var(--ink, #242424);
  width: min(1440px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
}
.gallery-viewer::backdrop { background: rgb(15 15 15 / 85%); }
.gallery-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  font-family: var(--mono, monospace);
  font-size: 12px;
}
.gallery-viewer button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  cursor: pointer;
  font: inherit;
}
.gallery-viewer button:focus-visible { outline: 2px solid var(--accent, #b31b1b); outline-offset: 3px; }
.gallery-viewer-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 152px);
  object-fit: contain;
}
.gallery-viewer-caption { padding: 12px 16px; margin: 0; font: 14px/1.5 var(--sans, sans-serif); }
@media (hover: none), (pointer: coarse) { .gallery-hover-preview { display: none; } }
