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

@property --a {
  syntax: "<integer>";
  inherits: true;
  initial-value: 100;
}
.al {
  box-sizing: border-box;
  width: 288px;
  max-width: 100%;
  padding: 12px;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: inherit;
}

.al * {
  box-sizing: border-box;
}

.al__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
}

.al__cap {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(23, 20, 26, 0.62);
}

.al__val {
  counter-set: ca calc(var(--a));
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.al__val::after {
  content: counter(ca) "%";
}

.al__track {
  position: relative;
  width: 264px;
  max-width: 100%;
  height: 20px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
  background-color: #ffffff;
  background-image: linear-gradient(to right, rgba(47, 109, 246, 0), #2f6df6), repeating-conic-gradient(#d8d4cc 0 25%, #ffffff 0 50%);
  background-size: auto, 12px 12px;
}

.al__track:focus-visible {
  outline: 3px solid #2f6df6;
  outline-offset: 3px;
}

.al__knob {
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #17141a;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: translateX(calc(var(--a) * 2.64px)) translate(-50%, -50%);
}

.al__note {
  margin: 8px 0 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(23, 20, 26, 0.62);
}

.al__preview {
  position: relative;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  background-image: repeating-conic-gradient(#d8d4cc 0 25%, #ffffff 0 50%);
  background-size: 12px 12px;
}

.al__fill {
  position: absolute;
  inset: 0;
  background: #2f6df6;
  opacity: calc(var(--a) * 1%);
}

.al.is-demo {
  animation-name: alSlide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes alSlide {
  0% {
    --a: 100;
  }
  45% {
    --a: 24;
  }
  90%, 100% {
    --a: 100;
  }
}
@media (prefers-reduced-motion: reduce) {
  .al.is-demo {
    animation: none !important;
  }
}
