*{margin:0;padding:0;box-sizing:border-box}:root{--bg:#ffffff;--side:#f3f3f3;--border:#e5e5e5;--text:#333;--muted:#6b6b6b;--hover:#e8e8e8;--active:#e4e6f1;--accent:#007acc}body,html{height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13px}body{overflow:hidden}button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:#c9c9c9;border-radius:6px}.workbench{display:flex;flex-direction:column;height:100dvh}.body{flex:1 1;display:flex;min-height:0}.activitybar{width:48px;background:var(--side);border-right:1px solid var(--border);display:flex;flex-direction:column;align-items:center;padding-top:6px}.activitybar button{width:48px;height:48px;font-size:20px;opacity:.55;border-left:2px solid transparent}.activitybar button:hover{opacity:1}.activitybar button.on{opacity:1;border-left-color:var(--accent)}.explorer{width:230px;background:var(--side);border-right:1px solid var(--border);display:flex;flex-direction:column}.chat-title,.panel-title,.side-title{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;font-size:11px;font-weight:600;letter-spacing:.5px;color:var(--muted)}.chat-title button,.side-title button{font-size:15px;color:var(--text);padding:0 6px;border-radius:4px}.chat-title button:hover,.side-title button:hover{background:var(--hover)}.files{overflow-y:auto;flex:1 1}.file{display:flex;justify-content:space-between;align-items:center;padding:4px 14px;cursor:pointer;font-size:13px}.file:hover{background:var(--hover)}.file.active{background:var(--active)}.fname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fact{display:none;gap:2px}.file:hover .fact{display:flex}.fact button{font-size:11px;padding:1px 3px;border-radius:3px}.fact button:hover{background:#d4d4d4}.editor-area{flex:1 1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}.tabs{background:var(--side);border-bottom:1px solid var(--border);overflow-x:auto;min-height:35px}.tab,.tabs{display:flex}.tab{align-items:center;gap:6px;padding:0 12px;border-right:1px solid var(--border);cursor:pointer;color:var(--muted);white-space:nowrap}.tab.active{background:var(--bg);color:var(--text);border-top:2px solid var(--accent)}.tab button{font-size:11px;opacity:.5;padding:2px 4px;border-radius:4px}.tab button:hover{opacity:1;background:var(--hover)}.tabs-spacer{flex:1 1}.tabs-btn{padding:0 12px;color:var(--muted)}.tabs-btn:hover{color:var(--text)}.editor-wrap{min-height:0}.editor-loading,.welcome{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);gap:6px}.welcome h2{font-weight:300;font-size:26px;color:var(--text)}.preview{flex:1 1;display:flex;flex-direction:column;border-top:1px solid var(--border);min-height:0}.preview iframe{flex:1 1;border:none;background:#fff;width:100%}.chat{width:360px;background:var(--side);border-left:1px solid var(--border);min-width:0}.chat,.model-row{display:flex;flex-direction:column}.model-row{padding:0 14px 10px;gap:4px}.model-row label{font-size:11px;color:var(--muted)}.model-row select{padding:6px 8px;border:1px solid #c8c8c8;border-radius:4px;background:#fff;font:inherit;outline:none}.model-row select:focus{border-color:var(--accent)}.chat-messages{flex:1 1;overflow-y:auto;padding:10px 14px;display:flex;flex-direction:column;gap:12px;background:#fff;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}.chat-empty{color:var(--muted);line-height:1.7;margin:auto 0;text-align:center}.cmsg{line-height:1.55;word-break:break-word}.cmsg.user{align-self:flex-end;background:var(--accent);color:#fff;padding:8px 12px;border-radius:10px 10px 2px 10px;max-width:90%;white-space:pre-wrap}.cmsg.assistant p{white-space:pre-wrap;margin-bottom:6px}.codeblock{border:1px solid var(--border);border-radius:6px;overflow:hidden;margin:6px 0}.codehead{display:flex;justify-content:space-between;align-items:center;background:var(--side);padding:4px 8px;font-size:11px;color:var(--muted)}.codehead button{padding:2px 8px;margin-left:4px;border-radius:4px;color:var(--accent)}.codehead button:hover{background:var(--hover)}.codeblock pre{padding:10px;overflow-x:auto;font:12px/1.5 Consolas,Courier New,monospace;background:#fafafa;white-space:pre}.chat-input{padding:10px 14px 12px;display:flex;flex-direction:column;gap:8px}.ctx{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}.chat-input .row{display:flex;gap:8px;align-items:flex-end}.chat-input textarea{flex:1 1;resize:none;padding:8px;border:1px solid #c8c8c8;border-radius:4px;font:inherit;outline:none}.chat-input textarea:focus{border-color:var(--accent)}.chat-input .row button{background:var(--accent);color:#fff;padding:8px 14px;border-radius:4px}.chat-input .row button:disabled{opacity:.45;cursor:not-allowed}.statusbar{display:flex;gap:16px;align-items:center;background:var(--accent);color:#fff;padding:0 12px;height:22px;font-size:12px}.statusbar .right{margin-left:auto}@media(max-width:900px){.chat{position:fixed;right:0;top:0;bottom:22px;width:min(100%,380px);z-index:20;box-shadow:-4px 0 24px rgba(0,0,0,.15)}.explorer{width:180px}}