.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
    max-width: 1200px;
  margin: 0 auto;
}

.photo-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px; /* 0〜4pxで微調整 */
    transition: transform .4s ease, filter .4s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);

}



.photo-grid img:hover {
  transform: scale(1.03);
  filter: brightness(1.02) contrast(1.05);
}

.photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.photo-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;

  transform: scale(0.97);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(.25,.8,.25,1),
    opacity 0.2s ease;
  transition-delay: 0.05s;
}


/* 表示時 */
.photo-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.photo-modal.is-open img {
  transform: scale(1);
  opacity: 1;
}


.photo-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  margin-top:8em;
}

/* 写真ページのリンクを必ず有効にする */
.photo-grid a,
.photo-grid img {
  pointer-events: auto;
}

.photo-grid a::after {
  content: "TAP";
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
  color: #fff;
  background: rgba(0,0,0,.5);
  padding: 4px 6px;

}





@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
}