.festival-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(16, 11, 26, .72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: festivalPopupFade .22s ease-out both;
}

.festival-popup {
  position: relative;
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(10, 6, 18, .38);
  animation: festivalPopupRise .28s cubic-bezier(.2, .8, .2, 1) both;
}

.festival-popup-link {
  display: block;
  background: #f5d8d8;
  line-height: 0;
  text-align: center;
}

.festival-popup-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto !important;
  max-height: calc(100dvh - 92px);
  margin: 0 auto;
  object-fit: contain;
}

.festival-popup-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: rgba(30, 21, 40, .82);
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .2);
}

.festival-popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 60px;
  border-top: 1px solid #eee8f2;
}

.festival-popup-actions button {
  border: 0;
  background: #fff;
  color: #686170;
  font-size: 15px;
  font-weight: 700;
}

.festival-popup-actions button + button {
  background: #1e1528;
  color: #fff;
}

.festival-popup-actions button:hover {
  background: #f4eef9;
  color: #6c3fc5;
}

.festival-popup-actions button + button:hover {
  background: #32213f;
  color: #fff;
}

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

.festival-popup .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.popup-preview-page {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: linear-gradient(145deg, #1e1528, #492573);
  color: #fff;
  font-family: PretendardLocal, Pretendard, sans-serif;
}

.popup-preview-card {
  width: min(620px, 100%);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 24px;
  background: rgba(255, 255, 255, .09);
  text-align: center;
  backdrop-filter: blur(12px);
}

.popup-preview-card h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 6vw, 42px);
}

.popup-preview-card p {
  margin: 0 0 24px;
  color: #d8cae9;
  line-height: 1.7;
}

.popup-preview-card button,
.popup-preview-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 4px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #3a2055;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

@keyframes festivalPopupFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes festivalPopupRise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .festival-popup-backdrop { padding: 12px; }
  .festival-popup { width: calc(100vw - 24px); border-radius: 16px; }
  .festival-popup-x { top: 9px; right: 9px; width: 38px; height: 38px; font-size: 24px; }
  .festival-popup-actions { min-height: 56px; }
  .festival-popup-actions button { font-size: 14px; }
  .popup-preview-card { padding: 28px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .festival-popup,
  .festival-popup-backdrop { animation: none; }
}
