/* SV.Yaksa web gacha v2: roulette strip (look of the lucky-bag mock "แถบวิ่ง"), crimson + gold. No inline styles needed (CSP-friendly). */
:root { color-scheme: dark; --bg:#120606; --panel:#2e0f10; --line:#784f28; --gold:#e4be70; --gold2:#ffe7a8; --fg:#ead6b0; --muted:#c4a988;
  --tC:#9aa3ab; --tR:#5aa8ff; --tE:#c77dff; --tL:#ffb02e; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin:0; background: radial-gradient(ellipse at top, #2a0c0d, var(--bg) 70%); color: var(--fg); font: 400 16px/1.55 "Sarabun","Leelawadee UI",Tahoma,sans-serif; padding: 14px 14px 48px; min-height: 100vh; }
.gx { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
a { color: var(--gold); }
.muted { color: var(--muted); }
.gx-top { display:flex; flex-wrap:wrap; gap:10px; justify-content:space-between; align-items:center; }
.gx-logo img { height: 46px; display:block; }
.gx-acc { display:flex; flex-wrap:wrap; gap:10px; align-items:center; font-size:.95rem; }
.gx-acc select { font: inherit; background:#1a0808; color: var(--fg); border:1px solid var(--line); padding: 2px 6px; max-width: 190px; }
.gx-note { background: var(--panel); border:1px solid var(--line); padding: 10px 14px; }
.gx-note.err { border-color:#b8281a; color:#ffb4a8; }
.gx-note.ok { border-color:#6fc46a; color:#c8f0c4; }
.gx-tabs { display:flex; flex-wrap:wrap; gap:6px; }
.gx-tabs button { font: inherit; font-weight:700; cursor:pointer; background:none; padding: 6px 14px; border:1px solid var(--line); color: var(--gold); }
.gx-tabs button[aria-pressed="true"] { background: var(--gold); color:#2a0b05; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
.win { position: relative; background: linear-gradient(#3a1214, #250a0b); border: 2px solid var(--gold); box-shadow: 0 0 0 4px #4a1a10, 0 0 0 5px var(--line), 0 10px 40px #000a; padding: 18px; overflow: hidden; }
.ttl { display:flex; justify-content:center; align-items:center; gap:10px; font-weight:800; color: var(--gold2); font-size: 1.35rem; text-shadow: 0 0 8px #ffb02e66; }
.seal { display:inline-grid; place-items:center; width:42px; height:42px; border-radius:50%; border:2px double var(--gold); background: radial-gradient(#a01a08,#4a0603); color:#ffd77a; font-family:"KaiTi","STKaiti","Microsoft JhengHei",serif; font-size:1.6rem; text-shadow:0 0 8px #ff4000; }
.sub { text-align:center; color: var(--muted); font-size: .92rem; margin: 2px 0 12px; }
/* the strip */
.rs { position:relative; width:100%; height: 120px; overflow:hidden; background:#0d0404; border:2px solid var(--line); }
.rs .track { position:absolute; top: 19px; left:0; display:flex; gap: 8px; will-change: transform; }
.rs .pin { position:absolute; top:0; bottom:0; left:50%; width:3px; margin-left:-1.5px; background: var(--gold2); box-shadow: 0 0 10px var(--gold2); z-index:2; }
.rs .pin::before, .rs .pin::after { content:""; position:absolute; left:-7px; border: 8px solid transparent; }
.rs .pin::before { top:0; border-top-color: var(--gold2); }
.rs .pin::after { bottom:0; border-bottom-color: var(--gold2); }
.rs .fade { position:absolute; inset:0; pointer-events:none; background: linear-gradient(90deg, #000d, transparent 25%, transparent 75%, #000d); z-index:1; }
.card { --rc: var(--tC); width: 78px; height: 78px; border-radius: 8px; display:grid; place-items:center; position:relative; flex: none; background: radial-gradient(circle at 50% 35%, #ffffff22, #00000066); border: 2px solid var(--rc); box-shadow: inset 0 0 12px var(--rc), 0 0 6px #0008; }
.card img { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; }
.card .gl { font-size: 1.6rem; font-weight: 800; color: var(--rc); }
.card b { position:absolute; bottom: 2px; left:2px; right:2px; text-align:center; font-size: .58rem; color:#fff; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }
.card i { position:absolute; top:2px; right:4px; font-style:normal; font-size:.62rem; font-weight:800; color:#fff; text-shadow:0 1px 2px #000; }
.t-C { --rc: var(--tC); } .t-R { --rc: var(--tR); } .t-E { --rc: var(--tE); } .t-L { --rc: var(--tL); }
.c-C { color: var(--tC); } .c-R { color: var(--tR); } .c-E { color: var(--tE); } .c-L { color: var(--tL); }
.result { min-height: 56px; margin-top: 10px; text-align:center; display:grid; place-items:center; gap:2px; }
.result .big { font-size: 1.25rem; font-weight: 800; }
.cards { display:grid; grid-template-columns: repeat(5, 78px); gap: 10px; justify-content:center; margin-top: 8px; }
.cards .card { animation: pop .35s ease-out both; }
.cards .card.best { box-shadow: 0 0 0 2px var(--gold2), 0 0 16px var(--rc), inset 0 0 12px var(--rc); }
@keyframes pop { from { transform: scale(.4); opacity:0 } to { transform: none; opacity:1 } }
.controls { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; align-items:center; margin-top: 14px; }
button { font: inherit; font-weight: 800; cursor: pointer; border: 0; }
.go { background: linear-gradient(#ffe7a8, #e4be70 45%, #a5772c); color: #3a0f06; padding: 9px 26px; font-size: 1.05rem; border: 2px solid #fff3; box-shadow: 0 4px 0 #6b4515, 0 0 18px #ffb02e55; display:grid; line-height:1.2; }
.go small { font-size:.78rem; font-weight:700; }
.go.ten { background: linear-gradient(#ffd0a8, #e48a50 45%, #a5442c); }
.go:active { transform: translateY(2px); box-shadow: 0 2px 0 #6b4515; }
.go:disabled { filter: grayscale(.6) brightness(.7); cursor: default; }
.ghost { background: none; color: var(--gold); border: 1px solid var(--line); padding: 8px 16px; }
.meta { text-align:center; color: var(--muted); font-size: .88rem; margin-top: 10px; }
.flash { position:absolute; inset:0; pointer-events:none; opacity:0; }
.flash.on { animation: fl 1.5s ease-out; }
.flash.fE { background: radial-gradient(circle, #c77dffaa, transparent 70%); }
.flash.fL { background: radial-gradient(circle, #ffd86baa, transparent 70%); }
@keyframes fl { 0%{opacity:0} 10%{opacity:1} 100%{opacity:0} }
.spark { position:absolute; width:6px; height:6px; border-radius:50%; pointer-events:none; z-index: 5; background:#ffe7a8; }
.spark.sE { background:#e2b6ff; }
.cols { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px) { .cols { grid-template-columns: 1fr; } .cards { grid-template-columns: repeat(5, 58px); gap:6px; } .cards .card { width:58px; height:58px; } .cards .card img { width:34px; height:34px; } }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 14px; display:grid; gap: 8px; align-content:start; }
.panel h2 { margin:0; color: var(--gold); font-size: 1.05rem; }
.panel ul { margin:0; padding-left: 20px; color: var(--muted); font-size:.92rem; }
.rt { width:100%; border-collapse: collapse; font-size:.9rem; }
.rt td { padding: 3px 4px; border-bottom: 1px solid #4a2a1a; }
.rt td.n { text-align:right; white-space:nowrap; }
.rt img { width: 24px; height: 24px; vertical-align: middle; }
.rt tr.th td { color: var(--gold); font-weight:800; padding-top:8px; }
.hist { font-size:.88rem; display:grid; gap:2px; max-height: 260px; overflow:auto; }
.ask { background: var(--panel); color: var(--fg); border: 2px solid var(--gold); max-width: 360px; }
.ask::backdrop { background: #000a; }
@media (prefers-reduced-motion: reduce) { .cards .card { animation: none; } }
