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

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

.sp {
  width: 260px;
  max-width: 100%;
  display: grid;
  gap: 8px;
}

.sp__row {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 4px;
}

.sp__main, .sp__toggle {
  box-sizing: border-box;
  height: 64px;
  border: 0;
  color: #17141a;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  cursor: pointer;
}

.sp__main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px 0 0 12px;
  background: color-mix(in srgb, #b9a0ff, #4cd4a6 calc(var(--k, 0) * 100%));
}

.sp__toggle {
  --o: 0;
  display: grid;
  place-items: center;
  border-radius: 0 12px 12px 0;
  background: #ff9ebb;
}

.sp__toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(calc(var(--o) * 180deg));
}

.sp__main:focus-visible, .sp__toggle:focus-visible, .sp__item:focus-visible {
  outline: 3px solid #17141a;
  outline-offset: 3px;
}

.sp__win {
  position: relative;
  display: block;
  width: 44px;
  height: 24px;
  overflow: hidden;
}

.sp__fmt {
  position: absolute;
  inset: 0;
  text-align: center;
}

.sp__menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sp__item {
  box-sizing: border-box;
  height: 48px;
  border: 2px solid #17141a;
  border-radius: 8px;
  background: #fff7e6;
  color: #17141a;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  cursor: pointer;
  visibility: hidden;
}

.sp__item.is-picked {
  background: #4cd4a6;
}

.sp__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .sp__item {
    transition: none;
  }
}
