/* The prize wheel page (/wheel/, #66). The wheel's own drawing is in wheel-draw.js. */
.wh-hero { background: var(--fir); color: var(--cream); border-top: 4px solid var(--amber); border-bottom: 3px solid var(--ink); }
.wh-hero .kicker { color: var(--amber); }
.wh-hero .page-title { color: var(--cream); line-height: 1.1; }
.wh-hero-in { padding-block: clamp(28px, 4vw, 48px); }
.wh-band { padding-block: clamp(32px, 5vw, 72px); }
.wh-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 32px clamp(24px, 5vw, 72px); align-items: center; }
@media (max-width: 800px) { .wh-in { grid-template-columns: minmax(0, 1fr); } }
.wh-wheel { width: 100%; max-width: min(30rem, calc(100dvh - 19rem)); min-width: 240px; margin-inline: auto; }
.wh-side { display: grid; gap: 18px; justify-items: start; }
.wh-intro { font-size: 1.2rem; font-weight: 500; }
.wh-spin { min-width: 10rem; font-size: 1.25rem; min-height: 60px; }
.wh-result:empty { display: none; }
.wh-result { display: grid; gap: 10px; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: var(--radius); padding: 20px 22px; width: 100%; }
.wh-result-title { font: 650 clamp(1.5rem, 3vw, 2rem)/1.15 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; }
.wh-result-title:focus { outline: none; }
.wh-result-title:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.wh-prize { font-size: 1.15rem; overflow-wrap: anywhere; }
.wh-code { font-size: 1.1rem; }
.wh-code strong { display: inline-block; margin-left: 6px; padding: 4px 12px; border: 2px dashed var(--ink); border-radius: 8px; font: 700 1.6rem/1.2 var(--body); letter-spacing: .14em; }

/* The wheel: the pointer and hub sit still over the turning layer. */
.wheel-stage { position: relative; width: 100%; aspect-ratio: 1; }
.wheel-clip { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.wheel-turn { width: 100%; height: 100%; transition: transform 4500ms cubic-bezier(0.15, 0.7, 0.1, 1); will-change: transform; backface-visibility: hidden; }
.wheel-turn.still { transition: none; }
@media (prefers-reduced-motion: reduce) { .wheel-turn { transition: none; } }
.wheel-svg { display: block; width: 100%; height: 100%; }
.wheel-pointer { position: absolute; z-index: 2; top: -4%; left: 50%; width: 11%; transform: translateX(-50%); filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.wheel-hub { position: absolute; z-index: 2; top: 50%; left: 50%; width: 20%; transform: translate(-50%, -50%); }
/* Spin in the hub (#69): a round button where the face is; the face shows again once the day's spin is used. */
.wh-spin.wheel-hub-btn { position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 24%; min-width: 64px; min-height: 0; aspect-ratio: 1; padding: 0; border-radius: 50%; border: 4px solid var(--ink); font-size: clamp(1rem, 4.2vw, 1.4rem); letter-spacing: .04em; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.wh-spin.wheel-hub-btn:active { animation: none; transform: translate(-50%, -48%); }
.wh-spin.wheel-hub-btn:focus-visible { outline: 4px solid var(--amber); outline-offset: 3px; }
.wh-spin.wheel-hub-btn[hidden] { display: none; }
/* It pulses to invite a tap (Darin, #69); still while spinning, and never for reduced motion. */
@keyframes wh-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 0 rgba(226,149,46,.75); } 50% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 14px rgba(226,149,46,0); } }
.wh-spin.wheel-hub-btn:not(:disabled) { animation: wh-pulse 1.6s ease-in-out infinite; }
.wh-spin.wheel-hub-btn:hover, .wh-spin.wheel-hub-btn:focus-visible { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .wh-spin.wheel-hub-btn { animation: none !important; } }
.wheel-stage:has(.wheel-hub-btn:not([hidden])) .wheel-hub { visibility: hidden; }


/* The home page's popup (#67, render.js wheelBand, wheel-popup.js): the same wheel in a <dialog>, never taller than the screen. */
html:has(.wh-dialog[open]) { overflow: hidden; }
.wh-dialog { width: min(36rem, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--text); overflow: auto; overscroll-behavior: contain; }
.wh-dialog::backdrop { background: rgba(23, 50, 41, .78); }
.wh-dialog-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--fir); color: var(--cream); }
.wh-dialog-title { font: 650 clamp(1.3rem, 4vw, 1.7rem)/1.15 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; }
.wh-close { min-height: 44px; flex: none; }
.wh-dialog .wh-in { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px 16px 22px; }
.wh-dialog .wh-wheel { max-width: min(22rem, calc(100dvh - 16rem)); min-width: 160px; }
.wh-dialog .wh-side { justify-items: center; text-align: center; }

/* Email to play (#67). */
.wh-form { display: grid; gap: 14px; width: 100%; max-width: 26rem; }
.wh-form[hidden] { display: none; }
.wh-dialog .wh-form { text-align: left; }
.wh-foot { line-height: 1.4; }
.wh-mailed { font-size: 1rem; }
