/* Lucky wheel popup (assets/v2/lottery.js) */
.wy-lottery { width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: hidden auto; border: 1px solid rgba(217, 181, 115, 0.45); border-radius: 26px; padding: 1.6rem 1.4rem 1.4rem; background: radial-gradient(circle at 50% 0%, rgba(217, 181, 115, 0.22), transparent 55%), linear-gradient(180deg, #14100b, #0a0c0e 60%); color: var(--wy-text); text-align: center; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7); }
.wy-lottery[open] { animation: wy-lottery-in 420ms cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.wy-lottery::backdrop { background: rgba(3, 5, 7, 0.75); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wy-lottery__close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 1px solid var(--wy-line); border-radius: 50%; background: rgba(6, 8, 10, 0.6); color: var(--wy-text); font-size: 1.2rem; cursor: pointer; }
.wy-lottery__kicker { margin: 0; color: var(--wy-gold); font-family: var(--wy-mono); font-size: 0.66rem; letter-spacing: 0.22em; }
.wy-lottery h2 { margin: 0.35rem 0 0.2rem; font-family: var(--wy-display); font-size: 2rem; font-weight: 600; }
.wy-lottery__sub { margin: 0 0 0.6rem; color: var(--wy-text-muted); font-size: 0.82rem; }

.wy-wheel { --size: min(330px, 78vw); position: relative; width: var(--size); height: var(--size); margin: 0 auto; }
.wy-wheel__bulbs { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, transparent 66%, #2a2014 66.5%, #3a2c18 71%, #d9b573 71.5%, #8a6a35 73%, transparent 73.5%); }
.wy-wheel__bulbs i { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: #ffe7b0; box-shadow: 0 0 10px #ffd27a; transform: rotate(var(--a)) translateY(calc(var(--size) * -0.47)); animation: wy-bulb 1.2s steps(1) infinite; }
.wy-wheel__bulbs i:nth-child(odd) { animation-delay: 0.6s; }
.wy-wheel.is-spinning .wy-wheel__bulbs i { animation-duration: 0.25s; }
.wy-wheel__disc { position: absolute; inset: 8%; overflow: hidden; border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.5); will-change: transform; }
.wy-wheel__disc::after { position: absolute; inset: 0; border-radius: 50%; content: ""; background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18), transparent 55%); pointer-events: none; }
.wy-wheel__label { position: absolute; inset: 0; transform: rotate(var(--a)); pointer-events: none; }
.wy-wheel__label b { position: absolute; top: 9%; left: 50%; width: 5.4em; margin-left: -2.7em; color: #fff; font-size: clamp(0.72rem, 2.6vw, 0.84rem); font-weight: 800; line-height: 1.25; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); writing-mode: horizontal-tb; }
.wy-wheel__label img { position: absolute; top: 19%; left: 50%; width: 17%; aspect-ratio: 1; margin-left: -8.5%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }
/* WebGL wheel (lottery-scene.js) replaces the CSS one once it has loaded. */
.wy-wheel__gl { position: absolute; inset: -10%; width: 120%; height: 120%; pointer-events: none; animation: wy-gl-in 500ms ease-out; }
.wy-wheel.is-3d::before { position: absolute; inset: -6%; border-radius: 50%; content: ""; background: radial-gradient(circle, rgba(217, 181, 115, 0.4), rgba(217, 181, 115, 0.12) 45%, transparent 70%); animation: wy-halo 3s ease-in-out infinite; pointer-events: none; }
.wy-wheel.is-3d .wy-wheel__bulbs, .wy-wheel.is-3d .wy-wheel__disc, .wy-wheel.is-3d .wy-wheel__pointer { visibility: hidden; }
.wy-wheel.is-3d .wy-wheel__go { width: 24%; }
.wy-wheel__go { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; width: 26%; aspect-ratio: 1; place-items: center; border: 4px solid #fff4d6; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe2a0, #d9b573 45%, #9a7232); color: #2a1d08; font-size: clamp(0.95rem, 3.6vw, 1.15rem); font-weight: 900; transform: translate(-50%, -50%); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(217, 181, 115, 0.2); cursor: pointer; transition: transform 160ms ease; }
.wy-wheel__go span { white-space: nowrap; }
.wy-wheel__go.is-long { font-size: clamp(0.74rem, 2.8vw, 0.9rem); letter-spacing: -0.02em; }
.wy-wheel__go:not(:disabled):hover { transform: translate(-50%, -50%) scale(1.06); }
.wy-wheel__go:not(:disabled) { animation: wy-go-pulse 1.6s ease-in-out infinite; }
.wy-wheel__go:disabled { cursor: default; filter: saturate(0.6); }
.wy-wheel__pointer { position: absolute; top: 4%; left: 50%; z-index: 3; width: 0; height: 0; border-top: 26px solid #fff4d6; border-right: 13px solid transparent; border-left: 13px solid transparent; transform: translateX(-50%); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6)); }

.wy-lottery__result { position: relative; display: grid; justify-items: center; gap: 0.4rem; margin-top: 1.1rem; border: 1px solid rgba(217, 181, 115, 0.35); border-radius: 16px; padding: 1rem; background: rgba(217, 181, 115, 0.08); animation: wy-rise 500ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.wy-lottery__result[hidden] { display: none; }
.wy-lottery__prize { width: 88px; height: 88px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); animation: wy-prize-pop 700ms cubic-bezier(0.2, 1.4, 0.4, 1); }
.wy-lottery__result strong { color: var(--wy-gold); font-size: 1.2rem; }
.wy-lottery__result p { margin: 0; color: rgba(244, 240, 232, 0.85); font-size: 0.84rem; line-height: 1.7; }
.wy-lottery__chances { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.55rem; margin: 0 0 0.9rem; color: rgba(244, 240, 232, 0.8); font-size: 0.8rem; }
.wy-lottery__chances b { color: var(--wy-gold); font-size: 0.95rem; }
.wy-lottery__pips { display: inline-flex; gap: 5px; }
.wy-lottery__pips i { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid rgba(217, 181, 115, 0.55); border-radius: 50%; color: #2a1d08; font-size: 0.66rem; font-style: normal; line-height: 1; }
.wy-lottery__pips i.is-open { background: radial-gradient(circle at 35% 30%, #ffe8b0, #d9b573); box-shadow: 0 0 8px rgba(217, 181, 115, 0.6); }
.wy-lottery__pips i.is-win { border-color: #ffd27a; background: radial-gradient(circle at 35% 30%, #fff1c2, #e0a63a); }
.wy-lottery__pips i.is-miss { border-color: rgba(244, 240, 232, 0.2); background: rgba(244, 240, 232, 0.08); }
.wy-lottery__pips i.is-locked { border-style: dashed; border-color: rgba(244, 240, 232, 0.25); background: transparent; }
.wy-lottery__cta { margin-top: 0.3rem; border: 0; cursor: pointer; font-family: inherit; border-radius: 999px; padding: 0.6rem 1.3rem; background: var(--wy-gold); color: #17130d; font-size: 0.86rem; font-weight: 800; }
.wy-lottery__note { min-height: 1.2em; margin: 0.8rem 0 0; color: var(--wy-text-muted); font-size: 0.8rem; }

.wy-confetti { position: absolute; inset: -40px 0 auto; height: 0; pointer-events: none; }
.wy-confetti i { position: absolute; top: 0; left: var(--x); width: 7px; height: 12px; border-radius: 2px; background: hsl(calc(var(--i) * 47), 85%, 62%); opacity: 0; animation: wy-confetti var(--t) cubic-bezier(0.2, 0.6, 0.4, 1) var(--d) forwards; }

.wy-lottery-fab { position: fixed; right: 18px; bottom: 22px; z-index: 50; display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid rgba(217, 181, 115, 0.6); border-radius: 999px; padding: 0.7rem 1.1rem; background: linear-gradient(135deg, #2a2014, #120e09); color: var(--wy-gold); font-weight: 800; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); cursor: pointer; animation: wy-fab 2.4s ease-in-out infinite; }
.wy-lottery-fab[hidden] { display: none; }
.wy-lottery-fab img { width: 28px; height: 28px; margin: -6px 0; object-fit: contain; }

@keyframes wy-lottery-in { from { opacity: 0; transform: scale(0.85) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes wy-halo { 50% { opacity: 0.6; transform: scale(0.97); } }
@keyframes wy-gl-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes wy-prize-pop { from { opacity: 0; transform: scale(0.3) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes wy-bulb { 50% { background: #6b5530; box-shadow: none; } }
@keyframes wy-go-pulse { 0%, 100% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(217, 181, 115, 0.2); } 50% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 12px rgba(217, 181, 115, 0.08); } }
@keyframes wy-confetti { from { opacity: 1; transform: translateY(0) rotate(0); } to { opacity: 0; transform: translateY(260px) rotate(540deg); } }
@keyframes wy-fab { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .wy-lottery-fab, .wy-wheel__bulbs i, .wy-wheel__go { animation: none !important; } }
