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

.tg {
  box-sizing: border-box;
  width: min(240px, 86vw);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.tg__row {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}

.tg__input {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(255, 247, 230, 0.35);
  background: rgba(255, 247, 230, 0.1);
  color: #17141a;
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
}

.tg__input::placeholder {
  color: rgba(23, 20, 26, 0.72);
}

.tg__add {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: #fff7e6;
  color: #17141a;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.tg__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tg__chip {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 247, 230, 0.16);
  border: 1px solid rgba(255, 247, 230, 0.3);
  color: #17141a;
  padding: 4px 4px 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  opacity: 1;
  transform: scale(1);
  transition: opacity 220ms cubic-bezier(0.2, 1.4, 0.4, 1), transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.tg__chip--out {
  opacity: 0;
  transform: scale(0.7);
}

.tg__remove {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.tg__remove:hover {
  background: rgba(255, 247, 230, 0.2);
}

.tg__chip--demo {
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px) scale(0.9);
}

.tg__chip--demo.is-demo {
  animation: tg-in 2.4s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes tg-in {
  0% {
    opacity: 0;
    transform: translateX(10px) scale(0.9);
  }
  35% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  80% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(10px) scale(0.9);
  }
}
@media (max-width: 340px) {
  .tg__chip {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tg__chip--demo.is-demo {
    animation: none !important;
    opacity: 0;
  }
  .tg__chip {
    transition: none;
  }
}
