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

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

.clap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 2.6vw, 10px);
  border: 0;
  border-radius: 999px;
  padding: clamp(10px, 3.6vw, 14px) clamp(18px, 5.4vw, 22px);
  font-weight: 700;
  font-size: clamp(15px, 4.2vw, 18px);
  line-height: 1;
  font-family: inherit;
  color: #17141a;
  background: rgba(23, 20, 26, 0.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.clap__icon {
  font-size: clamp(20px, 5.6vw, 24px);
  display: inline-block;
  transform: scale(1) rotate(0deg);
}
.clap__plus {
  position: absolute;
  top: -2px;
  left: 34px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  color: #17141a;
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
}
.clap__count {
  font-variant-numeric: tabular-nums;
}
.clap__fx {
  position: absolute;
  top: 50%;
  left: 0;
  pointer-events: none;
}
.clap__spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: #17141a;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.clap.is-clap .clap__icon {
  animation: clap-bounce 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
.clap.is-clap .clap__plus {
  animation: clap-plus 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
.clap.is-demo .clap__icon {
  animation: clap-bounce-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
.clap.is-demo .clap__plus {
  animation: clap-plus-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes clap-bounce {
  0% {
    transform: scale(1) rotate(0deg);
  }
  40% {
    transform: scale(1.3) rotate(-12deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
@keyframes clap-plus {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px);
  }
}
@keyframes clap-bounce-loop {
  0%, 60% {
    transform: scale(1) rotate(0deg);
  }
  75% {
    transform: scale(1.3) rotate(-12deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}
@keyframes clap-plus-loop {
  0%, 60% {
    opacity: 0;
    transform: translateY(0);
  }
  70% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .clap.is-clap .clap__icon,
  .clap.is-clap .clap__plus,
  .clap.is-demo .clap__icon,
  .clap.is-demo .clap__plus {
    animation: none !important;
    opacity: 0;
    transform: none;
  }
  .clap__spark {
    display: none;
  }
}
