/* FLotp AI conversation workspace. All interface resources are served locally. */
:root{font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#252a34;background:#fff;font-synthesis:none;--blue:#4169e1;--muted:#8a909d;--line:#e9ebef;--sidebar:252px;--app-height:100dvh}
*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,textarea,select{font:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{cursor:not-allowed;opacity:.48}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #4169e1;outline-offset:3px}svg{width:20px;height:20px;flex-shrink:0}button{color:inherit}button[hidden],[hidden]{display:none!important}.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}.skip-link{position:fixed;top:-100px;left:16px;z-index:100;background:#fff;padding:12px}.skip-link:focus{top:8px}
.app-layout{height:var(--app-height);display:flex;overflow:hidden}.app-sidebar{width:var(--sidebar);flex:none;background:#f7f8fa;border-right:1px solid #f0f1f4;display:flex;flex-direction:column;padding:20px 14px 12px;transition:margin .25s,transform .25s;overflow-y:auto;overscroll-behavior:contain;z-index:30}.sidebar-brand{display:flex;align-items:center;justify-content:space-between;padding:0 4px;margin-bottom:30px;min-height:38px}.sidebar-brand>a{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:700;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:31px;height:33px;border-radius:11px;background:#edf1ff;color:var(--blue)}.brand-mark svg{width:27px;height:27px}.icon-button{display:inline-grid;place-items:center;flex-shrink:0;width:38px;height:38px;padding:0;border:0;background:transparent;border-radius:9px;color:#747b89}.icon-button:hover{background:#e9ecf2;color:#2d3543}.new-chat-button{border:1px solid #dce4ff;color:#3c61d0;background:#edf2ff;display:flex;align-items:center;gap:10px;padding:12px 13px;min-height:46px;border-radius:12px;font-size:14px;font-weight:550}.new-chat-button:hover{background:#e1eaff}.new-chat-button kbd{margin-left:auto;color:#8b9cc9;font-size:10px;font-family:inherit;font-weight:400}.side-nav{display:flex;flex-direction:column;gap:4px;margin-top:20px}.side-nav>a,.side-nav>button{display:flex;align-items:center;gap:12px;padding:12px;border:0;border-radius:9px;background:transparent;text-align:left;font-size:14px;width:100%;min-height:44px;color:#535b6c}.side-nav>a:hover,.side-nav>button:hover{background:#eceff4;color:#222}.side-nav small{margin-left:auto;font-size:10px;color:#929baa;border:1px solid #dfe3ec;border-radius:5px;padding:1px 5px}.recent-heading{display:flex;justify-content:space-between;align-items:center;color:#8c94a2;font-size:11px;padding:26px 12px 12px}.recent-heading small{font-size:10px}.sidebar-conversations{flex:1;min-height:80px}.sidebar-empty{color:#9aa1ae;font-size:12px;line-height:1.9;margin:4px 12px;max-width:170px}.recent-conversation{padding:9px 11px;border-radius:10px;margin:2px 0 5px;min-width:0}.recent-conversation:hover,.recent-conversation.active{background:#e9edf5}.recent-title{background:none;border:0;text-align:left;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;padding:3px 0}.recent-actions{display:flex;gap:10px;margin-top:4px}.recent-actions button{border:0;background:none;padding:3px 0;font-size:10px;color:#8b93a3}.recent-actions button:hover{color:var(--blue)}.sidebar-help{padding:12px;color:#9098a5;font-size:11px;line-height:1.8}.sidebar-help summary{cursor:pointer}.sidebar-help p{font-size:11px}.sidebar-help #chat-examples{display:flex;flex-direction:column;gap:5px}.sidebar-help button{padding:6px;text-align:left;font-size:11px;border:1px solid var(--line);background:white;border-radius:6px;color:#6a7486}.sidebar-account{border-top:1px solid #e6e9ef;padding:16px 8px 5px;display:flex;align-items:center;gap:10px;min-height:55px}.account-avatar{width:30px;height:30px;display:grid;place-items:center;background:#e4e9f4;color:#687796;border-radius:50%;font-size:12px;flex:none}#chat-account{font-size:12px;line-height:1.7;overflow-wrap:anywhere}#chat-account a{color:var(--blue)}#chat-account button{border:0;color:var(--blue);background:transparent}.sidebar-bottom-note{font-size:9px;color:#a5acb8;padding:7px 8px 0}
.chat-workspace{display:flex;flex:1;flex-direction:column;min-width:0;position:relative;overflow:hidden}.workspace-header{height:72px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 28px}.header-start,.header-actions{display:flex;align-items:center;gap:12px;min-width:0}.chat-model{min-width:0}.chat-model select{appearance:auto;border:0;outline:0;background:#fff;font-size:16px;font-weight:600;color:#444c5e;padding:8px 4px;width:190px;max-width:100%}.console-entry{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px;color:#667084;border:1px solid var(--line);border-radius:9px;padding:8px 12px;min-height:36px}.console-entry svg{width:15px;height:15px}.console-entry:hover{background:#f7f8fa}.chat-conversation-line{padding:0 32px;display:flex;justify-content:space-between;gap:12px;font-size:10px;color:#9ba3b0;min-height:24px;flex:none}#chat-current-title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:70%}#chat-save-state{white-space:nowrap}.is-empty .chat-conversation-line{visibility:hidden}.chat-main{min-height:0;flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.chat-messages{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:22px max(32px,calc((100% - 800px)/2)) 34px;scrollbar-width:thin;scrollbar-color:#d8dce5 transparent;overscroll-behavior:contain;scroll-padding-bottom:20px}.chat-welcome{text-align:center;padding:0 12px}.chat-welcome h1{font-size:clamp(24px,2.5vw,32px);font-weight:600;letter-spacing:-.7px;line-height:1.5;margin:0 0 12px;color:#303749}.chat-welcome p{font-size:14px;color:#9aa2b2;margin:0;line-height:1.8}.is-empty .chat-main{justify-content:center;padding-bottom:clamp(25px,8vh,100px)}.is-empty .chat-messages{flex:none;overflow:visible;padding:20px 24px 32px}.is-empty .composer-area{padding-bottom:0}.composer-area{flex:none;width:min(100%,864px);margin:0 auto;padding:0 32px 10px;max-height:65%;overflow:auto;scrollbar-width:thin}.chat-composer{border:1px solid #e2e6ed;background:#f9fafc;border-radius:22px;padding:18px 18px 13px;transition:border-color .2s,box-shadow .2s;box-shadow:0 3px 14px #19264803}.chat-composer:focus-within{border-color:#becdf8;box-shadow:0 0 0 3px #4169e109}.chat-composer textarea{resize:none;border:0;outline:0;background:transparent;color:#293347;width:100%;display:block;min-height:60px;max-height:180px;line-height:1.7;font-size:16px;padding:0 2px;overflow-y:auto}.chat-composer textarea::placeholder{color:#a2aaba}.chat-composer-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}.chat-modes{display:flex;gap:6px;min-width:0}.chat-modes button{border:1px solid #e2e6ed;border-radius:20px;background:#fff;color:#778195;padding:7px 14px;font-size:12px;min-height:34px}.chat-modes button[aria-pressed=true]{background:#edf2ff;border-color:#cfdbfc;color:#4266d5}.send-actions{display:flex;align-items:center;gap:6px}#chat-send,#chat-stop{background:var(--blue);color:#fff;border:0;border-radius:12px;min-height:38px;padding:8px 14px;white-space:nowrap;font-size:13px}#chat-stop{background:#eef1f7;color:#576681;border:1px solid #dce2ee}#chat-stop:not([hidden])+#chat-send{display:none}.chat-upload-tools{display:flex;align-items:center;gap:6px;margin:8px 0 0;flex-wrap:wrap}.chat-upload-tools button{border:0;background:transparent;border-radius:7px;font-size:11px;color:#8b95a5;padding:7px;min-height:32px}.chat-upload-tools button:hover{background:#ecf0f7;color:#4769c4}.chat-upload-tools>span{margin-left:auto;font-size:10px;color:#b0b7c3}.work-output{display:flex;align-items:center;gap:10px;font-size:11px;color:#8791a1;margin:8px 0}.work-output select{border:1px solid #e3e7ef;border-radius:7px;color:#65748c;background:#fff;padding:5px 8px;font-size:12px}.chat-disclaimer{font-size:10px;color:#a6adba;text-align:center;line-height:1.7;margin:10px 0 0}.chat-disclaimer span{display:block;font-size:9px}#chat-status{font-size:12px;color:#6f7c94;line-height:1.7;padding:0 4px;margin:8px 0;overflow-wrap:anywhere}#chat-status:empty{display:none}.latest-button{position:absolute;bottom:var(--composer-height,235px);right:max(36px,calc((100% - 800px)/2));z-index:3;border:1px solid #e0e6f0;border-radius:22px;box-shadow:0 4px 15px #243d6a0d;background:white;color:#687b9d;display:flex;align-items:center;gap:5px;padding:8px 12px;font-size:11px}.latest-button svg{width:15px;height:15px}
.chat-message{max-width:100%;margin:0 0 30px;display:flex;flex-direction:column;align-items:flex-start;min-width:0;overflow-wrap:anywhere}.chat-message.user{align-items:flex-end}.chat-message-label{font-size:10px;color:#a2aaba;margin:0 0 9px}.chat-message-text{font-size:15px;line-height:1.9;color:#303b4e;white-space:pre-wrap;max-width:100%;min-width:0}.chat-message.user .chat-message-text{background:#f0f3f9;border-radius:18px;padding:11px 17px;max-width:90%}.chat-message.assistant .chat-message-text{width:100%;padding:0 2px}.message-actions{display:flex;flex-wrap:wrap;gap:3px;margin-top:9px}.message-actions button{border:0;background:none;border-radius:5px;padding:5px 7px;font-size:10px;color:#9aa4b5}.message-actions button:hover{color:#4169e1;background:#f0f4ff}.message-actions .export-button{border:1px solid #e8ecf2}.chat-message small{font-size:10px;color:#b08272}.chat-message-text.formatted{white-space:normal}.formatted p{margin:0 0 14px;line-height:1.9}.formatted h1,.formatted h2,.formatted h3{font-size:20px;line-height:1.6;margin:23px 0 12px}.formatted h2{font-size:18px}.formatted h3,.formatted h4,.formatted h5,.formatted h6{font-size:16px}.formatted ul,.formatted ol{padding-left:24px;margin:10px 0 18px}.formatted li{padding:3px 0}.formatted a{color:#4169e1;text-decoration:underline}.formatted blockquote{margin:16px 0;border-left:3px solid #ced9f5;padding:4px 16px;color:#7a869a;background:#f8faff}.formatted hr{border:0;border-top:1px solid #e4e9f1;margin:22px 0}.formatted :not(pre)>code{border-radius:4px;background:#eff3f8;padding:2px 5px;font-size:.88em;color:#556279}.formatted>:first-child{margin-top:0}.code-block{border:1px solid #e5e9f1;border-radius:12px;overflow:hidden;margin:18px 0;max-width:100%;background:#f7f9fc}.code-header{display:flex;justify-content:space-between;align-items:center;background:#eef2f8;padding:8px 13px;color:#8591a6;font-size:11px}.copy-code{border:0;background:none;color:#6b7e9f;font-size:11px;padding:5px}.code-block pre{margin:0;padding:16px;overflow:auto;white-space:pre;font:13px/1.8 Consolas,"SFMono-Regular",monospace}.code-block code{font:inherit;color:#374767}.hljs-keyword,.hljs-selector-tag,.hljs-literal{color:#8656bc}.hljs-string,.hljs-regexp,.hljs-attr{color:#37774b}.hljs-number,.hljs-built_in{color:#b36b2b}.hljs-comment,.hljs-quote{color:#96a0b2;font-style:italic}.hljs-title,.hljs-section{color:#386fc3}.answer-table{width:100%;max-width:100%;overflow-x:auto;margin:18px 0}.answer-table table{border-collapse:collapse;font-size:13px;min-width:260px;width:100%}.answer-table td,.answer-table th{border:1px solid #e2e7ef;padding:10px 12px;text-align:left;white-space:normal}.answer-table th{background:#f4f6fa;font-weight:600}
.chat-attachments{display:flex;flex-wrap:wrap;gap:8px;max-width:100%}.chat-attachments:empty{display:none}.chat-file-chip{display:flex;align-items:center;gap:8px;padding:7px 9px;border:1px solid #e1e7f0;background:#fff;border-radius:10px;max-width:100%;font-size:11px;color:#7c8a9f;margin-top:8px}.chat-file-chip img{width:45px;height:45px;object-fit:cover;border-radius:6px}.chat-file-chip span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-remove{border:0;background:none;font-size:18px;color:#95a0b2;padding:4px}
.history-dialog,.chat-edit-dialog{border:1px solid #e2e7f0;border-radius:20px;background:#fff;color:#38445a;box-shadow:0 30px 100px #192b4a26;padding:0;width:min(900px,92vw);max-width:92vw;max-height:88dvh;overflow:auto;overscroll-behavior:contain}.history-dialog[open],.chat-edit-dialog[open]{animation:dialog-open .2s ease-out}dialog::backdrop{background:#26364d55;backdrop-filter:blur(3px)}.history-header{display:flex;align-items:center;justify-content:space-between;padding:24px 28px;border-bottom:1px solid var(--line);background:#fff;position:sticky;top:0;z-index:2}.history-header h2{font-size:21px;margin:0 0 5px}.history-header p{font-size:11px;color:#96a0b1;margin:0}.history-header button{width:34px;height:34px;border:1px solid var(--line);background:white;border-radius:50%;color:#8794a8;font-size:24px}.history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 28px;color:#939fb1;font-size:11px}.history-toolbar button,.history-card-actions button{font-size:11px;border:1px solid #e1e6f0;background:#fff;border-radius:7px;padding:8px 11px;color:#6d7f9e;white-space:nowrap}.history-list{padding:0 28px 25px}.history-empty{padding:50px 10px;text-align:center;font-size:13px;color:#99a4b6}.history-card{border:1px solid var(--line);border-radius:14px;padding:20px;margin-bottom:16px}.history-card-header h3{font-size:15px;line-height:1.6;margin:0 0 5px;overflow-wrap:anywhere}.history-card-header p{font-size:10px;color:#99a4b6;margin:0}.history-card-actions{display:flex;gap:8px;margin:14px 0}.history-messages{border-top:1px solid var(--line);padding-top:13px}.history-messages summary{font-size:12px;cursor:pointer;color:#7b8caa;margin-bottom:18px}.history-messages .chat-message{margin-bottom:20px}.chat-edit-dialog{width:min(650px,92vw);padding:26px}.chat-edit-dialog h2{font-size:19px;margin:0 0 10px}.chat-edit-dialog p{font-size:12px;line-height:1.7;color:#8c99ad}.chat-edit-dialog textarea{width:100%;font-size:14px;line-height:1.8;padding:12px;border:1px solid #d9e1f0;border-radius:10px;resize:vertical;min-height:180px;color:#52627c;background:#fff}.chat-edit-dialog form>div{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}.chat-edit-dialog button{border:1px solid #dce4f2;background:#f8faff;border-radius:8px;padding:10px 18px;color:#7c8fae}.chat-edit-dialog button[type=submit]{background:var(--blue);color:#fff;border:0}@keyframes dialog-open{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.chat-login{display:block;text-align:center;color:var(--blue);font-size:12px;padding:12px 0 0;line-height:1.6}
body.sidebar-collapsed .app-sidebar{margin-left:calc(-1 * var(--sidebar));visibility:hidden}.sidebar-backdrop{display:none}
@media(min-width:761px){body:not(.sidebar-collapsed) #menu-toggle{display:none}}
@media(max-width:1000px) and (min-width:761px){:root{--sidebar:224px}.chat-messages{padding-left:28px;padding-right:28px}.composer-area{padding-left:28px;padding-right:28px}}
@media(max-width:760px){.app-sidebar{position:fixed;inset:0 auto 0 0;height:var(--app-height);width:min(290px,85vw);transform:translateX(-100%);visibility:hidden;padding-top:max(18px,env(safe-area-inset-top));box-shadow:10px 0 40px #1a2a4412;transition:transform .25s ease,visibility .25s}.sidebar-brand{margin-bottom:24px}.sidebar-open .app-sidebar{transform:translateX(0);visibility:visible}body.sidebar-collapsed .app-sidebar{margin-left:0}.sidebar-backdrop{display:block;position:fixed;inset:0;background:#20304b55;border:0;z-index:25;backdrop-filter:blur(2px)}.workspace-header{height:60px;padding:0 12px;gap:5px}.header-start,.header-actions{gap:5px}.header-start{flex:1}.chat-model{flex:1}.chat-model select{font-size:14px;max-width:100%;width:155px;padding:6px 0}.console-entry{padding:8px;font-size:11px;border:0}.console-entry svg{display:none}.icon-button{width:36px;height:36px}.chat-conversation-line{padding:0 18px;min-height:22px;font-size:9px}.chat-messages{padding:20px 18px 28px}.chat-welcome h1{font-size:23px;letter-spacing:-.5px;margin-bottom:10px}.chat-welcome p{font-size:12px}.is-empty .chat-main{padding-bottom:clamp(15px,9vh,80px)}.is-empty .chat-messages{padding:15px 12px 28px}.composer-area{padding:0 12px max(8px,env(safe-area-inset-bottom));max-height:65%}.chat-composer{border-radius:19px;padding:14px 12px 11px}.chat-composer textarea{font-size:16px;min-height:58px}.chat-modes button{padding:7px 12px;font-size:11px;min-height:34px}.chat-composer-bottom{gap:4px}.chat-modes{gap:4px}#chat-send,#chat-stop{font-size:12px;min-height:36px;padding:8px 12px}.chat-upload-tools{gap:2px}.chat-upload-tools button{font-size:10px;padding:6px;min-height:32px}.chat-upload-tools>span{font-size:9px}.chat-disclaimer{font-size:9px;margin-top:8px}.chat-disclaimer span{font-size:8px}.chat-message-text{font-size:15px}.chat-message{margin-bottom:24px}.chat-message.user .chat-message-text{padding:10px 14px;max-width:95%}.message-actions button{min-height:30px;padding:5px 7px}.latest-button{right:18px}.code-block pre{font-size:12px}.history-dialog{width:100%;max-width:100%;height:var(--app-height);max-height:var(--app-height);border:0;border-radius:0;margin:0}.history-header{padding:20px 18px;padding-top:max(20px,env(safe-area-inset-top))}.history-header h2{font-size:20px}.history-header p{font-size:10px}.history-toolbar{padding:12px 18px;font-size:10px}.history-list{padding:0 14px 20px}.history-card{padding:15px}.chat-edit-dialog{padding:20px}.chat-edit-dialog textarea{font-size:16px}.sidebar-help{padding-top:20px}.recent-actions button{min-height:25px}}
@media(max-height:560px){.chat-conversation-line,.chat-disclaimer{display:none}.workspace-header{height:50px}.is-empty .chat-main{padding-bottom:5px;justify-content:flex-end}.is-empty .chat-messages{padding:5px 10px 10px}.chat-welcome h1{font-size:19px;margin:0}.chat-welcome p{display:none}.chat-composer{padding-top:10px}.chat-composer textarea{min-height:34px;max-height:90px}.composer-area{max-height:72%}.chat-upload-tools{margin-top:0}.chat-composer-bottom{margin-top:1px}.sidebar-brand{margin-bottom:12px}.side-nav{margin-top:10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Unified conversation: one compact action row, with document output still available. */
.chat-composer-bottom{gap:8px;margin-top:6px}
.chat-upload-tools{flex:1;min-width:0;gap:4px;margin:0;flex-wrap:nowrap}
.chat-upload-tools>button{display:grid;place-items:center;width:40px;height:40px;min-height:40px;flex:none;padding:0;color:#7b8596}
.work-output{min-width:0;margin:0;gap:0}
.work-output select{max-width:130px;min-width:0;height:36px;font-size:12px;padding:4px 6px;background:transparent;border-color:#e2e6ed;border-radius:18px}
#chat-send{display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;font-size:24px;line-height:1}
.chat-composer{background:#fff;padding:16px 16px 12px}
.chat-composer textarea{min-height:52px}
@media(max-width:760px){
 .workspace-header{height:54px;padding:0 10px}
 .chat-conversation-line{min-height:18px;padding:0 16px}
 .chat-welcome h1{font-size:21px;letter-spacing:-.5px;margin:0}
 .is-empty .chat-messages{padding:12px 12px 24px}
 .is-empty .chat-main{padding-bottom:clamp(20px,9vh,72px)}
 .composer-area{padding-left:12px;padding-right:12px}
 .chat-composer{padding:10px 10px 8px;border-radius:22px;box-shadow:0 2px 8px #19264805}
 .chat-composer textarea{min-height:42px;max-height:128px;font-size:16px;line-height:1.5;padding:2px 4px}
 .chat-composer-bottom{margin-top:2px;gap:6px}
 .chat-upload-tools{gap:2px}
 .chat-upload-tools>button{width:40px;height:40px;min-height:40px}
 .work-output select{width:106px;max-width:106px;height:34px;font-size:11px}
 #chat-send{width:38px;height:38px;min-height:38px;font-size:23px}
 #chat-stop{min-height:38px}
 .chat-disclaimer{font-size:9px;margin-top:6px;line-height:1.5}
 .chat-messages{padding-left:16px;padding-right:16px}
}
@media(max-height:560px){.is-empty .chat-main{padding-bottom:5px}.is-empty .chat-messages{padding-bottom:10px}.chat-composer textarea{min-height:34px;max-height:90px}}
