/* v132: fixed room home and a separate games catalog. */
html.room-home,html.room-home body{height:100%;overflow:hidden!important}
html.room-home body.nl32{min-height:0!important}
.room-home body.nl32>.wrap{height:100dvh;width:100%;max-width:1100px!important;margin:auto!important;padding:10px 14px max(6px,env(safe-area-inset-bottom))!important;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px;overflow:hidden}
.room-home [hidden]{display:none!important}
.room-home .top{min-height:44px;align-items:center!important;position:relative;z-index:10}
.room-home .top .pill{display:none!important}
.room-home .brand{font-size:25px!important;gap:8px!important}
.room-home .brand img{width:42px!important;height:42px!important}
.room-home .top-actions{gap:6px!important}
.room-home .top-actions>.profile-btn,.room-home .top-actions>.account-btn{min-height:40px!important;padding:6px 10px!important;font-size:13px!important;margin:0!important}
.room-home .profile-panel{position:fixed!important;top:62px!important;left:12px!important;right:auto!important;width:min(370px,calc(100vw - 24px))!important;max-height:calc(100dvh - 80px)!important;overflow:auto!important;z-index:20}
#roomHome{min-height:0;display:flex;flex-direction:column;gap:8px}
.room-home .hero{min-height:0;flex:1;display:flex;flex-direction:column;justify-content:center;padding:0!important;margin:0!important;gap:8px}
.room-home .hero .nl-orbs{display:none!important}
.room-home .hero>.eyebrow{align-self:center;font-size:13px!important;padding:7px 12px!important;margin:0!important}
.room-home .hero>h1{font-size:clamp(25px,6vw,44px)!important;line-height:1.2!important;margin:4px 0!important}
.room-home .hero>p{font-size:13px!important;margin:0!important}
.room-home .room-panel{width:100%;max-width:760px!important;min-height:0;margin:0 auto!important;padding:14px!important;display:flex;flex-direction:column;gap:10px;box-shadow:0 8px 22px #0004!important;border-radius:22px!important}
.room-home .room-title{font-size:17px!important;margin:0!important}
.room-home .joinbox{width:100%;max-width:600px;gap:8px!important}
.room-home .joinbox .btn{min-height:46px!important;padding:10px!important;font-size:16px!important}
.room-home .joinbox input{padding:10px!important;min-height:48px!important;font-size:23px!important}
.room-home #recentRooms{max-height:36px;overflow-x:auto;overflow-y:hidden;margin:0!important;white-space:nowrap}
.room-home .recent-rooms-label{display:none}
.room-home .room-status{font-size:12px!important;margin:0!important;min-height:18px}
.room-home #shareRow{display:none!important}
.room-home .rh-credit{margin:0!important;min-height:16px;display:flex!important;justify-content:center!important;gap:5px!important;padding:0!important}
.room-home .rh-credit img,.room-home .bluecubes-year{display:none!important}
.room-home .rh-credit strong{font:10px system-ui!important;color:#b7b2c9!important}
.rh-bottom{flex:0 0 auto;display:flex;justify-content:center}
#rhGamesButton{width:min(100%,760px);min-height:52px;border:1px solid #ffd976;border-radius:16px;background:linear-gradient(135deg,#ffe7a8,#efb534);color:#211525;font-family:inherit;font-size:23px;font-weight:800;box-shadow:0 4px 0 #926321;padding:9px 14px;cursor:pointer}
#rhGamesButton span{display:inline-block;font-size:12px;font-weight:500;margin-inline-start:10px}
#rhGamesButton:disabled{opacity:.55;cursor:default}
.room-home .rh-in-room .hero{justify-content:flex-start}
.room-home .rh-in-room .hero>.eyebrow,.room-home .rh-in-room .hero>h1,.room-home .rh-in-room .hero>p,.room-home .rh-in-room .room-title,.room-home .rh-in-room .joinbox,.room-home .rh-in-room #recentRooms,.room-home .rh-in-room #roomstatus{display:none!important}
.room-home .rh-in-room .room-panel{flex:1;max-width:none!important;padding:12px!important;gap:0}
.room-home .rh-in-room #lobbyPanel{display:flex!important;flex-direction:column;min-height:0;flex:1;padding:0!important;margin:0!important;background:none!important;border:0!important;gap:8px}
.room-home .rh-in-room .lobby-head,.room-home .rh-in-room .players-list,.room-home .rh-in-room #lobbyNote{display:none!important}
.rh-room-top{display:grid;grid-template-columns:1fr auto;gap:6px;align-items:center}
.room-home .rh-room-top .room-code-row{width:100%!important;max-width:none!important;display:flex!important;justify-content:space-between!important;padding:7px 10px!important;margin:0!important;border-radius:13px!important;min-width:0;gap:8px}
.room-home .rh-room-top .room-code-row>div{display:flex;align-items:center;gap:8px;min-width:0}
.room-home .rh-room-top .room-code-row small{font-size:11px!important;white-space:nowrap}
.room-home .rh-room-top #lobbyCode{font-size:28px!important;letter-spacing:.13em!important;line-height:1.1!important}
.room-home .rh-room-top #copyRoomCode{position:static!important;transform:none!important;width:auto!important;flex:none;font-size:11px!important;padding:7px!important;min-height:34px!important}
.rh-room-actions{display:flex;gap:6px}
.rh-room-actions button{font-family:inherit;font-size:13px;color:#fff3ca;background:#292041;border:1px solid #917ba9;border-radius:11px;padding:9px;min-height:38px;white-space:nowrap;cursor:pointer}
.room-home #roomToolsBtn{font-size:12px!important;min-height:38px!important;padding:8px!important;margin:0!important;box-shadow:none!important}
.room-home .rh-room-top .players-head{grid-column:1/-1;display:flex;justify-content:space-between;margin:0!important;font-size:12px!important;min-height:16px;white-space:nowrap}
#rhTeams{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr) auto;gap:8px}
.rh-team{min-width:0;min-height:0;display:flex;flex-direction:column;gap:6px;border:1px solid;border-radius:16px;padding:8px}
.rh-red{border-color:#fb6c78;background:linear-gradient(145deg,#6f263c77,#241b3d99);color:#ffd7db}
.rh-blue{border-color:#55b9ff;background:linear-gradient(145deg,#194f8377,#181d4699);color:#c8eaff}
.rh-team header,.rh-unassigned header{display:flex;flex-direction:column;gap:6px;align-items:stretch;text-align:center;flex:none}
.rh-team header b{font-size:18px}
.rh-team header button,.rh-unassigned header button{font-family:inherit;font-size:13px;padding:7px 4px;min-height:34px;border:1px solid currentColor;border-radius:9px;color:inherit;background:#ffffff08;cursor:pointer}
.rh-team header button[aria-pressed=true]{background:#ffffff25;box-shadow:inset 0 0 0 1px currentColor}
[data-team-list]{min-height:0;display:grid;align-content:start;gap:5px}
[data-team-list].rh-many{grid-template-columns:1fr 1fr}
.rh-player{width:100%;min-width:0;min-height:40px;display:flex;align-items:center;gap:6px;background:#090d25aa;border:1px solid #ffffff20;border-radius:10px;padding:5px;color:#fff;text-align:right;font:inherit;cursor:pointer}
.rh-avatar{font-size:20px;flex:none}
.rh-player-info{min-width:0;display:block;flex:1}
.rh-player-info b{display:block;font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.rh-player-info small{display:block;font-size:10px;color:#afa6c0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.rh-player-info .rh-online{color:#73e0c4}
.rh-empty{display:block;text-align:center;padding:10px 2px;font-size:12px;color:#b5a9c6}
.rh-unassigned{grid-column:1/-1;min-height:0;border:1px solid #786988;border-radius:12px;padding:6px;color:#dbd2e8}
.rh-unassigned header{flex-direction:row;align-items:center;justify-content:space-between;margin-bottom:4px}
.rh-unassigned header b{font-size:12px}
.rh-unassigned header button{min-height:26px;padding:3px 8px;font-size:10px}
.rh-unassigned [data-team-list]{grid-template-columns:repeat(4,minmax(0,1fr))}
.rh-unassigned .rh-player{min-height:32px;padding:4px;gap:3px}
.rh-unassigned .rh-avatar{font-size:16px}
.rh-unassigned .rh-player-info b{font-size:12px}
.rh-unassigned .rh-player-info small{display:none}
.rh-team-note{font-size:11px;color:#c4b3d2;margin:0;text-align:center;flex:none}
#rhTeamStatus{font-size:11px;color:#86e7d4;text-align:center;margin:0;min-height:0}
#rhTeamStatus:empty{display:none}
#roomGames{min-height:0;display:flex;flex-direction:column;gap:8px}
.rh-games-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}
.rh-games-header button{font-family:inherit;font-size:14px;border:1px solid #ab91bb;border-radius:11px;background:#25213d;color:#fff1cc;padding:9px;cursor:pointer}
.rh-games-header h1{font-size:22px;margin:0;color:#ffe4a1}
#rhGamesCode{font-size:11px;color:#bbaed0}
.room-home #games{min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:4px 4px 15px;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start}
.room-home #games .game{min-height:160px!important}
.room-home #games .game h3{font-size:18px!important}
.room-home #games .game p{font-size:11px!important}
.rh-player-dialog{color:#fff;background:#1b1835;border:1px solid #b998c5;border-radius:20px;width:min(360px,92vw);max-height:90dvh;overflow:auto;padding:20px}
.rh-player-dialog::backdrop{background:#030511bb}
.rh-player-dialog h2{margin:0 0 12px}
.rh-player-dialog button{display:block;width:100%;margin:8px 0;padding:12px;border:1px solid #aa8cbb;border-radius:12px;font-family:inherit;font-size:16px;color:#fff;background:#302743;cursor:pointer}
.rh-player-dialog .rh-red{background:#79293c}.rh-player-dialog .rh-blue{background:#215b8a}
@media(max-width:600px){
 .room-home #games{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rh-room-top{grid-template-columns:1fr}
 .rh-room-actions{grid-row:2;grid-column:1;justify-content:space-between}
 .room-home .rh-room-top .players-head{grid-row:2;grid-column:1;pointer-events:none;padding-inline:100px 85px}
 .room-home .rh-room-top .players-head strong{display:none}
 .room-home .rh-room-top .players-head span{margin:auto}
 .rh-games-header h1{font-size:18px}#rhGamesCode{display:none}
}
@media(max-height:700px) and (orientation:portrait){
 .room-home body.nl32>.wrap{padding:6px 9px!important;gap:5px}
 .room-home .rh-in-room .room-panel{padding:8px!important}
 .rh-team header b{font-size:16px}.rh-team header button{min-height:30px;padding:5px}
 .rh-player{min-height:34px;padding:3px}.rh-avatar{font-size:18px}
 .rh-player-info b{font-size:13px}.rh-player-info small{font-size:9px}
 .rh-team-note{font-size:10px}
}
@media(orientation:landscape) and (max-height:550px){
 .room-home body.nl32>.wrap{padding:4px 10px!important;gap:4px;grid-template-rows:auto minmax(0,1fr)}
 .room-home .top{min-height:30px}.room-home .brand{font-size:21px!important}.room-home .brand img{width:30px!important;height:30px!important}
 .room-home .top-actions>.profile-btn,.room-home .top-actions>.account-btn{min-height:28px!important;font-size:11px!important;padding:4px 8px!important}
 .room-home .rh-credit{display:none!important}
 #roomHome{gap:4px}
 .room-home .hero{gap:4px}.room-home .hero>.eyebrow,.room-home .hero>p{display:none!important}
 .room-home .hero>h1{font-size:22px!important;margin:0!important}.room-home .hero>h1 br{display:none}
 .room-home .room-panel{padding:8px!important;gap:5px}.room-home .room-title{font-size:14px!important}
 .room-home .joinbox{display:flex!important}.room-home .joinbox input{flex:1;width:160px;min-height:34px!important;font-size:20px!important;padding:5px!important}
 .room-home .joinbox .btn{min-height:34px!important;padding:5px 12px!important;font-size:14px!important}
 .room-home .rh-in-room #lobbyPanel{gap:4px}
 .rh-room-top{grid-template-columns:minmax(220px,1fr) auto auto;gap:8px}
 .room-home .rh-room-top .players-head{grid-column:3;grid-row:1;margin:0!important;gap:7px;pointer-events:auto;padding:0}
 .room-home .rh-room-top .players-head strong{display:block}
 .room-home .rh-room-top .room-code-row{padding:3px 8px!important}
 .room-home .rh-room-top #lobbyCode{font-size:23px!important}
 .room-home .rh-room-top #copyRoomCode{min-height:26px!important;padding:4px!important;font-size:10px!important}
 .rh-room-actions{grid-row:1;grid-column:2}.rh-room-actions button,.room-home #roomToolsBtn{min-height:28px!important;padding:4px 8px!important;font-size:11px!important}
 #rhTeams{grid-template-columns:1fr 1fr .8fr;grid-template-rows:minmax(0,1fr);gap:6px}
 #rhTeams:has(.rh-unassigned[hidden]){grid-template-columns:1fr 1fr}
 .rh-team{padding:5px;gap:4px;border-radius:12px}
 .rh-team header{flex-direction:row;align-items:center;justify-content:space-between;gap:5px}
 .rh-team header b{font-size:14px}.rh-team header button{min-height:24px;font-size:11px;padding:3px 8px}
 .rh-player{min-height:28px;padding:3px;gap:4px}.rh-avatar{font-size:17px}.rh-player-info b{font-size:12px}.rh-player-info small{font-size:9px}
 [data-team-list]{gap:3px}.rh-unassigned{grid-column:3;grid-row:1;padding:5px}
 .rh-unassigned [data-team-list]{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rh-unassigned header button{display:none}.rh-unassigned .rh-player{min-height:25px}
 .rh-team-note{display:none}
 #rhGamesButton{min-height:32px;font-size:18px;padding:4px 12px;border-radius:11px}
 .rh-games-header h1{font-size:17px}.rh-games-header button{padding:5px 9px}
 .room-home #games{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(orientation:landscape) and (max-height:300px){
 .room-home .rh-in-room .room-panel{padding:4px 6px!important}
 .rh-player{min-height:22px;padding:2px}.rh-avatar{font-size:15px}.rh-player-info b{font-size:11px}.rh-player-info small{display:none}
 .rh-team header button{min-height:21px;font-size:10px;padding:2px 6px}
 .rh-unassigned .rh-player{min-height:22px}.rh-team header b{font-size:12px}
}

/* Visible room actions stay outside the team panels. */
.rh-room-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:0 0 auto}
.rh-room-switch button{font:inherit;font-size:13px;font-weight:700;min-height:36px;border-radius:10px;padding:7px 8px;border:1px solid #d9bc75;background:#473956;color:#fff0bd;cursor:pointer}
.rh-room-switch #rhLeaveRoom{border-color:#ba7188;background:#482338;color:#ffd9df}
.rh-room-switch button:disabled{opacity:.55;cursor:wait}
@media(orientation:landscape) and (max-height:550px){.rh-room-switch{gap:6px}.rh-room-switch button{min-height:26px;padding:3px 8px;font-size:11px}}
@media(orientation:landscape) and (max-height:550px){
 .room-home .rh-in-room #lobbyPanel{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr) auto;gap:4px 8px}
 .rh-room-top{grid-column:1;grid-row:1;grid-template-columns:minmax(150px,1fr) auto auto}
 .rh-room-switch{grid-column:2;grid-row:1}
 #rhTeams{grid-column:1/-1;grid-row:2}
 #rhTeamStatus{grid-column:1/-1;grid-row:3}
}
