:root{--ink:#202526;--muted:#747d7f;--line:#e1e6e6;--surface:#fff;--panel:#f6f8f8;--accent:#087e79;--accent-hover:#066862;--danger:#c34044;--viewport-height:100dvh;font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--surface);font-size:14px;letter-spacing:0;color-scheme:light}
*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit;letter-spacing:0}button{cursor:pointer}button:disabled{cursor:default;opacity:.42}button,input,textarea{touch-action:manipulation}button{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button svg,i[data-lucide]{width:18px;height:18px;flex-shrink:0;stroke-width:1.7}button svg{pointer-events:none}[hidden]{display:none!important}h1,h2,h3,p{margin:0}a{color:var(--accent)}input,textarea{min-width:0}button{border:0;background:transparent}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:6px;flex-shrink:0}.icon-button:hover{background:#e9eeee}.icon-button:disabled:hover{background:transparent}.app-shell{height:var(--viewport-height);min-height:280px;display:grid;grid-template-columns:272px minmax(0,1fr);overflow:hidden}.sidebar{background:var(--panel);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;min-width:0;padding:24px 16px 0}.sidebar-heading{display:flex;align-items:center;justify-content:space-between;margin:0 8px 27px}.brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none;font-size:20px;font-weight:650;line-height:1.15}.brand-caption{display:block;font-size:11px;font-weight:450;color:var(--muted);margin-top:3px}.new-chat{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:42px;background:var(--ink);color:#fff;border-radius:6px;font-weight:600}.new-chat:hover{background:#353f40}.search-field{height:36px;display:flex;gap:8px;align-items:center;border:1px solid var(--line);background:var(--surface);border-radius:6px;padding:0 10px;margin:20px 0 22px}.search-field svg{width:15px;height:15px;color:var(--muted)}.search-field input{background:none;border:0;outline:none;width:100%;font-size:12px}.list-heading{font-size:11px;color:var(--muted);font-weight:600;padding:0 10px 12px}.conversation-list{flex:1;overflow:auto;min-height:0;margin:0 -4px;padding:0 4px 12px;scrollbar-width:thin}.conversation-row{display:flex;align-items:center;border-radius:5px;min-height:41px;margin-bottom:3px}.conversation-row:hover{background:#e9eeee}.conversation-row.active{background:#e0ebea}.conversation-select{display:flex;gap:10px;align-items:center;min-width:0;text-align:left;flex:1;padding:11px 10px;font-size:13px}.conversation-select svg{width:15px;height:15px;color:var(--muted)}.conversation-select span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conversation-tools{display:none;padding-right:3px}.conversation-tools .icon-button{width:28px;height:30px}.conversation-tools svg{width:14px;height:14px}.conversation-row:hover .conversation-tools,.conversation-row:focus-within .conversation-tools,.conversation-row.active .conversation-tools{display:flex}.list-empty{font-size:12px;color:var(--muted);padding:15px 10px;line-height:1.6}.sidebar-footer{display:flex;align-items:center;gap:2px;border-top:1px solid var(--line);padding:17px 0 max(17px,env(safe-area-inset-bottom))}.account{display:flex;align-items:center;gap:9px;flex:1;min-width:0}.account-avatar{width:31px;height:31px;background:#dce6e5;display:grid;place-items:center;border-radius:50%;font-size:11px;font-weight:650;color:#386360;flex-shrink:0}.account>div{min-width:0}.account strong,.account span:not(.account-avatar){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account strong{font-size:12px;font-weight:600}.account span:not(.account-avatar){font-size:11px;color:var(--muted);margin-top:3px}.chat-main{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative}.chat-header{display:flex;align-items:center;gap:12px;height:76px;flex-shrink:0;padding:0 30px;border-bottom:1px solid var(--line);background:var(--surface);z-index:1}.chat-heading{min-width:0;flex:1}.chat-heading h1{font-size:15px;line-height:22px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chat-heading #model-status{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted);margin-top:3px}.status-dot{width:6px;height:6px;border-radius:50%;background:#acb4b5;flex-shrink:0}#model-status[data-state="READY"] .status-dot{background:var(--accent)}#model-status[data-state="ERROR"] .status-dot{background:var(--danger)}.header-actions{display:flex;gap:2px}.header-actions .icon-button{color:#788283}.connection-banner{font-size:12px;line-height:1.5;padding:10px 30px;background:#f0f6f5;color:#366561;border-bottom:1px solid #d8e8e6;flex-shrink:0;overflow-wrap:anywhere}.conversation-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding:24px}.messages{width:min(100%,832px);margin:0 auto;padding:28px 40px 12px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100%;padding:50px 24px}.empty-state img{margin-bottom:17px}.empty-state h2{font-size:24px;font-weight:650;line-height:1.3}.empty-state p{font-size:14px;color:var(--muted);margin-top:10px}.message{padding:16px 0 24px;overflow-wrap:anywhere}.message+.message{border-top:1px solid #eef1f1}.message-header{display:flex;align-items:center;gap:9px;margin-bottom:12px;font-size:12px;font-weight:600}.message-avatar{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;font-size:10px;background:#e7eded;color:#637071}.assistant .message-avatar{background:#dfeeed;color:#13736d}.message-content{font-size:14px;line-height:1.75;color:#303738}.user .message-content{white-space:pre-wrap}.message-content p{margin:0 0 14px}.message-content p:last-child{margin-bottom:0}.message-content h1,.message-content h2,.message-content h3,.message-content h4,.message-content h5,.message-content h6{margin:20px 0 10px;line-height:1.5;font-weight:650;font-size:17px}.message-content h1{font-size:21px}.message-content h2{font-size:19px}.message-content ul,.message-content ol{padding-left:25px;margin:8px 0 14px}.message-content li{padding-left:3px}.message-content blockquote{border-left:3px solid #b9d9d5;margin:12px 0;padding:3px 16px;color:#667575}.message-content code{font-family:Consolas,"Courier New",monospace;font-size:12px;background:#f0f3f3;border-radius:3px;padding:2px 4px;word-break:break-word}.message-content pre{position:relative;background:#f4f6f6;border:1px solid var(--line);border-radius:5px;padding:39px 16px 16px;margin:14px 0;overflow:auto;max-width:100%;line-height:1.65;white-space:pre}.message-content pre code{padding:0;background:none;word-break:normal}.code-copy{position:absolute;top:5px;right:7px;width:30px;height:28px;color:#7a8586;display:grid;place-items:center;border-radius:4px}.code-copy:hover{background:#e5ebeb}.code-copy svg{width:14px;height:14px}.table-scroll{overflow:auto;margin:12px 0;max-width:100%}.message-content table{border-collapse:collapse;min-width:260px;font-size:12px}.message-content th,.message-content td{text-align:left;padding:8px 11px;border:1px solid var(--line)}.message-content th{background:#f3f6f6}.message-content hr{border:0;border-top:1px solid var(--line);margin:20px 0}.message-actions{display:flex;align-items:center;gap:5px;margin:8px 0 -5px;color:var(--muted)}.message-actions .icon-button{width:29px;height:29px}.message-actions svg{width:14px;height:14px}.message-status{font-size:11px;line-height:1.5}.message-status.error{color:var(--danger)}.request-details,.reasoning-details{font-size:12px;margin:12px 0;color:var(--muted)}summary{cursor:pointer;line-height:1.6}.reasoning-content{white-space:pre-wrap;line-height:1.65;margin-top:9px;border-left:2px solid #dbe5e4;padding:5px 12px;color:#647271}.request-details dl{display:grid;grid-template-columns:145px minmax(0,1fr);gap:7px 15px;margin:12px 0;padding:12px;background:var(--panel);border-radius:4px}.request-details dt{color:var(--muted)}.request-details dd{margin:0;color:var(--ink);overflow-wrap:anywhere}.attachment-list{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.attachment-chip{display:flex;align-items:center;max-width:100%;border:1px solid var(--line);border-radius:5px;background:#f7f9f9;font-size:11px}.attachment-chip>button:first-child{display:flex;align-items:center;gap:7px;min-width:0;padding:7px 9px}.attachment-chip span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}.attachment-chip svg{width:14px;height:14px}.attachment-chip>.icon-button{height:30px;width:28px}.attachment-chip.error{border-color:#e3b9bb;color:var(--danger)}.composer-region{flex-shrink:0;width:min(100%,832px);padding:12px 40px max(17px,env(safe-area-inset-bottom));margin:0 auto;background:var(--surface)}.composer-form{border:1px solid #d5dddd;border-radius:8px;background:#fff;box-shadow:0 2px 6px #172c2a05;padding:7px 8px}.composer-form:focus-within{border-color:#9dbab6;box-shadow:0 0 0 2px #087e7908}.composer-form textarea{display:block;width:100%;resize:none;border:0;outline:none!important;background:transparent;padding:10px 10px 5px;line-height:1.5;min-height:44px;max-height:180px;overflow:auto}.composer-form textarea::placeholder{color:#939c9c}.composer-form textarea:disabled{background:transparent}.composer-toolbar{display:flex;align-items:center;gap:6px;padding-top:4px}.composer-toolbar .icon-button{color:#7d8787}.send-button{height:34px;width:34px;display:grid;place-items:center;flex-shrink:0;border-radius:6px;background:var(--accent);color:#fff}.send-button:hover{background:var(--accent-hover)}.send-button:disabled{background:#b9c8c7;opacity:1;color:#fff}.send-button svg{width:19px;height:19px}.stop-button{background:var(--ink)}.stop-button:hover{background:#374445}.stop-button svg{width:13px;height:13px;fill:currentColor}.request-status{flex:1;font-size:11px;color:var(--muted);line-height:1.5;min-width:0;overflow-wrap:anywhere;padding:0 3px}.composer-attachments{margin:3px 7px 1px}.composer-footer{height:23px;display:flex;align-items:center;justify-content:space-between;padding:5px 2px 0;font-size:10px;color:#899292}.composer-footer .icon-button{width:24px;height:22px}.composer-footer svg{width:14px;height:14px}.pending-notice{display:flex;gap:8px;align-items:center;border-left:2px solid #b37e39;padding:3px 0 3px 11px;margin-bottom:12px;font-size:11px;color:#805923}.pending-notice>div{flex:1;min-width:0}.pending-notice strong{display:block;font-size:11px;font-weight:600}.pending-notice span{display:block;line-height:1.5;margin-top:3px;overflow-wrap:anywhere}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;border-radius:5px;padding:8px 12px;font-size:12px;font-weight:550;white-space:nowrap}.text-button:hover{background:#edf2f2}.primary-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:40px;padding:10px 18px;background:var(--accent);color:#fff;border-radius:5px;font-weight:600;font-size:13px}.primary-button:hover{background:var(--accent-hover)}.primary-button.danger{background:var(--danger)}dialog{border:1px solid var(--line);border-radius:8px;padding:26px;color:var(--ink);background:var(--surface);max-width:calc(100vw - 32px);max-height:calc(var(--viewport-height) - 32px);box-shadow:0 18px 70px #17262820}dialog::backdrop{background:#17222465}.login-dialog{width:370px;padding:35px 32px}.login-dialog h1{margin-top:17px;font-size:25px;font-weight:650}.login-caption{color:var(--muted);font-size:13px;margin:8px 0 28px}dialog label{display:block;margin-bottom:8px;font-size:12px;font-weight:600}dialog input{width:100%;height:41px;border:1px solid #d6dfdf;border-radius:5px;padding:10px 12px;background:#fff;color:var(--ink)}#login-username{margin-bottom:20px}.password-field{position:relative}.password-field input{padding-right:42px}.password-field .icon-button{position:absolute;right:3px;top:3px;color:#8a9394}.login-dialog .primary-button{width:100%;margin-top:25px;justify-content:space-between}.login-error{font-size:12px;color:var(--danger);line-height:1.5;margin-top:15px}.dialog-heading{display:flex;align-items:center;gap:15px;justify-content:space-between;margin-bottom:14px}.dialog-heading h2{font-size:17px;font-weight:600;min-width:0;overflow-wrap:anywhere}.dialog-heading .icon-button{margin:-6px -8px -6px 0;color:var(--muted)}.action-dialog{width:430px}.action-dialog p:not(.login-error){color:var(--muted);font-size:13px;line-height:1.6;margin-bottom:22px;overflow-wrap:anywhere}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}.source-dialog{width:650px}.source-body{font-size:13px;line-height:1.65;color:#566363}.source-body p{margin-bottom:14px;overflow-wrap:anywhere}.source-passage{margin-top:20px;border-top:1px solid var(--line);padding-top:14px}.source-passage h3{font-size:12px;margin-bottom:10px;color:var(--ink)}.source-passage pre{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere}.toast{position:fixed;bottom:max(24px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:min(480px,calc(100% - 32px));background:var(--ink);color:#fff;font-size:12px;line-height:1.5;padding:13px 18px;border-radius:6px;z-index:20;box-shadow:0 4px 24px #17262825;overflow-wrap:anywhere}.mobile-only{display:none}.sidebar-backdrop{display:none}
@media(min-width:1500px){.messages,.composer-region{width:860px}.sidebar{padding-top:26px}}
@media(max-width:900px){.app-shell{grid-template-columns:232px minmax(0,1fr)}.sidebar{padding-left:12px;padding-right:12px}.chat-header{padding:0 22px}.messages{padding-left:26px;padding-right:26px}.composer-region{padding-left:26px;padding-right:26px}}
@media(max-width:700px){:root{font-size:14px}.app-shell{display:block;height:var(--viewport-height);min-height:240px}.chat-main{height:100%}.mobile-only{display:inline-flex}.sidebar{position:fixed;z-index:12;inset:0 auto 0 0;width:min(304px,calc(100vw - 54px));transform:translateX(-100%);visibility:hidden;transition:transform .18s ease,visibility .18s ease;padding:24px 16px 0}.sidebar.open{transform:translateX(0);visibility:visible}.sidebar-backdrop:not([hidden]){display:block;position:fixed;z-index:11;inset:0;width:100%;height:100%;background:#15212155}.sidebar-heading{margin-bottom:23px}.conversation-tools{display:flex}.conversation-select{padding-top:13px;padding-bottom:13px}.sidebar-footer{padding-bottom:max(20px,env(safe-area-inset-bottom))}.chat-header{height:66px;padding:0 max(12px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left));gap:6px}.chat-heading h1{font-size:14px;line-height:21px}.chat-heading #model-status{font-size:10px}.header-actions{gap:0}.header-actions .icon-button{height:34px;width:29px}.header-actions svg{width:15px;height:15px}.connection-banner{padding:9px 17px;font-size:11px}.messages{padding:17px max(19px,env(safe-area-inset-right)) 8px max(19px,env(safe-area-inset-left))}.message{padding:15px 0 22px}.message-content{font-size:14px;line-height:1.75}.message-header{margin-bottom:10px}.message-content pre{padding-left:12px;padding-right:12px}.empty-state img{width:42px;height:42px}.empty-state h2{font-size:23px}.empty-state p{font-size:13px}.composer-region{padding:8px max(12px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.composer-form{padding:5px 6px;border-radius:8px}.composer-form textarea{font-size:16px;max-height:140px;padding:9px 8px 4px}.composer-toolbar{padding-top:2px}.composer-toolbar .icon-button{width:34px;height:34px}.composer-footer{height:20px;font-size:9px;padding-top:3px}.request-status{font-size:10px}.pending-notice{padding-left:9px;font-size:10px;gap:3px;margin-bottom:9px}.pending-notice .text-button{font-size:11px;padding:6px}.pending-notice .icon-button{width:29px;height:30px}.pending-notice strong{font-size:11px}.request-details dl{grid-template-columns:110px minmax(0,1fr);gap:8px;font-size:11px}.attachment-chip span{max-width:190px}.login-dialog{padding:29px 25px}dialog{max-width:calc(100vw - 24px);padding:22px;max-height:calc(var(--viewport-height) - 24px)}dialog input{font-size:16px}.source-body{font-size:12px}.toast{bottom:max(15px,env(safe-area-inset-bottom));font-size:12px}}
@media(max-width:360px){.header-actions .icon-button{width:27px}.chat-header{gap:3px}.messages{padding-left:15px;padding-right:15px}.request-status{font-size:9px}.pending-notice span{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
