/* Grouped sidebar navigation. */
body.ksan-unified #appSidebar{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:0;overflow:hidden;min-height:0;color:#eee;font:15px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
.ksan-panel-header{position:static;margin:0;box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:10px 12px 14px;flex-shrink:0}
#ksanMenuToggle{display:grid;place-items:center;width:32px;height:40px;padding:4px;flex-shrink:0;color:#aaa;background:none;border:0;border-radius:10px;cursor:pointer}
#ksanMenuToggle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.ksan-section-search{display:flex;align-items:center;gap:10px;min-width:0;flex:1;padding:11px 14px;border-radius:24px;background:#292929}
.ksan-section-search svg{width:20px;height:20px;fill:none;stroke:#888;stroke-width:1.8;flex-shrink:0}
.ksan-section-search input{width:100%;min-width:0;background:none;border:0;outline:0;color:#eee;font:inherit}
.ksan-menu-links{display:flex;flex-direction:column;justify-content:flex-start;margin:0;gap:0;padding:8px 8px 12px;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#444 transparent}
.ksan-menu-group{position:relative;padding:0;border-radius:0;background:transparent;flex-shrink:0}
body.ksan-unified #appSidebar .ksan-nav-link{display:flex;align-items:center;gap:12px;min-height:68px;padding:10px 12px;box-sizing:border-box;text-decoration:none;color:#eee;border-radius:14px;margin:0}
body.ksan-unified #appSidebar .ksan-section-avatar{display:flex;align-items:center;justify-content:center;flex:0 0 56px;width:56px;height:56px;padding:0;box-sizing:border-box;border-radius:0;background:transparent;box-shadow:none;line-height:0}
body.ksan-unified #appSidebar .ksan-nav-link img{width:24px;height:24px;object-fit:contain;opacity:.8}
body.ksan-unified #appSidebar .ksan-nav-link img.ksan-art-icon{display:block;width:46px;height:46px;max-width:none;margin:0;opacity:1;object-position:center}
body.ksan-unified #appSidebar .ksan-section-avatar svg{display:block;flex:0 0 34px;width:34px;height:34px;margin:0;fill:none;stroke:currentColor;color:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.ksan-unified #appSidebar .ksan-nav-link:hover .ksan-section-avatar svg{color:#fff}
body.ksan-unified #appSidebar .ksan-nav-link.is-active .ksan-section-avatar svg{color:#fff}
.ksan-section-copy{display:grid;gap:4px;min-width:0;flex:1}
.ksan-section-copy strong{font-size:16px;font-weight:600;line-height:22px;letter-spacing:0}
.ksan-section-copy small{font-size:14px;color:#9e9e9e;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ksan-section-copy small.ksan-balance-metric{font-size:15px;line-height:20px;font-weight:600;color:#d8d3e1;font-variant-numeric:tabular-nums}.ksan-balance-unit{font-size:12px;font-weight:400;color:#aaa4b4;margin-left:3px}
.ksan-row-value{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;flex-shrink:0;margin-left:auto;font-size:14px;line-height:20px;letter-spacing:0;color:#e0dfe5;font-variant-numeric:tabular-nums;white-space:nowrap}
.ksan-row-value b{font-weight:600}
.ksan-row-value:has(.ksan-value-delta) b{font-weight:500;color:#a5a3ad}
body.ksan-unified #appSidebar .ksan-row-value .ksan-value-delta{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:20px;box-sizing:border-box;padding:0 6px;border-radius:6px;background:#342d45;font-size:12px;line-height:20px;font-weight:500;color:#c4b2ef}
.ksan-row-value .ksan-value-unit{font-size:11px;letter-spacing:.02em;color:#aaa7b1}
body.ksan-unified #appSidebar .ksan-ai-entry .ksan-nav-link.is-ai{min-height:76px;gap:12px;color:#eee;background:#090909;border:0;border-radius:16px;box-shadow:none;margin:0 0 8px;padding:10px 12px}
body.ksan-unified #appSidebar .is-ai .ksan-section-avatar{flex-basis:56px;width:56px;height:56px;background:transparent;box-shadow:none;border-radius:0}
body.ksan-unified #appSidebar .ksan-nav-link.is-ai img{display:block;width:52px;height:52px;margin:0;object-position:center;opacity:1;filter:none}
body.ksan-unified #appSidebar .ksan-nav-link:hover{background:#ffffff06}
body.ksan-unified #appSidebar .ksan-nav-link.is-active{background:#303033;box-shadow:none;color:#fff}
body.ksan-unified #appSidebar .ksan-nav-link.is-active small,body.ksan-unified #appSidebar .ksan-nav-link.is-active .ksan-row-value,body.ksan-unified #appSidebar .ksan-nav-link.is-active .ksan-value-delta,body.ksan-unified #appSidebar .ksan-nav-link.is-active .ksan-value-unit{color:#b8b8c0}
body.ksan-unified #appSidebar .ksan-nav-link:focus-visible,#ksanMenuToggle:focus-visible,#ksanDropdown a:focus-visible{outline:2px solid #b7a4f2;outline-offset:-2px}
.ksan-list-top{display:flex;align-items:baseline;gap:10px;padding:16px 22px;margin-top:auto;flex-shrink:0}.ksan-list-title{font-size:18px;font-weight:650;color:#c7c3d1}.ksan-list-caption{font-size:11px;color:#79777e}
#ksanDropdown{position:absolute;z-index:50;left:12px;top:65px;min-width:225px;background:#2b2b2b;border:1px solid #ffffff10;border-radius:12px;padding:6px;box-shadow:0 10px 36px #0006}
#ksanDropdown a{display:block;padding:12px 14px;color:#eee;text-decoration:none;border-radius:7px;font-size:14px}#ksanDropdown a:hover{background:#ffffff09}
body.ksan-unified #appSidebar [hidden]{display:none!important}#sectionEmpty{color:#999;text-align:center;padding:20px}
/* v951: one layout owner for every top-level page. */
body.ksan-unified{--ksan-nav-width:clamp(300px,25vw,440px);--ksan-edge:16px;--ksan-gap:24px;margin:0!important;padding:0!important;min-height:100dvh!important;background-color:#000!important;background-image:linear-gradient(#0007,#0007),url('../images/menu/wallpaper.webp')!important;background-size:auto,460px 460px!important;background-repeat:repeat!important;background-attachment:fixed!important}
body.ksan-unified #ksanSiteHeader,body.ksan-unified .content-brand,body.ksan-unified #ksanHeaderMount,body.ksan-unified>.login-topbar,body.ksan-unified>.registration-topbar{display:none!important}
body.ksan-unified.has-site-header[data-view]>.ksan-shell,body.ksan-unified.has-site-header>.ksan-shell{position:fixed!important;inset:var(--ksan-edge)!important;display:grid!important;grid-template-columns:var(--ksan-nav-width) minmax(0,1fr)!important;gap:var(--ksan-gap)!important;width:auto!important;height:auto!important;max-width:none!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;align-items:stretch!important;transform:none!important}
body.ksan-unified.has-site-header #appSidebar.ksan-unified-panel{position:fixed!important;inset:var(--ksan-edge) auto var(--ksan-edge) var(--ksan-edge)!important;grid-column:1!important;grid-row:1!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:stretch!important;align-self:start!important;gap:0!important;width:var(--ksan-nav-width)!important;max-width:none!important;height:calc(100dvh - var(--ksan-edge) - var(--ksan-edge))!important;max-height:none!important;min-height:0!important;margin:0!important;padding:0!important;background:#212121!important;border:1px solid #ffffff04!important;border-radius:18px!important;box-shadow:none!important;transform:none!important;overflow:hidden!important;z-index:100!important;box-sizing:border-box!important;opacity:1!important;visibility:visible!important}
body.ksan-unified.has-site-header[data-view]>.ksan-shell>.ksan-main,body.ksan-unified.has-site-header>.ksan-shell>.ksan-main{position:relative!important;inset:auto!important;grid-column:2!important;grid-row:1!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0 8px!important;transform:none!important;box-sizing:border-box!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#4b435b transparent;background:transparent!important}
body.ksan-unified.has-site-header .ksan-main>#wall2010View,body.ksan-unified.has-site-header .ksan-main>#personalView,body.ksan-unified.has-site-header .ksan-main>#notificationsView,body.ksan-unified.has-site-header .ksan-main>#loungeView,body.ksan-unified.has-site-header .ksan-main>#communitiesView,body.ksan-unified.has-site-header .ksan-main>#settingsView,body.ksan-unified.has-site-header .ksan-main>.finance-view{width:100%!important;max-width:980px!important;min-width:0!important;margin:0 auto!important;box-sizing:border-box}
body.ksan-unified.has-site-header #wall2010View{padding-top:0!important}
body.ksan-unified.has-site-header .wall2010-page-header{display:none!important}
body.ksan-unified.has-site-header #aiWorkspace{max-width:none!important;display:block;box-shadow:none!important;border-radius:0!important;position:relative!important;inset:auto!important;width:100%!important;height:100%!important;min-height:0!important;border:0!important;margin:0!important;background:transparent!important}
body.ksan-unified.has-site-header #chatsView,body.ksan-unified.has-site-header .chats-workspace{position:relative!important;inset:auto!important;width:100%!important;height:100%!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important}
body.ksan-unified .chats-layout{height:100%!important;min-height:0!important}
body.ksan-unified .dialog-thread{background:transparent!important}
body.ksan-unified #appSidebar .ksan-count-badge[hidden]{display:none!important}
body.ksan-unified #ksanAiRoot{height:100%!important;min-height:0!important;background:transparent!important}
body.ksan-unified #ksanAiRoot .ksan-ai__start-layout{max-width:calc(100% - 24px)!important}

body.ksan-unified #ksanMobileMenu{display:none}
body.ksan-unified #ksanMenuShade{display:none}
/* Embedded AI paints the same wallpaper itself: dark iframe canvases are opaque in Chrome. */
html.ksan-embedded{background:#000!important}
html.ksan-embedded body{background-color:#000!important;background-image:linear-gradient(#0007,#0007),url('../images/menu/wallpaper.webp')!important;background-size:auto,460px 460px!important;background-repeat:repeat!important;background-attachment:fixed!important}
html.ksan-embedded #ksanAiRoot{background:transparent!important}
html.ksan-embedded #ksanHeaderMount{display:none!important}
@media(max-width:1100px) and (min-width:761px){body.ksan-unified{--ksan-nav-width:290px;--ksan-gap:16px;--ksan-edge:12px}body.ksan-unified .chats-layout{grid-template-columns:minmax(0,1fr)!important}body.ksan-unified .chats-layout.thread-open .dialogs-panel{display:none!important}}
@media(max-width:760px){
 body.ksan-unified{--ksan-edge:8px;--ksan-gap:0;background-size:420px 420px!important}
 body.ksan-unified.has-site-header[data-view]>.ksan-shell,body.ksan-unified.has-site-header>.ksan-shell{grid-template-columns:minmax(0,1fr)!important;top:54px!important}
 body.ksan-unified.has-site-header[data-view]>.ksan-shell>.ksan-main,body.ksan-unified.has-site-header>.ksan-shell>.ksan-main{grid-column:1!important;padding:0!important}
 body.ksan-unified.has-site-header #appSidebar.ksan-unified-panel{position:fixed!important;inset:8px auto 8px 8px!important;width:min(360px,calc(100vw - 24px))!important;height:calc(100dvh - 16px)!important;display:none!important;z-index:2000!important}
 body.ksan-unified.ksan-menu-open #appSidebar.ksan-unified-panel{display:flex!important}
 body.ksan-unified #ksanMobileMenu{position:fixed;top:8px;left:12px;z-index:1800;display:grid;place-items:center;width:38px;height:38px;border:1px solid #ffffff14;border-radius:11px;background:#212121;color:#bdbdc4;cursor:pointer}
 body.ksan-unified #ksanMobileMenu svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
 body.ksan-unified.ksan-menu-open #ksanMobileMenu{left:auto;right:10px;z-index:2100}
 body.ksan-unified.ksan-menu-open #ksanMenuShade{display:block;position:fixed;inset:0;background:#0008;border:0;z-index:1900}
}
@media(max-width:1100px){
 body.ksan-unified[data-view="chats"] .chats-workspace .chats-layout,body.ksan-unified .chats-workspace .chats-layout{display:flex!important;flex-direction:column!important}
 body.ksan-unified[data-view="chats"] .chats-layout .dialogs-panel,body.ksan-unified .chats-layout .dialogs-panel{width:100%!important;min-width:0!important;flex:1!important}
 body.ksan-unified[data-view="chats"] .chats-layout.is-thread-open .dialogs-panel,body.ksan-unified .chats-layout.is-thread-open .dialogs-panel{display:none!important}
 body.ksan-unified .chats-layout.is-thread-open .dialog-thread{display:flex!important;flex:1!important;min-height:0!important}
 body.ksan-unified .chats-layout .thread-back-btn{display:grid!important}
 body.ksan-unified .chats-layout>.tg-empty{display:none!important}
}

/* v958: wallpaper owns a visible layer behind the application. */
body.ksan-unified.has-site-header>.ksan-shell{z-index:1!important;background:transparent!important}



.ksan-pro-word{font-size:.8em;letter-spacing:.045em;margin-left:2px;font-weight:650;color:#bdabe8}.ksan-pro-status{font-size:12px;color:#96919f}#ksanProStatus{width:min(340px,calc(100vw - 32px));padding:24px;border:1px solid #ffffff12;border-radius:20px;background:#212121;color:#eee;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}#ksanProStatus::backdrop{background:#0009}#ksanProStatus h2{margin:0 0 12px;font-size:22px}#ksanProStatus p{color:#aaa}#ksanProStatus button{margin-top:12px;padding:10px 18px;background:#393241;color:#dfd4f4;border:0;border-radius:10px;cursor:pointer}

.ksan-menu-bottom{flex:0 0 auto;margin-top:auto;padding:12px 8px 10px;display:flex;flex-direction:column;gap:12px}
body.ksan-unified #appSidebar .ksan-bottom-banner{display:flex;align-items:center;gap:12px;min-height:66px;padding:12px 16px;margin:0 4px;box-sizing:border-box;border-radius:18px;background:radial-gradient(ellipse at 8% 25%,#b7865540,transparent 58%),linear-gradient(115deg,#3c303c 0%,#352a48 55%,#292b42 100%);border:1px solid #d6b7dc38;box-shadow:inset 0 1px 0 #ffe4c412;color:#f7f1f8;text-decoration:none;font-size:15px;font-weight:500;line-height:22px}
.ksan-bottom-banner>.ksan-premium-icon{flex:0 0 48px;width:48px;height:48px;object-fit:contain}
.ksan-bottom-banner>svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ksan-bottom-banner>span{flex:1;min-width:0}
.ksan-bottom-banner>svg.ksan-banner-arrow{flex:0 0 20px;width:20px;height:20px;color:#d6c5e3}
.ksan-bottom-banner:hover{filter:brightness(1.1)}
.ksan-bottom-banner:focus-visible{outline:2px solid white;outline-offset:2px}

/* The profile remains a navigation row beside the promotional banner. */
body.ksan-unified #appSidebar .ksan-nav-link.is-profile{position:relative;background:transparent;border-radius:14px}
body.ksan-unified #appSidebar .ksan-nav-link.is-profile:hover{background:#292929}
body.ksan-unified #appSidebar .ksan-nav-link.is-profile.is-active{background:#303033;box-shadow:none;color:#fff}
body.ksan-unified #appSidebar .ksan-nav-link.is-profile.is-active small{color:#a6a6ad}
body.ksan-unified #appSidebar .ksan-nav-link.is-profile.is-active .ksan-section-avatar svg{color:#fff}

body.ksan-unified #appSidebar .ksan-menu-badge{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;min-width:22px;height:22px;box-sizing:border-box;padding:0 6px;border-radius:12px;background:#8770d7;color:#fff;font-size:12px;font-weight:600;line-height:22px;font-variant-numeric:tabular-nums}
body.ksan-unified #appSidebar .ksan-menu-badge[hidden]{display:none}
body.ksan-unified #appSidebar .ksan-nav-link.is-active .ksan-menu-badge{background:#fff;color:#7057b7}

body.ksan-unified #appSidebar .ksan-nav-link>.ksan-menu-badge{margin-left:auto}
body.ksan-unified #appSidebar .ksan-nav-link.is-active .ksan-row-value .ksan-value-delta{background:#ffffff20;color:#fff}
body.ksan-unified #appSidebar .ksan-nav-link.is-active .ksan-row-value b{color:#fff}

.ksan-premium-copy{display:block;min-height:44px;white-space:pre-line;align-content:center}

/* AI uses a continuous quiet canvas, including the area outside its iframe. */


/* Compact balances stay above the Pro card, outside the main navigation list. */
body.ksan-unified #appSidebar .ksan-assets-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 4px}
body.ksan-unified #appSidebar .ksan-assets-summary .ksan-nav-link{min-height:72px;padding:12px 10px;gap:9px;background:#29282c;border-radius:14px}
body.ksan-unified #appSidebar .ksan-assets-summary .ksan-nav-link:hover{background:#323036}
body.ksan-unified #appSidebar .ksan-assets-summary .ksan-section-avatar{width:32px;height:32px;flex-basis:32px;background:transparent;box-shadow:none}
body.ksan-unified #appSidebar .ksan-assets-summary .ksan-section-avatar svg{width:27px;height:27px;flex-basis:27px;color:#b6a2ee}
body.ksan-unified #appSidebar .ksan-assets-summary .ksan-section-copy{gap:3px}
body.ksan-unified #appSidebar .ksan-assets-summary .ksan-section-copy strong{font-size:12px;line-height:16px;font-weight:400;color:#aaa5b2}
body.ksan-unified #appSidebar .ksan-assets-summary .ksan-balance-metric{font-size:16px;line-height:21px;color:#f1edf7}
@media(max-width:1100px){body.ksan-unified #appSidebar .ksan-assets-summary .ksan-nav-link{padding:10px 8px;gap:6px}}

@font-face{font-family:Manrope;src:url('../fonts/manrope/Manrope.ttf') format('truetype');font-weight:200 800;font-display:swap}
body.ksan-unified #appSidebar{font-family:Manrope,Arial,sans-serif}

body.ksan-unified #appSidebar .ksan-section-copy small[data-menu-stat][hidden]{display:none!important}
