/* Richer scenery for the earlier games (public/scenes.js). Each decoration layer (.xs-deco) sits behind its
   container's content: the container gets its own stacking context (isolation) and the layer z-index −1, so nothing
   in the game's layout moves. Everything here is decoration only. */
:is(.tw-temple, .dc-lab, .rl-top, .wf-box, .wf-stage, .bj-felt, .bc-table, .dt-cards, .dt-side, .sv-sign, .sv-machine) { position: relative; isolation: isolate; }
.xs-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; border-radius: inherit; }

/* ---------- TOWERS: night temple ---------- */
.tw-temple { background: transparent; overflow: hidden; padding-left: 26px; padding-right: 26px; }
.tw-sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.tw-pillar { position: absolute; top: 0; bottom: 0; width: 22px; background: repeating-linear-gradient(180deg, #a7803f 0 26px, #8a6430 26px 28px), linear-gradient(90deg, #6b4a1e, #d9b97c 50%, #6b4a1e);
  background-blend-mode: multiply; box-shadow: inset 0 0 0 1px rgba(92,61,20,.8), 0 0 18px rgba(0,0,0,.6); }
.tw-pillar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 10px, rgba(53,210,157,.25) 10px 12px, transparent 12px 28px); }
.tw-pillar.l { left: 0; } .tw-pillar.r { right: 0; }
.tw-torch { position: absolute; top: 30%; width: 14px; height: 60px; }
.tw-torch.l { left: 4px; } .tw-torch.r { right: 4px; }
.tw-torch b { position: absolute; left: 3px; top: 22px; width: 8px; height: 38px; border-radius: 2px; background: linear-gradient(90deg, #3a2008, #7a4a1a, #3a2008); }
.tw-torch i { position: absolute; left: -9px; top: -14px; width: 32px; height: 44px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 75%, #fff8d0 0 18%, #ffd24a 30%, #ff7a1a 58%, rgba(255,60,0,0) 72%); filter: blur(.4px); animation: twFlame .22s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.tw-torch i::after { content: ''; position: absolute; left: -60px; top: -40px; width: 152px; height: 152px; border-radius: 50%; background: radial-gradient(circle, rgba(255,160,40,.32), rgba(255,120,20,0) 65%); }
@keyframes twFlame { to { transform: scaleY(1.12) scaleX(.92) translateY(-2px); } }
body.xs-busy .tw-torch i { animation-duration: .12s; filter: brightness(1.25); }
.tw-shrine { width: min(150px, 46%); margin: 4px auto -4px; position: relative; z-index: 1; }
.tw-shrine svg { display: block; width: 100%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.tw-tile { position: relative; overflow: hidden; height: 42px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cg fill='none' stroke='%235c3d14' stroke-width='1.6' opacity='.45'%3E%3Cpath d='M22 12 h16 v16 h-16z M26 16 h8 v8 h-8z M18 20 h-6 M42 20 h6 M30 8 v-4 M30 32 v4'/%3E%3C/g%3E%3C/svg%3E") center / 60px 40px no-repeat,
    radial-gradient(120% 90% at 30% 20%, #f0d59a, #b8904a 55%, #8a6430); }
.tw-tile::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 3px, transparent 3px 9px); }
.tw-floor.cur .tw-tile { box-shadow: inset 0 -4px 0 rgba(92,61,20,.55), inset 0 2px 0 rgba(255,240,200,.5), 0 0 16px rgba(255,176,46,.8); }
.tw-tile.safe { background: radial-gradient(circle at 50% 40%, #6dffc8 0 10%, #2b6e57 45%, #123c2e); box-shadow: 0 0 16px rgba(53,210,157,.7); }
.tw-tile.trap { background: radial-gradient(circle at 50% 60%, #ffd24a 0 12%, #ff5a1f 40%, #5a0a00); box-shadow: 0 0 18px rgba(255,90,31,.8); }
.tw-x { text-shadow: 0 1px 2px #000; }
.tw-title { position: relative; }

/* ---------- DICE: holographic lab ---------- */
.dc-lab { background: radial-gradient(120% 70% at 50% 0%, #2a1170, #0b0620 70%); }
.dc-hex { position: absolute; inset: 0; opacity: .32;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0 L28 8 V24 L14 32 L0 24 V8Z M14 32 V48' fill='none' stroke='%2322e3ff' stroke-width='1'/%3E%3C/svg%3E"); background-size: 28px 48px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); }
.dc-floor { position: absolute; left: -20%; right: -20%; bottom: -10%; height: 55%; transform: perspective(240px) rotateX(58deg); transform-origin: 50% 100%;
  background: linear-gradient(rgba(155,92,255,.55) 1.5px, transparent 1.5px) 0 0 / 100% 26px, linear-gradient(90deg, rgba(34,227,255,.5) 1.5px, transparent 1.5px) 0 0 / 30px 100%; animation: dcFloor 2.5s linear infinite; mask-image: linear-gradient(transparent, #000 60%); -webkit-mask-image: linear-gradient(transparent, #000 60%); }
@keyframes dcFloor { to { background-position: 0 26px, 0 0; } }
.dc-scan { position: absolute; left: 0; right: 0; height: 40px; background: linear-gradient(transparent, rgba(34,227,255,.18), transparent); animation: dcScan 4s linear infinite; }
@keyframes dcScan { from { top: -40px; } to { top: 100%; } }
.dc-die { position: absolute; top: 46px; width: 58px; height: 58px; filter: drop-shadow(0 0 14px rgba(155,92,255,.8)) drop-shadow(0 10px 10px rgba(0,0,0,.5)); animation: dcFloat 3s ease-in-out infinite; }
.dc-die svg { width: 100%; height: 100%; }
.dc-die.a { left: 10px; transform: rotate(-16deg); } .dc-die.b { right: 10px; transform: rotate(14deg); animation-delay: -1.5s; }
@keyframes dcFloat { 50% { translate: 0 -8px; } }
body.xs-busy .dc-die { animation: dcTumble .5s linear infinite; }
body.xs-busy .dc-die.b { animation-direction: reverse; }
@keyframes dcTumble { from { transform: rotate(0deg) scale(1.05); } to { transform: rotate(360deg) scale(1.05); } }
.dc-roll b { text-shadow: 0 0 18px #22e3ff, 0 0 40px rgba(155,92,255,.9); }

/* ---------- ROULETTE: Monte Carlo salon ---------- */
.rl-top { padding: 6px 0 2px; border-radius: 26px; overflow: hidden; }
.rl-deco { background: radial-gradient(80% 60% at 50% 0%, rgba(255,214,120,.28), transparent 70%), linear-gradient(180deg, #1a0d06, #0a2a18 85%); }
.rl-bokeh i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle, rgba(255,214,120,.55), rgba(255,180,60,0) 70%); animation: rlBokeh var(--d) ease-in-out infinite alternate; }
@keyframes rlBokeh { to { opacity: .35; transform: scale(1.3); } }
.rl-chand { position: absolute; left: 50%; top: -30px; width: 220px; height: 110px; margin-left: -110px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,240,200,.45), rgba(255,240,200,0) 70%); }
.rl-wheelbox { filter: drop-shadow(0 18px 22px rgba(0,0,0,.7)); }

/* ---------- WHEEL OF FORTUNE: game-show stage ---------- */
.wf-stage { overflow: hidden; }
.wf-deco { background: radial-gradient(120% 70% at 50% 0%, #5a1490, #1a0630 70%); }
.wf-spot { position: absolute; top: -20%; width: 60%; height: 130%; background: conic-gradient(from 168deg at 50% 0%, transparent 0deg, rgba(255,245,200,.22) 10deg, transparent 24deg); animation: wfSweep 6s ease-in-out infinite alternate; transform-origin: 50% 0%; }
.wf-spot.a { left: -10%; } .wf-spot.b { right: -10%; animation-delay: -3s; animation-direction: alternate-reverse; }
@keyframes wfSweep { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
.wf-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(255,211,107,.12)), repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 30px); }
.wf-confetti i { position: absolute; top: -10px; left: var(--x); width: 6px; height: 10px; background: var(--c); border-radius: 1px; opacity: .8; animation: wfFall var(--d) linear infinite; animation-delay: var(--del); }
@keyframes wfFall { to { transform: translateY(600px) rotate(720deg); } }
.wf-box { --R: min(41vw, 160px); }
.wf-bulbs { overflow: visible; }
.wf-bulbs i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: #ffe9a0; box-shadow: 0 0 6px 2px rgba(255,214,90,.8);
  transform: rotate(var(--a)) translateY(calc(var(--R) * -1.03)); animation: wfBulb 1.2s steps(1) infinite; animation-delay: calc(var(--i) * -0.1s); }
@keyframes wfBulb { 50% { background: #ff4f7b; box-shadow: 0 0 6px 2px rgba(255,79,123,.8); } }
body.xs-busy .wf-bulbs i { animation-duration: .35s; }

/* ---------- BLACKJACK: a real table ---------- */
.bj-felt { background: repeating-radial-gradient(circle at 30% 30%, rgba(255,255,255,.015) 0 1px, transparent 1px 3px), radial-gradient(110% 80% at 50% 10%, #22985a, #0b4a28 70%, #06301a);
  box-shadow: inset 0 0 0 10px #4a2410, inset 0 0 0 12px #c9a227, inset 0 0 0 14px #2a1206, inset 0 0 40px 16px rgba(0,0,0,.45), 0 18px 34px rgba(0,0,0,.6); padding-top: 70px; }
.bj-tray { position: absolute; top: 14px; left: 50%; width: min(58%, 210px); transform: translateX(-50%); filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.bj-shoe { position: absolute; top: 14px; right: 18px; width: 54px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.bj-insure { position: absolute; left: 50%; bottom: 26%; transform: translateX(-50%); width: 72%; padding: 4px 0; text-align: center; border-top: 1.5px solid rgba(243,228,161,.5); border-bottom: 1.5px solid rgba(243,228,161,.5);
  border-radius: 50% / 18px; font: 800 9.5px/1 Georgia, serif; letter-spacing: .25em; color: rgba(243,228,161,.55); }
.bj-lamp { position: absolute; left: 50%; top: -40px; width: 300px; height: 200px; margin-left: -150px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,240,190,.22), transparent 70%); }

/* ---------- BACCARAT: royal salon ---------- */
.bc-table { background: repeating-radial-gradient(circle at 70% 20%, rgba(255,255,255,.015) 0 1px, transparent 1px 3px), radial-gradient(110% 80% at 50% 0%, #1f4fb0, #0a1f5c 70%, #06123a);
  box-shadow: inset 0 0 0 8px #0a0f26, inset 0 0 0 10px #e9c46a, inset 0 0 40px 12px rgba(0,0,0,.4), 0 18px 34px rgba(0,0,0,.55); }
.bc-chand { position: absolute; left: 50%; top: -60px; width: 320px; height: 180px; margin-left: -160px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,250,220,.35), transparent 70%); }
.bc-chand::after { content: '✦ ✧ ✦ ✧ ✦'; position: absolute; left: 0; right: 0; top: 66px; text-align: center; color: rgba(255,250,220,.6); font-size: 10px; letter-spacing: 10px; animation: bcTwinkle 2s ease-in-out infinite alternate; }
@keyframes bcTwinkle { to { opacity: .3; } }
.bc-fil { position: absolute; width: 46px; height: 46px; opacity: .8; }
.bc-fil.tl { left: 10px; top: 10px; } .bc-fil.tr { right: 10px; top: 10px; transform: scaleX(-1); } .bc-fil.bl { left: 18px; bottom: 30px; transform: scaleY(-1); } .bc-fil.br { right: 18px; bottom: 30px; transform: scale(-1); }

/* ---------- DRAGON TIGER: the beasts behind their cards, lanterns ---------- */
.dt-cards { padding: 22px 6px 10px; border-radius: 20px; background: radial-gradient(90% 80% at 50% 50%, #8a0f16, #3a0306 75%); box-shadow: inset 0 0 0 2px rgba(232,184,74,.5), inset 0 0 30px rgba(0,0,0,.6); }
.dt-cloud { position: absolute; inset: 0; opacity: .18;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cpath d='M4 30 q6 -12 16 -6 q4 -14 18 -8 q10 -10 20 2 q12 -2 14 12' fill='none' stroke='%23e8b84a' stroke-width='2'/%3E%3C/svg%3E"); background-size: 80px 40px; }
.dt-lantern { position: absolute; top: -4px; width: 24px; height: 46px; transform-origin: 50% 0; animation: dtSwing 3s ease-in-out infinite alternate; }
.dt-lantern.l { left: 8px; } .dt-lantern.r { right: 8px; animation-delay: -1.5s; }
.dt-lantern::before { content: ''; position: absolute; left: 11px; top: 0; width: 2px; height: 10px; background: #e8b84a; }
.dt-lantern i { position: absolute; left: 0; top: 10px; width: 24px; height: 30px; border-radius: 45%; background: radial-gradient(circle at 50% 40%, #ffd36b, #e5332a 60%, #7a0a0a); box-shadow: 0 0 16px rgba(255,120,60,.7); }
.dt-lantern i::after { content: ''; position: absolute; left: 9px; bottom: -8px; width: 6px; height: 8px; background: #e8b84a; border-radius: 0 0 3px 3px; }
@keyframes dtSwing { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.dt-side { overflow: hidden; }
.dt-beast { position: absolute; z-index: -1; inset: auto; width: 115%; left: -8%; bottom: -10%; opacity: .45; filter: saturate(1.2) drop-shadow(0 0 12px rgba(0,0,0,.6)); pointer-events: none; }
.dt-side.tiger .dt-beast { transform: scaleX(-1); }

/* ---------- LUCKY SEVENS: Vegas marquee ---------- */
.sv-bulbs { overflow: visible; }
.sv-bulbs i { position: absolute; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #fff2b0; box-shadow: 0 0 6px 2px rgba(255,207,46,.85); animation: svBulb .9s steps(1) infinite; animation-delay: calc(var(--i) * -0.075s); }
@keyframes svBulb { 50% { background: #ff5ad6; box-shadow: 0 0 6px 2px rgba(255,90,214,.85); } }
body.xs-busy .sv-bulbs i { animation-duration: .3s; }
.sv-sign { padding-top: 16px; padding-bottom: 16px; }
.sv-tray { position: relative; height: 34px; margin: 10px 6px 0; border-radius: 0 0 18px 18px; background: linear-gradient(180deg, #1a1a22, #3a3a48); box-shadow: inset 0 6px 10px rgba(0,0,0,.7); }
.sv-tray i { position: absolute; left: var(--x); bottom: 6px; width: 22px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff3b0, #ffcf2e 50%, #a86a00); transform: rotate(var(--r)); box-shadow: 0 1px 2px rgba(0,0,0,.6); }

@media (prefers-reduced-motion: reduce) { .xs-deco *, .tw-torch i, .dc-die, .wf-bulbs i, .sv-bulbs i, .dt-lantern { animation: none !important; } }
html.lite .dc-floor, html.lite .dc-scan, html.lite .wf-confetti, html.lite .rl-bokeh i, html.lite .wf-spot { animation: none; }

/* ---------- MINES: crystal cavern ---------- */
.mn-cave { isolation: isolate; background: transparent; }
.mn-deco svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mn-crys { filter: drop-shadow(0 0 8px rgba(183,124,255,.7)); animation: mnGlow 3s ease-in-out infinite alternate; }
@keyframes mnGlow { to { filter: drop-shadow(0 0 14px rgba(46,229,157,.8)); } }
.mn-lantern { position: absolute; top: 0; left: 50%; width: 2px; height: 40px; background: #3a2a1a; transform-origin: 50% 0; animation: dtSwing 4s ease-in-out infinite alternate; }
.mn-lantern i { position: absolute; left: -11px; top: 38px; width: 24px; height: 28px; border-radius: 6px 6px 10px 10px; background: radial-gradient(circle at 50% 55%, #fff3c0, #ffb547 45%, #8a4a10); box-shadow: 0 0 30px 10px rgba(255,181,71,.35); }
.mn-tile { background:
    linear-gradient(125deg, transparent 40%, rgba(183,124,255,.35) 42%, transparent 46%),
    linear-gradient(35deg, transparent 58%, rgba(46,229,157,.22) 60%, transparent 63%),
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.16), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,.25) 1px, transparent 2px) 0 0 / 9px 9px,
    linear-gradient(160deg, #6a5f55, #3d352f 55%, #27211d); }
.mn-tile.open { background: radial-gradient(circle at 50% 45%, #241a2e, #0c0908); }

/* ---------- HI-LO: velvet lounge ---------- */
.hl-table { position: relative; isolation: isolate; }
.hl-curtain { position: absolute; top: 0; bottom: 0; width: 26px; background: repeating-linear-gradient(90deg, #5a0a1a 0 6px, #8a1a30 6px 10px, #4a0614 10px 14px); box-shadow: inset -6px 0 10px rgba(0,0,0,.5); }
.hl-curtain.l { left: 0; border-radius: 0 0 30px 0; } .hl-curtain.r { right: 0; transform: scaleX(-1); border-radius: 0 0 30px 0; }
.hl-chand { position: absolute; left: 50%; top: -50px; width: 300px; height: 170px; margin-left: -150px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,200,180,.3), transparent 70%); }

/* ---------- KENO: lottery hall stage, glossy number balls ---------- */
.card.stage { isolation: isolate; }
.kn-beam { position: absolute; left: -10px; top: -20px; width: 160px; height: 180px; background: radial-gradient(ellipse at 40% 40%, rgba(255,220,120,.25), transparent 65%); }
.kn-rays { position: absolute; left: 50px; top: 50px; width: 0; height: 0; }
.kn-rays::before { content: ''; position: absolute; left: -120px; top: -120px; width: 240px; height: 240px; background: repeating-conic-gradient(rgba(255,220,120,.08) 0 8deg, transparent 8deg 22deg); border-radius: 50%; animation: knSpin 30s linear infinite; mask-image: radial-gradient(circle, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%); }
@keyframes knSpin { to { transform: rotate(360deg); } }
.board .cell { position: relative; }
.board .cell::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.22), transparent 45%); box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); }
html.lite .kn-rays::before, html.lite .mn-crys, html.lite .mn-lantern { animation: none; }

/* ---------- FRUIT BLENDER: neon juice bar ---------- */
#tab-slots .sl-machine { isolation: isolate; background: linear-gradient(180deg, #0d2414 0 104px, #13301c 104px, #081409); padding-top: 116px; overflow: hidden; }
.sl-deco svg { position: absolute; left: 0; top: 0; width: 100%; height: 104px; }
.sl-sign { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 900 22px/1 'Arial Black', Arial, sans-serif; letter-spacing: .1em; color: #ff8ad8;
  text-shadow: 0 0 6px #ff4fa3, 0 0 18px #ff4fa3, 0 0 34px #ff4fa3; animation: slNeon 4s infinite; }
.sl-sign b { color: #b8ff3c; text-shadow: 0 0 6px #b8ff3c, 0 0 18px #b8ff3c, 0 0 34px #6aff00; }
@keyframes slNeon { 0%, 18%, 22%, 100% { opacity: 1; } 20% { opacity: .55; } }
#tab-slots .sl-window { background: linear-gradient(180deg, #fffdf5, #ffe9c2); box-shadow: inset 0 3px 10px rgba(0,0,0,.25), 0 0 0 3px #0b1f10, 0 0 26px rgba(255,154,31,.35); }
#tab-slots .sl-reel { background: linear-gradient(180deg, #ffffff, #fff1d6); }
#tab-slots .sl-sym { filter: saturate(1.25) drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
html.lite .sl-sign { animation: none; }
