/* Preserve the exhibition layout while the browser chooses a file for each image. */
img[data-photo-source] {
  contain-intrinsic-size: var(--web-photo-width) var(--web-photo-height);
  aspect-ratio: var(--web-photo-ratio);
}
.full-figure img[data-photo-source] {
  width: min(100%, var(--web-photo-width), calc(78vh * var(--web-photo-ratio)));
}
.selected-figure img[data-photo-source] {
  --gallery-photo-height: 60vh;
  width: min(100%, var(--web-photo-width), calc(var(--gallery-photo-height) * var(--web-photo-ratio)));
}
@media (max-width: 700px) {
  .selected-figure img[data-photo-source] { --gallery-photo-height: 55vh; }
  .gallery-stage.is-comparing .selected-figure img[data-photo-source] { --gallery-photo-height: 38vh; }
}
.image-dialog img[data-photo-source] {
  width: min(90vw, var(--web-photo-width), calc(75vh * var(--web-photo-ratio)));
}
.lightbox-body { container-type: size; }
.lightbox-body img[data-photo-source] {
  width: min(100cqw, var(--web-photo-width), calc(100cqh * var(--web-photo-ratio)));
}
.image-dialog.is-native img[data-photo-source],
.lightbox-body.zoomed img[data-photo-source] {
  width: var(--web-photo-width);
  height: auto;
}
