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

.cb {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.cb__tab {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: none;
  color: #fff7e6;
  font-weight: 600;
  font-size: clamp(11px, 3vw, 13px);
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cb__tab[aria-selected=true] {
  color: #fff7e6;
  background: rgba(255, 255, 255, 0.1);
}

.cb__badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: #0a4fe8;
  color: #fff7e6;
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 11px);
  line-height: 1;
  font-family: inherit;
  transform: scale(1);
  transition: transform 140ms 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);
}

.cb__badge::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: #0a4fe8;
  opacity: 0;
  pointer-events: none;
}

.cb__tab[aria-selected=true] .cb__badge::before {
  animation: cb-ring 140ms ease-out;
}

@keyframes cb-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}
.cb__tab[aria-selected=true] .cb__badge {
  animation: cb-pop 140ms 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 cb-pop {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}
.cb.is-demo .cb__tab:nth-child(1) .cb__badge {
  animation: cb-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;
}

.cb.is-demo .cb__tab:nth-child(2) .cb__badge {
  animation: cb-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: -1.3333333333s;
}

.cb.is-demo .cb__tab:nth-child(3) .cb__badge {
  animation: cb-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.6666666667s;
}

.cb.is-demo .cb__tab:nth-child(1) .cb__badge::before {
  animation: cb-ring 2s ease-out infinite;
}

.cb.is-demo .cb__tab:nth-child(2) .cb__badge::before {
  animation: cb-ring 2s ease-out infinite;
  animation-delay: -1.3333333333s;
}

.cb.is-demo .cb__tab:nth-child(3) .cb__badge::before {
  animation: cb-ring 2s ease-out infinite;
  animation-delay: -0.6666666667s;
}

@keyframes cb-loop {
  0%, 8%, 100% {
    transform: scale(1);
  }
  4% {
    transform: scale(1.35);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cb__badge {
    transition: none;
  }
  .cb__tab[aria-selected=true] .cb__badge {
    animation: none !important;
  }
  .cb.is-demo .cb__tab .cb__badge {
    animation: none !important;
  }
  .cb__badge::before, .cb__tab[aria-selected=true] .cb__badge::before,
  .cb.is-demo .cb__tab .cb__badge::before {
    animation: none !important;
    opacity: 0;
  }
}
