/* 8.2: five distinct worlds. The approved crystal capsule is unchanged. */
body[data-room=blue]{--room-image:url('room-blue-v820.webp')}
body[data-room=star]{--room-image:url('room-star-v820.webp');--crystal-metal:#d4b9ee;--crystal-light:#f5eaff;--crystal-aura:#b075e760}
body[data-room=star]::before{background-image:radial-gradient(ellipse at 50% 44%,transparent 20%,#02030838 80%),var(--room-image)}
body[data-room] .room-switch{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:min(490px,calc(100% - 8px));max-width:100%;border-radius:16px;padding:3px;gap:3px}
body[data-room] .room-switch button{display:grid;grid-template-columns:8px auto;justify-content:center;align-content:center;column-gap:6px;row-gap:1px;border-radius:12px;min-height:39px;padding:3px 6px;font-size:10px;white-space:nowrap}
body[data-room] .room-switch button::before{width:6px;height:6px;grid-column:1;grid-row:1;align-self:center}
body[data-room] .room-switch button small{grid-column:2;font-size:8px;line-height:10px;opacity:.72;font-weight:400;letter-spacing:.03em}
body[data-room] .room-switch button:disabled{opacity:.65;cursor:wait}
.room-switch #room-abyss::before{background:#1745ac;box-shadow:0 0 7px #3479d9}
.room-switch #room-star::before{background:#c6a1ff;box-shadow:0 0 8px #b075e7}
body[data-room=abyss] .room-switch button[aria-pressed=true]{background:#163b7529;border-color:#668fc3;color:#e0eaff}
body[data-room=star] .room-switch button[aria-pressed=true]{background:#9672cf2b;border-color:#c4a2ea;color:#f5eaff}
.room-range-caption{margin:0 0 2px;text-align:center;font:500 7px/10px 'Manrope',sans-serif;letter-spacing:.14em;color:#d9d2c1}
body[data-room] .orbit-console>.spin{flex-direction:row;font-size:12px;letter-spacing:.14em}
body[data-room] .bet-hint{display:block;font-size:8px;line-height:10px;margin:2px 0 0;text-align:center;color:#c9c6ba;min-height:10px}
body[data-room] .bet-error{font-size:9px;line-height:12px;margin:2px 0 0;text-align:center}
body[data-room] .result{height:36px;min-height:36px;max-height:36px;overflow:auto;scrollbar-width:none}
body[data-room] main{padding-top:0;min-height:0}
body[data-room] .game-content{min-height:0}
body[data-room] .reels{--row-min:32;--row:clamp(32px,min(24vw,calc((100svh - 305px)/3.6)),210px)}
.world-effects{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden;contain:strict}
.volcano-scene,.sky-meteors,.celestial-orbits{display:none;position:absolute;inset:0}
body[data-room=red] .volcano-scene,body[data-room=blue] .sky-meteors,body[data-room=star] .sky-meteors,body[data-room=star] .celestial-orbits{display:block}
.lava-scene{position:absolute;inset:0;width:100%;height:100%;overflow:hidden}
.lava-river{fill:none;stroke:url('#lava-gradient');stroke-width:14;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1100;animation:lava-arrival 18s ease-in-out infinite;opacity:.9}
.lava-river.glow{stroke:#ff3908;stroke-width:30;filter:url('#lava-glow');opacity:.6}
.lava-stream{fill:none;stroke:#ffd465;stroke-width:3;stroke-linecap:round;stroke-dasharray:8 52 22 40;animation:lava-flow 5s linear infinite;opacity:.65}
.crater-flare{transform-origin:1240px 348px;animation:crater-breathe 4s ease-in-out infinite}
.eruption-sparks{animation:eruption-rise 3s ease-out infinite}
@keyframes lava-arrival{0%,8%{stroke-dashoffset:1100;opacity:0}16%{opacity:.9}70%,92%{stroke-dashoffset:0;opacity:.9}100%{stroke-dashoffset:0;opacity:0}}
@keyframes lava-flow{from{stroke-dashoffset:244}to{stroke-dashoffset:0}}
@keyframes crater-breathe{0%,100%{opacity:.25;transform:scale(.7)}50%{opacity:.8;transform:scale(1.15)}}
@keyframes eruption-rise{from{transform:translate(0,12px);opacity:0}15%{opacity:1}to{transform:translate(-18px,-66px);opacity:0}}
.dragon-flight{position:absolute;left:0;top:15%;width:clamp(130px,23vw,380px);animation:dragon-crossing 34s linear infinite;filter:drop-shadow(0 4px 12px #ff542528)}
.dragon-flight img{display:block;width:100%;height:auto;animation:dragon-bank 4s ease-in-out infinite alternate}
@keyframes dragon-crossing{0%{transform:translate3d(105vw,0,0) scale(.55)}45%{transform:translate3d(45vw,8vh,0) scale(.9)}100%{transform:translate3d(-30vw,0,0) scale(.65)}}
@keyframes dragon-bank{from{transform:rotate(-5deg) scaleY(.94)}to{transform:rotate(4deg) scaleY(1)}}
.sky-meteors{height:45%;overflow:hidden}
.sky-meteors i{position:absolute;top:5%;left:85%;width:130px;height:1px;border-radius:100%;background:linear-gradient(90deg,transparent,#bddaff,#fff);opacity:0;transform:rotate(-28deg);animation:meteor-flight 11s linear infinite}
.sky-meteors i:nth-child(2){left:58%;top:0;animation-delay:4s;animation-duration:17s;width:90px}
.sky-meteors i:nth-child(3){left:96%;top:25%;animation-delay:7s;animation-duration:19s;width:70px}
@keyframes meteor-flight{0%,72%{opacity:0;transform:translate(0,0) rotate(-28deg)}75%{opacity:.9}88%,100%{opacity:0;transform:translate(-55vw,24vh) rotate(-28deg)}}
.celestial-orbits{inset:5% 10% 30%;perspective:650px;opacity:.62}
.celestial-orbits i{position:absolute;left:50%;top:38%;width:min(52vw,650px);aspect-ratio:1;border:1px solid #dbbcff30;border-radius:50%;transform-style:preserve-3d;animation:celestial-rotation 48s linear infinite}
.celestial-orbits i::after{content:'';position:absolute;width:7px;height:7px;left:50%;top:-4px;border-radius:50%;background:#eee0ff;box-shadow:0 0 12px 3px #c38bff80}
.celestial-orbits i:nth-child(2){width:min(42vw,520px);animation-duration:63s;animation-direction:reverse}
.celestial-orbits i:nth-child(3){width:min(65vw,790px);animation-duration:82s;opacity:.5}
.celestial-orbits span{position:absolute;inset:0;background:radial-gradient(circle at 15% 12%,#fff 0 1px,transparent 2px),radial-gradient(circle at 86% 26%,#d6b0ff 0 1px,transparent 3px),radial-gradient(circle at 8% 52%,#fff 0 1px,transparent 2px),radial-gradient(circle at 94% 64%,#fff 0 1px,transparent 3px);animation:star-shimmer 5s ease-in-out infinite alternate}
@keyframes celestial-rotation{from{transform:translate(-50%,-50%) rotateX(68deg) rotateZ(0)}to{transform:translate(-50%,-50%) rotateX(68deg) rotateZ(360deg)}}
@keyframes star-shimmer{from{opacity:.25}to{opacity:1}}
body[data-room=star] .orbit-console>.spin{background:linear-gradient(125deg,#f9edff,#ba9bd7 60%,#e0c9f2);border-color:#eedbff;color:#291937}
body[data-page-hidden=true] .world-effects *,body[data-motion=calm] .world-effects *{animation-play-state:paused!important}
body[data-motion=calm] .lava-river{animation:none;stroke-dashoffset:0;opacity:.4}
body[data-motion=calm] .dragon-flight{transform:translate(75vw,0) scale(.6)}
@media(prefers-reduced-motion:reduce){.world-effects *{animation:none!important}.lava-river{stroke-dashoffset:0;opacity:.4}.dragon-flight{transform:translate(75vw,0) scale(.6)}}
@media(max-width:650px){
 body[data-room] .room-switch{width:100%;gap:1px;padding:2px}
 body[data-room] .room-switch button{font-size:9px;column-gap:4px;padding:2px;min-height:36px}
 body[data-room] .room-switch button small{font-size:7px}
 body[data-room] .orbit-console .bet-hint{font-size:7px;line-height:9px;min-height:9px;white-space:normal}
 body[data-room] .orbit-console>.spin{height:52px;min-height:52px;font-size:10px}
 body[data-room] .payout-shelf{width:100%}
 .celestial-orbits{inset:10% -35% 35%}
 .celestial-orbits i{width:100vw}
 .dragon-flight{width:155px}
}
@media(max-height:550px) and (min-width:651px){
 body[data-room] #game-title{font-size:23px}
 body[data-room] .topbar{height:22px;min-height:22px}
 body[data-room] .room-switch button{min-height:31px}
 body[data-room] .dual-game-note .dual-game-title{line-height:1.2}
 body[data-room] .orbit-console>.metric,body[data-room] .orbit-console>.stake-control{height:48px;padding:4px 10px}
}
