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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.iv {
  border: 0;
  margin: 0;
  padding: 0;
}

.iv__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.iv__track {
  position: relative;
  display: flex;
  padding: 4px;
  background: rgba(23, 20, 26, 0.1);
  border-radius: 12px;
}

.iv__tab {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: rgba(23, 20, 26, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.iv__pill {
  position: absolute;
  top: 4px;
  left: 4px;
  bottom: 4px;
  width: 48px;
  border-radius: 8px;
  background: #fff7e6;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: translateX(0);
  transform-origin: center;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

#iv1-2:checked ~ .iv__track .iv__pill {
  transform: translateX(100%);
}

#iv1-1:checked ~ .iv__track .iv__tab:nth-child(2) {
  color: #17141a;
}

#iv1-2:checked ~ .iv__track .iv__tab:nth-child(3) {
  color: #17141a;
}

.iv.is-demo .iv__pill {
  animation: iv-loop-jelly 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}

@keyframes iv-loop {
  0%, 20% {
    transform: translateX(0);
  }
  50%, 70% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes iv-loop-jelly {
  0%, 20% {
    transform: translateX(0%) scaleX(1);
  }
  32% {
    transform: translateX(58%) scaleX(1.25);
  }
  44% {
    transform: translateX(104%) scaleX(1.05);
  }
  50%, 70% {
    transform: translateX(100%) scaleX(1);
  }
  82% {
    transform: translateX(42%) scaleX(1.25);
  }
  92% {
    transform: translateX(-4%) scaleX(1.05);
  }
  100% {
    transform: translateX(0%) scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .iv__pill {
    transition: none;
  }
  .iv.is-demo .iv__pill {
    animation: none !important;
  }
}
