:root {
  --bg: #f6f7f3;
  --surface: #ffffff;
  --ink: #202321;
  --muted: #818981;
  --line: #e5e9e2;
  --green: #315c50;
  --green-soft: #eaf1ed;
  --yellow: #ecb85f;
  --shadow: 0 20px 50px rgba(38, 57, 46, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Manrope", "Noto Sans SC", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 286px; min-height: 100vh; background: #eef2ed; border-right: 1px solid var(--line); padding: 28px 20px 20px; display: flex; flex-direction: column; }
.brand-row { display: flex; gap: 12px; align-items: center; padding: 0 10px 24px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--green); color: #f5f6ed; border-radius: 12px 12px 12px 3px; font-weight: 800; }
.brand-name { font-weight: 800; letter-spacing: -.04em; }.brand-sub, .eyebrow, .section-label, .footer-note { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.character-card { background: var(--green); color: white; border-radius: 18px; padding: 20px; box-shadow: 0 16px 32px rgba(49, 92, 80, .2); }
.avatar { display: grid; place-items: center; background: #d1a76a; color: #fff; border-radius: 50%; font-weight: 800; letter-spacing: -.06em; }.avatar.large { width: 62px; height: 62px; font-size: 18px; margin-bottom: 15px; border: 4px solid rgba(255,255,255,.2); }.avatar.tiny { width: 30px; height: 30px; font-size: 11px; flex: none; }
.presence { font-family: "DM Mono", monospace; font-size: 10px; color: #cce4d8; }.presence span, .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #82d49b; margin-right: 5px; }.character-card p { margin: 14px 0 2px; font-size: 13px; line-height: 1.75; color: #d9e7dc; }
.side-nav { margin: 26px 0; display: grid; gap: 5px; }.nav-button { border: 0; background: transparent; color: #69766d; text-align: left; padding: 11px 12px; border-radius: 10px; font-size: 13px; }.nav-button span { display: inline-block; width: 24px; color: #9aa59d; }.nav-button.active, .nav-button:hover { background: white; color: var(--green); box-shadow: 0 5px 18px rgba(70, 82, 74, .06); }.nav-button.active span { color: var(--green); }
.sidebar-section { padding: 0 9px; }.section-label { display: flex; justify-content: space-between; margin-bottom: 12px; }.section-label span:last-child { background: #dbe6de; border-radius: 20px; padding: 2px 6px; color: var(--green); }.memory-list { display: grid; gap: 7px; }.memory-item { border-left: 2px solid #b1cbb8; padding: 2px 0 2px 10px; font-size: 11px; line-height: 1.6; color: #59655d; }.empty-hint { color: #98a29a; font-size: 11px; line-height: 1.6; }
.sidebar-footer { margin-top: auto; }.user-chip { display: flex; align-items: center; gap: 9px; border-top: 1px solid #dce4dc; padding: 16px 8px 12px; }.user-chip strong { font-size: 12px; display: block; }.user-chip small { color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; }.user-chip button { margin-left: auto; border: 0; background: transparent; color: var(--muted); }.footer-note { padding: 0 8px; font-size: 9px; letter-spacing: 0; }
.main-area { flex: 1; min-width: 0; max-width: 1500px; margin: 0 auto; }.screen { display: none; min-height: 100vh; padding: 46px clamp(24px, 6vw, 92px) 40px; }.screen.active { display: block; }.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 30px; }.eyebrow { font-size: 10px; color: #9ba49d; }.topbar h1 { margin: 7px 0 0; letter-spacing: -.06em; font-size: clamp(26px, 3vw, 38px); }.topbar-actions { display: flex; gap: 10px; align-items: center; }.mode-pill, .panel-badge { border: 1px solid var(--line); padding: 7px 10px; border-radius: 30px; color: #778178; font: 10px "DM Mono", monospace; }.icon-button { border: 1px solid var(--line); background: var(--surface); border-radius: 50%; width: 31px; height: 31px; color: var(--green); font-size: 18px; }.chat-messages { min-height: calc(100vh - 300px); max-width: 840px; margin: 0 auto; padding: 10px 0 30px; display: flex; flex-direction: column; gap: 16px; }.message-row { display: flex; gap: 10px; align-items: flex-end; animation: rise .25s ease-out; }.message-row.user { justify-content: flex-end; }.message-bubble { max-width: min(560px, 78%); background: var(--surface); border: 1px solid var(--line); border-radius: 3px 18px 18px 18px; padding: 13px 16px; font-size: 14px; line-height: 1.75; box-shadow: 0 5px 16px rgba(60, 72, 64, .035); white-space: pre-wrap; }.message-row.user .message-bubble { background: var(--green); border-color: var(--green); color: #f7faf5; border-radius: 18px 3px 18px 18px; }.message-meta { color: #a4ada6; font: 9px "DM Mono", monospace; margin-top: 5px; }.message-row.user .message-meta { text-align: right; }.mini-avatar { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #d1a76a; color: white; display: grid; place-items: center; font-size: 9px; font-weight: 800; }.proactive-label { color: #b68948; font: 9px "DM Mono", monospace; margin-bottom: 4px; }
#chat-screen.screen.active { display: flex; flex-direction: column; height: 100vh; min-height: 0; overflow: hidden; }#chat-screen .topbar { flex: none; }.chat-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 10px max(4px, calc((100% - 840px) / 2)) 30px; scroll-behavior: smooth; }.scroll-latest { position: absolute; z-index: 2; right: max(24px, calc((100% - 840px) / 2)); bottom: 116px; border: 1px solid #c8ddd0; background: rgba(255,255,255,.94); color: var(--green); border-radius: 20px; padding: 8px 13px; font-size: 11px; box-shadow: 0 8px 20px rgba(38,57,46,.12); }#chat-screen { position: relative; }#chat-screen .composer, #chat-screen .memory-toast { flex: none; }#chat-screen .composer { width: min(840px, 100%); }
.composer { max-width: 840px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 15px 17px 11px; box-shadow: var(--shadow); }.composer textarea { display: block; width: 100%; border: 0; outline: none; resize: none; background: transparent; color: var(--ink); min-height: 27px; max-height: 120px; line-height: 1.55; }.composer textarea::placeholder { color: #adb5ae; }.composer-bottom { display: flex; align-items: center; justify-content: space-between; color: #adb5ae; font: 10px "DM Mono", monospace; margin-top: 9px; }.send-button, .outline-button { border: 0; background: var(--green); color: white; border-radius: 9px; padding: 10px 14px; font-size: 12px; font-weight: 700; }.send-button span, .outline-button span { color: #a6cfb6; margin-left: 5px; }.send-button:disabled { opacity: .55; }.outline-button { background: transparent; color: var(--green); border: 1px solid #bad0c2; }.outline-button:hover { background: var(--green-soft); }.memory-toast { max-width: 840px; margin: -2px auto 10px; font-size: 11px; color: var(--green); background: var(--green-soft); border: 1px solid #d4e5d8; padding: 8px 12px; border-radius: 8px; }.hidden { display: none !important; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 17px; }.metric-card .metric-label { color: var(--muted); font: 10px "DM Mono", monospace; }.metric-card .metric-value { font-size: 30px; font-weight: 800; letter-spacing: -.06em; margin: 12px 0 3px; }.metric-card .metric-note { font-size: 11px; color: #8e9990; }.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; margin-bottom: 16px; }.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }.panel-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 18px; }.panel h2 { margin: 6px 0 0; font-size: 18px; letter-spacing: -.04em; }.table-wrap { overflow: auto; } table { width: 100%; border-collapse: collapse; font-size: 11px; } th { text-align: left; color: #a1aaa2; font: 9px "DM Mono", monospace; padding: 0 8px 10px; white-space: nowrap; } td { border-top: 1px solid #eef1ed; padding: 12px 8px; color: #59635b; white-space: nowrap; }.status-select, .purchase-checkbox { accent-color: var(--green); }.status-select { border: 0; background: var(--green-soft); color: var(--green); border-radius: 6px; padding: 4px; font-size: 10px; }.events-list { display: grid; gap: 0; max-height: 280px; overflow: auto; }.event-item { display: grid; grid-template-columns: 8px 1fr auto; gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1ed; }.event-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }.event-name { font-size: 11px; }.event-user { color: #929c94; font-size: 10px; margin-top: 2px; }.event-time { color: #a4ada6; font: 9px "DM Mono", monospace; }.bottom-grid { grid-template-columns: 1fr 1fr; }.product-admin-list { display: grid; gap: 9px; }.product-admin-item { border: 1px solid #edf0ec; border-radius: 10px; padding: 11px; display: flex; justify-content: space-between; gap: 10px; }.product-admin-item strong { font-size: 12px; }.product-admin-item p { margin: 5px 0 0; color: #909b92; font-size: 11px; }.price { color: #b07b33; font: 12px "DM Mono", monospace; white-space: nowrap; }.product-form { display: grid; grid-template-columns: 1fr 120px; gap: 9px; }.product-form input, .product-form textarea { border: 1px solid var(--line); background: #fbfcfa; padding: 10px; border-radius: 8px; outline-color: #9bbba7; font-size: 11px; }.product-form textarea { grid-column: 1 / -1; min-height: 66px; resize: vertical; }.product-form input:nth-last-of-type(1) { grid-column: 1 / -1; }.product-form button { grid-column: 1 / -1; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(32, 45, 37, .35); backdrop-filter: blur(8px); display: grid; place-items: center; z-index: 10; padding: 20px; }.onboarding-card { width: min(410px, 100%); background: var(--surface); border-radius: 22px; padding: 34px; box-shadow: 0 25px 80px rgba(26, 47, 36, .2); }.onboarding-card .avatar { margin-top: 22px; }.onboarding-card h2 { font-size: 28px; letter-spacing: -.06em; margin: 6px 0 8px; }.onboarding-card p { color: #7d887f; font-size: 13px; line-height: 1.7; margin: 0 0 22px; }.onboarding-card form { display: flex; gap: 8px; }.onboarding-card input { min-width: 0; flex: 1; border: 1px solid var(--line); padding: 11px 12px; border-radius: 9px; outline-color: #9bbba7; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.roleplay-action, .roleplay-expression { color: #9ca79e; font-size: 11px; line-height: 1.5; margin: 0 0 4px 4px; }.roleplay-expression { color: #b09a76; font-style: italic; }
.affection-score { color: #b68948; font: 10px "DM Mono", monospace; margin: 6px 0 0 4px; }
@media (max-width: 900px) { .sidebar { width: 230px; }.screen { padding-inline: 25px; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid, .bottom-grid { grid-template-columns: 1fr; } }
@media (max-width: 650px) { .app-shell { display: block; }.sidebar { width: 100%; min-height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }.brand-row { padding-bottom: 12px; }.character-card, .memory-section, .sidebar-footer { display: none; }.side-nav { margin: 0; display: flex; }.nav-button { flex: 1; }.screen { min-height: calc(100vh - 82px); padding: 26px 16px 20px; }#chat-screen.screen.active { height: calc(100vh - 82px); padding: 26px 16px 20px; }.topbar { margin-bottom: 18px; }.topbar-actions .mode-pill { display: none; }.chat-messages { padding-inline: 0; }.message-bubble { max-width: 86%; }.scroll-latest { right: 16px; bottom: 112px; }.metric-grid { gap: 8px; }.metric-card { padding: 12px; }.metric-card .metric-value { font-size: 25px; }.product-form { grid-template-columns: 1fr 100px; } }

.integration-note { margin: -5px 0 15px; color: #859087; font-size: 11px; line-height: 1.6; }
.wechat-contacts-list { display: grid; gap: 7px; min-height: 43px; }
.wechat-contact-item { display: flex; justify-content: space-between; align-items: center; border: 1px solid #edf0ec; border-radius: 9px; padding: 9px 10px; }
.wechat-contact-item strong { font-size: 11px; }
.wechat-contact-item small { color: #9ba49c; font: 9px "DM Mono", monospace; }
.wechat-import-row { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.wechat-import-row input { min-width: 0; flex: 1; font-size: 10px; color: #859087; }
.format-hint { margin-top: 9px; color: #a4ada6; font: 9px "DM Mono", monospace; overflow-wrap: anywhere; }
.bottom-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.technical-notice { max-width: 520px; margin: 12px auto; padding: 9px 12px; border: 1px solid #f0c77b; border-radius: 9px; color: #805116; background: #fff6e7; font-size: 12px; line-height: 1.55; text-align: center; }
