.club-gallery {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(8px,1.2vw,16px);
}
.club-gallery button {
  display:block;
  width:100%;
  aspect-ratio:1;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:clamp(14px,2vw,25px);
  background:#eeeff0;
  cursor:zoom-in;
}
.club-gallery button:first-child { grid-column:span 2; grid-row:span 2; }
.club-gallery img,
#photo-view > img {
  display:block;
  width:100%;
  height:100%;
  aspect-ratio:1;
  object-fit:cover;
  user-select:none;
}
.club-gallery img { transition:transform .25s ease; }
.club-gallery button:hover img { transform:scale(1.035); }
.gallery-controls {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
  margin-top:14px;
}
.gallery-controls button {
  justify-self:start;
  min-height:44px;
  padding:8px 16px;
  background:#f1f2f2;
  color:var(--ink);
  border:0;
  border-radius:999px;
  font-weight:550;
}
.gallery-controls button:last-child { justify-self:end; }
.gallery-controls button:hover,
.gallery-close:hover { background:#e2e4e5; }
.gallery-count { color:#51565a; font-size:14px; font-variant-numeric:tabular-nums; }
#photo-view {
  width:min(770px,94vw,max(220px,calc(84dvh - 56px)));
  max-height:94dvh;
  overflow:auto;
}
#photo-view > img { height:auto; max-height:none; touch-action:pan-y pinch-zoom; }
.gallery-close {
  position:absolute;
  top:21px;
  right:21px;
  width:44px;
  height:44px;
  border-radius:50%;
  background:#fff;
  color:#191b1c;
  border:0;
  font-size:26px;
  line-height:1;
}
@media (max-width:620px) {
  .club-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .club-gallery button:first-child { grid-row:auto; }
}
@media (prefers-reduced-motion:reduce) {
  .club-gallery img { transition:none; }
  .club-gallery button:hover img { transform:none; }
}

html:has(#photo-view[open]) { overflow: hidden; }
#photo-view { overflow: hidden; overscroll-behavior: contain; }
#photo-view > img { height:auto; max-height:calc(94dvh - 92px); object-fit:contain; background:#f4f5f3; }
#photo-view > img[hidden] { display:block; visibility:hidden; }

.gallery-controls button { display:grid; place-items:center; width:44px; height:44px; padding:0; }
