:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;--bg: #0b0b0b;--surface: #141414;--surface-raised: #1b1b1b;--line: #292929;--text: #f1f1f1;--muted: #929292;--subtle: #666}*{box-sizing:border-box}html,body{width:100%;min-width:320px;min-height:100%;margin:0}body{min-height:100vh;background:var(--bg);color:var(--text)}button,textarea{font:inherit}button{color:inherit}button:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid #bdbdbd;outline-offset:3px}::selection{background:#555;color:#fff}[hidden]{display:none!important}.app-shell{display:flex;min-height:100vh;min-height:100dvh;flex-direction:column;background:var(--bg)}.topbar{height:64px;flex:0 0 64px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;border-bottom:1px solid #202020}.brand{display:inline-flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;font-size:14px;font-weight:600;letter-spacing:-.025em}.brand-logo{display:block;width:25px;height:20px;object-fit:contain;filter:brightness(0) invert(1)}.topbar-actions{display:flex;align-items:center;gap:18px}.local-label{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:11px}.local-label i,.engine-status i{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#777}.new-chat{padding:7px 11px;border:1px solid var(--line);border-radius:7px;background:transparent;color:#c7c7c7;font-size:11px;cursor:pointer}.new-chat:hover{background:#1b1b1b;color:#fff}.main-panel{display:flex;flex:1 1 auto;min-height:0;flex-direction:column}.chat-stage{position:relative;display:flex;flex:1 1 auto;min-height:0;flex-direction:column;overflow:auto;scrollbar-color:#383838 transparent;scrollbar-width:thin}.welcome{display:flex;width:min(100% - 40px,720px);flex:1 0 auto;flex-direction:column;align-items:center;justify-content:center;margin:0 auto;padding:44px 0 32px;text-align:center;animation:fade-in .35s ease both}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.welcome-logo{display:block;width:64px;height:51px;margin-bottom:23px;object-fit:contain;filter:brightness(0) invert(1);opacity:.88}h1{margin:0;color:var(--text);font-size:clamp(34px,5vw,49px);font-weight:500;line-height:1.12;letter-spacing:-.06em}.welcome-copy{margin:12px 0 0;color:var(--muted);font-size:13px;line-height:1.6}.welcome-actions{display:flex;align-items:center;flex-direction:column;gap:10px;margin-top:24px}.primary-button{display:inline-flex;min-width:170px;height:40px;align-items:center;justify-content:center;gap:9px;padding:0 14px;border:1px solid #eee;border-radius:7px;background:#ededed;color:#151515;font-size:12px;font-weight:600;cursor:pointer;transition:background .15s ease}.primary-button:hover:not(:disabled){background:#fff}.primary-button:disabled{cursor:progress;opacity:.72}.primary-button.loaded{background:#d8d8d8}.button-icon{display:inline-flex}.button-icon svg,.send-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.download-note{max-width:400px;margin:0;color:var(--subtle);font-size:10px;line-height:1.5}.progress-wrap{width:min(100%,380px);margin-top:20px;padding:13px 14px 11px;border:1px solid var(--line);border-radius:8px;background:#111;text-align:left}.progress-copy{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#c9c9c9;font-size:10px}.progress-copy span:last-child{color:var(--muted);font-variant-numeric:tabular-nums}.progress-track{height:3px;margin-top:10px;overflow:hidden;border-radius:3px;background:#333}.progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:#c8c8c8;transition:width .3s ease}.progress-wrap p{margin:8px 0 0;color:var(--muted);font-size:9px;line-height:1.5}.messages{width:min(100% - 40px,720px);min-height:100%;margin:0 auto;padding:38px 0 24px}.message{display:flex;gap:12px;width:100%;margin-bottom:26px;animation:message-in .25s ease both}@keyframes message-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.message-avatar{width:27px;height:27px;flex:0 0 27px;display:grid;place-items:center;margin-top:1px;overflow:hidden;border:1px solid #303030;border-radius:50%;background:#191919;color:#aaa;font-size:10px}.message.assistant .message-avatar{padding:6px}.message-avatar img{width:100%;height:100%;object-fit:contain;filter:brightness(0) invert(1);opacity:.85}.message-body{min-width:0;flex:1}.message-heading{margin-bottom:7px;color:#aaa;font-size:10px;font-weight:600}.message-text{max-width:100%;color:#e0e0e0;font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.message.user .message-text{color:#c4c4c4}.message-error{color:#aaa}.message-text.streaming:empty:before{content:"";display:inline-block;width:18px;height:5px;border-radius:4px;background:#aaa;animation:breathe .8s ease-in-out infinite alternate}@keyframes breathe{to{opacity:.3;transform:scaleX(.55)}}.composer-area{width:min(100% - 48px,740px);flex:0 0 auto;align-self:center;padding:0 0 13px}.composer{padding:12px 12px 9px 15px;border:1px solid #303030;border-radius:11px;background:var(--surface);transition:border-color .15s ease}.composer:focus-within{border-color:#555}.composer textarea{display:block;width:100%;max-height:180px;min-height:34px;resize:none;padding:3px 1px 8px;border:0;outline:none;background:transparent;color:var(--text);font-size:12px;line-height:1.6;scrollbar-width:thin}.composer textarea::placeholder{color:#777}.composer textarea:disabled{opacity:.55}.composer-tools{display:flex;min-height:27px;align-items:center;justify-content:space-between}.engine-status{display:inline-flex;align-items:center;gap:7px;color:#888;font-size:10px}.engine-status.loading i{background:#aaa;animation:blink 1s infinite alternate}.engine-status.ready{color:#bdbdbd}.engine-status.ready i{background:#c4c4c4}.engine-status.error{color:#aaa}.engine-status.error i{background:#888}@keyframes blink{to{opacity:.35}}.send-button{width:29px;height:29px;display:grid;place-items:center;border:0;border-radius:7px;background:#e7e7e7;color:#191919;cursor:pointer;transition:background .15s ease,opacity .15s ease}.send-button:hover:not(:disabled){background:#fff}.send-button:disabled{background:#333;color:#777;cursor:not-allowed}.send-button.busy svg{animation:send-pulse .75s ease infinite alternate}@keyframes send-pulse{to{transform:translateY(-2px);opacity:.45}}.footer-note{margin:8px 3px 0;color:#666;font-size:9px;text-align:center}.screen-reader{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;clip-path:inset(50%)}@media(max-width:600px){.topbar{height:56px;flex-basis:56px;padding:0 16px}.brand{gap:8px;font-size:13px}.brand-logo{width:22px;height:18px}.topbar-actions{gap:12px}.local-label{font-size:10px}.new-chat{padding:6px 9px;font-size:10px}.welcome{width:min(100% - 30px,500px);padding:28px 0 24px}.welcome-logo{width:54px;height:43px;margin-bottom:19px}h1{font-size:clamp(32px,8vw,40px)}.welcome-copy{margin-top:9px;font-size:12px}.welcome-actions{margin-top:20px}.messages{width:calc(100% - 30px);padding-top:25px}.composer-area{width:calc(100% - 24px);padding-bottom:9px}.composer{padding:10px 10px 7px 12px;border-radius:10px}.composer textarea,.message-text{font-size:12px}.footer-note{font-size:8px}}@media(max-height:480px){.topbar{height:48px;flex-basis:48px}.welcome{padding:12px 0 10px}.welcome-logo{width:38px;height:31px;margin-bottom:10px}h1{font-size:30px}.welcome-copy{margin-top:5px;font-size:11px}.welcome-actions{gap:6px;margin-top:11px}.primary-button{height:34px}.download-note{font-size:8px}.composer-area{padding-bottom:6px}.footer-note{margin-top:5px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
