html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffd23f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.wrap {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.simBtn,
.playBtn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease-out, transform 140ms ease-out;
}
.simBtn:active,
.playBtn:active {
  transform: scale(0.96);
}
.simBtn:focus-visible,
.playBtn:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.simBtn {
  background: #17141a;
  color: #fff7e6;
}
.simBtn[aria-pressed=true] {
  background: #0a4fe8;
}

.playBtn {
  background: #fff7e6;
  color: #17141a;
  border: 2px solid #17141a;
}

.track {
  position: relative;
  width: 240px;
  height: 30px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.12);
}

.dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #c93000;
  transform: translateX(0);
  transition-property: transform;
  transition-timing-function: ease-out;
}
.dot.at-end {
  transform: translateX(210px);
}

.scaleRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scaleLabel {
  color: #17141a;
  font-size: 11px;
  font-weight: 700;
}

.scaleRange {
  flex: 1 1 auto;
  accent-color: #c93000;
}

.readout {
  color: #17141a;
  font-size: 11px;
}

.wrap.reduceSim .track {
  outline: 2px dashed #0a4fe8;
  outline-offset: 3px;
}

@media (max-width: 340px) {
  .wrap {
    width: 260px;
  }
  .track, .scaleRange {
    width: 200px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dot {
    transition-duration: 90ms !important;
  }
  .simBtn, .playBtn {
    transition: none;
  }
}
