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

.gw {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gw__wheel {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.06);
  touch-action: none;
  cursor: grab;
}

.gw__wheel:active {
  cursor: grabbing;
}

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

.gw__ring {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: rotate(calc(var(--rotation, 0) * 1deg));
}

.gw__slot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 26px;
  margin-left: -30px;
  margin-top: -13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10.5px;
  color: #17141a;
  background: hsl(calc(var(--hue, 0) * 1deg), 46%, 80%);
  transform: rotate(calc(var(--i, 0) * 51.4286deg)) translateY(-86px) rotate(calc(var(--i, 0) * -51.4286deg));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gw__slot--active {
  background: hsl(calc(var(--hue, 0) * 1deg), 46%, 64%);
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: rotate(calc(var(--i, 0) * 51.4286deg)) translateY(-86px) rotate(calc(var(--i, 0) * -51.4286deg)) scale(1.2);
}

.gw__pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #17141a;
}

.gw__picked {
  margin: 0;
  color: #17141a;
  font-weight: 800;
  font-size: 12px;
}

@media (max-width: 340px) {
  .gw {
    gap: 4px;
  }
  .gw__wheel {
    width: 148px;
    height: 148px;
  }
  .gw__slot {
    width: 44px;
    height: 20px;
    margin-left: -22px;
    margin-top: -10px;
    font-size: 8.5px;
    transform: rotate(calc(var(--i, 0) * 51.4286deg)) translateY(-58px) rotate(calc(var(--i, 0) * -51.4286deg));
  }
  .gw__slot--active {
    transform: rotate(calc(var(--i, 0) * 51.4286deg)) translateY(-58px) rotate(calc(var(--i, 0) * -51.4286deg)) scale(1.2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gw__ring, .gw__slot {
    transition: none;
  }
}
