/* ポップアップのスタイル */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.popup.active {
  display: flex;
}
.popup-content {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.25s ease;
}
.popup-content.fade {
  opacity: 0;
}
.close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}
.popup-prev,
.popup-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  user-select: none;
}
.popup-prev { left: 16px; }
.popup-next { right: 16px; }
.popup-prev:hover,
.popup-next:hover {
  background: rgba(255,255,255,0.35);
}
.popup-counter {
  position: absolute;
  bottom: 16px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin: 0;
}


.p-top__photo-text {
 display: grid;
 line-height: 1.2;
 gap: 1rem;
 text-align: center;

 span {
  font-size: .75rem;
  display: block;
 }
}

.p-top__photo-lists {
 column-count: 4;
 padding: 1rem;
 column-gap: .5rem;

 li {
  break-inside: avoid;
  display: inline-block;

  img {
   width: 100%;
   height: auto;
   display: block;
   border-radius: .2rem;
  }
 }
}

/* フェードイン */
.p-top__photo-lists li {
 opacity: 0;
 transform: translateY(10px);
 transition: opacity .4s ease, transform .4s ease;
}

.p-top__photo-lists li.show {
 opacity: 1;
 transform: translateY(0);
}

/* スマホ */
@media (max-width: 767px) {
 .p-top__photo-lists {
  column-count: 3;
 }
}

@media (max-width: 480px) {
 .p-top__photo-lists {
  column-count: 2;
 }
}
