:root{--desktop-titlebar-height:30px;--desktop-titlebar-bg:#171d2a;--desktop-titlebar-border:#323c50;--desktop-titlebar-control-hover:#ffffff17;--desktop-titlebar-close-hover:#c7464d;--desktop-titlebar-text:#edf1fa;--desktop-titlebar-muted:#98a4ba}
body.desktop-chrome-active{--desktop-titlebar-height:30px}
/* Paint inside the viewport without changing layout, hit testing or drag regions.
   Repeat in the dialog top layer so open Settings cannot cover the window edge. */
body.desktop-chrome-active::after,.desktop-chrome-active dialog[open]::after{content:"";position:fixed;inset:0;z-index:2147483647;box-sizing:border-box;border:var(--desktop-window-accent-width,1px) solid var(--desktop-window-accent,var(--desktop-titlebar-border));border-radius:0;pointer-events:none;user-select:none}
:root[data-desktop-window-border=off] body.desktop-chrome-active::after,:root[data-desktop-window-border=off] .desktop-chrome-active dialog[open]::after{content:none}
/* Restored windows use the OS frame and its real rounded corners. Maximized/
   fullscreen windows have no visible native rim, so retain one viewport stroke. */
:root[data-desktop-window-border-native=native] body.desktop-chrome-active::after,:root[data-desktop-window-border-native=native] .desktop-chrome-active dialog[open]::after{content:none}
.desktop-chrome-active .app-shell{height:calc(100dvh - var(--desktop-titlebar-height))}
.desktop-titlebar{position:relative;height:var(--desktop-titlebar-height);width:100%;box-sizing:border-box;background:var(--desktop-titlebar-bg);border-bottom:1px solid var(--desktop-titlebar-border);color:var(--desktop-titlebar-text);-webkit-app-region:drag;app-region:drag;user-select:none;overflow:hidden}
.desktop-titlebar-content{height:100%;width:env(titlebar-area-width,calc(100% - 140px));margin-left:env(titlebar-area-x,0px);display:flex;align-items:center;min-width:0}
.desktop-titlebar-nav{display:flex;align-items:center;gap:2px;flex:none;width:70px;padding-left:4px;-webkit-app-region:no-drag;app-region:no-drag}
.desktop-titlebar-arrow{height:25px;width:29px;display:grid;place-items:center;padding:0;border:0;border-radius:4px;background:transparent;color:var(--desktop-titlebar-muted);-webkit-app-region:no-drag;app-region:no-drag}
.desktop-titlebar-arrow svg{width:16px;height:16px}
.desktop-titlebar-arrow:hover:not(:disabled){background:var(--desktop-titlebar-control-hover);color:var(--desktop-titlebar-text)}
.desktop-titlebar-arrow:disabled{opacity:.4}
.desktop-titlebar-arrow:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.desktop-titlebar-context{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;min-width:0;width:max-content;max-width:calc(100% - 320px);margin:0;font-size:12px;font-weight:600;line-height:1;pointer-events:none;-webkit-app-region:drag;app-region:drag}
.desktop-titlebar-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.desktop-titlebar-icon{position:absolute;right:calc(100% + 6px);display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--accent-strong);color:var(--accent-text);font-size:10px;font-weight:750}
.desktop-titlebar-icon[hidden]{display:none}
.auth-page.desktop-chrome-active{display:flex;flex-direction:column;min-height:100dvh;padding:0}
.auth-page.desktop-chrome-active>.auth-card{margin:auto;max-width:min(460px,calc(100% - 32px))}
@media (display-mode:fullscreen){.desktop-titlebar{display:none}.desktop-chrome-active .app-shell{height:100dvh}}
