/* Reserve actual image ratios before lazy images load, including in Safari columns. */
.rs-photo-gallery.rs-photo-gallery {
  display: block !important;
  columns: 3;
  column-gap: 8px;
  width: 100%; height: auto !important;
  padding: 0 !important; margin-block: 24px !important;
  list-style: none !important;
  box-sizing: border-box;
  isolation: isolate;
  line-height: 0;
}
.rs-photo-gallery > .rs-photo-gallery__cell {
  position: relative; display: inline-block; float: none;
  break-inside: avoid; vertical-align: top;
  width: 100%; min-width: 0; height: auto; min-height: 0;
  margin: 0 0 8px !important; padding: 0 !important;
  list-style: none; background: transparent;
}
.rs-photo-gallery .rs-photo-gallery__item {
  position: relative; display: block !important;
  width: 100%; height: auto !important; margin: 0; padding: 0;
  aspect-ratio: var(--rs-gallery-ratio, 1) !important;
}
.rs-photo-gallery .rs-photo-gallery__item img {
  position: absolute !important; inset: 0 !important;
  display: block !important; width: 100% !important; height: 100% !important;
  max-width: none !important; max-height: none !important;
  contain-intrinsic-size: none !important;
  object-fit: contain !important;
  margin: 0 !important;
}
.rs-photo-gallery .rs-photo-gallery__item:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
@media(max-width:782px) {
  .rs-photo-gallery.rs-photo-gallery { columns: 3; column-gap: 6px; }
  .rs-photo-gallery > .rs-photo-gallery__cell { margin-bottom: 6px !important; }
}
.rs-gallery-viewer { position: fixed; inset: 0; margin: auto; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 56px; box-sizing: border-box; border: 0; background: rgba(0,0,0,.97); color: #fff; }
.rs-gallery-viewer[open] { display: flex; align-items: center; justify-content: center; }
.rs-gallery-viewer::backdrop { background: #000; }
.rs-gallery-viewer img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: zoom-out; touch-action: pan-y pinch-zoom; }
.rs-gallery-viewer button { position: absolute; border: 0; background: transparent; color: #fff; width: 44px; height: 44px; padding: 0; font: 300 38px/1 sans-serif; cursor: pointer; }
.rs-gallery-viewer button[hidden] { display: none; }
.rs-gallery-close { top: 10px; right: 12px; }
.rs-gallery-prev { left: 8px; top: calc(50% - 22px); }
.rs-gallery-next { right: 8px; top: calc(50% - 22px); }
.rs-gallery-viewer p { position: absolute; bottom: 12px; left: 0; right: 0; margin: 0; text-align: center; font: 14px/1.5 sans-serif; pointer-events: none; }
@media(max-width:782px) { .rs-gallery-viewer { padding: 56px 40px; } .rs-gallery-prev { left: 0; } .rs-gallery-next { right: 0; } }

/* Cartel below the full photograph; scrollable if necessary on short screens. */
.rs-gallery-viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 12px; }
.rs-gallery-viewer img { min-height: 0; grid-row: 1; align-self: center; }
.rs-gallery-caption { grid-row: 2; white-space: pre-line; text-align: center; font: 400 clamp(11px, 1vw, 14px)/1.45 -apple-system, BlinkMacSystemFont, sans-serif; max-height: 24dvh; overflow-y: auto; max-width: 100%; color: #eee; }

/* TIME FLIES overlay: no influence on the photograph's dimensions. */
.rs-photo-gallery .rs-photo-gallery__item { container-type: inline-size; }
.rs-photo-gallery .rs-time-flies {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: #e2e2e2; opacity: 1;
  pointer-events: none;
  transition: opacity 1.6s cubic-bezier(.25,.46,.45,.94);
}
.rs-photo-gallery .rs-time-flies__year {
  color: #242424; font-family: inherit;
  font-size: clamp(20px, 16cqw, 64px); font-weight: 500;
  line-height: 1; letter-spacing: -.035em;
  opacity: 0; transition: opacity .45s ease;
}
.rs-photo-gallery .rs-time-flies--year .rs-time-flies__year { opacity: 1; }
.rs-photo-gallery .rs-time-flies--photo { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .rs-photo-gallery .rs-time-flies { display: none; } }
