@font-face{font-family:Dexo Sans;src:local("Inter"),local("SF Pro Display"),local("Segoe UI");font-display:swap}
:root{font-family:"Dexo Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#272d3c;background:#f5f4f0;font-synthesis:none;--bg:#fff;--canvas:#fbfbf9;--side:#f5f4f0;--rail:#eeeee9;--text:#272d3c;--muted:#858895;--subtle:#aaadb5;--line:#e7e7e1;--blue:#3869e8;--blue-hover:#2858d2;--blue-wash:#e9efff;--input:#fff;--bubble:#f0f1f4;--green:#39a885;--red:#c7495e;--shadow:0 24px 90px #1d26491a;--radius:18px;--font-mono:ui-monospace,SFMono-Regular,Consolas,monospace;color-scheme:light}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;width:100%}body{font-size:14px;line-height:1.5;letter-spacing:-.014em}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button{border:0;color:inherit;background:none}a{color:var(--blue);text-decoration:none}button,input,textarea,select,a{outline-offset:4px}button:focus-visible,a:focus-visible{outline:3px solid #809ef4}input:focus,textarea:focus,select:focus{outline:none}button svg{pointer-events:none}svg{display:block;width:20px;height:20px;flex-shrink:0}img{max-width:100%;object-fit:cover}[hidden]{display:none!important}::selection{background:#b9ccff;color:#1c346d}h1,h2,h3,p{margin:0}input,textarea,select{color:var(--text)}input::placeholder,textarea::placeholder{color:#a0a3ad}input,select,textarea{border:1px solid var(--line);border-radius:12px;background:var(--input)}input,select{padding:12px 14px;min-width:0}input:focus,textarea:focus,select:focus{border-color:#91abec;box-shadow:0 0 0 3px #3869e812}textarea{resize:vertical;padding:12px 14px}label{display:block;font-size:12px;font-weight:600;margin-bottom:7px}hr{border:0;border-top:1px solid var(--line);margin:24px 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.muted{color:var(--muted)}.blue-text{color:var(--blue)}.soft-label{font-size:10px;font-weight:700;letter-spacing:.15em;color:var(--muted)}.icon-button{width:36px;height:36px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--muted);transition:background .16s,color .16s}.icon-button:hover{color:var(--text);background:#7a7f9010}.icon-button.small{width:26px;height:26px}.icon-button.small svg{width:16px;height:16px}.primary-button,.secondary-button,.danger-button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:11px 18px;border-radius:12px;font-size:13px;font-weight:600;transition:background .15s,transform .15s}.primary-button{background:var(--blue);color:#fff;box-shadow:0 3px 8px #3869e815}.primary-button:hover{background:var(--blue-hover);transform:translateY(-1px)}.secondary-button{background:var(--side);border:1px solid var(--line)}.secondary-button:hover{background:var(--line)}.danger-button{background:#c7495e0c;color:var(--red);border:1px solid #c7495e22}.danger-button:hover{background:#c7495e17}.text-button{color:var(--blue);font-size:12px;font-weight:600;padding:6px 0;display:inline-flex;align-items:center;gap:7px}.startup{position:fixed;inset:0;background:var(--side);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:24px;color:var(--muted);font-size:13px}.startup img{animation:bob 2.3s ease-in-out infinite}.online-dot{width:7px;height:7px;display:inline-block;border-radius:50%;background:var(--green);flex-shrink:0}.empty-state{text-align:center;padding:35px 18px;color:var(--muted);font-size:12px}.empty-state .empty-icon{width:44px;height:44px;border:1px solid var(--line);border-radius:15px;margin:0 auto 14px;display:flex;align-items:center;justify-content:center}.empty-state h3{font-size:13px;color:var(--text);font-weight:600;margin-bottom:6px}.empty-state p{line-height:1.75;margin-bottom:12px}.form-error{color:var(--red);font-size:12px;line-height:1.6;padding:10px 12px;border-radius:9px;background:#c7495e0b;margin:12px 0}.form-help{font-size:11px;line-height:1.65;color:var(--muted);margin-top:6px}

/* The welcome at the front door. */
.login-screen{min-height:100dvh;display:grid;grid-template-columns:1.12fr 1fr}.login-story{background:#eeefea;padding:40px 54px 30px;display:flex;flex-direction:column;position:relative;overflow:hidden}.wordmark{display:flex;align-items:center;gap:10px;color:#242b39;width:max-content;font-size:25px;font-weight:780;letter-spacing:-1px}.wordmark-light{font-weight:480}.brand-dot{color:var(--blue)}.login-story-content{margin:auto 0;padding:48px 0 22px}.eyebrow{color:#7a8393;letter-spacing:.1em;font-size:9px;font-weight:650;display:flex;align-items:center;gap:8px}.tiny-spark{font-size:18px;color:var(--blue)}.login-story h1{font-size:clamp(40px,4.4vw,67px);letter-spacing:-.055em;line-height:1.09;margin:21px 0 21px;font-weight:650}.login-story h1>span{color:var(--blue)}.login-story-content>p{color:#808593;font-size:14px;line-height:1.85;max-width:355px}.login-robot-scene{position:relative;width:380px;max-width:100%;height:262px;margin:30px auto 0}.scene-orbit{position:absolute;border:1px solid #dfe2dc;border-radius:50%;width:310px;height:210px;left:35px;top:8px;transform:rotate(-23deg)}.orbit-two{width:390px;height:170px;left:-5px;top:30px;transform:rotate(20deg)}.robot-card{position:absolute;background:#fff;border:5px solid white;box-shadow:0 16px 35px #414d7c13;overflow:hidden;border-radius:34px}.robot-card img{width:100%;height:100%}.robot-main{width:155px;height:171px;top:13px;left:111px;transform:rotate(-6deg);z-index:2}.robot-small{width:94px;height:103px;border-radius:25px;border-width:4px;top:95px}.robot-left{left:18px;transform:rotate(-14deg);z-index:1}.robot-right{right:12px;top:68px;transform:rotate(12deg);z-index:3}.scene-note{position:absolute;bottom:0;left:50%;transform:translateX(-50%);white-space:nowrap;padding:10px 15px;background:#ffffffbd;border:1px solid #ffffffd1;border-radius:30px;display:flex;align-items:center;gap:9px;font-size:10px;color:#717a8c;z-index:4;backdrop-filter:blur(10px)}.scene-spark{position:absolute;color:#98ac94;font-size:33px}.spark-one{right:29px;top:0}.spark-two{left:64px;bottom:36px;font-size:22px;color:#e1b97d}.login-foot{font-size:10px;color:#939895;margin-top:22px}.login-form-side{background:var(--bg);display:flex;align-items:center;justify-content:center;position:relative;min-height:100dvh;padding:65px}.login-form-wrap{width:330px;max-width:100%}.login-form-wrap h2{font-size:36px;font-weight:620;letter-spacing:-.055em;margin-top:13px;line-height:1.3}.login-intro{font-size:13px;margin:10px 0 35px}.login-form-wrap label{margin:18px 0 8px}.login-form-wrap input{width:100%;height:47px;font-size:13px}.password-field{position:relative}.password-field input{padding-right:44px}.password-field>.icon-button{position:absolute;right:6px;top:6px}.password-field svg{width:17px}.login-submit{width:100%;margin-top:24px;height:48px;justify-content:space-between}.login-submit svg{width:18px}.login-private{margin-top:21px;color:var(--muted);font-size:10px;display:flex;align-items:center;justify-content:center;gap:7px}.login-private svg{width:12px;height:12px}.login-copyright{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);display:flex;gap:18px;white-space:nowrap;color:#9499a2;font-size:10px}.login-copyright span{color:#b5b8bf}.login-mobile-brand{display:none}

/* Focused editing, with room to breathe. */
.modal{border:1px solid var(--line);border-radius:23px;background:var(--bg);color:var(--text);padding:0;width:540px;max-width:calc(100vw - 32px);max-height:min(90dvh,900px);box-shadow:var(--shadow);overflow:auto;scrollbar-width:thin;scrollbar-color:#d7dce7 transparent}.modal::backdrop{background:#20293c4d;backdrop-filter:blur(4px)}.modal.wide{width:650px}.modal-header{padding:25px 27px 17px;display:flex;align-items:flex-start;gap:15px}.modal-heading{flex:1}.modal-heading>.soft-label{display:block;margin-bottom:6px}.modal-heading h2{font-size:22px;font-weight:620;letter-spacing:-.8px}.modal-heading p{color:var(--muted);font-size:11px;line-height:1.75;margin-top:6px}.modal-header>.icon-button{margin-top:-6px;margin-right:-10px}.modal-body{padding:0 27px 26px}.modal-body label{margin-top:17px;font-size:11px}.modal-body input:not([type=checkbox]),.modal-body select,.modal-body textarea{width:100%;font-size:12px}.modal-body textarea{min-height:90px;line-height:1.7}.modal-body .field-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}.modal-actions{display:flex;justify-content:flex-end;align-items:center;gap:9px;border-top:1px solid var(--line);margin-top:25px;padding-top:20px}.modal-actions .danger-button:first-child{margin-right:auto}.modal-actions button{font-size:11px;min-height:39px;padding:10px 15px}.avatar-picker{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px;margin-top:11px}.avatar-option{padding:3px;border-radius:13px;border:2px solid transparent;aspect-ratio:1;min-width:0}.avatar-option img{display:block;width:100%;height:100%;border-radius:8px;background:var(--side)}.avatar-option.selected{border-color:var(--blue);background:var(--blue-wash)}.avatar-option:hover{background:var(--side)}.agent-editor-top{display:flex;align-items:center;gap:15px;margin:0 0 10px}.agent-editor-top>img{width:62px;height:62px;border-radius:20px;background:var(--side)}.agent-editor-top>div{flex:1}.agent-editor-top label{margin-top:0}.details-section{border:1px solid var(--line);border-radius:12px;margin-top:18px;padding:12px 14px}.details-section>summary{font-size:11px;cursor:pointer;font-weight:550;color:#7c879d}.details-section>summary::marker{color:#9facbf}.details-section[open]>summary{margin-bottom:14px}.details-section label:first-of-type{margin-top:9px}.field-help-panel{font-size:10px;line-height:1.8;border-radius:10px;background:var(--side);padding:11px 12px;color:var(--muted);margin-top:13px}.settings-tabs{display:flex;gap:20px;border-bottom:1px solid var(--line);margin-bottom:18px}.settings-tabs button{font-size:11px;color:var(--muted);padding:9px 0 12px;position:relative}.settings-tabs button.active{color:var(--blue)}.settings-tabs button.active:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;background:var(--blue)}.settings-section-title{font-size:12px;font-weight:600;margin:24px 0 6px}.settings-row{display:flex;align-items:center;gap:15px;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--line)}.settings-row h3{font-size:11px;font-weight:600}.settings-row p{font-size:10px;color:var(--muted);margin-top:4px;line-height:1.7}.settings-row select{max-width:136px;padding:9px 10px;flex-shrink:0}.settings-row .secondary-button{font-size:10px;min-height:34px;padding:8px 10px;flex-shrink:0}.user-list,.project-list,.notification-list{display:flex;flex-direction:column;gap:8px}.user-row,.project-row{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:12px}.user-initial{display:flex;align-items:center;justify-content:center;background:var(--blue-wash);color:#7491d0;border-radius:12px;width:35px;height:35px;font-size:11px;font-weight:600;flex-shrink:0}.user-row-info,.project-row-info{flex:1;min-width:0}.user-row-info strong,.project-row-info strong{display:block;font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis}.user-row-info span,.project-row-info span{display:block;font-size:10px;color:var(--muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis}.user-row.disabled{opacity:.55}.user-role-badge{font-size:8px;color:#8395be;background:var(--blue-wash);padding:3px 6px;border-radius:5px}.project-color-preview{width:30px;height:30px;background:var(--project-color,#bfa5dd);border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff}.project-color-preview svg{width:15px;height:15px}.inline-form{display:flex;gap:8px;align-items:center;margin-top:20px}.inline-form input{flex:1;min-width:0}.inline-form button{flex-shrink:0;font-size:11px;padding:12px 14px}.color-picker{display:flex;gap:9px;margin-top:10px}.color-option{width:26px;height:26px;border-radius:50%;background:var(--project-color,#91a9e3);border:3px solid var(--bg);box-shadow:0 0 0 1px transparent}.color-option.selected{box-shadow:0 0 0 1px var(--project-color)}.notification-row{display:flex;gap:12px;text-align:left;padding:15px;border:1px solid var(--line);border-radius:12px;align-items:flex-start}.notification-row.unread{background:var(--blue-wash);border-color:#d9e3fc}.notification-row>span{width:27px;height:27px;display:flex;align-items:center;justify-content:center;color:#8299cc;background:#ffffff8c;border-radius:9px;flex-shrink:0}.notification-row>span svg{width:15px;height:15px}.notification-row strong{font-size:11px;font-weight:600;display:block}.notification-row p{font-size:11px;color:var(--muted);line-height:1.7;margin-top:4px;overflow-wrap:anywhere}.notification-row time{font-size:9px;color:#a4adbf;margin-top:5px;display:block}.notification-actions{display:flex;justify-content:flex-end;margin:-5px 0 13px}.notification-actions button{font-size:10px}.options-list{display:flex;flex-direction:column;gap:5px}.option-button{display:flex;align-items:center;gap:12px;width:100%;padding:12px;border-radius:11px;text-align:left;font-size:12px}.option-button svg{width:17px;height:17px;color:#94a1b9}.option-button:hover{background:var(--side)}.option-button.danger{color:var(--red)}.option-button.danger svg{color:var(--red)}.option-button>span{flex:1}.option-button small{font-size:9px;color:var(--muted)}.conversation-option-summary{border:1px solid var(--line);padding:13px;border-radius:12px;margin-bottom:13px}.conversation-option-summary strong{font-size:12px;font-weight:600;display:block}.conversation-option-summary span{font-size:10px;color:var(--muted);display:block;margin-top:4px}.toast-stack{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:50;display:flex;flex-direction:column;gap:8px;max-width:calc(100vw - 32px);width:max-content;pointer-events:none}.toast{font-size:12px;background:#273244;color:#fff;box-shadow:0 8px 24px #27324425;padding:12px 18px;border-radius:12px;display:flex;align-items:center;gap:9px;animation:toast-in .2s ease;max-width:480px}.toast svg{width:16px;height:16px;color:#93d2bf;flex-shrink:0}.toast.error svg{color:#f2a4b3}.offline-page{min-height:100dvh;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:32px;background:var(--side)}.offline-page img{margin-bottom:28px}.offline-page h1{font-size:36px;letter-spacing:-1.2px;line-height:1.2;margin:18px 0}.offline-page p{max-width:340px;color:var(--muted);font-size:13px;line-height:1.8}.offline-page>a{margin-top:24px}.drag-overlay{position:absolute;inset:0;z-index:7;background:#eff4ffef;border:3px dashed #96b0ed;margin:10px;border-radius:20px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;color:#6686cc;font-size:16px;pointer-events:none}.drag-overlay svg{width:40px;height:40px}.loading-chat{display:flex;align-items:center;justify-content:center;gap:10px;min-height:180px;color:var(--muted);font-size:11px}

/* A messaging app: a single contact sidebar, a conversation, and optional details. */
:root {
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;
  color:var(--text);background:var(--bg);font-synthesis:none;
  --bg:#fff;--canvas:#fff;--side:#f5f5f5;--rail:#f5f5f5;
  --text:#1c1c1e;--muted:#858589;--subtle:#a2a2a7;--line:#e5e5e8;
  --blue:#007aff;--blue-hover:#0068da;--blue-wash:#e9f2ff;--input:#fff;
  --bubble:#eeeeef;--outgoing:#5365f6;--outgoing-text:#fff;--selected:#e1e1e3;
  --green:#31b86b;--red:#e34b47;--shadow:0 20px 80px #00000020;
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
}
html,body {height:100%;overscroll-behavior:none;touch-action:pan-x pan-y;}
/* Only the signed-in shell owns the viewport; the login page can still scroll. */
html:has(#app:not([hidden])),body:has(>#app:not([hidden])) {overflow:hidden;}
body:has(>#app:not([hidden])) {position:fixed;inset:0;}
body {font-size:15px;line-height:1.45;letter-spacing:-.015em;}
button,a,input,textarea,select {touch-action:manipulation;}
button {-webkit-user-select:none;user-select:none;}
input,textarea,select {font-size:16px;}
button:focus-visible,a:focus-visible {outline:2px solid var(--blue);}
.icon-button {width:36px;height:36px;border-radius:50%;color:var(--muted);}
.icon-button:hover {color:var(--text);background:#80808010;}
.primary-button {box-shadow:none;}
.primary-button:hover {transform:none;}
.primary-button,.secondary-button,.danger-button {font-size:14px;}
.form-help,.field-help-panel {font-size:12px;}
.empty-state {font-size:14px;padding:44px 24px;color:var(--muted);}
.empty-state h3 {font-size:16px;}
.empty-state p {line-height:1.6;}
.text-button {font-size:14px;font-weight:400;}
.startup {font-size:15px;}
.login-story {background:#f2f3f5;}
.login-heading-line {color:var(--text)!important;}
.login-mobile-brand .pane-brand {font-size:28px;}
.login-form-wrap input {font-size:16px;}
.login-form-wrap label {font-size:14px;}
.login-intro,.login-story-content>p {font-size:15px;}
.login-private,.login-foot,.login-copyright {font-size:12px;}
.login-submit {font-size:15px;}
.login-story .wordmark,.pane-brand {color:var(--text);}

.app-shell {height:var(--app-height,100dvh);width:100%;display:grid;grid-template-columns:330px minmax(0,1fr);overflow:hidden;background:var(--bg);position:fixed;top:var(--viewport-top,0px);left:0;}
.sidebar {display:flex;flex-direction:column;min-height:0;min-width:0;background:var(--side);border-right:1px solid var(--line);padding-top:env(safe-area-inset-top);}
.sidebar-toolbar {display:flex;align-items:center;justify-content:space-between;height:72px;min-height:72px;padding:0 17px 0 22px;}
.sidebar-brand {padding:0;text-align:left;}
.pane-brand {font-size:25px;font-weight:700;letter-spacing:-1.2px;line-height:1.3;}
.pane-brand>span {font-weight:450;}
.sidebar-toolbar-actions {display:flex;align-items:center;gap:5px;}
.sidebar-toolbar .icon-button {color:var(--text);}
.rail-add {border:0;margin:0;}
.mobile-search-button {display:none;}
.search-box {display:flex;align-items:center;gap:8px;flex-shrink:0;margin:0 15px 11px;padding:0 10px;background:#eaeaec;border:1px solid #dfdfe2;border-radius:9px;height:37px;font-weight:400;}
.search-box svg {width:17px;height:17px;color:#96969b;}
.search-box input {background:none;border:0;box-shadow:none;padding:0;height:100%;width:100%;min-width:0;font-size:15px;}
.search-box input:focus {box-shadow:none;}
.search-box:focus-within {border-color:#9bbfe7;}
.search-box kbd {color:var(--subtle);font:11px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;white-space:nowrap;}
.agent-rail {display:flex;flex-direction:column;min-height:0;flex:1;overflow-y:auto;padding:0 10px 16px;scrollbar-width:thin;scrollbar-color:var(--line) transparent;}
.rail-agents {display:flex;flex-direction:column;gap:2px;}
.agent-button {width:100%;min-height:76px;position:relative;display:flex;align-items:center;gap:12px;text-align:left;border-radius:11px;padding:11px 12px;flex-shrink:0;}
.agent-button:hover {background:#dedee045;}
.agent-button.active {background:var(--selected);}
.agent-button>img,.agent-avatar-wrap {width:49px;height:49px;border-radius:50%;flex-shrink:0;position:relative;}
.agent-avatar-wrap>img {display:block;width:49px;height:49px;border-radius:50%;}
.agent-contact-info {min-width:0;flex:1;display:block;}
.agent-contact-heading {display:flex;align-items:center;gap:8px;}
.agent-contact-heading strong {font-size:15px;font-weight:550;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;}
.agent-contact-heading time {font-size:11px;color:var(--muted);font-weight:400;white-space:nowrap;flex-shrink:0;}
.agent-contact-preview {display:block;font-size:13px;color:var(--muted);line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px;}
.agent-button .agent-dot,.pinned-agent .agent-dot {position:absolute;right:0;bottom:0;border:2px solid var(--side);width:11px;height:11px;background:var(--green);border-radius:50%;}
.agent-button.active .agent-dot {border-color:var(--selected);}
.agent-dot.running {background:#ffb340!important;animation:pulse 1.8s infinite;}
.agent-unread {position:absolute;width:9px;height:9px;border-radius:50%;background:var(--blue);right:2px;top:3px;border:2px solid var(--side);}
.agent-button.unread .agent-contact-heading strong {font-weight:650;}
.pinned-agents {display:none;}
.sidebar-footer {padding:14px 18px max(18px,env(safe-area-inset-bottom));flex-shrink:0;}
.sidebar-account {display:flex;align-items:center;gap:10px;min-width:0;}
.profile-button {display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#dedee2;color:#515156;font-weight:600;font-size:12px;flex-shrink:0;}
.sidebar-account-name {flex:1;min-width:0;text-align:left;padding:0;}
#profile-name {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:450;}
.provider-badge {display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted);margin-top:3px;}
.provider-badge>i {height:5px;width:5px;border-radius:50%;background:var(--green);}
.provider-badge.disconnected>i {background:#e9a22e;}
.notification-button {position:relative;}
.notification-badge {position:absolute;right:-1px;top:-1px;min-width:16px;height:16px;padding:0 3px;border-radius:9px;background:var(--blue);color:#fff;font-size:10px;line-height:16px;border:0;}
.conversation-pane {display:none;min-height:0;flex:1;flex-direction:column;}
.sidebar.conversations-view .agent-rail {display:none;}
.sidebar.conversations-view .conversation-pane {display:flex;}
.conversation-heading {display:flex;justify-content:space-between;align-items:center;margin:0 16px 5px;flex-shrink:0;}
.back-to-agents {gap:0;margin-left:-6px;min-height:38px;}
.back-to-agents svg {width:20px;}
.new-chat-button {color:var(--blue);}
.selected-agent-card {margin:0 16px 12px;display:flex;align-items:center;gap:12px;padding:12px 0;text-align:left;border-bottom:1px solid var(--line);}
.selected-agent-card>img {width:48px;height:48px;border-radius:50%;flex-shrink:0;}
.selected-agent-info {flex:1;min-width:0;}
.selected-agent-info strong {display:block;font-size:18px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.selected-agent-info span {display:block;margin-top:4px;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.selected-agent-card>svg {width:15px;color:var(--muted);}
.projects-heading {display:flex;align-items:center;justify-content:space-between;padding:0 18px;margin-bottom:5px;flex-shrink:0;}
.projects-heading>span {font-size:12px;font-weight:500;color:var(--muted);}
.project-filters {display:flex;gap:6px;overflow-x:auto;flex-shrink:0;padding:0 16px 13px;scrollbar-width:none;min-height:39px;}
.project-chip {display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap;border:1px solid var(--line);border-radius:7px;padding:4px 9px;color:var(--muted);max-width:175px;}
.project-chip.active {color:var(--text);background:var(--selected);border-color:transparent;}
.project-chip>span:last-child {overflow:hidden;text-overflow:ellipsis;}
.project-dot {display:inline-block;flex-shrink:0;width:7px;height:7px;border-radius:50%;background:var(--project-color,#b89bcd);}
.conversation-tabs {display:flex;gap:22px;margin:0 18px;border-bottom:1px solid var(--line);flex-shrink:0;}
.conversation-tabs>button {position:relative;padding:7px 0 10px;font-size:13px;color:var(--muted);}
.conversation-tabs>button.active {color:var(--text);font-weight:500;}
.conversation-tabs>button.active:after {position:absolute;bottom:-1px;left:0;right:0;content:"";height:2px;background:var(--text);border-radius:3px;}
#conversation-count {font-size:11px;color:var(--muted);margin-left:6px;}
.conversation-list {overflow-y:auto;flex:1;min-height:0;padding:7px 10px 18px;scrollbar-width:thin;scrollbar-color:var(--line) transparent;}
.conversation-group-label {font-size:10px;letter-spacing:.07em;color:var(--muted);padding:14px 12px 7px;}
.conversation-row {position:relative;}
.conversation-item {width:100%;display:block;text-align:left;padding:13px 12px;min-height:76px;border-radius:10px;margin-bottom:2px;}
.conversation-item:hover {background:#dedee045;}
.conversation-item.active {background:var(--selected);}
.conversation-title-row {display:flex;align-items:center;gap:7px;margin-bottom:4px;padding-right:22px;}
.conversation-title-row>strong {font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;}
.conversation-item.unread .conversation-title-row>strong {font-weight:650;}
.conversation-title-row>time {font-size:10px;color:var(--muted);white-space:nowrap;}
.conversation-title-row>svg {width:12px;height:12px;color:var(--muted);}
.conversation-preview {font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.conversation-meta {display:flex;align-items:center;gap:5px;margin-top:5px;color:var(--muted);font-size:11px;}
.conversation-meta.running {color:#b68022;}
.conversation-meta.failed {color:var(--red);}
.conversation-meta.failed svg,.conversation-meta .spinner {width:11px;height:11px;}
.unread-dot {width:7px;height:7px;border-radius:50%;background:var(--blue);flex-shrink:0;}
.row-options {position:absolute;right:5px;top:8px;width:28px;height:30px;border-radius:7px;opacity:.65;}
.row-options svg {width:17px;height:17px;}
.row-options:hover,.row-options:focus-visible {opacity:1;}

/* Conversation gestures keep vertical scrolling available on touch screens. */
.swipe-row {overflow:hidden;border-radius:10px;margin-bottom:2px;touch-action:pan-y;}
.swipe-surface {position:relative;background:var(--side);transition:transform .2s ease;touch-action:pan-y;}
.swipe-surface .conversation-item {margin-bottom:0;touch-action:pan-y;}
.swipe-row.swipe-left .swipe-surface {transform:translateX(-88px);}
.swipe-row.swipe-right .swipe-surface {transform:translateX(88px);}
.swipe-row.swipe-dragging .swipe-surface {transition:none;user-select:none;-webkit-user-select:none;}
.swipe-actions {position:absolute;inset:0;display:flex;justify-content:space-between;}
.swipe-action {width:88px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:12px;font-weight:550;color:#fff;visibility:hidden;}
.swipe-action svg {width:22px;height:22px;}
.swipe-pin {background:#7468dc;}
.swipe-trash {background:var(--red);}
.swipe-right .swipe-pin,.swipe-left .swipe-trash {visibility:visible;}
.agent-plugins-button {margin-left:auto;gap:5px;font-size:12px;}
.agent-plugins-button svg {width:16px;height:16px;}
.trash-list {display:flex;flex-direction:column;gap:12px;}
.trash-row {display:flex;align-items:flex-start;gap:13px;padding:16px;border:1px solid var(--line);border-radius:14px;}
.trash-row-icon {display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:11px;background:var(--side);color:var(--muted);flex-shrink:0;}
.trash-row-icon svg {width:20px;height:20px;}
.trash-row-content {min-width:0;flex:1;}
.trash-row-content>strong {display:block;font-size:15px;font-weight:550;overflow-wrap:anywhere;}
.trash-row-content>p {font-size:12px;color:var(--muted);margin-top:4px;}
.trash-row-content>time {display:block;font-size:12px;color:var(--muted);margin-top:8px;}
.trash-row-actions {display:flex;gap:18px;flex-wrap:wrap;margin-top:10px;}
.trash-row-actions button {font-size:13px;min-height:36px;gap:5px;}
.trash-row-actions svg {width:16px;height:16px;}
.danger-text {color:var(--red);}
.delete-conversation-title {overflow-wrap:anywhere;font-size:15px;}
.agent-plugins-link {display:flex;align-items:center;gap:12px;width:100%;margin-top:20px;padding:14px;border:1px solid var(--line);border-radius:12px;text-align:left;}
.agent-plugins-link>svg {width:21px;height:21px;color:#8c7ae5;flex-shrink:0;}
.agent-plugins-link>span {flex:1;}
.agent-plugins-link strong {display:block;font-size:14px;font-weight:550;}
.agent-plugins-link small {display:block;font-size:12px;color:var(--muted);margin-top:3px;}
.plugin-privacy {display:flex;align-items:flex-start;gap:10px;background:var(--side);border-radius:12px;padding:13px 14px;margin-bottom:20px;}
.plugin-privacy>svg {width:19px;height:19px;color:#9584e5;flex-shrink:0;}
.plugin-privacy p {font-size:13px;color:var(--muted);line-height:1.6;}
.plugin-list {display:flex;flex-direction:column;gap:15px;}
.plugin-card {padding:20px;border:1px solid var(--line);border-radius:16px;}
.plugin-card-heading {display:flex;align-items:center;gap:12px;}
.plugin-card-heading>div {flex:1;min-width:0;}
.plugin-card-heading h3 {font-size:17px;font-weight:600;}
.plugin-logo {display:flex;align-items:center;justify-content:center;width:43px;height:43px;border-radius:13px;font-size:24px;font-weight:650;color:#fff;flex-shrink:0;}
.plugin-logo-qps {background:#5673af;}
.plugin-logo-vuebox,.plugin-logo-generic {background:#7662c9;}
.plugin-status {display:block;font-size:12px;color:var(--muted);margin-top:2px;}
.plugin-status.connected {color:var(--green);}
.plugin-connected-check {display:flex;align-items:center;justify-content:center;width:26px;height:26px;color:var(--green);background:#31b86b15;border-radius:50%;}
.plugin-connected-check svg {width:17px;height:17px;}
.plugin-scope {display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--muted);margin-top:8px;}
.plugin-scope svg {width:13px;height:13px;}
.plugin-description {font-size:13px;color:var(--muted);line-height:1.6;margin-top:14px;}
.plugin-account {display:flex;align-items:center;gap:7px;margin-top:12px;font-size:12px;overflow-wrap:anywhere;}
.plugin-account svg {width:16px;height:16px;flex-shrink:0;color:var(--muted);}
.plugin-capabilities {margin-top:14px;font-size:12px;}
.plugin-capabilities summary {cursor:pointer;color:var(--muted);}
.plugin-capabilities ul {display:flex;flex-direction:column;gap:8px;list-style:none;padding:12px 0 0;}
.plugin-capabilities li {display:flex;align-items:center;gap:8px;overflow-wrap:anywhere;}
.plugin-capabilities li svg {width:15px;height:15px;color:var(--green);flex-shrink:0;}
.plugin-card-actions {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px;}
.plugin-card-actions button {font-size:13px;min-height:40px;padding:9px 13px;}
.plugin-card-actions .text-button {padding-inline:0;}
.plugin-connect {background:#7468dc;}
.plugin-connect:hover {background:#6558cb;}
.plugin-connect svg {width:17px;height:17px;}
@media (max-width:650px) {
  .agent-plugins-button {font-size:13px;}
  .swipe-action {font-size:13px;}
  .trash-row {padding:13px;gap:10px;}
  .trash-row-icon {display:none;}
  .plugin-card {padding:17px;}
}
@media (prefers-reduced-motion:reduce) {.swipe-surface {transition:none;}}

.chat-pane {display:flex;flex-direction:column;min-height:0;min-width:0;position:relative;background:var(--bg);}
.chat-header {height:72px;flex-shrink:0;display:flex;align-items:center;gap:13px;padding:0 25px;border-bottom:1px solid var(--line);}
.chat-header-identity {display:flex;align-items:center;gap:10px;flex:1;min-width:0;}
.chat-header-identity>img {width:34px;height:34px;border-radius:50%;flex-shrink:0;}
.chat-header-identity>div {min-width:0;}
.chat-header-identity h2 {font-size:15px;line-height:1.35;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.chat-header-identity p {display:flex;align-items:center;gap:5px;font-size:11px;line-height:1.35;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.chat-header-identity .online-dot {width:5px;height:5px;}
.chat-header-actions {display:flex;gap:4px;}
.chat-header-actions svg {width:20px;height:20px;}
.mobile-back {display:none;}
.connection-banner {background:#fff4dd;border-bottom:1px solid #eedfc1;color:#8d6a2d;padding:9px 18px;font-size:13px;text-align:center;}
.chat-scroll {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent;}
.messages {max-width:1000px;margin:0 auto;padding:30px 28px 22px;display:flex;flex-direction:column;gap:16px;}
.messages:empty {display:none;}
.message {display:flex;align-items:flex-end;min-width:0;gap:0;}
.message-avatar,.message-author {display:none;}
.message-body {max-width:min(83%,760px);min-width:0;}
.message.user {justify-content:flex-end;}
.message.user .message-body {max-width:78%;}
.message-bubble {padding:12px 16px;border-radius:21px 21px 21px 6px;background:var(--bubble);color:var(--text);font-size:16px;line-height:1.5;overflow-wrap:anywhere;min-width:32px;}
.message.user .message-bubble {background:var(--outgoing);color:var(--outgoing-text);border-radius:21px 21px 6px 21px;white-space:pre-wrap;}
.message.failed .message-bubble {border:1px solid #e34b4740;}
.message-meta {display:flex;align-items:center;gap:7px;min-height:16px;font-size:10px;color:var(--muted);margin-top:4px;padding:0 4px;}
.message.user .message-meta {justify-content:flex-end;}
.message-meta svg {width:11px;height:11px;}
.message-copy {display:inline-flex;align-items:center;gap:4px;color:var(--muted);font-size:10px;padding:0 3px;}
.message-copy:hover {color:var(--blue);}
.message-status-error {color:var(--red);}
.message-date {text-align:center;color:var(--muted);font-size:12px;margin:0 0 6px;}
.typing-dots {display:flex;gap:5px;align-items:center;min-height:24px;padding:3px;}
.typing-dots i {background:#a2a2a7;width:7px;height:7px;border-radius:50%;animation:pulse 1.2s infinite;}
.typing-dots i:nth-child(2) {animation-delay:.15s;}
.typing-dots i:nth-child(3) {animation-delay:.3s;}
.markdown p {margin:0 0 12px;}
.markdown p:last-child {margin-bottom:0;}
.markdown h1,.markdown h2,.markdown h3,.markdown h4 {line-height:1.4;margin:18px 0 9px;font-weight:600;}
.markdown h1 {font-size:22px;}.markdown h2 {font-size:20px;}.markdown h3 {font-size:18px;}.markdown h4 {font-size:16px;}
.markdown>:first-child {margin-top:0;}
.markdown ul,.markdown ol {padding-left:22px;margin:9px 0 13px;}
.markdown li {padding-left:3px;margin:4px 0;}
.markdown blockquote {margin:12px 0;border-left:3px solid #b9b9bf;padding:4px 12px;color:var(--muted);}
.markdown code {font-family:var(--font-mono);font-size:13px;background:#dedef0;padding:2px 5px;border-radius:5px;white-space:break-spaces;}
.code-block {margin:13px 0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--bg);max-width:100%;}
.code-header {padding:8px 11px;font-size:11px;color:var(--muted);display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);}
.code-header button {display:flex;align-items:center;gap:4px;color:var(--muted);font-size:11px;}
.code-header svg {width:12px;height:12px;}
.code-block pre {margin:0;padding:12px 13px;overflow-x:auto;white-space:pre;max-width:100%;line-height:1.65;}
.code-block pre code {font-size:13px;background:none;padding:0;white-space:pre;}
.markdown a {text-decoration:underline;text-underline-offset:3px;}
.markdown .table-wrap {overflow-x:auto;margin:12px 0;}
.markdown table {border-collapse:collapse;min-width:100%;font-size:13px;}
.markdown td,.markdown th {padding:8px 10px;border:1px solid #d5d5da;text-align:left;}
.markdown th {background:#e1e1e6;font-weight:600;}
.message-attachments {display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;}
.message-attachments:first-child {margin-top:0;}
.attachment-image {display:block;max-width:300px;border-radius:15px;overflow:hidden;background:var(--bubble);}
.attachment-image img {display:block;max-height:280px;max-width:100%;object-fit:contain;}
.attachment-file {display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:15px;color:var(--text);background:var(--bg);font-size:14px;max-width:320px;}
.attachment-file>svg {width:25px;height:25px;color:var(--blue);}
.attachment-file>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.attachment-file small {display:block;font-size:12px;color:var(--muted);margin-top:3px;}
.scroll-bottom {position:absolute;bottom:108px;right:25px;width:35px;height:35px;border:1px solid var(--line);border-radius:50%;background:var(--bg);box-shadow:0 3px 12px #00000010;z-index:3;}
.scroll-bottom svg {width:17px;height:17px;}
.composer-area {padding:12px 25px max(13px,env(safe-area-inset-bottom));flex-shrink:0;width:100%;max-width:1000px;margin:0 auto;background:var(--bg);}
.composer {padding:5px;border:1px solid var(--line);border-radius:27px;background:var(--bg);box-shadow:0 2px 9px #0000000a;position:relative;}
.composer:focus-within {border-color:#b8bac0;}
.composer-line {display:flex;align-items:flex-end;gap:7px;}
.composer-attach {width:35px;height:35px;background:#f0f0f1;color:#77777c;flex-shrink:0;margin:1px;}
.composer-attach svg {width:23px;height:23px;}
.composer textarea {display:block;width:100%;min-width:0;min-height:37px;max-height:180px;resize:none;border:0;border-radius:0;padding:6px 0 7px;box-shadow:none!important;background:none;font-size:16px;line-height:24px;}
.send-button {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:34px;height:34px;margin:2px;border-radius:50%;background:var(--outgoing);color:var(--outgoing-text);box-shadow:none;}
.send-button svg {width:22px;height:22px;stroke-width:2.2;}
.send-button:hover {opacity:.8;}
.send-button:disabled {background:#dfdfe3;color:#fff;opacity:1;}
.send-button.stop {background:var(--red);color:#fff;}
.composer-caption {display:flex;justify-content:center;align-items:center;gap:10px;color:var(--subtle);font-size:10px;line-height:14px;min-height:14px;margin-top:8px;text-align:center;}
.composer-model {font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:230px;}
.composer-model:not(:empty)+#composer-caption:not(:empty):before {content:"·";margin-right:10px;}
.pending-attachments {display:flex;flex-wrap:wrap;gap:7px;margin:7px 8px 10px;}
.pending-file {display:flex;align-items:center;gap:7px;padding:7px 9px;border:1px solid var(--line);background:var(--side);border-radius:9px;font-size:12px;color:var(--muted);max-width:260px;}
.pending-file>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pending-file>svg {width:14px;height:14px;}
.pending-file button {display:flex;align-items:center;padding:0;color:var(--muted);}
.pending-file button svg {width:15px;height:15px;}
.task-status {display:flex;align-items:center;gap:8px;margin:0 5px 10px;color:var(--muted);font-size:12px;}
.task-status button {margin-left:auto;color:var(--blue);font-size:12px;}
.spinner {width:12px;height:12px;border:1.5px solid #b7b7bc55;border-top-color:var(--muted);border-radius:50%;animation:spin .8s linear infinite;display:inline-block;flex-shrink:0;}

/* Empty conversations stay as quiet as the messages around them. */
.welcome {min-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:40px 28px;}
.welcome-visual {position:relative;width:100px;height:100px;margin-bottom:20px;}
.welcome-avatar {display:block;width:100px;height:100px;border-radius:50%;}
.welcome-glow,.welcome-spark {display:none;}
.welcome .soft-label {display:none;}
.welcome h1 {font-size:30px;font-weight:600;line-height:1.2;letter-spacing:-1px;margin:0 0 12px;}
.welcome h1>span {color:inherit;}
.welcome-description {font-size:15px;line-height:1.55;color:var(--muted);max-width:380px;}
.suggestions {display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:540px;margin-top:27px;}
.suggestion {display:flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid var(--line);border-radius:21px;text-align:left;background:var(--bg);}
.suggestion:hover {background:var(--side);}
.suggestion>span {color:var(--muted);}
.suggestion svg {width:16px;height:16px;}
.suggestion strong {font-size:13px;font-weight:400;}
.suggestion p {display:none;}
.welcome-agent-link {display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-top:22px;}
.welcome-agent-link svg {width:14px;height:14px;}
.welcome-agent-link:hover {color:var(--blue);}

/* Detail data is rendered from the selected agent, never a pretend remote screen. */
.app-shell.details-open {grid-template-columns:330px minmax(0,1fr) 300px;}
.agent-details {display:flex;flex-direction:column;border-left:1px solid var(--line);background:var(--bg);min-height:0;min-width:0;z-index:5;}
.details-header {height:72px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid var(--line);}
.details-header h2 {font-size:15px;font-weight:500;}
.details-header>div {display:flex;gap:2px;}
.agent-details-content {overflow-y:auto;padding:28px 22px;scrollbar-width:thin;}
.detail-profile,.detail-identity {text-align:center;margin:0 0 27px;}
.detail-profile img,.detail-identity img {display:block;width:112px;height:112px;border-radius:50%;margin:0 auto 15px;}
.detail-profile h2,.detail-profile h3,.detail-identity h2 {font-size:22px;font-weight:600;}
.detail-profile p,.detail-identity p {font-size:14px;color:var(--muted);line-height:1.6;margin-top:8px;overflow-wrap:anywhere;}
.detail-section {margin:25px 0;}
.detail-section h3 {font-size:12px;color:var(--muted);font-weight:500;margin-bottom:12px;}
.detail-row {display:flex;align-items:center;gap:12px;padding:12px 0;font-size:13px;border-bottom:1px solid var(--line);}
.detail-row>svg {width:19px;height:19px;color:var(--muted);}
.detail-row>div {min-width:0;flex:1;}
.detail-row strong {display:block;font-size:13px;font-weight:500;overflow-wrap:anywhere;}
.detail-row span,.detail-row p {display:block;color:var(--muted);font-size:12px;margin-top:3px;overflow-wrap:anywhere;}
.detail-memory {white-space:pre-wrap;font-size:13px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere;}
.detail-actions {display:flex;flex-direction:column;gap:10px;margin-top:24px;}
.detail-actions button {width:100%;}


.detail-section dl {margin:0;}
.detail-section dl>div {display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);}
.detail-section dt {font-size:13px;color:var(--muted);}
.detail-section dd {font-size:13px;margin:0;text-align:right;overflow-wrap:anywhere;max-width:66%;}
.detail-section>p {font-size:13px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere;white-space:pre-wrap;}
.detail-section .detail-project {display:flex;align-items:center;gap:8px;padding:7px 0;white-space:normal;color:var(--text);}
.detail-edit {width:100%;margin-top:5px;}
.composer-caption:has(#composer-model:empty):has(#composer-caption:empty) {display:none;}
.welcome-invitation {font-size:13px;color:var(--subtle);margin-top:18px;}
.notification-permission-art {width:86px;height:86px;display:flex;align-items:center;justify-content:center;margin:12px auto 23px;border-radius:26px;background:var(--blue-wash);color:var(--blue);}
.notification-permission-art svg {width:41px;height:41px;stroke-width:1.3;}
/* Comfortable, touch-sized settings and dialogs. */
.modal {border-radius:20px;}
body:has(>#app:not([hidden])) .modal {
  position:fixed;top:var(--viewport-top,0px);
  bottom:calc(100% - var(--viewport-top,0px) - var(--app-height,100dvh));
  max-height:min(90dvh,calc(var(--app-height,100dvh) - 24px),900px);margin:auto;
}
.modal-heading p,.modal-body label,.settings-tabs button {font-size:13px;}
.modal-body input:not([type=checkbox]),.modal-body select,.modal-body textarea {font-size:15px;}
.modal-actions button,.option-button {font-size:14px;}
.settings-section-title {font-size:15px;}
.settings-row h3 {font-size:14px;}
.settings-row p {font-size:12px;}
.settings-row .secondary-button {font-size:12px;}
.user-row-info strong,.project-row-info strong,.notification-row strong {font-size:14px;}
.user-row-info span,.project-row-info span,.notification-row p {font-size:12px;}
.notification-row time {font-size:11px;}
.conversation-option-summary strong {font-size:14px;}
.conversation-option-summary span {font-size:12px;}
.details-section>summary {font-size:13px;}
.notification-permission {text-align:center;padding:12px 0;}
.notification-permission-icon {width:68px;height:68px;margin:0 auto 18px;border-radius:20px;background:var(--side);display:flex;align-items:center;justify-content:center;color:var(--blue);}
.notification-permission-icon svg {width:32px;height:32px;}
.notification-permission p {font-size:15px;line-height:1.6;color:var(--muted);}

html[data-theme=dark] {
  --bg:#141416;--canvas:#141416;--side:#1f1f22;--rail:#1f1f22;--text:#f5f5f7;
  --muted:#98989f;--subtle:#76767e;--line:#323237;--blue:#409cff;--blue-hover:#67aeff;
  --blue-wash:#1e344e;--input:#252528;--bubble:#2b2b2e;
  --selected:#36363b;--green:#52c77c;--red:#ff6964;--shadow:0 20px 80px #0008;color-scheme:dark;
}
html[data-theme=dark] .wordmark,html[data-theme=dark] .pane-brand,html[data-theme=dark] .pane-brand>span,html[data-theme=dark] .wordmark-light {color:#fff;}
html[data-theme=dark] .login-story {background:#1c1c20;}
html[data-theme=dark] .scene-orbit {border-color:#37373d;}
html[data-theme=dark] .robot-card {border-color:#393941;background:#393941;}
html[data-theme=dark] .scene-note {background:#27272fe8;border-color:#44444a;color:#adadb7;}
html[data-theme=dark] .search-box {background:#29292e;border-color:#35353b;}
html[data-theme=dark] .profile-button {background:#3f3f48;color:#f3f3f5;}
html[data-theme=dark] .composer-attach {background:#303036;color:#b6b6bf;}
html[data-theme=dark] .composer:focus-within {border-color:#5c5c65;}
html[data-theme=dark] .send-button:disabled {background:#383840;color:#8c8c96;}
html[data-theme=dark] .markdown code {background:#41414b;}
html[data-theme=dark] .code-block pre code {background:none;}
html[data-theme=dark] .markdown td,html[data-theme=dark] .markdown th {border-color:#494953;}
html[data-theme=dark] .markdown th {background:#383840;}
html[data-theme=dark] .notification-row.unread {border-color:#314d6c;}
html[data-theme=dark] .notification-row>span {background:#2c3542;}
html[data-theme=dark] .connection-banner {background:#342d20;border-color:#51432a;color:#d6bc8e;}
html[data-theme=dark] .drag-overlay {background:#202c3df2;color:#adcdf3;}

@keyframes spin {to {transform:rotate(360deg);}}
@keyframes pulse {0%,100% {opacity:.4;}50% {opacity:1;}}
@keyframes bob {0%,100% {transform:translateY(0);}50% {transform:translateY(-5px);}}
@keyframes toast-in {from {transform:translateY(10px);opacity:0;}to {transform:translateY(0);opacity:1;}}
@media(min-width:1600px) {
  .app-shell {grid-template-columns:355px minmax(0,1fr);}
  .app-shell.details-open {grid-template-columns:355px minmax(0,1fr) 330px;}
  .sidebar-toolbar {height:76px;min-height:76px;}
  .chat-header,.details-header {height:76px;}
  .agent-button {min-height:82px;}
  .agent-contact-heading strong {font-size:16px;}
  .agent-contact-preview {font-size:14px;}
}
@media(max-width:1179px) {
  .app-shell,.app-shell.details-open {grid-template-columns:300px minmax(0,1fr);}
  .agent-details {position:absolute;right:0;top:0;bottom:0;width:320px;box-shadow:-10px 0 35px #00000012;}
  .agent-contact-heading time {font-size:10px;}
  .agent-contact-heading strong {font-size:14px;}
  .agent-button {padding-left:9px;padding-right:9px;gap:10px;}
  .login-story {padding:34px;}
  .login-form-side {padding:45px;}
}
@media(max-width:820px) {
  .app-shell,.app-shell.details-open {grid-template-columns:270px minmax(0,1fr);}
  .agent-contact-heading time {display:none;}
  .messages {padding:25px 18px 20px;}
  .message-body,.message.user .message-body {max-width:90%;}
  .composer-area {padding-left:17px;padding-right:17px;}
  .login-story h1 {font-size:41px;}
  .login-form-wrap h2 {font-size:31px;}
  .login-story-content>p {font-size:14px;}
  .login-robot-scene {transform:scale(.8);transform-origin:center top;width:340px;max-width:none;margin-left:-25px;height:235px;}
  .robot-main {left:92px;}.robot-left {left:0;}.robot-right {right:0;}
  .login-form-side {padding:30px;}
  .login-copyright {font-size:10px;gap:10px;}
}
@media(max-width:650px) {
  .app-shell,.app-shell.details-open {display:flex;height:var(--app-height,100dvh);}
  .sidebar {width:100%;border:0;background:var(--bg);}
  .sidebar-toolbar {height:75px;min-height:75px;padding:5px 19px 0 23px;}
  .pane-brand {font-size:28px;}
  .sidebar-toolbar-actions {gap:7px;}
  .sidebar-toolbar .icon-button {width:40px;height:40px;background:var(--side);box-shadow:0 2px 8px #00000005;}
  .mobile-search-button {display:inline-flex;}
  .search-box {margin:0 22px 13px;height:37px;}
  .search-box kbd {display:none;}
  .agent-rail {padding:0 14px 16px;}
  .pinned-agents {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px 5px 25px;flex-shrink:0;}
  .pinned-agents:empty,.agent-rail:not(.has-pinned-agents) .pinned-agents {display:none;}
  .agent-rail.has-pinned-agents .rail-agents .agent-button:nth-child(-n+3) {display:none;}
  .pinned-agent {display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;min-width:0;padding:0;}
  .pinned-agent .agent-avatar-wrap {width:76px;height:76px;}
  .pinned-agent .agent-avatar-wrap>img,.pinned-agent>img {width:76px;height:76px;object-fit:cover;border-radius:50%;}
  .pinned-agent>span:last-child {font-size:12px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .pinned-agent.active .agent-avatar-wrap {outline:2px solid var(--line);outline-offset:4px;}
  .pinned-agent .agent-dot {width:12px;height:12px;right:4px;bottom:3px;border-color:var(--bg);}
  .pinned-agent .agent-unread {top:6px;right:4px;width:11px;height:11px;border-color:var(--bg);}
  .agent-button {gap:13px;min-height:82px;padding:13px 8px;border-radius:11px;}
  .agent-button.active {background:transparent;}
  .agent-button:active {background:var(--side);}
  .agent-contact-heading strong {font-size:16px;}
  .agent-contact-heading time {display:block;font-size:12px;}
  .agent-contact-preview {font-size:14px;}
  .agent-button>img,.agent-avatar-wrap,.agent-avatar-wrap>img {width:49px;height:49px;}
  .agent-button .agent-dot,.agent-button.active .agent-dot,.agent-button .agent-unread {border-color:var(--bg);}
  .sidebar-footer {padding:10px 23px max(14px,env(safe-area-inset-bottom));border-top:1px solid var(--line);}
  .sidebar-account {gap:12px;}
  .profile-button {width:36px;height:36px;}
  #profile-name {font-size:15px;}
  .sidebar-account .icon-button {width:42px;height:42px;}
  .conversation-heading {margin-left:21px;margin-right:19px;}
  .new-chat-button {width:40px;height:40px;}
  .selected-agent-card {margin:0 22px 12px;padding:10px 0 15px;}
  .selected-agent-info strong {font-size:21px;}
  .selected-agent-info span {font-size:13px;}
  .projects-heading {padding-left:24px;padding-right:22px;}
  .project-filters {padding-left:22px;padding-right:22px;}
  .project-chip {font-size:13px;}
  .conversation-tabs {margin:0 24px;}
  .conversation-tabs>button {font-size:14px;}
  .conversation-list {padding:8px 14px;}
  .conversation-title-row>strong {font-size:16px;}
  .conversation-title-row>time {font-size:12px;}
  .conversation-item {padding:15px 12px;min-height:83px;}
  .conversation-preview {font-size:14px;}
  .row-options {top:9px;height:34px;width:30px;}
  .chat-pane {display:none;}
  .app-shell.mobile-chat>.sidebar {display:none;}
  .app-shell.mobile-chat>.chat-pane {display:flex;flex:1;width:100%;}
  .mobile-back {display:inline-flex;min-width:40px;height:44px;color:var(--blue);margin-left:-8px;}
  .chat-header {height:calc(66px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 14px 0;gap:4px;background:var(--bg);}
  .chat-header-identity {gap:9px;}
  .chat-header-identity>img {width:34px;height:34px;}
  .chat-header-identity h2 {font-size:15px;}
  .chat-header-identity p {font-size:10px;max-width:calc(100vw - 215px);}
  .chat-header-actions {gap:0;}
  .chat-header-actions .icon-button {width:36px;height:42px;}
  .messages {padding:24px 14px 18px;gap:15px;}
  .message-body,.message.user .message-body {max-width:87%;}
  .message-bubble {padding:11px 14px;font-size:16px;line-height:1.45;border-radius:20px 20px 20px 5px;}
  .message.user .message-bubble {border-radius:20px 20px 5px 20px;}
  .message-meta {font-size:10px;}
  .attachment-file {max-width:min(300px,72vw);}
  .composer-area {padding:9px 12px max(9px,env(safe-area-inset-bottom));}
  .composer {border-radius:25px;padding:4px;}
  .composer-line {gap:6px;}
  .composer textarea {font-size:16px;}
  .composer-caption {margin-top:5px;font-size:9px;min-height:12px;line-height:12px;}
  .composer-model {font-size:9px;max-width:250px;}
  .task-status {font-size:11px;align-items:flex-start;}
  .task-status .spinner {margin-top:2px;}
  .task-status button {font-size:12px;}
  .scroll-bottom {right:17px;bottom:97px;}
  .welcome {padding:30px 22px;}
  .welcome-visual,.welcome-avatar {width:90px;height:90px;}
  .welcome h1 {font-size:28px;}
  .welcome-description {font-size:14px;max-width:310px;}
  .suggestions {margin-top:23px;max-width:330px;}
  .suggestion {padding:9px 12px;}
  .suggestion strong {font-size:13px;}
  .welcome-agent-link {font-size:12px;}
  .agent-details {width:100%;border:0;}
  .details-header {height:calc(66px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 20px 0;}
  .agent-details-content {padding:25px 27px max(25px,env(safe-area-inset-bottom));}
  .login-screen {display:block;min-height:100dvh;}
  .login-story {display:none;}
  .login-form-side {min-height:100dvh;padding:60px 32px 90px;background:var(--bg);}
  .login-form-wrap {width:350px;}
  .login-mobile-brand {display:flex;align-items:center;gap:10px;margin-bottom:40px;}
  .login-form-wrap h2 {font-size:38px;}
  .login-form-wrap input {font-size:16px;height:49px;}
  .login-form-wrap label {font-size:14px;}
  .login-intro {font-size:15px;margin-bottom:31px;}
  .login-submit {height:49px;font-size:15px;}
  .login-private {font-size:11px;}
  .login-copyright {font-size:11px;gap:12px;bottom:max(28px,env(safe-area-inset-bottom));}
  .modal {border-radius:20px;max-height:92dvh;max-width:calc(100vw - 24px);}
  .modal-header {padding:23px 21px 17px;}
  .modal-body {padding:0 21px 23px;}
  .modal-body input:not([type=checkbox]),.modal-body select,.modal-body textarea {font-size:16px;}
  .modal-body .field-row {gap:12px;}
  .modal-actions {flex-wrap:wrap;gap:8px;}
  .modal-actions button {font-size:13px;padding:11px 13px;min-height:42px;}
  .modal-body label {font-size:13px;}
  .avatar-picker {grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;}
  .avatar-option {max-height:65px;border-radius:16px;}
  .avatar-option img {border-radius:11px;}
  .settings-tabs {gap:18px;}
  .settings-tabs button {font-size:12px;}
  .settings-row {gap:10px;}
  .settings-row select {max-width:135px;}
  .user-role-badge {display:none;}
  .toast-stack {bottom:max(24px,env(safe-area-inset-bottom));}
  .toast {font-size:13px;}
}
@media(max-width:370px) {
  .sidebar-toolbar {padding-left:20px;padding-right:16px;}
  .pinned-agents {gap:8px;}
  .pinned-agent .agent-avatar-wrap,.pinned-agent .agent-avatar-wrap>img,.pinned-agent>img {width:68px;height:68px;}
  .agent-contact-heading strong {font-size:15px;}
  .agent-contact-preview {font-size:13px;}
  .agent-contact-heading time {font-size:11px;}
  .chat-header-identity>img {width:29px;height:29px;}
  .chat-header-identity h2 {font-size:14px;}
  .message-body,.message.user .message-body {max-width:91%;}
  .modal-body .field-row {grid-template-columns:1fr;gap:0;}
  .settings-tabs {gap:13px;}
  .settings-tabs button {font-size:11px;}
  .login-form-side {padding-left:25px;padding-right:25px;}
  .login-form-wrap h2 {font-size:34px;}
}
.agent-intelligence {margin-top:24px;}
.intelligence-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;}
.intelligence-heading h3 {font-size:15px;font-weight:650;}
.intelligence-heading>span {font-size:11px;color:var(--muted);}
.agent-intelligence .form-help {margin-top:7px;line-height:1.55;}
.preset-picker {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:13px 0 10px;}
.preset-option {position:relative;min-width:0;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--side);padding:13px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:9px;}
.preset-option:hover {border-color:var(--blue);}
.preset-option.selected {border-color:var(--blue);background:var(--blue-wash);box-shadow:inset 0 0 0 1px var(--blue);}
.preset-option:focus-visible {outline:2px solid var(--blue);outline-offset:3px;}
.preset-icon {display:flex;color:var(--blue);}
.preset-icon svg {width:21px;height:21px;}
.preset-copy {min-width:0;display:flex;flex-direction:column;align-items:flex-start;}
.preset-copy strong {font-size:14px;line-height:1.35;font-weight:650;}
.preset-copy small {font-size:12px;line-height:1.5;color:var(--muted);margin-top:7px;}
.preset-recommended {font-size:9px;font-weight:600;color:var(--blue);margin-top:4px;}
.preset-check {position:absolute;top:12px;right:10px;color:var(--blue);visibility:hidden;}
.preset-check svg {width:16px;height:16px;}
.preset-option.selected .preset-check {visibility:visible;}
.preset-custom {grid-column:1/-1;flex-direction:row;align-items:center;gap:11px;padding:13px;}
.preset-custom .preset-copy small {margin-top:3px;}
.preset-custom .preset-check {position:static;margin-left:auto;}
@media(max-width:420px) {.preset-picker {gap:6px;}.preset-option {padding:11px 9px;}.preset-copy strong {font-size:13px;}.preset-copy small {font-size:11px;}.preset-check {right:7px;top:11px;}.preset-custom {padding:12px;}.intelligence-heading>span {font-size:10px;}}
@media(prefers-reduced-motion:reduce) {*,*:before,*:after {animation:none!important;transition:none!important;scroll-behavior:auto!important;}}
