/* Wheel template — local demo only. Scope every rule to the wheel page. */
html body[data-page="wheel"] .mos-wheel-layout { align-items: start; gap: 24px; }
html body[data-page="wheel"] .mos-wheel-card { position: relative; overflow: hidden; border-color: #514732; background: radial-gradient(ellipse at 50% 38%, #8b7a4c12, transparent 62%), linear-gradient(150deg, #1b2022, #111517 55%, #101314); box-shadow: 0 16px 44px #0003; }
html body[data-page="wheel"] .mos-wheel-card::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, #0d1317a6, #0d13178c 48%, #0d1414bf), var(--mos-wheel-backdrop, none) center / cover no-repeat; pointer-events: none; }
html body[data-page="wheel"] .mos-wheel-card-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 24px; gap: 16px; }
html body[data-page="wheel"] .mos-wheel-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
html body[data-page="wheel"] .mos-wheel-brand { color: #cdb57b; font: 500 .8125rem/1.5 var(--mos-type-family); letter-spacing: .08em; }
html body[data-page="wheel"] .mos-wheel-demo-tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid #6c715e66; border-radius: 30px; color: #c4ceb9; font-size: .8125rem; line-height: 1.4; white-space: nowrap; }
html body[data-page="wheel"] .mos-wheel-demo-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #a2b38f; }
html body[data-page="wheel"] .mos-wheel-stage { position: relative; width: min(100%, 460px); aspect-ratio: 1; isolation: isolate; }
html body[data-page="wheel"] .mos-wheel-stage::before { content: ''; position: absolute; inset: 10%; z-index: -1; border-radius: 50%; box-shadow: 0 28px 48px #000b, 0 0 60px #c4aa6520; }
html body[data-page="wheel"] .mos-wheel-svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; overflow: visible; }
html body[data-page="wheel"] .mos-wheel-raster .mos-wheel-wedge { fill-opacity: .25; }
html body[data-page="wheel"] .mos-wheel-raster .mos-wheel-sector.is-winner .mos-wheel-wedge { fill-opacity: .72; }
html body[data-page="wheel"] .mos-wheel-prize-image { filter: drop-shadow(0 3px 2px #0008); }
html body[data-page="wheel"] .mos-wheel-prize-thumb { width: 36px; height: 36px; object-fit: contain; flex: none; }
html body[data-page="wheel"] .mos-wheel-result-icon img { width: 48px; height: 48px; object-fit: contain; }
html body[data-page="wheel"] .mos-wheel-rotor { transform-origin: 320px 320px; }
html body[data-page="wheel"] [data-wheel-state="spinning"] .mos-wheel-rotor { will-change: transform; }
html body[data-page="wheel"] .mos-wheel-pointer { transform-origin: 320px 18px; filter: drop-shadow(0 4px 3px #0009); }
html body[data-page="wheel"] .mos-wheel-prize-copy { color: #d6c69e; pointer-events: none; }
html body[data-page="wheel"] :is(.mos-wheel-label, .mos-wheel-detail) { fill: #f2efe7; font-family: var(--mos-type-family); font-size: 32px; font-weight: 600; letter-spacing: normal; text-shadow: 0 1px 3px #000d; }
html body[data-page="wheel"] :is(.mos-wheel-label-word, .mos-wheel-detail) { font-size: 30px; }
html body[data-page="wheel"] .mos-wheel-detail { fill: #d4d2c9; font-weight: 400; }
html body[data-page="wheel"] .mos-wheel-sector.is-winner .mos-wheel-wedge { fill: url(wheel.css?v=20261028-outlines4); stroke: #ffe7a8; stroke-width: 3px; }
html body[data-page="wheel"] .mos-wheel-sector.is-winner .mos-wheel-prize-copy { color: #f7e5b3; }
/* Reveal one result gently; keep the remaining prizes readable in shadow. */
html body[data-page="wheel"] .mos-wheel-sector-shade { opacity: 0; transition: opacity 650ms ease; }
html body[data-page="wheel"] .mos-wheel-sector-spot { opacity: 0; transition: opacity 650ms ease; }
html body[data-page="wheel"] .mos-wheel-winner-aura { opacity: 0; transition: opacity 400ms ease; }
html body[data-page="wheel"] [data-wheel-state="result"] .mos-wheel-sector:not(.is-winner) .mos-wheel-sector-shade { opacity: .42; }
html body[data-page="wheel"] [data-wheel-state="result"] .mos-wheel-sector.is-winner .mos-wheel-sector-spot { opacity: 1; }
html body[data-page="wheel"] [data-wheel-state="result"] .mos-wheel-winner-aura { opacity: 1; animation: mos-wheel-aura 2.8s ease-in-out infinite; }
@keyframes mos-wheel-aura { 0%, 100% { stroke-opacity: .72; } 50% { stroke-opacity: 1; } }
/* The anchor owns centering; shared pressed/disabled transforms only affect the button. */
html body[data-page="wheel"] .mos-wheel-hub-anchor { position: absolute; z-index: 2; top: 50%; left: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); }
html body[data-page="wheel"] .mos-wheel-hub-anchor button.mos-wheel-hub { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #f2efe7; text-shadow: 0 1px 3px #000; box-shadow: none; cursor: pointer; font: 600 clamp(.8125rem, 1.3vw, 1rem)/1.3 var(--mos-type-family); letter-spacing: .06em; transition: filter 200ms ease; }
html body[data-page="wheel"] .mos-wheel-hub-anchor button.mos-wheel-hub svg { width: 23%; height: 23%; color: #4b4027; }
html body[data-page="wheel"] .mos-wheel-hub-anchor button.mos-wheel-hub:is(:hover, :focus-visible) { background: #fff7d612; color: #fff3d3; filter: brightness(1.1); }
html body[data-page="wheel"] .mos-wheel-hub-anchor button.mos-wheel-hub:is(:active, .mos-is-pressed) { filter: brightness(.93); }
html body[data-page="wheel"] .mos-wheel-hub-anchor button.mos-wheel-hub:focus-visible { outline: 2px solid #ead8a5; outline-offset: 4px; }
html body[data-page="wheel"] .mos-wheel-hub-anchor button.mos-wheel-hub:disabled { cursor: wait; filter: saturate(.7); }
/* Keep SPIN on its axle even while shared hover/pressed rules are active. */
html body[data-page="wheel"] .mos-wheel-hub-anchor button.mos-wheel-hub { transform: none !important; }
html body[data-page="wheel"] .mos-wheel-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
html body[data-page="wheel"] .mos-wheel-spin-button { width: 100%; max-width: 340px; min-height: 52px; padding: 13px 20px; }
html body[data-page="wheel"] .mos-wheel-spin-button > svg { width: 20px; height: 20px; flex: none; }
html body[data-page="wheel"] .mos-wheel-balance { display: flex; align-items: center; gap: 8px; margin: 0; color: #a5a7a3; font-size: .875rem; line-height: 1.5; }
html body[data-page="wheel"] .mos-wheel-balance svg { width: 16px; height: 16px; color: #cdb57b; }
html body[data-page="wheel"] .mos-wheel-balance strong { color: #f2efe7; }
html body[data-page="wheel"] .mos-wheel-note { max-width: 360px; margin: 0; color: #a5a7a3; text-align: center; font-size: .8125rem; line-height: 1.65; }
html body[data-page="wheel"] .mos-wheel-sidebar { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
html body[data-page="wheel"] .mos-wheel-result { position: relative; display: flex; align-items: center; gap: 18px; min-height: 124px; padding: 22px 24px; border: 1px solid #514732; border-radius: 12px; background: radial-gradient(ellipse at 0% 50%, #cdb57b10, transparent 75%), #121617; }
html body[data-page="wheel"] .mos-wheel-result-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border: 1px solid #655735; border-radius: 50%; color: #cdb57b; background: #cdb57b0a; }
html body[data-page="wheel"] .mos-wheel-result-icon svg { width: 26px; height: 26px; }
html body[data-page="wheel"] .mos-wheel-result-caption { margin: 0 0 3px; color: #a5a7a3; font-size: .8125rem; line-height: 1.6; }
html body[data-page="wheel"] .mos-wheel-result-text { margin: 0; color: #f2efe7; font-size: 1.5rem; font-weight: 500; line-height: 1.5; }
html body[data-page="wheel"] .mos-wheel-result[data-state="result"] .mos-wheel-result-text { color: #e8d6a6; }
html body[data-page="wheel"] .mos-wheel-result[data-state="result"] { animation: mos-wheel-reveal 500ms ease-out; }
html body[data-page="wheel"] .mos-wheel-prizes-panel { padding: 0; }
html body[data-page="wheel"] .mos-wheel-prizes-panel summary { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: inherit; color: #e4e3dc; font-size: 1rem; font-weight: 500; line-height: 1.5; cursor: pointer; list-style: none; transition: background 180ms ease; }
html body[data-page="wheel"] .mos-wheel-prizes-panel summary::-webkit-details-marker { display: none; }
html body[data-page="wheel"] .mos-wheel-prizes-panel summary:hover { background: #ffffff04; }
html body[data-page="wheel"] .mos-wheel-prizes-panel summary:focus-visible { outline: 2px solid #cdb57b; outline-offset: -3px; }
html body[data-page="wheel"] .mos-wheel-prize-count { margin-left: auto; color: #a5a7a3; font-size: .8125rem; font-weight: 400; white-space: nowrap; }
html body[data-page="wheel"] .mos-wheel-prizes-panel summary > svg { flex: none; width: 18px; height: 18px; color: #cdb57b; transition: transform 180ms ease; }
html body[data-page="wheel"] .mos-wheel-prizes-panel[open] summary > svg { transform: rotate(90deg); }
html body[data-page="wheel"] .mos-wheel-prizes-panel .mos-wheel-prizes { padding: 0 20px 20px; }
html body[data-page="wheel"] .mos-wheel-prizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; list-style: none; padding: 0; margin: 0; }
html body[data-page="wheel"] .mos-wheel-prize-item { display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 3px 7px; border-radius: 4px; color: #b7bab6; font-size: .875rem; line-height: 1.6; transition: color 180ms ease, background 180ms ease; }
html body[data-page="wheel"] .mos-wheel-prize-item.is-winner { color: #e8d6a6; background: #cdb57b12; }
html body[data-page="wheel"] .mos-wheel-prize-dot { width: 8px; height: 8px; border: 1px solid #82857c; border-radius: 50%; flex: none; background: #303739; }
html body[data-page="wheel"] .mos-wheel-prize-dot[data-tone="gold"] { background: #baa16a; border-color: #dac998; }
html body[data-page="wheel"] .mos-wheel-prize-dot[data-tone="silver"] { background: #9ba6a9; border-color: #c1c9c9; }
html body[data-page="wheel"] .mos-wheel-history { padding: 20px; border: 1px solid #2b2f2f; border-radius: 12px; background: #111516; }
html body[data-page="wheel"] .mos-wheel-history-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
html body[data-page="wheel"] .mos-wheel-history-heading h2 { margin: 0; }
html body[data-page="wheel"] .mos-wheel-history-heading span { color: #a5a7a3; font-size: .8125rem; }
html body[data-page="wheel"] .mos-wheel-history-empty { margin: 0; color: #a5a7a3; font-size: .875rem; }
html body[data-page="wheel"] .mos-wheel-history-list { margin: 0; padding: 0; list-style: none; }
html body[data-page="wheel"] .mos-wheel-history-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #292e2e; color: #d8d8cf; font-size: .875rem; line-height: 1.6; }
html body[data-page="wheel"] .mos-wheel-history-list li:first-child { border-top: 0; padding-top: 0; }
html body[data-page="wheel"] .mos-wheel-history-list time { color: #a5a7a3; font-variant-numeric: tabular-nums; }
html body[data-page="wheel"] [data-wheel-state="spinning"] .mos-wheel-light { animation: mos-wheel-light 700ms ease-in-out infinite alternate; }
html body[data-page="wheel"] [data-wheel-state="spinning"] .mos-wheel-light:nth-child(odd) { animation-delay: -350ms; }
@keyframes mos-wheel-light { from { opacity: .3; } to { opacity: 1; } }
@keyframes mos-wheel-reveal { from { box-shadow: 0 0 26px #cdb57b30; } to { box-shadow: 0 0 0 #cdb57b00; } }
@media (max-width: 639px) {
  html body[data-page="wheel"] .mos-wheel-card-content { padding: 20px 16px; gap: 14px; }
  html body[data-page="wheel"] .mos-wheel-result { padding: 20px; }
  html body[data-page="wheel"] .mos-wheel-result-text { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html body[data-page="wheel"] :is(.mos-wheel-light, .mos-wheel-result, .mos-wheel-winner-aura) { animation: none !important; }
  html body[data-page="wheel"] :is(.mos-wheel-hub, .mos-wheel-prize-item, .mos-wheel-sector-shade, .mos-wheel-sector-spot, .mos-wheel-winner-aura) { transition: none; }
}

/* Mechanical single-wheel presentation: spinning prizes, fixed upward hand. */
html body[data-page="wheel"] .mos-wheel-mechanical .mos-wheel-stage { width: min(100%, 480px); }
html body[data-page="wheel"] .mos-wheel-mechanical .mos-wheel-wedge { fill-opacity: .16; }
html body[data-page="wheel"] .mos-wheel-mechanical .mos-wheel-sector.is-winner .mos-wheel-wedge { fill-opacity: .45; stroke: #ead29a; stroke-width: 1.3px; }
html body[data-page="wheel"] .mos-wheel-mechanical .mos-wheel-label { font-size: 30px; font-weight: 500; }
html body[data-page="wheel"] .mos-wheel-mechanical .mos-wheel-label[lang="th"] { font-family: 'Noto Sans Thai', sans-serif; letter-spacing: normal; }
html body[data-page="wheel"] .mos-wheel-label-outline { filter: drop-shadow(0 1px 1.5px #000d); }
html body[data-page="wheel"] .mos-wheel-mechanical .mos-wheel-hub-anchor { width: 16.5%; }
html body[data-page="wheel"] .mos-wheel-prize-board { transform-origin: 320px 320px; }
html body[data-page="wheel"] [data-wheel-state="spinning"] .mos-wheel-prize-board { will-change: transform; }
html body[data-page="wheel"] .mos-wheel-selector { pointer-events: none; }
html body[data-page="wheel"] .mos-wheel-selector-frame { filter: drop-shadow(0 5px 3px #0009); }
html body[data-page="wheel"] .mos-wheel-selector-channel { stroke-opacity: .9; }
html body[data-page="wheel"] .mos-wheel-spin-exposure { z-index: 0; pointer-events: none; }
html body[data-page="wheel"] :is(.mos-wheel-selector-blue, .mos-wheel-selector-gold) { transition: opacity 650ms ease; }
html body[data-page="wheel"] .mos-wheel-selector-blue { opacity: 1; }
html body[data-page="wheel"] .mos-wheel-selector-gold { opacity: 0; }
html body[data-page="wheel"] [data-wheel-state="result"] .mos-wheel-selector-blue { opacity: 0; }
html body[data-page="wheel"] [data-wheel-state="result"] .mos-wheel-selector-gold { opacity: 1; }
html body[data-page="wheel"] .mos-wheel-selector-edge { stroke-opacity: .86; }
html body[data-page="wheel"] .mos-wheel-hand { filter: drop-shadow(0 3px 3px #000b); }
html body[data-page="wheel"] [data-wheel-state="result"] .mos-wheel-hand { filter: drop-shadow(0 2px 2px #000a) drop-shadow(0 0 5px #cdb57b44); }
@media (prefers-reduced-motion: reduce) {
  html body[data-page="wheel"] :is(.mos-wheel-selector-blue, .mos-wheel-selector-gold) { transition: none; }
}
