.gallery-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr));
  gap: clamp(24px, 3vw, 42px) clamp(16px, 2vw, 28px);
}
.gallery-wall figure { min-width: 0; scroll-margin-top: 96px; }
.wall-photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ice);
  cursor: zoom-in;
}
.wall-photo img { width: 100%; height: 100%; object-fit: cover; }
.wall-photo[data-video] { cursor: pointer; }
.gallery-wall figcaption {
  margin-top: 10px;
  font: 600 clamp(20px, 1.8vw, 26px)/1.15 var(--display);
}
#photo-viewer button { background: var(--navy); color: white; border: 1px solid #ffffff78; border-radius: 999px; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .wall-photo img { transition: transform .65s var(--ease); }
  .wall-photo:hover img { transform: scale(1.035); }
}
html:has(#photo-viewer[open]) { overflow: hidden; }
#photo-viewer {
  position: fixed; inset: 0; margin: 0; width: 100%; height: 100%;
  max-width: none; max-height: none; border: 0; border-radius: 0;
  background: transparent; color: white; padding: clamp(12px, 2vmin, 28px);
}
#photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; }
#photo-viewer::backdrop { background: #040b12f5; }
#photo-viewer form { justify-self: end; }
#photo-viewer button { min-width: 44px; min-height: 44px; padding: 0 14px; }
.viewer-stage { display: grid; place-items: center; min-height: 0; }
.viewer-image, .viewer-video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; min-height: 0; }
.viewer-bar { display: flex; justify-content: center; align-items: center; gap: 16px; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  #photo-viewer[open] .viewer-image { animation: photo-pop .18s ease-out; }
  @keyframes photo-pop { from { opacity: .5; transform: scale(.96); } }
}
.gallery-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: .55em 1em; border-radius: 2em; white-space: nowrap; background: #001d36df; color: white; font: 600 14px/1.4 sans-serif; }
.viewer-stage [hidden] { display: none; }
