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

.cu {
  --cu-flow: -160px;
  box-sizing: border-box;
  width: min(400px, 100%);
  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);
}

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

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

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

.cu__view {
  box-sizing: border-box;
  height: 170px;
  overflow-y: auto;
  margin: 0 12px;
  padding: 0 8px;
  outline: none;
  background: rgba(23, 20, 26, 0.05);
  border: 1px solid rgba(23, 20, 26, 0.14);
  border-radius: 8px;
}

.cu__track {
  padding-top: 8px;
  padding-bottom: 24px;
}

.cu__lead {
  margin: 0 0 148px;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  color: rgba(23, 20, 26, 0.72);
}

.cu__card {
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(23, 20, 26, 0.04);
  border: 1px solid rgba(23, 20, 26, 0.12);
  text-align: center;
}

.cu__cap {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.cu__num {
  position: relative;
  height: 40px;
  margin: 0;
  overflow: hidden;
}

.cu__numcur,
.cu__tape i {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  line-height: 40px;
  font-variant-numeric: tabular-nums;
}

.cu__numcur {
  position: absolute;
  inset: 0;
}

.cu__tape {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cu__tape i {
  display: flex;
  height: 40px;
  font-style: normal;
}

.cu.is-demo .cu__tape {
  display: block;
}

.cu.is-demo .cu__numcur {
  visibility: hidden;
}

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

.cu__barfill {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #2f6df6;
  transform: scaleX(0);
  transform-origin: left center;
}

.cu__done {
  justify-self: center;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ff4d1f;
  color: #17141a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 220ms ease-out, transform 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.cu__done.is-shown {
  opacity: 1;
  transform: none;
}

.cu__more {
  margin: 8px 0 0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.cu__foot {
  margin-top: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(23, 20, 26, 0.12);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(23, 20, 26, 0.72);
}

.cu.is-demo .cu__track {
  animation-name: cu-flow;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}
.cu.is-demo .cu__tape {
  animation-name: cu-tape;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}
.cu.is-demo .cu__barfill {
  animation-name: cu-bar;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}
.cu.is-demo .cu__done {
  animation-name: cu-done-show, cu-done-pop;
  animation-duration: 2s, 2s;
  animation-timing-function: steps(1, end), cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite, infinite;
}

@keyframes cu-flow {
  0%, 10% {
    transform: translateY(0);
  }
  24%, 100% {
    transform: translateY(var(--cu-flow, -160px));
  }
}
@keyframes cu-tape {
  0%, 18% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  66%, 100% {
    transform: translateY(-9920px);
  }
}
@keyframes cu-bar {
  0%, 18% {
    transform: scaleX(0);
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  66%, 100% {
    transform: scaleX(1);
  }
}
@keyframes cu-done-show {
  0%, 66% {
    opacity: 0;
  }
  67%, 100% {
    opacity: 1;
  }
}
@keyframes cu-done-pop {
  0%, 66% {
    transform: translateY(4px);
  }
  74%, 100% {
    transform: none;
  }
}
@media (max-width: 340px) {
  .cu {
    --cu-flow: -116px;
  }
  .cu__head {
    padding: 4px 8px;
  }
  .cu__view {
    height: 118px;
    margin: 0 8px;
  }
  .cu__lead {
    margin-bottom: 96px;
  }
  .cu__card {
    gap: 4px;
    padding: 8px 12px;
  }
  .cu__numcur, .cu__tape i {
    font-size: 26px;
  }
  .cu__foot {
    margin-top: 4px;
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cu__done {
    transition: none !important;
  }
  .cu.is-demo .cu__track,
  .cu.is-demo .cu__tape,
  .cu.is-demo .cu__barfill,
  .cu.is-demo .cu__done {
    animation: none !important;
  }
  .cu.is-demo .cu__tape {
    display: none !important;
  }
  .cu.is-demo .cu__numcur {
    visibility: visible !important;
  }
}
