@property --n {
  syntax: "<integer>";
  inherits: false;
  initial-value: 0;
}
html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ff4d1f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.sl {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 164px;
  padding: 0 8px;
}

.sl:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 3px;
  border-radius: 12px;
}

.sl__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.sl__speed {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  color: #17141a;
  --n: 0;
}

.sl__speed i {
  font-weight: 600;
  font-size: 12px;
  font-style: normal;
  opacity: 0.68;
}

.sl__n {
  counter-reset: sln var(--n);
}

.sl__n::before {
  content: counter(sln);
}

.sl__label {
  font-weight: 600;
  font-size: 11px;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.74);
}

.sl__track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.16);
  overflow: hidden;
}

.sl__fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: 999px;
  background: #17141a;
}

.sl__bar {
  display: flex;
  justify-content: flex-end;
}

.sl__meta {
  font-weight: 500;
  font-size: 10px;
  color: rgba(23, 20, 26, 0.6);
}

@keyframes slCount {
  0% {
    --n: 0;
  }
  8% {
    --n: 210;
  }
  20% {
    --n: 480;
  }
  32% {
    --n: 360;
  }
  44% {
    --n: 610;
  }
  56% {
    --n: 470;
  }
  68% {
    --n: 540;
  }
  84% {
    --n: 300;
  }
  90% {
    --n: 300;
  }
  92% {
    --n: 0;
  }
  100% {
    --n: 0;
  }
}
@keyframes slFill {
  0% {
    transform: scaleX(0);
  }
  70% {
    transform: scaleX(1);
  }
  90% {
    transform: scaleX(1);
  }
  92% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(0);
  }
}
@keyframes slFade {
  0% {
    opacity: 1;
  }
  84% {
    opacity: 1;
  }
  90% {
    opacity: 0;
  }
  94% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.is-demo .sl__speed {
  animation-name: slCount;
  animation-duration: 2s;
  animation-timing-function: 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);
  animation-iteration-count: infinite;
}

.is-demo .sl__fill {
  animation-name: slFill;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

.sl.is-demo {
  animation-name: slFade;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@media (max-width: 340px) {
  .sl__speed {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .sl__speed, .is-demo .sl__fill, .is-demo.sl {
    animation: none !important;
  }
  .is-demo .sl__speed {
    --n: 480 !important;
  }
  .is-demo .sl__fill {
    transform: scaleX(0.62) !important;
  }
}
