/* Shared language control above all page titles and primary content. */
.globalLocaleBar{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  height:44px;min-height:44px;padding:4px max(12px,env(safe-area-inset-right));
  border-bottom:1px solid #273d59;
  color:#96aecb;background:#081625;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  position:sticky;top:0;z-index:110;
}
.globalLocaleHomeRow{display:flex;align-items:center}
.globalHomeBtn{display:flex;align-items:center;justify-content:center;min-width:77px;min-height:35px;padding:0 13px;border-radius:9px;border:1px solid #44658c;background:#112840;color:#cfe2ff;font-weight:950;font-size:12px;letter-spacing:.02em;text-decoration:none;white-space:nowrap}
.globalHomeBtn:focus-visible{outline:2px solid #9cbcff;outline-offset:2px}
.globalLocaleControls{display:flex;align-items:center;gap:9px;min-width:0}
.globalLocaleLabel{font-size:11px;font-weight:800;white-space:nowrap}
.globalLocaleSwitch{display:flex;gap:3px;padding:3px;border:1px solid #355477;border-radius:10px;background:#0e2036}
.globalLocaleSwitch button{cursor:pointer;min-width:46px;min-height:31px;padding:3px 10px;background:transparent;border:0;border-radius:7px;color:#a7bad3;font:900 12px/1.2 system-ui,sans-serif}
.globalLocaleSwitch button.active{background:#315fae;color:#fff;box-shadow:0 1px 5px #0004}
.globalLocaleSwitch button:focus-visible{outline:2px solid #9cbcff;outline-offset:2px}
body.hasGlobalLocaleBar .top,body.hasGlobalLocaleBar .topbar{top:44px}
body.hasGlobalLocaleBar.editor-body .editor-layout{height:calc(100vh - 102px)}
body.hasGlobalLocaleBar.editor-body #langBtn,body.hasGlobalLocaleBar.editor-body #mobileLangBtn{display:none!important}
body.hasGlobalLocaleBar.homeHost #basicRoot{top:44px}
body.hasGlobalLocaleBar.homeHost .communityLoading{top:44px}
@media(max-width:760px){
  body.hasGlobalLocaleBar.editor-body .editor-layout{height:auto}
  body.hasGlobalLocaleBar.editor-body .preview-area{min-height:calc(100vh - 154px)}
  body.hasGlobalLocaleBar.editor-body .canvas-stage{min-height:calc(100vh - 194px)}
}
@media(max-width:420px){.globalLocaleBar{padding-right:12px}.globalLocaleSwitch button{min-width:44px}}

/* One bar belongs to the outer shell, never the embedded Home iframe. */
html.embeddedSiteFrame .globalLocaleBar{display:none!important}
html.embeddedSiteFrame #editorHomeBtn{display:none!important}
@media(max-width:760px){
  html.embeddedSiteFrame .topActions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}


/* R31: Discover is a persistent sibling of HOME, not an editor action. */
.globalNavLinks{display:flex;align-items:center;gap:6px;min-width:0}
.globalDiscoverBtn{
  display:inline-flex;align-items:center;justify-content:center;min-height:35px;
  padding:0 12px;border:1px solid #2a496a;border-radius:9px;
  background:#0f243a;color:#bfd5ef;text-decoration:none;
  white-space:nowrap;font:900 12px/1 system-ui,-apple-system,sans-serif;
}
.globalDiscoverBtn:hover,.globalDiscoverBtn:focus-visible{background:#183451;border-color:#5e89b9;color:#fff}
@media(max-width:600px){
  .globalLocaleLabel{display:none}
  .globalLocaleBar{gap:5px;padding-left:8px;padding-right:8px}
  .globalNavLinks{gap:4px}
  .globalHomeBtn{min-width:60px;padding:0 9px}
  .globalDiscoverBtn{padding:0 9px}
  .globalLocaleSwitch{padding:2px;gap:1px}
  .globalLocaleSwitch button{min-width:34px;min-height:31px;padding:3px 5px}
  html.embeddedSiteFrame .topActions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
