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

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(240px, 84vw);
  background: #fff7e6;
  border-radius: 12px;
  padding: 4px;
  --i: 0;
}
.tabs__item {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: clamp(9px, 3vw, 12px) 4px;
  font-weight: 700;
  font-size: clamp(12px, 3.4vw, 14px);
  line-height: 1;
  font-family: inherit;
  color: rgba(23, 20, 26, 0.72);
  cursor: pointer;
}
.tabs__item.is-active {
  color: #0a4fe8;
}
.tabs__indicator {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: calc((100% - 8px) / 3);
  height: 3px;
  border-radius: 999px;
  background: #2f6df6;
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tabs.is-demo .tabs__indicator {
  animation: tab-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes tab-loop {
  0%, 20% {
    transform: translateX(0%);
  }
  33%, 53% {
    transform: translateX(100%);
  }
  66%, 86% {
    transform: translateX(200%);
  }
  100% {
    transform: translateX(0%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tabs__indicator {
    transition: none;
  }
  .tabs.is-demo .tabs__indicator {
    animation: none !important;
  }
}
