/* Only the public gallery photo viewer; existing colors, controls and spacing stay intact. */
body:is(:has(#app .gallery-toolbar), :has(#app .gallery-cover)) #viewer-content:has(> .viewer-stage) {
  height: 100%;
  min-height: 0;
  min-width: 0;
}
body:is(:has(#app .gallery-toolbar), :has(#app .gallery-cover)) #viewer .viewer-stage {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
body:is(:has(#app .gallery-toolbar), :has(#app .gallery-cover)) #viewer .viewer-stage > img {
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none !important;
}
