/* All layout changes require the Windows-only preload bridge. */
html.labrix-desktop-frame{--labrix-titlebar-native-height:env(titlebar-area-height,40px);--labrix-titlebar-height:calc(env(titlebar-area-y,0px) + var(--labrix-titlebar-native-height) + var(--labrix-titlebar-seam,1px));--labrix-content-height:calc(100dvh - var(--labrix-titlebar-height))}
html.labrix-desktop-frame body{padding-top:var(--labrix-titlebar-height);height:100dvh;min-height:100dvh;box-sizing:border-box}
html.labrix-desktop-frame #app,html.labrix-desktop-frame #login{height:var(--labrix-content-height);min-height:var(--labrix-content-height)}
.desktop-titlebar{position:fixed;inset:0 0 auto;height:var(--labrix-titlebar-height);box-sizing:border-box;z-index:2147483646;background:var(--chrome-bg,#124b3b);color:var(--chrome-text,#f4faf7);border:0;box-shadow:none;user-select:none;-webkit-user-select:none}
/* 1.0.2 accepts only light/dark. Match its fixed native caption until upgraded. */
.desktop-titlebar[data-native-palette="legacy"]{background:#173b2d;color:#f1f7f3}
.desktop-titlebar[data-native-palette="legacy"][data-theme="dark"]{background:#14251c;color:#e5eee8}
.desktop-titlebar-safe{position:absolute;top:env(titlebar-area-y,0px);left:env(titlebar-area-x,0px);height:var(--labrix-titlebar-native-height);width:env(titlebar-area-width,calc(100% - 138px));max-width:calc(100% - env(titlebar-area-x,0px));display:flex;align-items:center;gap:24px;padding:0 18px;box-sizing:border-box;app-region:drag;-webkit-app-region:drag}
.desktop-titlebar-brand{font-size:13px;font-weight:720;letter-spacing:.1px;flex:0 0 auto}
.desktop-titlebar-title{font-size:12px;font-weight:500;opacity:.82;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;text-align:center;padding-right:24px}
html.labrix-desktop-frame dialog{top:var(--labrix-titlebar-height)!important;bottom:0!important;max-height:calc(var(--labrix-content-height) - 24px)!important}
html.labrix-desktop-frame dialog::backdrop{top:var(--labrix-titlebar-height)}
html.labrix-desktop-frame .app-shell.details-open .details-panel,html.labrix-desktop-frame .sidebar-backdrop,html.labrix-desktop-frame .workspace-transition{top:var(--labrix-titlebar-height)}
html.labrix-desktop-frame .settings-shell{max-height:calc(var(--labrix-content-height) - 24px)}
@media(max-width:720px){
  html.labrix-desktop-frame .sidebar{height:var(--labrix-content-height)}
  html.labrix-desktop-frame .app-shell .details-panel{top:var(--labrix-titlebar-height)}
  html.labrix-desktop-frame .settings-dialog,html.labrix-desktop-frame dialog.mw-dialog{height:var(--labrix-content-height);max-height:var(--labrix-content-height)!important}
  html.labrix-desktop-frame .settings-shell{height:var(--labrix-content-height);max-height:var(--labrix-content-height)}
  .desktop-titlebar-safe{padding-left:14px;gap:12px}.desktop-titlebar-title{padding-right:0}
}
