/* AI 抽屉沿用两种主题的变量，长地址与外部文本必须能在窄屏换行。 */
.ai-panel { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.ai-panel h3 { margin: 20px 0 8px; }
.ai-form { display: grid; gap: 14px; }
.ai-form .field { margin: 0; min-width: 0; }
.ai-form input, .ai-form select, .ai-form textarea { width: 100%; max-width: 100%; min-width: 0; font-size: 16px; }
.ai-toggle { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ai-toggle input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--accent); }
.ai-number-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-panel button { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; border-radius: 6px; }
.ai-hint, .ai-status { margin: 8px 0; color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.ai-status.is-error, .ai-hint.is-error { color: var(--danger); }
.ai-destination { padding: 10px 0; margin: 0; border-block: 1px solid var(--line); font-size: 14px; color: var(--text); }
.ai-preview { margin: 0; }
.ai-preview dt { margin-top: 18px; color: var(--text-secondary); font-size: 12px; }
.ai-preview dd { margin: 6px 0 0; font-size: 14px; white-space: pre-wrap; line-height: 1.7; }
.ai-answer { margin: 18px 0; white-space: pre-wrap; font-size: 14px; line-height: 1.8; }
.ai-sources, .ai-suggestions { display: grid; min-width: 0; }
.ai-source { display: grid; gap: 6px; width: 100%; padding: 14px 0; text-align: left; color: var(--text); background: none; border: 0; border-bottom: 1px solid var(--line); }
.ai-source span { color: var(--text-secondary); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.ai-suggestion { min-width: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ai-suggestion p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; white-space: pre-wrap; }
.ai-settings-entry { padding: 18px 0; border-block: 1px solid var(--line); }
.ai-settings-entry .ai-actions { margin-top: 12px; }
.capture-ai-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; }
.capture-ai-tools small { color: var(--text-secondary); font-size: 11px; }
.capture-ai-tools button { min-height: 44px; }
.atlas-peek [data-ai-relations] { margin-top: 6px; }
.ai-form[aria-busy="true"] { opacity: 0.8; }
