/* 메인 화면 팝업. 데스크탑은 16:9, 모바일은 841:1190 비율을 유지하고, 닫기는 우측 하단·하루 동안 보지 않기는 좌측 하단에 둔다. */
.site-popup {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.site-popup[hidden] {
  display: none;
}

.site-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 24, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .28s ease;
}

.site-popup.is-visible .site-popup__backdrop {
  opacity: 1;
}

.site-popup__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(960px, calc(100vw - 48px), calc((100dvh - 132px) * 16 / 9));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity .28s ease, transform .28s ease;
}

.site-popup.is-visible .site-popup__panel {
  opacity: 1;
  transform: none;
}

.site-popup__slides {
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  background: var(--surface-soft);
}

.site-popup__slide {
  display: none;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.site-popup__slide.is-active {
  display: block;
}

.site-popup__link,
.site-popup__media {
  display: block;
  width: 100%;
  height: 100%;
}

.site-popup__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-popup__dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 1;
  display: flex;
  gap: 6px;
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  background: rgba(20, 16, 24, .42);
  transform: translateX(-50%);
}

.site-popup__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.site-popup__dot.is-active {
  width: 18px;
  border-radius: var(--radius-pill);
  background: #fff;
}

.site-popup__actions {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.site-popup__hide-today {
  padding: 8px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 13px "Pretendard", "Noto Sans KR", sans-serif;
  cursor: pointer;
}

.site-popup__hide-today:hover {
  color: var(--ink);
}

.site-popup__close {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font: 700 13px "Pretendard", "Noto Sans KR", sans-serif;
  cursor: pointer;
}

.site-popup__close:hover {
  background: var(--text);
}

.site-popup__close span {
  font-size: 17px;
  line-height: 1;
}

body.site-popup-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .site-popup {
    padding: 12px;
  }

  .site-popup__panel {
    width: min(calc(100vw - 24px), calc((100dvh - 116px) * 841 / 1190));
    border-radius: var(--radius-sm);
  }

  .site-popup__slide {
    aspect-ratio: 841 / 1190;
  }

  /* 모바일 이미지가 없으면 데스크탑 이미지를 16:9 로 보여 준다. */
  .site-popup__slide[data-mobile="0"] {
    aspect-ratio: 16 / 9;
  }

  .site-popup__actions {
    padding: 10px 12px;
  }

  .site-popup__hide-today {
    font-size: 12px;
  }

  .site-popup__close {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-popup__backdrop,
  .site-popup__panel {
    transition: none;
  }
}
