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

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

.btn {
  position: relative;
  border: 0;
  border-radius: 12px;
  padding: 18px 44px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  font-family: inherit;
  color: #17141a;
  background: #fff7e6;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 220ms ease-out, color 220ms ease-out;
}
.btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.48), 0 0 0 0 rgba(47, 109, 246, 0.28);
  opacity: 0;
  pointer-events: none;
}

@media (hover: none) and (pointer: coarse) {
  .btn:active {
    background: #17141a;
    color: #fff7e6;
  }
  .btn:active::after {
    animation: ripple-wave 600ms ease-out;
  }
}
.btn.is-demo {
  animation: touch-active-loop 2s ease-out infinite;
}

.btn.is-demo::after {
  animation: ripple-loop 2s ease-out infinite;
}

@keyframes touch-active-loop {
  0%, 20% {
    background: #fff7e6;
    color: #17141a;
  }
  50%, 75% {
    background: #17141a;
    color: #fff7e6;
  }
  100% {
    background: #fff7e6;
    color: #17141a;
  }
}
@keyframes ripple-wave {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.48), 0 0 0 0 rgba(47, 109, 246, 0.28);
    opacity: 1;
  }
  38% {
    box-shadow: 0 0 0 10px rgba(47, 109, 246, 0.2), 0 0 0 4px rgba(47, 109, 246, 0.26);
    opacity: 0.74;
  }
  66% {
    box-shadow: 0 0 0 17px rgba(47, 109, 246, 0.09), 0 0 0 11px rgba(47, 109, 246, 0.15);
    opacity: 0.36;
  }
  100% {
    box-shadow: 0 0 0 24px rgba(47, 109, 246, 0), 0 0 0 20px rgba(47, 109, 246, 0);
    opacity: 0;
  }
}
@keyframes ripple-loop {
  0%, 20% {
    box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.48), 0 0 0 0 rgba(47, 109, 246, 0.28);
    opacity: 1;
  }
  38% {
    box-shadow: 0 0 0 10px rgba(47, 109, 246, 0.2), 0 0 0 4px rgba(47, 109, 246, 0.26);
    opacity: 0.74;
  }
  55% {
    box-shadow: 0 0 0 17px rgba(47, 109, 246, 0.09), 0 0 0 11px rgba(47, 109, 246, 0.15);
    opacity: 0.36;
  }
  75%, 100% {
    box-shadow: 0 0 0 24px rgba(47, 109, 246, 0), 0 0 0 20px rgba(47, 109, 246, 0);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn::after {
    animation: none !important;
    opacity: 0;
  }
  .btn.is-demo {
    animation: none;
  }
}
