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

.bp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

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

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

.bp__field {
  position: relative;
  width: 172px;
  height: 132px;
  --rest: 52px;
  --fly: 84px;
}

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

.bp__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: rgba(255, 247, 230, 0.38);
  transform: rotate(var(--a)) translateY(calc(-1 * var(--rest))) scale(1);
}

.bp__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #211d26;
  border: 4px solid #ffd23f;
}

.bp__coreIco {
  width: 20px;
  height: 20px;
  color: #ffd23f;
}

.bp__ring--hit .bp__dot {
  animation: bpBurst cubic-bezier(0.2, 1.4, 0.4, 1) 480ms 1 both;
}

.bp__core--hit {
  animation: bpThump cubic-bezier(0.2, 1.4, 0.4, 1) 480ms 1 both;
}

@keyframes bpBurst {
  0% {
    transform: rotate(var(--a)) translateY(calc(-1 * var(--rest))) scale(1);
    opacity: 1;
  }
  100% {
    transform: rotate(var(--a)) translateY(calc(-1 * var(--fly))) scale(0.4);
    opacity: 0;
  }
}
@keyframes bpThump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}
.bp__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.bp__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;
}

.bp__ico--pause {
  display: none;
}

.bp__play[aria-pressed=true] .bp__ico--play {
  display: none;
}

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

.bp__play .bp__ico {
  color: #17141a;
}

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

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

.bp__countBox {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 28px;
  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;
}

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

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

.bp.is-demo .bp__dot {
  animation-name: bpLoop;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
  animation-delay: calc(var(--i) * -500ms);
}

@keyframes bpLoop {
  0% {
    transform: rotate(var(--a)) translateY(calc(-1 * var(--rest))) scale(0.92);
    opacity: 0.5;
  }
  2% {
    transform: rotate(var(--a)) translateY(calc(-1 * var(--rest) - 2px)) scale(1.5);
    opacity: 1;
  }
  30% {
    transform: rotate(var(--a)) translateY(calc(-1 * var(--fly))) scale(0.4);
    opacity: 0;
  }
  46% {
    transform: rotate(var(--a)) translateY(calc(-1 * var(--rest))) scale(0.92);
    opacity: 0.5;
  }
  100% {
    transform: rotate(var(--a)) translateY(calc(-1 * var(--rest))) scale(0.92);
    opacity: 0.5;
  }
}
.bp.is-demo .bp__core {
  animation-name: bpCoreLoop;
  animation-duration: 500ms;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: infinite;
}

@keyframes bpCoreLoop {
  0% {
    transform: scale(1);
  }
  22% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}
.bp.is-demo .bp__countText {
  color: transparent;
}

.bp.is-demo .bp__loop {
  visibility: visible;
}

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

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

.bp.is-demo .bp__loop i:nth-child(2) {
  animation-delay: 500ms;
}

.bp.is-demo .bp__loop i:nth-child(3) {
  animation-delay: 1000ms;
}

.bp.is-demo .bp__loop i:nth-child(4) {
  animation-delay: 1500ms;
}

@keyframes bpBeatNum {
  0%, 24% {
    visibility: visible;
  }
  25%, 100% {
    visibility: hidden;
  }
}
@media (max-width: 340px) {
  .bp {
    gap: 0;
  }
  .bp__field {
    width: 140px;
    height: 104px;
    --rest: 40px;
    --fly: 58px;
  }
  .bp__dot {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
  }
  .bp__core {
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
  }
  .bp__foot {
    gap: 8px;
  }
  .bp__play {
    padding: 4px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bp.is-demo .bp__dot,
  .bp.is-demo .bp__core,
  .bp.is-demo .bp__loop i {
    animation: none !important;
  }
  .bp.is-demo .bp__countText {
    color: #fff7e6 !important;
  }
  .bp.is-demo .bp__loop {
    visibility: hidden !important;
  }
  .bp__ring--hit .bp__dot,
  .bp__core--hit {
    animation: none !important;
  }
}
