/* One height owner: use the visible browser area, never subtract guessed header sizes. */
body:is(.sharedView,.exploring):not(.directory-home-active){display:flex;flex-direction:column;height:var(--roamzi-browser-height,100dvh);min-height:0;overflow:hidden}
body:is(.sharedView,.exploring):not(.directory-home-active)>header{flex:0 0 auto;height:auto;min-height:58px;max-height:25%;overflow:auto;flex-wrap:wrap;padding:8px 14px;gap:6px}
body:is(.sharedView,.exploring):not(.directory-home-active)>main{display:flex;flex:1 1 0;height:auto;min-height:0;overflow:hidden}
body:is(.sharedView,.exploring):not(.directory-home-active) .workspace{display:flex;flex-direction:column;flex:1 1 0;height:auto;min-height:0;padding:10px;overflow:hidden}
body:is(.sharedView,.exploring):not(.directory-home-active) #viewport{flex:1 1 0;height:auto;min-height:0}
body:is(.sharedView,.exploring):not(.directory-home-active) #liveVisitBar{flex:0 0 auto;max-height:22%;overflow:auto}
body.sharedView:not(.directory-home-active) #sharedRoomBar{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 8px;padding:8px 12px}
body.sharedView:not(.directory-home-active) #sharedRoomBar>div:first-child{flex:1 1 140px;min-width:0}
body.sharedView:not(.directory-home-active) #sharedRoomName{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.sharedView:not(.directory-home-active) .sharedActions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
#sharedEnterVR{min-height:44px;background:#6d4ab0;color:white;border-color:#6d4ab0;font-weight:700;white-space:nowrap}
body:is(.sharedView,.exploring):not(.directory-home-active) .viewTools{right:10px;bottom:max(8px,env(safe-area-inset-bottom));left:10px;max-width:none;justify-content:flex-end;flex-wrap:wrap;gap:4px}
body:is(.sharedView,.exploring):not(.directory-home-active) #vr{order:-1;min-height:40px;background:#f4eaff;color:#583880;font-weight:700}
/* All dialogs remain scrollable inside short headset/browser windows. */
#modal{max-height:calc(var(--roamzi-browser-height,100dvh) - 16px);width:min(90%,800px);margin:auto;overflow-y:auto;overscroll-behavior:contain;scroll-padding:16px}
#modalContent{min-width:0;overflow-wrap:anywhere}
#modal .close{position:sticky;display:block;top:-20px;margin:-20px -20px 0 auto;z-index:5;background:#fff;min-width:40px;min-height:40px}
#modal .vrStart .productToolbar{display:flex;flex-wrap:wrap;gap:8px;position:sticky;top:0;z-index:2;background:#f1f5ec;padding:4px 0}
#modal #startVRSession{min-height:44px;white-space:normal}
@media(max-height:600px){#modal{padding:20px;max-height:calc(var(--roamzi-browser-height,100dvh) - 12px)}#modal h1{font-size:25px;line-height:1.15;margin:8px 0}#modal .vrIntro{margin:8px 0;font-size:12px}#modal .vrStart{padding:12px;margin:10px 0}#modal .vrStart h2{font-size:18px}#modal .vrStart small{font-size:11px}#modal .close{top:-12px;margin:-12px -12px 0 auto}.vrHelpGrid{margin-top:16px}}
@media(max-width:600px){body.sharedView:not(.directory-home-active) #sharedRoomBar{padding:6px 8px}body.sharedView:not(.directory-home-active) .sharedActions{width:100%}body.sharedView:not(.directory-home-active) .sharedActions button{min-height:36px}body.sharedView:not(.directory-home-active) #sharedEnterVR{min-height:44px;margin-right:auto}body:is(.sharedView,.exploring):not(.directory-home-active)>header .brand{min-width:0}#modal{width:calc(100% - 16px)}}

#roomLinkLoading{display:none}body.room-link-pending #roomLinkLoading{display:grid;align-content:center;justify-content:center;text-align:center;position:fixed;inset:0;z-index:2000;padding:32px;background:#faf7fc;color:#6d4ab0;font:16px/1.7 system-ui}body.room-link-pending #roomLinkLoading strong{font-size:26px}body.room-link-pending main,body.room-link-pending>header{visibility:hidden}body.room-link-pending #directoryHome{display:none}

#vrBrowserHandoff[hidden]{display:none}#vrBrowserHandoff{display:block;background:#f0e9fb;border-color:#cdb7e4}#headsetRoomAddress{width:100%;font-size:12px;padding:11px;border:1px solid #cdb7e4;border-radius:10px;background:white;color:#4d3768}#headsetCopyStatus{font-size:12px;line-height:1.8}#startVRSession[hidden],#openVRDirect[hidden]{display:none}
