body{margin: 0%;
padding: 20px;
font-family: sans-serif;
background-color: #f4f4f4;
color: #333;
}

.title{
  padding: 1em 0;
  text-align: center;
  margin-top: 30px;
  background-color: #333;
  color:white;
}

/* PC4枚 */
.gallery{
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap:20px;
  max-width:1300px;
  margin: 0 auto;
}

.gallery img{
  width: 100%;
  height: auto;
}

.footer{
  border-top:1px solid #636363;
  text-align: center;
  padding: 1em 0;
  background-color: #3a3a3a;
  color:#ffffff;
  margin-top: 20px;
}

/* タブレット：2枚 */
@media screen and (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* スマートフォン：1枚 */
@media screen and (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* ===== モーダル ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(200, 200, 200, 0.9); /* 薄いグレー */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  z-index: 1000;
}

.modal img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* 表示時 */
.modal.active {
  opacity: 1;
  visibility: visible;
}
