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

.bt {
  width: min(300px, 86vw);
}

.bt__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bt__nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  background: rgba(23, 20, 26, 0.06);
  border-radius: 999px;
}

.bt__tab {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8px 4px;
  font-weight: 600;
  font-size: clamp(12px, 3.4vw, 14px);
  line-height: 1;
  font-family: inherit;
  color: #17141a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bt__text {
  display: inline-block;
  transform: scale(1);
}

.bt__indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 4px * 2) / 3);
  background: #0a4fe8;
  border-radius: 999px;
  transform: translateX(0);
  transition: transform 600ms linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1);
}

.bt__trail {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 4px * 2) / 3);
  background: #0a4fe8;
  border-radius: 999px;
  opacity: 0.32;
  filter: blur(1.5px);
  transform: translateX(0);
  transition: transform 1080ms ease-out;
}

#bt-1:checked ~ .bt__nav .bt__indicator {
  transform: translateX(0%);
}

#bt-2:checked ~ .bt__nav .bt__indicator {
  transform: translateX(100%);
}

#bt-3:checked ~ .bt__nav .bt__indicator {
  transform: translateX(200%);
}

#bt-1:checked ~ .bt__nav .bt__trail {
  transform: translateX(0%);
}

#bt-2:checked ~ .bt__nav .bt__trail {
  transform: translateX(100%);
}

#bt-3:checked ~ .bt__nav .bt__trail {
  transform: translateX(200%);
}

#bt-1:checked ~ .bt__nav label[for=bt-1],
#bt-2:checked ~ .bt__nav label[for=bt-2],
#bt-3:checked ~ .bt__nav label[for=bt-3] {
  color: #fff7e6;
}

#bt-1:checked ~ .bt__nav label[for=bt-1] .bt__text,
#bt-2:checked ~ .bt__nav label[for=bt-2] .bt__text,
#bt-3:checked ~ .bt__nav label[for=bt-3] .bt__text {
  animation: bt-pop 400ms linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1);
}

@keyframes bt-pop {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}
.bt.is-demo .bt__indicator {
  animation: bt-loop 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite;
}

.bt.is-demo .bt__trail {
  animation: bt-loop 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite;
  animation-delay: 0.12s;
}

.bt.is-demo .bt__nav label:nth-child(1) .bt__text {
  animation: bt-pop-1 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite, bt-ink-1 2s linear infinite;
}

.bt.is-demo .bt__nav label:nth-child(2) .bt__text {
  animation: bt-pop-2 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite, bt-ink-2 2s linear infinite;
}

.bt.is-demo .bt__nav label:nth-child(3) .bt__text {
  animation: bt-pop-3 2s linear(0, 0.051, 0.176, 0.341, 0.518, 0.685, 0.831, 0.947, 1.032, 1.087, 1.117, 1.126, 1.121, 1.105, 1.085, 1.062, 1.041, 1.022, 1.008, 0.997, 1) infinite, bt-ink-3 2s linear infinite;
}

@keyframes bt-ink-1 {
  0%, 15% {
    color: #fff7e6;
  }
  23%, 87% {
    color: #17141a;
  }
  95%, 100% {
    color: #fff7e6;
  }
}
@keyframes bt-ink-2 {
  0%, 25% {
    color: #17141a;
  }
  33%, 48% {
    color: #fff7e6;
  }
  56%, 100% {
    color: #17141a;
  }
}
@keyframes bt-ink-3 {
  0%, 58% {
    color: #17141a;
  }
  66%, 81% {
    color: #fff7e6;
  }
  89%, 100% {
    color: #17141a;
  }
}
@keyframes bt-loop {
  0%, 15% {
    transform: translateX(0%);
  }
  33%, 48% {
    transform: translateX(100%);
  }
  66%, 81% {
    transform: translateX(200%);
  }
  100% {
    transform: translateX(0%);
  }
}
@keyframes bt-pop-1 {
  0%, 100% {
    transform: scale(1.18);
  }
  5%, 96% {
    transform: scale(1);
  }
}
@keyframes bt-pop-2 {
  0%, 43%, 100% {
    transform: scale(1);
  }
  48% {
    transform: scale(1.18);
  }
  53% {
    transform: scale(1);
  }
}
@keyframes bt-pop-3 {
  0%, 76%, 100% {
    transform: scale(1);
  }
  81% {
    transform: scale(1.18);
  }
  86% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bt__indicator, .bt__text, .bt__trail {
    transition: none;
    animation: none !important;
  }
  .bt.is-demo .bt__indicator, .bt.is-demo .bt__text, .bt.is-demo .bt__trail {
    animation: none !important;
  }
  .bt__trail {
    opacity: 0;
  }
}
