/* 右下スタック */
.rsp-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none; /* 背景クリック可 */
}

.sep-popup {
  display: none;
  pointer-events: none; /* 背景操作可／中身で戻す */
}

.sep-popup.is-active {
  display: block;
}

/* 中身カード */
.sep-popup__content {
  pointer-events: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(16px);
  opacity: 0;
  animation: sep-slide-in-up 0.28s ease-out forwards;
  width: var(--sep-img-max, 360px);
  max-width: 92vw;
  max-height: 85vh;
}

@keyframes sep-slide-in-up {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 閉じる */
.sep-popup__close {
  position: absolute;
  transform: translate(calc(var(--sep-img-max, 360px) - 20px), -8px);
  border: none;
  background: rgba(0, 0, 0, 0.04);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
}

/* HTML本文内の画像などの調整（任意） */
.sep-popup__content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* モバイル */
@media (max-width: 767px) {
  .rsp-stack {
    right: 12px;
    bottom: 12px;
    gap: 10px;
  }
  .sep-popup__content {
    width: var(--sep-img-max, 92vw);
    max-width: calc(100vw - 24px);
    border-radius: 12px;
  }
  .sep-popup__close {
    transform: translate(calc(var(--sep-img-max, 92vw) - 20px), -8px);
  }
}

/* リデュースモーション */
@media (prefers-reduced-motion: reduce) {
  .sep-popup__content {
    animation: none;
    transform: none;
    opacity: 1;
  }
}
