/* Native shell enhancements only; the shared cloud chat remains the source of truth. */
html.yap-desktop-app {--desktop-surface:#f8faf7;--desktop-aside:#f2f6f2;--desktop-line:#e2eae3}
html.yap-desktop-app,html.yap-desktop-app body{height:100%;margin:0;overflow:hidden;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;background:var(--desktop-surface)!important}
html.yap-desktop-app body>main,html.yap-desktop-app body>main>.workspace{height:100dvh!important;min-height:0!important;background:var(--desktop-surface)!important}
html.yap-desktop-app body.yap-sidebar-open>main>.workspace{padding-left:var(--yap-sidebar-width,280px)!important}
html.yap-desktop-app #yap-desktop-menu[open]>#yap-tool-menu{width:var(--yap-sidebar-width,280px)!important;background:var(--desktop-aside)!important;border-right:1px solid var(--desktop-line)!important;border-radius:0!important;box-shadow:none!important;padding:12px 10px 10px!important}
html.yap-desktop-app #yap-tool-menu .yap-sidebar-footer{background:var(--desktop-aside)!important;border-top:1px solid var(--desktop-line)!important}
html.yap-desktop-app #yap-tool-menu .yap-sidebar-caption{font-size:11px!important;letter-spacing:.04em!important;opacity:.65}
html.yap-desktop-app #yap-tool-menu #new{min-height:42px!important;border-radius:10px!important;background:transparent!important;color:inherit!important;font-weight:600!important;box-shadow:none!important}
html.yap-desktop-app #yap-tool-menu #new:hover{background:#e4eee5!important}
html.yap-desktop-app .workspace .top{border-bottom:1px solid var(--desktop-line)!important;background:var(--desktop-surface)!important;min-height:61px!important;padding:10px 24px!important}
html.yap-desktop-app .workspace .topline{align-items:center!important;gap:12px!important}
html.yap-desktop-app .workspace .topline .yap-home-link{font-size:14px!important;font-weight:680!important;letter-spacing:-.018em!important}
html.yap-desktop-app .workspace .topline .yap-home-link img{width:clamp(136px,13vw,190px)!important;height:auto!important;max-height:48px!important;object-fit:contain!important;flex:none}
html.yap-desktop-app .workspace .messages{max-width:none!important;padding:28px clamp(24px,9vw,160px)!important;overscroll-behavior:contain}
html.yap-desktop-app .workspace .composer{max-width:none!important;padding:12px clamp(24px,9vw,160px) 26px!important;background:var(--desktop-surface)!important}
html.yap-desktop-app .workspace .compose-row{border:1px solid var(--desktop-line)!important;border-radius:19px!important;box-shadow:0 6px 26px #1e38220b!important;background:#fff!important;padding:8px!important}
html.yap-desktop-app #yap-tool-menu #history button,html.yap-desktop-app #yap-tool-menu .yap-project-folder>summary{border-radius:9px!important}
html.yap-desktop-app #yap-tool-menu #history button:hover,html.yap-desktop-app #yap-tool-menu .yap-project-folder>summary:hover{background:#e4eee5!important}
html.yap-desktop-app .yap-desktop-caption{margin-left:4px;font-size:12px;color:#607669;font-weight:560;white-space:nowrap}
html.yap-desktop-app .yap-desktop-native-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #cfe4d4;border-radius:999px;background:#eaf5ed;color:#235d3d;padding:5px 9px;font-size:11px;font-weight:750}
html.yap-desktop-app .yap-desktop-native-chip::before{content:"";width:6px;height:6px;background:#26a454;border-radius:50%}
html.yap-desktop-app .yap-sidebar-resize{right:-5px!important}
@media(max-width:800px){html.yap-desktop-app body.yap-sidebar-open>main>.workspace{padding-left:0!important}html.yap-desktop-app #yap-desktop-menu[open]>#yap-tool-menu{width:min(300px,85vw)!important}html.yap-desktop-app .workspace .messages{padding:20px 17px!important}html.yap-desktop-app .workspace .composer{padding:8px 16px 16px!important}html.yap-desktop-app .yap-desktop-native-chip{display:none}}
@media(prefers-color-scheme:dark){html.yap-desktop-app:has(body[data-theme="dark"]){--desktop-surface:#141d18;--desktop-aside:#1b2a21;--desktop-line:#3a4b3e}html.yap-desktop-app .workspace .compose-row{color:inherit}}

/* Theme is chosen by the shared chat preference, not by the desktop operating system alone. */
html.yap-desktop-app[data-theme="dark"]{
 --desktop-surface:#14201a;--desktop-aside:#1a2b21;--desktop-line:#344c3b;
}
html.yap-desktop-app[data-theme="dark"] .workspace .top,
html.yap-desktop-app[data-theme="dark"] .workspace .composer{
 background:var(--desktop-surface)!important;
}
html.yap-desktop-app[data-theme="dark"] .workspace .compose-row{
 background:#1f3026!important;border-color:#405a47!important;
}
html.yap-desktop-app[data-theme="dark"] #yap-tool-menu #new:hover,
html.yap-desktop-app[data-theme="dark"] #yap-tool-menu #history button:hover,
html.yap-desktop-app[data-theme="dark"] #yap-tool-menu .yap-project-folder>summary:hover{
 background:#294433!important;
}

/* The desktop logo stays inside the chat workspace. */
html.yap-desktop-app .topline .yap-home-link {cursor:default!important;text-decoration:none!important;}

/* Keep the conversation scrollbar flush with the window edge on web/Electron. */
html.yap-desktop-app body>main>.workspace>.messages{box-sizing:border-box!important;width:100%!important;max-width:none!important;margin-right:0!important;scrollbar-gutter:auto!important;}
/* Consistent dark-mode controls: no white-on-white account or sidebar buttons. */
html.yap-desktop-app[data-theme="dark"] #yap-tool-menu .yap-sidebar-footer :is(button,summary),
html.yap-desktop-app[data-theme="dark"] #yap-tool-menu .yap-profile-action,
html.yap-desktop-app[data-theme="dark"] #yap-tool-menu .yap-profile-settings-photo{
 background:transparent!important;color:#edf6ef!important;border-color:#405a47!important;
}
html.yap-desktop-app[data-theme="dark"] #yap-tool-menu .yap-sidebar-footer :is(button,summary):hover,
html.yap-desktop-app[data-theme="dark"] #yap-tool-menu .yap-profile-action:hover{background:#294433!important;}
