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);
}

.btn {
  position: relative;
  border: 0;
  border-radius: 999px;
  padding: 18px 40px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  font-family: inherit;
  color: #fff7e6;
  background: #0a4fe8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter 220ms;
}
.btn:hover {
  filter: brightness(1.06);
}
.btn:active {
  filter: brightness(0.96);
}
.btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.55), 0 0 0 0 rgba(47, 109, 246, 0.32);
  opacity: 0;
  pointer-events: none;
}
.btn.is-ringing::after {
  animation: ring 600ms ease-out forwards;
}
.btn.is-demo::after {
  animation: ring-loop 2s linear infinite;
}

@keyframes ring {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.68), 0 0 0 0 rgba(47, 109, 246, 0.44);
    opacity: 1;
  }
  30% {
    box-shadow: 0 0 0 8px rgba(47, 109, 246, 0.4), 0 0 0 3px rgba(47, 109, 246, 0.44);
    opacity: 1;
  }
  62% {
    box-shadow: 0 0 0 14px rgba(47, 109, 246, 0.18), 0 0 0 9px rgba(47, 109, 246, 0.24);
    opacity: 0.72;
  }
  86% {
    box-shadow: 0 0 0 17px rgba(47, 109, 246, 0.04), 0 0 0 12px rgba(47, 109, 246, 0.06);
    opacity: 0.16;
  }
  100% {
    box-shadow: 0 0 0 17px rgba(47, 109, 246, 0), 0 0 0 12px rgba(47, 109, 246, 0);
    opacity: 0;
  }
}
@keyframes ring-loop {
  0%, 8% {
    box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.68), 0 0 0 0 rgba(47, 109, 246, 0.44);
    opacity: 1;
  }
  24% {
    box-shadow: 0 0 0 8px rgba(47, 109, 246, 0.4), 0 0 0 3px rgba(47, 109, 246, 0.44);
    opacity: 1;
  }
  40% {
    box-shadow: 0 0 0 14px rgba(47, 109, 246, 0.18), 0 0 0 9px rgba(47, 109, 246, 0.24);
    opacity: 0.72;
  }
  52% {
    box-shadow: 0 0 0 17px rgba(47, 109, 246, 0.04), 0 0 0 12px rgba(47, 109, 246, 0.06);
    opacity: 0.16;
  }
  62%, 100% {
    box-shadow: 0 0 0 17px rgba(47, 109, 246, 0), 0 0 0 12px rgba(47, 109, 246, 0);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn::after {
    animation: none !important;
    opacity: 0;
  }
  .btn:active {
    filter: brightness(0.88);
  }
}
