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

.pm {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  width: min(100%, 440px);
  height: min(252px, 100vh - 2 * clamp(8px, 4vw, 24px));
  border-radius: 16px;
  background: rgba(23, 20, 26, 0.07);
  color: #17141a;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  user-select: none;
}

.pm b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pm__live {
  position: absolute;
  left: 12px;
  top: 8px;
  margin: 0;
  z-index: 9;
  color: rgba(23, 20, 26, 0.72);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

.pm button {
  font-family: inherit;
}

.pm button:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 2px;
}

.pm__move {
  position: absolute;
  right: 12px;
  top: 8px;
  z-index: 8;
  height: 24px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.12);
  color: #17141a;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  cursor: pointer;
}

.pm__origin {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #17141a;
  z-index: 6;
  pointer-events: none;
}

.pm__anchor {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b9a0ff;
  box-shadow: 0 0 0 4px rgba(185, 160, 255, 0.4), 0 6px 12px rgba(23, 20, 26, 0.32);
  cursor: pointer;
  z-index: 5;
}

.pm__pop {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 156px;
  height: 92px;
  padding: 12px;
  border-radius: 16px;
  background: #fff7e6;
  color: #17141a;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  visibility: hidden;
  z-index: 4;
  will-change: transform;
}

.pm__ttl {
  display: block;
  font-size: 13px;
  line-height: 20px;
}

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

.pm__sw {
  position: relative;
  width: 24px;
  height: 12px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.22);
}

.pm__sw::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff7e6;
}

.pm__sw--on {
  background: #4cd4a6;
}

.pm__sw--on::after {
  left: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .pm__pop {
    will-change: auto;
  }
}
