:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#262736;background:#fafbfe;font-synthesis:none;--purple:#7866d5;--muted:#8b8b9b;--line:#e9eaf0;--sidebar:284px}*{box-sizing:border-box}body{margin:0;display:flex;height:100dvh;overflow:hidden}button,input,textarea,select{font:inherit}button,a,input,textarea,select,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #bcb2ec;outline-offset:4px}input:focus,textarea:focus,select:focus{outline:2px solid #c5bbee;outline-offset:1px}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.sidebar{width:var(--sidebar);flex-shrink:0;background:#f2f3f8;border-right:1px solid var(--line);padding:30px 22px 20px;display:flex;flex-direction:column;overflow-y:auto}.brand{display:flex;align-items:center;gap:11px;font-size:23px;font-weight:700;letter-spacing:-.7px}.brand-mark{width:40px;height:40px;border-radius:12px;background:var(--purple);color:white;display:grid;place-items:center;font-size:32px;box-shadow:0 4px 12px #7866d51a}.brand small{font-size:10px;font-weight:400;display:block;color:#9392a3;letter-spacing:1.4px;margin-top:3px}.new-chat{margin:30px 0 29px;border:1px solid #dcd8ed;border-radius:9px;padding:12px 13px;background:#fbfaff;color:#6f5fc0;text-align:left;font-size:13px;font-weight:600;display:flex;align-items:center;gap:8px}.new-chat>span{font-size:20px;line-height:16px}kbd{margin-left:auto;color:#a29bb7;font-family:inherit;font-size:10px;border:1px solid #e8e4f3;padding:2px 4px;border-radius:4px}.section-label{font-size:10px;color:#9293a3;letter-spacing:1px;font-weight:500;display:flex;justify-content:space-between;margin:0 0 15px}.section-label>span{letter-spacing:0;font-size:10px;color:#9b91c0}.settings label{display:block;font-size:11px;margin:15px 0 8px;color:#626274}.settings label:first-child{margin-top:0}input,select,.settings textarea{width:100%;border:1px solid #dfe0e9;background:#fcfcff;border-radius:7px;font-size:12px;padding:10px 11px;color:#464556}.settings input{height:39px}select{height:40px}.mini-label{float:right;color:#9d9baa;font-size:10px}.key-field{position:relative}.key-field input{padding-right:43px}.key-field button{position:absolute;right:5px;top:5px;height:29px;padding:0 6px;background:transparent;border:0;color:#8b81b2;font-size:10px}.field-help{font-size:10px;line-height:1.8;color:#9796a5;margin:7px 1px 0;overflow-wrap:anywhere}details{margin-top:19px}summary{font-size:11px;color:#8b889d;cursor:pointer}.settings textarea{resize:vertical;min-height:70px}.recent-label{margin-top:30px;margin-bottom:10px}.history{min-height:40px;flex:1}.history button{width:100%;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background:none;border:0;padding:10px 12px;margin-bottom:3px;font-size:12px;border-radius:7px;color:#898698}.history button.active{background:#e9e6f3;color:#72649f}.history button::before{content:"◌";margin-right:9px;color:#aaa3bf}.sidebar-footer{display:flex;gap:10px;align-items:center;padding-top:20px;margin-top:20px;border-top:1px solid #e4e4ed;color:#797789;font-size:11px}.privacy-icon{font-size:25px;color:#a2a0b1}.sidebar-footer small{display:block;margin-top:4px;font-size:9px;color:#a2a0ae}main{flex:1;min-width:0;display:flex;flex-direction:column;background:radial-gradient(ellipse at 52% 38%,#f2effd88,transparent 55%),#fdfdff}.topbar{height:78px;flex-shrink:0;padding:0 38px;border-bottom:1px solid #eeeef5;display:flex;align-items:center;justify-content:space-between;background:#ffffff88}.header-left,.header-right{display:flex;align-items:center;gap:15px}.workspace-title{font-size:12px;color:#626174}.divider{height:12px;width:1px;background:#dedde8}.provider-badge{font-size:10px;background:#eeecf6;border:1px solid #e5e0f1;color:#8b7cb4;padding:5px 8px;border-radius:5px}.service-status{font-size:10px;color:#94929f;display:flex;align-items:center;gap:6px}.service-status i{height:5px;width:5px;border-radius:50%;background:#aaa}.service-status.online i{background:#78ad9c}.text-button{background:none;border:0;color:#8f8b9f;font-size:11px;padding:8px}.conversation{overflow-y:auto;flex:1;scroll-behavior:auto}.welcome{max-width:840px;margin:0 auto;padding:43px 36px 24px;text-align:center}.eyebrow{font-size:9px;letter-spacing:2px;color:#aaa3be;display:flex;align-items:center;justify-content:center;gap:7px}.eyebrow>span{height:4px;width:4px;background:#b5a8d3;border-radius:50%}.hero-symbol{height:68px;width:68px;margin:32px auto 23px;background:linear-gradient(145deg,#fff,#ebe6fc);box-shadow:0 10px 35px #8f7bd01a,0 0 0 1px #fff inset;border:1px solid #e9e2fa;border-radius:22px;display:grid;place-items:center;font-size:53px;color:#9a87db;transform:rotate(-8deg);position:relative}.orbit-dot{position:absolute;width:9px;height:9px;background:#d5c2fa;right:-14px;top:9px;border-radius:3px;transform:rotate(30deg)}h1{font-size:43px;font-weight:600;line-height:1.45;letter-spacing:-1.5px;margin:0}h1 span{color:#8b77c7}.hero-description{color:#9994a6;font-size:12px;line-height:2;margin:17px 0 20px}.provider-strip{display:flex;justify-content:center;gap:22px;color:#9993a9;align-items:center;font-size:10px}.provider-strip span+span:before{content:"·";margin-right:22px;color:#d1cbdc}.prompt-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:38px;text-align:left}.prompt-card{border:1px solid #e9e6f1;border-radius:12px;background:#ffffffb8;padding:18px 15px;text-align:left;transition:transform .15s,border-color .15s}.prompt-card:hover{border-color:#bcb0df;transform:translateY(-3px)}.card-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;font-size:18px;margin-bottom:16px}.lavender{color:#9b8ac7;background:#f0ebfa}.peach{color:#c19d86;background:#faf0e8}.mint{color:#88a99c;background:#eaf4f0}.prompt-card strong{font-size:11px;font-weight:500;display:flex;justify-content:space-between;gap:7px;color:#6a637b}.prompt-card strong span{color:#b1a8c2}.prompt-card small{display:block;font-size:10px;color:#a8a2b3;margin-top:7px;line-height:1.6}.composer-area{width:100%;max-width:990px;align-self:center;padding:14px 50px 16px}.composer{border:1px solid #e0dce9;border-radius:14px;background:#fff;box-shadow:0 5px 25px #4d3c7210;padding:17px 18px 12px}.composer textarea{border:0;outline:none;resize:vertical;width:100%;min-height:48px;max-height:170px;font-size:13px;line-height:1.8;background:none;color:#4b445b}.composer textarea::placeholder{color:#b1abba}.composer-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:8px;gap:10px}.composer-bottom>span{font-size:10px;color:#a19aad;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:48%}.composer-bottom>div{display:flex;align-items:center;gap:15px}.keyboard-hint{font-size:9px;color:#b8b1c2}#send{width:32px;height:32px;border:0;background:var(--purple);color:white;border-radius:9px;font-size:23px;line-height:1}#send:disabled{background:#b7a7d8;opacity:.6}.disclaimer{margin:12px 0 0;text-align:center;font-size:9px;color:#b3acbd;line-height:1.6}.error{background:#fff1ef;color:#b54739;border:1px solid #f7d4ce;border-radius:8px;padding:10px 13px;margin-bottom:10px;font-size:12px;line-height:1.6}.busy-status{font-size:11px;color:#9b83c6;padding:0 5px 10px}.messages{max-width:870px;margin:auto;padding:25px 35px}.message{margin:18px 0 30px;display:flex;gap:13px}.avatar{flex-shrink:0;width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:#eee8fa;color:#9680c7;font-size:18px}.message.user .avatar{background:#edf0f4;color:#8e98a9;font-size:11px}.message-body{min-width:0;flex:1}.message-label{font-size:10px;color:#9e95ac;margin:7px 0 12px}.message-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.9;color:#514b5f}.message.user .message-content{background:#f1eef8;border:1px solid #e8e2f1;border-radius:2px 12px 12px 12px;padding:11px 15px}.message-tools{display:flex;gap:10px;align-items:center;margin-top:12px;font-size:9px;color:#aaa2b5}.message-tools button{background:transparent;border:0;padding:0;font-size:10px;color:#9b8bb8}.icon-button{border:0;background:none;color:#8b7f9f}.mobile-only{display:none}
@media(min-height:920px){.welcome{padding-top:70px}.hero-symbol{margin-top:45px}.prompt-grid{margin-top:48px}.composer-area{padding-bottom:25px}}
@media(max-width:1100px){:root{--sidebar:250px}.sidebar{padding:25px 18px 18px}.topbar{padding:0 24px}.welcome{padding:35px 25px 20px}h1{font-size:36px}.composer-area{padding:12px 25px}.prompt-card{padding:14px 11px}.keyboard-hint{display:none}.provider-strip{gap:10px}.provider-strip span+span:before{margin-right:10px}.hero-symbol{margin-top:22px}}
@media(max-width:760px){body{height:100dvh}.sidebar{position:fixed;inset:64px auto 0 0;z-index:5;width:280px;box-shadow:12px 0 30px #30244518;transform:translateX(-110%);transition:transform .2s}.sidebar.open{transform:translateX(0)}.mobile-only{display:block}.topbar{height:64px;padding:0 17px}.header-left{gap:10px}.header-right{gap:6px}.service-status{display:none}.workspace-title{font-size:11px}.text-button{font-size:10px}.welcome{padding:28px 18px 10px}.eyebrow{font-size:8px;letter-spacing:1.5px}.hero-symbol{width:54px;height:54px;font-size:44px;border-radius:17px;margin:25px auto 18px}h1{font-size:33px}.hero-description{font-size:11px;margin:13px 0 15px}.provider-strip{font-size:9px;gap:7px}.provider-strip span+span:before{margin-right:7px}.prompt-grid{gap:7px;margin-top:27px}.prompt-card{padding:13px 10px}.prompt-card strong{font-size:10px}.prompt-card small{font-size:9px}.card-icon{margin-bottom:13px}.composer-area{padding:10px 14px 12px}.composer{padding:12px 13px 10px}.disclaimer{font-size:8px;margin-top:8px}.messages{padding:12px 18px}.message-content{font-size:13px}.brand{font-size:21px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.history-row{display:flex;align-items:center;gap:3px;margin-bottom:3px}.history-row .history-chat{flex:1;min-width:0;margin:0}.history-row .delete-chat{width:28px;flex-shrink:0;padding:4px 0;margin:0;text-align:center;font-size:20px;color:#8c829e}.history-row .delete-chat::before{content:none}.history-row .delete-chat:hover{background:#f9e6e5;color:#ae554d}.history-empty{font-size:11px;line-height:1.8;color:#92909e;padding:0 6px}.deleted-notice{display:flex;align-items:center;justify-content:space-between;background:#e9e6f3;border-radius:7px;padding:10px 12px;font-size:11px;color:#72649f;margin-top:12px}.deleted-notice button{border:0;background:none;font-size:11px;color:#6552ac;padding:3px}
/* Model library */
.sidebar{--sidebar:310px;width:var(--sidebar);padding-top:22px}.new-chat{margin:22px 0 10px}.catalog-launch{display:flex;justify-content:space-between;align-items:center;background:#7866d5;color:white;border:0;border-radius:9px;padding:13px 12px;font-size:12px;margin-bottom:24px;flex-shrink:0}.catalog-launch span{font-size:10px;color:#e5defb}.settings>.text-button{padding:5px 0;font-size:10px;color:#7460bf}.task-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.task-row select{padding:8px 5px;font-size:11px}.field-help{color:#777486}.settings{flex-shrink:0}.task-controls{border:1px solid #e5dfef;background:#faf8fe;padding:12px 16px;border-radius:12px;margin-bottom:10px;max-height:220px;overflow:auto;font-size:11px}.task-controls p{margin:0 0 8px;line-height:1.7;color:#756d89}.task-controls label{display:block;color:#6f6781;font-size:11px}.task-controls textarea{width:100%;padding:10px;border:1px solid #ded6e8;border-radius:7px}.generation-options{display:flex;gap:10px;flex-wrap:wrap}.generation-options label{min-width:110px;flex:1}.generation-options select{margin:5px 0}.generated-media{max-width:100%;max-height:560px;display:block;border-radius:10px;margin-top:16px}audio.generated-media{width:100%}a.generated-media{color:#6b55b6;text-decoration:underline}dialog{color:#302b42;border:1px solid #e8e2f1;border-radius:20px;box-shadow:0 30px 100px #30254635;padding:0;background:#fcfbff}dialog::backdrop{background:#201a354d}#modelLibrary{width:min(1240px,96vw);height:min(900px,94dvh);max-width:none;max-height:none;overflow:hidden}#modelLibrary[open]{display:flex;flex-direction:column}.library-header{padding:26px 30px 20px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #eae5f0;background:linear-gradient(100deg,#f3effc,#fff)}.library-header .eyebrow{justify-content:flex-start;font-size:10px;letter-spacing:3px;color:#8d7db8}.library-header h2{font-size:25px;letter-spacing:-.6px;margin:7px 0 9px;font-weight:600}.library-header p{font-size:11px;color:#8c819c;margin:0}.library-layout{display:grid;grid-template-columns:225px 1fr;min-height:0;flex:1}.library-filters{background:#f6f3fa;padding:22px;overflow-y:auto;border-right:1px solid #eae5f0}.library-filters label{display:block;font-size:11px;color:#80748f;margin:14px 0 7px}.library-filters label:first-child{margin-top:0}.library-filters select,.library-filters input{background:#fff;border-color:#e5dfed;font-size:11px;height:38px}.catalog-notice{font-size:10px;line-height:1.8;color:#897d97;padding-top:12px;border-top:1px solid #e4dceb}.library-content{padding:20px 25px;overflow-y:auto}.library-results{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#a095ac;margin-bottom:17px;gap:10px}.library-results>span:first-child{color:#786791}.model-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.model-card{border:1px solid #e6dfef;background:white;border-radius:13px;padding:20px;display:flex;flex-direction:column;min-width:0;transition:border-color .15s}.model-card:hover{border-color:#b5a5d5}.model-kicker{font-size:10px;color:#9c88b6;letter-spacing:.3px}.model-card h3{font-size:16px;line-height:1.5;margin:9px 0 5px;font-weight:600;overflow-wrap:anywhere}.model-card code{font-size:10px;color:#a295af;overflow-wrap:anywhere}.model-intro{font-size:11px;line-height:1.9;color:#7c718a;margin:15px 0;flex:1}.model-tags{display:flex;flex-wrap:wrap;gap:5px}.model-tags span{font-size:9px;color:#8b779d;background:#f4eff9;padding:4px 6px;border-radius:4px}.model-tags .free-badge{background:#e8f5ed;color:#478561}.model-route{font-size:10px;line-height:1.6;color:#91839e;margin:14px 0}.model-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #eee7f4;padding-top:12px}.model-actions button,.pagination button{font-size:11px;border:0;border-radius:7px;padding:8px 10px;color:#8b79a4;background:#f3eef9}.model-actions button:last-child{color:#fff;background:#8b73bd}.pagination{display:flex;align-items:center;justify-content:center;gap:20px;padding:25px 0 5px;font-size:11px;color:#8c7c9e}.library-footer{border-top:1px solid #eae5f0;padding:13px 25px;font-size:10px;line-height:1.7;color:#9c8fa9;background:#faf8fd}.empty-models{grid-column:1/-1;padding:40px 20px;line-height:2;color:#8d7d9e;font-size:13px}#detailDialog{width:min(650px,94vw);max-height:90dvh;padding:26px;overflow:auto}.detail-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.detail-header h2{font-size:23px;margin:0;line-height:1.5;overflow-wrap:anywhere}#detailContent{font-size:12px;line-height:1.9;color:#7c6c8e}.detail-intro{margin:20px 0}#detailContent dl{display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;background:#f5f0fa;padding:18px;border-radius:10px}#detailContent dt{color:#9a88ac}#detailContent dd{margin:0;overflow-wrap:anywhere}#detailContent h3{font-size:13px;color:#665378;margin-top:23px}#detailContent pre{background:#f4f0f8;padding:14px;font-size:10px;overflow:auto;border-radius:8px}.detail-links{display:flex;gap:20px;flex-wrap:wrap;color:#7f61ac;text-decoration:underline;margin-top:20px}#useDetailModel{margin-bottom:0;padding:13px 18px;background:#8064b2;color:white}.price-table{width:100%;border-collapse:collapse;font-size:11px}.price-table td{padding:7px;border-bottom:1px solid #eee8f3}.price-table td:last-child{text-align:right;font-variant-numeric:tabular-nums}
@media(min-width:1300px){.model-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.library-header{padding:20px}.library-header h2{font-size:21px}.library-header p{line-height:1.8}.library-layout{display:block;overflow-y:auto}.library-filters{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px;padding:14px;border-bottom:1px solid #e8dff0}.library-filters label{margin:0;align-self:center}.library-filters .catalog-notice{grid-column:1/-1;margin:0}.library-content{padding:17px;overflow:visible}.model-cards{grid-template-columns:1fr}.library-results{align-items:flex-start;font-size:10px}.library-footer{padding:10px 17px}.sidebar{width:310px}.task-controls{max-height:170px}.detail-header h2{font-size:19px}#detailContent dl{grid-template-columns:80px minmax(0,1fr)}}
.advanced-panel{background:#fff;border:1px solid #e4dcee;border-radius:14px;padding:18px 20px;margin:8px 0 12px;max-height:62dvh;overflow:auto;color:#766883;font-size:12px}.panel-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-title h2{margin:0;font-size:17px;color:#635273}.panel-title span{font-size:10px;color:#9988aa}.advanced-panel p{font-size:11px;line-height:1.8}.advanced-panel label{display:block;font-size:11px;margin:12px 0 6px}.advanced-panel textarea{width:100%;padding:12px;resize:vertical;min-height:90px;border:1px solid #e1d8eb;border-radius:8px;font-size:12px;color:#51445f;background:#fdfbff}.panel-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.panel-actions button,.batch-recovery button{border:1px solid #e5dcee;background:#f6f0fb;color:#81679d;border-radius:7px;padding:9px 12px;font-size:11px}.panel-actions button:first-child{color:white;background:#8970ba;border-color:#8970ba}.batch-recovery{display:flex;gap:8px}.batch-recovery input{flex:1;min-width:0}.batch-recovery button{white-space:nowrap}.batch-job{border:1px solid #e8e0f0;border-radius:9px;padding:13px;margin-top:12px}.batch-job-title{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.batch-job-title code{font-size:10px;overflow-wrap:anywhere}.batch-job-title strong{color:#7f62a4}.batch-job p{margin:7px 0}.batch-job details{margin-top:10px}.batch-job pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:250px;overflow:auto;background:#f8f5fb;padding:12px;font-size:11px;border-radius:6px}.batch-jobs{max-height:380px;overflow:auto}#batchNotice,#realtimeNotice{font-size:11px;line-height:1.8;color:#9474ad}#realtimeState{color:#8b6bb0}#endRealtime{color:#a56475}#recordRealtime:not(:disabled){background:#8e72be;color:white;border-color:#8e72be}@media(max-width:760px){.advanced-panel{padding:12px;max-height:60dvh}.panel-title{align-items:flex-start;flex-direction:column}.batch-jobs{max-height:260px}.panel-actions button{padding:8px;font-size:10px}.batch-recovery{flex-wrap:wrap}.batch-recovery input{width:100%;flex-basis:100%}}

.settings-button {width:100%;display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid #ddd9ee;border-radius:10px;background:#f7f5ff;color:#6551a4;margin:8px 0;cursor:pointer;font:inherit;font-size:12px}
.settings-button span{font-size:11px;color:#807a90}

/* Keep native trackpad scrolling inside each pane, without scroll chaining or backdrop blur. */
main,.conversation,.sidebar,.library-content,.library-filters{min-height:0}
.sidebar,.conversation,.library-filters,.library-content,#detailDialog,.task-controls,.advanced-panel,.batch-jobs,.result-details pre{overscroll-behavior-y:contain;scrollbar-gutter:stable}
.conversation{background:#fdfdff}
.library-content{background:#fcfbff}
@media(max-width:760px){.library-layout{overscroll-behavior-y:contain;scrollbar-gutter:stable}.library-content,.library-filters{overflow:visible;scrollbar-gutter:auto}}

/* Full, selectable addresses stay readable without horizontal scrolling. */
.current-api{margin-top:18px;padding:14px 10px;border:1px solid #e5e6ef;border-radius:12px;background:#fff;display:grid;gap:8px;min-width:0}
.current-api .section-label{margin:0;padding:0;font-size:10px}
.current-api a{font-size:11px;line-height:1.7;color:#6450a2;overflow-wrap:anywhere;word-break:break-word}
.current-api .text-button{text-align:left;padding:2px 0;font-size:12px}
#apiDialog{width:min(820px,calc(100vw - 32px));max-height:88dvh;overflow-y:auto;overscroll-behavior:contain;padding:28px;border:1px solid #e5e6ef;border-radius:22px;background:#fff;color:#292735}
.api-explanation,.api-note{font-size:13px;line-height:1.8;color:#727080}
.api-directory-title{margin-top:30px}
.api-address{margin:14px 0;padding:12px 14px;background:#f7f7fb;border:1px solid #ededf5;border-radius:10px;min-width:0}
.api-address-heading{display:flex;align-items:center;gap:10px;margin-bottom:7px;font-size:12px;color:#6b667e}
.api-method{padding:2px 6px;border-radius:4px;background:#ebe7f6;color:#654c9b;font-size:10px}
.api-address-line{display:flex;align-items:flex-start;gap:12px;min-width:0}
.api-address-line a,.api-address-line code{min-width:0;flex:1;color:#5d429c;font:12px/1.8 ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere;word-break:break-word;user-select:text}
.api-address-line button{flex-shrink:0;background:#fff;border:1px solid #ddd9ec;border-radius:6px;padding:4px 8px;color:#64547f;font-size:11px;cursor:pointer}
.api-address small{display:block;margin-top:6px;color:#787187;font-size:11px}
.api-platform{border-top:1px solid #eceaf2;padding:15px 0}
.api-platform summary{cursor:pointer;font-size:14px;font-weight:600;line-height:1.8}
.api-platform summary span{display:block;color:#85808f;font-weight:400;font-size:12px;margin-left:17px;overflow-wrap:anywhere}
.reply-typing::after{content:'▍';color:#8c74c0;margin-left:2px;font-size:.85em}
.reply-warning{font-size:12px;color:#9b6b30;margin-top:12px;line-height:1.7}
.message-content{direction:ltr;text-align:start}
.reveal-now{color:#76618f}
@media(max-width:600px){#apiDialog{padding:20px}.api-address-line{gap:6px}.api-address{padding:10px}.api-address-line a,.api-address-line code{font-size:11px}}

.model-access{padding:12px;margin:10px 0;border:1px solid #e8d5b0;background:#fff8ea;border-radius:10px;font-size:12px;line-height:1.7;color:#73572d}
.model-access p{margin:8px 0}.model-access a{display:block;overflow-wrap:anywhere;color:#6e5297;font-size:11px}.model-access button{margin-top:10px;padding:7px 10px;border:1px solid #d8c29b;border-radius:7px;background:#fff;color:#73572d;cursor:pointer}.model-tags .restricted-badge{background:#fff2d9;color:#8c6229}

/* Source viewer stays closed until explicitly opened, with an independent scroll area. */
.official-notice{display:inline-block;color:#5255a0;background:#eeedfa;border-radius:20px;padding:6px 12px;font-size:12px;margin:0 0 8px}
#sourceDialog{width:min(1040px,94vw);max-height:90dvh;padding:24px;overflow:auto}
.source-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0 8px}
.source-toolbar label{font-size:13px;font-weight:600}
.source-toolbar select{flex:1;min-width:180px;max-width:100%;padding:9px;border:1px solid #dedfeb;border-radius:8px;background:white}
.source-toolbar button{padding:9px 12px;border:1px solid #dedfeb;border-radius:8px;background:#f7f7fc;cursor:pointer}
.source-code{height:42dvh;min-height:180px;overflow:auto;overscroll-behavior:contain;white-space:pre;background:#181e30;color:#e2e9f7;border-radius:12px;padding:18px;font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;tab-size:4}
.source-code:focus-visible{outline:2px solid #6b64bf;outline-offset:3px}
.source-hash{font:11px/1.5 ui-monospace,monospace;overflow-wrap:anywhere;color:#6d7284}
#sourceStatus{font-size:12px;color:#60677c}.source-route{padding:12px;background:#f7f7fc;border-radius:10px}
@media(max-width:600px){#sourceDialog{padding:16px}.source-toolbar select{flex-basis:100%}.source-code{padding:12px}}
#sourceDialog[open]{display:flex;flex-direction:column;height:90dvh;box-sizing:border-box}
#sourceDialog .detail-header{flex-shrink:0;margin-bottom:8px}
#sourceDialog .api-explanation{flex-shrink:0;margin:6px 0 12px;font-size:13px}
#sourceDialog .source-route{flex-shrink:0;max-height:148px;overflow:auto;overscroll-behavior:contain}
#sourceDialog .source-toolbar{flex-shrink:0;margin:12px 0 4px}
#sourceDialog #sourceStatus{flex-shrink:0;margin:6px 0}
#sourceDialog .source-hash{flex-shrink:0;margin:2px 0 6px}
#sourceDialog .source-code{flex:1;min-height:120px;height:auto;margin:0}

/* Connection setup and persistence controls use normal document flow. */
.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}
.connection-compact{display:grid;gap:10px;margin:18px 0 12px}
#connectionSummary{font-size:12px;line-height:1.5;color:#4e4860;overflow-wrap:anywhere}
#connectProvider{padding:10px 12px;border:1px solid #d9d3eb;border-radius:10px;background:#f0ecfa;color:#564182;font-weight:600;cursor:pointer}
#connectionSettings{border-top:1px solid #e8e5ee;border-bottom:1px solid #e8e5ee;padding:12px 0}
#connectionSettings>summary{cursor:pointer;font-size:12px;font-weight:600;line-height:1.7;list-style-position:inside}
#connectionState{float:none;margin-left:6px;font-size:10px;font-weight:400;color:#787184;white-space:nowrap}
#connectionSettings .settings{margin-top:16px}
.save-history{display:flex;gap:8px;align-items:flex-start;font-size:12px;line-height:1.6;cursor:pointer}
.save-history input{margin:3px 0 0;accent-color:#7960ab;flex-shrink:0}
.storage-help{font-size:11px;line-height:1.65;color:#86808e;margin:7px 0}
#storageStatus{font-size:11px;margin:4px 0 14px}
.language-control select{font:inherit;font-size:12px;padding:7px 22px 7px 9px;border:1px solid #dedbe8;border-radius:8px;background:#fff;color:#4e465e;max-width:112px}
#setupDialog{width:min(600px,92vw);max-height:90dvh;padding:30px;overflow:auto}
#setupDialog h2{font-size:24px;margin:8px 0 0;letter-spacing:-.6px}
#setupDialog p{font-size:14px;line-height:1.8;color:#686174}
#setupDialog .field-help{font-size:12px;overflow-wrap:anywhere}
#setupDialog label{display:block;font-size:12px;font-weight:600;margin:16px 0 8px}
#setupDialog select,#setupKey{width:100%;padding:12px;border:1px solid #ded9e9;border-radius:9px;background:#fff;font:inherit;font-size:14px;min-width:0}
#setupDialog .key-field input{padding-right:64px}
#setupDialog a{color:#6a4e9c;font-size:14px}
.setup-steps{display:flex;gap:8px;list-style:none;padding:0;margin:24px 0}
.setup-steps li{flex:1;font-size:12px;line-height:1.6;color:#898290;padding:10px 8px;border-bottom:2px solid #e8e4ef}
.setup-steps .active{color:#654a96;border-color:#9378be;font-weight:600}
.setup-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:28px;border-top:1px solid #eeeaf3;padding-top:20px}
.setup-actions>div{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.setup-actions button,#checkConnection{border:1px solid #ded8e9;border-radius:8px;padding:10px 14px;font:inherit;font-size:13px;background:#faf9fc;cursor:pointer}
.setup-actions #setupNext,.setup-actions #finishSetup{color:#fff;background:#745499;border-color:#745499}
.setup-actions .text-button{border:0;background:transparent;padding:8px 0}
#setupCheckStatus{padding:12px;background:#f4f1f9;border-radius:10px}
#setupDialog .setup-model{font-weight:600;color:#544565}
html[lang=en] .welcome h1{font-size:clamp(34px,4.2vw,60px);letter-spacing:-2px;line-height:1.12}
html[lang=en] .prompt-card strong{font-size:14px}
html[lang=en] .prompt-card small{font-size:11px}
@media(max-width:800px){.header-right{gap:8px}.header-right .service-status{display:none}.topbar{gap:8px}.workspace-title{font-size:13px}.provider-badge{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media(max-width:600px){#setupDialog{padding:22px}.setup-steps{gap:4px}.setup-steps li{font-size:11px;padding:8px 4px}.setup-actions{align-items:flex-end}.header-right #exportChat{font-size:0}.header-right #exportChat::after{content:'↗';font-size:18px}html[lang=en] .welcome h1{font-size:36px;letter-spacing:-1.3px}.header-left .divider{display:none}}

.save-history input{width:15px;height:15px;padding:0;flex:0 0 15px}
#setupDialog .setup-language{display:flex;justify-content:flex-end;align-items:center;gap:10px;color:#7f748d;font-weight:400}
#setupDialog .setup-language select{width:112px;padding:6px 9px;font-size:12px;height:34px}
.search-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-bottom:12px;color:#69617d;font-size:11px}.search-controls label{display:flex;align-items:center;gap:5px}.search-controls input{width:auto;height:auto;margin:0}.search-controls small{color:#8b829b}.message-content{white-space:normal}.message-content p{margin:.5em 0}.message-content pre{white-space:pre;overflow:auto;padding:12px;background:#f2eff8;border-radius:8px}.message-content code{background:#f2eff8;border-radius:3px;padding:1px 3px}.message-content pre code{padding:0}.message-content table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse}.message-content th,.message-content td{border:1px solid #ded9eb;padding:6px 10px}.message-content a{color:#6550be;text-decoration:underline;overflow-wrap:anywhere}.message-content blockquote{border-left:3px solid #c7bce8;margin:1em 0;padding-left:12px}.web-citations{display:flex;flex-direction:column;gap:4px;margin-top:1em;font-size:12px}

.message.user .message-content{white-space:pre-wrap}

#accountDialog{border:1px solid #ddd6ef;border-radius:16px;padding:26px;max-width:420px;width:calc(100% - 40px);box-shadow:0 18px 70px #31225a33;color:#403a50}#accountDialog::backdrop{background:#201b3066}#accountDialog h2{margin:0 0 12px}#accountDialog p{font-size:13px;line-height:1.7;color:#716982}#accountDialog a{color:#6b55bd;text-decoration:underline}#accountDialog label{display:block;margin:15px 0;font-size:12px}#accountDialog label input{display:block;margin-top:6px}#accountDialog button{border:0;border-radius:8px;padding:10px 16px;margin:4px 8px 0 0;cursor:pointer}#accountSubmit{background:#7866d5;color:white}#accountError{color:#b54739!important}

#accountSettings{border:1px solid #ddd6ef;border-radius:16px;padding:26px;max-width:440px;width:calc(100% - 40px);max-height:85vh;overflow:auto;color:#403a50}#accountSettings::backdrop{background:#201b3066}#accountSettings label{display:block;margin:12px 0;font-size:12px}#accountSettings input,#accountSettings select{display:block;margin-top:6px}#accountSettings button{border:0;border-radius:8px;padding:10px 16px;cursor:pointer}#accountSettings h3{margin-top:20px}

#libraryDialog,#importDialog{border:1px solid #ddd6ef;border-radius:16px;padding:26px;max-width:720px;width:calc(100% - 40px);max-height:85vh;overflow:auto;color:#403a50}#libraryDialog::backdrop,#importDialog::backdrop{background:#201b3066}.file-row{display:flex;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #eee;flex-wrap:wrap}.file-row label{flex:1;min-width:200px}.file-row input,#importCheck{width:auto;height:auto}.file-row button,#libraryDialog button,#importDialog button{padding:8px;border:0;border-radius:6px;cursor:pointer}

.reasoning-block{margin:4px 0 12px;color:#817499;font-size:12px}.reasoning-heading{cursor:pointer}.reasoning-text{white-space:pre-wrap;border-left:2px solid #d9d0ec;padding-left:10px;margin-top:6px}.thinking-active .reasoning-heading{animation:reasoning-pulse 1.4s ease-in-out infinite}@keyframes reasoning-pulse{50%{opacity:.45}}@media (prefers-reduced-motion:reduce){.thinking-active .reasoning-heading{animation:none}}

.keyring-row{display:flex;align-items:center;gap:8px;border-bottom:1px solid #eee;padding:9px 0}.keyring-row span{flex:1;overflow-wrap:anywhere}.keyring-row button{font-size:12px}

.thinking-active .reasoning-heading{position:relative;display:inline-flex;align-items:center;gap:7px;animation:none}.thinking-active .reasoning-heading::before{content:"";width:10px;height:10px;border-radius:50%;background:#806add;box-shadow:0 0 0 4px #c7b9f2;animation:murmwick-think 1.2s ease-in-out infinite}.thinking-active .reasoning-heading::after{content:"···";font-weight:bold;letter-spacing:3px;animation:murmwick-dots 1.1s ease-in-out infinite}@keyframes murmwick-think{0%,100%{transform:scale(.8);box-shadow:0 0 0 3px #c7b9f288}50%{transform:scale(1.2);box-shadow:0 0 0 7px #c7b9f233}}@keyframes murmwick-dots{0%,100%{opacity:.3}50%{opacity:1}}@media (prefers-reduced-motion:reduce){.thinking-active .reasoning-heading::before,.thinking-active .reasoning-heading::after{animation:none}}

.google-suggestions{display:block;width:100%;height:100px;border:0;margin:8px 0}.search-used{font-size:11px;color:#766ab2}

.history-row .rename-chat{width:28px;flex:0 0 28px;padding:4px 0;margin:0;text-align:center;font-size:14px;color:#8c829e}.history-row .rename-chat::before{content:none}.history-row .rename-chat:hover{background:#e9e6f3;color:#72649f}

.cookie-settings-link {
  display: block;
  border: 0;
  background: none;
  color: #695597;
  font: inherit;
  font-size: 11px;
  padding: 8px 0 0;
  text-align: left;
}
.cookie-settings-link:hover { text-decoration: underline; }
.cookie-notice {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  width: min(520px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 18px 20px;
  border: 1px solid #e2ddef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px #2923492b;
  color: #4b445b;
}
.cookie-notice h2 { margin: 0 0 6px; font-size: 1rem; }
.cookie-notice p, .cookie-notice small { margin: 0; font-size: .8rem; line-height: 1.5; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 12px; }
.cookie-notice button {
  padding: .55rem .8rem;
  border: 1px solid #5d498e;
  border-radius: 8px;
  background: #634f95;
  color: #fff;
  font-size: .8rem;
}
.cookie-notice button:hover { background: #52407d; }
.cookie-notice .cookie-customize { border-color: #d8cee8; background: #fff; color: #5d498e; }
.cookie-notice .cookie-customize:hover { background: #f1ebf8; }
.cookie-notice fieldset { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
.cookie-notice legend { padding: 0; font-size: .8rem; font-weight: 600; }
.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0 10px;
  border-bottom: 1px solid #eee8f3;
  font-size: .8rem;
}
.cookie-category strong, .cookie-category small { display: block; }
.cookie-category input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: #634f95; }
.cookie-required { flex: none; color: #5e5175; }
#saveCookieSettings { margin-top: 10px; }
#cookieStatus { margin-top: 10px; }
@media (max-width: 600px) {
  .cookie-notice { right: 10px; bottom: 10px; width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 14px; }
}

/* File storage status and pagination */
.server-badge{white-space:nowrap;font-size:10px;font-weight:600;padding:4px 7px;border:1px solid #ded8ec;border-radius:5px;color:#75648f;background:#f6f2fc}
.file-library-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;font-size:11px;color:#81728f}.file-library-pagination span{text-align:center}.file-library-pagination button{white-space:nowrap}#fileLibrarySelection{font-size:11px;color:#81728f}
@media(max-width:520px){.server-badge{font-size:9px;padding:3px 5px}.header-left{gap:6px}.header-left .workspace-title,.header-left .divider{display:none}.file-library-pagination{gap:5px;font-size:10px}.file-library-pagination button{font-size:10px}}

.cluster-unavailable{padding:12px 18px;background:#fff3df;color:#7b4a0f;border-bottom:1px solid #e8d4af;font-size:13px;text-align:center}

/* The visible connection indicator is confirmed application identity, not catalog readiness. */
.header-right .service-status{display:none}
.topbar{height:auto;min-height:78px;padding-top:12px;padding-bottom:12px;gap:12px;flex-wrap:wrap}
.header-left{min-width:0}.header-right{margin-left:auto;justify-content:flex-end;flex-wrap:wrap;gap:10px}#accountButton{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.server-badge{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-size:11px;font-weight:400;padding:0;border:0;border-radius:0;color:#696b78;background:none;line-height:1.5}
.server-badge::before{content:"";flex:none;width:6px;height:6px;border-radius:50%;background:#9ba0ac}
.server-badge.is-connected::before{background:#34856b;animation:server-identity-breathe 3.2s ease-in-out infinite}
.language-toggle,#setupDialog .setup-language .language-toggle{appearance:none;border:0;border-radius:0;box-shadow:none;background:none;color:#6e637e;font:inherit;font-size:12px;font-weight:400;padding:8px 0;min-height:36px;cursor:pointer;line-height:1.5}
.language-toggle:hover{text-decoration:underline;text-underline-offset:3px}
.language-toggle:focus-visible{outline:2px solid #9c89ce;outline-offset:4px}
#setupDialog .setup-language{display:flex;justify-content:flex-end;margin:8px 0}
@keyframes server-identity-breathe{0%,100%{opacity:1}50%{opacity:.32}}
@media(max-width:1000px){.topbar{align-items:flex-start}.header-right{gap:8px}.service-status{display:none}}
@media(max-width:760px){.topbar{min-height:64px;padding:10px 17px;gap:6px}.header-right{min-width:0}.header-right .server-badge{font-size:10px}.language-toggle{font-size:11px}.topbar{position:relative;z-index:6}}
@media(max-width:520px){.topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center}.header-left{grid-column:1/3;grid-row:1;gap:6px}.header-right{display:contents}.header-right .server-badge{grid-column:3/5;grid-row:1;justify-self:end;font-size:10px}.header-right .language-toggle{grid-column:1;grid-row:2;justify-self:start}.header-right #accountButton{grid-column:2;grid-row:2;justify-self:start;max-width:100%;min-width:0}.header-right #accountLogout{grid-column:3;grid-row:2;justify-self:end}.header-right #exportChat{grid-column:4;grid-row:2;justify-self:end}.header-left .provider-badge{display:none}}
@media(prefers-reduced-motion:reduce){.server-badge.is-connected::before{animation:none}}

/* Quiet, bounded interaction feedback. No continuous animation work. */
.prompt-card,.model-card{position:relative;transition:border-color 160ms ease,box-shadow 160ms ease,transform 160ms ease}
@media (hover:hover) and (pointer:fine){.prompt-card:hover,.model-card:hover{border-color:#b9b0dc;box-shadow:0 5px 20px #74639212;background-image:radial-gradient(circle 180px at var(--sense-x,50%) var(--sense-y,50%),#b9a8e812,transparent);background-attachment:fixed}}
button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid #8872c7;outline-offset:3px}
button:active:not(:disabled){transform:translateY(1px)}
@media(prefers-reduced-motion:reduce){.prompt-card,.model-card,button{transition:none!important;animation:none!important;transform:none!important;background-image:none!important}}

.session-notice:not([hidden]){position:fixed;z-index:10000;top:1rem;left:50%;transform:translateX(-50%);padding:.65rem 1rem;border:1px solid #ded8ed;border-radius:.7rem;background:#fff;color:#39334a;box-shadow:0 .4rem 1.5rem #30294c26;max-width:calc(100vw - 2rem);text-align:center}

#providerRequestHistory:has(> section[hidden]){display:none}

.account-disclosure{margin:.75rem 0}
.account-disclosure>summary{display:inline-flex;align-items:center;gap:.4rem;list-style:none;padding:.42rem .7rem;border:1px solid #ded6eb;border-radius:.55rem;background:#f4f0f9;color:#51456a;font-size:.8rem}
.account-disclosure>summary::-webkit-details-marker{display:none}
.account-disclosure>summary::before{content:"▸"}
.account-disclosure[open]>summary::before{content:"▾"}

.memory-summary{white-space:pre-wrap;overflow-wrap:anywhere;padding:.65rem .75rem;background:#f3eef9;border-radius:.55rem}

.reasoning-control {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border: 1px solid #e0d8ed;
  border-radius: 50%;
  background: #faf8fd;
  color: #675292;
}
.reasoning-control:not(:has(select:disabled)):hover,
.reasoning-control[data-custom="true"] { background: #ede6f7; border-color: #bfaedb; }
.reasoning-control:focus-within { outline: 2px solid #8872c7; outline-offset: 2px; }
.reasoning-control:has(select:disabled) { opacity: .5; }
.reasoning-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.reasoning-control select:disabled { cursor: default; }
.reasoning-control[data-chat-mode="true"] {
  width: auto;
  height: auto;
  border-radius: .55rem;
}
.reasoning-control[data-chat-mode="true"] .reasoning-mark { display: none; }
.reasoning-control[data-chat-mode="true"] select {
  position: static;
  width: auto;
  height: 2.125rem;
  opacity: 1;
  padding: 0 .6rem;
  border: 0;
  background: transparent;
  color: inherit;
}
.reasoning-mark {
  display: grid;
  place-items: center;
  width: .92rem;
  height: .92rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.reasoning-mark::after {
  content: "";
  width: .3rem;
  height: .3rem;
  border-radius: 50%;
  background: currentColor;
}
