.gallery {
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns), 1fr);
  gap: var(--gallery-gap);
}

.gallery button {
  padding: 0;
  overflow: hidden;
  border: 0;
  aspect-ratio: var(--gallery-photo-ratio);
  background: transparent;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* 컬러 사진을 원하면 아래 한 줄 삭제 */
  filter: grayscale(100%);
  transition: transform .5s ease;
}

.gallery button:hover img {
  transform: scale(1.04);
}

.gallery-note {
  margin: 18px 0 0;
  color: var(--sub-text-color);
  font-size: 11px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.88);
}

.modal.open {
  display: flex;
}

.modal img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  background: rgba(0,0,0,.2);
  color: #fff;
  font-size: 20px;
}
