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

@property --percent {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
.track {
  --percent: 0;
  position: relative;
  width: clamp(220px, 62vw, 280px);
  height: 20px;
  margin-top: 26px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.1);
  container-type: inline-size;
}

.bar {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #2f6df6;
  transform: scaleX(calc(var(--percent) / 100));
  transform-origin: left center;
}

.bubble {
  position: absolute;
  top: -30px;
  left: 0;
  transform: translateX(calc(var(--percent) * 1cqw - 50%));
  background: #17141a;
  color: #fff;
  border-radius: 12px;
  padding: 3px 9px;
  font: 700 clamp(11px, 3vw, 13px)/1.6 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

.bubble__num {
  counter-reset: p var(--percent);
}
.bubble__num::before {
  content: counter(p) "%";
}

.track.is-demo {
  animation: fill 2s ease-out infinite;
}

@keyframes fill {
  0% {
    --percent: 0;
  }
  60% {
    --percent: 76;
  }
  100% {
    --percent: 76;
  }
}
.cap {
  margin: 34px 0 0;
  color: #17141a;
  font: 600 clamp(12px, 3.2vw, 14px)/1 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .track.is-demo {
    animation: none;
    --percent: 76;
  }
}
