/* Layout handles only appear while the user explicitly edits the room. */
#layoutEditBar[hidden],#layoutEditOverlays[hidden]{display:none!important}
#layoutEditBar{position:fixed;z-index:300;top:10px;left:12px;transform:none;display:flex;align-items:center;gap:8px;width:max-content;max-width:calc(100vw - 24px);padding:12px 16px;border:1px solid #d7ae6c;border-radius:14px;background:#21180ff5;color:#f5dfbb;box-shadow:0 8px 30px #0008}
#layoutEditBar>div{margin-right:16px}#layoutEditBar strong{display:block;font-size:15px}#layoutEditBar span{display:block;font-size:11px;color:#cdb696;margin-top:3px}#layoutEditBar button{min-height:40px;white-space:nowrap;font-size:13px;padding:8px 12px}
#layoutEditOverlays{position:fixed;inset:0;z-index:290;pointer-events:none}.layout-item{position:fixed;border:2px solid #e8c27f;box-sizing:border-box;background:#d8ad6512;cursor:move;touch-action:none;pointer-events:auto;border-radius:8px;user-select:none;min-width:0}
.layout-item-label{position:absolute;top:0;left:0;max-width:calc(100% - 25px);padding:3px 7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#342516f2;color:#ffe6bb;font-size:11px;border-radius:4px;pointer-events:none}.layout-resize{position:absolute;right:-3px;bottom:-3px;width:32px;height:32px;min-height:32px;padding:0!important;font-size:20px!important;border:1px solid #f3ca86;background:#694c2c!important;color:#fff0d6;cursor:nwse-resize;border-radius:7px;touch-action:none}
body.layout-editing iframe,body.layout-dragging iframe{pointer-events:none!important}body.layout-editing #roomZoomSurface{pointer-events:none!important}body.layout-editing .screen-vignette{pointer-events:none}body.layout-editing{user-select:none}
body [data-layout-custom=button]{z-index:29!important;overflow:hidden;text-overflow:ellipsis}
body #displayWrap[data-layout-custom=screen]{aspect-ratio:16/9!important;padding:0!important}
body #displayWrap[data-layout-custom=screen]>.screen{width:100%;height:100%;min-height:0}
body #displayWrap[data-layout-custom=screen]>.display-label,body #displayWrap[data-layout-custom=screen]>.playback-status{display:none!important}
body #recordStack[data-layout-custom=shelf]{overflow:auto!important}body #viewToolbar[data-layout-custom=toolbar]{overflow:auto;align-content:center;flex-wrap:wrap;z-index:27!important}
body #togetherPanel[data-layout-custom=panel]{display:flex;flex-direction:column;overflow:hidden}
body:not(.mobile-layout)>#viewToolbar{cursor:default;touch-action:auto;user-select:auto}
#togetherDragHeader{cursor:grab;touch-action:none;user-select:none;flex:none}#togetherDragHeader button{cursor:pointer}body.layout-dragging #togetherDragHeader{cursor:grabbing}
body.mobile-layout #togetherDragHeader{cursor:default;touch-action:auto}
body .avatar-menu-actions .avatar-logout{color:#f2c2a5;border-color:#ba806955;margin-top:7px}#avatarActionStatus:empty{display:none}
@media(max-width:600px){#layoutEditBar{top:auto;bottom:90px;left:12px;gap:5px;padding:9px;flex-wrap:wrap;justify-content:center;width:calc(100vw - 24px)}#layoutEditBar>div{width:100%;margin:0;text-align:center}#layoutEditBar button{font-size:12px;flex:1}}

body.layout-editing> :not(#layoutEditBar):not(#layoutEditOverlays){pointer-events:none!important}
body.layout-editing>#layoutEditOverlays .layout-item,body.layout-editing>#layoutEditBar{pointer-events:auto!important}

/* v49: a full-width request, playlist at the bottom and a quiet visibility switch. */
body .music-entry-actions{display:block!important;width:100%;margin-bottom:10px}body .music-entry-actions #openDj{width:100%;min-height:48px;justify-content:center;white-space:nowrap}body .music-entry-actions #openDj span{font-size:clamp(12px,1.05vw,17px);white-space:nowrap}
#playlistDock{position:fixed;left:18px;bottom:calc(var(--oasis-toolbar-height,64px) + var(--remote-height,0px) + 80px);z-index:29}#playlistDock .my-playlist-button{min-height:44px;padding:8px 18px;display:flex;align-items:center;gap:8px;border-radius:24px;background:#352618e8;color:#f3dbb0;border:1px solid #9c7c4c}#playlistDock img{width:28px;height:28px}#playlistDock img[hidden]{display:none}
#avatarVisibility{position:fixed;top:24px;left:calc(50% + 145px);z-index:31;min-height:36px;padding:6px 12px;border-radius:20px;background:#302216e8;color:#f5dab0;border:1px solid #ab895a;font-size:12px;white-space:nowrap}
body.avatars-hidden #seatedAvatar,body.avatars-hidden #roomCompanions{display:none!important}
body.mobile-layout #playlistDock{display:none}body.mobile-layout #avatarVisibility{top:76px;left:12px;font-size:11px;min-height:32px;padding:4px 9px}
.lounge-group-tools{display:flex;gap:8px;justify-content:space-between;margin:10px 0}.lounge-group-tools button,#loungeGroupInfo button{font-size:12px;padding:7px 10px}#loungeGroupForm{border:1px solid #997349;border-radius:12px;padding:12px;max-height:280px;overflow:auto}#loungeGroupForm[hidden],#loungeGroupInfo[hidden]{display:none}#loungeGroupForm p,#loungeGroupMembers{font-size:12px;color:#dbc8a9}#loungeGroupTitle{width:100%;box-sizing:border-box}#loungeGroupPeople{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}#loungeGroupPeople label{display:flex;align-items:center;gap:6px;font-size:13px}#loungeGroupPeople input{width:18px;height:18px}#loungeGroupForm>div:last-child{display:flex;gap:8px}#loungeGroupInfo{display:flex;align-items:center;justify-content:space-between;gap:8px}
#layoutEditOverlays[popover]{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;overflow:visible;inset:0;color:inherit}#layoutEditBar[popover]{inset:10px auto auto 12px;margin:0;overflow:visible}
body.layout-editing .layout-item,body.layout-editing #layoutEditBar,body.layout-editing #layoutEditBar button{pointer-events:auto!important}
body [data-layout-custom=input]{z-index:30;box-sizing:border-box;resize:none}body dialog[data-layout-custom=panel]{overflow:auto}body #loungeChat[data-layout-custom=panel]{display:flex;flex-direction:column;overflow:hidden}
.panel-layout-edit{display:block;width:max-content;min-height:32px;padding:5px 10px;font-size:11px;background:#3c2d2077;color:inherit;border:1px solid #b3936355;border-radius:8px;margin:0 35px 10px 0}
body #playlistDock{bottom:calc(var(--view-toolbar-height,64px) + var(--remote-space,0px) + 78px)}
@media(max-width:600px){#layoutEditBar[popover]{inset:auto 12px 90px 12px}}

body #playlistDock .my-playlist-button{position:static;inset:auto;max-width:none;width:auto;margin:0}
/* Keep the playlist alongside the lower actions, clear of album pagination. */
body:not(.mobile-layout) #playlistDock{bottom:calc(var(--view-toolbar-height,54px) + var(--remote-space,0px) + 20px)}
body:not(.mobile-layout) .lounge-actions{left:180px;right:auto;justify-content:flex-start}
body:not(.mobile-layout).far-view .record-stack{max-height:calc(100dvh - var(--remote-space,0px) - var(--view-toolbar-height,54px) - 206px)}

/* v51: one stable entry point and panel handles above nested controls. */
#openLayoutEdit{position:fixed;top:24px;left:calc(50% - 310px);z-index:35;min-height:36px;padding:6px 12px;border-radius:20px;background:#302216ef;color:#f5dab0;border:1px solid #ab895a;font-size:14px;white-space:nowrap}
#openLayoutEdit:focus-visible{outline:2px solid #ffe0a6;outline-offset:3px}
@media(min-width:768px) and (max-width:1100px){#openLayoutEdit{top:76px;left:12px}}
body.mobile-layout #openLayoutEdit{top:76px;left:94px;min-height:32px;font-size:12px;padding:4px 10px}
body.mobile-layout button#mobileConnectionAlert{top:78px;right:12px;left:auto;transform:none;max-width:min(165px,calc(100vw - 212px));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.layout-panel-resize{position:fixed;right:auto;bottom:auto;z-index:3;width:44px;height:44px;min-height:44px;pointer-events:auto!important}
body.layout-editing.together-mode #togetherPanel{visibility:visible!important}
body #togetherPanel[data-layout-custom=panel] .together-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
body #togetherPanel[data-layout-custom=panel] .together-visual{flex-shrink:0}

body.mobile-layout #layoutEditBar,body.mobile-layout #layoutEditBar[popover]{top:112px;bottom:auto;left:12px;right:12px}
