.room3d-host{position:absolute;inset:0;z-index:2;overflow:hidden;border-radius:inherit;pointer-events:none}
.room3d-host[data-room3d="salon"]{pointer-events:auto;z-index:260}
.room3d-canvas{display:block;width:100%;height:100%;touch-action:none;outline-offset:-4px}
.room3d-canvas:focus-visible{outline:3px solid var(--gold)}
.room3d-loading,.room3d-error{position:absolute;left:14px;bottom:14px;max-width:calc(100% - 28px);padding:9px 12px;background:#102820ed;color:var(--text);font-size:12px;border-radius:8px;line-height:1.5}
.room-stage.room3d-ready>.scene-object,.room-stage.room3d-ready>.scene-background{visibility:hidden;pointer-events:none}
.room-stage.salon-preview{height:clamp(360px,42vw,580px)}
.room-camera-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:12px 0}
.room-camera-controls>span{flex:1;min-width:190px;font-size:12px;color:var(--muted);line-height:1.5}
.room-camera-controls .btn{min-height:44px;padding:9px 13px}
.room-edit-controls{padding-top:12px}.scene-object-picker{grid-column:1/-1}
.scene-selection>[data-scene-label]{display:none}
.game-route .table-arena.room3d-ready{width:100%;max-height:none;min-height:140px;padding:0;margin:0;background:#102820;border-radius:15px;overflow:hidden}
.game-route .content{width:100%}
.game-route .main-shell:before{display:none}
.game-room-background{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:#102820}
.game-room-background>.room3d-host{border-radius:0}
.game-route .table-arena.room3d-ready{background:transparent;overflow:visible}
.table-arena.room3d-ready:before,.table-arena.room3d-ready:after{content:none}
.table-arena.room3d-ready>.game-chair-layer,.table-arena.room3d-ready>.table-watermark,.table-arena.room3d-ready>.table-object,.table-arena.room3d-ready>.table-checky{display:none}
.table-arena.room3d-ready>.opponents{position:absolute;inset:0;display:block;min-height:0;z-index:4;pointer-events:none}
.table-arena.room3d-ready .opponent{position:absolute;transform:translate(-50%,-50%);margin:0;padding:4px 7px;min-width:0;max-width:104px;width:max-content;background:#0a211aeb;border:1px solid #56715880;border-radius:8px;pointer-events:auto;line-height:1.3;box-shadow:0 3px 8px #0003}
.table-arena.room3d-ready .opponent strong{font-size:10px;max-width:95px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.table-arena.room3d-ready .opponent strong,.table-arena.room3d-ready .opponent>.small{display:block}
.table-arena.room3d-ready .opponent .avatar,.table-arena.room3d-ready .opponent .tiny-fan,.table-arena.room3d-ready .opponent .bot-label{display:none}
.table-arena.room3d-ready .opponent .small{font-size:9px;color:var(--muted)}
.table-arena.room3d-ready .opponent.current{border-color:var(--gold);background:#274435f5;color:#f6db9f}
.table-arena.room3d-ready .table-center{position:absolute;inset:0;display:block;margin:0;pointer-events:none;z-index:5}
.table-arena.room3d-ready .table-center>.pile{position:absolute;transform:translate(-50%,-50%);pointer-events:auto}
.table-arena.room3d-ready .pile>small{white-space:normal;background:#09271fe8;padding:4px 7px;border-radius:5px;font-size:10px;width:100px;max-width:100px;line-height:1.25}
.table-arena.room3d-ready .table-turn{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);z-index:6;white-space:nowrap;max-width:96%;overflow:hidden;text-overflow:ellipsis;background:#08261fed}
.table-arena.room3d-ready[data-crowded="true"] .opponent:not(.current) .small{display:none}
.table-arena.room3d-ready[data-crowded="true"] .opponent:not(.current){padding:2px 4px;max-width:68px}
.table-arena.room3d-ready[data-crowded="true"] .opponent strong{font-size:9px}
@media(max-width:600px){
 .room-stage.salon-preview{height:360px;border-radius:15px}
 .scene-caption{max-width:80%}
 .room-camera-controls>span{flex-basis:100%;font-size:11px;margin-bottom:3px}
 .room-camera-controls .btn{flex:1;padding-inline:10px}
 .game-route .table-arena.room3d-ready .opponent{display:block;padding:3px 5px;max-width:76px}
 .table-arena.room3d-ready .opponent strong{font-size:9px;max-width:70px}
 .table-arena.room3d-ready .opponent .small{font-size:8px}
 .table-arena.room3d-ready .pile .card-image{width:47px}.table-arena.room3d-ready .deck-back{width:47px;height:67px}
 .table-arena.room3d-ready .pile>small{font-size:9px;width:78px;max-width:78px;white-space:normal;line-height:1.2;margin-top:5px}
 .table-arena.room3d-ready .table-turn{font-size:10px;bottom:6px}
}
@media(min-width:601px) and (max-width:1000px){
 .game-route .immersive-game{grid-template-columns:minmax(0,1fr)}
 .game-route .game-side{display:none}
}
@media(max-height:520px) and (min-width:601px){
 .table-arena.room3d-ready .pile .card-image{width:39px}.table-arena.room3d-ready .deck-back{width:39px;height:55px}
 .table-arena.room3d-ready .pile>small{font-size:8px;margin-top:3px}
 .table-arena.room3d-ready .table-turn{bottom:4px;font-size:9px}
 .table-arena.room3d-ready .opponent .small{display:none}
}
.room3d-preview-note{position:absolute;bottom:12px;left:12px;max-width:calc(100% - 24px);padding:5px 10px;background:#071b17e8;color:#f2dfb4;font:12px/1.5 Sora,sans-serif;border-radius:6px;pointer-events:none;z-index:1}

/* The table owns the whole viewport during a game. Navigation is available
   again through the explicit exit/spectator flow. */
.app-shell.game-route{display:block;width:100%;grid-template-columns:none}
.game-route .main-shell{width:100%;margin:0;grid-column:1/-1}
.game-route .content{max-width:none;width:100%}
.game-route .table-arena.room3d-ready .pile .card-image{width:52px}
.game-route .table-arena.room3d-ready .deck-back{width:52px;height:73px;border-width:2px;box-shadow:1px 2px 0 #c3b594,2px 4px 0 #91856b,0 6px 10px #02191245}
.game-route .table-arena.room3d-ready .deck-back span{font-size:11px;padding:7px 4px}
.motion-card{filter:none;contain:layout style;backface-visibility:hidden;box-shadow:0 5px 9px #0004;border-radius:5px;transform-origin:center;pointer-events:none}
.motion-card>.deck-back{box-shadow:none}
.game-route .table-arena.room3d-ready .pile>small{font-size:10px;line-height:1.3}
@media(max-width:600px){
 .game-route .game-topline>.row .icon-button,.game-route .game-title>.icon-button{width:48px;min-width:48px;height:48px;min-height:48px}
 .game-route .game-topline{padding:4px;gap:3px}
 .game-route .game-title{gap:3px}.game-route .game-title h1{font-size:18px}
 .game-route .game-title p{max-width:100px;font-size:9px}
 .game-route .game-topline>.row{gap:0}
 .game-route .game-topline>.row .pill{display:none}
 .game-route .table-arena.room3d-ready .pile .card-image{width:34px}
 .game-route .table-arena.room3d-ready .deck-back{width:34px;height:48px}
 .game-route .table-arena.room3d-ready .deck-back span{font-size:8px;padding:5px 3px}
 .game-route .table-arena.room3d-ready .pile>small{font-size:9px;width:76px;max-width:76px;padding:3px 4px}
 .game-route .table-arena.room3d-ready .table-turn{bottom:4px}
}
@media(max-height:520px) and (min-width:601px){
 .game-route .game-topline{padding:4px 8px;margin-bottom:4px;min-height:48px}
 .game-route .game-topline .icon-button{width:48px;min-width:48px;height:48px;min-height:48px}
 .game-route .table-wrap{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:12px;height:100%;align-items:stretch}
 .game-route .table-arena.room3d-ready{width:100%;height:100%;min-height:0;max-height:none;align-self:stretch}
 .game-route .my-hand{padding:8px;max-height:100%;min-width:0;min-height:0;overflow-y:auto;display:flex;flex-direction:column}
 .game-route .hand-title{flex:0 0 auto;gap:4px}.game-route .hand-title h2{font-size:12px}.game-route .hand-title small{font-size:9px}
 .game-route .hand-scroller{flex:1;align-items:center;justify-content:flex-start;min-height:64px;padding:6px 2px;gap:5px}
 .game-route .hand-card{width:38px;min-width:38px;flex-basis:38px}
 .game-route .hand-actions{display:grid;grid-template-columns:1fr;flex:0 0 auto;gap:5px;margin-top:4px}
 .game-route .hand-actions .btn{min-height:40px;padding:7px;font-size:11px;min-width:0}
 .game-route .table-arena.room3d-ready .pile>small{width:76px;max-width:76px;padding:3px 4px}
 .game-route .table-arena.room3d-ready .pile>.card-image,.game-route .table-arena.room3d-ready .pile>.deck-back{margin-inline:auto}
 .game-route .table-arena.room3d-ready .pile .card-image{width:30px}
 .game-route .table-arena.room3d-ready .deck-back{width:30px;height:42px}
 .game-route .table-arena.room3d-ready .pile>small{font-size:8px}
}
