:root {
  --lottery-wheel-accent: #c9973d;
  --lottery-wheel-accent-dark: #8a601e;
  --lottery-wheel-ink: #1f1d1a;
  --lottery-wheel-muted: #716c65;
  --lottery-wheel-surface: #fffdf8;
  --lottery-wheel-border: rgba(54, 43, 29, 0.15);
}

.lottery-wheel {
  box-sizing: border-box;
  width: min(100%, 640px);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--lottery-wheel-border);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 151, 61, 0.11), transparent 48%),
    var(--lottery-wheel-surface);
  color: var(--lottery-wheel-ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  text-align: center;
  box-shadow: 0 16px 38px rgba(66, 48, 22, 0.12);
}

.lottery-wheel__heading {
  margin: 0 0 7px;
  color: var(--lottery-wheel-accent-dark);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

.lottery-wheel__subheading {
  min-height: 1.5em;
  margin: 0 0 22px;
  color: var(--lottery-wheel-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.lottery-wheel__stage {
  position: relative;
  width: min(100%, 510px);
  margin: 0 auto;
  aspect-ratio: 1;
}

.lottery-wheel__canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 12px 13px rgba(33, 23, 8, 0.16));
}

.lottery-wheel__pointer {
  position: absolute;
  z-index: 2;
  top: -5px;
  left: 50%;
  width: 0;
  height: 0;
  border-right: 14px solid transparent;
  border-left: 14px solid transparent;
  border-top: 30px solid #b5322d;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 2px rgba(57, 27, 19, 0.24));
}

.lottery-wheel__hub {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 19%;
  aspect-ratio: 1;
  border: 6px solid #fff8e7;
  border-radius: 50%;
  background: var(--lottery-wheel-accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 0 var(--lottery-wheel-accent-dark), 0 7px 16px rgba(62, 39, 10, 0.26);
}

.lottery-wheel__hub::after {
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  content: "";
}

.lottery-wheel__controls {
  display: grid;
  gap: 11px;
  margin-top: 23px;
}

.lottery-wheel__spin {
  min-height: 48px;
  padding: 11px 22px;
  border: 0;
  border-radius: 4px;
  background: var(--lottery-wheel-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0;
  transition: background-color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.lottery-wheel__spin:hover:not(:disabled) {
  background: var(--lottery-wheel-accent-dark);
  transform: translateY(-1px);
}

.lottery-wheel__spin:focus-visible {
  outline: 3px solid rgba(201, 151, 61, 0.42);
  outline-offset: 3px;
}

.lottery-wheel__spin:disabled {
  cursor: wait;
  opacity: 0.68;
}

.lottery-wheel__result {
  min-height: 1.75em;
  margin: 0;
  color: var(--lottery-wheel-accent-dark);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
}

.lottery-wheel__result[aria-live="polite"] {
  transition: opacity 180ms ease;
}

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