/* 问答专属 UI */
.qa-toggle-btn { display:inline-flex; align-items:center; justify-content:center; gap:5px; flex:0 0 auto; margin-left:8px; height:29px; min-height:29px; padding:3px 8px 3px 6px; border:1px solid var(--color-border); border-radius:5px; background:#fff; color:var(--color-text-muted); font:inherit; font-size:12px; line-height:1; cursor:pointer; transition:color .15s,border-color .15s,background .15s; box-sizing:border-box; }
.qa-toggle-btn:hover { color:var(--color-primary); border-color:color-mix(in srgb,var(--color-primary) 45%,var(--color-border)); background:var(--color-surface-alt); }
.qa-toggle-btn[aria-expanded="true"] { color:var(--color-primary); border-color:var(--color-primary); background:var(--color-surface); }
.qa-toggle-icon { width:20px; height:20px; display:block; flex:0 0 20px; object-fit:contain; object-position:center; }
.qa-toggle-icon svg { width:100%; height:100%; display:block; }
.breadcrumb .qa-toggle-btn .qa-toggle-icon { width:23px; height:23px; flex-basis:23px; }
.breadcrumb .qa-toggle-btn { width:31px; height:29px; min-height:29px; padding:4px 5px; margin-left:8px; gap:0; }
.breadcrumb .qa-toggle-btn { background:#e8f0fe; color:#1a3a5c; border-color:#c5d5f0; }
.breadcrumb .qa-toggle-btn:hover, .breadcrumb .qa-toggle-btn:focus-visible { background:#1a3a5c; border-color:#1a3a5c; color:#fff; outline:none; }
.breadcrumb .qa-toggle-btn[aria-expanded="true"] { background:#e8f0fe; border-color:#1a3a5c; color:#1a3a5c; outline:none; }
.welcome-qa-toggle-btn .qa-toggle-icon { width:25px; height:25px; flex-basis:25px; }
.welcome-qa-toggle-btn { position:absolute; top:10px; right:10px; margin-left:0; z-index:2; transform:none; height:35px; min-height:35px; padding:4px 10px 4px 8px; gap:6px; font-size:14px; background:#e8f0fe; color:#1a3a5c; border-color:#c5d5f0; }
.welcome-qa-toggle-btn:hover, .welcome-qa-toggle-btn:focus-visible { background:#1a3a5c; border-color:#1a3a5c; color:#fff; outline:none; }
.welcome-qa-toggle-btn[aria-expanded="true"] { background:var(--color-surface); border-color:#1a3a5c; color:#1a3a5c; outline:none; }
.qa-panel { position:absolute; z-index:45; top:0; bottom:0; width:min(var(--qa-panel-width,var(--desktop-sidebar-width)),100%); min-width:280px; display:flex; flex-direction:column; background:var(--color-surface); border:1px solid var(--color-border); border-radius:10px; overflow:hidden; box-shadow:-8px 0 24px rgba(15,23,42,.12); left:calc(min(var(--desktop-content-width),100%) + 10px); right:auto; }
.qa-panel[hidden] { display:none; }
.qa-resize-handle { position:absolute; right:-5px; top:0; bottom:0; width:10px; z-index:2; cursor:ew-resize; touch-action:none; outline:none; }
.qa-resize-handle::after { content:''; position:absolute; top:8px; bottom:8px; left:4px; width:2px; border-radius:1px; background:transparent; transition:background .15s ease; }
.qa-resize-handle:hover::after,.qa-resize-handle:focus-visible::after,body.qa-resizing .qa-resize-handle::after { background:color-mix(in srgb,var(--color-primary) 55%,transparent); }
body.qa-resizing { cursor:ew-resize; user-select:none; }
body.qa-resizing iframe { pointer-events:none; }
.qa-panel-header { position:relative; height:48px; min-height:48px; flex-shrink:0; display:flex; align-items:center; justify-content:center; padding:0 108px; background:var(--color-primary); border-bottom:1px solid color-mix(in srgb,var(--color-primary) 75%,#000); }
.qa-panel-header > div { min-width:0; max-width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; text-align:center; line-height:1.2; }
.qa-panel-title { font-family:'Noto Serif SC',serif; color:#fff; font-size:14px; font-weight:700; letter-spacing:0; white-space:nowrap; }
.qa-panel-status { max-width:100%; margin-left:0; color:rgba(255,255,255,.6); font-size:10px; font-weight:400; letter-spacing:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-panel-close { position:absolute; top:50%; right:12px; transform:translateY(-50%); border:0; background:transparent; color:rgba(255,255,255,.78); font-size:22px; line-height:1; cursor:pointer; padding:2px 5px; }
.qa-panel-close:hover,.qa-panel-close:focus-visible { color:#fff; }
.qa-panel-pin { position:absolute; top:50%; right:44px; transform:translateY(-50%); display:grid; place-items:center; width:28px; height:28px; padding:5px; border:0; border-radius:4px; color:rgba(255,255,255,.78); background:transparent; cursor:pointer; }
.qa-panel-pin[aria-pressed="true"] { color:#fff; background:rgba(255,255,255,.18); }
.qa-panel-pin:hover,.qa-panel-pin:focus-visible { color:#fff; background:rgba(255,255,255,.28); }
.qa-panel-pin:focus-visible,.qa-panel-close:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.qa-panel-pin svg { width:18px; height:18px; }
.qa-panel-swap { position:absolute; top:50%; right:76px; transform:translateY(-50%); display:grid; place-items:center; width:28px; height:28px; padding:5px; border:0; border-radius:4px; color:rgba(255,255,255,.78); background:transparent; cursor:pointer; }
.qa-panel-swap svg { width:18px; height:18px; }
.qa-panel-swap:hover,.qa-panel-swap[aria-pressed="true"] { color:#fff; background:rgba(255,255,255,.28); }
.qa-panel-swap:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.qa-panel-pin:disabled { opacity:.35; cursor:not-allowed; background:transparent; }
@media (min-width:769px) {
  #contentArea.qa-swapped { flex-direction:row; gap:10px; }
  #contentArea.qa-swapped { --qa-swapped-width:min(var(--qa-panel-width,650px), max(50%, calc(100% - 290px))); }
  #contentArea.qa-swapped > .qa-panel { position:relative; left:auto; right:auto; top:auto; bottom:auto; order:-1; flex:0 0 var(--qa-swapped-width); width:var(--qa-swapped-width); min-width:0; }
  #contentArea.qa-swapped > .content-area-inner { width:var(--desktop-content-width); min-width:0; flex:0 1 var(--desktop-content-width); }
  #contentArea.qa-swapped > .content-resize-handle { left:min(100%, calc(var(--qa-swapped-width) + 10px + var(--desktop-content-width))); }
  #contentArea.qa-swapped .qa-resize-handle { right:0; }
}
.qa-panel-pin[aria-pressed="true"] .qa-unpin-icon,.qa-panel-pin[aria-pressed="false"] .qa-pin-icon { display:none; }
.qa-window-resize { display:none; }
.qa-panel.qa-floating { position:fixed; left:var(--qa-window-x); top:var(--qa-window-y); right:auto; bottom:auto; width:var(--qa-window-width); height:var(--qa-window-height); min-width:0; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); box-sizing:border-box; z-index:400; border-radius:8px; box-shadow:0 10px 32px rgba(0,0,0,.22); }
.qa-floating .qa-panel-header { cursor:grab; touch-action:none; user-select:none; }
.qa-floating .qa-panel-input,.qa-floating .qa-document-context,.qa-floating .qa-document-reopen { flex-shrink:0; }
.qa-floating .qa-window-resize { display:block; position:absolute; right:0; bottom:0; width:18px; height:18px; z-index:5; cursor:nwse-resize; touch-action:none; }
.qa-window-resize::after { content:''; position:absolute; right:4px; bottom:4px; width:8px; height:8px; border-right:2px solid var(--color-text-muted); border-bottom:2px solid var(--color-text-muted); }
.qa-window-resize:focus-visible { outline:2px solid var(--color-primary); outline-offset:-3px; }
body.qa-dragging,body.qa-dragging .qa-floating .qa-panel-header { cursor:grabbing; user-select:none; }
body.qa-window-resizing { cursor:nwse-resize; user-select:none; }
body:is(.qa-dragging,.qa-window-resizing) iframe { pointer-events:none; }
@media (max-width:768px) {
  .qa-panel { left:0; width:100%; min-width:0; }
  .qa-panel-pin,.qa-panel-swap,.qa-window-resize,.qa-resize-handle { display:none; }
  .qa-panel-header { padding:0 44px; }
}
.qa-panel-body {
  flex:1;
  overflow:auto;
  padding:16px 14px;
  background:var(--color-surface);
  scrollbar-color:var(--color-border) transparent;
}
.qa-panel-body::-webkit-scrollbar { width:12px; }
.qa-panel-body::-webkit-scrollbar-track { background:transparent; }
.qa-panel-body::-webkit-scrollbar-thumb { background:var(--color-border); border-radius:50vw !important; border:3px solid transparent !important; background-clip:content-box !important; min-height:24px; }
.qa-panel-body::-webkit-scrollbar-button { display:none; width:0; height:0; min-width:0; min-height:0; -webkit-appearance:none; appearance:none; background:transparent; }
.qa-panel-body::-webkit-scrollbar-button:single-button,
.qa-panel-body::-webkit-scrollbar-button:vertical:decrement,
.qa-panel-body::-webkit-scrollbar-button:vertical:increment {
  display:none !important;
  width:0 !important;
  height:0 !important;
  border:0 !important;
  background:none !important;
}
.qa-document-context { flex:0 0 auto; width:auto; margin:10px 10px 0; padding:10px 12px 9px; box-sizing:border-box; border:1px solid #c5d5f0; border-radius:10px; background:#e8f0fe; color:#1a3a5c; }
.qa-document-context[hidden] { display:none; }
.qa-document-row { min-width:0; display:grid; grid-template-columns:18px minmax(0,1fr) auto 22px; align-items:center; gap:6px; }
.qa-document-icon { width:16px; height:16px; display:block; fill:none; stroke:#6b7280; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.qa-document-name { min-width:0; overflow:hidden; color:#1a3a5c; font-size:13px; line-height:22px; white-space:nowrap; text-overflow:ellipsis; }
.qa-document-close { width:22px; height:22px; padding:0; border:0; border-radius:50%; background:#707570; color:#fff; font:700 16px/20px Arial,sans-serif; text-align:center; cursor:pointer; }
.qa-document-close:hover,.qa-document-close:focus-visible { background:#555b56; outline:none; }
.qa-document-reopen { flex:0 0 auto; align-self:flex-start; width:22px; height:22px; margin:6px 0 0 14px; padding:0; border:0; border-radius:50%; background:#707570; color:#fff; font:700 17px/20px Arial,sans-serif; text-align:center; cursor:pointer; }
.qa-document-reopen[hidden] { display:none; }
.qa-document-reopen:hover,.qa-document-reopen:focus-visible { background:#555b56; outline:none; }
.qa-document-actions { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.qa-document-actions button { min-width:0; height:25px; padding:2px 12px; border:1px solid rgba(26,58,92,.12); border-radius:13px; background:#fff; color:#1a3a5c; font:inherit; font-size:12px; line-height:19px; white-space:nowrap; cursor:pointer; box-shadow:0 1px 2px rgba(26,58,92,.04); transition:background .15s,border-color .15s,color .15s,transform .08s; }
.qa-document-actions button:hover,.qa-document-actions button:focus-visible { border-color:#8eabd5; background:#f4f7fd; outline:none; }
.qa-document-actions button:active { transform:translateY(1px); }
.qa-document-actions button.is-selected,.qa-document-actions button[aria-pressed="true"] { border-color:#1a3a5c; background:#1a3a5c; color:#fff; }
.qa-message { width:fit-content; max-width:92%; padding:10px 12px; border-radius:10px; font-size:13px; line-height:1.6; box-sizing:border-box; overflow-wrap:anywhere; }
.qa-message-assistant { background:#fff; border:1px solid var(--color-border-light); color:var(--color-text); }
.qa-message-user { margin:10px 0 0 auto; background:var(--color-primary); color:#fff; }
.qa-attachment-message { width:max-content; max-width:92%; margin:10px 0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.qa-attachment-type { min-width:60px; padding:9px 14px; box-sizing:border-box; border-radius:9px; background:#202020; color:#fff; font-size:14px; line-height:20px; text-align:center; }
.qa-attachment-card { max-width:240px; min-width:0; display:flex; align-items:center; gap:7px; padding:8px 10px; border-radius:8px; background:#f7f7f7; color:#30343b; font-size:12px; line-height:16px; text-decoration:none; }
.qa-attachment-card:hover,.qa-attachment-card:focus-visible { background:#eceff3; outline:none; }
.qa-attachment-card img { display:block; width:84px; height:54px; border-radius:3px; object-fit:cover; }
.qa-attachment-card-icon { color:#ef4444; font-size:18px; line-height:1; }
.qa-attachment-card span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-message-user + .qa-message-assistant { margin-top:10px; }
.qa-panel-input { display:grid; grid-template-columns:minmax(0,1fr) 24px; grid-template-rows:auto auto 32px; align-items:center; gap:6px 10px; min-height:98px; box-sizing:border-box; margin:10px; padding:9px 15px 8px 12px; border:1px solid #d0d0d0; border-radius:24px; background:var(--color-surface); box-shadow:0 1px 2px rgba(0,0,0,.05); }
.qa-document-context:not([hidden]) + .qa-document-reopen + .qa-panel-input { margin-top:8px; }
.qa-document-reopen:not([hidden]) + .qa-panel-input { margin-top:6px; }
.qa-panel-input input,.qa-panel-input textarea { grid-column:1 / -1; grid-row:2; align-self:start; min-width:0; width:100%; height:28px; min-height:28px; max-height:180px; padding:0; border:0; background:transparent; font:inherit; line-height:1.5; outline:none; color:var(--color-text); resize:none; overflow-y:hidden; box-sizing:border-box; }
.qa-selected-files { grid-column:1 / -1; min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:6px; max-height:86px; overflow:auto; }
.qa-selected-files[hidden] { display:none; }
.qa-screenshot-status { display:flex; align-items:center; gap:8px; min-width:0; margin:8px 14px 0; color:var(--color-text); font-size:12px; line-height:1.4; }
.qa-screenshot-status[hidden],.qa-screenshot-status button[hidden] { display:none; }
.qa-screenshot-status span { min-width:0; flex:1; overflow-wrap:anywhere; }
.qa-screenshot-status button { flex:none; padding:3px 5px; border:0; background:transparent; color:var(--color-primary); font:inherit; cursor:pointer; }
.qa-screenshot-status button:hover,.qa-screenshot-status button:focus-visible { text-decoration:underline; }
.qa-selected-file { position:relative; min-width:0; width:180px; max-width:100%; display:inline-flex; align-items:center; gap:8px; padding:7px 26px 7px 9px; box-sizing:border-box; border:1px solid #e2e5ea; border-radius:10px; background:#fff; color:#1a3a5c; font-size:12px; line-height:16px; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.qa-selected-file-image { width:88px; height:58px; padding:3px; overflow:hidden; }
.qa-selected-file-image .qa-selected-file-icon { width:100%; height:100%; flex-basis:100%; }
.qa-selected-file-image .qa-selected-file-details { display:none; }
.qa-selected-file-details { min-width:0; display:flex; flex-direction:column; gap:1px; }
.qa-selected-file-icon { width:16px; height:16px; flex:0 0 16px; color:#6b7280; }
.qa-selected-file-icon svg { display:block; width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.qa-selected-file-thumb { display:block; width:100%; height:100%; border-radius:5px; object-fit:cover; }
.qa-selected-file-doc-icon { width:28px; height:28px; flex:0 0 28px; padding:5px; box-sizing:border-box; border-radius:6px; background:#fff1f1; color:#ef4444; }
.qa-selected-file-meta { color:#8a9099; font-size:10px; line-height:13px; }
.qa-selected-file-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-selected-file-remove { position:absolute; top:5px; right:5px; flex:0 0 auto; width:16px; height:16px; padding:0; border:0; border-radius:50%; background:#707570; color:#fff; font:700 13px/15px Arial,sans-serif; cursor:pointer; }
.qa-selected-file-remove:hover,.qa-selected-file-remove:focus-visible { background:#555b56; outline:none; }
.qa-panel-input input::placeholder { color:#a4a4a4; }
.qa-panel-input input:focus,.qa-panel-input textarea:focus { box-shadow:none; }
.qa-panel-input:has(input:focus),.qa-panel-input:has(textarea:focus) { border-color:#555; box-shadow:none; }
.qa-input-tools { grid-column:1; grid-row:3; position:relative; display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.qa-input-tools-left,.qa-input-tools-right { display:flex; align-items:center; gap:8px; }
.qa-input-tools-right { margin-left:auto; }
.qa-tool-btn.qa-network-btn { display:inline-flex; align-items:center; justify-content:center; height:32px !important; padding:3px 10px !important; gap:3px; border:1px solid #cfd4da !important; border-radius:17px !important; background:#fafafa !important; color:#34383f !important; box-shadow:0 1px 2px rgba(15,23,42,.06); }
.qa-tool-btn.qa-network-btn:hover,.qa-tool-btn.qa-network-btn[aria-expanded="true"] { background:#f1f3f5 !important; border-color:#b9c0c9 !important; }
.qa-model-caret { display:block; flex:0 0 6px; width:6px; height:6px; margin:0 1px 0 7px; border-right:1.5px solid #8a9099; border-bottom:1.5px solid #8a9099; transform:rotate(45deg); font-size:0; line-height:0; box-sizing:border-box; }
.qa-scissors-caret { display:inline-block; width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent; border-top:5px solid #8a9099; font-size:0; line-height:0; }
.qa-model-picker { position:relative; }
.qa-model-menu { position:absolute; left:0; bottom:calc(100% + 9px); z-index:12; width:268px; padding:9px 0 8px; border:1px solid #e4e7eb; border-radius:14px; background:#fff; color:#30343b; box-shadow:0 12px 30px rgba(15,23,42,.16); }
.qa-model-menu::after { content:''; position:absolute; left:0; right:0; bottom:-10px; height:10px; }
.qa-model-menu[hidden] { display:none; }
.qa-model-menu-head { display:flex; align-items:center; justify-content:space-between; padding:0 12px 8px; }
.qa-model-mode-title { font-size:13px; font-weight:600; }
.qa-model-mode-tabs { display:flex; gap:4px; padding:0; color:#b1b5bc; font-size:11px; }
.qa-model-mode-tabs button { width:40px; height:24px; box-sizing:border-box; padding:2px 5px; border:1px solid #aab4bf; border-radius:6px; background:transparent; color:inherit; font:inherit; line-height:18px; cursor:pointer; }
.qa-model-mode-tabs .active { background:#fff; color:#10a663; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.qa-model-section-label { padding:7px 13px 5px; color:#9ca3af; font-size:11px; }
.qa-model-option,.qa-model-settings { width:calc(100% - 12px) !important; min-height:34px; margin:0 6px; padding:7px 9px; display:flex; align-items:center; gap:7px; border:0; border-radius:7px; background:transparent; color:#343940; font:inherit; font-size:13px; text-align:left; cursor:default; }
.qa-model-option.selected { background:#f4f5f6; }
.qa-model-logo { width:15px; flex:0 0 15px; color:#30343b; text-align:center; }
.qa-model-logo-text { font-weight:800; font-style:italic; }
.qa-model-logo-qwen,.qa-model-logo-deepseek,.qa-model-logo-free,.qa-model-logo-intermediate,.qa-model-logo-advanced { height:16px; background:currentColor; -webkit-mask:var(--qa-model-icon) center/contain no-repeat; mask:var(--qa-model-icon) center/contain no-repeat; }
.qa-model-logo-deepseek { --qa-model-icon:url('/qa/icons/deepseek.svg'); }
.qa-model-logo-qwen { --qa-model-icon:url('/qa/icons/qwen.svg'); }
#qaModelPickerIcon { color:inherit; margin-right:3px; }
.qa-input-tools-left .qa-model-picker { min-width:0; }
.qa-input-tools-left .qa-network-btn { max-width:100%; }
#qaModelPickerLabel { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.qa-model-logo-free { --qa-model-icon:url('/qa/icons/gift.svg'); }
.qa-model-logo-intermediate { --qa-model-icon:url('/qa/icons/layers.svg'); }
.qa-model-logo-advanced { --qa-model-icon:url('/qa/icons/crown.svg'); }
.qa-model-check { margin-left:auto; color:#10b56b; font-size:18px; line-height:1; }
.qa-model-new { padding:1px 4px; border-radius:3px; background:#e8f8ef; color:#079957; font-size:10px; font-weight:600; }
.qa-model-menu-divider { height:1px; margin:6px 0; background:#eceef1; }
.qa-model-settings { min-height:30px; }
.qa-tool-btn { width:auto !important; min-width:24px; height:24px; padding:2px 4px; border:0 !important; border-radius:12px !important; background:transparent !important; color:#555 !important; font-size:13px !important; white-space:nowrap; }
.qa-tool-btn:hover { background:#f0f0f0 !important; }
.qa-tool-scissors { position:relative; display:inline-flex; align-items:center; gap:1px; margin-left:auto; }
.qa-tool-scissors:hover::after, .qa-tool-scissors:focus-visible::after { content:'截图并加入问答'; position:absolute; right:-4px; bottom:calc(100% + 10px); white-space:nowrap; padding:8px 12px; border:1px solid #d5d5d5; border-radius:9px; background:#fff; color:#555; box-shadow:0 6px 18px rgba(0,0,0,.12); font-size:12px; font-weight:400; z-index:8; }
.qa-attachment-btn { display:inline-flex; align-items:center; justify-content:center; line-height:1; }
.qa-attachment-btn svg { display:none; }
.qa-attachment-btn::before { content:''; display:block; width:20px; height:20px; background:currentColor; -webkit-mask-position:center; mask-position:center; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-size:contain; mask-size:contain; }
.qa-attachment-btn::before { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551'/%3E%3C/svg%3E"); }
.qa-attachment-picker { position:relative; display:inline-flex; align-items:center; }
.qa-attachment-menu { position:absolute; right:-2px; bottom:calc(100% + 10px); z-index:13; width:144px; padding:9px; box-sizing:border-box; border:1px solid #e4e7eb; border-radius:14px; background:#fff; color:#30343b; box-shadow:0 12px 30px rgba(15,23,42,.16); }
.qa-attachment-menu[hidden] { display:none; }
.qa-local-file-input { position:absolute; width:1px; height:1px; padding:0; border:0; opacity:0; overflow:hidden; pointer-events:none; clip-path:inset(50%); }
.qa-local-file-option { width:100% !important; height:36px; padding:7px 8px; box-sizing:border-box; display:flex; align-items:center; gap:9px; border:0; border-radius:8px; background:transparent; color:#30343b; font:inherit; font-size:13px; text-align:left; cursor:pointer; }
.qa-local-file-option:hover,.qa-local-file-option:focus-visible { background:#f2f4f7; outline:none; }
.qa-local-file-option svg { width:17px; height:17px; flex:0 0 17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.qa-tool-scissors svg { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.qa-upload-hint { position:absolute; right:0; bottom:calc(100% + 9px); width:320px; padding:10px 12px; border:1px solid #d5d5d5; border-radius:10px; background:#fff; color:#666; box-shadow:0 8px 22px rgba(0,0,0,.12); font-size:12px; line-height:1.55; text-align:left; opacity:0; visibility:hidden; transform:translateY(4px); transition:opacity .15s ease, transform .15s ease, visibility .15s ease; pointer-events:none; z-index:5; }
.qa-input-tools .qa-upload-hint:not([data-ready]) { display:none; }
.qa-upload-hint::after { content:''; position:absolute; right:53px; bottom:-7px; width:12px; height:12px; background:#fff; border-right:1px solid #d5d5d5; border-bottom:1px solid #d5d5d5; transform:rotate(45deg); }
.qa-input-tools:has(.qa-attachment-btn:hover, .qa-attachment-btn:focus-visible) .qa-upload-hint, .qa-upload-hint:hover { opacity:1; visibility:visible; transform:translateY(0); }
.qa-input-tools:has(.qa-attachment-btn[aria-expanded="true"]) .qa-upload-hint { opacity:0; visibility:hidden; transform:translateY(4px); }
.qa-send-btn { grid-column:2; grid-row:3; align-self:center; width:24px !important; height:24px; padding:0; border:0; border-radius:50% !important; background:#c7c7c7 !important; color:#fff !important; cursor:pointer; font-size:0 !important; display:flex; align-items:center; justify-content:center; }
.qa-send-btn::before { content:''; display:block; width:18.63px; height:18.63px; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3.25 4.15c-.72-.31-1.43.4-1.12 1.12l2.52 5.88 8.87.85-8.87.85-2.52 5.88c-.31.72.4 1.43 1.12 1.12l17.12-7.05c.8-.33.8-1.47 0-1.8L3.25 4.15Z'/%3E%3C/svg%3E"); transform:rotate(-35deg); }
.qa-send-btn:disabled { cursor:default; opacity:1; }
.qa-send-btn:not(:disabled) { background:var(--color-primary) !important; cursor:pointer; }
.qa-send-btn:not(:disabled):hover { filter:brightness(1.12); }
.qa-panel-input > .qa-send-hint { width:max-content; }
.qa-panel-input > .qa-send-hint::after { right:8px; }
.qa-panel-input:has(.qa-send-btn:hover, .qa-send-btn:focus-visible) > .qa-send-hint { opacity:1; visibility:visible; transform:translateY(0); }
@media (max-width:700px) { .qa-panel { left:0; width:100%; min-width:0; } .qa-resize-handle { display:none; } .qa-toggle-btn { margin-left:4px; padding-right:6px; } .breadcrumb .qa-toggle-btn { margin-left:0; } .qa-toggle-btn span { display:none; } }
@media (max-width:700px) and (hover:none) and (pointer:coarse) {
  /* Body-level fallback handles can otherwise float above the mobile Q&A overlay. */
  body:has(#qaPanel:not([hidden])) > .site-scroll-handle,
  #qaPanel > .qa-scroll-handle {
    display:none !important;
    pointer-events:none !important;
  }
}
@media (max-width:700px) {
  /* While iOS Chrome's keyboard is open, anchor the panel to the visual
     viewport reported by visualViewport instead of the layout viewport. */
  body.qa-keyboard-active .qa-panel {
    position:fixed;
    top:var(--qa-visible-top,0px);
    bottom:auto;
    height:var(--qa-visible-height,100dvh);
    max-height:var(--qa-visible-height,100dvh);
  }
  body.qa-keyboard-active .qa-panel-body { min-height:0; }
}

/* 黑夜模式：确保问答文字与输入控件保持足够对比度 */
:root[data-color-mode="dark"] .qa-panel,
:root[data-color-mode="dark"] .qa-panel-input { background:#1b2027; color:#f1f5f9; }
:root[data-color-mode="dark"] .qa-toggle-btn,
:root[data-color-mode="dark"] .breadcrumb .qa-toggle-btn,
:root[data-color-mode="dark"] .welcome-qa-toggle-btn { background:#1e293b; border-color:#71839a; color:#f1f5f9; box-shadow:0 2px 8px rgba(0,0,0,.32); }
:root[data-color-mode="dark"] .qa-toggle-btn:hover,
:root[data-color-mode="dark"] .qa-toggle-btn:focus-visible,
:root[data-color-mode="dark"] .breadcrumb .qa-toggle-btn:hover,
:root[data-color-mode="dark"] .breadcrumb .qa-toggle-btn:focus-visible,
:root[data-color-mode="dark"] .welcome-qa-toggle-btn:hover,
:root[data-color-mode="dark"] .welcome-qa-toggle-btn:focus-visible { background:#335c8a; border-color:#93c5fd; color:#fff; }
:root[data-color-mode="dark"] .qa-toggle-btn[aria-expanded="true"],
:root[data-color-mode="dark"] .breadcrumb .qa-toggle-btn[aria-expanded="true"],
:root[data-color-mode="dark"] .welcome-qa-toggle-btn[aria-expanded="true"] { background:#294968; border-color:#79b8f3; color:#fff; }
:root[data-color-mode="dark"] .qa-panel-header { background:var(--color-primary); }
:root[data-color-mode="dark"] .qa-panel-title { color:#fff; }
:root[data-color-mode="dark"] .qa-panel-status { color:rgba(255,255,255,.72); }
:root[data-color-mode="dark"] .qa-panel-close { color:rgba(255,255,255,.82); }
:root[data-color-mode="dark"] .qa-panel-body { background:#1b2027; }
:root[data-color-mode="dark"] .qa-document-context { background:#252c35; border-color:#566273; color:#edf2f7; }
:root[data-color-mode="dark"] .qa-document-icon { stroke:#c2cad4; }
:root[data-color-mode="dark"] .qa-document-name { color:#edf2f7; }
:root[data-color-mode="dark"] .qa-document-close { background:#657167; color:#fff; }
:root[data-color-mode="dark"] .qa-document-reopen { background:#657167; color:#fff; }
:root[data-color-mode="dark"] .qa-document-actions button { background:#303944; border-color:#566273; color:#edf2f7; box-shadow:0 1px 2px rgba(0,0,0,.18); }
:root[data-color-mode="dark"] .qa-document-actions button:hover,
:root[data-color-mode="dark"] .qa-document-actions button:focus-visible { border-color:#8eabd5; background:#3b4653; }
:root[data-color-mode="dark"] .qa-document-actions button.is-selected,
:root[data-color-mode="dark"] .qa-document-actions button[aria-pressed="true"] { border-color:#3f83bd; background:#245487; color:#fff; }
:root[data-color-mode="dark"] .qa-message-assistant { background:#2a313b; border-color:#46515f; color:#f8fafc; }
:root[data-color-mode="dark"] .qa-message-user { background:#245487; color:#fff; }
:root[data-color-mode="dark"] .qa-attachment-card { background:#252c35; color:#edf2f7; border:1px solid #4b5563; }
:root[data-color-mode="dark"] .qa-attachment-card:hover,
:root[data-color-mode="dark"] .qa-attachment-card:focus-visible { background:#343d49; }
:root[data-color-mode="dark"] .qa-selected-file { background:#252c35; border-color:#4b5563; color:#edf2f7; box-shadow:0 1px 2px rgba(0,0,0,.18); }
:root[data-color-mode="dark"] .qa-selected-file-doc-icon { background:#4b2930; color:#ff8f8f; }
:root[data-color-mode="dark"] .qa-selected-file-icon { color:#c2cad4; }
:root[data-color-mode="dark"] .qa-selected-file-meta { color:#aeb9c7; }
:root[data-color-mode="dark"] .qa-panel-close { color:rgba(255,255,255,.82); }
:root[data-color-mode="dark"] .qa-panel-input { border-color:#687585; }
:root[data-color-mode="dark"] .qa-panel-input:has(input:focus),:root[data-color-mode="dark"] .qa-panel-input:has(textarea:focus) { border-color:#c2cad4; }
:root[data-color-mode="dark"] .qa-panel-input input,:root[data-color-mode="dark"] .qa-panel-input textarea { color:#f8fafc; }
:root[data-color-mode="dark"] .qa-panel-input input::placeholder,
:root[data-color-mode="dark"] .qa-panel-input textarea::placeholder { color:#b7c0cc; opacity:1; }
:root[data-color-mode="dark"] .qa-tool-btn { color:#dbe4ee !important; }
:root[data-color-mode="dark"] .qa-tool-btn:hover { background:#303944 !important; }
:root[data-color-mode="dark"] .qa-attachment-menu { background:#252c35; border-color:#4b5563; color:#f1f5f9; }
:root[data-color-mode="dark"] .qa-local-file-option { color:#edf2f7; }
:root[data-color-mode="dark"] .qa-local-file-option:hover,
:root[data-color-mode="dark"] .qa-local-file-option:focus-visible { background:#343d49; }
:root[data-color-mode="dark"] .qa-network-btn { background:#252c35 !important; border-color:#566273 !important; color:#edf2f7 !important; }
:root[data-color-mode="dark"] .qa-send-btn:disabled { background:#64748b !important; color:#fff !important; }
:root[data-color-mode="dark"] .qa-send-btn:not(:disabled) { background:var(--color-primary) !important; }
:root[data-color-mode="dark"] .qa-upload-hint { background:#2a313b; border-color:#566273; color:#f1f5f9; }
:root[data-color-mode="dark"] .qa-upload-hint::after { background:#2a313b; border-color:#566273; }
:root[data-color-mode="dark"] .qa-model-menu { background:#252c35; border-color:#4b5563; color:#f1f5f9; }
:root[data-color-mode="dark"] .qa-model-mode-tabs { background:#343d49; }
:root[data-color-mode="dark"] .qa-model-mode-tabs .active { background:#485361; }
:root[data-color-mode="dark"] .qa-model-option,
:root[data-color-mode="dark"] .qa-model-settings { color:#edf2f7; }
:root[data-color-mode="dark"] .qa-model-option.selected { background:#343d49; }
:root[data-color-mode="dark"] .qa-model-logo { color:#edf2f7; }
:root[data-color-mode="dark"] .qa-model-menu-divider { background:#46515f; }

/* Conversation controls keep the existing landscape and panel layout. */
.qa-new-conversation { position:absolute; left:12px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:28px; height:28px; padding:5px; border:0; border-radius:4px; background:transparent; color:rgba(255,255,255,.78); cursor:pointer; }
.qa-new-conversation::before { content:''; display:block; width:18px; height:18px; background:currentColor; -webkit-mask:url('/qa/icons/message-plus.svg') center/contain no-repeat; mask:url('/qa/icons/message-plus.svg') center/contain no-repeat; }
.qa-new-conversation:hover,.qa-new-conversation:focus-visible { color:#fff; background:rgba(255,255,255,.18); }
.qa-new-conversation:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.qa-new-conversation:active { background:rgba(255,255,255,.28); }
.qa-answer-text { white-space:pre-wrap; overflow-wrap:anywhere; min-width:0; }
.qa-message { min-width:0; max-width:100%; box-sizing:border-box; }
.qa-answer-status { font-size:12px; opacity:.8; margin-top:6px; white-space:normal; }
.qa-answer-status:empty,.qa-answer-actions:empty { display:none; }
.qa-answer-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:2px; margin-top:2px; }
.qa-answer-actions button,.qa-code-block button { border:1px solid currentColor; border-radius:6px; background:transparent; color:inherit; padding:3px 9px; font:inherit; font-size:12px; cursor:pointer; }
.qa-answer-actions .qa-answer-icon { display:grid; place-items:center; width:24px; height:24px; padding:5px; border:0; color:inherit; opacity:.65; }
.qa-answer-icon::before { content:''; width:14px; height:14px; background:currentColor; -webkit-mask:var(--qa-answer-icon) center/contain no-repeat; mask:var(--qa-answer-icon) center/contain no-repeat; }
.qa-answer-icon-copy { --qa-answer-icon:url('/qa/icons/copy.svg'); }
.qa-answer-icon-refresh { --qa-answer-icon:url('/qa/icons/refresh.svg'); }
.qa-answer-icon-copy.is-copied { color:#087643; background:rgba(8,118,67,.1); opacity:1; }
.qa-answer-actions .qa-answer-icon:hover,.qa-answer-actions .qa-answer-icon:focus-visible { background:rgba(69,103,133,.12); opacity:1; }
.qa-answer-actions .qa-answer-icon:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
:root[data-color-mode="dark"] .qa-answer-icon-copy.is-copied { color:#80e5b6; }
:root[data-color-mode="dark"] .qa-answer-actions .qa-answer-icon:hover { background:rgba(190,216,238,.14); }
.qa-message[data-state="error"] .qa-answer-status { color:#b42318; opacity:1; }
.qa-markdown { white-space:normal; line-height:1.65; }
.qa-markdown > :first-child { margin-top:0; }
.qa-markdown > :last-child { margin-bottom:0; }
.qa-markdown h1,.qa-markdown h2,.qa-markdown h3 { font-size:1.15em; line-height:1.4; }
.qa-markdown p { margin:.6em 0; }
.qa-markdown ul,.qa-markdown ol { padding-left:1.6em; }
.qa-markdown blockquote { margin:8px 0; padding-left:12px; border-left:3px solid #7d9bb5; }
.qa-markdown a { color:#1763a1; text-decoration:underline; overflow-wrap:anywhere; }
.qa-code-block { position:relative; margin:10px 0; padding-top:32px; border-radius:8px; background:#17324a; color:#f2f7fc; overflow:hidden; }
.qa-code-block button { position:absolute; top:5px; right:8px; }
.qa-code-block pre { margin:0; padding:10px; max-width:100%; overflow:auto; white-space:pre; font-size:12px; }
.qa-table-scroll { max-width:100%; overflow:auto; margin:10px 0; }
.qa-markdown table { border-collapse:collapse; font-size:13px; }
.qa-markdown td,.qa-markdown th { border:1px solid #8da6bc; padding:6px 10px; text-align:left; }
.qa-markdown th { background:#92afc626; }
.qa-image-names { font-size:11px; opacity:.8; margin-top:5px; overflow-wrap:anywhere; }
.qa-selected-files { max-height:180px; overflow:auto; }
.qa-image-item { position:relative; display:grid; grid-template-columns:42px minmax(0,1fr); gap:3px 8px; flex:1 1 170px; max-width:100%; padding:8px 28px 8px 8px; border:1px solid #8ba7bf88; border-radius:10px; background:#ffffff77; color:#193b59; }
.qa-image-item img { width:42px; height:42px; object-fit:cover; grid-row:span 2; border-radius:5px; }
.qa-image-name { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-image-status { font-size:11px; overflow-wrap:anywhere; }
.qa-image-item > button { position:absolute; top:3px; right:5px; background:transparent; color:inherit; border:0; cursor:pointer; font-size:18px; }
.qa-image-item > .qa-image-retry { position:static; grid-column:2; font-size:12px; text-align:left; padding:0; text-decoration:underline; }
.qa-image-item[data-state="failed"],.qa-image-item[data-state="expired"] { border-color:#c16858; }
.qa-file-type { display:flex; grid-row:span 2; align-items:center; justify-content:center; width:42px; height:42px; border-radius:5px; background:#e5edf4; color:#2a526d; font-size:10px; font-weight:700; overflow:hidden; }
.qa-image-item[data-kind="text"] { border-color:#83a98f88; }
.qa-image-item[data-kind="text"] .qa-file-type { background:#e4f1e8; color:#28634b; }
.qa-attachment-disclosure { flex:1 0 100%; color:#526371; font-size:11px; line-height:1.4; }
#qaImageInput[hidden],#qaFileInput[hidden],#qaSelectedFiles[hidden] { display:none !important; }
:root[data-color-mode="dark"] .qa-image-item { background:#252c35; color:#edf2f7; }
:root[data-color-mode="dark"] .qa-file-type { background:#344459; color:#e7f3ff; }
:root[data-color-mode="dark"] .qa-image-item[data-kind="text"] .qa-file-type { background:#25483a; color:#c8efd8; }
:root[data-color-mode="dark"] .qa-attachment-disclosure { color:#c4ced9; }
:root[data-color-mode="dark"] .qa-markdown a { color:#9cccf3; }
:root[data-color-mode="dark"] .qa-message[data-state="error"] .qa-answer-status { color:#ffa69e; }

/* Conversation files are separate from the current composer attachments. */
.qa-conversation-tools { position:relative; display:flex; align-items:center; gap:6px; flex:0 0 28px; min-width:0; margin:0 10px -4px; z-index:20; color:var(--color-text); }
.qa-conversation-files-button { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; padding:0; border:0; border-radius:5px; font-size:20px; background:transparent; color:inherit; cursor:pointer; }
.qa-conversation-files-summary { min-width:0; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-conversation-files-button:is(:hover,:focus-visible,[aria-expanded="true"]) { background:rgba(69,103,133,.14); }
.qa-conversation-files { position:absolute; left:0; right:0; bottom:32px; max-height:min(360px,50dvh); overflow:auto; padding:10px; border:1px solid var(--qa-menu-border,var(--color-border)); border-radius:10px; background:var(--qa-menu-surface,var(--color-surface)); color:var(--qa-menu-text,var(--color-text)); box-shadow:0 6px 24px rgba(0,0,0,.18); -webkit-backdrop-filter:blur(24px) saturate(125%); backdrop-filter:blur(24px) saturate(125%); }
@media (prefers-reduced-transparency:reduce) { .qa-conversation-files { background:var(--color-surface); -webkit-backdrop-filter:none; backdrop-filter:none; } }
.qa-conversation-files[hidden] { display:none; }
.qa-conversation-files-heading { display:flex; align-items:center; justify-content:space-between; font-size:13px; }
.qa-conversation-files-heading button { border:0; background:transparent; color:inherit; font-size:20px; cursor:pointer; }
.qa-conversation-file { display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid var(--qa-menu-border,var(--color-border)); }
.qa-conversation-file-info { flex:1; min-width:0; }
.qa-conversation-file-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.qa-conversation-file-status { display:block; font-size:11px; opacity:.8; overflow-wrap:anywhere; }
.qa-conversation-file-controls { display:flex; flex:0 0 auto; gap:4px; }
.qa-conversation-file-controls button { min-height:28px; border:1px solid var(--qa-menu-border,var(--color-border)); border-radius:5px; padding:2px 5px; background:transparent; color:inherit; font-size:11px; cursor:pointer; }
.qa-conversation-file[data-state="expired"] .qa-conversation-file-status,.qa-conversation-file[data-state="failed"] .qa-conversation-file-status { color:#a63c30; }
.qa-conversation-files-note { margin:8px 0 0; font-size:11px; line-height:1.5; opacity:.8; }
:root[data-color-mode="dark"] .qa-conversation-file:is([data-state="expired"],[data-state="failed"]) .qa-conversation-file-status { color:#ffa69e; }

.qa-answer-toolbar { display:flex; align-items:center; gap:6px; margin-top:8px; min-width:0; }
.qa-answer-info { display:flex; align-items:center; flex:1 1 0; gap:6px; min-width:0; }
.qa-answer-toolbar .qa-answer-meta { flex:1 1 auto; min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.qa-answer-toolbar .qa-answer-meta:empty { display:none; }
.qa-answer-toolbar .qa-answer-status { flex:0 1 auto; min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.qa-answer-toolbar .qa-answer-actions { flex:0 0 auto; flex-wrap:nowrap; align-items:center; margin:0; gap:2px; }
.qa-answer-actions .qa-answer-source-toggle { height:24px; padding:2px 4px; border:0; font-size:11px; white-space:nowrap; }
.qa-answer-source-details { margin-top:6px; font-size:11px; }
.qa-answer-source-details[hidden] { display:none; }
.qa-source-heading { display:block; margin-bottom:4px; font-size:11px; }
.qa-answer-source-details .qa-answer-sources { margin-top:6px; }
.qa-message:is([data-state="error"],[data-state="incomplete"]) .qa-answer-toolbar { flex-wrap:wrap; }
.qa-message:is([data-state="error"],[data-state="incomplete"]) .qa-answer-info { flex-basis:100%; flex-wrap:wrap; }
.qa-message:is([data-state="error"],[data-state="incomplete"]) .qa-answer-status { flex-basis:100%; white-space:normal; overflow:visible; overflow-wrap:anywhere; }
@container(max-width:380px) { .qa-answer-toolbar,.qa-answer-info { gap:3px; } .qa-answer-toolbar .qa-answer-meta { font-size:10px; } }

.qa-file-drop-overlay { position:absolute; inset:48px 8px 8px; z-index:30; display:flex; align-items:center; justify-content:center; border:2px dashed var(--qa-menu-accent,var(--color-primary)); border-radius:10px; background:var(--qa-menu-surface,var(--color-surface)); color:var(--qa-menu-text,var(--color-text)); font-size:16px; pointer-events:none; }
.qa-file-drop-overlay[hidden] { display:none; }
.qa-evidence-dialog button { min-height:30px; max-width:100%; border:1px solid var(--color-border,#8ba7bf); border-radius:5px; background:var(--color-surface,#fff); color:inherit; padding:3px 7px; font:inherit; }
.qa-node-divider { text-align:center; margin:12px 0; font-size:12px; opacity:.75; }
.qa-node-notice { font-size:11px; line-height:1.5; opacity:.8; margin-top:5px; overflow-wrap:anywhere; }
.qa-node-notice:empty { display:none; }
:root .qa-panel .qa-document-menu button[hidden] { display:none; }
.qa-node-sources { display:flex; gap:5px; flex-wrap:wrap; margin-top:6px; }
.qa-node-source { border:1px solid var(--color-border,#8ba7bf); background:transparent; color:inherit; border-radius:5px; padding:4px 7px; cursor:pointer; font-size:12px; }
.qa-node-source:focus-visible { outline:2px solid var(--color-primary,#1763a1); outline-offset:2px; }
.qa-evidence-dialog { box-sizing:border-box; width:min(680px,calc(100vw - 24px)); max-height:85dvh; overflow:auto; border:1px solid var(--color-border,#8ba7bf); border-radius:10px; padding:16px; color:var(--color-text,#193b59); background:var(--color-surface,#fff); }
.qa-evidence-dialog::backdrop { background:#0007; }
.qa-evidence-dialog h3 { font-size:15px; overflow-wrap:anywhere; }
.qa-evidence-text { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.qa-evidence-dialog button { margin:8px 6px 0 0; cursor:pointer; }
#qaProfileDialog p, #qaProfileDialog li { overflow-wrap:anywhere; line-height:1.6; }
:root[data-color-mode="dark"] .qa-evidence-dialog { color:#edf2f7; background:#252c35; border-color:#566273; }
:root[data-color-mode="dark"] .qa-evidence-dialog button { color:#edf2f7; background:#303944; }
.qa-answer-protection { margin:8px 0; padding:8px 10px; border:1px solid var(--color-border,#8ba7bf); border-radius:8px; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.qa-answer-protection summary { cursor:pointer; font-weight:600; }
.qa-answer-protection p { margin:4px 0; white-space:pre-wrap; }
.qa-answer-protection ul { padding-left:18px; margin:6px 0; }
#qaFeedbackDialog pre, .qa-feedback-content pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:260px; overflow:auto; }
#qaFeedbackDialog label, .qa-feedback-content label { display:block; margin:10px 0; }
#qaFeedbackDialog textarea, .qa-feedback-content textarea { display:block; width:100%; box-sizing:border-box; }
#qaFeedbackDialog { max-height:85dvh; }
.qa-adp-controls { flex-shrink:0; display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:4px 12px; font-size:12px; }
#qaAdpDisclosure { flex-shrink:0; margin:4px 12px; font-size:11px; line-height:1.4; color:var(--color-text-secondary,#526371); }
.qa-adp-controls[hidden] { display:none; }
.qa-adp-controls select,.qa-adp-controls button { max-width:100%; font:inherit; color:inherit; background:var(--bg-secondary,#f5f5f5); border:1px solid var(--border-color,#ccc); border-radius:6px; padding:4px 6px; }
.qa-adp-controls [role=status] { width:100%; overflow-wrap:anywhere; }
.qa-adp-manager { width:100%; }
.qa-adp-manager summary { cursor:pointer; }
.qa-adp-manager > div { max-height:130px; overflow:auto; }
.qa-adp-manager > div > div { display:flex; align-items:center; gap:6px; margin:5px 0; }
.qa-adp-manager span { min-width:0; flex:1; overflow-wrap:anywhere; }
.qa-adp-manager button { flex-shrink:0; }
.qa-model-logo-adp { display:inline-flex; align-items:center; justify-content:center; color:#2277be; font-weight:700; }
.qa-model-menu-head[hidden] { display:none; }
.qa-adp-history { width:100%; }
.qa-adp-history > div { max-height:240px; overflow:auto; padding:6px 0; }
.qa-adp-history-row { display:flex; gap:6px; margin:5px 0; }
.qa-adp-history-row > button:first-child { flex:1; min-width:0; overflow-wrap:anywhere; text-align:left; white-space:normal; }
.qa-adp-controls > span[role=status] { width:100%; overflow-wrap:anywhere; }

.qa-adp-scope-hint { width:100%; margin:0; line-height:1.5; }
.qa-site-help-dialog { box-sizing:border-box; width:min(720px,calc(100vw - 24px)); max-height:85dvh; overflow:auto; padding:20px; border:1px solid var(--border-color,#ccd3dc); border-radius:12px; background:var(--bg-primary,#fff); color:var(--text-primary,#223); }
.qa-site-help-dialog pre { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.7; }
.qa-site-help-dialog::backdrop { background:#0008; }
.qa-site-help-close { position:sticky; top:0; display:block; margin-left:auto; }

/* QA008: keep useful controls, collapse repeated source detail. */
.qa-unified-sources summary{cursor:pointer;font-size:12px;padding:4px 0}.qa-unified-sources .qa-node-source{display:block;max-width:100%;white-space:normal;text-align:left}.qa-adp-scope-hint{font-size:12px;margin:4px 0;opacity:.75}

/* QA009: compact scope bar and bounded reading workspace. */
.qa-study-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 12px;font-size:12px;border-top:1px solid var(--border-color,#dce1e8)}
.qa-study-bar span{flex:1;min-width:100px;overflow-wrap:anywhere}
.qa-study-bar button,.qa-study-dialog button{border:1px solid var(--border-color,#dce1e8);border-radius:6px;padding:5px 9px;background:var(--bg-secondary,#f5f7fa);color:inherit;cursor:pointer}
.qa-study-dialog{margin:auto;box-sizing:border-box;width:min(780px,94vw);max-height:88dvh;overflow:auto;border:1px solid var(--border-color,#dce1e8);border-radius:12px;padding:20px;background:var(--bg-primary,#fff);color:var(--text-primary,#202936)}
.qa-study-dialog::backdrop{background:#0006}.qa-study-dialog form{display:grid;gap:12px;margin:16px 0}.qa-study-dialog input:not([type=checkbox]),.qa-study-dialog textarea,.qa-study-dialog select{box-sizing:border-box;max-width:100%;padding:8px;border:1px solid #aab4c4;border-radius:5px;color:inherit;background:transparent}.qa-study-dialog textarea{min-height:80px;width:100%}.qa-study-dialog fieldset{min-width:0;display:flex;flex-wrap:wrap;gap:10px;border:1px solid #aab4c4}.qa-study-dialog fieldset input{width:80px;margin-left:5px}.qa-study-dialog legend{overflow-wrap:anywhere}.qa-study-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.qa-study-dialog blockquote{margin:8px 0;padding:8px;border-left:3px solid #859bbd;background:#859bbd15;white-space:pre-wrap}.qa-study-row{display:flex;gap:8px;flex-wrap:wrap;padding:8px 0}.qa-study-row span{flex:1;min-width:120px;overflow-wrap:anywhere}.qa-study-choices{max-height:220px;overflow:auto;display:grid;gap:9px}.qa-study-choices label{display:flex;gap:8px;align-items:flex-start}.qa-study-dialog details{border-top:1px solid #aab4c4;padding:10px 0}.qa-study-dialog summary{cursor:pointer;overflow-wrap:anywhere}.qa-study-dialog [role=status]{color:var(--text-secondary,#526176)}

/* QA009 personal outputs and durable conversation task cards. */
.qa-study-dialog textarea[aria-label="成果正文"] { width:100%; min-height:260px; box-sizing:border-box; resize:vertical; }
.qa-study-dialog input[aria-label="成果标题"] { width:100%; box-sizing:border-box; }
.qa-study-result-card { margin-top:12px; padding:12px; border:1px solid var(--border-color,#ccd0d8); border-radius:10px; overflow-wrap:anywhere; }
.qa-study-result-card button,.qa-study-dialog button { margin:4px; }
.qa-study-result-card .qa-markdown { overflow-x:auto; }
.qa-published-source-dialog { position:fixed; inset:auto; left:50%; top:50%; transform:translate(-50%,-50%); margin:0; width:min(720px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:20px; box-sizing:border-box; }
.qa-published-source-dialog select { max-width:100%; margin:8px 0; }
.qa-published-source-dialog pre { overflow-wrap:anywhere; font:inherit; padding:10px; background:var(--bg-secondary,#f5f7fa); border-radius:6px; }
.qa-published-source-dialog h4 { margin:12px 0 4px; }
.qa-published-source-dialog button { margin:8px 8px 0 0; }
.qa-mathcad-selection{display:flex;align-items:center;gap:8px;padding:5px 8px;font-size:12px;color:var(--text-secondary,#58677b);background:var(--bg-card,#eef3f9);border-radius:6px;margin-bottom:6px}
.qa-mathcad-selection[hidden]{display:none}.qa-mathcad-selection span{flex:1;overflow-wrap:anywhere}.qa-mathcad-selection button{border:0;background:transparent;color:inherit;cursor:pointer;padding:4px}


/* QA017: preserve the established landscape/glass design; simplify functional layout only. */
.qa-panel .qa-adp-controls { display:block; margin:0 12px; }
.qa-panel .qa-adp-controls[hidden] { display:none; }
.qa-adp-history > summary { padding:6px 0; cursor:pointer; }
.qa-adp-history > [role=status]:empty { display:none; }
.qa-panel-input { grid-template-rows:none; grid-auto-rows:auto; }
.qa-panel-input > :is(textarea,.qa-selected-files,.qa-mathcad-selection,.qa-screenshot-status,#qaServiceNotice) { grid-column:1 / -1; grid-row:auto; }
.qa-panel-input > :is(.qa-mathcad-selection,.qa-screenshot-status) { margin:0; }
.qa-panel-input .qa-input-tools { grid-row:auto; }
.qa-panel-input .qa-send-btn { grid-column:2; grid-row:auto; }
.qa-panel .qa-answer-toolbar,.qa-panel .qa-answer-toolbar .qa-answer-actions { flex-wrap:wrap; }
.qa-panel .qa-answer-toolbar .qa-answer-status { white-space:normal; overflow:visible; }
.qa-message-more,.qa-message-output-list { font-size:12px; }
.qa-message-more > summary,.qa-message-output-list > summary { padding:4px 6px; cursor:pointer; }
.qa-message-more[open],.qa-message-output-list[open] { flex-basis:100%; padding:4px; border:1px solid var(--color-border); border-radius:8px; }
.qa-message-more button,.qa-message-output-list button { min-height:28px; margin:3px; }
#qaFilesDialog .qa-conversation-files { position:static; box-shadow:none; max-height:55dvh; }
#qaFilesDialog .qa-conversation-tools { display:block; margin:8px 0; }
#qaFilesDialog #qaConversationFilesButton { display:none; }
.qa-panel .qa-markdown { min-width:0; overflow-x:auto; }
.qa-markdown :is(pre,.katex-display) { max-width:100%; overflow-x:auto; }
.qa-markdown .qa-math-display { display:block; max-width:100%; overflow-x:auto; margin:10px 0; padding:4px 0; }
.qa-markdown .qa-math-display math { white-space:nowrap; }
@media(max-width:768px) {
 .qa-panel:not([hidden]) { position:fixed; inset:8px; width:auto; height:auto; min-width:0; max-width:none; max-height:none; z-index:11020; }
 .qa-panel .qa-input-tools { flex-wrap:wrap; }
 body.qa-keyboard-active .qa-panel { top:var(--qa-visible-top,0px); bottom:auto; height:var(--qa-visible-height,100dvh); max-height:var(--qa-visible-height,100dvh); }
}
/* Generated-message controls use the same quiet glass treatment as the composer. */
.qa-panel .qa-study-result-card { margin-top:10px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.qa-panel .qa-study-result-card > p:first-child { margin:6px 0 10px; font-size:12px; color:var(--color-text-muted); }
:root .qa-panel :is(.qa-study-result-card,.qa-mathcad-actions,.qa-message-more,.qa-message-output-list) button,
:root .qa-panel .qa-node-source,
.qa-study-dialog button {
 appearance:none; display:inline-flex; align-items:center; justify-content:center; gap:5px;
 min-height:28px; max-width:100%; margin:3px 5px 3px 0; padding:3px 10px;
 border:1px solid var(--qa-model-idle-border,rgba(144,157,172,.42)); border-radius:14px;
 background:rgba(255,255,255,.16); color:inherit; font:inherit; font-size:12px; line-height:20px;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.18); cursor:pointer; white-space:normal; overflow-wrap:anywhere;
}
:root .qa-panel :is(.qa-study-result-card,.qa-mathcad-actions,.qa-message-more,.qa-message-output-list) button:hover,
:root .qa-panel .qa-node-source:hover,
.qa-study-dialog button:hover { background:rgba(255,255,255,.32); border-color:rgba(126,153,178,.62); }
:root .qa-panel :is(.qa-study-result-card,.qa-mathcad-actions,.qa-message-more,.qa-message-output-list) button:focus-visible,
:root .qa-panel .qa-node-source:focus-visible,
.qa-study-dialog button:focus-visible { outline:2px solid var(--color-primary,#1a3a5c); outline-offset:2px; }
.qa-panel .qa-study-result-card > details { display:inline-block; vertical-align:middle; margin:0 0 0 4px; font-size:12px; }
.qa-panel .qa-study-result-card > details[open] { display:block; margin:8px 0; }
.qa-panel .qa-study-result-card summary { cursor:pointer; padding:4px 0; color:var(--color-text-muted); }
.qa-panel .qa-message-more[open],.qa-panel .qa-message-output-list[open] { padding:0; border:0; background:transparent; }
.qa-panel .qa-study-result-card button:disabled { opacity:.55; cursor:wait; }
.qa-study-dialog { border:1px solid rgba(255,255,255,.7); border-radius:16px; background:rgba(237,245,252,.92); color:var(--color-text,#193b59); box-shadow:0 12px 40px rgba(25,59,89,.2); -webkit-backdrop-filter:blur(24px) saturate(125%); backdrop-filter:blur(24px) saturate(125%); }
.qa-study-dialog :is(input:not([type=checkbox]),textarea,select) { border-color:rgba(128,151,173,.5); border-radius:9px; background:rgba(255,255,255,.22); }
:root[data-color-mode="dark"] .qa-study-dialog { background:rgba(25,42,58,.94); color:#e4edf5; border-color:rgba(196,214,233,.4); }
:root[data-color-mode="dark"] .qa-panel :is(.qa-study-result-card,.qa-mathcad-actions,.qa-message-more,.qa-message-output-list) button,
:root[data-color-mode="dark"] .qa-panel .qa-node-source,
:root[data-color-mode="dark"] .qa-study-dialog button { background:rgba(196,214,233,.06); border-color:rgba(196,214,233,.35); }
@media(max-width:768px) { :root .qa-panel :is(.qa-study-result-card,.qa-mathcad-actions,.qa-message-more,.qa-message-output-list) button,.qa-study-dialog button { min-height:32px; } }
@media(prefers-reduced-transparency:reduce) { .qa-study-dialog { background:#edf5fc; -webkit-backdrop-filter:none; backdrop-filter:none; } :root[data-color-mode="dark"] .qa-study-dialog { background:#192a3a; } }
/* QA017 confirmed: floating actions and an overlay history drawer, preserving the landscape. */
.qa-panel-header .qa-history-button { position:absolute; top:50%; left:46px; transform:translateY(-50%); width:28px; height:28px; display:grid; place-items:center; padding:5px; border:0; border-radius:5px; color:#ffffffc7; background:transparent; cursor:pointer; }
.qa-history-button svg { width:18px; height:18px; }
.qa-panel-header { padding-left:80px; }
.qa-reference-chip { display:flex; align-items:center; gap:6px; max-width:100%; padding:5px 9px; border:1px solid var(--border-color,#aab6c3); border-radius:9px; font-size:12px; color:var(--text-primary); background:var(--bg-card,#fff); }
.qa-reference-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-reference-chip button { flex-shrink:0; border:0; background:transparent; color:inherit; cursor:pointer; }
.qa-reference-chip[hidden] { display:none; }
#qaQuickPrompts { border-bottom:1px solid var(--border-color,#aaa5); margin-bottom:5px; padding-bottom:5px; }
#qaQuickPrompts>button { display:block; width:100%; text-align:left; }
#qaQuickPrompts>p { margin:6px; font-size:12px; color:var(--text-secondary); }
@media(max-width:420px) { .qa-panel-header .qa-panel-status { display:none; }.qa-panel-header { padding-left:80px; padding-right:108px; }.qa-panel-title { font-size:12px; }.qa-conversation-file { flex-wrap:wrap; } }
.qa-answer-actions .qa-answer-save { min-height:28px; padding:3px 8px; white-space:nowrap; border:0; color:inherit; background:transparent; }
.qa-answer-actions .qa-answer-save:hover { background:rgba(100,130,155,.16); }
.qa-answer-actions .qa-answer-save:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.qa-answer-actions .qa-answer-save:active { transform:scale(.98); }
.qa-answer-actions .qa-answer-save:disabled { opacity:.6; cursor:wait; }
.qa-history-button:hover,.qa-history-button[aria-expanded=true] { color:white; background:#ffffff24; }
.qa-history-button:focus-visible { outline:2px solid white; outline-offset:1px; }
.qa-popover-host { display:inline-flex; vertical-align:middle; }
.qa-panel .qa-answer-actions .qa-popover-trigger { min-height:24px; height:24px; padding:2px 5px; margin:0; border:0; border-radius:5px; font-size:11px; background:transparent; color:inherit; cursor:pointer; }
.qa-popover-trigger[aria-expanded=true] { background:#7397b229; }
.qa-glass-popover { position:fixed; z-index:12050; box-sizing:border-box; width:240px; overflow:auto; overscroll-behavior:contain; padding:6px; border:1px solid rgba(255,255,255,.68); border-radius:14px; color:#233e56; background:linear-gradient(145deg,rgba(255,255,255,.3),transparent 60%),rgba(225,238,248,.82); box-shadow:inset 0 1px 0 #ffffff8c,0 12px 28px #1430492e; -webkit-backdrop-filter:blur(24px) saturate(125%); backdrop-filter:blur(24px) saturate(125%); }
.qa-glass-popover[hidden] { display:none; }
.qa-glass-popover button { display:block; box-sizing:border-box; width:100%; min-height:34px; margin:0; padding:7px 12px; border:0; border-radius:8px; color:inherit; background:transparent; font:inherit; font-size:13px; line-height:1.5; text-align:left; white-space:normal; overflow-wrap:anywhere; cursor:pointer; }
.qa-glass-popover button:hover,.qa-glass-popover button:focus-visible { outline:0; background:#ffffff5c; }
.qa-glass-popover button:disabled { opacity:.5; cursor:default; }
.qa-source-label { display:inline-block; padding:3px 9px; margin:3px 5px 3px 0; font-size:12px; line-height:1.6; border:1px solid #90a1b25c; border-radius:12px; color:inherit; background:#ffffff10; overflow-wrap:anywhere; cursor:text; }
.qa-history-overlay { position:absolute; z-index:35; inset:48px 0 0; background:#17324a26; }
.qa-history-overlay[hidden] { display:none; }
.qa-history-sheet { display:flex; flex-direction:column; width:min(290px,85%); height:100%; min-width:0; box-sizing:border-box; padding:12px; border-right:1px solid var(--qa-menu-border); color:var(--qa-menu-text); background:linear-gradient(145deg,var(--qa-menu-sheen),transparent 60%),var(--qa-menu-surface); box-shadow:8px 0 24px #14304921; -webkit-backdrop-filter:blur(24px) saturate(125%); backdrop-filter:blur(24px) saturate(125%); outline:0; }
.qa-history-heading { display:flex; align-items:center; justify-content:space-between; padding:0 3px 10px; font-size:14px; }
.qa-history-close { width:28px; height:28px; border:0; border-radius:6px; font-size:22px; line-height:1; color:inherit; background:transparent; cursor:pointer; }
.qa-history-list { min-height:0; flex:1; overflow:auto; scrollbar-width:thin; padding-right:3px; overscroll-behavior:contain; }
.qa-history-group { font-size:11px; color:var(--qa-menu-muted); margin:14px 8px 5px; }
.qa-history-sheet .qa-adp-history-row { display:flex; align-items:center; gap:0; margin:3px 0; border-radius:9px; }
.qa-history-sheet .qa-adp-history-row:hover { background:var(--qa-menu-hover); }
.qa-history-sheet .qa-adp-history-row.is-current { background:var(--qa-menu-selected); }
.qa-history-sheet .qa-history-open { flex:1; min-width:0; padding:9px 8px; border:0; border-radius:9px; background:transparent; color:inherit; font:inherit; font-size:12px; text-align:left; cursor:pointer; }
.qa-history-open span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; line-height:1.6; }
.qa-history-open small { display:block; margin-top:3px; font-size:10px; color:var(--qa-menu-muted); }
.qa-history-open:disabled { opacity:.5; cursor:default; }
.qa-history-more button { width:28px; min-height:30px; padding:3px; margin:0; border:0; border-radius:6px; background:transparent; color:inherit; cursor:pointer; font-size:18px; }
.qa-history-pagination { display:flex; justify-content:space-between; gap:8px; margin:12px 4px; }
.qa-history-pagination button { padding:4px 10px; border:1px solid var(--qa-menu-border); border-radius:12px; background:#ffffff15; color:inherit; font:inherit; font-size:12px; cursor:pointer; }
.qa-history-pagination button:disabled { opacity:.4; cursor:default; }
.qa-history-note,.qa-history-deleted,.qa-history-sheet [role=status] { font-size:11px; line-height:1.6; overflow-wrap:anywhere; color:var(--qa-menu-muted); }
.qa-history-deleted summary { cursor:pointer; padding:5px 0; }
.qa-history-sheet [role=status]:empty { display:none; }
.qa-history-sheet :is(button,summary):focus-visible { outline:2px solid var(--qa-menu-accent); outline-offset:-2px; }
:root[data-color-mode=dark] .qa-glass-popover { color:#e2edf6; border-color:#afcbe452; background:linear-gradient(145deg,#b8d3ed1a,transparent 60%),rgba(25,42,58,.92); box-shadow:inset 0 1px 0 #d5e9fa1f,0 12px 28px #08111b4d; }
:root[data-color-mode=dark] .qa-glass-popover button:hover,:root[data-color-mode=dark] .qa-glass-popover button:focus-visible { background:#bed8ee24; }
@media(max-width:768px) { .qa-history-sheet { width:min(320px,90%); }.qa-panel-header { padding-left:76px; padding-right:44px; }.qa-panel-title { max-width:100%; } }
@media(prefers-reduced-transparency:reduce) { .qa-glass-popover,.qa-history-sheet { background:#e1eef8; -webkit-backdrop-filter:none; backdrop-filter:none; }:root[data-color-mode=dark] .qa-glass-popover,:root[data-color-mode=dark] .qa-history-sheet { background:#192a3a; } }

@media(max-width:768px) { .qa-panel-header { padding-left:110px; padding-right:108px; } }

.qa-billing-user-dialog{box-sizing:border-box;max-height:80dvh;overflow:auto}.qa-billing-user-dialog h3{margin:0 0 12px}.qa-billing-user-dialog p{margin:10px 0}.qa-billing-user-dialog label{display:inline-flex;gap:8px;align-items:center;margin-right:8px}.qa-billing-user-dialog input{width:100px;max-width:30vw;padding:6px 8px;font:inherit;border:1px solid #a9bac8;border-radius:6px;background:transparent;color:inherit}.qa-billing-user-dialog button,.qa-billing-actions a{font:inherit;cursor:pointer;padding:6px 12px;border:1px solid #a9bac8;border-radius:7px;background:transparent;color:inherit;text-decoration:none}.qa-billing-task-row{padding:10px 0;border-top:1px solid #a9bac855;font-size:13px;line-height:1.7}.qa-billing-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px}@media(max-width:480px){.qa-billing-user-dialog label{display:flex;margin-bottom:10px}.qa-billing-user-dialog input{max-width:100px}}
