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

.bs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.bs__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(11px, 3vw, 12px);
  color: #fff7e6;
}

.bs__ico {
  width: 16px;
  height: 16px;
  color: #ffd23f;
}

.bs__bars {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
  gap: 4px;
  align-items: end;
  width: 100%;
  height: 104px;
}

.bs__bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(180deg, #4cd4a6 0%, #ffd23f 60%, #cdb599 100%);
  transform-origin: bottom center;
  transform: scaleY(var(--h, 0.08));
  transition: transform 220ms ease-out;
}

.bs__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.bs__play {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #ffd23f;
  color: #17141a;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: clamp(11px, 3vw, 12px);
  line-height: 1;
}

.bs__ico--pause {
  display: none;
}

.bs__play[aria-pressed=true] .bs__ico--play {
  display: none;
}

.bs__play[aria-pressed=true] .bs__ico--pause {
  display: inline-block;
}

.bs__play .bs__ico {
  color: #17141a;
}

.bs__level {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bs__levelLabel {
  font-weight: 700;
  font-size: clamp(10px, 2.6vw, 11px);
  color: rgba(255, 247, 230, 0.82);
}

.bs__levelBox {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 20px;
  border-radius: 4px;
  padding: 0 4px;
  background: rgba(255, 247, 230, 0.16);
  color: #fff7e6;
  font-weight: 800;
  font-size: clamp(11px, 3vw, 12px);
  line-height: 1;
}

.bs__loop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
}

.bs__loop i {
  grid-area: 1/1;
  font-style: normal;
  visibility: hidden;
}

.bs.is-demo .bs__bar {
  animation-name: bsWave;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
  animation-delay: calc(var(--i) * -56ms);
  transition: none;
}

@keyframes bsWave {
  0% {
    transform: scaleY(0.1);
  }
  14% {
    transform: scaleY(0.92);
  }
  28% {
    transform: scaleY(0.3);
  }
  42% {
    transform: scaleY(0.68);
  }
  56% {
    transform: scaleY(0.18);
  }
  70% {
    transform: scaleY(0.8);
  }
  84% {
    transform: scaleY(0.24);
  }
  100% {
    transform: scaleY(0.1);
  }
}
.bs.is-demo .bs__levelText {
  color: transparent;
}

.bs.is-demo .bs__loop {
  visibility: visible;
}

.bs.is-demo .bs__loop i {
  animation-name: bsBandName;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.bs.is-demo .bs__loop i:nth-child(1) {
  animation-delay: 0ms;
}

.bs.is-demo .bs__loop i:nth-child(2) {
  animation-delay: 666ms;
}

.bs.is-demo .bs__loop i:nth-child(3) {
  animation-delay: 1332ms;
}

@keyframes bsBandName {
  0%, 33% {
    visibility: visible;
  }
  34%, 100% {
    visibility: hidden;
  }
}
@media (max-width: 340px) {
  .bs {
    gap: 8px;
  }
  .bs__bars {
    height: 76px;
    gap: 0;
  }
  .bs__bar {
    border-radius: 0;
  }
  .bs__foot {
    gap: 8px;
  }
  .bs__play {
    padding: 4px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bs.is-demo .bs__bar,
  .bs.is-demo .bs__loop i {
    animation: none !important;
  }
  .bs.is-demo .bs__bar {
    transform: scaleY(calc(0.25 + var(--i) * 0.045)) !important;
  }
  .bs.is-demo .bs__levelText {
    color: #fff7e6 !important;
  }
  .bs.is-demo .bs__loop {
    visibility: hidden !important;
  }
  .bs__bar {
    transition: none !important;
  }
}
