/* Native titlebar occupies space inside the renderer viewport on Linux/Windows. */
html.aegis-desktop { --desktop-bar-height:36px; }
html.aegis-desktop body { height:100dvh;padding-top:var(--desktop-bar-height);box-sizing:border-box;overflow:hidden; }
html.aegis-desktop #root { height:100%;min-height:0;min-width:0;overflow:hidden; }
html.aegis-desktop #root>.app { height:100%;min-height:0;max-height:100%; }
.desktop-titlebar { position:fixed;top:0;left:env(titlebar-area-x,0px);width:env(titlebar-area-width,calc(100% - 150px));height:36px;display:flex;align-items:center;gap:9px;background:#101217;color:#e5e7ec;border-bottom:1px solid #ffffff0b;padding:0 12px;font:600 12px system-ui;z-index:100000;-webkit-app-region:drag;user-select:none; }
.desktop-titlebar img { width:20px;height:20px;flex:none; }
.desktop-titlebar span { opacity:.45;font-weight:400;margin-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.desktop-titlebar button { margin-left:auto;-webkit-app-region:no-drag;background:transparent;color:#aeb3c0;border:0;border-radius:5px;padding:5px 10px;cursor:pointer; }
.desktop-titlebar button:hover { color:#ffd481;background:#ffffff0b; }
html.aegis-desktop.desktop-fullscreen { --desktop-bar-height:0px; }
.desktop-fullscreen .desktop-titlebar { display:none; }
html.aegis-desktop :is(.overlay,.palette-overlay,.search-overlay,.call-ovl,.vstage,.lb-ovl) { top:var(--desktop-bar-height); }
html.aegis-desktop .overlay .modal.friends-center { height:100%;max-height:100%; }
html.aegis-desktop .lb-ovl :is(.lb-close,.lb-save) { top:calc(var(--desktop-bar-height) + 16px); }
html.aegis-desktop .call-ovl.collapsed .call-bar { top:calc(var(--desktop-bar-height) + 12px); }
@media(max-width:767px) {
  html.mobile-v2.aegis-desktop #root { height:calc(var(--app-visible-height,100dvh) - var(--desktop-bar-height)); }
  html.mobile-v2.aegis-desktop #root>.app { height:auto!important; }
}
