﻿:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#211d32;background:#fff;font-synthesis:none;text-rendering:optimizeLegibility;--violet:#7454da;--violet-dark:#5c40bd;--ink:#211d32;--muted:#858092;--line:#e8e8ec;--pale:#f8f8f9}*{box-sizing:border-box}body{margin:0;min-width:320px;height:100vh;overflow:hidden}.chat-app{display:flex;background:#fff}.sidebar{width:272px;flex:0 0 272px;height:100vh;background:#f8f8f9;border-right:1px solid #e8e8ec;display:flex;flex-direction:column;padding:20px 15px 14px;z-index:5}.sidebar-top{display:flex;align-items:center;justify-content:space-between;padding:0 5px 24px}.brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-size:20px;font-weight:750;letter-spacing:-.04em}.brand-mark{display:grid;place-items:center;width:34px;height:34px;color:#fff;background:linear-gradient(145deg,#9b84ef,#6749cf);border-radius:12px;font:italic 700 25px Georgia;box-shadow:0 5px 14px #7656d944}.new-chat-button{display:flex;align-items:center;gap:9px;min-height:43px;width:100%;padding:0 12px;background:#fff;border:1px solid #e8e8ec;border-radius:11px;color:#3f394f;text-align:left;font:600 12px/1.4 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer;box-shadow:0 2px 5px #33205005}.new-chat-button:hover{border-color:#d2c7f3;background:#f8f8f9}.plus-icon{font-size:18px;color:var(--violet)}kbd{margin-left:auto;font:10px/1.4 Inter,"Segoe UI",Arial,sans-serif;color:#9a95a6;background:#f7f5fa;border:1px solid #e8e8ec;border-radius:5px;padding:2px 5px}.history-label{margin:28px 8px 10px;font-size:9px;font-weight:800;letter-spacing:.15em;color:#aaa5b5}.chat-history{flex:1;overflow:auto;display:flex;flex-direction:column;gap:3px}.history-item{border:0;background:transparent;width:100%;border-radius:8px;padding:9px 10px;display:flex;align-items:center;gap:9px;color:#615c6e;text-align:left;font:500 12px/1.4 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}.history-item:hover{background:#f0f0f2}.history-item.active{background:#eee9fb;color:#5038a2}.history-item .history-glyph{font-size:14px;color:#9891a8}.history-item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-empty{padding:9px 10px;color:#aaa5b5;font-size:11px;line-height:1.5}.sidebar-bottom{border-top:1px solid #e8e8ec;padding-top:13px;margin-top:10px}.account-link{display:flex;align-items:center;gap:10px;padding:7px 6px;color:inherit;text-decoration:none;border-radius:10px}.account-link:hover{background:#f0f0f2}.account-avatar-small,.top-avatar{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:11px;background:linear-gradient(145deg,#9b84ef,#6749cf);color:white;font:italic 700 20px Georgia}.account-user{min-width:0;display:flex;flex-direction:column;gap:3px;flex:1}.account-user strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-user small{color:#9691a1;font-size:10px}.account-link>span:last-child{color:#9a95a6;font-size:13px}.signout-button{margin:5px 0 0 48px;padding:4px 0;border:0;background:none;color:#888395;font:500 10px/1.4 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}.signout-button:hover{color:var(--violet-dark)}.chat-main{min-width:0;flex:1;height:100vh;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% 0%,#f8f8f9 0%,#fff 50%)}.chat-topbar{height:65px;flex:0 0 65px;border-bottom:1px solid #f0edf5;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:#ffffffd9;backdrop-filter:blur(14px);z-index:2}.chat-crumb{min-width:0;display:flex;align-items:center;gap:9px;font-size:12px;color:#898494}.online-dot{width:7px;height:7px;border-radius:50%;background:#59b88e;box-shadow:0 0 0 3px #59b88e1a}.chat-crumb>span:nth-child(2){font-weight:700;color:#453e55}.crumb-slash{color:#c0bbc9}.chat-crumb strong{max-width:min(36vw,360px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#625d70;font-weight:550}.top-actions{display:flex;align-items:center;gap:14px}.model-pill{display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #e8e8ec;border-radius:20px;background:white;color:#777183;font-size:10px}.model-pill i{width:6px;height:6px;border-radius:50%;background:#8c72e5}.top-avatar{width:30px;height:30px;flex-basis:30px;border-radius:10px;text-decoration:none;font-size:18px}.conversation-shell{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center}.message-list{width:min(100%,900px);flex:1;min-height:0;overflow-y:auto;padding:44px 38px 28px;scroll-behavior:smooth}.welcome-screen{width:min(100%,680px);margin:8vh auto 0;text-align:center}.welcome-spark{width:52px;height:52px;margin:0 auto 20px;display:grid;place-items:center;border:1px solid #e8e1fb;border-radius:18px;background:linear-gradient(145deg,#fff,#f8f8f9);box-shadow:0 8px 24px #7155d516;color:#8164db;font-size:25px}.welcome-kicker{margin:0 0 10px;color:#856be0;font-weight:800;font-size:9px;letter-spacing:.18em}.welcome-screen h1{margin:0;color:#252039;font-size:clamp(28px,4vw,38px);letter-spacing:-.055em;line-height:1.16}.welcome-copy{max-width:430px;margin:12px auto 27px;color:#898496;font-size:13px;line-height:1.7}.prompt-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;text-align:left}.prompt-card{position:relative;min-height:95px;padding:15px 14px;border:1px solid #e8e8ec;border-radius:13px;background:#fff;display:grid;grid-template-columns:24px 1fr;grid-template-rows:auto auto;column-gap:9px;align-content:center;text-align:left;cursor:pointer;transition:transform .18s,border .18s,box-shadow .18s}.prompt-card:hover{transform:translateY(-2px);border-color:#d6cbf3;box-shadow:0 9px 22px #4f37810c}.prompt-card>span{grid-row:span 2;display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#f0f0f2;color:#775bd1;font-size:14px}.prompt-card strong{align-self:end;color:#40394f;font-size:11px}.prompt-card small{align-self:start;margin-top:4px;color:#928d9d;font-size:10px;line-height:1.45}.message-row{display:flex;gap:12px;margin:0 auto 25px;max-width:780px;animation:message-in .22s ease-out}.message-row.user{justify-content:flex-end}.message-row.assistant{justify-content:flex-start}.message-avatar{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;border:1px solid #ece7f5;border-radius:10px;background:#fff;color:#7557d5;font:italic 700 20px Georgia;box-shadow:0 3px 9px #4430670a}.message-row.user .message-avatar{order:2;background:#eee9fb;border-color:#eee9fb;color:#5a43ae}.message-body{min-width:0;max-width:min(78%,680px)}.message-row.user .message-body{order:1;display:flex;justify-content:flex-end}.message-content{color:#393447;font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.message-row.user .message-content{padding:11px 15px;border:1px solid #e7e0f6;border-radius:17px 17px 5px 17px;background:#f0f0f2;color:#3d3556;line-height:1.65}.message-row.assistant .message-content{padding:2px 0}.message-label{margin:1px 0 5px;color:#a09aaa;font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.thinking-indicator{display:flex;flex-direction:column;gap:5px;margin:2px 0 8px}.thinking-title{display:flex;align-items:center;gap:7px;color:#64558f;font-size:11px;font-weight:700}.thinking-dots{display:inline-flex;gap:3px}.thinking-dots i{width:4px;height:4px;border-radius:50%;background:#9077df;animation:dot-bounce 1s infinite ease-in-out}.thinking-dots i:nth-child(2){animation-delay:.15s}.thinking-dots i:nth-child(3){animation-delay:.3s}.thinking-detail{color:#9a95a5;font-size:10px}.typing-caret{display:inline-block;width:2px;height:15px;margin-left:2px;vertical-align:-2px;background:#8368d7;animation:caret .85s steps(2,start) infinite}.composer-wrap{width:min(100%,820px);padding:0 22px 17px}.composer{padding:13px 13px 10px 17px;border:1px solid #e8e8ec;border-radius:17px;background:#fff;box-shadow:0 8px 30px #4430670d;transition:border .2s,box-shadow .2s}.composer:focus-within{border-color:#b5a5ea;box-shadow:0 0 0 3px #8062df12,0 8px 30px #4430670d}.composer textarea{display:block;width:100%;min-height:28px;max-height:180px;resize:none;border:0;outline:0;background:transparent;color:#302a40;font:13px/1.6 Inter,"Segoe UI",Arial,sans-serif}.composer textarea::placeholder{color:#aaa5b4}.composer-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:8px}.composer-hint{display:flex;align-items:center;gap:6px;color:#aaa5b5;font-size:9px}.sparkle-mini{color:#927ce0;font-size:12px}.send-button{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:11px;background:linear-gradient(145deg,#8a6bea,#6548cc);color:#fff;box-shadow:0 5px 12px #7051d531;cursor:pointer;transition:opacity .16s,transform .16s}.send-button span{font-size:21px;line-height:1}.send-button:hover{transform:translateY(-1px)}.send-button:disabled{opacity:.42;cursor:default;transform:none}.composer-disclaimer{margin:8px 0 0;text-align:center;color:#aaa5b3;font-size:9px}.notice-toast{position:fixed;right:22px;top:78px;z-index:10;max-width:min(390px,calc(100vw - 32px));padding:12px 15px;border:1px solid #f3d5db;border-radius:11px;background:#fff5f6;color:#963a4c;font-size:12px;line-height:1.5;box-shadow:0 10px 28px #3a18300e;animation:message-in .2s ease-out}.icon-button{display:none;border:0;background:none;color:#655d73;font-size:19px;cursor:pointer}.sidebar-scrim{display:none}.loading-line{margin:12px auto;color:#9892a3;text-align:center;font-size:11px}.message-error{margin-top:8px;color:#a34454;font-size:11px;line-height:1.5}@keyframes dot-bounce{0%,60%,100%{transform:translateY(0);opacity:.55}30%{transform:translateY(-3px);opacity:1}}@keyframes caret{to{visibility:hidden}}@keyframes message-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media(max-width:800px){.sidebar{position:fixed;left:0;top:0;bottom:0;width:285px;transform:translateX(-105%);transition:transform .24s ease;box-shadow:12px 0 40px #2c1b4a16}.sidebar.open{transform:translateX(0)}.sidebar-scrim.visible{display:block;position:fixed;inset:0;z-index:4;border:0;background:#20183345}.icon-button{display:grid;place-items:center;width:34px;height:34px;border-radius:9px}.icon-button:hover{background:#f2eff8}.mobile-close{display:grid}.chat-topbar{height:58px;flex-basis:58px;padding:0 14px;gap:8px}.chat-crumb{flex:1;overflow:hidden;gap:7px;font-size:11px}.chat-crumb strong{max-width:35vw}.menu-button{flex:0 0 34px}.model-pill{display:none}.message-list{padding:27px 19px 20px}.welcome-screen{margin:7vh auto 0}.welcome-screen h1{font-size:29px}.welcome-copy{font-size:12px;margin-bottom:23px}.prompt-grid{gap:8px}.prompt-card{min-height:91px;padding:12px 10px;grid-template-columns:22px 1fr;column-gap:7px}.prompt-card strong{font-size:10px}.prompt-card small{font-size:9px}.composer-wrap{padding:0 12px 11px}.composer{border-radius:15px}.composer-hint{font-size:8px}.message-row{gap:9px;margin-bottom:21px}.message-body{max-width:84%}.message-content{font-size:12px}.composer-disclaimer{font-size:8px}}@media(max-width:430px){.top-avatar{width:28px;height:28px;flex-basis:28px}.chat-crumb>span:nth-child(2){display:none}.crumb-slash{display:none}.chat-crumb strong{max-width:42vw}.welcome-screen{margin-top:5vh}.welcome-screen h1{font-size:26px}.welcome-copy{max-width:310px}.prompt-grid{grid-template-columns:1fr}.prompt-card{min-height:67px;grid-template-rows:auto auto}.prompt-card small{margin-top:2px}.message-list{padding-left:14px;padding-right:14px}.composer-hint{max-width:75%;line-height:1.3}}
:root[data-theme="dark"]{color-scheme:dark;--ink:#f0edf8;--muted:#aaa4b8;--line:#343434;--pale:#202020;background:#161616;color:#f0edf8}.chat-app{background:#161616}.brand-logo{display:block;width:34px;height:34px;object-fit:contain}.brand{color:var(--ink)}.settings-button{width:100%;display:flex;align-items:center;gap:10px;padding:9px 10px;border:0;border-radius:9px;background:transparent;color:#777183;text-align:left;font:500 11px/1.4 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}.settings-button:hover{background:#f0f0f2;color:#55409e}.settings-button>span{width:18px;text-align:center;font-size:14px}.send-button svg{display:block;width:16px;height:16px;fill:currentColor}.send-button .send-button-label{font:600 11px/1 Inter,"Segoe UI",Arial,sans-serif}.send-button.continue-control{width:auto;min-width:94px;padding:0 11px;display:flex;align-items:center;justify-content:center;gap:7px}.send-button.stop-control{background:#fff;color:#6a4bd0;border:1px solid #d9cff4;box-shadow:0 3px 12px #523c8918}.send-button.stop-control svg{width:12px;height:12px}.reply-paused-note{margin-top:8px;color:#8b8498;font-size:10px;line-height:1.5}.settings-dialog{width:min(430px,calc(100vw - 30px));padding:22px;border:1px solid #e8e8ec;border-radius:18px;background:#fff;color:#211d32;box-shadow:0 24px 80px #21153232}.settings-dialog::backdrop{background:#21153255;backdrop-filter:blur(3px)}.settings-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:18px}.settings-kicker{margin:0 0 7px;color:#856be0;font-size:9px;font-weight:800;letter-spacing:.15em}.settings-head h2{margin:0;font-size:21px;letter-spacing:-.04em}.icon-button.settings-close{display:grid;width:30px;height:30px}.theme-setting{display:flex;align-items:center;gap:12px;padding:14px 12px;border:1px solid #e8e8ec;border-radius:12px;cursor:pointer}.theme-setting-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#f0f0f2;color:#7658d1;font-size:19px}.theme-setting>span:nth-child(2){display:flex;flex:1;flex-direction:column;gap:4px}.theme-setting strong{font-size:12px}.theme-setting small{color:#898494;font-size:10px}.theme-setting input{width:36px;height:20px;accent-color:#7454da;cursor:pointer}:root[data-theme="dark"] body,:root[data-theme="dark"] .chat-app{background:#161616;color:#efedf7}:root[data-theme="dark"] .sidebar{background:#1c1c1c;border-color:#343434}:root[data-theme="dark"] .brand-logo{filter:brightness(0) invert(1)}:root[data-theme="dark"] .new-chat-button,:root[data-theme="dark"] .model-pill,:root[data-theme="dark"] .composer,:root[data-theme="dark"] .prompt-card{background:#202020;border-color:#343434;color:#e9e5f2}:root[data-theme="dark"] .new-chat-button:hover,:root[data-theme="dark"] .history-item:hover,:root[data-theme="dark"] .account-link:hover,:root[data-theme="dark"] .settings-button:hover{background:#2b2b2b}:root[data-theme="dark"] kbd{background:#2b2b2b;border-color:#343434;color:#aaa4b8}:root[data-theme="dark"] .history-label,:root[data-theme="dark"] .history-empty,:root[data-theme="dark"] .account-user small,:root[data-theme="dark"] .history-item .history-glyph,:root[data-theme="dark"] .signout-button{color:#938da2}:root[data-theme="dark"] .history-item{color:#c3bdcf}:root[data-theme="dark"] .history-item.active{background:#332b49;color:#d6caff}:root[data-theme="dark"] .sidebar-bottom,:root[data-theme="dark"] .chat-topbar{border-color:#343434}:root[data-theme="dark"] .chat-main{background:radial-gradient(ellipse at 50% 0%,#202020 0%,#161616 55%)}:root[data-theme="dark"] .chat-topbar{background:#1a1a1ae8}:root[data-theme="dark"] .chat-crumb,:root[data-theme="dark"] .chat-crumb strong{color:#a7a1b4}:root[data-theme="dark"] .chat-crumb>span:nth-child(2){color:#e4dfed}:root[data-theme="dark"] .model-pill{color:#c1bbcd}:root[data-theme="dark"] .welcome-spark{background:linear-gradient(145deg,#242424,#242424);border-color:#403752}:root[data-theme="dark"] .welcome-screen h1{color:#f0edf8}:root[data-theme="dark"] .welcome-copy,:root[data-theme="dark"] .prompt-card small{color:#aaa4b8}:root[data-theme="dark"] .prompt-card strong{color:#e2ddec}:root[data-theme="dark"] .prompt-card>span{background:#342e45;color:#bdadff}:root[data-theme="dark"] .message-avatar{background:#202020;border-color:#343434}:root[data-theme="dark"] .message-row.user .message-avatar{background:#352d49;border-color:#352d49;color:#d4c8ff}:root[data-theme="dark"] .message-content{color:#e4dfed}:root[data-theme="dark"] .message-row.user .message-content{background:#2d283a;border-color:#403751;color:#e8e0fa}:root[data-theme="dark"] .message-label,:root[data-theme="dark"] .thinking-detail,:root[data-theme="dark"] .composer-hint,:root[data-theme="dark"] .composer-disclaimer{color:#9992a7}:root[data-theme="dark"] .thinking-title{color:#c5b8f5}:root[data-theme="dark"] .composer textarea{color:#f0edf8}:root[data-theme="dark"] .composer textarea::placeholder{color:#827c90}:root[data-theme="dark"] .composer:focus-within{border-color:#7662ae;box-shadow:0 0 0 3px #8062df20,0 8px 30px #0003}:root[data-theme="dark"] .send-button.stop-control{background:#292634;color:#d5c9ff;border-color:#4a4160}:root[data-theme="dark"] .settings-dialog{background:#202020;border-color:#343434;color:#efedf7}:root[data-theme="dark"] .theme-setting{border-color:#343434}:root[data-theme="dark"] .theme-setting small{color:#aaa4b8}:root[data-theme="dark"] .theme-setting-icon{background:#352d49;color:#cfbfff}:root[data-theme="dark"] .icon-button{color:#b9b3c6}:root[data-theme="dark"] .icon-button:hover{background:#302c3a}:root[data-theme="dark"] .notice-toast{background:#34272e;border-color:#62404b;color:#ffd8e0}:root[data-theme="dark"] .message-error{color:#f2a9b5}

/* Markdown response formatting */
.message-row.assistant .message-content{white-space:normal;line-height:1.75}
.message-content> :first-child{margin-top:0}
.message-content> :last-child{margin-bottom:0}
.message-content p{margin:0 0 12px}
.message-content h1,.message-content h2,.message-content h3,.message-content h4,.message-content h5,.message-content h6{margin:20px 0 9px;color:#29243a;font-weight:720;line-height:1.3;letter-spacing:-.025em}
.message-content h1{font-size:1.55em}.message-content h2{font-size:1.35em}.message-content h3{font-size:1.15em}.message-content h4,.message-content h5,.message-content h6{font-size:1em}
.message-content ul,.message-content ol{margin:7px 0 14px;padding-left:25px}.message-content li{padding-left:3px;margin:4px 0}.message-content li>ul,.message-content li>ol{margin:5px 0}
.message-content a{color:#6548c5;text-decoration:underline;text-decoration-color:#b8a8e8;text-underline-offset:2px}.message-content a:hover{color:#4b329f}
.message-content blockquote{margin:12px 0;padding:2px 0 2px 14px;border-left:3px solid #ad9ae8;color:#777184}.message-content blockquote>:last-child{margin-bottom:0}
.message-content hr{height:1px;margin:19px 0;border:0;background:#ebe7f1}
.message-content :not(pre)>code{padding:2px 6px;border:1px solid #eee9f5;border-radius:5px;background:#f5f2fa;color:#704ec5;font: .9em/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:break-spaces}
.code-frame{overflow:hidden;margin:13px 0 16px;border:1px solid #e8e4ef;border-radius:11px;background:#f8f8f9;text-align:left}
.code-toolbar{height:34px;padding:0 10px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e8e4ef;background:#f2f0f6;color:#797386;font:10px/1 Inter,"Segoe UI",Arial,sans-serif}
.code-copy{padding:4px 8px;border:1px solid #e2ddeb;border-radius:6px;background:#fff;color:#665d77;font:10px/1.2 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}.code-copy:hover{border-color:#c9bbed;color:#5a40b2}
.code-frame pre{max-width:100%;margin:0;padding:13px 15px;overflow:auto;background:transparent!important;color:#24212b;font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2}
.code-frame pre code.hljs{padding:0;background:transparent!important;font:inherit}
.table-scroll{max-width:100%;margin:12px 0 16px;overflow:auto;border:1px solid #e8e8ec;border-radius:10px}
.message-content table{width:100%;border-collapse:collapse;border-spacing:0;font-size:.92em;line-height:1.55}
.message-content th,.message-content td{min-width:90px;padding:9px 12px;border-right:1px solid #ece8f2;border-bottom:1px solid #ece8f2;text-align:left;vertical-align:top}
.message-content th{background:#f6f3fc;color:#494257;font-weight:700;white-space:nowrap}
.message-content tr:last-child td{border-bottom:0}.message-content th:last-child,.message-content td:last-child{border-right:0}
.message-content input[type=checkbox]{margin:0 6px 0 0;accent-color:#7454da;vertical-align:middle}
:root[data-theme="dark"] .message-content h1,:root[data-theme="dark"] .message-content h2,:root[data-theme="dark"] .message-content h3,:root[data-theme="dark"] .message-content h4,:root[data-theme="dark"] .message-content h5,:root[data-theme="dark"] .message-content h6{color:#f0edf8}
:root[data-theme="dark"] .message-content a{color:#c3b2ff;text-decoration-color:#74639d}
:root[data-theme="dark"] .message-content blockquote{color:#b3adbf;border-color:#8c75d1}
:root[data-theme="dark"] .message-content hr{background:#343434}
:root[data-theme="dark"] .message-content :not(pre)>code{border-color:#413a4f;background:#2b2b2b;color:#d0c2ff}
:root[data-theme="dark"] .code-frame{border-color:#343434;background:#1f1e24}
:root[data-theme="dark"] .code-toolbar{border-color:#343434;background:#2b2b2b;color:#b9b3c6}
:root[data-theme="dark"] .code-copy{border-color:#484252;background:#302c3a;color:#ddd6eb}
:root[data-theme="dark"] .message-content th,:root[data-theme="dark"] .message-content td{border-color:#343434}
:root[data-theme="dark"] .message-content th{background:#2b2735;color:#e4dfed}
/* Slim, themed conversation scrollbars */
.message-list{scrollbar-width:thin;scrollbar-color:#c9c2d6 transparent;overflow-x:hidden}
.message-list::-webkit-scrollbar{width:7px;height:7px}
.message-list::-webkit-scrollbar-track{background:transparent}
.message-list::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:99px;background:#c9c2d6;background-clip:padding-box}
.message-list::-webkit-scrollbar-thumb:hover{background:#a99acb;background-clip:padding-box}
.message-list::-webkit-scrollbar-button{display:none;width:0;height:0}
.chat-history{scrollbar-width:thin;scrollbar-color:#d2ccdd transparent}
.chat-history::-webkit-scrollbar{width:5px}.chat-history::-webkit-scrollbar-track{background:transparent}.chat-history::-webkit-scrollbar-thumb{border-radius:99px;background:#d2ccdd}
.history-channel{margin-left:auto;padding:3px 6px;border:1px solid #e7e0f5;border-radius:5px;color:#8c74cf;font-size:8px;line-height:1.2;white-space:nowrap}
:root[data-theme="dark"] .message-list{scrollbar-color:#514a60 transparent}
:root[data-theme="dark"] .message-list::-webkit-scrollbar-thumb,:root[data-theme="dark"] .chat-history::-webkit-scrollbar-thumb{background:#514a60;background-clip:padding-box}
:root[data-theme="dark"] .message-list::-webkit-scrollbar-thumb:hover{background:#71658c;background-clip:padding-box}
:root[data-theme="dark"] .history-channel{border-color:#49415b;color:#c3b2ff}
.voice-chat-button{width:36px;height:36px;border:1px solid #e8e8ec;border-radius:11px;background:#fff;color:#7155cc;font-size:17px;cursor:pointer}.voice-chat-button:hover{background:#f8f8f9;border-color:#cfc2f1}.voice-chat-button.active{background:#7656d6;color:#fff;border-color:#7656d6;box-shadow:0 0 0 4px #7656d61c}.voice-chat-button:disabled{opacity:.45;cursor:not-allowed}.voice-language-setting,.response-style-setting{display:flex;flex-direction:column;gap:8px;padding:14px 4px;border-top:1px solid var(--line)}.voice-language-setting label,.response-style-setting label{font-size:12px;font-weight:700;color:var(--ink)}.voice-language-setting select,.response-style-setting textarea,.response-style-setting select{width:100%;padding:10px 11px;border:1px solid #e8e8ec;border-radius:9px;background:var(--pale);color:var(--ink);font:inherit;font-size:12px}.voice-language-setting small,.response-style-setting small{color:var(--muted);font-size:10px;line-height:1.5}.response-style-setting textarea{resize:vertical;min-height:58px}.response-style-setting button{align-self:flex-start;padding:8px 12px;border:0;border-radius:8px;background:var(--violet);color:#fff;font:600 11px Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}.response-style-setting button:hover{background:var(--violet-dark)}:root[data-theme="dark"] .voice-chat-button{background:#282333;border-color:#49415b;color:#c3b2ff}:root[data-theme="dark"] .voice-chat-button.active{background:#7656d6;color:#fff;border-color:#7656d6}
.workspace-panel{display:flex;align-items:center;gap:4px;padding:3px;border:1px solid #e8e8ec;border-radius:12px;background:#fff}.workspace-panel .account-link{flex:1;min-width:0;padding:6px 4px}.workspace-panel .settings-button{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:9px;background:transparent;color:#817a91;font-size:14px;cursor:pointer}.workspace-panel .settings-button:hover{background:#f0f0f2;color:var(--violet)}.sidebar-bottom{border-top:0;padding-top:0}.signout-button{margin-left:10px}.composer-bottom{justify-content:space-between}.composer-left-actions,.composer-right-actions{display:flex;align-items:center;gap:10px}.composer-left-actions{min-width:0}.composer-hint{display:flex;align-items:center;gap:6px}.attach-image-button{order:-1}.welcome-logo{width:26px;height:26px;object-fit:contain}.sparkle-mini{width:11px;height:11px;object-fit:contain;opacity:.72}.settings-button .fa-gear{font-size:14px}:root[data-theme="dark"] .workspace-panel{background:#202020;border-color:#343434}:root[data-theme="dark"] .workspace-panel .settings-button{color:#b9b3c6}:root[data-theme="dark"] .workspace-panel .settings-button:hover{background:#2b2b2b;color:#cfbfff}:root[data-theme="dark"] .welcome-logo,:root[data-theme="dark"] .sparkle-mini{filter:brightness(0) invert(1)}@media(max-width:560px){.composer-left-actions{gap:7px}.composer-hint{font-size:9px}.composer-right-actions{gap:7px}}
:root{--continue-bg:#f8f8f9}.continue-reply-button{display:inline-flex;align-items:center;gap:7px;margin-top:10px;padding:8px 12px;border:1px solid #d9cff4;border-radius:10px;background:var(--continue-bg);color:#5c40bd;font:600 12px/1 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}.continue-reply-button:hover{background:#ece5ff}.continue-reply-button svg{width:13px;height:13px;fill:currentColor}:root[data-theme="dark"] .continue-reply-button{--continue-bg:#2b2638;border-color:#4a4160;color:#d5c9ff}:root[data-theme="dark"] .continue-reply-button:hover{background:#39314a}
.search-info-panel{margin-top:13px;padding:12px 14px;border:1px solid #e9e3f5;border-radius:12px;background:#f8f8f9;color:#514a60;font-size:11px;line-height:1.5}.search-info-heading{margin-bottom:5px;color:#694cc5;font-size:10px;font-weight:750}.search-info-query{margin:0 0 9px;color:#625c70;overflow-wrap:anywhere}.search-info-sources{display:flex;flex-wrap:wrap;gap:7px}.search-info-sources a,.memory-source-link{max-width:100%;padding:5px 8px;border:1px solid #e9e4f2;border-radius:7px;background:#fff;color:#6246b7;font:500 10px/1.4 Inter,"Segoe UI",Arial,sans-serif;text-decoration:none;overflow-wrap:anywhere}.search-info-sources a:hover,.memory-source-link:hover{border-color:#cfc2f2;background:#f8f5ff}.memory-info-heading{margin-top:8px}.memory-source-link{cursor:pointer}:root[data-theme="dark"] .search-info-panel{background:#202020;border-color:#343434;color:#ddd7e9}:root[data-theme="dark"] .search-info-query{color:#bdb6ca}:root[data-theme="dark"] .search-info-sources a,:root[data-theme="dark"] .memory-source-link{background:#2b2b2b;border-color:#403a4d;color:#c8baff}:root[data-theme="dark"] .search-info-sources a:hover,:root[data-theme="dark"] .memory-source-link:hover{background:#332d43;border-color:#62517e}
.gmail-mcp-card{margin-top:18px;padding:16px;border:1px solid #e9e4f2;border-radius:13px;background:#f8f8f9}.gmail-mcp-card>.mcp-services-heading{margin:0}.gmail-mcp-card>.mcp-services-heading>i{color:#7658d1;font-size:20px}.gmail-mcp-copy{margin:10px 0 8px;color:#777183;font-size:11px;line-height:1.65}.gmail-mcp-actions{display:flex;gap:8px;margin-top:10px}.gmail-mcp-actions button{padding:8px 12px;border:1px solid #e6e0f1;border-radius:8px;background:#fff;color:#5c43ad;font:600 11px Inter,Arial,sans-serif;cursor:pointer}.gmail-mcp-actions button:hover{background:#f0f0f2}.gmail-mcp-actions button:disabled{opacity:.55;cursor:wait}:root[data-theme=dark] .gmail-mcp-card{background:#202020;border-color:#343434}:root[data-theme=dark] .gmail-mcp-copy{color:#bdb6ca}:root[data-theme=dark] .gmail-mcp-actions button{background:#2b2b2b;border-color:#403a4d;color:#c8baff}
.response-style-setting input[type="number"]{width:96px;padding:10px 11px;border:1px solid #e8e8ec;border-radius:9px;background:var(--pale);color:var(--ink);font:inherit;font-size:12px}.nudge-minutes-row{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px}.nudge-minutes-row label{color:var(--ink);font-weight:700}.nudge-minutes-row span{font-size:11px}.nudge-actions{display:flex;flex-wrap:wrap;gap:8px}.nudge-actions #test-conversation-nudge{background:#f0f0f2;color:#664ab7}:root[data-theme="dark"] .response-style-setting input[type="number"]{border-color:#49415b}
Chat polish
 · CSS
/* ==========================================================================
   chat-polish.css — refined look, custom select menu, and animations
   Respects the flat palette in settings.css (no box-shadow / filter).
   Load AFTER settings.css.
   ========================================================================== */
 
:root{
  --ease-out:cubic-bezier(.22,1,.36,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --ps-radius:11px;
}
 
/* ---------- General polish ---------- */
::selection{background:var(--ac-soft);color:var(--tx)}
button,a,input,textarea,select,.prompt-card,.history-item{-webkit-tap-highlight-color:transparent}
:focus-visible{outline:2px solid var(--ac);outline-offset:2px}
button{transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s var(--ease-out),opacity .18s ease}
button:not(:disabled):active{transform:scale(.97)}
 
.st-main textarea,.st-main input[type=text],.st-main input[type=number],.st-main input:not([type]),
.agent-form-field input,.agent-form-field textarea,.response-style-setting textarea{
  transition:border-color .2s ease,background-color .2s ease,outline-color .2s ease;
}
.st-main textarea:focus,.st-main input:focus,.agent-form-field input:focus,.agent-form-field textarea:focus,.response-style-setting textarea:focus{
  outline:2px solid var(--ac-soft);outline-offset:0;border-color:var(--ac)!important;
}
.st-btn,.agent-save-button,.agent-reset-button,.response-style-setting button{border-radius:10px}
.st-btn:hover,.agent-reset-button:hover{border-color:var(--ac)}
 
/* ---------- Custom select (.ps) ---------- */
.ps{position:relative;display:block;width:100%;min-width:0}
.live-voice-language-label .ps{width:auto;min-width:104px}
.live-voice-speaker-label .ps{min-width:84px}
 
.ps-native{
  position:absolute!important;inset:0;width:100%;height:100%;opacity:0;pointer-events:none;
  overflow:hidden;clip:rect(0 0 0 0);
}
.ps-btn{
  width:100%;min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:0 12px;border:1px solid var(--bd);border-radius:var(--ps-radius);
  background:var(--panel);color:var(--tx);font:500 12px/1.3 Inter,"Segoe UI",Arial,sans-serif;
  text-align:start;cursor:pointer;
  transition:border-color .18s ease,background-color .18s ease,outline-color .18s ease;
}
.ps-btn:hover{border-color:var(--ac);background:var(--bg)}
.ps-btn:focus-visible,.ps.open .ps-btn{border-color:var(--ac);background:var(--bg);outline:2px solid var(--ac-soft);outline-offset:0}
.ps-value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ps-chevron{
  flex:none;width:16px;height:16px;color:var(--mt);
  transition:transform .28s var(--ease-out),color .18s ease;
}
.ps.open .ps-chevron{transform:rotate(180deg);color:var(--ac)}
.ps.disabled .ps-btn{opacity:.5;cursor:not-allowed}
.live-voice-language-label .ps-btn,.live-voice-speaker-label .ps-btn{
  min-height:36px;padding:0 10px;font-size:11px;font-weight:600;border-radius:10px;
}
 
/* Menu (lives in the top layer via popover, so dialogs never clip it) */
.ps-menu{
  position:fixed;margin:0;inset:auto;padding:5px;min-width:160px;
  max-height:min(280px,50vh);overflow-y:auto;overscroll-behavior:contain;
  border:1px solid var(--bd);border-radius:14px;background:var(--bg);color:var(--tx);
  list-style:none;z-index:2147483000;
  transform-origin:var(--ps-origin,top) center;
  animation:ps-menu-in .22s var(--ease-out) both;
}
.ps-menu[data-side="up"]{--ps-origin:bottom}
.ps-menu:not(:popover-open):not([popover]){display:block}
.ps-menu.closing{animation:ps-menu-out .14s ease-in both}
.ps-option{
  display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:9px;
  font:500 12px/1.35 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer;user-select:none;
  transition:background-color .12s ease,color .12s ease,transform .12s ease;
  animation:ps-opt-in .26s var(--ease-out) both;animation-delay:calc(var(--i,0)*18ms);
}
.ps-option+.ps-option{margin-top:2px}
.ps-option.active{background:var(--panel-2)}
.ps-option[aria-selected="true"]{background:var(--ac-soft);color:var(--ac);font-weight:650}
.ps-option[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
.ps-option-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ps-check{
  flex:none;width:14px;height:14px;color:var(--ac);opacity:0;transform:scale(.4);
  transition:opacity .16s ease,transform .26s var(--ease-spring);
}
.ps-option[aria-selected="true"] .ps-check{opacity:1;transform:scale(1)}
 
@keyframes ps-menu-in{from{opacity:0;transform:translateY(-6px) scale(.96)}to{opacity:1;transform:none}}
.ps-menu[data-side="up"]{animation-name:ps-menu-in-up}
@keyframes ps-menu-in-up{from{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:none}}
@keyframes ps-menu-out{to{opacity:0;transform:scale(.97)}}
@keyframes ps-opt-in{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}
[dir="rtl"] .ps-option,.ps-menu[dir="rtl"] .ps-option{animation-name:ps-opt-in-rtl}
@keyframes ps-opt-in-rtl{from{opacity:0;transform:translateX(6px)}to{opacity:1;transform:none}}
 
/* ---------- Entrance animations ---------- */
@keyframes pp-rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes pp-fade{from{opacity:0}to{opacity:1}}
@keyframes pp-slide-right{from{opacity:0;transform:translateX(-14px)}to{opacity:1;transform:none}}
@keyframes pp-drop{from{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:none}}
@keyframes pp-pop{0%{opacity:0;transform:scale(.6) rotate(-8deg)}70%{opacity:1;transform:scale(1.06) rotate(1deg)}100%{transform:none}}
@keyframes pp-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes pp-ring{0%{opacity:.55;transform:scale(.9)}100%{opacity:0;transform:scale(1.7)}}
@keyframes pp-dot{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(1.5)}}
@keyframes pp-dialog{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes pp-backdrop{from{opacity:0}to{opacity:1}}
@keyframes pp-msg-user{from{opacity:0;transform:translateX(18px) scale(.97)}to{opacity:1;transform:none}}
@keyframes pp-msg-assistant{from{opacity:0;transform:translateX(-14px) translateY(6px)}to{opacity:1;transform:none}}
@keyframes pp-panel{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes pp-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}
 
/* App shell */
@media (min-width:821px){
  .sidebar{animation:pp-slide-right .55s var(--ease-out) both}
}
.chat-topbar{animation:pp-drop .5s var(--ease-out) both}
.chat-history{animation:pp-fade .6s ease .15s both}
.new-chat-button{animation:pp-rise .5s var(--ease-out) .1s both}
.workspace-files-button{animation:pp-rise .5s var(--ease-out) .16s both}
.chat-search{animation:pp-rise .5s var(--ease-out) .22s both}
.sidebar-bottom{animation:pp-rise .5s var(--ease-out) .28s both}
 
/* Welcome screen (staggered) */
.welcome-spark{position:relative;animation:pp-pop .7s var(--ease-spring) .1s both,pp-float 5s ease-in-out 1s infinite}
.welcome-spark::after{
  content:"";position:absolute;inset:-1px;border-radius:inherit;border:1.5px solid var(--ac);
  opacity:0;pointer-events:none;animation:pp-ring 3.2s ease-out 1.1s infinite;
}
.welcome-kicker{animation:pp-rise .6s var(--ease-out) .22s both}
.welcome-screen h1{animation:pp-rise .65s var(--ease-out) .3s both}
.welcome-copy{animation:pp-rise .65s var(--ease-out) .38s both}
.prompt-card{animation:pp-rise .6s var(--ease-out) both;
  transition:transform .28s var(--ease-out),border-color .2s ease,background-color .2s ease}
.prompt-card:nth-child(1){animation-delay:.46s}
.prompt-card:nth-child(2){animation-delay:.54s}
.prompt-card:nth-child(3){animation-delay:.62s}
.prompt-card:nth-child(4){animation-delay:.70s}
.prompt-card:hover{transform:translateY(-4px);border-color:var(--ac)}
.prompt-card:active{transform:translateY(-1px) scale(.985)}
.prompt-card>span{transition:transform .35s var(--ease-spring),background-color .2s ease,color .2s ease}
.prompt-card:hover>span{transform:rotate(-12deg) scale(1.18);background:var(--ac);color:#fff}
 
/* Composer */
.composer-wrap{animation:pp-rise .6s var(--ease-out) .5s both}
.composer{transition:border-color .22s ease,transform .3s var(--ease-out)}
.composer:focus-within{border-color:var(--ac);transform:translateY(-2px);outline:2px solid var(--ac-soft);outline-offset:0}
.send-button{transition:transform .22s var(--ease-spring),opacity .16s ease,background-color .18s ease}
.send-button:not(:disabled):hover{transform:translateY(-2px) scale(1.08)}
.send-button:not(:disabled):active{transform:scale(.88)}
.send-button svg{transition:transform .25s var(--ease-out)}
.send-button:not(:disabled):hover svg{transform:translate(2px,-2px)}
.attach-image-button,.voice-chat-button{transition:transform .22s var(--ease-spring),background-color .18s ease,color .18s ease,border-color .18s ease}
.attach-image-button:hover{transform:rotate(-14deg) scale(1.1)}
.voice-chat-button:hover{transform:scale(1.1)}
.voice-chat-button.active{animation:pp-ring-btn 1.6s ease-out infinite}
@keyframes pp-ring-btn{0%{outline:0 solid var(--ac-soft)}70%{outline:7px solid transparent}100%{outline:0 solid transparent}}
 
/* Messages */
.message-row{animation-duration:.42s;animation-timing-function:var(--ease-out);animation-fill-mode:both}
.message-row.user{animation-name:pp-msg-user}
.message-row.assistant{animation-name:pp-msg-assistant}
.message-row .message-avatar{animation:pp-pop .5s var(--ease-spring) .08s both}
.message-row.user .message-content{transform-origin:100% 100%}
.message-content table,.message-content pre{animation:pp-fade .5s ease both}
.message-error{animation:pp-rise .35s var(--ease-out) both}
.typing-caret{border-radius:2px}
 
/* Sidebar items & header details */
.history-item{transition:background-color .15s ease,color .15s ease,transform .2s var(--ease-out),padding .2s var(--ease-out)}
.history-item:hover{transform:translateX(3px)}
.history-item.active{position:relative}
.history-item.active::before{
  content:"";position:absolute;left:0;top:22%;bottom:22%;width:3px;border-radius:3px;background:var(--ac);
  animation:pp-fade .3s ease both;
}
.new-chat-button .plus-icon{display:inline-block;transition:transform .35s var(--ease-spring)}
.new-chat-button:hover .plus-icon{transform:rotate(90deg) scale(1.15)}
.brand-logo{transition:transform .5s var(--ease-spring)}
.brand:hover .brand-logo{transform:rotate(-12deg) scale(1.1)}
.online-dot{animation:pp-dot 2.4s ease-in-out infinite}
.model-pill i{animation:pp-dot 2.4s ease-in-out .6s infinite}
.top-avatar,.account-avatar-small{transition:transform .25s var(--ease-spring)}
.top-avatar:hover,.account-avatar-small:hover{transform:scale(1.1) rotate(-4deg)}
.settings-button i{transition:transform .5s var(--ease-out)}
.settings-button:hover i{transform:rotate(90deg)}
.sidebar-scrim.visible{animation:pp-fade .25s ease both}
 
/* Dialogs */
dialog[open]{animation:pp-dialog .32s var(--ease-out) both}
dialog[open]::backdrop{animation:pp-backdrop .28s ease both}
.st-panel.active{animation:pp-panel .32s var(--ease-out) both}
.st-nav button{transition:background-color .15s ease,transform .2s var(--ease-out)}
.st-nav button:hover{transform:translateX(3px)}
.st-row{transition:background-color .15s ease}
input[type=checkbox][role=switch]{transition:background-color .2s ease,border-color .2s ease}
input[type=checkbox][role=switch]::after{transition:transform .3s var(--ease-spring),background-color .2s ease}
input[type=checkbox][role=switch]:active::after{width:20px}
input[type=checkbox][role=switch]:checked:active::after{transform:translateX(12px)}
 
/* Live voice screen */
.live-voice-screen:not([hidden]){animation:pp-fade .45s ease both}
.live-voice-screen:not([hidden]) .live-voice-center{animation:pp-pop .7s var(--ease-spring) .1s both}
.live-caption-card{animation:pp-rise .5s var(--ease-out) both}
.live-caption-card:nth-child(2){animation-delay:.1s}
 
/* Toast / loaders */
.notice-toast{animation-timing-function:var(--ease-spring)}
 
/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms!important;animation-iteration-count:1!important;animation-delay:0s!important;
    transition-duration:.001ms!important;scroll-behavior:auto!important;
  }
}
 
/* ========== MCP full panel (replaces chat) ========== */
.mcp-panel{
  display:flex;flex-direction:column;height:100%;min-height:0;
  background:var(--bg);color:var(--tx);overflow:hidden;
}
.mcp-panel[hidden]{display:none!important}
body.mcp-open .conversation-shell{visibility:hidden!important;pointer-events:none!important}
.mcp-panel-header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:18px 22px 12px;border-bottom:1px solid var(--bd);
}
.mcp-panel-header .settings-kicker{margin:0 0 4px}
.mcp-panel-header h2{margin:0;font-size:22px;letter-spacing:-.03em}
.mcp-panel-header .mcp-copy{margin:6px 0 0;color:var(--mt);font-size:12px;line-height:1.5;max-width:52ch}
.mcp-panel-body{
  flex:1;min-height:0;overflow-y:auto;padding:16px 22px 28px;
  display:grid;gap:22px;align-content:start;
}
.mcp-cards{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px!important}
.mcp-card{
  display:flex!important;align-items:center;gap:12px;
  padding:14px!important;border:1px solid var(--bd)!important;border-radius:14px!important;
  background:var(--panel)!important;cursor:pointer;
  transition:border-color .18s ease,background .18s ease,transform .18s var(--ease-out);
}
.mcp-card:hover{border-color:var(--ac)!important;background:var(--bg)!important}
.mcp-card:active{transform:scale(.985)}
.mcp-card-icon{
  flex:none;width:42px;height:42px;border-radius:12px;
  background:linear-gradient(145deg,var(--ac-soft),var(--panel-2,#f0eef6));
  display:grid;place-items:center;overflow:hidden;
  font:700 16px/1 Inter,"Segoe UI",Arial,sans-serif;color:var(--ac);
}
.mcp-card-icon img{width:100%;height:100%;object-fit:cover}
.mcp-card .store-skill-info{flex:1;min-width:0}
.mcp-card .store-skill-info strong{font-size:13px!important}
.mcp-card .store-skill-info small{font-size:11px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 
/* Detail drawer */
.mcp-detail{
  position:absolute;inset:0;z-index:5;
  background:var(--bg);padding:22px;overflow-y:auto;
  display:flex;flex-direction:column;gap:14px;
  animation:ps-menu-in .22s var(--ease-out) both;
}
.mcp-detail[hidden]{display:none!important}
.mcp-detail-back{
  align-self:flex-start;display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border:1px solid var(--bd);border-radius:10px;
  background:var(--panel);color:var(--tx);font:600 12px Inter,Arial,sans-serif;cursor:pointer;
}
.mcp-detail-back:hover{border-color:var(--ac)}
.mcp-detail-icon{
  width:72px;height:72px;border-radius:18px;
  background:linear-gradient(145deg,var(--ac-soft),var(--panel));
  display:grid;place-items:center;font:700 28px/1 Inter,Arial,sans-serif;color:var(--ac);
  overflow:hidden;
}
.mcp-detail-icon img{width:100%;height:100%;object-fit:cover}
.mcp-detail h3{margin:0;font-size:20px}
.mcp-detail p{margin:0;color:var(--mt);font-size:13px;line-height:1.6}
.mcp-detail-actions{margin-top:8px}
.mcp-panel{position:relative}
 
/* ========== Dual agents UI ========== */
.agent-switcher{
  display:flex;gap:8px;margin:0 0 14px;padding:4px;
  background:var(--panel-2,#f4f2f8);border-radius:12px;
}
.agent-slot-btn{
  flex:1;padding:10px 12px;border:0;border-radius:10px;
  background:transparent;color:var(--mt);font:650 12px Inter,Arial,sans-serif;cursor:pointer;
  transition:background .18s ease,color .18s ease;
}
.agent-slot-btn.active{background:var(--panel);color:var(--ac);box-shadow:0 1px 0 var(--bd)}
.agent-slot-btn:hover:not(.active){color:var(--tx)}
 
.agent-top-switch{
  display:flex;align-items:center;gap:4px;padding:3px;
  background:var(--panel);border:1px solid var(--bd);border-radius:999px;
}
.agent-top-btn{
  padding:5px 10px;border:0;border-radius:999px;
  background:transparent;color:var(--mt);font:650 11px Inter,Arial,sans-serif;cursor:pointer;
  max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  transition:background .15s ease,color .15s ease;
}
.agent-top-btn.active{background:var(--ac);color:#fff}
.agent-top-btn:hover:not(.active){color:var(--tx)}
.agent-top-btn[hidden]{display:none!important}
 
/* Better native fallback + select polish */
select{
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238b83a0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;background-size:14px;
  padding-right:30px!important;
}
.ps-btn{min-height:44px;border-radius:12px!important;font-size:13px!important}
.ps-menu{border-radius:14px;box-shadow:0 12px 40px #21153222}
.ps-option{padding:11px 12px;border-radius:10px;font-size:13px!important}
 
 
/* MCP panel must not break chat layout when closed */
#mcp-panel[hidden],
.mcp-panel[hidden]{display:none!important;height:0!important;overflow:hidden!important;pointer-events:none!important}
body:not(.mcp-open) #mcp-panel{display:none!important}
body.mcp-open .conversation-shell{visibility:hidden!important;pointer-events:none!important}
body.mcp-open #mcp-panel{display:flex!important;flex:1;min-height:0}
 
/* MCP overlay safety */
#mcp-panel[hidden],.mcp-panel[hidden],body:not(.mcp-open) #mcp-panel{display:none!important}
body.mcp-open #mcp-panel{display:flex!important;position:absolute;inset:0;z-index:25}
 
/* Privacy eye: blur custom agent names and chat titles */
.icon-button.privacy-toggle{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;margin-left:8px;font-size:15px;border-radius:9px}
.privacy-on .history-item-title,
.privacy-on #chat-title,
.privacy-on .agent-top-btn:not([data-mode="default"]),
.privacy-on.agent-custom-active #model-pill-name,
.privacy-on.agent-custom-active .message-row.assistant .message-label,
.privacy-on.agent-custom-active #live-assistant-label{filter:blur(6px);user-select:none;transition:filter .2s ease}
 
/* ==========================================================================
   3D buttons (light Duolingo-style): Send, Voice, New chat only.
   - settings.css forces `box-shadow:none!important` on everything, so the
     bottom edge is declared with !important + ID specificity to win.
   - Edge colours are darker shades of each button's existing face colour.
   ========================================================================== */
#send-message.send-button,
#voice-chat-button.voice-chat-button,
#new-chat.new-chat-button{
  --b3d-edge:#4b32a8;
  border-radius:14px;
  box-shadow:0 4px 0 var(--b3d-edge)!important;
  transform:none;
  transition:transform 80ms ease-out,box-shadow 80ms ease-out,background-color 80ms ease-out,opacity 80ms ease-out;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
/* Press: sink 3px, edge shrinks 4px -> 1px (bottom line stays put) */
#send-message.send-button:not(:disabled):active,
#voice-chat-button.voice-chat-button:not(:disabled):active,
#new-chat.new-chat-button:active{
  transform:translateY(3px);
  box-shadow:0 1px 0 var(--b3d-edge)!important;
}
/* Neutralise the old hover scale/lift so it can't fight the press */
#send-message.send-button:not(:disabled):hover,
#voice-chat-button.voice-chat-button:not(:disabled):hover,
#new-chat.new-chat-button:hover{transform:none}
#send-message.send-button:not(:disabled):active:hover,
#voice-chat-button.voice-chat-button:not(:disabled):active:hover,
#new-chat.new-chat-button:active:hover{transform:translateY(3px)}
#send-message.send-button:disabled{transform:none;opacity:.42}
#send-message.send-button:focus-visible,
#voice-chat-button.voice-chat-button:focus-visible,
#new-chat.new-chat-button:focus-visible{outline:2px solid var(--ac);outline-offset:3px}
 
/* Send (face colour stays var(--ac) from settings.css) */
#send-message.send-button{--b3d-edge:#4b32a8;color:#fff}
:root[data-theme="dark"] #send-message.send-button{--b3d-edge:#5a3dbf}
/* Stop state had a violet icon on a violet face (unreadable) -> white */
#send-message.send-button.stop-control,
:root[data-theme="dark"] #send-message.send-button.stop-control{color:#fff;border:0}
 
/* Voice */
#voice-chat-button.voice-chat-button{--b3d-edge:#b2a1e8}
#voice-chat-button.voice-chat-button.active,
:root[data-theme="dark"] #voice-chat-button.voice-chat-button.active{--b3d-edge:#4b32a8}
:root[data-theme="dark"] #voice-chat-button.voice-chat-button{background:#2f2848;border-color:#4a4160;--b3d-edge:#17112e}
:root[data-theme="dark"] #voice-chat-button.voice-chat-button.active{background:#7656d6;border-color:#7656d6;--b3d-edge:#4b32a8}
:root[data-theme="dark"] #voice-chat-button.voice-chat-button:not(:disabled):hover:not(.active){background:#382f58}
 
/* New chat (the entrance animation's `both` fill kept transform:none forever,
   which would block :active, so only fill backwards) */
#new-chat.new-chat-button{--b3d-edge:#b3a3e6;animation-fill-mode:backwards}
:root[data-theme="dark"] #new-chat.new-chat-button{background:#2f2848;border-color:#4a4160;--b3d-edge:#17112e}
:root[data-theme="dark"] #new-chat.new-chat-button:hover{background:#382f58}
 
/* Reduced motion: no transitions / pulse on these buttons */
@media (prefers-reduced-motion:reduce){
  #send-message.send-button,
  #voice-chat-button.voice-chat-button,
  #new-chat.new-chat-button,
  #send-message.send-button svg,
  #new-chat.new-chat-button .plus-icon{transition:none!important;animation:none!important}
}
/* Workspace task progress */
.chat-main{position:relative}
.workflow-panel{position:absolute;z-index:3;top:78px;right:16px;width:min(278px,calc(100vw - 32px));padding:15px;border:1px solid #e9e4f2;border-radius:15px;background:#ffffffed;box-shadow:0 12px 38px #30204416;backdrop-filter:blur(14px);color:#393447}
.workflow-panel[hidden]{display:none}
.workflow-panel-head{display:flex;align-items:center;gap:10px;padding-bottom:12px;border-bottom:1px solid #f0edf5}
.workflow-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:11px;background:#f0eafb;color:#7254d2}
.workflow-panel-head>div{display:flex;min-width:0;flex-direction:column;gap:4px}
.workflow-panel-head strong{font-size:12px}
.workflow-panel-head small{overflow:hidden;color:#898494;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.workflow-task-list{display:grid;gap:12px;margin:14px 0 0;padding:0;list-style:none}
.workflow-task{display:grid;grid-template-columns:18px 1fr;gap:8px;align-items:start;color:#918b9b;font-size:10px;line-height:1.5}
.workflow-task.is-active{color:#5d43b4;font-weight:650}
.workflow-task.is-complete{color:#605b69}
.workflow-task-mark{display:grid;place-items:center;width:17px;height:17px;border:1px solid #e6e1ed;border-radius:50%;font-size:9px}
.workflow-task.is-active .workflow-task-mark{border-color:#cfc2f1;color:#7254d2}
.workflow-task.is-complete .workflow-task-mark{border-color:#d5eadf;background:#eef8f2;color:#32845a}
.workflow-note{margin:14px 0 0;padding-top:10px;border-top:1px solid #f0edf5;color:#aaa5b3;font-size:9px;line-height:1.5}
:root[data-theme="dark"] .workflow-panel{border-color:#393342;background:#211e29ed;color:#eeeaf6}
:root[data-theme="dark"] .workflow-panel-head,:root[data-theme="dark"] .workflow-note{border-color:#393342}
:root[data-theme="dark"] .workflow-task.is-complete{color:#c3bdcf}
@media(max-width:1000px){.workflow-panel{top:auto;right:12px;bottom:12px;width:min(278px,calc(100vw - 24px));max-height:45vh;overflow:auto}}
.workflow-commands{margin-top:14px;padding-top:12px;border-top:1px solid #f0edf5}
.workflow-commands[hidden]{display:none}
.workflow-commands h3{display:flex;align-items:center;gap:7px;margin:0 0 9px;color:#65558a;font-size:10px;font-weight:700}
.workspace-command-list{display:grid;gap:9px}
.workspace-command-card{overflow:hidden;border:1px solid #e8e3ef;border-radius:10px;background:#fbfaff}
.workspace-command-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 9px;border-bottom:1px solid #e8e3ef;color:#514963;font-size:9px;font-weight:700}
.workspace-command-state{color:#8b8498;font-size:9px;font-weight:500}
.workspace-command-description{margin:8px 9px;color:#777183;font-size:9px;line-height:1.5}
.workspace-command-code,.workspace-command-output{display:block;max-height:130px;overflow:auto;margin:0;padding:9px;background:#211f27;color:#eeeaf6;font:9px/1.55 Consolas,"Courier New",monospace;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
.workspace-command-output{border-top:1px solid #393342;background:#17161b;color:#c8c3d1}
.workspace-command-output[hidden]{display:none}
.workspace-command-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:8px 9px}
.workspace-command-run{padding:6px 9px;border:1px solid #7254d2;border-radius:7px;background:#7254d2;color:#fff;font:600 9px/1.2 Inter,"Segoe UI",Arial,sans-serif;cursor:pointer}
.workspace-command-run:disabled{opacity:.55;cursor:wait}
.workflow-task.is-failed .workflow-task-mark{border-color:#e7b7b7;background:#fff1f1;color:#bd4545}
.workflow-task.is-blocked .workflow-task-mark{border-color:#e9d8ae;background:#fff9e9;color:#a37825}
:root[data-theme="dark"] .workflow-commands,:root[data-theme="dark"] .workspace-command-head{border-color:#393342}
:root[data-theme="dark"] .workspace-command-card{border-color:#393342;background:#25222e}
:root[data-theme="dark"] .workspace-command-head{color:#e2dced}
:root[data-theme="dark"] .workspace-command-description{color:#b1aabd}
:root[data-theme="dark"] .workspace-command-output{background:#141318}
:root[data-theme="dark"] .workflow-task.is-failed .workflow-task-mark{border-color:#75434b;background:#3b262a;color:#f29aa2}
:root[data-theme="dark"] .workflow-task.is-blocked .workflow-task-mark{border-color:#6e5b35;background:#332d20;color:#e2c075}
