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

.tm {
  width: min(100%, 300px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tm__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: rgba(23, 20, 26, 0.06);
  border: 1px solid rgba(23, 20, 26, 0.18);
  border-radius: 12px;
  padding: 8px 12px;
}

.tm__row--shake {
  animation: tmShake 600ms cubic-bezier(0.2, 0.8, 0.2, 1) 1;
}

.tm__input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: #17141a;
  font-size: 12px;
  outline: none;
}

.tm__input::placeholder {
  color: rgba(23, 20, 26, 0.55);
}

.tm__add {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: #17141a;
  color: #ffd23f;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 140ms ease-out;
}

.tm__add:active {
  transform: scale(0.88);
}

.tm__add:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.tm__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 4px 0 12px;
  background: #17141a;
  color: #ffd23f;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transform: scale(1);
  opacity: 1;
  transition: transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1), opacity 220ms ease-out;
}

.tm__chip--enter {
  transform: scale(0.6);
  opacity: 0;
}

.tm__chipX {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 210, 63, 0.28);
  color: #ffd23f;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.tm__chipX:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.tm__meta {
  margin: 0;
  font-size: 11px;
  color: rgba(23, 20, 26, 0.72);
}

.tm__meta b {
  color: #17141a;
  font-weight: 700;
}

.tm__warn {
  color: #c2361a;
  font-weight: 700;
}

.tm__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  margin: -1px;
  padding: 0;
  border: 0;
}

@keyframes tmShake {
  0% {
    transform: translateX(0);
  }
  8% {
    transform: translateX(-8px);
  }
  18% {
    transform: translateX(7px);
  }
  30% {
    transform: translateX(-5px);
  }
  44% {
    transform: translateX(4px);
  }
  58% {
    transform: translateX(-3px);
  }
  72% {
    transform: translateX(2px);
  }
  86% {
    transform: translateX(-1px);
  }
  100% {
    transform: translateX(0);
  }
}
@media (max-width: 340px) {
  .tm {
    width: 100%;
  }
  .tm__row {
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tm__row--shake {
    animation: none;
  }
  .tm__chip {
    transition: none;
  }
  .tm__add {
    transition: none;
  }
}
