.cloud-account {display:flex;align-items:center;gap:10px;color:#687071;font-size:12px;margin-left:auto}
.cloud-account a {color:#006d77;text-decoration:none}
html {--chat-width:460px}
body .chat-panel {width:min(var(--chat-width),100vw)}
body.chat-open .app-shell {margin-right:var(--chat-width)}
.chat-resize {position:absolute;left:-5px;top:0;bottom:0;width:10px;cursor:col-resize;touch-action:none;z-index:2}
.chat-resize:hover,.chat-resize:focus {background:#006d7722;outline:none}
.chat-resizing {cursor:col-resize;user-select:none}
.chat-message .body .katex-display {overflow:auto;max-width:100%;padding-block:5px}
.chat-message .body table {border-collapse:collapse;display:block;overflow:auto;max-width:100%}
.chat-message .body td,.chat-message .body th {border:1px solid #ccd5c7;padding:6px 10px}
.inline-citation {color:#006d77;text-decoration:underline;cursor:pointer;font-weight:600}
.chat-message .body {white-space:normal;font-size:14px;line-height:1.85}
.chat-message .body h1 {font-size:22px}
.chat-message .body h2 {font-size:19px}
.chat-message .body h3,.chat-message .body h4 {font-size:16px}
.chat-message .body blockquote {margin:12px 0;padding-left:12px;border-left:3px solid #b0c5bc;color:#58675f}
.cloud-account button,.cloud-tool {border:1px solid #c8cbc7;background:#fff;border-radius:4px;padding:6px 10px;cursor:pointer;font-size:12px}
.cloud-modal {position:fixed;inset:0;z-index:90;background:#173b3740;backdrop-filter:blur(8px);display:grid;place-items:center}
.cloud-modal[hidden] {display:none}
.cloud-login {width:min(420px,92vw);background:#f8f7f3;border:1px solid #c8cbc7;padding:38px;box-shadow:0 25px 70px #173b3726}
.cloud-login h2 {font-family:"SimSun",serif;font-size:26px;margin:0 0 15px}
.cloud-login p {font-size:13px;color:#687071;line-height:1.8}
.cloud-login input {width:100%;height:42px;border:1px solid #b9bdb9;padding:8px;background:#fff}
.cloud-login button {width:100%;height:42px;background:#006d77;border:0;color:#fff;cursor:pointer;margin-top:14px}
.cloud-login a {font-size:12px;color:#006d77}
.cloud-error {color:#a34332;font-size:12px;min-height:20px;margin-top:12px}
.chat-panel {position:fixed;right:0;top:0;bottom:0;width:380px;z-index:40;background:#f8f7f3;border-left:1px solid #c8cbc7;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;box-shadow:-8px 0 30px #173b370c}
.chat-panel[hidden] {display:none}
.chat-head {display:flex;justify-content:space-between;align-items:center;padding:18px 16px 12px;border-bottom:1px solid #dedfd9}
.chat-head strong {font:700 18px "SimSun",serif}
.chat-head button,.chat-tools button,.chat-message button {border:0;background:transparent;color:#006d77;padding:4px;cursor:pointer;font-size:12px}
.chat-tools {padding:12px 16px;display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid #dedfd9}
.chat-tools select {max-width:100%;width:100%;height:32px;border:1px solid #c8cbc7;padding:5px;background:#fff;font-size:12px}
.chat-messages {overflow:auto;padding:20px 16px;min-height:0}
.chat-empty {font-size:13px;color:#687071;line-height:1.9;padding:25px 10px}
.chat-message {margin:0 0 22px;line-height:1.8;font-size:13px;overflow-wrap:anywhere}
.chat-message.user {background:#e8eeeb;padding:12px 14px;border-left:2px solid #83c5be}
.chat-message .role {font-size:10px;letter-spacing:1.4px;color:#687071;margin-bottom:6px}
.chat-message .body {white-space:normal}
.chat-message .body p {margin:0 0 10px;white-space:normal}
.chat-message .body pre {overflow:auto;background:#eceee9;padding:10px;font-size:12px;white-space:pre}
.chat-message .body ul,.chat-message .body ol {padding-left:18px;white-space:normal}
.chat-source {display:block;width:100%;text-align:left;border:1px solid #d6e2df!important;background:#eef4f1!important;padding:8px 10px!important;margin-top:8px;color:#173b37!important}
.chat-source small {display:block;color:#687071;font-size:11px;max-height:60px;overflow:hidden;line-height:1.5}
.chat-source small.expanded {max-height:220px;overflow:auto}
.chat-warning {font-size:11px;color:#99660b}
.chat-compose {padding:14px 16px 18px;border-top:1px solid #c8cbc7;background:#f2f1ed}
.chat-compose textarea {width:100%;min-height:88px;max-height:180px;resize:vertical;background:#fff;border:1px solid #b9bdb9;padding:10px;line-height:1.6;font-size:13px}
.chat-compose .actions {display:flex;gap:8px;justify-content:space-between;margin-top:9px;align-items:center}
.chat-compose .actions span {font-size:11px;color:#687071}
.chat-compose button {background:#006d77;border:0;border-radius:3px;padding:8px 16px;color:#fff;cursor:pointer}
.chat-compose button.secondary {background:#fff;color:#a34332;border:1px solid #c8cbc7}
body.chat-open .app-shell {margin-right:var(--chat-width)}
.cloud-model-select {height:30px;max-width:145px;font-size:12px;border:1px solid #b9bdb9;background:#fff}
.share-modal {background:#173b3759;backdrop-filter:blur(5px);padding:18px}
.share-card {width:min(600px,100%);padding:28px;background:#fff;border:1px solid #dce6df;border-radius:16px;box-shadow:0 24px 90px #12382e35;max-height:90vh;overflow:auto;color:#294239;font-family:"PingFang SC","Microsoft YaHei UI",sans-serif;box-sizing:border-box}
.share-heading {display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.share-eyebrow {font-size:10px;color:#88998e;letter-spacing:1px}
.share-card h2 {font:600 24px/1.5 "Songti SC","SimSun",serif;margin:6px 0 0}
.share-card button {font-size:12px;border:1px solid #dce6df;border-radius:7px;background:#fff;color:#396651;padding:9px 12px;cursor:pointer;margin:0}
.share-heading .share-close {font:22px/1 sans-serif;border:0;background:#f4f7f5;width:32px;height:32px;padding:0;color:#8a9a8e}
.share-document {display:flex;gap:14px;align-items:center;background:#f5f8f5;border:1px solid #e5ece6;border-radius:9px;padding:16px;margin-bottom:16px}
.share-file-icon {flex-shrink:0;width:34px;height:42px;display:grid;place-items:center;background:#fff;border:1px solid #d8e4da;border-radius:5px;color:#597761;font:700 9px Georgia,serif}
.share-document>div {min-width:0}.share-document strong {display:block;font-size:13px;font-weight:500;line-height:1.7;overflow-wrap:anywhere}.share-document>div>span {display:block;font-size:10px;color:#8c9d91;margin-top:4px}
.share-scope {display:grid;grid-template-columns:1fr 1fr;gap:8px}.share-scope>label {display:flex;align-items:center;gap:8px;font-size:12px;color:#496554;border:1px solid #e2eae3;border-radius:6px;padding:10px;background:#f9fbf9;cursor:pointer}.share-scope input {width:15px;height:15px;accent-color:#246957;margin:0}.share-link-card {padding-bottom:14px;border-bottom:1px solid #eef2ee}
.share-card .share-note {font-size:11px;color:#8b9a90;line-height:1.9;margin:12px 0 22px}
.share-controls {display:flex;gap:10px;align-items:center;padding:18px 0;border-top:1px solid #e7ece8;border-bottom:1px solid #e7ece8}
.share-controls label {font-size:12px;flex:1}.share-controls label>span {display:block;color:#99a69d;font-size:10px;margin-top:5px}
.share-duration {position:relative;width:85px;flex-shrink:0}.share-duration input {width:100%;height:38px;padding:8px 25px 8px 10px;border:1px solid #d4e0d8;border-radius:7px;background:#fbfcfb;color:#355242;font-size:12px;appearance:textfield}.share-duration input::-webkit-inner-spin-button {appearance:none}.share-duration>span {position:absolute;right:12px;top:11px;color:#8b9d90;font-size:11px;pointer-events:none}
.share-controls .share-primary {background:#246d52;color:#fff;border-color:#246d52;height:38px;padding-inline:16px;white-space:nowrap}
.share-result {margin-top:18px;background:#edf6ef;border:1px solid #d5e8db;border-radius:9px;padding:14px}.share-result label {font-size:11px;color:#458160}.share-copy-row {display:flex;gap:8px;margin-top:10px}.share-copy-row input {width:0;min-width:0;flex:1;border:1px solid #d4e3d7;border-radius:6px;background:#fff;padding:8px;font:11px/1.5 ui-monospace,Consolas,monospace;color:#4e6e59}.share-copy-row button {flex-shrink:0;background:#fff;border-color:#cdded1;font-size:11px}
.share-history-head {display:flex;justify-content:space-between;font-size:11px;color:#7b8f80;margin:24px 0 8px}.share-history-head span {color:#a4b0a7}.share-empty {font-size:11px;color:#a0aea4;line-height:1.8;margin:14px 0 4px}.share-row {display:flex;gap:12px;align-items:center;padding:14px 0;border-top:1px solid #eef2ee;font-size:11px;color:#718777}.share-status {background:#edf6ef;color:#538160;font-size:10px;padding:3px 7px;border-radius:20px;white-space:nowrap}.share-status.inactive {background:#f2f3f2;color:#a1aba4}.share-row>div {flex:1}.share-row strong {display:block;font-size:11px;font-weight:400}.share-row small {display:block;font-size:10px;color:#a1afa4;margin-top:4px}.share-row button {border:0;color:#9a796b;background:transparent;font-size:10px;padding:6px}
#shareError {color:#b56853;font-size:11px;line-height:1.8;margin:10px 0 0;min-height:0}
@media (max-width:1100px) {.chat-panel {width:min(380px,90vw);box-shadow:-15px 0 70px #173b372b} body.chat-open .app-shell {margin-right:0} .cloud-account .cloud-owner {display:none}}
.source-code-link {font-size:11px;color:#687071;text-decoration:none;margin-left:12px}
.command-bar [hidden] {display:none!important}
body .app-shell {grid-template-rows:58px auto minmax(0,1fr) 28px}
body .command-bar {overflow:visible;gap:10px;position:relative;z-index:30;flex-wrap:wrap;padding-block:10px;min-height:62px}
.cloud-command {position:relative;flex:0 0 auto;font-size:13px}
.cloud-command>summary {list-style:none;cursor:pointer;padding:9px 12px;border:1px solid transparent;border-radius:5px;color:#46534e;user-select:none}
.cloud-command>summary::after {content:"⌄";margin-left:10px;color:#89908b}
.cloud-command[open]>summary,.cloud-command>summary:hover {background:#eeeee8;border-color:#d9dcd3}
.cloud-command-content {position:absolute;top:calc(100% + 10px);left:0;min-width:248px;padding:18px;display:flex;flex-direction:column;gap:14px;background:#faf9f5;border:1px solid #d3d7cf;border-radius:8px;box-shadow:0 14px 40px #263e3326}
.cloud-command-content button,.cloud-command-content select {width:100%;margin:0!important}
.cloud-command-content .translation-range {flex-direction:column;align-items:flex-start;gap:8px}
.cloud-command-content .translation-range input {width:100%;box-sizing:border-box}
.cloud-command-content .mode-switch {display:flex;width:100%}
.cloud-command-content .auto-select {margin:0}
#exportMenu {margin-left:auto}
#exportMenu .cloud-command-content {left:auto;right:0}
#exportMenu .cloud-command-content {min-width:300px;padding:22px;border-radius:11px;background:#fff;border-color:#dce5df;gap:12px;box-shadow:0 16px 50px #1c433226}
.export-head {display:flex;flex-direction:column;gap:6px;margin-bottom:6px}.export-head span {font-size:10px;color:#98a79c}.export-head strong {font:600 18px "Songti SC","SimSun",serif;color:#294739}
.export-label {font-size:11px;color:#8b9b90;display:flex;flex-direction:column;gap:8px}.export-label #cloudExportKind {height:38px;max-width:none;width:100%;border:1px solid #d7e2da;border-radius:6px;background:#fafcfb;padding:0 10px;color:#355743;font-size:12px}
.export-description {font-size:11px;line-height:1.8;margin:0 0 3px;color:#97a69c}
#exportMenu .export-primary {background:#246d52;color:#fff;border:1px solid #246d52;height:38px;border-radius:6px;font-size:12px}
#exportMenu .export-share {border:0;border-top:1px solid #e9eee9;padding:14px 0 0;background:transparent;color:#658b74;font-size:11px;border-radius:0;margin-top:3px!important}
.chat-abilities {margin-top:8px;color:#6c8470;font-size:11px}.chat-abilities summary {cursor:pointer;font-size:11px;display:flex;justify-content:space-between;gap:10px}.chat-abilities summary span {font-size:10px;color:#99a590}.chat-abilities ul {padding-left:18px;margin:8px 0}.chat-abilities p {font-size:10px;margin:8px 0 0;color:#99a590}
.reading-trace {margin:12px 0;font-size:11px;color:#8c9c8f}.reading-trace summary {cursor:pointer}.reading-trace ol {margin:8px 0;padding-left:18px;max-height:180px;overflow:auto;font-size:10px;line-height:1.9}
.chat-material-notice {padding:12px 18px;background:#f1f3eb;border-bottom:1px solid #d4d9ce;font-size:12px;color:#536250;line-height:1.7;max-height:240px;overflow:auto}
.chat-material-notice button {font-size:12px;padding:5px 10px;margin:8px 0;background:#fff;border:1px solid #ccd5c7;border-radius:4px;cursor:pointer}
#chatImageList {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
#chatImageList label {position:relative;display:flex;flex-direction:column;padding:7px;background:#fff;border:1px solid #d4d9ce;border-radius:4px;cursor:pointer;gap:5px}
#chatImageList input {position:absolute;top:8px;left:8px}
#chatImageList img {height:75px;max-width:100%;object-fit:contain}
.chat-search {font-size:12px;display:flex;align-items:center;gap:6px;margin:8px 0;color:#526052}
.chat-search small {margin-left:auto;color:#8b9188;font-size:10px}
.chat-options {display:flex;align-items:center;gap:16px;margin:10px 0 0}
.chat-options .chat-search {margin:0;gap:5px;white-space:nowrap;cursor:pointer}
.chat-options input {margin:0;width:13px;height:13px;accent-color:#006d77;flex-shrink:0}
.chat-options label:has(input:disabled) {color:#8b9188;cursor:default}
.chat-web-source {display:block;font-size:12px;background:#eef2f6;color:#426184;padding:10px;margin:9px 0;text-decoration:none;border-radius:4px;overflow-wrap:anywhere}
.chat-web-source small,.chat-search-info {display:block;color:#7a8489;font-size:11px;line-height:1.6;margin-top:5px}
.chat-more {position:relative;font-size:12px}
.chat-more summary {padding:7px;cursor:pointer;list-style:none}
.chat-more>div {position:absolute;z-index:2;right:0;min-width:120px;background:#faf9f5;padding:10px;display:flex;gap:6px;flex-direction:column;border:1px solid #d3d7cf}
@media(max-width:760px) {body .command-bar {gap:3px}.cloud-command>summary {padding:8px}#exportMenu {margin-left:0}.cloud-command-content {min-width:220px}}
@media(max-width:500px) {.cloud-command {position:static}.cloud-command-content,#exportMenu .cloud-command-content {top:100%;left:10px;right:10px;min-width:0}}
@media(max-width:1100px) {body.chat-open .app-shell {margin-right:0}body .chat-panel {width:min(var(--chat-width),94vw)}}
@media (max-width:760px) {.masthead {gap:8px}.masthead .brand {font-size:16px}.cloud-owner {display:none}.cloud-account {gap:5px}.phase {max-width:80px;overflow:hidden}}
@media(max-width:500px) {#exportMenu .cloud-command-content {min-width:0}.share-card {padding:20px}.share-card h2 {font-size:22px}.share-controls {gap:8px;flex-wrap:wrap}.share-controls label {min-width:120px}.share-controls .share-primary {flex-basis:100%}.share-row {gap:8px}.share-copy-row button {padding:7px;font-size:10px}}
