/* Xomexo — spin wheel dialog, post-order scratch card. */

/* ---------- dialogs ---------- */
.spin-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 12px; }
.spin-backdrop { position: absolute; inset: 0; background: rgba(15,17,17,.55); opacity: 0; transition: opacity .2s; }
.spin-panel { position: relative; width: min(400px, 100%); max-height: calc(100svh - 24px); overflow-y: auto; background: #fff; border-radius: 10px; padding: 1.4rem 1.2rem 1.1rem; text-align: center; transform: translateY(8px); opacity: 0; transition: transform .2s, opacity .2s; }
.spin-modal.is-open .spin-backdrop { opacity: 1; }
.spin-modal.is-open .spin-panel { transform: none; opacity: 1; }
.spin-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--tint); font-size: 1.3rem; line-height: 1; color: var(--muted); }
.spin-panel h2 { margin: .3rem 0 .2rem; font-size: 1.4rem; }
.spin-sub { color: var(--muted); margin-bottom: 1rem; font-size: .9rem; }

/* ---------- wheel ---------- */
.wheel-wrap { position: relative; width: min(280px, 74vw); margin: 0 auto 1rem; }
.wheel { width: 100%; aspect-ratio: 1; will-change: transform; }
.wheel svg { width: 100%; height: 100%; display: block; }
.wheel-pointer { position: absolute; z-index: 2; top: -4px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 22px solid var(--red); filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.spin-go { height: 46px; }
.spin-result:empty { display: none; }
.prize { text-align: left; background: #f0faf6; border: 1px solid #b7e2d3; border-radius: var(--r); padding: .8rem .9rem; }
.prize strong { display: block; font-weight: 500; }
.prize span { font-size: .88rem; color: var(--muted); }
.prize--miss { background: var(--tint); border-color: var(--line); }
.prize-actions { display: flex; gap: .5rem; justify-content: center; margin-top: .8rem; flex-wrap: wrap; }
.spin-next { font-size: .82rem; color: var(--muted); margin: .7rem 0 0; }
.spin-terms { font-size: .76rem; color: var(--faint); margin: .9rem 0 0; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--tint); border: 1px solid var(--line); padding: 0 .35rem; border-radius: 3px; letter-spacing: .04em; color: var(--ink); }

/* ---------- scratch card (shown after an order) ---------- */
.scratch-head { font-weight: 500; margin: .2rem 0 .6rem; }
.scratch { position: relative; height: 140px; border-radius: var(--r); border: 1px dashed #c9ced6; background: #fff; overflow: hidden; touch-action: none; user-select: none; margin-bottom: .2rem; }
.scratch-prize { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .15rem; text-align: center; padding: .8rem; }
.scratch-prize strong { font-size: 1.05rem; font-weight: 700; }
.scratch-prize span { font-size: .85rem; color: var(--muted); }
.scratch-foil { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; transition: opacity .5s; }
.scratch-foil:active { cursor: grabbing; }
.scratch-foil.is-gone { opacity: 0; pointer-events: none; }
.scratch.is-revealed { border-style: solid; border-color: var(--green); }
.link-btn { background: none; border: 0; padding: 0; margin-top: .6rem; font-size: .84rem; color: var(--blue); }
.link-btn:hover { text-decoration: underline; }

/* ---------- rewards in the list drawer ---------- */
.list-rewards { background: #f0faf6; border: 1px solid #b7e2d3; border-radius: var(--r); padding: .7rem .8rem; margin-bottom: .7rem; }
.list-rewards-title { font-weight: 500; margin: 0 0 .4rem; }
.reward { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center; padding: .3rem 0; }
.reward + .reward { border-top: 1px solid #d3ece2; }
.reward strong { display: block; font-size: .88rem; font-weight: 400; }
.reward small { color: var(--muted); }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 200; }

