@property --vel {
  syntax: "<number>";
  inherits: true;
  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: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.vl {
  position: relative;
  box-sizing: border-box;
  width: min(312px, 92vw);
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

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

.vl__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.vl__attr {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}
.vl__attr code {
  font-family: "Consolas", "Menlo", monospace;
}

.vl__view {
  height: 150px;
  overflow-y: auto;
  padding: 0 12px;
  outline: none;
}

.vl__track {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 140px;
}

.vl__rule {
  display: grid;
  gap: 4px;
}
.vl__rule span {
  height: 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.12);
}
.vl__rule span:last-child {
  width: 64%;
}

.vl__line {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
}
.vl__line:nth-child(odd) {
  transform: skewY(clamp(-6deg, var(--vel, 0) * -7deg, 6deg)) translateY(calc(var(--vel, 0) * -4px));
}
.vl__line:nth-child(even) {
  transform: skewY(clamp(-6deg, var(--vel, 0) * 7deg, 6deg)) translateY(calc(var(--vel, 0) * 4px));
}

.vl__filler {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
  border-radius: 12px;
  background: rgba(23, 20, 26, 0.06);
  padding: 24px 0;
  text-align: center;
}

.vl__meter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(23, 20, 26, 0.12);
}

.vl__bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.12);
  overflow: hidden;
}

.vl__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2f6df6;
  transform-origin: left center;
  transform: scaleX(clamp(0, var(--vel, 0), 1));
}

.vl__num {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  min-width: 36px;
  text-align: right;
}

.vl.is-demo {
  animation-name: vl-vel;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.vl.is-demo .vl__track {
  animation-name: vl-flow;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes vl-vel {
  0%, 5% {
    --vel: 0;
  }
  18% {
    --vel: 1;
  }
  30%, 38% {
    --vel: 0.1;
  }
  55% {
    --vel: 0.9;
  }
  68%, 100% {
    --vel: 0;
  }
}
@keyframes vl-flow {
  0%, 5% {
    transform: translateY(0);
  }
  18%, 40% {
    transform: translateY(-60px);
  }
  62%, 100% {
    transform: translateY(-120px);
  }
}
@media (max-width: 340px) {
  .vl {
    width: 100%;
  }
  .vl__view {
    height: 104px;
  }
  .vl__line {
    font-size: 20px;
  }
  .vl__filler {
    padding: 16px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .vl.is-demo {
    animation: none !important;
  }
  .vl.is-demo .vl__track {
    animation: none !important;
  }
  .vl.is-demo .vl__line {
    transform: none !important;
  }
  .vl.is-demo .vl__fill {
    transform: none !important;
  }
}
