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

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

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 260px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #17141a;
  transform-origin: center;
}

.chip:nth-child(2) {
  background: rgb(68.4117647059%, 92.4117647059%, 84.2941176471%);
}

.chip:nth-child(3) {
  background: rgb(87.6470588235%, 83.2352941176%, 100%);
}

.chip__remove {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.08);
  color: #17141a;
  padding: 0;
  cursor: pointer;
}

.chip__remove:hover {
  background: rgba(23, 20, 26, 0.16);
}

.chip--gone {
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: scale(0.6);
  opacity: 0;
}

.stage.is-demo .chip--demo {
  animation: chip-cycle 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes chip-cycle {
  0%, 38% {
    transform: scale(1);
    opacity: 1;
  }
  55% {
    transform: scale(0.55);
    opacity: 0;
  }
  78% {
    transform: scale(0.55);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.chip--demo {
  position: relative;
}

.chip--demo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid #ff9ebb;
  opacity: 0;
  pointer-events: none;
}

.stage.is-demo .chip--demo::after {
  animation: chip-ripple 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes chip-ripple {
  0%, 38% {
    opacity: 0;
    transform: scale(1);
  }
  44% {
    opacity: 0.55;
    transform: scale(1.35);
  }
  56%, 100% {
    opacity: 0;
    transform: scale(1.9);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .chip--demo {
    animation: none;
  }
  .stage.is-demo .chip--demo::after {
    animation: none;
    opacity: 0;
  }
  .chip--gone {
    transition: none;
  }
}
