/* Isolated selector: reserve the right end of the existing Menu row. */
#lab-menu:has(> #world-selector) #menu-toggle{width:calc(100% - 88px);}
/* One shared toggle position in both worlds and both menu states. */
#lab-menu[data-expanded=true][data-view=menu]:has(> #world-selector) #menu-toggle{width:calc(100% - 88px);padding:0;margin:0;}
#lab-menu #menu-toggle[aria-expanded=false] .menu-chevron{transform:rotate(-90deg);}
#lab-menu[data-expanded=true]:not([data-view=menu]):has(> #world-selector) #menu-toggle{width:44px;left:calc((100% - 88px)/2 - 22px);}
#lab-menu[data-expanded=true]:not([data-view=menu]):has(> #world-selector) #panel-header{padding-left:12px;padding-right:100px;grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);}
#lab-menu:has(> #world-selector) #panel-back{min-width:44px;}
#lab-menu:has(> #world-selector) #panel-label{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* Shared open-menu header divider, without shifting controls or content. */
#lab-menu[data-expanded=true]:has(> #world-selector)::after{content:"";position:absolute;top:43px;left:0;right:0;height:1px;background:#74776a55;pointer-events:none;z-index:5;}
/* Balanced breathing room below the header and after the footer. */
#lab-menu[data-expanded=true][data-view=menu]:has(> #world-selector) #menu-panel{padding:16px 14px;}
/* Both worlds use intrinsic menu rows, including short-screen scrolling. */
#lab-menu:has(> #world-selector) #menu-panel .directory-main{height:auto;min-height:0;grid-auto-rows:minmax(46px,auto);flex:none;}
#world-selector{position:absolute;top:0;right:0;width:88px;height:44px;z-index:4;}
#world-selector #world-toggle{width:100%;height:44px;min-height:44px;padding:8px 12px;border:0;border-left:1px solid #74776a55;border-radius:0;background:transparent;font:12px/1.4 Arial,Helvetica,sans-serif;backdrop-filter:none;}
#world-options{position:fixed;inset:auto 12px 64px auto;box-sizing:border-box;margin:0;padding:6px;width:88px;border:1px solid #92978c;border-radius:8px;background:#f4f1e9;color:#242723;box-shadow:0 4px 18px #0003;font:24px/1.5 Arial,Helvetica,sans-serif;}
#world-options a{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;padding:4px;border-radius:4px;text-decoration:none;}
#world-options a:link,#world-options a:visited,#world-options a:hover,#world-options a:focus,#world-options a:active{text-decoration:none;}
#world-options a:hover,#world-options a:focus-visible{background:#e1e5da;}
#world-options a:focus-visible{outline:2px solid #525f48;outline-offset:-2px;}
#world-options a[aria-current=page]{background:#d5dccd;text-decoration:none;}
/* Match #lab-menu::before glass; selected emoji uses ordinary menu-button fill.
   Reference: lab.css #lab-menu .directory-main button / a (normal, not active). */
#world-options{background:rgba(245,245,240,.70);border:0;box-shadow:none;backdrop-filter:blur(14px);}
#world-options a:hover{background:rgba(255,255,255,.9);}
#world-options a:focus-visible,#world-options a[aria-current=page]{background:rgba(249,250,245,.82);}
/* Keep keyboard focus legible on the light selected fill. */
#world-options a:focus-visible{outline:2px solid #525f48;outline-offset:-2px;}
