:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif;color:#202624;background:#fff;font-synthesis:none;font-size:14px;--accent:#176b55;--border:#e4e9e6;--muted:#6b7470}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button{color:inherit}svg{width:18px;height:18px;flex-shrink:0}button,input,textarea{-webkit-tap-highlight-color:transparent}input,textarea{min-width:0}button{touch-action:manipulation}.brand{font-size:23px;font-weight:650;letter-spacing:-1px}.icon-button{display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;border-radius:8px;width:36px;height:36px;flex-shrink:0}.icon-button:hover{background:#edf0ee}.text-button{display:inline-flex;align-items:center;gap:9px;background:transparent;border:0;border-radius:8px;color:var(--muted);padding:9px;font-size:13px}.text-button:hover{background:#edf0ee;color:#202624}.primary-button{background:var(--accent);color:#fff;border:0;padding:13px 20px;border-radius:8px;font-weight:550;min-height:46px}.primary-button:hover{background:#105542}.primary-button:disabled{opacity:.6}.mobile-only{display:none}.error{color:#a73229}.initial-loading{display:grid;place-items:center;min-height:100dvh;color:var(--muted)}.login-screen{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:32px 24px}.login-form{width:100%;max-width:360px;margin-top:-60px}.login-form .brand{margin-bottom:40px}.login-form h1{font-size:27px;font-weight:600;letter-spacing:-.6px;margin:0 0 13px;line-height:1.35}.login-form>p{line-height:1.7;color:var(--muted);margin:0 0 34px;font-size:15px}.login-form form{display:flex;flex-direction:column;gap:12px}.login-form label{font-size:14px;font-weight:500}.login-form input{height:48px;border:1px solid #bcc7c1;border-radius:8px;padding:0 13px;background:#fff;font-size:16px}.login-form input::placeholder{color:#77837b}.login-form .primary-button{margin-top:8px}.login-form .error{margin:0;font-size:13px;line-height:1.5}.app-shell{display:flex;height:100dvh;overflow:hidden}.sidebar{width:288px;flex-shrink:0;display:flex;flex-direction:column;background:#f7f8f8;border-right:1px solid var(--border);padding:26px 16px 16px}.sidebar-top{display:flex;align-items:center;justify-content:space-between;padding:0 10px;margin-bottom:31px}.sidebar-heading{display:flex;align-items:center;justify-content:space-between;padding:0 9px;margin-bottom:13px}.sidebar-heading h2{font-size:16px;margin:0;font-weight:600}.sidebar-heading .text-button{padding:6px;font-size:12px}.search{display:flex;align-items:center;gap:9px;border:1px solid var(--border);background:#fff;border-radius:8px;padding:10px 11px;margin-bottom:16px;color:var(--muted)}.search svg{width:16px;height:16px}.search input{border:0;outline:0;flex:1;width:100%;font-size:13px;background:transparent;color:#202624}.search input::placeholder{color:var(--muted)}.search:focus-within{border-color:var(--accent)}.thread-list{flex:1;overflow-y:auto;margin:0 -4px;padding:0 4px;scrollbar-width:thin}.thread-row{width:100%;text-align:left;border:0;background:transparent;border-radius:8px;padding:11px 10px;margin-bottom:3px;display:flex;flex-direction:column;gap:7px}.thread-row:hover{background:#ecefed}.thread-row.selected{background:#e5ebe7}.thread-title{font-size:13px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.thread-meta{font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:16px}.thread-meta>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thread-meta time{flex-shrink:0}.sidebar-empty{color:var(--muted);font-size:13px;padding:20px 10px;line-height:1.8}.logout{justify-content:flex-start;margin-top:16px;padding:11px 10px}.logout svg{width:16px;height:16px}.drawer-backdrop{display:none}.conversation{display:flex;flex-direction:column;flex:1;min-width:0;background:#fff}.conversation-header{height:83px;min-height:83px;padding:17px 28px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px}.conversation-heading{flex:1;min-width:0}.conversation-heading h1{font-size:16px;font-weight:600;line-height:1.5;margin:0 0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.connection{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}.connection i{width:6px;height:6px;border-radius:50%;background:#929c96;display:block}.connection.ready i{background:var(--accent)}.messages-scroll{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}.messages-content{max-width:820px;padding:34px 24px 20px;margin:0 auto;min-height:100%}.message{position:relative;font-size:16px;line-height:1.75;margin:0 0 30px;overflow-wrap:anywhere;content-visibility:auto;contain-intrinsic-size:auto 120px}.message-user{margin-left:auto;max-width:88%;width:fit-content;background:#f1f3f2;border-radius:14px;padding:12px 17px;margin-top:10px;margin-bottom:31px}.user-text{white-space:pre-wrap}.message-author{font-size:13px;font-weight:600;line-height:1.4;margin-bottom:13px;display:flex;gap:9px;align-items:center}.message-author span{color:var(--muted);font-size:11px;font-weight:400}.message-text p{margin:0 0 15px}.message-text p:last-child{margin-bottom:0}.message-text pre{margin:16px 0;border-radius:10px;padding:16px;background:#f6f7f7;overflow:auto;border:1px solid #e8ece9;max-width:100%;font-size:13px;line-height:1.65;white-space:pre}.message-text code{font-family:Consolas,Cascadia Code,monospace;font-size:.87em;background:#f0f3f1;padding:2px 4px;border-radius:4px}.message-text pre code{background:none;padding:0}.message-text a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.message-text blockquote{border-left:3px solid #cbd7cf;margin:16px 0;padding:0 0 0 16px;color:var(--muted)}.message-text h1,.message-text h2,.message-text h3{font-size:1.15em;margin:22px 0 12px;font-weight:600;line-height:1.5}.message-text ul,.message-text ol{padding-left:24px;margin:16px 0}.message-text li{margin:8px 0}.message-text table{display:block;max-width:100%;overflow:auto;border-collapse:collapse;font-size:14px;margin:20px 0}.message-text td,.message-text th{padding:10px 12px;border:1px solid var(--border);text-align:left}.message-copy{opacity:0;margin-top:8px;width:28px;height:28px;color:var(--muted)}.message-copy svg{width:14px;height:14px}.message:hover .message-copy,.message:focus-within .message-copy{opacity:1}.message-user .message-copy{position:absolute;bottom:-26px;right:4px;margin:0}.conversation-empty{min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);text-align:center;font-size:14px;padding:28px}.conversation-empty h2{font-weight:500;color:#202624;font-size:23px;margin:0 0 8px}.conversation-empty p{line-height:1.7}.load-older{display:flex;margin:0 auto 28px}.composer-area{flex-shrink:0;background:#fff;padding:8px 24px 17px}.composer-content{max-width:772px;margin:0 auto}.composer{display:flex;gap:10px;align-items:flex-end;border:1px solid #cfd8d2;border-radius:14px;padding:11px 11px 11px 17px;background:#fff}.composer:focus-within{border-color:#819d8c}.composer textarea{border:0;outline:0!important;resize:none;flex:1;max-height:180px;min-height:36px;padding:7px 0 4px;font-size:15px;line-height:1.6;background:#fff;color:#202624;overflow-y:auto}.composer textarea::placeholder{color:#7b847e}.send-button{border:0;border-radius:8px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex-shrink:0}.send-button svg{width:22px;height:22px}.send-button:disabled{background:#e7ece9;color:#87958c}.composer-hint{display:flex;justify-content:space-between;gap:12px;font-size:11px;line-height:1.5;color:var(--muted);padding:10px 3px 0}.feedback{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;line-height:1.6;margin:0 0 8px;padding:0 2px}.feedback .icon-button{height:28px;width:28px}.notice{color:var(--accent)}.offline-note{font-size:12px;line-height:1.7;color:var(--muted);padding:0 3px 10px}@media(max-width:767px){.mobile-only{display:inline-flex}.desktop-only{display:none}.sidebar{position:fixed;left:0;top:0;bottom:0;z-index:20;width:min(320px,87vw);transform:translate(-101%);transition:transform .18s ease;padding-top:max(22px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}.drawer-open .sidebar{transform:translate(0)}.drawer-backdrop{display:block;position:fixed;inset:0;background:#0003;border:0;z-index:19}.conversation-header{height:78px;min-height:78px;padding:12px 13px;gap:9px}.conversation-header .icon-button{width:35px;height:35px}.conversation-heading h1{font-size:15px;max-width:100%;margin-bottom:5px}.connection{font-size:11px;gap:6px}.messages-content{padding:26px 20px 12px}.message{font-size:16px;line-height:1.75;margin-bottom:26px}.message-user{max-width:94%;padding:11px 14px;border-radius:14px;margin-bottom:31px}.message-author{font-size:12px;margin-bottom:11px}.message-copy{opacity:.7}.message-text pre{font-size:12px;padding:13px}.composer-area{padding:8px 15px max(10px,env(safe-area-inset-bottom))}.composer{padding:10px 10px 10px 14px;gap:8px}.composer textarea{font-size:16px;padding-top:6px}.send-button{height:36px;width:36px}.composer-hint{justify-content:center;padding-top:8px;font-size:10px}.conversation-empty{padding:20px 0;min-height:240px}.conversation-empty h2{font-size:20px}.login-form{margin-top:-25px}.login-form h1{font-size:26px}.sidebar-top{margin-bottom:25px}.sidebar input{font-size:16px}.thread-row{padding:12px 10px}.thread-title{font-size:14px}.thread-meta{font-size:11px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.sidebar{transition:none}}.composer-expanded{position:relative;display:flex;flex-direction:column;align-items:stretch;border-radius:20px;padding:14px 14px 12px;gap:12px}.composer-expanded textarea{width:100%;flex:none;min-height:54px;line-height:1.65;padding:2px 4px;max-height:180px}.composer-toolbar{display:flex;align-items:center;gap:8px;min-width:0}.file-picker{display:none}.composer-tool{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:36px;height:36px;padding:5px 7px;border:0;border-radius:8px;background:transparent;color:#252927;white-space:nowrap}.composer-tool:hover,.composer-tool[aria-expanded=true]{background:#f0f3f1}.composer-tool:disabled{color:#9ba59f}.composer-tool>svg{width:21px;height:21px}.attachment-button{padding:5px}.attachment-button>svg{width:26px;height:26px}.permission-button.full-access{color:#c17d26}.toolbar-spacer{flex:1;min-width:0}.model-button{min-width:0;max-width:240px;font-size:14px}.model-button>span{overflow:hidden;text-overflow:ellipsis}.model-button>svg{width:15px;height:15px}.effort-button{font-size:13px;color:#737b76;gap:5px}.composer-expanded .send-button{width:38px;height:38px;border-radius:12px;margin-left:3px}.composer-menu{position:absolute;right:0;bottom:calc(100% + 9px);z-index:25;width:min(380px,calc(100vw - 30px));max-height:min(420px,60dvh);overflow-y:auto;background:#fff;border:1px solid #e2e7e4;border-radius:13px;box-shadow:0 7px 30px #162d2021;padding:7px}.composer-menu-heading{padding:9px 11px 10px;font-size:12px;color:#838a85}.permission-menu{left:0;right:auto;width:min(390px,calc(100vw - 30px))}.menu-option{display:flex;align-items:center;width:100%;gap:10px;text-align:left;background:transparent;border:0;border-radius:7px;padding:10px;min-height:42px}.menu-option:hover,.menu-option[aria-pressed=true]{background:#f5f7f6}.menu-option>span{flex:1;min-width:0}.menu-option strong{font-weight:500;font-size:14px;display:block;overflow-wrap:anywhere}.menu-option small{font-size:11px;color:#8b938e;display:block;line-height:1.55;margin-top:3px}.menu-option>svg{width:17px;height:17px}.permission-full{color:#e27823}.permission-full small{color:#d9873d}.effort-menu{width:180px}.attachment-drafts{display:flex;gap:8px;overflow-x:auto;padding:1px 0 3px}.attachment-chip{display:flex;align-items:center;gap:8px;flex-shrink:0;max-width:260px;border:1px solid var(--border);border-radius:10px;padding:6px;background:#f8faf9}.attachment-chip>img{width:42px;height:42px;object-fit:cover;border-radius:5px}.attachment-chip>svg{width:23px;height:23px;margin:8px;color:var(--muted)}.attachment-chip>div{min-width:0;flex:1}.attachment-chip span{display:block;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.attachment-chip small{font-size:10px;color:var(--muted);line-height:1.5;display:block}.attachment-chip .icon-button{width:26px;height:26px}.attachment-chip .icon-button>svg{width:13px;height:13px}.attachment-error{border-color:#dcaaa4}.attachment-error small{color:#a73229}.message-attachments{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.message-attachment{display:flex;flex-direction:column;max-width:240px;gap:5px;font-size:12px}.message-attachment img{width:100%;max-height:240px;object-fit:contain;border-radius:8px}.message-attachment span{overflow-wrap:anywhere}@media(max-width:767px){.composer-expanded{padding:13px 10px 10px;border-radius:19px;gap:12px}.composer-expanded textarea{min-height:58px;font-size:16px;padding:1px 5px}.composer-toolbar{gap:4px}.composer-tool{min-width:31px;padding:5px 4px;height:34px}.composer-tool>svg{width:20px;height:20px}.attachment-button>svg{width:25px;height:25px}.model-button{font-size:13px;gap:4px;max-width:170px}.model-button>svg{width:13px;height:13px}.effort-button{font-size:12px;gap:3px}.composer-expanded .send-button{width:36px;height:36px;margin-left:2px}.composer-menu{bottom:calc(100% + 8px)}.menu-option{padding:10px 9px}.composer-hint{font-size:10px}.toolbar-spacer{min-width:2px}}@media(max-width:360px){.composer-toolbar{gap:2px}.model-button{font-size:12px;max-width:125px}.effort-button{font-size:11px}.effort-button>svg{width:18px;height:18px}}@media(max-width:767px){.composer-hint.desktop-only{display:none}}@media(min-width:361px)and (max-width:767px){.model-button{font-size:15px}.effort-button{font-size:14px}.effort-button>svg,.permission-button>svg{width:22px;height:22px}}.processing-status{display:flex;align-items:center;gap:8px;padding:2px 4px 10px;font-size:12px;color:var(--muted)}.processing-status i{width:7px;height:7px;border-radius:50%;background:#93a499;flex-shrink:0}.processing-status.busy{color:var(--accent)}.processing-status.busy i{background:var(--accent);animation:processing-pulse 1.5s ease-in-out infinite}.processing-status.failed{color:#a73229}.processing-status.failed i{background:#a73229}@keyframes processing-pulse{50%{opacity:.35;transform:scale(.8)}}@media(prefers-reduced-motion:reduce){.processing-status.busy i{animation:none}}.new-thread-button{display:flex;align-items:center;justify-content:center;gap:9px;border:1px solid #d0ddd5;border-radius:9px;background:#fff;color:var(--accent);padding:11px;margin:0 5px 23px;font-weight:500}.new-thread-button:hover{background:#edf3ef}.new-thread-button:disabled{opacity:.45}.new-thread-dialog{width:min(480px,calc(100vw - 30px));max-height:calc(100dvh - 30px);overflow:auto;border:1px solid var(--border);border-radius:16px;padding:22px 24px;color:#202624;background:#fff;box-shadow:0 16px 70px #10251d30}.new-thread-dialog::backdrop{background:#12251b55}.new-thread-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.new-thread-heading h2{font-size:20px;font-weight:600;margin:0}.new-thread-dialog fieldset{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}.new-thread-dialog label{font-weight:500;font-size:13px;display:flex;align-items:center;gap:8px;margin-top:10px}.new-thread-dialog label span{font-size:12px;font-weight:400;color:var(--muted)}.new-thread-dialog input,.new-thread-dialog select,.new-thread-dialog textarea{width:100%;border:1px solid #cbd5ce;border-radius:8px;padding:11px 12px;background:#fff;color:inherit;line-height:1.5;font-size:15px}.new-thread-dialog textarea{resize:vertical;min-height:135px;max-height:300px}.new-thread-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:22px}.new-thread-error{font-size:13px;line-height:1.6;margin:15px 0 0}@media(max-width:767px){.new-thread-dialog{padding:18px}.new-thread-dialog input,.new-thread-dialog textarea,.new-thread-dialog select{font-size:16px}.new-thread-button{font-size:14px;min-height:44px}}.new-thread-selects{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:12px}.new-thread-selects>div{min-width:0}.new-thread-selects label{margin-bottom:10px}.new-thread-dialog select{min-width:0}
