/* Loaded after arena.css. The physical table changes; seats and controls keep their geometry. */
body[data-scene-kit] .table-arena{container-type:size}
body[data-scene-kit] .table-arena>.felt{border:0!important;outline:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;overflow:visible!important;isolation:isolate}
body[data-scene-kit] .table-arena>.felt::before,body[data-scene-kit] .table-arena>.felt::after{content:none!important;display:none!important}
.scene-furniture,.scene-atmosphere{position:absolute;inset:0;pointer-events:none!important;user-select:none;z-index:0}
.scene-table-svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 7px 1px #060a0fc0) drop-shadow(0 17px 18px #03080bc0)}
.scene-rail,.scene-mat{paint-order:stroke fill}
.scene-atmosphere{z-index:1;inset:8% 5%;overflow:hidden;clip-path:var(--scene-atmo-clip,inset(0 round 15px));opacity:.7}
.scene-atmosphere::before,.scene-atmosphere::after{content:"";position:absolute;inset:-15%;pointer-events:none;background-repeat:no-repeat}
.scene-atmosphere i{position:absolute;left:var(--mote-x);top:var(--mote-y);width:3px;height:3px;border-radius:50%;background:var(--scene-accent);opacity:0;pointer-events:none}
body[data-scene-kit] .table-arena .felt>.pile-area{position:relative;z-index:2;padding-inline:clamp(14px,5%,42px)!important}
body[data-scene-kit] .table-arena .pile-caption,body[data-scene-kit] .table-arena .empty-pile{color:#fffbed;text-shadow:0 2px 4px #000b}
body[data-scene-kit] .table-arena .empty-pile small{color:#eff4ee;text-shadow:0 2px 4px #000b}
/* Stable neutral portrait frames preserve every character's painted colors. */
body[data-scene-kit] .table-arena .generated-avatar{position:relative;border:2px solid #e3ddd1!important;outline:1px solid #17222d!important;background-color:#19232d!important;box-shadow:0 0 0 5px #111c26,0 5px 12px #0008,inset 0 0 0 1px #fff5!important;filter:none!important}
body[data-scene-kit] .table-arena .opponent.is-active .generated-avatar{border-color:var(--scene-accent)!important;outline:2px solid #14272a!important;box-shadow:0 0 0 4px var(--scene-accent),0 0 0 6px #111c26,0 6px 14px #0009!important}
body[data-scene-kit] .table-arena .opponent.is-active .generated-avatar::after{content:"";display:block!important;position:absolute;inset:auto -4px -4px auto;width:10px;height:10px;border-radius:50%;background:var(--scene-accent);border:2px solid #111c26;box-shadow:0 1px 3px #0008;z-index:8;transform:none;pointer-events:none}
body[data-scene-kit] .table-arena .generated-avatar>.rank-sash{display:none!important}
body[data-scene-kit] .table-arena .opponent-name{border-radius:7px;background:#101a23;box-shadow:0 1px 0 #fff2;color:#fffbed!important;text-shadow:none}
body[data-scene-kit] .table-arena .opponent-info{border-radius:5px;background:#18232c;color:#f2f4ee!important;text-shadow:none}

/* Round furniture uses a circular footprint on phones and a broad perspective on wider screens. */
@media(max-width:600px){
body:is([data-scene-kit=cosmic],[data-scene-kit=carnival]) .table-arena:not(:has(.waiting-panel))>.felt{
 --scene-diameter:min(calc(100cqw - var(--felt-side)*2),calc(100cqh - var(--felt-top) - var(--felt-bottom)));
 inset:var(--felt-top) auto auto 50%;width:var(--scene-diameter)!important;height:var(--scene-diameter)!important;transform:translateX(-50%);
}
body:is([data-scene-kit=cosmic],[data-scene-kit=carnival]) .table-arena:not(:has(.waiting-panel)) .pile-area{padding-inline:10%!important}
body:is([data-scene-kit=cosmic],[data-scene-kit=carnival]) .table-arena:not(:has(.waiting-panel)) .pile-cards{--pile-card-width:min(122px,calc((100cqw - 66px)/(var(--pile-count,1)*.72 + .28)),calc((100cqh - 65px)*.696))}
body:is([data-scene-kit=cosmic],[data-scene-kit=carnival]) .table-arena:not(:has(.waiting-panel)) .pile-caption{max-width:86%}

}

body[data-scene-kit=club]{--scene-atmo-clip:polygon(10% 0,90% 0,100% 18%,100% 82%,90% 100%,10% 100%,0 82%,0 18%)}
body[data-scene-kit=club] .scene-glimmer{animation:kit-foil 13s ease-in-out infinite;transform-origin:center}
body[data-scene-kit=club] .scene-atmosphere::after{background:linear-gradient(112deg,transparent 40%,#f9dc9310 49%,transparent 57%);background-size:240% 100%;animation:kit-brass 17s ease-in-out infinite}

body[data-scene-kit=saloon]{--scene-atmo-clip:inset(0 round 12px)}
body[data-scene-kit=saloon] .scene-mat{stroke:#291c15;stroke-width:13px}
body[data-scene-kit=saloon] .scene-atmosphere::before{background:repeating-linear-gradient(0deg,transparent 0 39px,#190d0814 40px 41px);opacity:.65}
body[data-scene-kit=saloon] .scene-atmosphere::after{background:radial-gradient(ellipse at 20% 75%,#efb26314,transparent 50%);animation:kit-lantern 6s ease-in-out infinite}

body[data-scene-kit=penthouse]{--scene-atmo-clip:polygon(3% 0,97% 0,100% 7%,100% 93%,97% 100%,3% 100%,0 93%,0 7%)}
body[data-scene-kit=penthouse] .scene-table-svg{filter:drop-shadow(0 5px 1px #02070a) drop-shadow(0 19px 25px #000b)}
body[data-scene-kit=penthouse] .scene-atmosphere::after{background:linear-gradient(112deg,transparent 25%,#c4e7ff0c 42%,#fff1 43%,transparent 48%);background-size:280% 100%;animation:kit-glass 18s ease-in-out infinite}

body[data-scene-kit=cosmic]{--scene-atmo-clip:ellipse(50% 49% at 50% 50%)}
body[data-scene-kit=cosmic] .scene-rail{stroke:#172b4c;stroke-width:12px}
body[data-scene-kit=cosmic] .scene-atmosphere::before{inset:3%;border:1px solid #b1fdff25;border-radius:50%;box-shadow:inset 0 0 18px #53dae81a}
body[data-scene-kit=cosmic] .scene-atmosphere::after{background:linear-gradient(0deg,transparent 47%,#8df5ff18 49%,#b8ffff25 50%,transparent 54%);background-size:100% 220%;animation:kit-scan 8s linear infinite}
body[data-scene-kit=cosmic] .scene-atmosphere i{width:2px;height:2px;animation:kit-star 6s ease-in-out calc(var(--mote)*-.8s) infinite}

body[data-scene-kit=arcade]{--scene-atmo-clip:polygon(3% 0,97% 0,97% 5%,100% 5%,100% 95%,97% 95%,97% 100%,3% 100%,3% 95%,0 95%,0 5%,3% 5%)}
body[data-scene-kit=arcade] .scene-table-svg{filter:drop-shadow(0 8px 0 #100f2d) drop-shadow(0 18px 20px #000a)}
body[data-scene-kit=arcade] .scene-atmosphere::before{background:repeating-linear-gradient(0deg,#b6fff908 0 1px,transparent 1px 5px)}
body[data-scene-kit=arcade] .scene-atmosphere::after{inset:1%;border:2px dashed #8bfff91c;animation:kit-led 5s steps(4,end) infinite}

body[data-scene-kit=haunted]{--scene-atmo-clip:polygon(4% 2%,48% 0,97% 4%,100% 80%,95% 97%,48% 100%,2% 95%,0 25%)}
body[data-scene-kit=haunted] .scene-atmosphere::after{background:radial-gradient(ellipse at 10% 90%,#a1df8620,transparent 45%),radial-gradient(ellipse at 90% 20%,#5cbe9b14,transparent 45%);background-size:130% 130%;animation:kit-mist 18s ease-in-out infinite alternate}
body[data-scene-kit=haunted] .scene-glimmer{animation:kit-creep 11s ease-in-out infinite}

body[data-scene-kit=beach]{--scene-atmo-clip:ellipse(50% 49% at 50% 50%)}
body[data-scene-kit=beach] .scene-atmosphere::before{background:repeating-linear-gradient(90deg,transparent 0 7px,#fff4d708 7px 8px),repeating-linear-gradient(0deg,transparent 0 7px,#fff4d708 7px 8px)}
body[data-scene-kit=beach] .scene-atmosphere::after{background:radial-gradient(ellipse at 45% 140%,#b9efdc20,transparent 70%);transform-origin:center;animation:kit-wave 12s ease-in-out infinite alternate}

body[data-scene-kit=lodge]{--scene-atmo-clip:inset(0 round 15px)}
body[data-scene-kit=lodge] .scene-atmosphere::after{background:radial-gradient(ellipse at 10% 100%,#e6963b1f,transparent 55%);animation:kit-hearth 8s ease-in-out infinite}
body[data-scene-kit=lodge] .scene-atmosphere i{width:2px;height:2px;background:#f8c47c;animation:kit-ember 9s linear calc(var(--mote)*-1.2s) infinite}

body[data-scene-kit=jungle]{--scene-atmo-clip:polygon(24% 0,76% 0,100% 50%,76% 100%,24% 100%,0 50%)}
body[data-scene-kit=jungle] .scene-atmosphere::before{background:radial-gradient(ellipse at 5% 8%,#d3e49914,transparent 40%),radial-gradient(ellipse at 95% 92%,#88c9a81c,transparent 44%)}
body[data-scene-kit=jungle] .scene-atmosphere i{background:#e0ed9f;box-shadow:0 0 7px #d8ef76;animation:kit-firefly 10s ease-in-out calc(var(--mote)*-.91s) infinite}

body[data-scene-kit=underwater]{--scene-atmo-clip:ellipse(50% 49% at 50% 50%)}
body[data-scene-kit=underwater] .scene-atmosphere::after{background:repeating-radial-gradient(ellipse at 10% 20%,transparent 0 24px,#baf6eb0d 25px 27px,transparent 29px 60px);background-size:150% 150%;animation:kit-caustic 17s ease-in-out infinite alternate}
body[data-scene-kit=underwater] .scene-atmosphere i{width:4px;height:4px;background:transparent;border:1px solid #c8faf333;animation:kit-bubble 14s linear calc(var(--mote)*-1.7s) infinite}

body[data-scene-kit=rooftop]{--scene-atmo-clip:inset(0 round 10px)}
body[data-scene-kit=rooftop] .scene-atmosphere::before{background:radial-gradient(#f5dca513 1px,transparent 1.5px);background-size:11px 11px}
body[data-scene-kit=rooftop] .scene-atmosphere::after{inset:5%;border:2px solid #e8d5a10d;box-shadow:inset 0 0 0 9px #e8d5a106;animation:kit-comic 11s steps(2,end) infinite}

body[data-scene-kit=carnival]{--scene-atmo-clip:ellipse(50% 49% at 50% 50%)}
body[data-scene-kit=carnival] .scene-atmosphere::before{background:radial-gradient(ellipse at 50% -30%,#fff2c91c,transparent 75%);animation:kit-marquee 7s ease-in-out infinite}
body[data-scene-kit=carnival] .scene-atmosphere i{width:3px;height:6px;border-radius:1px;background:#fce3ab;animation:kit-confetti 13s ease-in-out calc(var(--mote)*-1.1s) infinite}

@keyframes kit-foil{0%,70%,100%{opacity:.25;transform:translateX(-2%)}85%{opacity:.75;transform:translateX(8%)}}
@keyframes kit-brass{0%,65%,100%{background-position:100% 0;opacity:.2}82%{background-position:0 0;opacity:.65}}
@keyframes kit-lantern{0%,100%{opacity:.3}45%{opacity:.65}62%{opacity:.47}}
@keyframes kit-glass{0%,65%,100%{background-position:100% 0;opacity:.1}85%{background-position:0 0;opacity:.7}}
@keyframes kit-scan{0%{background-position:0 100%;opacity:.15}50%{opacity:.6}100%{background-position:0 0;opacity:.15}}
@keyframes kit-star{0%,100%{opacity:.05}50%{opacity:.4}}
@keyframes kit-led{0%,100%{border-color:#8bfff91a}50%{border-color:#d5a0ff38}}
@keyframes kit-mist{from{background-position:0 50%;opacity:.2}to{background-position:90% 30%;opacity:.75}}
@keyframes kit-creep{0%,100%{opacity:.2}55%{opacity:.75}}
@keyframes kit-wave{from{transform:translateY(2%) rotate(-1deg);opacity:.25}to{transform:translateY(-2%) rotate(1deg);opacity:.65}}
@keyframes kit-hearth{0%,100%{opacity:.3}40%{opacity:.7}70%{opacity:.5}}
@keyframes kit-ember{0%,70%,100%{opacity:0;transform:translateY(10px)}20%{opacity:.45}55%{opacity:0;transform:translateY(-22px)}}
@keyframes kit-firefly{0%,80%,100%{opacity:0;transform:translate(0,0)}25%{opacity:.5;transform:translate(4px,-4px)}50%{opacity:.1;transform:translate(-3px,-10px)}}
@keyframes kit-caustic{from{background-position:0 30%;transform:scale(1);opacity:.3}to{background-position:70% 60%;transform:scale(1.04);opacity:.7}}
@keyframes kit-bubble{0%,100%{opacity:0;transform:translateY(15px)}20%{opacity:.4}80%{opacity:0;transform:translateY(-35px)}}
@keyframes kit-comic{0%,75%,100%{opacity:.25}85%{opacity:.8}}
@keyframes kit-marquee{0%,100%{opacity:.35}50%{opacity:.7}}
@keyframes kit-confetti{0%,75%,100%{opacity:0;transform:translate(0,-6px) rotate(0deg)}20%{opacity:.25}60%{opacity:0;transform:translate(4px,14px) rotate(35deg)}}

/* Never apply furniture shapes to the lobby's content area or move active hit targets. */
body[data-scene-kit] .table-arena:has(.waiting-panel)>.felt{transform:none;overflow:visible!important}
body[data-scene-kit] .table-arena:has(.waiting-panel) .scene-atmosphere{opacity:.3}
body[data-scene-kit] .table-arena:has(.waiting-panel) .scene-table-svg{opacity:.7}
@media(max-width:600px){body[data-scene-kit] .table-arena .felt>.pile-area{padding-inline:9px!important}body:is([data-scene-kit=cosmic],[data-scene-kit=carnival]) .table-arena:not(:has(.waiting-panel)) .empty-pile{gap:6px}body:is([data-scene-kit=cosmic],[data-scene-kit=carnival]) .table-arena:not(:has(.waiting-panel)) .pile-caption{font-size:12px}.scene-table-svg{filter:drop-shadow(0 5px 1px #060a0fc0) drop-shadow(0 12px 13px #03080bb0)}}
body[data-motion=reduced] .scene-glimmer,body[data-motion=reduced] .scene-atmosphere,body[data-motion=reduced] .scene-atmosphere::before,body[data-motion=reduced] .scene-atmosphere::after,body[data-motion=reduced] .scene-atmosphere i{animation:none!important;transition:none!important}
body[data-motion=reduced] .scene-atmosphere i{opacity:0!important}
@media(prefers-reduced-motion:reduce){.scene-glimmer,.scene-atmosphere,.scene-atmosphere::before,.scene-atmosphere::after,.scene-atmosphere i{animation:none!important;transition:none!important}.scene-atmosphere i{opacity:0!important}}
