/* V3 styles stay inside the optimization workspace and its native dialogs. */
body.opt-page .workspace{padding:18px!important;min-height:0}body.opt-page .content{min-width:0}body.opt-page #ai-launch{right:8px;bottom:8px;transform:scale(.65);transform-origin:bottom right}body.opt-page #opt-send{margin-right:52px}
#opt-root,.opt-dialog{--opt-ink:#18201d;--opt-muted:#67716d;--opt-line:#dfe5e2;font:14px/1.8 "Microsoft YaHei UI","Microsoft YaHei",sans-serif;letter-spacing:0;color:var(--opt-ink);text-shadow:none;background:#fff;box-sizing:border-box}
#opt-root *,.opt-dialog *{box-sizing:border-box;letter-spacing:0}#opt-root{height:calc(100dvh - 114px);min-height:560px;border:1px solid var(--opt-line);border-radius:8px;overflow:hidden;display:flex;flex-direction:column;position:relative}
#opt-root h1,#opt-root h2,.opt-dialog h2,.opt-dialog h3{font-family:inherit;color:#242924;background:none;text-shadow:none;line-height:1.5;margin:0;font-weight:600}#opt-root h1{font-size:18px}#opt-root h2{font-size:17px}
#opt-root button,.opt-dialog button{font-family:inherit;font-size:12px;letter-spacing:0;text-shadow:none;box-shadow:none;clip-path:none;transform:none;transition:background .15s;color:#39483f;cursor:pointer;white-space:nowrap;flex-shrink:0}#opt-root button::before,#opt-root button::after,.opt-dialog button::before,.opt-dialog button::after{display:none}
.opt-button{border:1px solid transparent;background:transparent;padding:5px 9px;border-radius:5px;min-height:32px}.opt-button:hover{background:#e4ebe7!important}.opt-button:disabled{opacity:.4;cursor:default!important}.opt-icon{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:7px}.opt-primary{background:#263f32!important;color:white!important;border:0;border-radius:5px;padding:7px 18px;min-height:34px}
#opt-root :focus-visible,.opt-dialog :focus-visible{outline:2px solid #397c60;outline-offset:2px}
#opt-root input,#opt-root textarea,#opt-root select,.opt-dialog input,.opt-dialog textarea,.opt-dialog select{font:inherit;font-size:13px;background:#fff;color:var(--opt-ink);border:1px solid #d7ddd9;border-radius:5px;padding:8px 10px;min-width:0;max-width:100%;box-shadow:none;text-shadow:none;letter-spacing:0;width:100%}
#opt-root input:disabled,#opt-root textarea:disabled,.opt-dialog input:disabled,.opt-dialog textarea:disabled{background:#f3f5f4}#opt-root select,.opt-dialog select{appearance:auto;background-image:none;padding-right:6px}
.opt-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;border-bottom:1px solid var(--opt-line);min-height:64px;flex-shrink:0}.opt-toolbar-title,.opt-toolbar-actions{display:flex;align-items:center;gap:14px;min-width:0}.opt-toolbar-title [data-opt=toggle-list]{display:none}#opt-connection,.opt-bridge-text{font-size:12px;color:var(--opt-muted)}#opt-bridge{display:flex;align-items:center;gap:4px}
.opt-layout{display:grid;grid-template-columns:242px minmax(0,1fr);flex:1;min-height:0}.opt-sidebar{padding:15px 12px;background:#f5f6f5;border-right:1px solid var(--opt-line);display:flex;flex-direction:column;gap:12px;min-height:0}.opt-new{width:100%;border:1px solid #d7ddd9;background:white;display:flex;gap:8px;align-items:center;justify-content:flex-start;padding:7px 10px;height:36px}.opt-search{position:relative}.opt-search svg{position:absolute;left:10px;top:11px;color:var(--opt-muted)}#opt-search{padding-left:34px}.opt-list{overflow:auto;flex:1;min-height:0}.opt-conversation{display:block;padding:12px;margin-bottom:5px;border-radius:6px;color:var(--opt-ink);text-decoration:none}.opt-conversation:hover{background:#edf0ed}.opt-conversation.selected{background:#e4ebe7}.opt-conversation strong{display:block;font-size:13px;font-weight:500;overflow-wrap:anywhere;line-height:1.65}.opt-conversation span,.opt-conversation small{display:block;font-size:11px;color:var(--opt-muted);margin-top:4px;overflow-wrap:anywhere}.opt-pager{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:11px;color:var(--opt-muted)}.opt-pager button{font-size:11px!important;padding:4px 6px}
.opt-main{display:flex;flex-direction:column;min-height:0;min-width:0;position:relative;background:#fff}.opt-run-head{padding:17px 24px;display:flex;gap:10px;justify-content:space-between;align-items:center;border-bottom:1px solid #edf0ee}.opt-run-head>div:first-child{min-width:0}.opt-run-head h2{overflow-wrap:anywhere}.opt-run-head span{font-size:11px;color:var(--opt-muted)}.opt-run-head>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end}.opt-inputs{padding:6px 20px;display:flex;gap:4px;flex-wrap:wrap}.opt-inputs button{max-width:100%;overflow:hidden;text-overflow:ellipsis}.opt-question-banner{margin:10px 24px 0;padding:10px 14px;border:1px solid #dce5df;border-radius:6px;background:#f4f7f5;display:flex;align-items:center;gap:12px;font-size:12px;flex-wrap:wrap}.opt-question-banner strong{overflow-wrap:anywhere;min-width:0}.opt-question-banner span{color:var(--opt-muted);flex:1}
#opt-messages{flex:1;min-height:70px;overflow:auto;padding:24px 30px;scrollbar-gutter:stable}.opt-message-column{max-width:780px;margin:auto}.opt-message{margin-bottom:30px;min-width:0}.opt-message-meta{display:flex;gap:12px;justify-content:space-between;color:var(--opt-muted);font-size:11px;margin-bottom:8px}.opt-message-body{overflow-wrap:anywhere;font-size:14px;line-height:1.8;min-width:0}.opt-message-body p{margin:0 0 10px}.opt-message-body ul,.opt-message-body ol{padding-left:24px}.opt-message-body pre,.opt-public-question pre,.opt-answer-receipt pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;margin:0}.opt-message-body pre:has(code){white-space:pre;overflow:auto;padding:14px;background:#f3f5f4;border-radius:5px;max-width:100%}.opt-message-body code{font:12px/1.8 Consolas,monospace}.opt-message-body table{display:block;overflow:auto;max-width:100%;border-collapse:collapse}.opt-message-body td,.opt-message-body th{border:1px solid #dfe5e2;padding:6px 10px;white-space:nowrap;font-size:12px}.opt-message-body a,.opt-public-question a{color:#286a92}.opt-kind-request,.opt-kind-answer,.opt-kind-discussion{margin-left:10%}.opt-kind-request .opt-message-body,.opt-kind-answer .opt-message-body,.opt-kind-discussion .opt-message-body{background:#f0f2f1;padding:12px 16px;border-radius:8px}.opt-kind-system{border-left:2px solid #dfe5e2;padding-left:12px;color:var(--opt-muted)}.opt-kind-system .opt-message-body{font-size:12px}.opt-message-tools{display:flex;gap:2px;margin-top:6px;flex-wrap:wrap}.opt-message-tools .opt-button{font-size:10px!important;color:#77817b!important;min-height:24px;padding:2px 7px}.opt-latest{position:absolute;bottom:245px;right:24px}.opt-latest button{border:1px solid #dfe5e2;background:white;box-shadow:0 2px 8px #18201d12!important}
.opt-compose-wrap{padding:0 24px 14px;flex-shrink:0;width:100%;max-width:828px;margin:0 auto}.opt-compose-wrap form{border:1px solid #d7ddd9;border-radius:8px;background:white;padding:9px 12px}.opt-compose-meta{display:flex;gap:8px}.opt-compose-meta input{flex:1}.opt-compose-meta select{width:auto!important;max-width:35%!important;border:0!important;background:#f5f6f5!important;padding:3px 6px!important;font-size:11px!important}.opt-compose-meta input{font-size:12px!important;padding:3px 6px!important;border:0!important}#opt-prompt{min-height:70px;max-height:180px;resize:vertical;border:0!important;padding:9px 2px!important;line-height:1.8;display:block}.opt-compose-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px}.opt-compose-bottom>div{display:flex;align-items:center;gap:4px;min-width:0}#opt-draft-status{font-size:10px;color:var(--opt-muted);overflow-wrap:anywhere}#opt-send{width:34px;height:34px;min-height:34px;border:0;border-radius:5px;background:#263f32;color:white;display:flex;align-items:center;justify-content:center;padding:7px;margin:0}#opt-send:disabled{opacity:.45;cursor:default}.opt-compose-wrap>p{font-size:10px;color:#78827c;text-align:center;margin:6px 0 0;line-height:1.6}#opt-files{display:flex;gap:6px;flex-wrap:wrap}.opt-file{display:flex;align-items:center;gap:6px;padding:5px;border:1px solid #dfe5e2;border-radius:5px;max-width:100%;min-width:0}.opt-file img{width:38px;height:38px;object-fit:cover;border-radius:3px}.opt-file span{font-size:11px;min-width:0;overflow-wrap:anywhere}.opt-file small{display:block;color:var(--opt-muted);font-size:10px}.opt-alert{margin-top:7px;border:1px solid #e8cccc;background:#fff7f7;color:#9c3333;padding:6px 8px;font-size:12px;display:flex;align-items:center;gap:8px;overflow-wrap:anywhere}.opt-alert span{flex:1}.opt-alert[hidden],#opt-latest[hidden]{display:none}
.opt-empty{max-width:470px;margin:10vh auto;text-align:center;color:var(--opt-muted);font-size:13px}.opt-empty h2{font-size:22px!important;margin-bottom:14px!important}.opt-empty p{margin:10px 0}.opt-empty-small{padding:25px 8px;color:var(--opt-muted);text-align:center;font-size:12px}
.opt-dialog{padding:0;border:1px solid #dfe5e2;border-radius:8px;width:min(620px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px);box-shadow:0 18px 65px #18201d33;overflow:hidden;position:fixed;margin:auto;inset:0;clip-path:none}.opt-dialog::backdrop{background:#18201d60}.opt-dialog[open]{display:flex;flex-direction:column}.opt-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;border-bottom:1px solid #dfe5e2;flex-shrink:0}.opt-dialog h2{font-size:17px;overflow-wrap:anywhere}.opt-dialog-body{padding:18px 20px;overflow:auto;min-height:0}.opt-dialog>footer{border-top:1px solid #dfe5e2;display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:12px 20px;flex-shrink:0}.opt-dialog .opt-muted{color:var(--opt-muted);font-size:12px;margin-top:0}.opt-public-question,.opt-dialog details{overflow-wrap:anywhere;font-size:13px}.opt-dialog fieldset{border:0;padding:10px 0;margin:16px 0;border-top:1px solid #e5e9e6;min-width:0}.opt-dialog legend{font-weight:600;font-size:14px;padding-right:10px;overflow-wrap:anywhere}.opt-choice{display:flex;gap:10px;align-items:flex-start;padding:8px 0;cursor:pointer}.opt-dialog input[type=radio],.opt-dialog input[type=checkbox]{width:16px;height:16px;flex-shrink:0;margin:5px 0;accent-color:#263f32}.opt-choice small,.opt-access-row small{display:block;font-size:12px;color:var(--opt-muted)}.opt-choice strong{font-size:13px;font-weight:500}.opt-free{display:block;font-size:12px;color:var(--opt-muted);margin-top:10px}.opt-free textarea{margin-top:6px;min-height:75px}.opt-answer-error{color:#bb3434;font-size:12px}.opt-answer-receipt{background:#f3f5f4;padding:14px;border-radius:5px}.opt-answer-receipt strong{font-size:12px}.opt-answer-receipt pre{font-size:13px;margin-top:10px}
.opt-doc-dialog{width:min(980px,calc(100vw - 32px));height:min(780px,calc(100dvh - 40px))}.opt-doc-dialog .opt-dialog-body{flex:1}.opt-doc-toolbar{display:flex;gap:10px}.opt-doc-toolbar input{flex:1}.opt-doc-toolbar select{width:110px}.opt-doc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.opt-document{border:1px solid #dfe5e2;border-radius:6px;padding:16px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;overflow-wrap:anywhere}.opt-document h3{font-size:15px;margin:9px 0}.opt-document p{font-size:12px;color:#67716d;margin:0 0 14px}.opt-document small{font-size:11px;color:#67716d;margin-top:auto}.opt-document>div{margin-top:12px}.opt-format{font-size:10px;font-weight:600;background:#f0f2f1;padding:2px 6px;border-radius:3px}.opt-format-pdf{color:#bb3434;background:#fcf0f0}.opt-format-docx{color:#286a92;background:#eef5fc}.opt-format-md{color:#7953a6;background:#f5f0fb}.opt-doc-dialog footer nav{margin-right:auto}.opt-access-row{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid #e7ece8;overflow-wrap:anywhere}.opt-access-row strong{font-weight:500}.opt-version{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #dfe5e2}.opt-version span{font-size:12px;flex:1}.opt-image-dialog{width:min(1000px,95vw)}#opt-image{text-align:center}#opt-image img{max-width:100%;max-height:72dvh;object-fit:contain}
@media(max-width:900px){.opt-layout{grid-template-columns:205px minmax(0,1fr)}.opt-toolbar{padding:10px 12px}.opt-toolbar-title,.opt-toolbar-actions{gap:7px}#opt-connection{font-size:10px}.opt-bridge-text{display:none}.opt-compose-meta{flex-wrap:wrap}.opt-compose-meta input{flex-basis:100%}.opt-compose-meta select{max-width:55%!important}}
@media(max-width:800px){.opt-doc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){body.opt-page .workspace{padding:8px!important}#opt-root{height:calc(100dvh - 86px);min-height:470px;border-radius:6px}.opt-toolbar{gap:6px;flex-wrap:wrap;min-height:68px;padding:8px 10px}.opt-toolbar-title{gap:7px;flex:1}.opt-toolbar h1{font-size:16px!important}.opt-toolbar-title [data-opt=toggle-list]{display:inline-flex}.opt-toolbar-actions{gap:2px}.opt-toolbar-actions>.opt-button{font-size:11px!important;padding:4px 5px}#opt-connection{font-size:10px}#opt-bridge .opt-icon{width:28px}.opt-layout{display:flex;position:relative}.opt-sidebar{position:absolute;inset:0 auto 0 0;width:min(285px,100%);z-index:4;box-shadow:8px 0 24px #18201d1a;display:none}.opt-sidebar.open{display:flex}.opt-main{width:100%}.opt-run-head{padding:12px;align-items:flex-start;flex-wrap:wrap;gap:4px}.opt-run-head h2{font-size:15px!important}.opt-run-head>div:last-child{margin-left:auto}.opt-run-head button{font-size:11px!important;min-height:26px;padding:3px 7px}.opt-inputs{padding:4px 12px}.opt-question-banner{margin:8px 12px 0;padding:7px 9px;gap:5px;font-size:11px}.opt-question-banner strong{flex-basis:100%}#opt-messages{padding:18px 14px}.opt-message{margin-bottom:24px}.opt-message-meta{font-size:10px;flex-wrap:wrap;gap:3px}.opt-kind-request,.opt-kind-answer,.opt-kind-discussion{margin-left:4%}.opt-message-body{font-size:13px}.opt-compose-wrap{padding:0 10px 8px}.opt-compose-wrap form{padding:7px 9px}#opt-prompt{min-height:62px;max-height:110px}.opt-compose-wrap>p{font-size:9px}.opt-compose-meta select{font-size:10px!important}.opt-empty{margin:6vh auto;font-size:12px}.opt-empty h2{font-size:19px!important}.opt-latest{right:12px;bottom:220px}.opt-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 24px)}.opt-dialog>header,.opt-dialog>footer{padding:12px}.opt-dialog-body{padding:12px}.opt-dialog h2{font-size:16px}.opt-doc-toolbar{gap:6px;flex-wrap:wrap}.opt-doc-toolbar input{min-width:120px}.opt-doc-toolbar select{width:100px}.opt-doc-dialog footer{flex-wrap:wrap}.opt-doc-dialog footer nav{flex:1}.opt-dialog .opt-choice small{font-size:11px}}
@media(max-width:520px){.opt-doc-grid{grid-template-columns:1fr}}
#opt-root #opt-search{padding-left:34px}#opt-root #opt-send{color:#fff}#opt-root input::placeholder,#opt-root textarea::placeholder,.opt-dialog input::placeholder{color:#859089}
.opt-dialog input[type=radio],.opt-dialog input[type=checkbox]{appearance:auto;background:white;box-shadow:none;border:1px solid #a9b4ae}
.opt-public-question pre:has(code){white-space:pre;overflow:auto;max-width:100%;padding:12px;background:#f3f5f4}.opt-public-question code{font:12px/1.8 Consolas,monospace}
@media(max-width:640px){.opt-toolbar-title{flex:1 0 100%}.opt-toolbar-actions{margin-left:auto}#opt-root h1,#opt-connection{white-space:nowrap}.opt-toolbar{row-gap:0}.opt-toolbar-actions .opt-button{min-height:26px}}
