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

.bw {
  --h: clamp(148px, 58vh, 176px);
  --fw: min(272px, 82vw);
  width: min(360px, 92vw);
}

.bw__scroller {
  height: var(--h);
  overflow-y: auto;
  scrollbar-width: none;
}
.bw__scroller::-webkit-scrollbar {
  display: none;
}

.bw__pad {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: calc(var(--h) * 0.95) 0 calc(var(--h) * 0.6);
}

.bw__frame {
  view-timeline-name: --bw-view;
  view-timeline-axis: block;
  position: relative;
  width: var(--fw);
  height: 104px;
  overflow: hidden;
  border-radius: 16px;
}

.bw__layer {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
}

.bw__layer--after {
  background: #eef3ff;
}

.bw__layer--after .bw__bar--a {
  background: #2f6df6;
}

.bw__layer--after .bw__bar--b {
  background: #4cd4a6;
}

.bw__layer--after .bw__bar--c {
  background: #b9a0ff;
}

.bw__layer--after .bw__dot {
  background: #ff4d1f;
}

.bw__layer--before {
  background: #e7e5ea;
  clip-path: inset(0 0 0 0);
  animation-name: bw-cut;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: --bw-view;
}

.bw__layer--before .bw__bar--a,
.bw__layer--before .bw__bar--b,
.bw__layer--before .bw__bar--c {
  background: #b6b2bd;
}

.bw__layer--before .bw__dot {
  background: #8d8895;
}

@keyframes bw-cut {
  from {
    clip-path: inset(0 0 0 0);
  }
  to {
    clip-path: inset(0 100% 0 0);
  }
}
.bw__bar {
  height: 12px;
  border-radius: 999px;
}

.bw__bar--a {
  width: 64%;
}

.bw__bar--b {
  width: 88%;
}

.bw__bar--c {
  width: 46%;
}

.bw__dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.bw__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 4px;
  background: #17141a;
  color: #17141a;
  animation-name: bw-handle;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-timeline: --bw-view;
}
.bw__handle svg {
  padding: 4px;
  border-radius: 50%;
  background: #17141a;
  color: #fff7e6;
}

@keyframes bw-handle {
  from {
    transform: translateX(calc(var(--fw) - 4px));
  }
  to {
    transform: translateX(0);
  }
}
.bw__tags {
  display: flex;
  gap: 8px;
  margin: 0;
}

.bw__tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: #2f6df6;
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
}

.bw__tag--old {
  background: #b6b2bd;
}

.bw.is-demo .bw__pad {
  padding-top: calc(var(--h) * 0.1);
}

.bw.is-demo .bw__layer--before,
.bw.is-demo .bw__handle {
  animation-duration: 1s;
  animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  animation-direction: alternate;
  animation-iteration-count: infinite;
  animation-timeline: auto;
}

@media (prefers-reduced-motion: reduce) {
  .bw__layer--before {
    animation: none !important;
    clip-path: inset(0 50% 0 0);
  }
  .bw__handle {
    animation: none !important;
    transform: translateX(calc(var(--fw) * 0.5));
  }
}
