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

.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(255, 247, 230, 0.07);
  color: #fff7e6;
  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: #9a93a6;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

.pm button {
  font-family: inherit;
}

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

.pm__tri {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(110, 200, 255, 0.22);
  pointer-events: none;
}

.pm__tri[data-on="1"] {
  background: rgba(76, 212, 166, 0.4);
}

.pm__menu {
  position: absolute;
  left: 12px;
  top: 34px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 112px;
}

.pm__item {
  box-sizing: border-box;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 247, 230, 0.1);
  color: #fff7e6;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.pm__item[data-open] {
  background: #b9a0ff;
  color: #17141a;
}

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

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

.pm__r {
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(23, 20, 26, 0.07);
}

.pm__cur {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff9ebb;
  box-shadow: 0 0 0 3px rgba(23, 20, 26, 0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}

.pm[data-demo] .pm__cur {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pm__cur {
    display: none;
  }
}
