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

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

.ad {
  box-sizing: border-box;
  width: min(248px, 86vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  text-align: center;
  color: #fff7e6;
}

.ad__art {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ad__icon {
  grid-area: 1/1;
  font-size: clamp(36px, 11vw, 46px);
  line-height: 0;
  color: #fff7e6;
}

.ad__bit {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border-radius: 4px;
  background: #ff9ebb;
  opacity: 0;
}

.ad__bit:nth-child(2) {
  background: #4cd4a6;
}

.ad__bit:nth-child(3) {
  background: #b9a0ff;
}

.ad__bit:nth-child(4) {
  background: #6ec8ff;
}

.ad__bit:nth-child(5) {
  background: #ff9ebb;
}

.ad__bit:nth-child(6) {
  background: #4cd4a6;
}

.ad__title {
  margin: 0;
  font-size: clamp(12px, 4vw, 14px);
  line-height: 1.3;
  font-weight: 800;
}

.ad__sub {
  margin: 0;
  min-height: 14px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  color: rgba(255, 247, 230, 0.62);
}

.ad.is-back .ad__sub {
  color: #ff9ebb;
}

.ad__btn {
  height: 28px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff7e6;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.ad__btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.ad__btn:focus-visible {
  outline: 2px solid #6ec8ff;
  outline-offset: 2px;
}

.ad.is-demo .ad__bit {
  animation: ad-pop 2s ease-in-out infinite;
}

.ad.is-demo .ad__bit:nth-child(1) {
  animation-delay: 0ms;
  --x: -46px;
  --r: 180deg;
}

.ad.is-demo .ad__bit:nth-child(2) {
  animation-delay: 240ms;
  --x: -26px;
  --r: -150deg;
}

.ad.is-demo .ad__bit:nth-child(3) {
  animation-delay: 480ms;
  --x: -8px;
  --r: 210deg;
}

.ad.is-demo .ad__bit:nth-child(4) {
  animation-delay: 720ms;
  --x: 10px;
  --r: -190deg;
}

.ad.is-demo .ad__bit:nth-child(5) {
  animation-delay: 960ms;
  --x: 28px;
  --r: 160deg;
}

.ad.is-demo .ad__bit:nth-child(6) {
  animation-delay: 1200ms;
  --x: 48px;
  --r: -220deg;
}

@keyframes ad-pop {
  0% {
    transform: translate(var(--x, 0), 0) rotate(0deg) scale(0.6);
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--x, 0), -58px) rotate(var(--r, 180deg)) scale(1);
    opacity: 0;
  }
}
.ad.is-demo .ad__icon {
  animation: ad-beat 2s ease-in-out infinite;
}

@keyframes ad-beat {
  0%, 100% {
    transform: rotate(-6deg) scale(1);
  }
  50% {
    transform: rotate(6deg) scale(1.06);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ad.is-demo .ad__bit,
  .ad.is-demo .ad__icon {
    animation: none !important;
  }
}
