@charset "utf-8";

/* 画像拡大表示 */
.detail-gallery a,
.gallery a {
  display: block;
  height: 100%;
}

.detail-gallery a:first-child,
.detail-gallery a:nth-child(5),
.detail-gallery a:nth-child(7),
.detail-gallery a:nth-child(11) {
  grid-row: span 2;
}

.detail-gallery a:first-child img {
  min-height: 320px;
}

@media (max-width: 768px) {
  .detail-gallery a:first-child {
    grid-row: auto;
  }

  .detail-gallery a:first-child img {
    min-height: 50vh;
  }
}

.modal figure{
  margin: 0;
  display: none;
}
.modal figure:target{
  display: block;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}
.modal figure:target .overlay{
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(50, 50, 50, 0.7);
  text-decoration: none;
  color: inherit;
}
.modal figure:target img{
  animation: fadein .3s;
  display: block;
  width: auto;
  height: 80%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
@keyframes fadein{
  0%{
    transform: scale(0.2);
    opacity: 0.2;
  }
  100%{
    transform: scale(1);
    opacity: 1;
  }
}
