pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}:root{--bg:#faf9f5;--bg-side:#f5f4ed;--surface:#fff;--border:#e5e3da;--text:#29261b;--muted:#73726c;--accent:#c96442;--accent-text:#fff;--user-bubble:#f0eee6;--hover:#ebe9e0;--code-bg:#1f1e1d;--error:#b5332b;--serif:ui-serif, Georgia, Cambria, "Times New Roman", serif;--sans:ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--mono:ui-monospace, "SF Mono", Menlo, Consolas, monospace}@media (prefers-color-scheme:dark){:root{--bg:#262624;--bg-side:#1f1e1d;--surface:#30302e;--border:#3e3e3a;--text:#ece9e1;--muted:#9a9890;--user-bubble:#141413;--hover:#353532;--code-bg:#1a1918;--error:#e5736a}}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;font-size:15px}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.4}.token-screen{place-items:center;height:100%;padding:16px;display:grid}.token-screen form{flex-direction:column;gap:12px;width:min(320px,100%);display:flex}.token-screen h1{font-family:var(--serif);text-align:center;margin:0 0 8px;font-weight:400}.token-screen input{border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;border-radius:10px;padding:10px 12px}.token-screen button{background:var(--accent);color:var(--accent-text);border:0;border-radius:10px;padding:10px}.app{height:100%;display:flex;overflow:hidden}.sidebar{background:var(--bg-side);border-right:1px solid var(--border);flex-direction:column;flex-shrink:0;gap:8px;width:280px;min-height:0;padding:12px;display:none}.app.sidebar-open .sidebar{display:flex}.new-chat{text-align:left;border:1px solid var(--border);background:var(--surface);border-radius:10px;width:100%;padding:9px 12px;font-weight:500}.new-chat:hover{background:var(--hover)}.sessions{flex-direction:column;flex:1;gap:2px;margin:0 -4px;display:flex;overflow-y:auto}.sidebar-section-head{color:var(--muted);justify-content:space-between;align-items:center;margin-top:12px;padding:0 4px 0 6px;font-size:12px;display:flex}.icon-btn.small{color:var(--muted);padding:0 7px;font-size:16px;line-height:24px}.icon-btn.small:hover{color:var(--text)}.folder-form{padding:0 2px}.folder-input{border:1px solid var(--accent);background:var(--surface);width:100%;color:var(--text);font:inherit;border-radius:7px;outline:none;padding:5px 8px;font-size:14px}.folder-head .folder-input{padding:2px 6px}.folder-head form{flex:1;min-width:0}.folder{flex-direction:column;display:flex}.folder-head{cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:8px;align-items:center;gap:6px;padding:6px 8px;font-size:14px;display:flex}.folder-head:hover{background:var(--hover)}.folder.current>.folder-head{font-weight:600}.folder-chevron{width:10px;color:var(--muted);flex-shrink:0;transition:transform .15s}.folder-chevron.open{transform:rotate(90deg)}.folder-icon{flex-shrink:0;font-size:14px}.folder-title{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.folder-count{color:var(--muted);flex-shrink:0;font-size:11px;font-weight:400}.folder-edit{color:var(--muted);opacity:0;background:0 0;border:0;flex-shrink:0;padding:0 2px;font-size:13px}.folder-head:hover .folder-edit{opacity:1}.folder-edit:hover{color:var(--text)}.folder-chats{flex-direction:column;gap:1px;margin-bottom:4px;padding-left:18px;display:flex}.folder-empty{color:var(--muted);padding:4px 10px;font-size:12px}.empty-folder{color:var(--muted);margin:0;font-size:15px}.session-item{text-align:left;background:0 0;border:0;border-radius:8px;padding:7px 10px}.session-item:hover,.session-item.active{background:var(--hover)}.session-name{white-space:nowrap;text-overflow:ellipsis;font-size:14px;overflow:hidden}.session-meta{color:var(--muted);margin-top:2px;font-size:11px}.main{flex-direction:column;flex:1;min-width:0;display:flex}.topbar{border-bottom:1px solid var(--border);align-items:center;gap:10px;min-height:48px;padding:8px 16px;display:flex}.icon-btn{background:0 0;border:0;border-radius:6px;padding:4px 8px;font-size:18px}.icon-btn:hover{background:var(--hover)}.topbar-title{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-weight:500;overflow:hidden}.topbar-folder{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;max-width:40%;font-size:13px;overflow:hidden}.scroll{flex:1;overflow-y:auto}.thread{flex-direction:column;gap:20px;max-width:768px;margin:0 auto;padding:24px 16px 32px;display:flex}.empty{text-align:center;margin-top:18vh}.empty h2{font-family:var(--serif);margin:0 0 8px;font-size:32px;font-weight:400}.muted{color:var(--muted);font-family:var(--mono);font-size:13px}.msg.user{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.bubble{background:var(--user-bubble);white-space:pre-wrap;word-wrap:break-word;border-radius:16px;max-width:85%;padding:10px 16px}.msg.assistant{flex-direction:column;gap:10px;display:flex}.markdown{font-family:var(--serif);overflow-wrap:anywhere;font-size:16.5px;line-height:1.65}.markdown>:first-child{margin-top:0}.markdown>:last-child{margin-bottom:0}.markdown a{color:var(--accent)}.markdown code{font-family:var(--mono);background:var(--user-bubble);border-radius:4px;padding:1px 5px;font-size:.85em}.markdown pre{background:var(--code-bg);color:#e6e4dc;border-radius:10px;padding:14px 16px;font-size:13.5px;line-height:1.5;overflow-x:auto}.markdown pre code{font-size:inherit;background:0 0;padding:0}.markdown table{border-collapse:collapse;font-family:var(--sans);font-size:14px;display:block;overflow-x:auto}.markdown th,.markdown td{border:1px solid var(--border);padding:6px 10px}.markdown blockquote{border-left:3px solid var(--border);color:var(--muted);margin:0;padding-left:14px}.thinking{color:var(--muted);font-size:14px}.thinking summary{cursor:pointer}.thinking-body{white-space:pre-wrap;border-left:2px solid var(--border);margin-top:6px;padding:8px 0 0 14px}.tool{border:1px solid var(--border);background:var(--surface);border-radius:10px;font-size:13px}.tool.error{border-color:var(--error)}.tool-summary{cursor:pointer;align-items:center;gap:8px;padding:7px 12px;list-style:none;display:flex}.tool-summary::-webkit-details-marker{display:none}.tool-name{flex-shrink:0;font-weight:600}.tool-arg{font-family:var(--mono);color:var(--muted);white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.tool-status{color:var(--muted);flex-shrink:0}.tool-body{border-top:1px solid var(--border);flex-direction:column;gap:8px;padding:8px 12px;display:flex}.tool-input,.tool-result{font-family:var(--mono);white-space:pre-wrap;word-break:break-word;max-height:320px;margin:0;font-size:12px;overflow:auto}.tool-result{border-top:1px dashed var(--border);padding-top:8px}.typing{gap:5px;padding:6px 0;display:flex}.typing span{background:var(--accent);border-radius:50%;width:7px;height:7px;animation:1.2s ease-in-out infinite blink}.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:.25}40%{opacity:1}}.error-banner{color:var(--error);border:1px solid var(--error);border-radius:10px;padding:8px 12px;font-size:14px}.composer-wrap{width:100%;max-width:768px;padding:0 16px calc(16px + env(safe-area-inset-bottom));flex-direction:column;gap:8px;margin:0 auto;display:flex}.permission{border:1px solid var(--accent);background:var(--surface);border-radius:14px;padding:12px 14px}.permission-title{margin-bottom:8px;font-weight:500}.permission-input{font-family:var(--mono);white-space:pre-wrap;word-break:break-word;background:var(--user-bubble);border-radius:8px;max-height:200px;margin:0 0 10px;padding:8px 10px;font-size:12px;overflow:auto}.permission-actions{gap:8px;display:flex}.btn{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:8px;padding:7px 14px;text-decoration:none}.btn:hover{background:var(--hover)}.btn-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.btn-primary:hover{background:var(--accent);filter:brightness(1.08)}.composer{border:1px solid var(--border);background:var(--surface);border-radius:18px;flex-direction:column;gap:6px;padding:12px 10px 8px 16px;display:flex;box-shadow:0 2px 12px #0000000a}.composer-input{resize:none;color:var(--text);font:inherit;background:0 0;border:0;outline:none;flex:1;max-height:240px;padding:4px 0;font-size:16px;line-height:1.5}.composer.drag-over{border-color:var(--accent);background:var(--user-bubble)}.composer-bar{align-items:center;gap:6px;display:flex}.composer-spacer{flex:1}.attach-btn{margin-left:-8px;font-size:16px}.model-select{color:var(--muted);font:inherit;cursor:pointer;background:0 0;border:0;border-radius:8px;max-width:160px;padding:6px 4px;font-size:13px}.model-select:hover{background:var(--hover);color:var(--text)}.attachments{flex-wrap:wrap;gap:8px;display:flex}.attachment{border:1px solid var(--border);background:var(--bg);border-radius:10px;align-items:center;gap:6px;max-width:220px;padding:4px 6px 4px 4px;font-size:13px;display:flex}.attachment img{object-fit:cover;border-radius:6px;width:40px;height:40px}.attachment-icon{background:var(--user-bubble);border-radius:6px;place-items:center;width:40px;height:40px;font-size:20px;display:grid}.attachment-name{white-space:nowrap;text-overflow:ellipsis;min-width:0;overflow:hidden}.attachment-status{color:var(--muted);flex-shrink:0}.attachment.uploading{opacity:.6}.attachment.error{border-color:var(--error)}.attachment.error .attachment-status{color:var(--error)}.attachment-remove{color:var(--muted);background:0 0;border:0;flex-shrink:0;padding:0 2px}.attachment-remove:hover{color:var(--text)}.msg-attachments{flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:85%;display:flex}.msg-image{border:1px solid var(--border);object-fit:cover;border-radius:12px;max-width:240px;max-height:240px}.file-chip{border:1px solid var(--border);background:var(--surface);border-radius:10px;padding:6px 10px;font-size:13px}.send-btn{background:var(--accent);width:34px;height:34px;color:var(--accent-text);border:0;border-radius:10px;flex-shrink:0;font-size:16px;font-weight:700}.send-btn.stop{background:var(--text);color:var(--bg);font-size:12px}.diff{font-family:var(--mono);background:var(--user-bubble);border-radius:8px;max-height:360px;margin:0;padding:6px 0;font-size:12px;line-height:1.5;overflow:auto}.diff span{white-space:pre-wrap;word-break:break-word;padding:0 10px;display:block}.diff .add{background:#2ea04329}.diff .del{background:#f8514929}.diff .ctx{color:var(--muted)}.permission .diff{max-height:220px;margin-bottom:10px}.tool-open{border:1px solid var(--border);background:var(--bg);border-radius:6px;flex-shrink:0;padding:1px 8px;font-size:12px}.tool-open:hover{background:var(--hover)}.topbar-docs{flex-shrink:0;padding:4px 10px;font-size:13px}.artifact-panel{border-left:1px solid var(--border);background:var(--surface);flex-direction:column;flex-shrink:0;width:46%;min-width:360px;display:flex}.artifact-header{border-bottom:1px solid var(--border);align-items:center;gap:8px;min-height:48px;padding:8px 12px;display:flex}.artifact-select,.artifact-title{min-width:0;font:inherit;color:var(--text);white-space:nowrap;text-overflow:ellipsis;flex:1;font-weight:500;overflow:hidden}.artifact-select{border:1px solid var(--border);background:var(--bg);border-radius:8px;padding:5px 8px}.artifact-header .btn{padding:4px 10px;font-size:13px;text-decoration:none}.artifact-body{flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}.artifact-frame{background:#fff;border:0;flex:1;width:100%}.artifact-doc{padding:24px 28px}.artifact-text{font-family:var(--mono);white-space:pre-wrap;margin:0;padding:16px;font-size:13px}.artifact-image{place-items:center;padding:16px;display:grid}.artifact-image img{max-width:100%;height:auto}.artifact-empty{text-align:center;color:var(--muted);margin:auto;line-height:2.2}.artifact-empty .btn{color:var(--text);text-decoration:none}.sheet-tabs{border-bottom:1px solid var(--border);flex-shrink:0;gap:2px;padding:6px 8px 0;display:flex;overflow-x:auto}.sheet-tab{white-space:nowrap;background:0 0;border:1px solid #0000;border-bottom:0;border-radius:6px 6px 0 0;padding:5px 12px;font-size:13px}.sheet-tab.active{border-color:var(--border);background:var(--bg);font-weight:500}.backdrop{display:none}.topbar,.artifact-header{padding-top:max(8px, env(safe-area-inset-top))}.sidebar{padding-top:max(12px, env(safe-area-inset-top));padding-bottom:max(12px, env(safe-area-inset-bottom))}.topbar{padding-left:max(16px, env(safe-area-inset-left));padding-right:max(16px, env(safe-area-inset-right))}@media (width<=800px){.sidebar{z-index:10;position:fixed;inset:0 auto 0 0;box-shadow:4px 0 24px #0003}.backdrop{z-index:9;background:#00000059;display:block;position:fixed;inset:0}.artifact-panel{z-index:20;border-left:0;width:auto;min-width:0;position:fixed;inset:0}}@media (width>=801px) and (width<=1200px){.app.artifact-open.sidebar-open .sidebar{display:none}}@media (hover:none){.folder-edit{opacity:1}}.new-chat,.btn,.icon-btn,.send-btn,.file-chip,.topbar-folder,.folder-edit,.tool-status{justify-content:center;align-items:center;gap:6px;display:inline-flex}.new-chat{justify-content:flex-start}.icon-btn{color:var(--muted)}.icon-btn:hover{color:var(--text)}.folder-icon{color:var(--muted);display:inline-flex}.folder.current>.folder-head .folder-icon{color:var(--accent)}.tool.error .tool-status{color:var(--error)}.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.modal-backdrop{z-index:50;background:#0006;place-items:center;padding:16px;display:grid;position:fixed;inset:0}.modal{background:var(--surface);border:1px solid var(--border);border-radius:16px;width:min(420px,100%);padding:20px 22px;box-shadow:0 12px 40px #00000040}.modal h3{overflow-wrap:anywhere;margin:0 0 8px;font-size:17px;font-weight:600}.modal p{color:var(--muted);margin:0 0 16px;line-height:1.5}.modal .error-banner{margin-bottom:12px}.modal-actions{justify-content:flex-end;gap:8px;display:flex}.btn-danger{background:var(--error);border-color:var(--error);color:#fff}.btn-danger:hover{background:var(--error);filter:brightness(1.08)}.notice-banner{color:var(--muted);border:1px solid var(--border);border-radius:10px;padding:8px 12px;font-size:14px}.session-running{color:var(--accent);vertical-align:-1px;margin-right:6px}.msg-cost{color:var(--muted,#8a8a8a);flex-wrap:wrap;gap:4px 12px;margin-top:6px;font-size:12px;display:flex}.msg-cost b{color:var(--text,inherit);font-weight:600}.msg-cost-note{color:#b7791f}.stats-bar{color:var(--muted,#8a8a8a);flex-wrap:wrap;gap:4px 10px;margin-left:auto;font-size:12px;display:flex}.stats-bar b{color:var(--text,inherit)}@media (width<=800px){.stats-bar span:not(:first-child){display:none}}
