.event-gallery {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.45fr);
  grid-template-areas: "copy photos" "copy tools";
  column-gap: clamp(26px, 5vw, 88px);
  align-items: start;
}
.event-gallery .event-copy { grid-area: copy; margin: 0; }
.event-gallery .event-copy h2 { margin: 0 0 12px; }
.event-gallery .event-copy p { max-width: 40ch; }
.event-gallery .event-copy > a,
.event-gallery .event-copy .photo-source { display: block; margin-top: 16px; }
.event-track {
  grid-area: photos;
  display: flex;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  direction: ltr;
}
.event-gallery.is-interactive .event-track { scrollbar-width: none; }
.event-gallery.is-interactive .event-track::-webkit-scrollbar { display: none; }
.event-track > figure {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}
.event-track .enlarge {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: transparent;
  overflow: hidden;
}
.event-track .enlarge img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: 50% 50%;
  background: transparent;
}
.event-track figcaption {
  margin: 8px 0 0;
  color: #444;
  font-size: 14px;
  line-height: 1.4;
}
.event-tools {
  grid-area: tools;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.event-tools[hidden] { display: none; }
.event-tools button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #aaa;
  color: #151515;
  background: white;
  border-radius: 50%;
  line-height: 1;
  padding: 0;
  font: 21px Arial, sans-serif;
}
.event-tools button:hover, .event-tools button:focus-visible { background: #151515; color: white; }
.event-tools output { min-width: 4ch; text-align: center; color: #333; font: 13px/1 Arial, sans-serif; font-variant-numeric: tabular-nums; }
.event-track .enlarge:focus-visible { outline: 3px solid white; outline-offset: -6px; box-shadow: inset 0 0 0 3px black; }
@media (min-width: 1700px) {
  .event-gallery { grid-template-columns: minmax(0, .9fr) minmax(0, 950px); }
}
@media (max-width: 700px) {
  .event-gallery { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "photos" "tools"; }
  .event-gallery .event-copy { margin-bottom: 18px; }
  .event-track .enlarge { aspect-ratio: 4 / 3; }
  .event-tools { margin-top: 2px; }
}

/* A gallery frame always shows the full original, including near-square photos. */
.event-gallery .event-track .enlarge img { object-fit: contain; object-position: 50% 50%; }
/* Explicit slide visibility keeps the image, caption and counter synchronized. */
.event-gallery.is-interactive .event-track {
  display: block;
  overflow: hidden;
  scroll-snap-type: none;
  touch-action: pan-y pinch-zoom;
}
.event-gallery.is-interactive .event-track > figure[hidden] { display: none; }
