/* wheel.css — the song wheel (spins before every turn) and every wheel item's look.
 * Markup comes from Shop.swheelHtml(): .swheel.it-<id> > .wheel-glow, .wheel-disc (conic slices from --w1..--w4,
 * .wheel-slice labels, .wheel-peg pegs), .wheel-rim, .wheel-hub (an SVG icon, never an emoji), .wheel-pointer.
 * An item's look = its CSS variables below, plus any extras. No item = the Classic wheel. */

.swheel {
  --w1: #ff4757; --w2: #ffd23f; --w3: #ff4757; --w4: #ffd23f;
  --rim: #2b1a4a; --hub: #fff; --hub-text: #2b1a4a; --pointer: #ffffff; --peg: #fff; --text: #1a0d2e; --glow: rgba(255, 210, 63, .35);
  position: relative; width: 100%; aspect-ratio: 1; flex: 0 0 auto;
}
.wheel-glow { position: absolute; inset: 2%; border-radius: 50%; box-shadow: 0 0 34px 6px var(--glow); pointer-events: none; }
.wheel-disc { position: absolute; inset: 5%; border-radius: 50%; overflow: hidden; transition: transform 1.6s cubic-bezier(.12, .7, .2, 1); will-change: transform; }
.wheel-slice { position: absolute; left: 50%; top: 50%; width: 50%; height: 0; transform-origin: 0 0; }
.wheel-slice b {
  position: absolute; right: 7%; top: 0; transform: translateY(-50%); max-width: 62%;
  font-size: 1em; font-weight: 800; line-height: 1.1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.wheel-slice.won b { color: #fff; text-shadow: 0 0 6px #000, 0 0 12px var(--glow); }
.wheel-peg { position: absolute; left: 50%; top: 50%; width: 50%; height: 0; transform-origin: 0 0; }
.wheel-peg::after { content: ''; position: absolute; right: 1.5%; top: -.22em; width: .44em; height: .44em; border-radius: 50%; background: var(--peg); box-shadow: 0 0 3px rgba(0, 0, 0, .5); }
.wheel-rim { position: absolute; inset: 2%; border-radius: 50%; border: .55em solid var(--rim); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), 0 4px 14px rgba(0, 0, 0, .5); pointer-events: none; }
.wheel-hub {
  position: absolute; inset: 39%; border-radius: 50%; background: var(--hub); color: var(--hub-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45), inset 0 -3px 0 rgba(0, 0, 0, .15);
}
/* Pinned by percentages, not text/flex centring (font metrics pushed the old emoji off-centre). */
.wheel-hub .hub-ic { position: absolute; left: 20%; top: 20%; width: 60%; height: 60%; margin: 0; vertical-align: 0; display: block; }
.wheel-pointer {
  position: absolute; top: -3%; left: 50%; width: 11%; height: 14%; margin-left: -5.5%; background: var(--pointer);
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 10%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); z-index: 2;
}
.wheel-pointer.flick { animation: wheelFlick .12s ease-out; }
@keyframes wheelFlick { 0% { transform: rotate(0); } 35% { transform: rotate(-22deg); } 100% { transform: rotate(0); } }

/* ---------- the spin overlay in a match ---------- */
.song-wheel {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle at 50% 50%, rgba(13, 7, 22, .55), rgba(13, 7, 22, .85)); animation: wheelIn .25s ease-out;
}
.song-wheel.hidden { display: none; }
.song-wheel.mine { cursor: pointer; }
.song-wheel .swheel { margin-top: 12px; width: min(340px, 82vw); font-size: clamp(9px, 3.1vw, 12px); }
.song-wheel.landed .wheel-glow { animation: wheelWin .5s ease-out; }
.wheel-who { margin: 0; font-weight: 900; font-size: 1.3rem; letter-spacing: .04em; text-transform: uppercase; color: var(--yellow, #ffe94d); text-align: center; text-shadow: 0 2px 8px #000; }
.wheel-who small { display: block; font-size: .7rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted, #a99bc7); }
@keyframes wheelIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes wheelWin { 0% { box-shadow: 0 0 34px 6px var(--glow); } 40% { box-shadow: 0 0 80px 30px var(--glow); } 100% { box-shadow: 0 0 34px 6px var(--glow); } }

/* ---------- shop card art + the preview's mini wheel ---------- */
.art-wheel { display: block; width: 74px; margin: 0 auto; font-size: 5px; }
.wheel-mini { display: block; width: 58px; font-size: 4px; margin-bottom: 8px; }
.art-wheel .wheel-glow, .wheel-mini .wheel-glow { box-shadow: 0 0 10px 2px var(--glow); }

/* ---------- item looks ---------- */
.swheel.it-wh_candy { --w1: #ffb3d9; --w2: #b8f2e6; --w3: #fff3b0; --w4: #cdb4ff; --rim: #ff5fa2; --hub: #fff; --peg: #fff; --text: #6b2a54; --glow: rgba(255, 140, 200, .45); --pointer: #ff5fa2; }
.swheel.it-wh_candy .wheel-rim { border-style: dotted; border-color: #fff; background: transparent; box-shadow: 0 0 0 .55em #ff5fa2 inset, 0 4px 14px rgba(0, 0, 0, .5); }

.swheel.it-wh_retro { --w1: #12002b; --w2: #ff2bd6; --w3: #12002b; --w4: #2bff88; --rim: #000; --hub: #111; --hub-text: #2bff88; --peg: #2bff88; --text: #fff; --glow: rgba(43, 255, 136, .4); --pointer: #ffe94d; }
.swheel.it-wh_retro .wheel-rim { border-style: dashed; border-color: #2bff88; }
.swheel.it-wh_retro .wheel-slice b { font-family: ui-monospace, Consolas, monospace; text-shadow: 0 0 4px #000; }
.swheel.it-wh_retro .wheel-pointer { clip-path: polygon(0 0, 100% 0, 100% 40%, 70% 40%, 70% 70%, 50% 100%, 30% 70%, 30% 40%, 0 40%); }

.swheel.it-wh_vinyl { --w1: #1b1b1f; --w2: #2a2a30; --w3: #1b1b1f; --w4: #2a2a30; --rim: #0b0b0d; --hub: #e63946; --hub-text: #fff; --peg: #777; --text: #e9e9ee; --glow: rgba(230, 57, 70, .35); --pointer: #c9c9d1; }
.swheel.it-wh_vinyl .wheel-disc::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, rgba(255, 255, 255, .06) 0 1px, transparent 1px 4px), linear-gradient(135deg, rgba(255, 255, 255, .14), transparent 40%, rgba(255, 255, 255, .08) 60%, transparent); }
.swheel.it-wh_vinyl .wheel-hub { inset: 36%; box-shadow: 0 0 0 .3em #111, inset 0 0 0 .5em #c1121f; }

.swheel.it-wh_neon { --w1: #0b0420; --w2: #160736; --w3: #0b0420; --w4: #160736; --rim: #0b0420; --hub: #0b0420; --hub-text: #fff; --peg: #27e8ff; --text: #ff2d95; --glow: rgba(255, 45, 149, .55); --pointer: #27e8ff; }
.swheel.it-wh_neon .wheel-rim { border-color: #ff2d95; box-shadow: 0 0 10px #ff2d95, inset 0 0 10px #ff2d95; animation: neonBuzz 2.4s infinite; }
.swheel.it-wh_neon .wheel-slice b { text-shadow: 0 0 4px #ff2d95, 0 0 10px #ff2d95; color: #ffd0ea; }
.swheel.it-wh_neon .wheel-slice:nth-child(even) b { text-shadow: 0 0 4px #27e8ff, 0 0 10px #27e8ff; color: #d6fbff; }
.swheel.it-wh_neon .wheel-hub { box-shadow: 0 0 0 .25em #27e8ff, 0 0 14px #27e8ff; }
@keyframes neonBuzz { 0%, 92%, 100% { opacity: 1; } 94% { opacity: .55; } 96% { opacity: 1; } 98% { opacity: .7; } }

.swheel.it-wh_gold { --w1: #ffd84d; --w2: #b8860b; --w3: #ffe98a; --w4: #a0700a; --rim: #6b4a00; --hub: radial-gradient(circle at 35% 30%, #fff6c4, #d4a017 60%, #7a5600); --peg: #fffbe0; --text: #3a2600; --glow: rgba(255, 216, 77, .6); --pointer: #fff3a0; }
.swheel.it-wh_gold .wheel-peg::after { animation: bulbs 0.8s steps(1) infinite; box-shadow: 0 0 6px #ffe94d; }
.swheel.it-wh_gold .wheel-peg:nth-of-type(odd)::after { animation-delay: .4s; }
@keyframes bulbs { 0% { background: #fffbe0; } 50% { background: #8a6a1a; box-shadow: none; } }

.swheel.it-wh_galaxy { --w1: #2b0f5e; --w2: #0f2a6b; --w3: #4a1475; --w4: #102050; --rim: #120530; --hub: radial-gradient(circle at 40% 35%, #fff, #b48cff 35%, #3a1675 75%); --peg: #cfe3ff; --text: #e8dcff; --glow: rgba(150, 110, 255, .55); --pointer: #e8dcff; }
.swheel.it-wh_galaxy .wheel-disc::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 2px), radial-gradient(circle at 70% 20%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 60% 75%, #fff 0 1px, transparent 2px), radial-gradient(circle at 30% 70%, #cfe3ff 0 1px, transparent 2px),
    radial-gradient(circle at 85% 55%, #fff 0 1px, transparent 2px), radial-gradient(ellipse at 50% 50%, rgba(255, 120, 220, .25), transparent 60%); }
.swheel.it-wh_galaxy .wheel-glow { animation: galaxyPulse 3s ease-in-out infinite; }
@keyframes galaxyPulse { 50% { box-shadow: 0 0 44px 12px rgba(80, 160, 255, .5); } }

.swheel.it-wh_lucky { --w1: #2fbf71; --w2: #c9f2a0; --w3: #1f8f52; --w4: #f2e8a0; --rim: #0f5130; --hub: #fff; --peg: #ffd84d; --text: #0b2e1a; --glow: rgba(47, 191, 113, .5); --pointer: #ffd84d; }

.swheel.it-wh_shame { --w1: #6b5a4a; --w2: #8a8070; --w3: #5a4a3a; --w4: #9a9080; --rim: #3a2e24; --hub: #d9cbb8; --peg: #3a2e24; --text: #f3ece2; --glow: rgba(120, 100, 80, .35); --pointer: #d9cbb8; }
.swheel.it-wh_shame .wheel-slice b { font-style: italic; }

.swheel.it-wh_spooky { --w1: #ff7a1a; --w2: #1a0f1f; --w3: #ff9c3d; --w4: #2c1035; --rim: #120814; --hub: #2c1035; --peg: #b6ff3d; --text: #fff4e0; --glow: rgba(255, 122, 26, .55); --pointer: #b6ff3d; }
.swheel.it-wh_spooky .wheel-slice b { text-shadow: 0 0 4px #000; }
.swheel.it-wh_spooky .wheel-glow { animation: spookyFlicker 1.8s infinite; }
@keyframes spookyFlicker { 0%, 100% { opacity: 1; } 40% { opacity: .5; } 45% { opacity: 1; } 70% { opacity: .75; } }

.swheel.it-wh_staff { --w1: #ffd23f; --w2: #1a1a1a; --w3: #ffd23f; --w4: #1a1a1a; --rim: #000; --hub: #ffd23f; --peg: #ffd23f; --text: #fff; --glow: rgba(255, 210, 63, .5); --pointer: #ffd23f; }
.swheel.it-wh_staff .wheel-slice:nth-child(odd) b { color: #1a1a1a; }

@media (prefers-reduced-motion: reduce) {
  .swheel *, .swheel *::after { animation: none !important; }
  .song-wheel { animation: none; }
}
