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

::selection {
  background: #ff9ebb;
  color: #17141a;
}

.ts-card {
  position: relative;
  width: min(250px, 80vw);
  padding: 24px 20px;
}

.ts-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: #2b2733;
  text-align: center;
}

.ts-phrase {
  position: relative;
  display: inline-block;
  font-weight: 800;
}

.ts-phrase__bar {
  position: absolute;
  left: -2px;
  right: -2px;
  top: 4px;
  bottom: 2px;
  background: #4cd4a6;
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 0;
}

.ts-phrase__word {
  position: relative;
  z-index: 1;
}

.ts-badge {
  position: absolute;
  left: 50%;
  top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #17141a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  transform: translate(-50%, 4px);
  opacity: 0;
  transition: opacity 300ms ease-out, transform 300ms ease-out;
  pointer-events: none;
  white-space: nowrap;
}

.ts-badge svg {
  width: 12px;
  height: 12px;
}

.ts-badge.is-shown {
  opacity: 1;
  transform: translate(-50%, -4px);
}

.ts-card.is-demo .ts-phrase__bar {
  animation: ts-sweep 2s ease-out infinite;
}

.ts-card.is-demo .ts-badge {
  animation: ts-badge 2s ease-out infinite;
}

@keyframes ts-sweep {
  0%, 15% {
    transform: scaleX(0);
  }
  45%, 85% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}
@keyframes ts-badge {
  0%, 40% {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  55%, 82% {
    opacity: 1;
    transform: translate(-50%, -4px);
  }
  95%, 100% {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ts-phrase__bar, .ts-badge {
    animation: none !important;
    transition: none !important;
  }
}
