/* =============================================================
 * Mirrow · 样式系统
 * 移动端优先 · 原生 App 体验 · 温暖极简风格
 * ============================================================= */

:root {
  /* 色彩：奶油白 → 橄榄绿 → 暖米棕 */
  --bg: #FFF9F0;
  --bg-2: #F5F0EB;
  --bg-3: #FFFFFF;
  --bg-hover: #F0EBE5;
  --border: #F0EBE5;
  --border-soft: #F5F0EB;
  --text: #3D3D3D;
  --text-2: #5A5650;
  --text-dim: #99908A;
  --text-muted: #99908A;
  --text-soft: #B5ACA5;
  --text-mute: #B5ACA5;
  --olive: #6B7247;          /* 橄榄绿 · 主强调 */
  --olive-light: #A8B08A;
  --olive-soft: #ECEEE4;
  --olive-bg: #E0E3D4;
  --gold: #D4B68C;           /* 暖米棕 */
  --gold-soft: #F5EFE3;
  --terracotta: #C89B85;     /* 柔赤陶 */
  --terracotta-soft: #F3E8E1;
  --purple: #B8A9C9;         /* 玄学紫 */
  --purple-soft: #EDE7F3;
  --purple-dark: #7A6BA0;
  --blue: #A8C4E0;
  --blue-soft: #E5EEF5;
  --green: #A8C4A0;
  --green-soft: #EEF4EC;
  --green-dark: #5C7A56;
  --pink: #E8B4A0;
  --pink-dark: #C47A6A;
  --danger: #E0AAA0;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);

  --nav-h: 64px;
  --input-h: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* 当前场景强调色（默认职业橄榄绿，JS 按场景切换） */
  --accent: var(--olive);
  --accent-soft: var(--olive-soft);
  --accent-strong: var(--olive);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
}
.hidden { display: none !important; }

/* ============ AppShell ============ */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
  /* 顶部安全区：避免内容被灵动岛/刘海遮挡（Web 端 env 为 0，无影响） */
  padding-top: var(--safe-top);
}

/* 顶部栏 */
.top-bar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  z-index: 5;
}
.top-bar-left { display: flex; align-items: center; }
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.top-bar-title { font-size: 15px; }
.account-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.account-avatar { font-size: 16px; }

/* 内容区 */
.content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ============ 聊天视图 ============ */
.chat-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.message-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px calc(var(--input-h) + 40px);
  scroll-behavior: smooth;
  scroll-padding-bottom: calc(var(--input-h) + 20px);
  -webkit-overflow-scrolling: touch;
}
.message-list::-webkit-scrollbar { width: 0; }

/* 消息气泡 */
.msg {
  display: flex;
  margin-bottom: 12px;
  animation: msgIn .25s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg.user { justify-content: flex-end; }
.msg.ai { justify-content: flex-start; }

.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.msg.user .bubble {
  background: var(--olive);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg.ai .bubble {
  background: var(--bg-3);
  color: var(--text);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}

/* AI 消息「保存为待办」按钮 */
.msg-pin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: rgba(107,114,71,0.1);
  color: var(--olive);
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.15s;
  float: right;
}
.msg-pin-btn:hover { opacity: 1; background: var(--olive-soft); transform: scale(1.1); }
.msg-pin-btn:disabled { cursor: default; }

/* 系统消息（记忆更新提示等） */
.msg.system { justify-content: center; }
.msg.system .bubble {
  background: transparent;
  color: var(--text-mute);
  font-size: 12px;
  padding: 4px 12px;
  box-shadow: none;
  border: none;
  max-width: 90%;
  text-align: center;
}

/* 文件消息气泡 */
.file-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  padding: 10px 12px;
  border-radius: 12px;
  max-width: 240px;
}
.file-bubble img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
}
.file-bubble .file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.file-bubble .file-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-bubble .file-meta {
  font-size: 11px;
  color: var(--text-mute);
}

/* 正在输入 */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.typing-indicator span {
  width: 7px; height: 7px;
  background: var(--text-mute);
  border-radius: 50%;
  animation: typing 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ============ 输入栏 ============ */
.input-bar {
  flex-shrink: 0;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  padding: 8px 10px 8px;
}

.upload-panel {
  display: flex;
  gap: 12px;
  padding: 8px 4px 12px;
  animation: slideDown .2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.upload-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all .2s;
}
.upload-btn:active {
  background: var(--bg-hover);
  transform: scale(0.96);
}
.upload-icon { font-size: 20px; }
.upload-label { font-size: 11px; color: var(--text-dim); }

.input-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.icon-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.icon-btn:active { background: var(--bg-hover); transform: scale(0.9); }
.icon-btn.recording { color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.msg-input {
  flex: 1;
  min-height: 38px;
  max-height: 120px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--bg-3);
  font-size: 15px;
  line-height: 1.4;
  resize: none;
  outline: none;
  font-family: inherit;
  color: var(--text);
  transition: border-color .2s;
}
.msg-input:focus { border-color: var(--olive-light); }
.msg-input::placeholder { color: var(--text-mute); }

.send-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--olive);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.send-btn:active { transform: scale(0.9); background: var(--olive-light); }
.send-btn:disabled { background: var(--border); cursor: not-allowed; }

/* ============ 底部导航 ============ */
.bottom-nav {
  display: flex;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
  z-index: 10;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  color: var(--text-mute);
  transition: all .2s;
  position: relative;
}
.nav-item .nav-icon { font-size: 20px; transition: transform .2s; }
.nav-item .nav-label { font-size: 10px; font-weight: 500; }
.nav-item.active { color: var(--olive); }
.nav-item.active .nav-icon { transform: translateY(-1px) scale(1.1); }
.nav-item.active::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 4px; height: 4px;
  background: var(--olive);
  border-radius: 50%;
}

/* ============ 人格画像视图（改为悬浮面板覆盖层） ============ */
.persona-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.persona-view.show {
  opacity: 1;
  pointer-events: auto;
}
.persona-panel {
  width: 100%;
  max-width: 520px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.persona-view.show .persona-panel { transform: translateX(0); }
.persona-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(14px + var(--safe-top)) 16px 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.persona-panel-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #a78bfa);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
  flex-shrink: 0;
}
.persona-panel-title { flex: 1; min-width: 0; }
.persona-panel-title .name { font-size: 15px; font-weight: 700; color: var(--text); }
.persona-panel-title .sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.persona-panel-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-2);
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.persona-container {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px calc(var(--nav-h) + 32px);
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.persona-container::-webkit-scrollbar { width: 0; }

/* ============ 悬浮画像球 ============ */
.fab-persona {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-h) + var(--input-h) + 24px);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #a78bfa);
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(124,92,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  transition: transform .15s, box-shadow .15s;
}
.fab-persona:active { transform: scale(0.92); }
.fab-persona .fab-ping {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--terracotta);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}
.fab-persona.hidden { display: none; }

/* 顶部导入按钮 */
.btn-import {
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* ============ 待办项 ============ */
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.todo-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
}
.todo-check.done {
  background: var(--green);
  border-color: var(--green);
}
.todo-check.done::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.todo-text { flex: 1; min-width: 0; }
.todo-text .todo-title { font-size: 13px; color: var(--text); line-height: 1.5; }
.todo-text.done .todo-title { text-decoration: line-through; color: var(--text-dim); }
.todo-meta { font-size: 11px; color: var(--text-dim); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.todo-scene-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text-dim);
}
.todo-source-link {
  font-size: 10px;
  color: var(--purple);
  cursor: pointer;
  text-decoration: underline;
}
.todo-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 13px;
}
.todo-empty .emoji { font-size: 32px; display: block; margin-bottom: 8px; }

/* 待办分组（结构化 items） */
.todo-group {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: var(--bg-2);
}
.todo-group.all-done { opacity: 0.55; }
.todo-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-soft);
}
.todo-group-title { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; }
.todo-progress { font-size: 10px; color: var(--text-dim); padding: 1px 6px; border-radius: 8px; background: var(--bg-3); }
.todo-group-del {
  border: none; background: transparent; cursor: pointer;
  font-size: 16px; color: var(--text-dim); padding: 0 4px; line-height: 1;
  border-radius: 4px; opacity: 0.5;
}
.todo-group-del:hover { opacity: 1; color: var(--danger); }
.todo-group-meta { padding-top: 4px; margin-top: 4px !important; border-top: 1px solid var(--border-soft); }
.todo-group .todo-item { border-bottom: none; padding: 6px 0; }

/* 落地清单卡片（对话流内） */
.action-plan-card { padding: 16px; }
.ap-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ap-icon { font-size: 18px; }
.ap-title { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; }
.ap-scene { font-size: 10px; color: var(--text-dim); padding: 2px 8px; border-radius: 8px; background: var(--bg-2); }
.ap-items { display: flex; flex-direction: column; gap: 6px; }
.ap-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; background: var(--bg-2);
}
.ap-item-check {
  width: 16px; height: 16px; border-radius: 4px;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3);
}
.ap-item-input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--text); padding: 2px 0;
}
.ap-item-input:focus { border-bottom: 1px solid var(--accent); }
.ap-item-del {
  border: none; background: transparent; cursor: pointer;
  font-size: 16px; color: var(--text-dim); padding: 0 4px;
  opacity: 0.4; border-radius: 4px; line-height: 1;
}
.ap-item-del:hover { opacity: 1; color: var(--danger); }
.ap-add-row { margin-top: 8px; }
.ap-add-btn {
  border: 1px dashed var(--border); background: transparent;
  cursor: pointer; font-size: 12px; color: var(--text-dim);
  padding: 6px 12px; border-radius: 8px; width: 100%;
}
.ap-add-btn:hover { color: var(--accent-strong); border-color: var(--accent-strong); }
.ap-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.ap-cancel-btn { font-size: 12px; }
.ap-confirm-btn { font-size: 12px; background: var(--green); color: #fff; border-color: var(--green); }
.ap-confirm-btn:hover { opacity: 0.9; }
.ap-saved {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 0; justify-content: center;
  font-size: 13px; color: var(--green);
}
.ap-saved-icon { font-size: 18px; }
.action-plan-btn {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  border-color: var(--accent-strong) !important;
}
.action-plan-btn:hover { opacity: 0.85; }
.action-plan-btn:disabled { opacity: 0.5; }

/* 人格画像 Tab 导航 */
.persona-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  background: var(--bg-3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}
.persona-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 2px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mute);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
  overflow: hidden;
}
.persona-tab.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.persona-tab-badge {
  font-size: 10px;
  background: rgba(255,255,255,0.25);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
}
.persona-tab:not(.active) .persona-tab-badge {
  background: var(--bg-2);
  color: var(--text-dim);
}

/* ========== 表单卡片（聊天中的基本信息表单） ========== */
.form-card {
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  max-width: 100%;
}
.form-card-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.form-card-desc {
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 12px;
}
.form-card-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-2);
  color: var(--text);
  box-sizing: border-box;
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-strong);
  background: var(--bg-3);
}
.form-textarea {
  resize: vertical;
  min-height: 50px;
  max-height: 120px;
}
.multi-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.multi-option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.multi-option input {
  margin: 0;
  accent-color: var(--accent-strong);
}
.multi-option:has(input:checked) {
  background: var(--olive-soft);
  border-color: var(--olive);
  color: var(--olive);
}
.form-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.form-submit-btn {
  flex: 1;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.form-submit-btn:hover {
  opacity: 0.85;
}
.form-skip-btn {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-mute);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}
.form-skip-btn:hover {
  background: var(--bg-2);
}
.form-card-secondary-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}
.form-skip-existing-btn {
  padding: 6px 12px;
  background: transparent;
  color: var(--olive);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-skip-existing-btn:hover {
  background: var(--bg-2);
}

/* ========== 权重滑块 ========== */
.weights-hint {
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 12px;
}
.weight-item {
  margin-bottom: 10px;
}
.weight-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.weight-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--val, 50%), var(--bg-2) var(--val, 50%), var(--bg-2) 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.weight-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.weight-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 人格画像卡片 */
.persona-card {
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}
.persona-card .pc-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.persona-card .pc-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.persona-card .pc-text.muted { color: var(--text-mute); }
.pc-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.pc-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--olive-soft);
  color: var(--olive);
  border-radius: 12px;
  font-weight: 500;
}

/* 优劣势 */
.swot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.swot-col {
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid transparent;
}
.swot-col.strengths { background: var(--olive-soft); border-color: rgba(107,114,71,0.18); }
.swot-col.weaknesses { background: var(--terracotta-soft); border-color: rgba(200,155,133,0.22); }
.swot-col h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.swot-col.strengths h4 { color: var(--olive); }
.swot-col.weaknesses h4 { color: var(--terracotta); }
.swot-col.strengths h4::before { content: '✓'; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; background:var(--olive); color:#fff; font-size:11px; }
.swot-col.weaknesses h4::before { content: '▲'; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; background:var(--terracotta); color:#fff; font-size:9px; }
.swot-item {
  font-size: 12.5px;
  line-height: 1.5;
  padding: 7px 10px;
  background: rgba(255,255,255,0.65);
  border-radius: var(--radius-xs);
  margin-bottom: 6px;
  color: #4a433d;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.swot-item:last-child { margin-bottom: 0; }

/* 核心议题卡 */
.issue-card {
  position: relative;
  padding: 12px 14px 12px 16px;
  margin-top: 10px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--olive);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.issue-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(107,114,71,0.12);
}
.issue-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #3a352f;
  line-height: 1.5;
}
.issue-support {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--olive);
  background: var(--olive-soft);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.issue-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(107,114,71,0.2);
}
.issue-mem {
  font-size: 12px;
  line-height: 1.55;
  color: #5a524a;
  padding: 4px 0;
}
.mem-time {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-left: 6px;
}

/* 雷达图容器 */
.chart-box {
  width: 100%;
  height: 240px;
  margin: 8px 0;
}

/* 施瓦茨价值观圆环 */
.schwartz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  padding: 0 4px;
}
.schwartz-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-dim);
}
.schwartz-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.schwartz-top {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.schwartz-top-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.schwartz-top-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.schwartz-top-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg-3);
  border-radius: 8px;
}
.schwartz-top-rank {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.schwartz-top-name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.schwartz-top-score {
  font-size: 12px;
  color: var(--accent-strong);
  font-weight: 600;
}

/* 价值观维度列表 */
.value-list { margin-top: 8px; }
.value-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.value-name {
  width: 60px;
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.value-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-2);
  border-radius: 3px;
  overflow: hidden;
}
.value-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--olive-light), var(--olive));
  border-radius: 3px;
  transition: width .4s ease;
}
.value-score {
  width: 32px;
  font-size: 11px;
  color: var(--text-mute);
  text-align: right;
  flex-shrink: 0;
}

/* 决策维度模型 */
.dim-section { margin-top: 12px; }
.dim-section h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.dim-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.dim-item:last-child { border-bottom: none; }
.dim-factor { color: var(--text-dim); }
.dim-weight { color: var(--olive); font-weight: 600; font-size: 12px; }

/* 串联式观点 */
.insight-item {
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 9999;
  animation: toastIn .3s ease;
  max-width: 80%;
  text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============ 模态框 ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg-3);
  border-radius: var(--radius) var(--radius) 0 0;
  padding-bottom: calc(20px + var(--safe-bottom));
  animation: slideUp .3s ease;
  max-height: 80vh;
  overflow-y: auto;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  font-weight: 700;
  font-size: 16px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border-soft);
}
.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-mute);
  cursor: pointer;
  padding: 10px 12px;
  margin: -10px -12px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.modal-close-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  min-width: 60px;
}
.modal-body { padding: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin: 12px 0 4px;
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: var(--bg);
  font-family: inherit;
}
.form-input:focus { border-color: var(--olive-light); }
.btn-primary {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: var(--olive);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary:active { background: var(--olive-light); }
.btn-danger {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
}
.btn-secondary {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: #f7f7f8;
  color: var(--text);
  border: 1px solid var(--olive);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-secondary:active { background: var(--olive-bg); }

/* ============ Mirrow Premium 订阅 ============ */
.premium-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.premium-status {
  font-size: 13px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-3);
}
.premium-status.active {
  background: linear-gradient(135deg, #fdf6e3 0%, #fff9f0 100%);
  color: #8a6d2e;
  font-weight: 500;
}
.premium-status.idle {
  color: var(--text-dim);
}
.premium-plans {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.premium-plan-card {
  flex: 1;
  position: relative;
  padding: 14px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  text-align: center;
  transition: all 0.15s;
}
.premium-plan-card.recommended {
  border-color: var(--accent-strong);
  background: linear-gradient(135deg, rgba(168,162,132,0.08) 0%, var(--bg-3) 100%);
}
.plan-badge {
  position: absolute;
  top: -8px;
  right: 8px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.plan-period {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.plan-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent, #8a7a52);
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
.plan-period-note {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.premium-btn {
  width: 100%;
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 8px;
}
.premium-btn:disabled {
  opacity: 0.6;
}
.premium-restore {
  width: 100%;
  padding: 7px;
  font-size: 12px;
  margin-top: 6px;
}
.premium-web-hint {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(138, 122, 82, 0.08);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

/* ============ Paywall 付费墙 ============ */
.paywall-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.paywall-modal.hidden { display: none; }
.paywall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 8, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: paywallFadeIn 0.25s ease;
}
@keyframes paywallFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.paywall-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #FFFBF3 0%, #FFF7EA 100%);
  border-radius: 22px 22px 0 0;
  padding: 24px 22px 28px;
  animation: paywallSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.15);
}
@keyframes paywallSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.paywall-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  color: #8a7a52;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.paywall-close:hover { background: rgba(0,0,0,0.1); }

.paywall-hero { text-align: center; margin-bottom: 18px; }
.paywall-logo {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 6px;
}
.paywall-title {
  font-size: 22px;
  font-weight: 700;
  color: #5a4a2a;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.paywall-reason {
  font-size: 15px;
  font-weight: 600;
  color: #5a4a2a;
  margin: 0 0 2px;
}
.paywall-reason-sub {
  font-size: 12px;
  color: #8a7a52;
  margin: 0;
  line-height: 1.5;
}

.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.paywall-features li {
  font-size: 13px;
  color: #5a4a2a;
  padding: 5px 0;
}

.paywall-plans {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.paywall-plan {
  flex: 1;
  position: relative;
  padding: 14px 10px 12px;
  background: #fff;
  border: 1.5px solid rgba(168,162,132,0.3);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
}
.paywall-plan:hover { border-color: #a8a284; transform: translateY(-1px); }
.paywall-plan.active { border-color: #8a7a52; background: #fff9f0; }
.paywall-plan--recommended {
  border-color: #8a7a52;
  background: linear-gradient(135deg, rgba(168,162,132,0.12) 0%, #fff 100%);
}
.paywall-plan--recommended.active {
  box-shadow: 0 4px 14px rgba(138, 122, 82, 0.2);
}
.paywall-badge {
  position: absolute;
  top: -8px;
  right: 6px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 8px;
  background: #8a7a52;
  color: #fff;
  font-weight: 600;
}
.paywall-plan-name {
  font-size: 12px;
  font-weight: 600;
  color: #8a7a52;
  margin-bottom: 3px;
}
.paywall-plan-price {
  font-size: 24px;
  font-weight: 700;
  color: #5a4a2a;
  font-family: -apple-system, 'SF Pro Display', system-ui, sans-serif;
}
.paywall-plan-period {
  font-size: 11px;
  font-weight: 400;
  color: #b5a88a;
  margin-left: 2px;
}

.paywall-restore {
  display: block;
  width: 100%;
  padding: 8px;
  font-size: 12px;
  color: #8a7a52;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 6px;
}
.paywall-restore.hidden { display: none; }
.paywall-restore:disabled { opacity: 0.6; cursor: not-allowed; }

.paywall-terms {
  font-size: 10px;
  color: #b5a88a;
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.5;
}

/* 大屏适配（不贴底，居中弹窗） */
@media (min-width: 700px) {
  .paywall-modal { align-items: center; }
  .paywall-sheet {
    border-radius: 22px;
    max-height: 85vh;
  }
}

/* ============ Notion 集成 ============ */
.notion-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.notion-status {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.notion-status.connected {
  color: var(--olive);
  font-weight: 500;
}
.notion-status.warning {
  color: var(--danger);
}

/* ============ 定时回访设置 ============ */
.checkin-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* 回访消息标签 */
.checkin-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--olive);
  background: var(--bg-3);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
  margin-left: 4px;
}
/* 上架合规：iOS ATT 4.7 要求 AI 生成内容有可见标识 */
.ai-gen-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #888;
  background: rgba(0,0,0,0.04);
  padding: 1px 6px;
  border-radius: 8px;
  margin-bottom: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.msg.ai .ai-gen-tag { margin-left: 0; margin-right: 4px; }

/* ============ 悬浮设置按钮 ============ */
.fab-settings {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-h) + 16px + var(--safe-bottom));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: all .2s;
}
.fab-settings:active { transform: scale(0.9); }

/* ============ 右上角账号按钮 ============ */
/* 账号按钮已移入 top-bar，样式见 top-bar 区域 */
.account-btn:active { transform: scale(0.95); }
.account-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--olive-soft);
  color: var(--olive);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* ============ 账号弹窗内部样式 ============ */
.account-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.account-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  color: var(--text-mute);
  cursor: pointer;
  font-family: inherit;
}
.account-tab.active {
  color: var(--olive);
  border-bottom-color: var(--olive);
  font-weight: 600;
}
.account-msg {
  margin-top: 10px;
  font-size: 12px;
  color: var(--danger, #c0392b);
  min-height: 16px;
}
.account-msg.ok { color: var(--olive); }
.account-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.account-info-label { color: var(--text-dim); }
.account-info-value { color: var(--text); font-weight: 600; }
.account-delete-btn {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
  font-weight: 500;
}
.account-delete-btn:active { opacity: .85; }

/* ============ 响应式（桌面端模拟手机） ============ */
@media (min-width: 481px) {
  body {
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .app-shell {
    box-shadow: 0 0 60px rgba(0,0,0,0.1);
    border-radius: 24px;
    overflow: hidden;
    height: 90vh;
    max-height: 860px;
  }
}

/* ========== 复盘模块 ========== */
.rv-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.rv-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rv-label {
  font-size: 12px;
  color: var(--text-mute);
  min-width: 32px;
  flex-shrink: 0;
}
.rv-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-3);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.rv-btn.small {
  padding: 4px 10px;
  font-size: 12px;
}
.rv-btn.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-strong);
}
.rv-btn:hover:not(.on) {
  background: var(--bg-2);
}
.rv-custom-date {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 40px;
  font-size: 13px;
  color: var(--text-mute);
}
.rv-custom-date input[type="date"] {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  background: var(--bg-3);
}
.rv-gen-btn {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-left: 40px;
}
.rv-gen-btn:hover:not(:disabled) {
  opacity: 0.9;
}
.rv-gen-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.rv-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-mute);
  font-size: 13px;
}

/* 复盘报告 */
.rv-report {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: 12px;
}
.rv-report-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.rv-report-oneline {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.rv-narrative p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 12px 0;
}
.rv-narrative strong {
  color: var(--accent-strong);
  font-weight: 600;
}
.rv-social-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.rv-social-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-3);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.rv-social-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-strong);
}

/* 社媒文案卡片 */
.rv-social-card {
  margin-top: 10px;
  padding: 14px;
  background: var(--bg-3);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.rv-social-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-strong);
  margin-bottom: 8px;
}
.rv-social-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 10px;
  white-space: pre-wrap;
}
.rv-social-tags {
  font-size: 12px;
  color: var(--accent-strong);
  margin-bottom: 10px;
  word-break: break-all;
}
.rv-copy-btn {
  padding: 5px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
}
.rv-copy-btn:hover {
  opacity: 0.9;
}

/* 结构化数据折叠区 */
.rv-details {
  margin-top: 12px;
}
.rv-details summary {
  font-size: 12px;
  color: var(--text-mute);
  cursor: pointer;
  padding: 6px 0;
}
.rv-block {
  margin-top: 12px;
  padding: 10px;
  background: var(--bg-3);
  border-radius: 8px;
}
.rv-block-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-strong);
  margin-bottom: 6px;
}
.rv-block-one {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 6px;
}
.rv-block-bullet {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-soft);
  padding-left: 4px;
}

/* ========== 记忆导入模块 ========== */
.import-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.import-format-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.import-format-btn {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-3);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.import-format-btn.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-strong);
}
.import-file-btn {
  padding: 4px 12px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: transparent;
  font-size: 12px;
  color: var(--text-mute);
  cursor: pointer;
  transition: all 0.2s;
}
.import-file-btn:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}
.import-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-3);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.import-textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
}
.import-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.import-clear-btn {
  padding: 6px 14px;
  background: transparent;
  color: var(--pink);
  border: 1px solid var(--pink);
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.import-clear-btn:hover {
  background: var(--pink);
  color: #fff;
}
.import-status {
  font-size: 12px;
  color: var(--text-mute);
}

/* ========== 记忆列表 ========== */
.mem-group { margin-bottom: 16px; }
.mem-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.mem-group-title--clickable { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 4px; }
.mem-group-title--clickable:hover { opacity: 0.8; }
.mem-chevron {
  display: inline-block;
  font-size: 9px;
  color: var(--text-mute);
  transition: transform 0.2s;
  transform: rotate(90deg);
  width: 12px;
  text-align: center;
}
.mem-chevron.collapsed { transform: rotate(0deg); }
.mem-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.cat-dot.cat-职业 { background: var(--blue); }
.cat-dot.cat-感情 { background: var(--pink); }
.cat-dot.cat-生活 { background: var(--green); }
.cat-dot.cat-成长, .cat-dot.cat-自我认知 { background: var(--purple); }
.cat-dot.cat-玄学 { background: #d4a373; }
.cat-dot.cat-综合 { background: var(--text-mute); }
.mem-card {
  background: var(--bg-3);
  border-left: 3px solid var(--text-mute);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: transform 0.15s;
}
.mem-card:hover { transform: translateY(-1px); }
.mem-card.cat-职业 { border-left-color: var(--blue); }
.mem-card.cat-感情 { border-left-color: var(--pink); }
.mem-card.cat-生活 { border-left-color: var(--green); }
.mem-card.cat-成长, .mem-card.cat-自我认知 { border-left-color: var(--purple); }
.mem-card.cat-玄学 { border-left-color: #d4a373; }
.mem-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}
.mem-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}
.mem-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mem-subgroup { margin-bottom: 12px; }
.mem-subgroup-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
  margin-top: 4px;
}
.mem-conf {
  font-size: 11px;
  color: var(--text-mute);
}
.mem-del-btn {
  font-size: 11px;
  color: var(--text-mute);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
}
.mem-del-btn:hover { color: var(--pink); }
.tri-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 600;
  line-height: 1.5;
}
.tri-tag.tag-f { background: #dbeafe; color: #2563eb; }
.tri-tag.tag-o { background: #fef3c7; color: #d97706; }
.tri-tag.tag-e { background: #fce7f3; color: #db2777; }
.mem-time { font-size: 11px; color: var(--text-mute); }
.mem-conf { font-size: 11px; color: var(--text-mute); }
.mem-del-btn {
  font-size: 11px;
  color: var(--pink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.mem-del-btn:hover { background: rgba(224,170,160,0.15); }

/* 记忆导出（MD） */
.mem-meta-right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.mem-md-btn {
  font-size: 10px;
  font-weight: 600;
  color: var(--olive);
  background: var(--olive-soft);
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.mem-md-btn:hover { background: var(--olive-light); color: #fff; }
.export-md-btn {
  float: right;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--olive-soft);
  color: var(--olive);
}
.persona-export-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--olive-soft);
  color: var(--olive);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 2px;
}
.persona-export-btn:hover { background: var(--olive); color: #fff; }

/* 线程分组记忆列表 */
.thread-list { display: flex; flex-direction: column; gap: 10px; }
.thread-group {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  overflow: hidden;
}
.thread-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border-soft);
}
.thread-head:hover { background: var(--bg-hover); }
.thread-toggle { font-size: 12px; color: var(--text-mute); width: 14px; flex-shrink: 0; }
.thread-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-meta {
  font-size: 11px;
  color: var(--text-mute);
  flex-shrink: 0;
}
.thread-group .mem-card {
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-bottom: 1px solid var(--border-soft);
}
.thread-group .mem-card:last-child { border-bottom: none; }
.mem-expired { opacity: 0.5; }
.mem-expired .mem-content { text-decoration: line-through; }

/* 话题合并按钮 & 合并模式提示 */
.thread-merge-btn {
  background: none;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs);
  padding: 1px 6px;
  font-size: 12px;
  color: var(--text-mute);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1.4;
  transition: all 0.15s;
}
.thread-merge-btn:hover { color: var(--text); border-color: var(--accent-strong); background: var(--bg-hover); }
.merge-hint {
  font-size: 12px;
  color: var(--accent-strong);
  background: var(--bg-3);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  border: 1px dashed var(--accent);
}
.thread-group.merge-source { outline: 2px solid var(--accent); outline-offset: -2px; }
.thread-group.merge-target .thread-head { cursor: copy; }

/* 实体面板 */
.entity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-2);
  border-radius: var(--radius-xs);
}
.entity-type {
  font-size: 10px;
  color: var(--accent-strong);
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  padding: 1px 6px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}
.entity-body { flex: 1; min-width: 0; }
.entity-name { font-size: 13px; font-weight: 600; color: var(--text); }
.entity-role { font-size: 11px; font-weight: 400; color: var(--text-mute); margin-left: 6px; }
.entity-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.entity-attrs { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

/* 活跃议题卡片 */
.active-topic {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-2);
  cursor: pointer;
  transition: background 0.15s;
}
.active-topic:hover { background: var(--bg-hover); }
.at-content { flex: 1; min-width: 0; }
.at-title { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-time { font-size: 11px; color: var(--text-mute); flex-shrink: 0; padding-top: 2px; }

/* 活跃议题列表（AI 总结） */
.active-topics-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.active-topic-item {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  padding: 4px 0;
}

/* ========== 对话流卡片组件 ========== */
.card-bubble {
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.card-icon {
  font-size: 24px;
  margin-bottom: 8px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.card-desc {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.5;
  margin-bottom: 12px;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.card-btn {
  padding: 7px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.card-btn:hover {
  background: var(--bg-3);
  border-color: var(--accent-strong);
}
.card-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-strong);
}
.card-btn.primary:hover {
  opacity: 0.9;
}
.card-skip {
  display: block;
  margin-top: 10px;
  padding: 6px 10px;
  background: none;
  border: none;
  color: var(--text-mute);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  width: 100%;
}
.card-skip:hover {
  color: var(--text-2);
}

/* 选项按钮网格 */
.card-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.card-option-btn {
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: inherit;
}
.card-option-btn:hover {
  background: var(--accent-soft, rgba(168,162,132,0.12));
  border-color: var(--accent-strong);
  transform: translateX(2px);
}
.card-option-btn.small {
  padding: 6px 12px;
  font-size: 12px;
}

/* 偏好标签卡片 */
.tag-group {
  margin-bottom: 12px;
}
.tag-group-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-chip {
  padding: 5px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.tag-chip:hover {
  border-color: var(--accent-strong);
}
.tag-chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-strong);
}

/* 决策报告卡片 */
.report-card {
  padding: 16px;
}
.report-conclusion {
  background: var(--accent-soft, rgba(168,162,132,0.10));
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.report-conclusion-label {
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 600;
  margin-bottom: 4px;
}
.report-conclusion-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.report-scores {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.score-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--text-mute);
}
.score-tag.rec {
  background: var(--accent);
  color: #fff;
}
.report-note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
}
.report-section {
  margin-bottom: 12px;
}
.report-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}
.report-dim {
  margin-bottom: 10px;
}
.report-dim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 4px;
}
.report-dim-name {
  color: var(--text);
  font-weight: 600;
}
.report-dim-scores {
  font-size: 11px;
  color: var(--text-mute);
}
.score-hi {
  color: var(--accent-strong);
  font-weight: 700;
}
.score-vs {
  margin: 0 4px;
  color: var(--text-mute);
}
.report-dim-bar {
  display: flex;
  gap: 2px;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-2);
}
.report-bar-a {
  background: var(--blue);
  height: 100%;
  border-radius: 3px 0 0 3px;
}
.report-bar-b {
  background: var(--pink);
  height: 100%;
  border-radius: 0 3px 3px 0;
}
.report-dim-comment {
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 4px;
  line-height: 1.4;
}
.report-risks .report-risk-item {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 4px;
}
.report-suggestion {
  background: var(--bg-2);
  border-radius: 10px;
  padding: 10px 12px;
}
.report-suggestion-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* 卡片底部「展开讲讲」按钮 */
.card-expand-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px dashed var(--text-mute);
  background: transparent;
  color: var(--text-mute);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.card-expand-btn:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  background: var(--accent-soft, rgba(168,162,132,0.08));
}
.card-expand-btn:active {
  transform: scale(0.98);
}

/* 纯文字消息底部「收为卡片」按钮 */
.msg-collapse-btn {
  display: inline-block;
  margin-top: 6px;
  margin-left: 8px;
  padding: 4px 10px;
  border: 1px solid var(--text-mute);
  background: transparent;
  color: var(--text-mute);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.msg-collapse-btn:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

/* 回访 / 行动卡片 */
.followup-card, .action-card {
  padding: 14px;
}
.profile-update-card .card-title {
  font-size: 14px;
}

/* 记忆更新浮层 */
.memory-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--text);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.memory-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.memory-toast-icon {
  font-size: 14px;
}

/* 现状冲突确认卡片 */
.conflict-confirm-card {
  background: var(--bg-3);
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 8px 0;
  box-shadow: var(--shadow);
}
.ccc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.ccc-old, .ccc-new {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
  line-height: 1.5;
}
.ccc-new { color: var(--olive); }
.ccc-label {
  font-weight: 600;
  margin-right: 4px;
}
.ccc-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.ccc-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.ccc-btn:hover { opacity: 0.85; }
.ccc-confirm {
  background: var(--olive);
  color: #fff;
}
.ccc-deny {
  background: var(--bg-2);
  color: var(--text-dim);
}

/* 场景引导提示条（快捷回复上方） */
.scene-tip-banner {
  margin: 6px 12px 4px;
  padding: 8px 14px;
  background: var(--accent-soft, rgba(168,162,132,0.12));
  border: 1px solid rgba(168,162,132,0.25);
  border-radius: 14px;
  font-size: 12px;
  color: var(--accent, #8a7a52);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  user-select: none;
  line-height: 1.4;
}
.scene-tip-banner:hover {
  background: var(--accent, #a8a284);
  color: #fff;
  border-color: var(--accent-strong);
}

/* 快捷回复建议 */
.quick-replies-container {
  padding: 8px 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-replies-container::-webkit-scrollbar { display: none; }
.quick-replies {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.quick-reply-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.quick-reply-btn:hover {
  background: var(--accent-soft, rgba(168,162,132,0.12));
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

/* 出生信息卡片复用表单字段样式 */
.birth-card .form-card-fields {
  margin-top: 8px;
}

/* =============================================================
 * 导入 Tab（身份信息 / flomo / Notion / 社媒长文）
 * ============================================================= */
.import-wrap { display:flex; flex-direction:column; gap:14px; padding:0 0 12px; }
.import-section {
  padding:14px 16px; border-radius:var(--radius); background:var(--bg-3,#fff);
  border:1px solid var(--border-soft,#eee); box-shadow:0 1px 8px rgba(0,0,0,.03);
}
.import-sec-head {
  display:flex; align-items:baseline; justify-content:space-between;
  gap:8px; margin-bottom:10px;
}
.import-sec-head > span:first-child { font-size:14px; font-weight:600; color:var(--text,#3D3D3D); }
.import-hint { font-size:11px; color:var(--text-mute,#99908A); line-height:1.5; text-align:right; flex:1; }
.import-form { display:flex; flex-direction:column; gap:10px; }
.import-form .form-field { margin:0; }
.import-form .form-label { display:block; font-size:12px; color:var(--text-dim,#99908A); margin-bottom:4px; }
.import-form .form-input {
  width:100%; box-sizing:border-box; padding:8px 10px; font-size:13px;
  border:1px solid var(--border,#F0EBE5); border-radius:8px; background:var(--bg,#fff);
  color:var(--text,#3D3D3D); font-family:inherit;
}
.import-actions { margin-top:10px; display:flex; gap:8px; }
.import-btn {
  padding:8px 14px; font-size:12.5px; font-weight:500; border-radius:8px;
  border:1px solid var(--border,#F0EBE5); background:var(--bg-2,#F5F0EB);
  color:var(--text,#3D3D3D); cursor:pointer; font-family:inherit;
}
.import-btn.primary {
  background:var(--accent,#A8C4A0); color:#fff; border-color:transparent;
}
.import-btn:hover { opacity:.85; }
.import-btn.small { padding:5px 10px; font-size:11.5px; }
.import-btn.imported { background:var(--olive-soft); color:var(--olive); border-color:var(--olive-light); cursor:default; }

/* Notion 连接区 */
.notion-connect-box {
  background:var(--olive-soft); border:1px solid rgba(107,114,71,0.15);
  border-radius:var(--radius-sm); padding:12px 14px; margin-bottom:10px;
}
.notion-connect-row { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.notion-search-row { display:flex; gap:8px; margin-top:10px; }
.notion-search-row .form-input { flex:1; }
.notion-pages { margin-top:10px; display:flex; flex-direction:column; gap:8px; }
.notion-page-item {
  display:flex; flex-direction:column; gap:4px; padding:10px 12px;
  background:var(--bg-2); border-radius:8px; border-left:3px solid var(--olive);
}
.npc-title { font-size:13px; font-weight:600; color:var(--text,#3D3D3D); }
.npc-meta { font-size:11px; color:var(--text-mute,#99908A); word-break:break-all; }
.notion-page-item .import-btn { align-self:flex-start; margin-top:4px; }
.import-file-row { display:flex; gap:8px; align-items:center; }
.import-file-row input[type=file] { flex:1; font-size:12px; }
.import-textarea {
  width:100%; box-sizing:border-box; min-height:120px; resize:vertical;
  padding:10px 12px; font-size:13px; line-height:1.6; font-family:inherit;
  border:1px solid var(--border,#F0EBE5); border-radius:8px; background:var(--bg,#fff);
  color:var(--text,#3D3D3D);
}
.import-source-tabs {
  display:flex; gap:4px; margin-bottom:10px; padding:3px;
  background:var(--bg-2,#F5F0EB); border-radius:10px;
}
.import-source-tab {
  flex:1; padding:7px 4px; border:none; background:transparent; cursor:pointer;
  font-size:12px; color:var(--text-dim,#99908A); border-radius:7px; font-family:inherit;
}
.import-source-tab.active { background:var(--bg-3,#fff); color:var(--text,#3D3D3D); box-shadow:0 1px 4px rgba(0,0,0,.04); }
.import-result { margin-top:8px; font-size:12.5px; min-height:18px; }
.import-result .ok { color:var(--accent,#8FAE88); font-weight:500; }
.import-result .err { color:#c44; }
.import-result .muted { color:var(--text-mute,#99908A); }
.muted.small { color:var(--text-mute,#99908A); font-size:11px; }
