/* ==========================
   ポップアップ共通
   ========================== */

.img-popup {
  position: fixed;
  right: 32px;
  bottom: 16px;
  width: 440px; /* PC固定 */
  max-width: calc(100vw - 32px);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  overflow: visible;
  z-index: 9999;

  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.img-popup.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.img-popup__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

/* 閉じるボタン */
.img-popup__close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  cursor: pointer;

  background: #000;
  color: #fff;
  font-size: 20px;
  line-height: 36px;
  text-align: center;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.img-popup__close:hover {
  opacity: 0.8;
}

/* ==========================
   SP調整
   ========================== */

@media screen and (max-width: 767px) {
  .img-popup {
    width: 70vw; /* 画面に合わせる */
    max-width: 440px; /* 最大は440px */
    right: 5vw; /* 左右均等に */
    bottom: 64px;
  }

  .img-popup__close {
    top: -12px;
    right: -12px;
    width: 34px;
    height: 34px;
    font-size: 18px;
    line-height: 34px;
  }
}
