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

.scrubWrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 260px;
}

.track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.14);
  cursor: pointer;
}
.track:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 3px;
}

.bufferFill {
  --buffer-pct: 0%;
  position: absolute;
  inset: 0;
  width: var(--buffer-pct);
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.3);
}

.playFill {
  --play-pct: 0%;
  position: absolute;
  inset: 0;
  width: var(--play-pct);
  border-radius: 999px;
  background: #b9a0ff;
}

.handle {
  --play-pct: 0%;
  position: absolute;
  top: 50%;
  left: var(--play-pct);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff7e6;
  transform: translate(-50%, -50%);
}

.ghost {
  --ghost-pct: 0%;
  position: absolute;
  top: -28px;
  left: var(--ghost-pct);
  transform: translateX(-50%);
  pointer-events: none;
}

.ghostTip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #17141a;
  background: #fff7e6;
  white-space: nowrap;
}

.readout {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 247, 230, 0.7);
  text-align: center;
}

@media (max-width: 340px) {
  .scrubWrap {
    width: 200px;
  }
  .readout {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bufferFill, .playFill, .handle {
    transition: none;
  }
}
