/* =====================================================================
   วงล้อสุ่มคำทำนาย (wheel.html)
   ===================================================================== */
.wh-themes { margin-bottom: 14px; }
.wh-themes .chip { min-height: 42px; }
.wh-themes .chip svg { width: 16px; height: 16px; }

.wh-layout { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .wh-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 30px; } }

.wh-stage {
  position: relative; padding: 22px 12px 22px; border-radius: var(--radius-lg); text-align: center; overflow: hidden;
  background: radial-gradient(420px 300px at 50% 42%, rgba(227, 194, 122, .16), transparent 70%), linear-gradient(180deg, #23103f, #140926);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-gold);
}
.wh-wheel-box { position: relative; width: min(100%, 440px); margin: 0 auto; aspect-ratio: 1; }
.wh-wheel-box::before { content: ''; position: absolute; inset: 6%; border-radius: 50%; box-shadow: 0 0 60px 6px rgba(227, 194, 122, .25), 0 30px 60px -20px rgba(0, 0, 0, .8); }
.wh-svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.wh-rot { will-change: transform; }
.wh-seg-txt { font-family: 'Prompt', sans-serif; font-weight: 500; }
.wh-hub { cursor: pointer; }
.wh-hub:hover .wh-hub-in { filter: brightness(1.15); }
.wh-hub:focus-visible { outline: none; }
.wh-hub:focus-visible .wh-hub-ring { stroke: #fff; stroke-width: 3; }

/* ไฟรอบวง */
.wh-lt { animation: whBlink 1.4s ease-in-out infinite; }
.wh-lt.b { animation-delay: .7s; }
.spinning .wh-lt { animation-duration: .32s; }
.spinning .wh-lt.b { animation-delay: .16s; }
@keyframes whBlink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* เข็มชี้ */
.wh-pointer { transform-box: fill-box; transform-origin: 50% 18%; transition: transform .08s; }
.wh-pointer.tick { transform: rotate(-14deg); }

/* ปุ่มควบคุม */
.wh-controls { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; }
.wh-spin { min-width: 220px; }
.wh-spin.is-disabled { pointer-events: none; opacity: .5; }
.wh-left { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: .92rem; }
.wh-dots { display: inline-flex; gap: 6px; }
.wh-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.wh-dots i.on { background: var(--gold-grad); box-shadow: 0 0 10px rgba(227, 194, 122, .6); }
.wh-sound { color: var(--text-3); font-size: .84rem; }
.wh-sound svg { width: 16px; height: 16px; }

/* ด้านข้าง */
.wh-last-label { font-family: var(--font-head); font-size: 1.5rem; margin: .1em 0 .2em; }
.wh-last p { color: var(--text-2); font-size: .95rem; }
.wh-rules { margin: 0; padding-left: 18px; color: var(--text-2); font-size: .9rem; display: grid; gap: 6px; }

/* ผลลัพธ์ใน modal */
.wh-res { text-align: center; }
.wh-res-emblem { width: 84px; height: 84px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: radial-gradient(circle at 32% 26%, #fff6d8, #f0d08a 45%, #b88a3e); box-shadow: 0 0 0 6px rgba(227, 194, 122, .12), 0 0 40px rgba(227, 194, 122, .5); animation: whPop .6s var(--ease) both; }
.wh-res-emblem svg { width: 40px; height: 40px; }
@keyframes whPop { 0% { transform: scale(.4) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }
.wh-res h2 { font-size: 1.9rem; margin: .1em 0 .2em; }
.wh-res .txt { font-size: 1.02rem; line-height: 1.85; color: var(--text); text-align: left; }
.wh-res .notice { text-align: left; }
.wh-burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.wh-burst i { position: absolute; left: 50%; top: 70px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); opacity: 0; animation: whBurst 1.1s ease-out forwards; animation-delay: var(--d); }
@keyframes whBurst { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(.3); } }

@media (prefers-reduced-motion: reduce) {
  .wh-lt, .wh-res-emblem, .wh-burst i { animation: none; }
  .wh-lt { opacity: .8; }
}
