.event-with-gallery .gallery-trigger {
  grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: .75rem;
  margin-top: .9rem; padding: .8rem 1rem; border: 1px solid var(--red); border-radius: 999px;
  background: transparent; color: var(--red); font: 700 .9rem/1.1 Inter, sans-serif; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.event-with-gallery .gallery-trigger span { font-weight: 500; }
.event-with-gallery .gallery-trigger:hover, .event-with-gallery .gallery-trigger:focus-visible { background: var(--red); color: #fff; transform: translateY(-1px); }
.photo-dialog { width: min(1100px, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 1rem; background: #fff; color: var(--navy); box-shadow: 0 24px 80px rgba(5,25,52,.35); }
.photo-dialog::backdrop { background: rgba(5,20,40,.82); backdrop-filter: blur(3px); }
.gallery-shell { padding: clamp(1rem,2vw,1.75rem); }
.gallery-shell header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.gallery-shell header .kicker { margin: 0 0 .3rem; }
.gallery-shell h2 { margin: 0; font: 700 clamp(1.5rem,3vw,2.35rem)/1.05 Fraunces, serif; }
#galleryCounter { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.gallery-close { flex: none; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 700; cursor: pointer; }
.gallery-viewer { position: relative; display: grid; place-items: center; min-height: min(61vh,650px); overflow: hidden; border-radius: .75rem; background: #e9edf1; }
.gallery-viewer figure { width: 100%; margin: 0; }
.gallery-viewer figure img { display: block; width: 100%; height: min(61vh,650px); object-fit: contain; }
.gallery-viewer figcaption { position: absolute; inset: auto 0 0; padding: 2.5rem 5rem 1rem; background: linear-gradient(transparent,rgba(5,20,40,.82)); color: #fff; text-align: center; font-size: .9rem; }
.gallery-nav { position: absolute; top: 50%; z-index: 2; width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--navy); font-size: 1.7rem; line-height: 1; cursor: pointer; transform: translateY(-50%); box-shadow: 0 4px 18px rgba(5,20,40,.25); }
.gallery-nav:hover, .gallery-nav:focus-visible { background: #fff; outline: 3px solid rgba(237,28,36,.35); }
.gallery-nav.prev { left: 1rem; } .gallery-nav.next { right: 1rem; }
.gallery-thumbnails { display: flex; gap: .55rem; margin-top: .75rem; padding: .15rem 0 .45rem; overflow-x: auto; scrollbar-width: thin; }
.gallery-thumb { flex: 0 0 92px; height: 62px; padding: 0; overflow: hidden; border: 3px solid transparent; border-radius: .45rem; background: #e9edf1; cursor: pointer; opacity: .66; }
.gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb[aria-current="true"] { border-color: var(--red); opacity: 1; }
@media (max-width: 900px) {
  .event-with-gallery .gallery-trigger { grid-column: 1; }
}
@media (max-width: 700px) {
  .photo-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  .gallery-shell { padding: .8rem; } .gallery-shell h2 { font-size: 1.35rem; } .gallery-close { padding: .55rem .7rem; }
  .gallery-viewer { min-height: 54vh; } .gallery-viewer figure img { height: 54vh; }
  .gallery-viewer figcaption { padding: 2rem 3.5rem .75rem; font-size: .78rem; }
  .gallery-nav { width: 2.35rem; height: 2.35rem; font-size: 1.35rem; } .gallery-nav.prev { left: .45rem; } .gallery-nav.next { right: .45rem; }
  .gallery-thumb { flex-basis: 76px; height: 52px; }
}
