.native-tools-panel{margin:28px 0;padding:24px;border:1px solid var(--line);border-radius:18px}.native-auth-qr{display:block;width:260px;height:260px;object-fit:contain;margin:20px auto}.native-connected{color:#18884d;font-weight:600}.native-identity{white-space:pre-wrap;overflow-wrap:anywhere;max-height:260px;overflow:auto;font-size:13px}.native-code{min-height:360px;font-family:Consolas,monospace;font-size:13px;line-height:1.6}.external-action-panel{position:fixed;right:20px;bottom:110px;width:min(400px,calc(100vw - 40px));max-height:60vh;overflow:auto;background:#fff;padding:22px;border:1px solid #d5e9dc;border-radius:16px;box-shadow:0 8px 40px #0002;z-index:100}.external-action pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto}.external-action{padding:14px 0;border-top:1px solid var(--line)}.external-action button{margin:0 10px 0 0}

/* 企业微信业务授权沿用平台主题；正文滚动时保留底部操作。 */
dialog:has(.wecom-tools-panel) {
  --wecom-bg: var(--native-bg, #fcfcfc);
  --wecom-ink: var(--native-text, #242424);
  --wecom-muted: var(--native-muted, #62666b);
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--line, #e2e4e7);
  border-radius: 16px;
  overflow: hidden;
  background: var(--wecom-bg);
  color: var(--wecom-ink);
  box-shadow: 0 20px 70px #0003;
}
dialog[open]:has(.wecom-tools-panel) { display: flex; flex-direction: column; }
dialog:has(.wecom-tools-panel)::backdrop { background: #0006; }
dialog:has(.wecom-tools-panel) .dialog-head { flex: none; padding: 22px 24px 12px; margin: 0; }
dialog:has(.wecom-tools-panel) .dialog-head h2 { margin: 0; font-size: 19px; line-height: 1.5; }
dialog:has(.wecom-tools-panel) .dialog-head .icon-button { margin: 0; opacity: 1; width: 36px; height: 36px; flex: none; }
dialog:has(.wecom-tools-panel) .dialog-head .icon-button:focus-visible { outline: 2px solid var(--wecom-ink); outline-offset: 2px; }
dialog:has(.wecom-tools-panel) #dialogBody { display: flex; min-height: 0; }
.wecom-tools-panel { display: flex; flex-direction: column; min-height: 0; width: 100%; font-size: 14px; line-height: 1.6; }
.wecom-tools-scroll { overflow: auto; overscroll-behavior: contain; padding: 0 24px 22px; }
.wecom-tools-panel p { font-size: 14px; line-height: 1.6; }
.wecom-tools-intro { margin: 0 0 16px; color: var(--wecom-muted); }
.wecom-status-line { margin: 0 0 12px; font-weight: 600; }
.wecom-status-line[data-state="connected"] { color: var(--native-text, #197349); }
.wecom-status-line[data-state="failed"], .wecom-status-line[data-state="error"] { color: var(--native-text, #9b471a); }
.wecom-identity-card { border: 1px solid var(--line, #e2e4e7); border-radius: 12px; padding: 18px; background: color-mix(in srgb, var(--wecom-ink) 3%, var(--wecom-bg)); }
.wecom-identity-account { display: flex; gap: 12px; align-items: center; }
.wecom-identity-avatar { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line, #e2e4e7); border-radius: 12px; background: var(--wecom-bg); flex: none; }
.wecom-identity-avatar .icon { width: 24px; height: 24px; }
.wecom-identity-copy { display: flex; flex-direction: column; min-width: 0; }
.wecom-eyebrow { font-size: 13px; color: var(--wecom-muted); }
.wecom-identity-copy strong { font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; }
.wecom-identity-robot { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--wecom-muted); overflow-wrap: anywhere; }
.wecom-identity-robot .icon { width: 22px; height: 22px; flex: none; }
.wecom-identity-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; margin-top: 10px; }
.wecom-identity-details { min-width: 0; font-size: 13px; }
.wecom-identity-details summary { width: fit-content; cursor: pointer; padding: 7px 0; color: var(--wecom-muted); }
.wecom-identity-details dl { margin: 8px 0 0; }
.wecom-identity-details dt { margin-top: 8px; color: var(--wecom-muted); }
.wecom-identity-details dd { margin: 2px 0 0; overflow-wrap: anywhere; user-select: text; }
.wecom-text-button { color: var(--wecom-ink); background: transparent; border: 0; padding: 6px 0; min-height: 36px; font-size: 14px; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wecom-state-description { margin: 12px 0 0; color: var(--wecom-muted); }
.wecom-state-error { padding: 12px 14px; border: 1px solid var(--line, #e7cfbc); border-radius: 8px; background: color-mix(in srgb, #cf7c27 8%, var(--wecom-bg)); margin: 12px 0 0; }
.wecom-permissions { margin-top: 18px; }
.wecom-permissions h3 { margin: 0 0 12px; font-size: 15px; }
.wecom-permissions ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.wecom-permissions li { display: flex; align-items: flex-start; gap: 10px; }
.wecom-permissions li > .icon { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.wecom-permissions strong { font-size: 14px; font-weight: 600; }
.wecom-permissions p { display: inline; margin: 0; color: var(--wecom-muted); }
.wecom-tools-notice { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; border: 1px solid var(--line, #e2e4e7); border-radius: 8px; padding: 12px; background: color-mix(in srgb, var(--wecom-ink) 3%, var(--wecom-bg)); }
.wecom-tools-notice .icon { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.wecom-tools-notice p { margin: 0; }
.wecom-tools-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: none; padding: 16px 24px; border-top: 1px solid var(--line, #e2e4e7); background: var(--wecom-bg); }
.wecom-tools-footer .primary, .wecom-tools-footer .secondary { min-height: 40px; font-size: 14px; }
.wecom-tools-footer .secondary { color: var(--wecom-ink); background: var(--wecom-bg); border-color: var(--line, #ddd); }
.wecom-tools-footer .primary { background: var(--wecom-ink); color: var(--wecom-bg); border-color: var(--wecom-ink); }
.wecom-tools-footer .wecom-disconnect { margin-right: auto; }
.wecom-tools-panel button:disabled { opacity: .5; cursor: not-allowed; }
.wecom-tools-panel :is(button, summary):focus-visible { outline: 2px solid var(--wecom-ink); outline-offset: 3px; }
.wecom-start-panel { display: flex; flex-direction: column; align-items: center; padding: 18px 12px; gap: 10px; text-align: center; border: 1px solid var(--line, #e2e4e7); border-radius: 12px; }
.wecom-start-panel > .icon { width: 32px; height: 32px; }
.wecom-start-panel strong { font-size: 16px; }
.wecom-start-panel p { margin: 0; color: var(--wecom-muted); }
.wecom-qr-frame { display: grid; place-items: center; width: 244px; height: 244px; max-width: 100%; margin: 0 auto; border: 1px solid var(--line, #e2e4e7); border-radius: 12px; overflow: hidden; background: #fff; color: #62666b; }
.wecom-qr-frame > * { grid-area: 1 / 1; }
.wecom-qr-frame .native-auth-qr { width: 228px; height: 228px; max-width: 100%; margin: 0; }
.wecom-qr-frame .native-auth-qr[hidden] { display: none; }
html[data-native-theme]:not([data-native-theme="default"]):not([data-native-theme="light"]):not([data-native-theme="system"]):not([data-native-theme="deepseek"]) .wecom-tools-panel .icon:not([src$="robot-avatar.svg"]) { filter: invert(1); }
html[data-native-theme]:not([data-native-theme="default"]):not([data-native-theme="light"]):not([data-native-theme="system"]):not([data-native-theme="deepseek"]) dialog:has(.wecom-tools-panel) .dialog-head .icon-button img { filter: invert(1); }
@media(max-width: 600px) {
  dialog:has(.wecom-tools-panel) { max-width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  dialog:has(.wecom-tools-panel) .dialog-head { padding: 18px 16px 10px; }
  dialog:has(.wecom-tools-panel) .dialog-head h2 { font-size: 18px; }
  .wecom-tools-scroll { padding: 0 16px 18px; }
  .wecom-tools-footer { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .wecom-tools-footer .primary, .wecom-tools-footer .secondary { min-height: 44px; padding: 8px 12px; white-space: normal; }
  .wecom-identity-card { padding: 14px; }
}

/* Original DSH themes */
html[data-native-theme="catppuccin"]{color-scheme:dark;--native-bg:#1e1e2e;--native-surface:#242436;--native-text:#cdd6f4;--native-muted:#a6adc8;--line:rgba(205, 214, 244, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="cobalt2"]{color-scheme:dark;--native-bg:#193549;--native-surface:#1f4662;--native-text:#ffffff;--native-muted:#e1efff;--line:rgba(255, 255, 255, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="deepseek"]{color-scheme:light;--native-bg:#ffffff;--native-surface:#ffffff;--native-text:#1f1f1f;--native-muted:#616367;--line:rgba(0, 0, 0, 0.1);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="dracula"]{color-scheme:dark;--native-bg:#282a36;--native-surface:#2d3040;--native-text:#f8f8f2;--native-muted:#c5c8c6;--line:rgba(248, 248, 242, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="github-dark"]{color-scheme:dark;--native-bg:#0d1117;--native-surface:#131a23;--native-text:#e6edf3;--native-muted:#b1bac4;--line:rgba(240, 246, 252, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="gruvbox"]{color-scheme:dark;--native-bg:#282828;--native-surface:#32302f;--native-text:#ebdbb2;--native-muted:#d5c4a1;--line:rgba(235, 219, 178, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="nord"]{color-scheme:dark;--native-bg:#2e3440;--native-surface:#3b4252;--native-text:#eceff4;--native-muted:#d8dee9;--line:rgba(236, 239, 244, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="oled"]{color-scheme:dark;--native-bg:#000000;--native-surface:#050505;--native-text:#f0f0f0;--native-muted:#a0a0a0;--line:rgba(255, 255, 255, 0.18);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="solarized"]{color-scheme:dark;--native-bg:#002b36;--native-surface:#05303c;--native-text:#eee8d5;--native-muted:#93a1a1;--line:rgba(238, 232, 213, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="synthwave-84"]{color-scheme:dark;--native-bg:#241b2f;--native-surface:#262335;--native-text:#ffffff;--native-muted:#b6b1b1;--line:rgba(255, 255, 255, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="tokyo-night"]{color-scheme:dark;--native-bg:#1a1b26;--native-surface:#1f2030;--native-text:#c0caf5;--native-muted:#a9b1d6;--line:rgba(192, 202, 245, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme="dark"]{color-scheme:dark;--native-bg:#0d1117;--native-surface:#131a23;--native-text:#e6edf3;--native-muted:#b1bac4;--line:rgba(240, 246, 252, 0.15);background:var(--native-bg);color:var(--native-text)}
html[data-native-theme]:not([data-native-theme="default"]):not([data-native-theme="light"]):not([data-native-theme="system"]) :is(body,main,.main,.page,.conversation,.thread,.message,.skill-tile,.skill-builtin-row,.composer,.compose-box,.native-tools-panel,.external-action-panel,dialog,input,select,textarea){background:var(--native-bg);color:var(--native-text)}
html[data-native-theme]:not([data-native-theme="default"]):not([data-native-theme="light"]):not([data-native-theme="system"]) :is(aside,.sidebar,.muted,.skill-tile-meta,.skill-detail-scroll,.skill-document,.skill-detail-footer,.skill-filter-row){background:var(--native-surface);color:var(--native-muted)}
/* In-conversation questions: neutral surfaces, clear choices, no modal overlay. */
.native-question-card{--question-bg:var(--native-bg,#fff);--question-ink:var(--native-text,#242424);--question-muted:var(--native-muted,#717171);margin:18px 0 24px;border:1px solid var(--line,#e5e5e5);border-radius:20px;padding:22px 24px;background:var(--question-bg);color:var(--question-ink);line-height:1.5;max-width:100%;box-sizing:border-box;text-align:left}
.native-question-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.native-question-caption{display:inline-flex;align-items:center;gap:8px;color:var(--question-muted);font-size:13px}
.native-question-caption .icon{width:17px;height:17px;opacity:.65}
.native-question-count{font-size:12px;color:var(--question-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.native-question-fields{border:0;margin:0;padding:0;min-width:0}
.native-question-card h3{font-size:18px;font-weight:600;line-height:1.6;margin:0 0 10px;overflow-wrap:anywhere;outline:none}
.native-question-hint{font-size:12px;color:var(--question-muted);margin:5px 0 14px}
.native-question-choices{display:grid;gap:9px;margin:14px 0 20px}
.native-question-option{display:flex;align-items:flex-start;gap:12px;cursor:pointer;border:1px solid var(--line,#e5e5e5);border-radius:12px;padding:13px 15px;transition:background .12s,border-color .12s;min-width:0}
.native-question-option:hover{background:color-mix(in srgb,var(--question-ink) 3%,var(--question-bg))}
.native-question-option:has(input:checked){border-color:var(--question-ink);background:color-mix(in srgb,var(--question-ink) 5%,var(--question-bg))}
.native-question-option:has(input:focus-visible){outline:2px solid #82a9ec;outline-offset:2px}
.native-question-option input{width:17px;height:17px;min-height:0;flex:0 0 17px;margin:3px 0 0;padding:0;accent-color:var(--question-ink);box-shadow:none}
.native-option-content{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
.native-option-title{display:flex;gap:8px;flex-wrap:wrap;align-items:center;font-size:14px;font-weight:500}
.native-option-description{font-size:12px;font-weight:400;line-height:1.55;color:var(--question-muted)}
.native-option-recommended{font-size:10px;color:var(--question-muted);border:1px solid var(--line,#dedede);border-radius:5px;padding:1px 5px;white-space:nowrap}
.native-question-input-label{display:block;font-size:12px;color:var(--question-muted);margin-bottom:8px}
.native-question-card .native-question-input{display:block;resize:vertical;width:100%;min-height:70px;max-height:240px;box-sizing:border-box;border:1px solid var(--line,#e5e5e5);border-radius:12px;background:var(--question-bg);color:var(--question-ink);padding:12px 14px;font:inherit;font-size:13px;line-height:1.6}
.native-question-input::placeholder{color:var(--question-muted);opacity:.75}
.native-question-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px}
.native-question-navigation{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.native-question-card button{min-height:36px;border-radius:20px;padding:8px 15px;font-size:12px;line-height:1.4}
.native-question-submit{background:var(--question-ink);color:var(--question-bg);border:1px solid var(--question-ink);font-weight:500}
.native-question-back{background:transparent;color:var(--question-ink);border:1px solid var(--line,#e5e5e5)}
.native-question-later,.native-question-resume{background:transparent;color:var(--question-muted);border:0}
.native-question-card .native-question-later{padding-inline:0}
.native-question-card button:disabled{opacity:.4;cursor:not-allowed}
.native-question-fields:disabled .native-question-option{cursor:wait;opacity:.6}
.native-question-error{color:#b45309;font-size:12px;margin:12px 0}
.native-question-error[hidden]{display:none}
.native-plan-text{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:340px;overflow:auto;color:var(--question-ink);background:color-mix(in srgb,var(--question-ink) 3%,var(--question-bg));padding:16px;border-radius:12px;margin:14px 0 20px;font-size:13px}
.native-question-history summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:13px;color:var(--question-muted)}
.native-question-history summary::-webkit-details-marker{display:none}
.native-question-history summary .icon{width:16px;height:16px;opacity:.7}
.native-question-history summary .icon:last-child{margin-left:auto;transition:transform .15s}
.native-question-history[open] summary .icon:last-child{transform:rotate(180deg)}
.native-answer-record{margin-top:16px;padding-top:14px;border-top:1px solid var(--line,#e5e5e5);font-size:13px;overflow-wrap:anywhere}
.native-saved-answer{white-space:pre-wrap;margin:8px 0 0;color:var(--question-muted);overflow-wrap:anywhere;font-size:13px}
.native-question-notice{position:fixed;right:24px;top:62px;z-index:36;display:inline-flex;align-items:center;gap:8px;max-width:calc(100vw - 32px);border:1px solid var(--line,#e5e5e5);border-radius:20px;background:var(--native-bg,#fff);color:var(--native-text,#333);padding:10px 16px;box-shadow:0 3px 12px #0000000a;font-size:12px}
.native-question-notice .icon{width:16px;height:16px}
#home>.native-question-notice{position:static;align-self:flex-end;margin:0 0 14px;box-shadow:none}
@media(max-width:600px){.native-question-card{padding:18px 16px;border-radius:16px}.native-question-card h3{font-size:16px}.native-question-option{padding:12px}.native-question-footer{align-items:flex-start;flex-wrap:wrap}.native-question-navigation{margin-left:auto;flex-wrap:wrap}.native-question-card button{padding:8px 12px}.native-question-notice{right:16px}}
@media(prefers-reduced-motion:reduce){.native-question-option,.native-question-history summary .icon:last-child{transition:none}}
.native-extension-toggle{position:fixed;right:24px;top:64px;z-index:35;background:white!important}
.native-extension-view{position:fixed;right:12px;top:54px;bottom:12px;width:min(1100px,calc(100vw - 32px));z-index:55;background:#fff;border:1px solid #e1e6e3;border-radius:14px;box-shadow:0 8px 28px #18352014;overflow:hidden;display:flex;flex-direction:column}
.native-extension-view header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid #edf0ee}
.native-extension-view iframe{border:0;background:white;width:100%;flex:1;min-height:0}
.native-extension-view.is-collapsed{left:-14000px;right:auto;width:1100px;pointer-events:none}
body>.native-extension-view{left:auto;height:auto;min-height:0;padding:0;transform:none}
body>.native-extension-view.is-collapsed{left:-14000px;right:auto}
