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

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

.stage {
  padding: clamp(8px, 4vw, 24px);
}

.card {
  position: relative;
  width: min(180px, 60vw);
  border-radius: 16px;
  background: #fff7e6;
  border: 2px solid rgba(23, 20, 26, 0.12);
  padding: 22px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  font-family: inherit;
  color: #17141a;
  cursor: pointer;
  touch-action: none;
  transform: scale(1);
  box-shadow: none;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1) 600ms, box-shadow 220ms cubic-bezier(0.2, 1.4, 0.4, 1) 600ms, border-color 220ms cubic-bezier(0.2, 1.4, 0.4, 1) 600ms;
}
.card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.45), 0 0 0 0 rgba(47, 109, 246, 0.26);
  opacity: 0;
  pointer-events: none;
}

.card:active {
  transform: scale(1.06);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  border-color: #2f6df6;
}

.card:active::after {
  animation: ripple-wave 600ms cubic-bezier(0.2, 1.4, 0.4, 1) 600ms;
}

.card:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 3px;
}

.card.is-demo {
  animation: long-press-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

.card.is-demo::after {
  animation: ripple-loop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes long-press-loop {
  0%, 30% {
    transform: scale(1);
    box-shadow: none;
    border-color: rgba(23, 20, 26, 0.12);
  }
  70%, 85% {
    transform: scale(1.06);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
    border-color: #2f6df6;
  }
  100% {
    transform: scale(1);
    box-shadow: none;
    border-color: rgba(23, 20, 26, 0.12);
  }
}
@keyframes ripple-wave {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.45), 0 0 0 0 rgba(47, 109, 246, 0.26);
    opacity: 1;
  }
  38% {
    box-shadow: 0 0 0 10px rgba(47, 109, 246, 0.2), 0 0 0 4px rgba(47, 109, 246, 0.24);
    opacity: 0.72;
  }
  66% {
    box-shadow: 0 0 0 17px rgba(47, 109, 246, 0.09), 0 0 0 11px rgba(47, 109, 246, 0.14);
    opacity: 0.34;
  }
  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%, 30% {
    box-shadow: 0 0 0 0 rgba(47, 109, 246, 0.45), 0 0 0 0 rgba(47, 109, 246, 0.26);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 10px rgba(47, 109, 246, 0.2), 0 0 0 4px rgba(47, 109, 246, 0.24);
    opacity: 0.72;
  }
  67% {
    box-shadow: 0 0 0 17px rgba(47, 109, 246, 0.09), 0 0 0 11px rgba(47, 109, 246, 0.14);
    opacity: 0.34;
  }
  85%, 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) {
  .card {
    transition: none;
  }
  .card::after {
    animation: none !important;
    opacity: 0;
  }
  .card.is-demo {
    animation: none;
  }
}
