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

.bm {
  --bm-progress: 0;
  display: grid;
  gap: 4px;
  justify-items: center;
  width: min(85vw, 260px);
  border-radius: 8px;
  background: radial-gradient(140px 110px at 50% 62%, rgba(10, 79, 232, var(--bm-progress)) 0%, rgba(10, 79, 232, 0) 72%);
}

.bm__svg {
  width: 150px;
  aspect-ratio: 1/1;
  overflow: visible;
  margin-top: 8px;
}

.bm__trunk {
  fill: none;
  stroke: rgba(23, 20, 26, 0.3);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.bm__branch {
  fill: none;
  stroke: rgba(23, 20, 26, 0.22);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.bm__branch.is-chosen {
  stroke: #0a4fe8;
  stroke-width: 3;
}

.bm__branch.is-dim {
  stroke: rgba(23, 20, 26, 0.12);
}

.bm__dot {
  fill: #17141a;
}

.bm__dot--start {
  fill: #17141a;
}

.bm__dot--a, .bm__dot--b {
  fill: #ffffff;
  stroke: rgba(23, 20, 26, 0.3);
  stroke-width: 2;
}

.bm__dot--a.is-chosen, .bm__dot--b.is-chosen {
  fill: #0a4fe8;
  stroke: #0a4fe8;
}

.bm__labels {
  position: relative;
  width: 150px;
  height: 0;
}

.bm__labelStart, .bm__labelA, .bm__labelB {
  position: absolute;
  transform: translate(-50%, -140%);
  font-size: 10px;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.7);
  white-space: nowrap;
}

.bm__labelStart {
  left: 50%;
  top: -100%;
}

.bm__labelA {
  left: 20%;
  top: -12%;
}

.bm__labelB {
  left: 80%;
  top: -12%;
}

.bm__status {
  margin: 0;
  font-size: 11px;
  color: rgba(23, 20, 26, 0.78);
  font-weight: 600;
  min-height: 14px;
  text-align: center;
}

.bm__controls {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.bm__btn {
  border: 1px solid rgba(23, 20, 26, 0.28);
  background: transparent;
  color: #17141a;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.bm__btn--ghost {
  border-style: dashed;
  color: rgba(23, 20, 26, 0.6);
}

.bm__btn:focus-visible {
  outline: 2px solid #0a4fe8;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .bm {
    width: min(94vw, 240px);
  }
  .bm__svg {
    width: 108px;
    margin-top: 4px;
  }
  .bm__labels {
    width: 108px;
  }
  .bm__labelStart, .bm__labelA, .bm__labelB {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bm__branch {
    transition: none;
  }
}
