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

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

.swap {
  margin: 0;
  font-weight: 700;
  font-size: clamp(17px, 4.8vw, 27px);
  line-height: 1.5;
  font-family: inherit;
  color: #fff7e6;
}
.swap__slot {
  position: relative;
  display: inline-flex;
  vertical-align: bottom;
}
.swap__word {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  border-right: 0.1em solid #2f6df6;
  color: #2f6df6;
}
.swap__word--1 {
  animation: w1 2s linear infinite;
}
.swap__word--2 {
  position: absolute;
  left: 0;
  top: 0;
  animation: w2 2s linear infinite;
}
.swap__word--3 {
  position: absolute;
  left: 0;
  top: 0;
  animation: w3 2s linear infinite;
}

@keyframes w1 {
  0% {
    width: 0;
    animation-timing-function: steps(4, end);
  }
  8% {
    width: var(--full, 4ch);
  }
  30% {
    width: var(--full, 4ch);
    animation-timing-function: steps(4, end);
  }
  38%, 100% {
    width: 0;
  }
}
@keyframes w2 {
  0%, 40% {
    width: 0;
    animation-timing-function: steps(3, end);
  }
  46% {
    width: var(--full, 4ch);
  }
  68% {
    width: var(--full, 4ch);
    animation-timing-function: steps(3, end);
  }
  74%, 100% {
    width: 0;
  }
}
@keyframes w3 {
  0%, 74% {
    width: 0;
    animation-timing-function: steps(3, end);
  }
  80% {
    width: var(--full, 4ch);
  }
  96% {
    width: var(--full, 4ch);
    animation-timing-function: steps(3, end);
  }
  100% {
    width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .swap__word {
    animation: none;
  }
  .swap__word--1 {
    width: var(--full, 4ch);
  }
  .swap__word--2,
  .swap__word--3 {
    width: 0;
    opacity: 0;
  }
}
