:root {
  color-scheme: light;
  --background: #f7f7f7;
  --surface: #ffffff;
  --ink: #1c2024;
  --muted: #60646c;
  --line: #e2e3e7;
  --soft: #f0f0f3;
  --primary: #1073e9;
  --primary-hover: #086de0;
  --ring: #75abf7;
  --success: #487963;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--background);
}
.settings-intro { margin: 24px 0 16px; color: var(--muted); font-size: 14px; }
.settings-card { margin: 18px 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.settings-form label { display: block; margin: 18px 0 7px; font-size: 13px; font-weight: 600; }
.settings-form input, .settings-form select { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.settings-form small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.6; font-size: 12px; }
.settings-form button { margin-top: 18px; }
.settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.settings-form > .section-note { margin-top: 18px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, textarea, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid #b5d5ff; outline-offset: 2px; }
main { width: min(100%, 760px); margin: 0 auto; padding: 0 24px 24px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 15px; font-weight: 680; letter-spacing: -.02em; }
h2 { font-size: 14px; font-weight: 670; letter-spacing: -.01em; }
p { line-height: 1.65; overflow-wrap: anywhere; }
a { color: #086de0; text-decoration: none; }
a:hover { text-decoration: underline; }
.caption { color: var(--muted); font-size: 12px; line-height: 1.5; }
.app-header, .brand, .header-actions, .conversation-bar, .conversation-identity, .mode-bar, .reply-heading, .reply-label, .composer-footer, .send-actions, .send-group, footer { display: flex; align-items: center; }
.app-header { min-height: 76px; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: var(--primary); font-size: 11px; font-weight: 750; letter-spacing: .03em; }
.header-actions { gap: 12px; }
.connection { display: inline-flex; align-items: center; gap: 6px; color: #8b8d98; font-size: 11px; white-space: nowrap; }
.connection:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b9bbc6; }
.connection.live { color: #668071; }
.connection.live:before { background: #71a286; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 8px; color: #60646c; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.icon-button:hover { color: var(--ink); background: var(--soft); }
.icon-button svg, .summary-icon svg, .small-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.conversation-bar { justify-content: space-between; gap: 12px; margin: 25px 0 19px; }
.conversation-identity { gap: 12px; min-width: 0; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 13px; color: #086de0; background: #e9f3ff; border: 1px solid #d9e9ff; font-size: 14px; font-weight: 700; }
.identity-text { min-width: 0; }
.identity-text h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.identity-text p { margin-top: 3px; }
.customer-panel { margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.customer-panel > summary { display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 12px 15px; }
.customer-panel > summary:hover { background: #f9f9fb; }
.customer-panel > summary:after { content: ""; flex: 0 0 7px; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid #8b8d98; border-bottom: 1.5px solid #8b8d98; transform: rotate(45deg) translateY(-2px); }
.customer-panel[open] > summary:after { transform: rotate(225deg) translate(-2px, -1px); }
.customer-body { padding: 0 15px 15px; }
.customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; margin: 10px 0 14px; }
.customer-grid > div { min-width: 0; padding: 10px 0; border-bottom: 1px solid #f0f0f3; }
.customer-grid dt { color: #8b8d98; font-size: 11px; }
.customer-grid dd { margin: 4px 0 0; color: #1c2024; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.customer-grid dd.missing { color: #9b9da6; }
.potential { padding: 12px; border: 1px solid #e2e3e7; border-radius: 9px; background: #f9f9fb; }
.potential-heading, .profile-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.potential-heading strong { color: #343941; font-size: 12px; }
.potential p { margin-top: 7px; color: #60646c; font-size: 12px; white-space: pre-wrap; }
.profile-actions { margin-top: 12px; }
.badge { display: inline-flex; align-items: center; flex-shrink: 0; gap: 5px; padding: 5px 9px; border: 1px solid #d9e9ff; border-radius: 7px; background: #f5f9ff; color: #086de0; font-size: 11px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.badge.sent { border-color: #ccebe5; color: #008573; background: #f3fbf9; }
.badge.paused { border-color: #e2e3e7; color: #60646c; background: #f9f9fb; }
.badge.error { border-color: #f0d7d1; color: #a5584a; background: #fcf3f1; }
.mode-bar { gap: 14px; justify-content: space-between; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.mode-description { display: grid; gap: 3px; min-width: 0; }
.mode-description label { font-size: 13px; font-weight: 650; }
.mode-bar select { max-width: 50%; min-height: 36px; padding: 0 30px 0 11px; border: 1px solid #d9d9e0; border-radius: 8px; color: #1c2024; background: #fff; font-size: 12px; }
.reply-card { overflow: hidden; border: 1px solid #e2e3e7; border-radius: 14px; background: var(--surface); box-shadow: 0 2px 6px rgba(28, 32, 36, .025); }
.reply-heading { justify-content: space-between; gap: 12px; min-height: 57px; padding: 14px 19px; border-bottom: 1px solid #f0f0f3; }
.reply-label { gap: 9px; }
.small-mark { display: grid; place-items: center; width: 27px; height: 27px; padding: 6px; border-radius: 8px; color: #086de0; background: #e9f3ff; }
.reply-body { padding: 19px; }
.question { margin-bottom: 20px; padding: 12px 14px; border: 1px solid #e8e8ec; border-radius: 9px; background: #f9f9fb; }
.eyebrow, .answer-label { color: #8b8d98; font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.question p { max-height: 110px; overflow: auto; margin-top: 5px; color: #60646c; font-size: 13px; white-space: pre-wrap; }
.answer-label { margin-bottom: 8px; }
.answer { min-height: 64px; padding-bottom: 18px; color: #1c2024; font-size: 15px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer.loading { color: #8b8d98; }
.answer.sent { color: #60646c; }
.composer { display: block; padding-top: 16px; border-top: 1px solid #f0f0f3; }
.composer > label { display: block; margin-bottom: 8px; color: #343941; font-size: 13px; font-weight: 650; }
.composer textarea, .company-settings textarea, .learning-card input:not([type=checkbox]), .learning-card textarea, .learning-card select { display: block; width: 100%; border: 1px solid #d9d9e0; border-radius: 9px; background: #fff; color: #1c2024; font-size: 13px; line-height: 1.7; }
.composer textarea { min-height: 88px; max-height: 260px; padding: 10px 12px; resize: vertical; }
textarea::placeholder, input::placeholder { color: #a3a5ae; }
textarea:focus, input:focus, select:focus { border-color: #75abf7; }
.composer-footer { justify-content: space-between; gap: 10px; padding-top: 10px; }
.primary, .secondary, .button, .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 35px; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 650; line-height: 1.3; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.primary, .button { border: 1px solid var(--primary); color: #fff; background: var(--primary); }
.primary:hover:not(:disabled), .button:hover { color: #fff; background: var(--primary-hover); text-decoration: none; }
.secondary { border: 1px solid #d9d9e0; color: #3c4049; background: #fff; }
.secondary:hover:not(:disabled) { background: #f9f9fb; border-color: #cdced6; }
.text-button { padding-inline: 0; border: 0; color: #8b8d98; background: transparent; }
.text-button:hover:not(:disabled) { color: #9d584c; }
.send-actions { justify-content: space-between; gap: 12px; padding: 12px 19px; border-top: 1px solid #f0f0f3; background: #fcfcfd; }
.send-group { justify-content: flex-end; gap: 11px; min-width: 0; }
.send-group .caption { text-align: right; }
.notice { margin: 0 0 14px; padding: 11px 13px; border: 1px solid #dcecdf; border-radius: 9px; color: #507761; background: #f2f8f3; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.notice.error { border-color: #f0dcd5; color: #a45b4b; background: #fcf5f2; }
.handover { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0 0 14px; padding: 14px 16px; border: 1px solid #e2e3e7; border-radius: 11px; background: #f9f9fb; }
.handover strong { font-size: 12px; }
.handover p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.empty-card { padding: 42px 20px; text-align: center; border: 1px dashed #d9d9e0; border-radius: 14px; background: var(--surface); }
.empty-icon { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 13px; border: 1px solid #e8e8ec; border-radius: 12px; background: #f5f9ff; color: #1073e9; font-size: 17px; }
.empty-card h2 { color: #60646c; }
.empty-card p { margin-top: 6px; color: #8b8d98; font-size: 12px; }
.empty-card .button { margin-top: 18px; }
.secondary-panels { margin-top: 28px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.section-heading h2 { color: #424750; font-size: 13px; }
.section-heading > span { color: #9699a2; font-size: 11px; }
.secondary-panels > details { overflow: hidden; border: 1px solid var(--line); background: #fff; }
.secondary-panels > details:first-of-type { border-radius: 11px 11px 0 0; }
.secondary-panels > details:last-of-type { margin-top: -1px; border-radius: 0 0 11px 11px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.secondary-panels > details > summary { display: flex; align-items: center; gap: 11px; min-height: 66px; padding: 12px 15px; }
.secondary-panels > details > summary:hover { background: #f9f9fb; }
.secondary-panels > details > summary:after { content: ""; flex: 0 0 7px; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid #8b8d98; border-bottom: 1.5px solid #8b8d98; transform: rotate(45deg) translateY(-2px); }
.secondary-panels > details[open] > summary:after { transform: rotate(225deg) translate(-2px, -1px); }
.summary-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 9px; border: 1px solid #e8e8ec; border-radius: 9px; color: #738196; background: #f9f9fb; }
.summary-copy { display: grid; gap: 3px; min-width: 0; }
.summary-copy strong { color: #343941; font-size: 13px; font-weight: 650; }
.summary-copy small { color: #8b8d98; font-size: 12px; }
.panel-body { padding: 0 15px 16px; }
.section-note { margin-bottom: 8px; color: #80838d; font-size: 11px; line-height: 1.75; }
.company-settings label, .learning-card label { display: block; margin: 12px 0 6px; color: #60646c; font-size: 12px; font-weight: 650; }
.company-settings textarea, .learning-card textarea { min-height: 78px; padding: 10px 11px; resize: vertical; }
.learning-card input:not([type=checkbox]), .learning-card select { margin-top: 6px; padding: 8px 10px; }
.company-settings .primary { min-width: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.actions .primary, .actions .secondary, .actions .text-button { min-height: 32px; padding: 7px 10px; }
.subtle-details { margin: 4px 0 12px; border-top: 1px solid #f0f0f3; }
.subtle-details summary { display: flex; align-items: center; gap: 7px; padding: 10px 0; color: #80838d; font-size: 11px; }
.subtle-details summary:before { content: "›"; color: #9b9da6; font-size: 16px; }
.subtle-details[open] summary:before { content: "⌄"; }
.revision { margin-bottom: 8px; padding: 8px 0 8px 11px; border-left: 2px solid #e8e8ec; }
.revision-heading, .review-feedback { margin-bottom: 5px; color: #8b8d98; font-size: 11px; white-space: pre-wrap; }
.revision-content, .knowledge-rule { color: #60646c; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.learning-card { margin: 10px 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.learning-card h3 { margin-bottom: 7px; color: #3c4049; font-size: 12px; font-weight: 650; }
.learning-card p { font-size: 12px; white-space: pre-wrap; }
.learning-card .checkboxline { display: flex; align-items: flex-start; gap: 7px; line-height: 1.6; }
.checkboxline input { margin: 3px 0 0; accent-color: var(--primary); }
footer { justify-content: space-between; gap: 10px; padding: 18px 1px 4px; color: #a3a5ae; font-size: 11px; }
footer a { color: #80838d; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 480px) {
  main { padding: 0 14px 20px; }
  .app-header { min-height: 66px; }
  .conversation-bar { margin: 20px 0 16px; }
  .mode-bar { padding: 12px; }
  .mode-description .caption { font-size: 11px; }
  .reply-heading, .reply-body { padding-left: 15px; padding-right: 15px; }
  .send-actions { padding-left: 15px; padding-right: 15px; }
  .send-group .caption { display: none; }
  .composer-footer .caption { font-size: 11px; }
  .section-heading > span { display: none; }
  .customer-grid { gap: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
