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

.tabbar {
  position: relative;
  display: flex;
  width: min(92vw, 320px);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  box-sizing: border-box;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px 4px;
  color: #ffffff;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.tab__ic {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  transform: scale(1);
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tab__label {
  font-weight: 500;
  font-size: 10px;
  line-height: 1;
  font-family: inherit;
  opacity: 0.55;
  transform: translateY(0);
  transition: opacity 220ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tab.is-active {
  color: #fff7e6;
}
.tab.is-active .tab__ic {
  opacity: 1;
  transform: scale(1.15);
}
.tab.is-active .tab__label {
  opacity: 1;
  transform: translateY(-2px);
}

.indicator {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: calc(25% - 4px);
  height: 3px;
  border-radius: 4px;
  background: #fff7e6;
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stage.is-demo .indicator {
  animation: indicator-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.stage.is-demo .tab:nth-child(1) .tab__ic {
  animation: tab-ic-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 0ms;
}

.stage.is-demo .tab:nth-child(2) .tab__ic {
  animation: tab-ic-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 500ms;
}

.stage.is-demo .tab:nth-child(3) .tab__ic {
  animation: tab-ic-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 1000ms;
}

.stage.is-demo .tab:nth-child(4) .tab__ic {
  animation: tab-ic-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 1500ms;
}

.stage.is-demo .tab:nth-child(1) .tab__label {
  animation: tab-label-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 0ms;
}

.stage.is-demo .tab:nth-child(2) .tab__label {
  animation: tab-label-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 500ms;
}

.stage.is-demo .tab:nth-child(3) .tab__label {
  animation: tab-label-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 1000ms;
}

.stage.is-demo .tab:nth-child(4) .tab__label {
  animation: tab-label-loop 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  animation-delay: 1500ms;
}

@keyframes indicator-loop {
  0%, 20% {
    transform: translateX(0);
  }
  25%, 45% {
    transform: translateX(100%);
  }
  50%, 70% {
    transform: translateX(200%);
  }
  75%, 95% {
    transform: translateX(300%);
  }
  100% {
    transform: translateX(0);
  }
}
@keyframes tab-ic-loop {
  0%, 20% {
    opacity: 1;
    transform: scale(1.15);
  }
  25%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
}
@keyframes tab-label-loop {
  0%, 20% {
    opacity: 1;
    transform: translateY(-2px);
  }
  25%, 100% {
    opacity: 0.55;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stage.is-demo .indicator,
  .stage.is-demo .tab .tab__ic,
  .stage.is-demo .tab .tab__label {
    animation: none;
  }
  .indicator, .tab__ic, .tab__label {
    transition-duration: 1ms;
  }
}
