.gallery-group { margin-block: clamp(2.5rem, 6vw, 5rem); }
.gallery-group h2 { margin-bottom: 1.35rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
}
.gallery-grid figure, .photo-lightbox figure { margin: 0; }
.gallery-grid a { display: block; background: #e6f1f7; }
.gallery-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: contain; }
.gallery-grid figcaption { margin-top: .5rem; color: var(--muted); font-size: .9rem; }
.photo-lightbox {
  padding: 1rem;
  max-width: none;
  width: min(96vw, 75rem);
  max-height: 95dvh;
  background: var(--dark);
  color: var(--paper);
  border: 1px solid var(--line);
}
.photo-lightbox::backdrop { background: rgb(9 15 23 / 90%); }
.photo-lightbox figure { margin-block: .75rem; text-align: center; }
.photo-lightbox img { display: block; width: 100%; height: min(66dvh, 50rem); object-fit: contain; touch-action: pan-y pinch-zoom; }
.photo-lightbox figcaption:not(:empty) { padding-top: .5rem; }
.lightbox-controls { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.photo-lightbox button { padding: .55rem .75rem; font: inherit; cursor: pointer; }
.photo-lightbox button:focus-visible { outline: 3px solid var(--light-accent); outline-offset: 2px; }
html:has(.photo-lightbox[open]) { overflow: hidden; }
@media (max-width: 62rem) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .gallery-grid { grid-template-columns: 1fr; } }
