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 {
  box-sizing: border-box;
  position: relative;
  width: 112px;
  height: 112px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.btn__heart {
  width: 44px;
  height: 44px;
  color: #2f6df6;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #2f6df6;
  opacity: 0;
  transform: scale(1);
}

.btn:active .btn__heart {
  animation: heart-pop 300ms cubic-bezier(0.2, 1.4, 0.4, 1) 1;
}

.btn:active::after {
  animation: ring 300ms ease-out 1;
}

.btn:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 4px;
}

.stage.is-demo .btn__heart {
  animation: heart-pop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

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

@keyframes ring {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  34% {
    transform: scale(1.8);
    opacity: 0;
  }
  50% {
    transform: scale(1);
    opacity: 0.9;
  }
  84% {
    transform: scale(1.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
@keyframes heart-pop {
  0%, 50% {
    transform: scale(1);
  }
  8%, 58% {
    transform: scale(1.14);
  }
  16%, 66% {
    transform: scale(0.96);
  }
  22%, 72% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .btn__heart, .stage.is-demo .btn::after {
    animation: none;
  }
  .stage.is-demo .btn::after {
    opacity: 0;
  }
}
