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

.list {
  width: min(220px, 70vw);
  background: #fff7e6;
  border-radius: 16px;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  position: relative;
  min-height: 44px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  font-family: inherit;
  color: #17141a;
  background: #fff7e6;
  border-bottom: 1px solid rgba(23, 20, 26, 0.08);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: background 220ms ease-out;
  overflow: hidden;
}
.list li::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0 rgba(47, 109, 246, 0.4), inset 0 0 0 0 rgba(47, 109, 246, 0.22);
  opacity: 0;
  pointer-events: none;
}

.list li:last-child {
  border-bottom: 0;
}

.list li:active {
  background: rgba(47, 109, 246, 0.18);
  transition: background 0s;
}

.list li:active::after {
  animation: ripple-wave 600ms ease-out;
}

.list li.is-demo {
  animation: row-flash 2s ease-out infinite;
}

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

.list li:nth-child(2).is-demo,
.list li:nth-child(2).is-demo::after {
  animation-delay: 0.4s;
}

.list li:nth-child(3).is-demo,
.list li:nth-child(3).is-demo::after {
  animation-delay: 0.8s;
}

@keyframes row-flash {
  0%, 8% {
    background: rgba(47, 109, 246, 0.18);
  }
  35% {
    background: #fff7e6;
  }
  100% {
    background: #fff7e6;
  }
}
@keyframes ripple-wave {
  0% {
    box-shadow: inset 0 0 0 0 rgba(47, 109, 246, 0.4), inset 0 0 0 0 rgba(47, 109, 246, 0.22);
    opacity: 1;
  }
  38% {
    box-shadow: inset 0 0 0 8px rgba(47, 109, 246, 0.18), inset 0 0 0 3px rgba(47, 109, 246, 0.22);
    opacity: 0.7;
  }
  66% {
    box-shadow: inset 0 0 0 14px rgba(47, 109, 246, 0.08), inset 0 0 0 9px rgba(47, 109, 246, 0.12);
    opacity: 0.3;
  }
  100% {
    box-shadow: inset 0 0 0 20px rgba(47, 109, 246, 0), inset 0 0 0 16px rgba(47, 109, 246, 0);
    opacity: 0;
  }
}
@keyframes ripple-loop {
  0%, 8% {
    box-shadow: inset 0 0 0 0 rgba(47, 109, 246, 0.4), inset 0 0 0 0 rgba(47, 109, 246, 0.22);
    opacity: 1;
  }
  22% {
    box-shadow: inset 0 0 0 8px rgba(47, 109, 246, 0.18), inset 0 0 0 3px rgba(47, 109, 246, 0.22);
    opacity: 0.7;
  }
  35% {
    box-shadow: inset 0 0 0 14px rgba(47, 109, 246, 0.08), inset 0 0 0 9px rgba(47, 109, 246, 0.12);
    opacity: 0.3;
  }
  50%, 100% {
    box-shadow: inset 0 0 0 20px rgba(47, 109, 246, 0), inset 0 0 0 16px rgba(47, 109, 246, 0);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .list li {
    transition: none;
  }
  .list li::after {
    animation: none !important;
    opacity: 0;
  }
  .list li.is-demo {
    animation: none;
  }
}
