:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#f3f3f3;background:#101010;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color-scheme:dark;--bg: #101010;--panel: #1a1a1a;--hover: #242424;--border: #323232;--text: #f3f3f3;--muted: #999;--accent: #f3f3f3;--accent-ink: #111;--bubble: #252525}*{box-sizing:border-box}body{margin:0}button,textarea,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--text);outline-offset:4px}textarea:focus-visible{outline:0}button svg{flex-shrink:0}.app-shell{height:100dvh;min-height:300px;display:flex;flex-direction:column;overflow:hidden}.topbar{height:80px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 28px;flex-shrink:0}.header-start,.topbar-actions{display:flex;align-items:center;gap:8px}.header-start{gap:15px}.brand{display:inline-flex;align-items:center;gap:11px;color:var(--text);text-decoration:none;font-size:17px;letter-spacing:.14em;font-weight:600}.logo{width:32px;height:32px;display:block;flex-shrink:0}.brand .logo{width:29px;height:29px}.icon-button{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;border-radius:10px;color:var(--muted)}.icon-button:hover:not(:disabled){color:var(--text);background:var(--hover)}.icon-button svg{width:20px;height:20px}.account-button{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:24px;background:transparent;padding:9px 14px;font-size:12px;margin-left:4px;min-height:38px}.account-button:hover{background:var(--hover)}.account-button svg{width:17px;height:17px}.workspace{display:flex;flex:1;min-height:0;min-width:0;flex-direction:column}.conversation-scroll{overflow-y:auto;flex:1;min-height:0;scrollbar-color:var(--border) transparent;scrollbar-width:thin;overscroll-behavior:contain}.conversation-scroll.is-empty{display:flex;flex-direction:column}.empty-chat{margin:auto;display:flex;align-items:center;flex-direction:column;text-align:center;padding:30px 20px 65px}.hero-logo{height:58px;width:58px;margin-bottom:28px}.empty-chat h1{font-size:clamp(25px,3.5vw,34px);line-height:1.3;font-weight:450;letter-spacing:-.045em;margin:0}.message-list{max-width:792px;padding:30px 16px 12px;margin:0 auto}.message{margin-bottom:34px;min-width:0}.message-body{min-width:0}.message-author{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:600;margin-bottom:14px}.message-author .logo{width:23px;height:23px}.message-text{font-size:15px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text)}.message-text.is-streaming:after{content:"";width:7px;height:7px;display:inline-block;border-radius:50%;background:currentColor;margin-left:6px;vertical-align:middle;animation:breathe 1s ease-in-out infinite}.message-user{display:flex;justify-content:flex-end;margin-bottom:36px}.message-user .message-body{max-width:85%}.message-user .message-text{padding:11px 18px;border-radius:22px;background:var(--bubble);display:inline-block;max-width:100%;text-align:left}.copy-button{display:flex;align-items:center;justify-content:center;width:30px;height:30px;margin-top:9px;margin-left:-5px;border:0;border-radius:7px;background:transparent;color:var(--muted)}.copy-button:hover{background:var(--hover);color:var(--text)}.copy-button svg{width:16px;height:16px}.composer-area{width:100%;max-width:792px;margin:0 auto;flex-shrink:0;padding:10px 16px max(12px,env(safe-area-inset-bottom))}.composer{display:flex;align-items:flex-end;gap:14px;border:1px solid var(--border);border-radius:25px;background:var(--panel);padding:12px 12px 12px 20px;transition:border-color .15s}.composer:focus-within{border-color:var(--muted)}.composer textarea{display:block;flex:1;min-width:0;background:transparent;border:0;color:var(--text);resize:none;min-height:30px;max-height:160px;font-size:15px;line-height:1.6;outline:none;padding:3px 0;overflow-y:auto;scrollbar-width:thin}.composer textarea::placeholder{color:var(--muted)}.send-button{background:var(--accent);color:var(--accent-ink);border:0;border-radius:50%;height:34px;width:34px;flex-shrink:0;display:flex;align-items:center;justify-content:center}.send-button svg{height:21px;width:21px}.send-button:hover:not(:disabled){opacity:.8}.send-button:disabled{background:var(--border);color:var(--muted);opacity:1}.composer-footer{display:flex;justify-content:center;align-items:center;gap:10px;min-height:25px;color:var(--muted);font-size:10px;line-height:1.5;padding:7px 3px 0}.composer-footer p{margin:0;text-align:center}.composer-footer>span{white-space:nowrap}.connection-status{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px 12px;margin:0 8px 12px;color:var(--muted);font-size:11px;line-height:1.6;text-align:center}.connection-status button{border:0;background:transparent;color:var(--text);display:inline-flex;align-items:center;gap:5px;padding:4px;font-size:11px;text-decoration:underline;text-underline-offset:3px}.connection-status button svg{width:12px;height:12px}.pending-response{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px;line-height:1.65;white-space:normal}.thinking-dot{display:inline-block;width:8px;height:8px;flex-shrink:0;border-radius:50%;background:var(--text);animation:breathe 1.1s ease-in-out infinite}.error-box{max-width:760px;margin:10px auto 24px;border:1px solid var(--border);border-radius:12px;background:var(--panel);padding:14px 16px;font-size:12px;line-height:1.7;color:var(--text);overflow-wrap:anywhere}.notice{max-width:760px;margin:12px auto 24px;color:var(--muted);padding:10px 16px;font-size:12px;line-height:1.7;text-align:center}.overlay{position:fixed;inset:0;z-index:10;background:#0008}.sidebar{height:100%;width:min(310px,calc(100vw - 38px));background:var(--bg);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:21px 14px 14px;animation:drawer-in .18s ease-out}.sidebar-heading{display:flex;align-items:center;justify-content:space-between;padding:0 5px 15px 10px}.sidebar-heading h2{font-size:17px;font-weight:550;letter-spacing:-.02em;margin:0}.sidebar-heading .icon-button{width:32px;height:32px}.new-chat-button{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--border);border-radius:11px;background:var(--panel);color:var(--text);font-size:13px;text-align:left}.new-chat-button:hover{background:var(--hover)}.new-chat-button svg{width:19px;height:19px}.thread-list{overflow-y:auto;scrollbar-width:thin;flex:1;min-height:0;padding-top:21px}.thread-button{display:flex;align-items:center;gap:11px;width:100%;text-align:left;border:0;border-radius:9px;background:transparent;padding:12px 11px;color:var(--muted);font-size:12px}.thread-button:hover,.thread-button.is-active{color:var(--text);background:var(--hover)}.thread-button svg{width:16px;height:16px}.thread-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-history{color:var(--muted);font-size:12px;line-height:1.7;margin:9px 12px}.sidebar-footer{padding-top:16px;border-top:1px solid var(--border)}.sidebar-footer>p{font-size:10px;line-height:1.7;margin:0 10px 10px;color:var(--muted)}.sidebar-account{display:flex;gap:10px;align-items:center;width:100%;border:0;border-radius:9px;background:transparent;text-align:left;padding:11px 10px;font-size:11px}.sidebar-account:hover{background:var(--hover)}.sidebar-account>svg{width:17px;height:17px}.sidebar-account>svg:last-child{margin-left:auto;width:15px}.sidebar-account>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-overlay{display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto;backdrop-filter:blur(4px)}.account-dialog{position:relative;background:var(--bg);border:1px solid var(--border);border-radius:22px;padding:35px;width:100%;max-width:420px;max-height:calc(100dvh - 40px);overflow-y:auto;box-shadow:0 20px 80px #0003}.dialog-close{position:absolute;top:13px;right:13px;width:32px;height:32px}.dialog-close svg{width:18px;height:18px}.account-logo{width:39px;height:39px;margin:6px 0 27px}.account-dialog h2{font-weight:500;font-size:24px;letter-spacing:-.04em;margin:0 0 10px;line-height:1.25}.account-intro{margin:0 0 22px;color:var(--muted);font-size:12px;line-height:1.7}.account-username{font-size:14px;overflow-wrap:anywhere;margin:12px 0}.auth-unavailable{margin:0 0 22px;padding:12px;border:1px solid var(--border);border-radius:10px;color:var(--muted);font-size:11px;line-height:1.7}.auth-form{display:flex;flex-direction:column}.auth-form label{font-size:11px;margin:0 0 8px}.auth-form input{width:100%;padding:12px 13px;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:10px;font-size:13px;margin-bottom:19px;min-height:43px}.auth-form input::placeholder{color:var(--muted)}.primary-button{border:0;border-radius:10px;background:var(--accent);color:var(--accent-ink);padding:13px 15px;display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:12px;font-weight:550;margin-top:4px;min-height:44px}.primary-button:hover:not(:disabled){opacity:.85}.primary-button svg{width:17px;height:17px}.auth-error{border:1px solid var(--border);padding:10px 12px;border-radius:9px;font-size:11px;line-height:1.6;margin:0 0 17px}.auth-switch{font-size:11px;color:var(--muted);line-height:1.8;margin:22px 0 0;text-align:center}.auth-switch button{border:0;background:transparent;padding:0 0 0 4px;color:var(--text);text-decoration:underline;text-underline-offset:3px;font-size:11px}.logout-button{width:100%;justify-content:center;margin-top:22px}.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}@keyframes breathe{50%{opacity:.35}}@keyframes drawer-in{0%{transform:translate(-25px);opacity:.5}to{transform:translate(0);opacity:1}}:root[data-theme=light]{color-scheme:light;--bg: #fff;--panel: #f7f7f7;--hover: #eee;--border: #dedede;--text: #141414;--muted: #707070;--accent: #141414;--accent-ink: #fff;--bubble: #f0f0f0;background:var(--bg);color:var(--text)}@media (max-width: 600px){.topbar{height:65px;padding:0 12px;gap:9px}.header-start{gap:5px}.brand{font-size:14px;gap:7px}.brand>.logo{width:24px;height:24px}.topbar-actions{gap:1px}.icon-button{width:35px;height:38px}.icon-button svg{width:19px;height:19px}.account-button{min-height:35px;padding:8px;margin-left:4px;border-radius:50%}.account-button span{display:none}.account-button svg{width:17px;height:17px}.empty-chat{padding-bottom:50px}.hero-logo{width:51px;height:51px;margin-bottom:25px}.empty-chat h1{font-size:27px}.message-list{padding:22px 20px 10px}.message-text{font-size:15px;line-height:1.75}.message-user .message-body{max-width:90%}.message-user .message-text{padding:10px 15px}.message{margin-bottom:29px}.composer-area{padding-left:12px;padding-right:12px}.composer{padding:11px 10px 11px 16px;gap:9px;border-radius:25px}.composer textarea{font-size:16px}.composer-footer{font-size:9px;padding-top:9px}.connection-status{font-size:10px;margin-bottom:9px;gap:2px 9px}.connection-status button{font-size:10px}.error-box{margin:10px 18px 20px}.notice{margin:10px 8px}.sidebar{padding-top:16px}.account-dialog{padding:30px 25px;border-radius:18px}.auth-form input{font-size:16px}}@media (max-width: 360px){.theme-button{display:none}.brand{letter-spacing:.08em}}@media (max-height: 500px){.topbar{height:54px}.empty-chat{padding:15px}.hero-logo{height:36px;width:36px;margin-bottom:13px}.empty-chat h1{font-size:24px}.composer-footer{min-height:0;font-size:9px}.account-dialog{padding-top:22px}.account-logo{margin-bottom:15px}}@media (prefers-reduced-motion: reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;transition:none!important}}
