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

.chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: #0a4fe8;
  color: #fff7e6;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
  opacity: 1;
  transition: opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.chip:not(.is-active) {
  opacity: 0;
}

.clear-btn {
  display: block;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 20px;
  background: #17141a;
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}

.chips.is-demo .chip {
  animation-name: chip-cascade;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes chip-cascade {
  0%, 25% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  75%, 100% {
    opacity: 1;
  }
}
@media (max-width: 340px) {
  .chip {
    padding: 4px 8px;
  }
  .chips {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .chip {
    transition: none;
  }
  .chips.is-demo .chip {
    animation: none;
  }
}
