/* Opt-in common room; every selector is scoped so ordinary rooms retain their skin. */
.game-area.room-lab{display:block;padding:0!important;background:#0d1e32!important;background-image:none!important;color:#e5eff9;overflow:hidden;min-width:0}
.room-lab .scene-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 16px;background:linear-gradient(110deg,#14283e,#223d55);border-bottom:1px solid #8ea5ba55;color:#deebf7}
.scene-badge{font-size:12px;letter-spacing:.09em}.scene-avatar-picker{display:flex;gap:7px}.scene-avatar-picker>button{padding:2px;width:38px;height:38px;min-height:0;border:1px solid #92aac36b;border-radius:8px;background:#122438}.scene-avatar-picker>button[aria-pressed='true']{border-color:#a4e2ff;box-shadow:0 0 0 2px #67b7dd5c}.scene-avatar-picker .room-portrait{display:block;width:100%;height:100%;border-radius:5px;object-fit:cover}.scene-classic{margin-left:auto!important;min-height:34px;font-size:11px!important;background:#314c66!important;border:1px solid #8ca8c36b!important;color:#f2f6fb!important}
.shared-table-scene{position:relative;container-type:inline-size;isolation:isolate;min-width:0;width:100%;aspect-ratio:16/9;background:#10273d;overflow:hidden}
.scene-backdrop{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}.scene-landscape{position:absolute;top:50%;left:0;width:100%;max-width:none;height:auto;transform:translateY(-50%)}
.scene-extension{position:absolute;left:0;right:0;display:none;overflow:hidden;height:calc(50% - 28.14cqw)}.scene-extension-top{top:0}.scene-extension-bottom{bottom:0}.scene-outpaint{position:absolute;left:0;width:100%;max-width:none;height:125cqw;object-fit:fill}.scene-extension-top .scene-outpaint{top:0}.scene-extension-bottom .scene-outpaint{bottom:0}
.scene-play{position:relative;z-index:1;min-width:0;width:100%;min-height:100%;padding:8cqw 13cqw 10cqw}.scene-play>.game-stage{min-width:0;width:100%;max-width:none;margin:auto;color:#e0eaf4}.scene-seats{position:absolute;inset:0;pointer-events:none;z-index:4}.scene-seats[hidden]{display:none}
.scene-seat{position:absolute;display:flex;gap:7px;align-items:center;width:clamp(100px,13cqw,180px);padding:6px;border:1px solid #b8c9d56b;border-radius:10px;background:linear-gradient(130deg,#142739ed,#1d354ae8);box-shadow:0 5px 12px #020c1a55,inset 0 1px #d2e1e82b;color:#e6edf6;min-width:0}.scene-seat>.room-portrait{width:40%;height:auto;aspect-ratio:1;max-height:74px;object-fit:cover;border-radius:6px;border:1px solid #adc4d4}.scene-seat-copy{min-width:0;display:grid;gap:3px}.scene-seat-copy>b{font:500 clamp(10px,1.1cqw,15px)/1.4 'BoYi Interface',sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scene-seat-copy>small,.scene-seat-copy>span{font:400 clamp(8px,.8cqw,11px)/1.4 system-ui;color:#b9ccda}.scene-seat.is-active{border-color:#8fd2e7;box-shadow:0 0 14px #75c4ec44}.scene-seat.is-self{border-color:#d9a0ae}
.scene-seat[data-position='south']{bottom:2%;left:5%}.scene-seat[data-position='north']{top:2%;left:50%;transform:translateX(-50%)}.scene-seat[data-position='west']{left:2%;top:36%}.scene-seat[data-position='east']{right:2%;top:36%}
.room-lab .waiting-table{background:none!important;box-shadow:none!important;border:0!important;min-height:27cqw;padding:3cqw!important;color:#e8f1f7}.room-lab .waiting-copy p,.room-lab .waiting-copy .dim{color:#bdcfdd!important}.room-lab .waiting-seats{display:none}.room-lab .waiting-poster{width:min(15cqw,190px);height:min(15cqw,190px);aspect-ratio:1;border-radius:50%;box-shadow:0 0 0 3px #c4d6e233,0 12px 25px #04101b77}
.room-lab .scene-play .board{width:min(100%,520px);margin:0 auto;box-shadow:0 10px 0 #3b2c20,0 18px 24px #03111f77;touch-action:manipulation}
.room-lab .scene-play .board~.dim,.room-lab .scene-play .board~p{position:relative;color:#d6e4ef!important;text-align:center}
.room-lab .scene-play:has(.mj-table),.room-lab .scene-play:has(.uno-stage){padding:0;min-height:0}.shared-table-scene:has(.mj-table),.shared-table-scene:has(.uno-stage){aspect-ratio:auto}.shared-table-scene:has(.mj-table)>.scene-backdrop{display:none}
.room-lab .mj-head{margin:6px;border:0;background:#122b3d;color:#d9e8f2}.room-lab .mj-hint{margin:0;padding:8px;color:#b9d0df}.room-lab .mj-actions{padding:0;background:none}.room-lab .mj-result:empty{display:none}.room-lab .mj-player-avatar>img,.mj-player-avatar>img,.uno-avatar>.room-portrait{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.mj-experimental .mj-console-shell{position:absolute;inset:-4% -3%;width:106%;height:108%;max-width:none;object-fit:fill;filter:drop-shadow(0 .35cqw .2cqw #03091466);pointer-events:none}
.mj-experimental .mj-compass-score-south{top:79%;left:50%}.mj-experimental .mj-compass-score-north{top:18%;left:50%}.mj-experimental .mj-compass-score-east{left:83%;top:49%}.mj-experimental .mj-compass-score-west{left:17%;top:49%}.mj-experimental .mj-compass-wind-south{left:91%;top:85%}.mj-experimental .mj-compass-wind-west{left:9%;top:85%}.mj-experimental .mj-compass-wind-north{left:13%;top:10%}.mj-experimental .mj-compass-wind-east{left:89%;top:10%}
.room-lab .uno-stage{background:transparent!important;border:0;border-radius:0;box-shadow:none;max-width:none}.room-lab .uno-stage::before,.room-lab .uno-stage::after{content:none}.room-lab .uno-turn-ring{opacity:.3;border-color:#7eb7d499}.room-lab .uno-actions>button{background:linear-gradient(#49789a,#284b68);border:1px solid #a1c9dd77;box-shadow:0 3px 0 #142b40;border-radius:8px}.room-lab .uno-avatar{background:#18394c;border-color:#a2bbc9}
.room-lab .scene-play>.game-stage>.game-board{background:none!important;box-shadow:none;border:0;color:#e1edf8}.room-lab .scene-play .tag{background:#243d53;color:#e3edf6;border-color:#7998ac66}.room-lab .scene-play button:not(.cell):focus-visible{outline:2px solid #a2dafa;outline-offset:3px}
.lab-entry{display:grid;gap:20px;max-width:780px;padding:26px}.lab-entry select{width:100%;max-width:360px}.lab-entry button{width:fit-content}
.player-avatar .room-portrait{width:100%;height:100%;object-fit:cover;border-radius:inherit}
@media(max-width:700px){.shared-table-scene{aspect-ratio:4/5;min-height:490px}.scene-extension{display:block}.scene-play{padding:25cqw 12cqw 20cqw}.scene-seat{width:110px;padding:4px;gap:5px}.scene-seat[data-position='south']{left:4%;bottom:3%}.scene-seat[data-position='north']{top:4%}.scene-seat[data-position='west']{left:2%;top:21%}.scene-seat[data-position='east']{right:2%;top:21%}.scene-avatar-picker>button{width:33px;height:33px}.scene-toolbar{padding:8px!important;gap:8px!important}.scene-classic{font-size:10px!important}.scene-badge{font-size:10px}.room-lab .waiting-table{min-height:300px;padding:6cqw!important;display:flex;flex-direction:column;justify-content:center}.room-lab .waiting-poster{width:30cqw;height:30cqw}.room-lab .waiting-copy h2{font-size:23px}.room-lab .waiting-copy p{font-size:11px}.room-lab .scene-play .board{width:100%}.room-lab .scene-play:has(.mj-table){padding:0}.room-lab .mj-actions{padding:8px}.shared-table-scene:has(.mj-table){min-height:0}}

.room-lab .mj-player-avatar{border-color:#adc8d7;box-shadow:0 3px 8px #06152677}.room-lab .mj-table-tools>button{border-color:#708fa7;color:#b7d4e5;background:linear-gradient(#29475f,#162b40);box-shadow:inset 0 1px #a8c1d42b,0 3px 0 #0b1d2c}.room-lab .mj-table-chat{border-color:#708fa7;color:#b7d4e5;background:#172f44}

#app .lab-room .room-header{background:linear-gradient(110deg,#152e45,#233e55);border-bottom:1px solid #99adc249;color:#e5edf7}
#app .lab-room .room-game-name,#app .lab-room .room-status{color:#deebf5}
#app .lab-room .room-table-id{background:#38536e;color:#e4f1fa}
#app .lab-room .room-actions{background:#10273a;color:#c5d6e3;border-bottom:1px solid #91a7bb44;gap:10px}
#app .lab-room .room-actions button,#app .lab-room .room-header button{background:linear-gradient(150deg,#3a607d,#26435d);border:1px solid #a2bdd057;border-radius:9px;color:#edf6fc;box-shadow:inset 0 1px #e1f1fb2b,0 3px 0 #0b1f30;min-height:36px}
#app .lab-room .room-actions .btn-primary{background:linear-gradient(150deg,#a85b7d,#763d65);border-color:#e3abc073}
#app .lab-room .room-actions select{background:#213e54;color:#e4eff6;border-color:#7f9db16b}
#app .lab-room .room-actions .dim{color:#a7c0d4}
.bga-avatar>.room-portrait{width:100%;height:100%;object-fit:cover;border-radius:inherit}

@media(max-width:700px){
 .room-lab .scene-extension,.mj-experimental .mj-bg-extension{height:calc(50% - 28.13995cqw + 9cqw)}
 .room-lab .scene-landscape,.mj-experimental .mj-bg-core{mask-image:linear-gradient(to bottom,transparent 0 6%,#000 20% 75%,transparent 94% 100%)}
 .mj-experimental .mj-bg-top .mj-bg-outpaint{left:0;width:100%}
}

@media(min-width:701px){.room-lab .uno-stage{aspect-ratio:16/9;min-height:0}}

.lab-component-preview{display:flex;align-items:center;gap:15px;color:var(--text-muted);font-size:12px}.lab-component-preview>img{width:100px;height:auto;object-fit:contain}
.room-lab .mj-table .mj-actions{padding:0;background:none}
