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

main.stage {
  position: relative;
  flex-direction: column;
  gap: 16px;
  display: grid;
  place-items: center;
}

.ringWrap {
  --ring-w: 6px;
  --buffer-pct: 0%;
  position: relative;
  width: 120px;
  height: 120px;
}

.bufferRing {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#2f6df6 var(--buffer-pct), rgba(255, 247, 230, 0.12) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-w) - 2px), #000 calc(100% - var(--ring-w) - 2px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-w) - 2px), #000 calc(100% - var(--ring-w) - 2px));
  transition: background 40ms linear;
}

.playRing {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  transform-origin: center;
}

.playTrack {
  fill: none;
  stroke: rgba(255, 247, 230, 0.14);
  stroke-width: 4;
}

.playValue {
  fill: none;
  stroke: #ff9ebb;
  stroke-linecap: round;
  transition: stroke-dashoffset ease-out 40ms;
}

.readout {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.pct {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #fff7e6;
}

.label {
  display: block;
  font-size: 10px;
  color: rgba(255, 247, 230, 0.6);
}

.jumpBtn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #17141a;
  background: #fff7e6;
  cursor: pointer;
}
.jumpBtn:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .ringWrap {
    width: 92px;
    height: 92px;
  }
  .pct {
    font-size: 18px;
  }
  .jumpBtn {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bufferRing, .playValue {
    transition: none;
  }
}
