#image-viewer {
  box-sizing: border-box;
  width: min(95vw, 1200px);
  max-width: none;
  max-height: 94dvh;
  padding: 12px;
  border: 0;
  background: #faf9f6;
  color: #4d2847;
}
#image-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#image-viewer::backdrop { background: #161313c9; }
#image-viewer #full-image {
  display: block;
  max-height: calc(94dvh - 120px);
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
  touch-action: pan-y pinch-zoom;
}
#image-viewer button {
  min-height: 44px;
  padding: 8px 12px;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
#image-viewer #close-image { justify-self: end; }
.gallery-image-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 3vw, 24px);
  margin-top: 6px;
}
