html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.stage {
  position: relative;
}

.wrap {
  position: relative;
}

.trigger {
  display: inline-block;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  font-family: inherit;
  color: #fff;
  background: #2f6df6;
  text-decoration: none;
}

.card {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform-origin: top center;
  transform: translateX(-50%);
  margin: 0;
  border: 0;
  padding: 14px;
  width: min(220px, 68vw);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  opacity: 0;
  animation: card-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.card:popover-open {
  position: fixed;
  top: 150px;
  left: 50%;
}

.card__thumb {
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f6df6, #fff7e6);
  margin-bottom: 10px;
}

.card__title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  font-family: inherit;
  color: #17141a;
}

.card__desc {
  margin: 0;
  font-size: clamp(11px, 3vw, 13px);
  color: #17141a;
  opacity: 0.7;
}

@keyframes card-loop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px) scale(0.94) rotate(0deg);
  }
  12% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.08) rotate(1.8deg);
  }
  22% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(0.97) rotate(-1deg);
  }
  30% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.015) rotate(0.4deg);
  }
  36%, 55% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
  }
  80% {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px) scale(0.94) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px) scale(0.94) rotate(0deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
    opacity: 1;
    transform: translateX(-50%) scale(1) rotate(0deg);
  }
}
