.sp-place-gallery {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: clamp(280px, 34vw, 470px);
  gap: 8px;
  margin-bottom: 12px;
}
.sp-place-gallery[data-visible="0"], .sp-place-gallery[data-visible="1"] {
  grid-template-columns: minmax(0, 1fr);
}
.sp-place-gallery[data-visible="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-place-gallery[data-visible="3"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.sp-place-gallery[data-visible="3"] > :first-child { grid-row: span 2; }
.sp-place-gallery > * {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #f2f6f8;
}
.sp-place-gallery button { cursor: zoom-in; }
.sp-place-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sp-place-gallery button:focus-visible { outline: 3px solid #00746e; outline-offset: -3px; }
.sp-place-gallery .sp-more-photos {
  position: absolute; right: 8px; bottom: 8px; padding: 3px 9px;
  border-radius: 20px; color: white; background: #06265be8; font: 600 13px/1.5 system-ui;
}
@media(max-width:640px) {
  .sp-place-gallery, .sp-place-gallery[data-visible] {
    grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; height: auto; gap: 6px;
  }
  .sp-place-gallery[data-visible] > :first-child { grid-column: 1/-1; grid-row: auto; aspect-ratio: 16/10; }
  .sp-place-gallery > * { height: auto; aspect-ratio: 16/9; }
  .sp-place-gallery[data-visible="2"] > :last-child { grid-column: 1/-1; aspect-ratio: 3/1; }
  .sp-place-gallery img { position: absolute; inset: 0; }
}
