/* ============================================================
   辅助大师 · 恋爱副驾 UI v3（全局视觉重设计）
   - 暖米白渐变氛围背景（不再冷灰）
   - 青蓝渐变主色（顶部栏/状态栏/按钮/气泡）
   - 珊瑚红(心动) / 暖橙(推荐) / 薄荷绿(安心) 三点缀色
   - 圆角 14px、柔和阴影、毛玻璃输入栏
   保留全部原有类名（JS 依赖），仅视觉层重写
   ============================================================ */
:root {
  --brand: #12b7f5;
  --brand-deep: #0e9bce;
  --brand-grad: linear-gradient(135deg, #35c9ff 0%, #0e9bce 100%);
  --heart: #ff6b6b;
  --warm: #ff9500;
  --mint: #23c892;
  --bg: #f6f2ec;
  --bg-grad: linear-gradient(180deg, #fbf8f3 0%, #f2ece3 100%);
  --card: #ffffff;
  --card-border: #f1eae0;
  --text: #2b2b33;
  --text2: #666e78;
  --text3: #9aa1ab;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 14px rgba(31, 22, 66, 0.06);
  --shadow-lg: 0 8px 28px rgba(31, 22, 66, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
body { background: #e7e2da; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 8px; box-sizing: border-box; overflow: hidden; }
.phone {
  width: 100%; max-width: 420px; height: calc(100vh - 16px);
  max-height: 820px; min-height: 480px;
  border-radius: 26px; box-shadow: 0 12px 40px rgba(31, 22, 66, 0.22);
  background: var(--bg-grad); overflow: hidden; position: relative; border: 6px solid #1c1c1e;
  display: flex; flex-direction: column;
}
.phone > .statusbar { border-radius: 20px 20px 0 0; flex-shrink: 0; }
.phone > .screen, .phone > .topbar { flex-shrink: 0; }
.phone > .screen[style*="display: flex"], .phone > .screen[style*="display: block"] { flex: 1; min-height: 0; }

/* ---------- 状态栏（渐变青蓝） ---------- */
.statusbar { height: 28px; background: linear-gradient(90deg, #35c9ff 0%, #0e9bce 100%); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: #fff; font-size: 12px; }
.statusbar-ic { display: inline-flex; align-items: center; gap: 6px; }
.sb-signal { display: inline-flex; align-items: flex-end; gap: 1px; height: 10px; }
.sb-signal i { width: 2px; background: #fff; border-radius: 1px; display: block; }
.sb-signal i:nth-child(1) { height: 3px; }
.sb-signal i:nth-child(2) { height: 5px; }
.sb-signal i:nth-child(3) { height: 7px; }
.sb-signal i:nth-child(4) { height: 10px; }
.sb-battery { width: 18px; height: 10px; border: 1px solid #fff; border-radius: 2px; position: relative; display: inline-block; }
.sb-battery::after { content: ""; position: absolute; right: -3px; top: 3px; width: 2px; height: 4px; background: #fff; border-radius: 0 1px 1px 0; }
.sb-battery::before { content: ""; position: absolute; left: 1px; top: 1px; right: 1px; bottom: 1px; background: #fff; border-radius: 1px; }

.screen { height: auto !important; min-height: 0; flex: 1; display: flex; flex-direction: column; background: transparent; }
.screen .pad, .screen > div:not(.topbar):not(.statusbar) { overflow-y: auto; min-height: 0; }

/* ---------- 顶部栏（渐变 + 圆角胶囊） ---------- */
.topbar { height: 52px; background: var(--brand-grad); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: #fff; flex-shrink: 0; }
.topbar .title { font-size: 17px; font-weight: 600; letter-spacing: 0.3px; }
.topbar .me { font-size: 18px; cursor: pointer; }
.topbar .me.text-btn { font-size: 13px; background: rgba(255,255,255,0.22); padding: 5px 12px; border-radius: 14px; }
.topbar .me.text-btn:active { background: rgba(255,255,255,0.35); }
.topbar .back, .chat-top .back { font-size: 28px !important; line-height: 52px; padding: 0 16px !important; margin-left: -8px; cursor: pointer; user-select: none; color: #fff; }
.topbar .back:active, .chat-top .back:active { opacity: .6; }

/* ---------- 搜索框 ---------- */
.search { margin: 12px 14px; background: #fff; border-radius: 12px; height: 42px; display: block; width: calc(100% - 28px); padding: 0 14px; color: var(--text); font-size: 14px; border: 1px solid var(--card-border); outline: none; box-shadow: var(--shadow); }
.search::placeholder { color: var(--text3); }
.search:focus { border-color: var(--brand); }

/* ---------- 登录 / 注册 ---------- */
#auth { justify-content: center; }
.auth-box { margin: auto; width: 88%; max-width: 340px; text-align: center; background: rgba(255,255,255,0.88); border-radius: 20px; padding: 28px 24px 22px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.6); backdrop-filter: blur(8px); }
.logo { font-size: 26px; font-weight: 700; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { font-size: 13px; color: var(--text3); margin: 6px 0 24px; }
.auth-box input { width: 100%; height: 46px; border: 1px solid #e7e2da; border-radius: 12px; padding: 0 14px; font-size: 15px; margin-bottom: 12px; outline: none; box-sizing: border-box; background: #fdfcfa; }
.auth-box input:focus { border-color: var(--brand); background: #fff; }
.btn { width: 100%; background: var(--brand-grad); color: #fff; border: none; border-radius: 12px; padding: 13px; font-size: 16px; font-weight: 500; margin-bottom: 10px; cursor: pointer; transition: opacity .15s ease, transform .1s ease; box-shadow: 0 3px 10px rgba(14,155,206,.28); }
.btn:active { opacity: .9; transform: scale(0.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: #f6f2ec; color: #6b6257; box-shadow: none; border: 1px solid #eee5d9; }
.btn.gray { background: #eee; color: #777; box-shadow: none; }
.btn.sm { padding: 0 12px; height: 44px; font-size: 13px; border-radius: 12px; box-shadow: none; width: auto; }
.hint { font-size: 12px; color: #a06a00; line-height: 1.6; background: #fff4e0; border: 1px solid #ffe2ae; padding: 8px 10px; border-radius: 10px; }
.auth-links { margin-top: 10px; text-align: right; }
.auth-links a { font-size: 12px; color: var(--brand); cursor: pointer; }
#regFields { margin-top: 4px; }
#regFields input { margin-bottom: 12px; }
#regFields > div { margin-top: 0; }
#regFields > div input { margin-bottom: 0; }

/* ---------- 通用 pad / block ---------- */
.pad { overflow-y: auto; padding: 14px; flex: 1; }
.block { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.lab { font-size: 13px; color: var(--text2); margin-bottom: 10px; font-weight: 500; }
.pad input { width: 100%; height: 44px; border: 1px solid #e7e2da; border-radius: 12px; padding: 0 12px; font-size: 14px; outline: none; margin-bottom: 10px; box-sizing: border-box; background: #fff; }
.pad textarea { width: 100%; border: 1px solid #e7e2da; border-radius: 12px; padding: 10px 12px; font-size: 14px; outline: none; margin-bottom: 10px; box-sizing: border-box; resize: none; background: #fff; }
.pad input:focus, .pad textarea:focus { border-color: var(--brand); }
.tpl { display: flex; gap: 8px; flex-wrap: wrap; }
.tpl span { padding: 9px 16px; border: 1px solid #e7e2da; border-radius: 20px; font-size: 13px; color: #555; cursor: pointer; background: #fff; }
.tpl span.on { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 2px 8px rgba(14,155,206,.3); }

/* ---------- 联系人列表（卡片化） ---------- */
.list { background: transparent; overflow-y: auto; flex: 1; padding: 4px 0 12px; }
.list-title { padding: 8px 16px; font-size: 12px; color: var(--text3); letter-spacing: 0.5px; }
.contact { display: flex; align-items: center; padding: 10px 0; cursor: pointer; position: relative; }
.contact-body { display: flex; align-items: center; padding: 12px 14px 12px 44px; width: 100%; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.contact:active .contact-body { transform: scale(0.985); }
.avatar { width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 600; background: var(--brand-grad); box-shadow: 0 2px 6px rgba(14,155,206,.3); }
.contact .info { margin-left: 12px; flex: 1; }
.contact .name { font-size: 16px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px; }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 6px; color: #fff; }
.tag.obj { background: var(--heart); } .tag.cr { background: var(--warm); } .tag.cus { background: #8e8e93; }
.contact .preview { font-size: 13px; color: var(--text3); margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.add-contact { display: flex; align-items: center; padding: 14px; color: var(--brand); font-size: 15px; cursor: pointer; }
.add-contact .plus { width: 24px; height: 24px; border-radius: 8px; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; margin-right: 10px; font-size: 18px; }

/* 勾选框：左侧 + 大触摸区 + 小圆点（避免误触，符合日常习惯） */
.cb-wrap { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; z-index: 2; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cb-box { width: 14px; height: 14px; border: 1.5px solid #d0c8bc; border-radius: 50%; background: transparent; transition: all .15s; }
.cb-wrap:hover .cb-box { border-color: var(--brand); }
.cb-wrap.checked .cb-box { background: var(--brand); border-color: var(--brand); }
.cb-wrap.checked .cb-box::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; position: absolute; }

/* 批量操作栏 */
.batch-bar { display: none; align-items: center; padding: 10px 14px; background: #eaf7ff; border-bottom: 1px solid #cdeafb; gap: 10px; }
.batch-info { font-size: 13px; color: var(--brand-deep); flex: 1; font-weight: 500; }
.batch-del { font-size: 13px; color: var(--heart); cursor: pointer; padding: 4px 12px; background: #fff0f0; border-radius: 8px; }
.batch-del:active { opacity: .7; }
.batch-cancel { font-size: 13px; color: var(--text2); cursor: pointer; padding: 4px 10px; }

/* ---------- 弹窗 ---------- */
.mask { position: absolute; inset: 0; background: rgba(20, 16, 40, 0.45); display: none; align-items: center; justify-content: center; z-index: 20; }
.modal { width: 320px; max-width: 92%; background: #fff; border-radius: 18px; padding: 20px; max-height: 90%; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 16px; margin-bottom: 4px; color: var(--text); font-weight: 600; }
.modal .sub { font-size: 12px; color: var(--text3); margin-bottom: 14px; }
.field { margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--text2); display: block; margin-bottom: 6px; }
.field input { width: 100%; height: 44px; border: 1px solid #e7e2da; border-radius: 12px; padding: 0 12px; font-size: 14px; outline: none; box-sizing: border-box; background: #fdfcfa; }
.field textarea { width: 100%; border: 1px solid #e7e2da; border-radius: 12px; padding: 10px 12px; font-size: 14px; outline: none; box-sizing: border-box; font-family: inherit; background: #fdfcfa; }
.field input:focus, .field textarea:focus { border-color: var(--brand); background: #fff; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg span { display: flex; align-items: center; justify-content: center; flex: 0 1 auto; min-width: 56px; padding: 0 12px; border: 1px solid #e7e2da; border-radius: 12px; font-size: 13px; color: #555; cursor: pointer; white-space: nowrap; height: 40px; box-sizing: border-box; background: #fff; }
.seg span.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg.multi span { font-size: 12px; padding: 6px 12px; }
.seg.multi span.on { background: var(--warm); color: #fff; border-color: var(--warm); }

/* ---------- 聊天 ---------- */
.chat-top { height: 52px; background: var(--brand-grad); display: flex; align-items: center; padding: 0 12px; flex-shrink: 0; }
.chat-top .cname { flex: 1; text-align: center; font-size: 16px; font-weight: 600; color: #fff; }
.chat-top .more { font-size: 20px; color: rgba(255,255,255,0.9); cursor: pointer; padding: 4px 8px; }
.bubbles { flex: 1; overflow-y: auto; padding: 14px; background: linear-gradient(180deg, #f8f4ee 0%, #f1ece3 100%); }
.bubbles .hint { background: #fff4e0; border: 1px solid #ffe2ae; color: #a06a00; font-size: 12px; padding: 9px 12px; border-radius: 10px; margin-bottom: 12px; line-height: 1.5; }
.msg { display: flex; margin-bottom: 14px; flex-wrap: wrap; }
.msg.them { justify-content: flex-start; }
.msg.me { justify-content: flex-end; }
.msg .b { max-width: 72%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.msg.them .b { background: #fff; color: var(--text); border-top-left-radius: 4px; }
.msg.me .b { background: var(--brand-grad); color: #fff; border-top-right-radius: 4px; box-shadow: 0 2px 8px rgba(14,155,206,.25); }
.msg .b + .mtime { flex-basis: 100%; }
.mtime { font-size: 10px; color: #b3b3b3; margin-top: 4px; }
.mtime .mname { font-size: 11px; color: #888; font-weight: 500; margin-right: 4px; }
.msg.them .mtime { text-align: left; padding-left: 4px; }
.msg.me .mtime { text-align: right; padding-right: 4px; }
.date-sep { text-align: center; margin: 12px 0; font-size: 11px; color: var(--text3); }
.date-sep::before, .date-sep::after { content: ""; display: inline-block; width: 24px; height: 1px; background: #d8d0c4; vertical-align: middle; margin: 0 8px; }

/* AI 建议气泡（白底虚线） */
.msg.me .b .ai-tag { font-size: 10px; color: #12b7f5; margin-top: 4px; padding: 2px 8px; background: #eaf7ff; border-radius: 8px; display: inline-block; font-weight: 500; }
.msg.me.ai-suggest { opacity: .92; cursor: pointer; }
.msg.me.ai-suggest:hover .b { background: #f6fbff !important; }
.msg.me.ai-suggest .b { background: #fff !important; color: #333 !important; border: 1.5px dashed var(--brand) !important; border-top-right-radius: 4px !important; box-shadow: none !important; }
.msg.me.ai-suggest .mtime { color: var(--brand) !important; }

/* 推荐回复卡 */
.suggest { background: #fff; border: 1px solid #e8f2f9; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.suggest .lab { font-size: 11px; color: var(--brand); margin-bottom: 6px; font-weight: 600; letter-spacing: 0.3px; }
.suggest .opt { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-bottom: 1px dashed #eee; }
.suggest .opt:last-of-type { border-bottom: none; }
.suggest .opt-body { width: 100%; font-size: 13px; color: var(--text); line-height: 1.6; word-break: break-word; cursor: pointer; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; transition: background .15s; }
.suggest .opt-body:hover { background: #f6fbff; }
.suggest .opt-body:active { background: #eaf6ff; }
.opt-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.opt-acts .act { font-size: 11px; color: var(--brand); border: 1px solid #cdeafb; border-radius: 14px; padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.opt-acts .act:active { background: #eef7ff; }
.opt-acts .act.ignore { color: #999; border-color: #eee; }
.regen-btn { text-align: center; padding: 9px 0; margin-top: 4px; font-size: 12px; color: var(--brand); cursor: pointer; border-top: 1px dashed #eee; }
.regen-btn:active { background: #f5fbff; }

/* 分析报告 */
.report { background: #fff; border: 1px solid #dcecf7; border-radius: var(--radius); padding: 14px; margin-bottom: 12px; font-size: 13px; line-height: 1.75; white-space: pre-wrap; box-shadow: var(--shadow); }
.report .lab { font-size: 11px; color: var(--brand); margin-bottom: 8px; font-weight: 600; }
.report .md-h1 { font-size: 16px; font-weight: 700; color: var(--brand-deep); margin: 10px 0 4px; }
.report .md-h2 { font-size: 14px; font-weight: 700; color: var(--brand-deep); margin: 10px 0 4px; border-left: 3px solid var(--brand); padding-left: 8px; }
.report .md-h3 { font-size: 13px; font-weight: 700; color: var(--text); margin: 8px 0 2px; }
.report .md-li { font-size: 13px; color: var(--text); line-height: 1.7; padding-left: 4px; }
.report p { margin: 6px 0; font-size: 13px; color: var(--text); line-height: 1.7; }
.report b { color: var(--warm); }
.report code { background: #f6f2ec; border-radius: 4px; padding: 1px 5px; font-size: 12px; color: #e5484d; }
.report pre { background: #f6f2ec; border-radius: 10px; padding: 10px; font-size: 12px; overflow-x: auto; }

/* 输入栏（毛玻璃） */
.inputbar { height: 60px; background: rgba(255,255,255,0.75); border-top: 1px solid rgba(230,225,215,0.8); display: flex; align-items: center; padding: 0 10px; gap: 8px; flex-shrink: 0; backdrop-filter: blur(10px); }
.inputbar .add { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid #e7e2da; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text2); cursor: pointer; flex-shrink: 0; }
.inputbar input { flex: 1; height: 40px; border: 1px solid #e7e2da; border-radius: 20px; padding: 0 14px; font-size: 14px; outline: none; background: #fff; }
.inputbar input:focus { border-color: var(--brand); }
.inputbar .send { background: var(--brand-grad); color: #fff; border: none; border-radius: 20px; padding: 0 18px; height: 40px; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 2px 8px rgba(14,155,206,.3); }

/* 会话分段 */
.session-sep { text-align: center; color: var(--text3); font-size: 11px; padding: 10px 4px 4px; border-top: 1px dashed #d8d0c4; margin: 8px 4px 0; line-height: 1.5; }

/* 三点菜单 */
.more-menu { position: absolute; right: 12px; top: 52px; z-index: 15; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); min-width: 160px; overflow: hidden; }
.more-item { display: flex; align-items: center; gap: 8px; padding: 13px 16px; font-size: 14px; color: var(--text); cursor: pointer; }
.more-item:active { background: #f5f5f5; }
.more-item .more-ic { font-size: 16px; width: 22px; text-align: center; color: var(--brand); }
.analyzing-hint { text-align: center; padding: 14px; font-size: 13px; color: var(--brand-deep); background: #eaf7ff; border-radius: var(--radius); margin-bottom: 12px; animation: loadingPulse 1.2s ease-in-out infinite alternate; }

/* 加载动画 */
.loading-anim { text-align: center; padding: 16px 12px; font-size: 12px; color: var(--text3); animation: loadingPulse 1.2s ease-in-out infinite alternate; }
@keyframes loadingPulse { from { opacity: .5; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }

/* 形态切换 */
.switch-form { font-size: 12px; color: var(--brand); cursor: pointer; padding: 4px 12px; border: 1px solid var(--brand); border-radius: 14px; background: #f0f7fc; }
.switch-form:hover { background: #e3f2fb; }
.opt-multi { padding: 8px 4px; }
.opt-multi-head { font-size: 11px; color: var(--warm); margin-bottom: 6px; padding-left: 6px; font-weight: 500; }
.opt-multi .opt-sub { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px dashed #f0f0f0; font-size: 13px; }
.opt-multi .opt-sub:last-of-type { border-bottom: 0; }
.opt-multi .opt-idx { flex-shrink: 0; min-width: 30px; font-size: 10px; color: #999; padding: 2px 5px; background: #f6f2ec; border-radius: 4px; text-align: center; }
.opt-multi .opt-txt { flex: 1; line-height: 1.5; }
.opt-multi .opt-acts { flex-shrink: 0; }
.opt-multi-foot { padding-top: 6px; display: flex; gap: 8px; font-size: 12px; }
.opt-multi-foot .act { padding: 4px 12px; background: #f6f9fc; border-radius: 10px; cursor: pointer; color: var(--brand); }
.opt-multi-foot .act.ignore { color: #999; }

/* ---------- 动作面板 ---------- */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: .25s; z-index: 30; padding: 18px 14px 26px; box-shadow: 0 -8px 30px rgba(31,22,66,.12); }
.sheet.show { transform: translateY(0); }
.sheet .row { display: flex; align-items: center; gap: 12px; padding: 14px 8px; border-bottom: 1px solid #f5f0ea; cursor: pointer; }
.sheet .ic { width: 40px; height: 40px; border-radius: 12px; background: #eaf7ff; color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; }
.sheet .txt b { font-size: 14px; color: var(--text); display: block; }
.sheet .txt span { font-size: 12px; color: var(--text3); }
.sheet .close { text-align: center; margin-top: 14px; color: var(--text3); font-size: 15px; cursor: pointer; }

/* ---------- 轻提示 toast ---------- */
.toast { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%) translateY(20px); background: rgba(28, 24, 46, 0.88); color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 22px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: 80%; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 设置页 ---------- */
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 1px solid #f5f0ea; font-size: 14px; color: var(--text); cursor: pointer; }
.setting-row:active { background: #faf8f5; }
.setting-arrow { color: #d0c8bc; font-size: 18px; }

/* ---------- 说话风格设置（三 Tab） ---------- */
.psm-main { width: 340px; max-width: 94%; max-height: 92%; overflow-y: auto; border-radius: 20px; }
.psm-tabs { display: flex; gap: 8px; margin: 12px 0 16px; padding-bottom: 12px; border-bottom: 1px solid #f5f0ea; }
.psm-tab { flex: 1; text-align: center; padding: 10px 6px; font-size: 14px; font-weight: 500; color: #6b6257; background: #faf8f5; border: 1.5px solid #e8e0d5; border-radius: 12px; cursor: pointer; transition: all .15s ease; }
.psm-tab:hover { border-color: var(--brand); color: var(--brand); }
.psm-tab.on { color: #fff; background: var(--brand-grad); border-color: transparent; box-shadow: 0 3px 10px rgba(14,155,206,.3); }
.ps-sec-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 2px 0 2px; }
.ps-sec-sub { font-size: 13px; color: var(--text3); margin: 0 0 14px; }
.ps-sec { padding: 2px 2px 0; }
.psm-basic-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.psm-basic-row:last-of-type { margin-bottom: 0; }
.psm-basic-label { font-size: 13px; color: var(--text); width: 56px; flex-shrink: 0; }
.psm-quick-label { font-size: 13px; color: var(--text); font-weight: 500; margin: 12px 0 8px; }
.ps-snap-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-snap { padding: 9px 14px; border: 1px solid #e7e2da; border-radius: 18px; font-size: 13px; color: var(--text); background: #fff; cursor: pointer; transition: all .15s ease; }
.ps-snap.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(14,155,206,.3); }
.ps-selfwrite { margin-top: 10px; }
.ps-selfwrite-label { font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.ps-selfwrite textarea { width: 100%; border: 1px solid #e7e2da; border-radius: 12px; padding: 10px; font-size: 13px; font-family: inherit; resize: vertical; outline: none; box-sizing: border-box; background: #fff; }
.ps-selfwrite textarea:focus { border-color: var(--brand); }
.ps-skip { text-align: center; font-size: 12px; color: var(--text3); padding: 10px 0 2px; cursor: pointer; }
.ps-skip:active { color: var(--brand); }
.psm-entry { background: #fff; border: 1.5px solid #dcecf7; border-radius: var(--radius); padding: 12px 14px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: all .15s; box-shadow: var(--shadow); }
.psm-entry:hover { background: #f6fbff; }
.psm-entry:active { transform: scale(0.98); }
.psm-entry .psm-ic { font-size: 15px; font-weight: 600; line-height: 1; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: #eaf7ff; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.psm-entry .psm-txt { flex: 1; min-width: 0; }
.psm-entry .psm-t1 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.psm-entry .psm-t2 { font-size: 11px; color: var(--text3); }
.psm-entry .psm-arrow { color: #d0c8bc; font-size: 18px; }
.badge { display: inline-block; font-size: 10px; padding: 2px 7px; background: var(--mint); color: #fff; border-radius: 6px; margin-left: 4px; }
.ps-summary-inner { background: #fff; border: 1px solid #e3eff8; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); min-height: 116px; display: flex; flex-direction: column; justify-content: center; }
.ps-summary-text { font-size: 13px; color: var(--text); line-height: 1.75; }
.ps-summary-text.ps-summary-empty { color: var(--text3); font-style: italic; text-align: center; padding: 18px 6px; line-height: 1.9; }
.ps-summary-fix { font-size: 12px; color: var(--brand); margin: 14px 4px 6px; cursor: pointer; font-weight: 500; }
.ps-summary-foot { font-size: 11px; color: var(--text3); text-align: center; margin-top: 14px; padding-top: 10px; }
.privacy { font-size: 11px; color: var(--text3); line-height: 1.6; background: #f6f9fc; border: 1px solid #e2edf5; padding: 9px 12px; border-radius: 10px; margin: 12px 0 8px; }
.ps-consent { font-size: 12px; color: #555; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.ps-consent input { width: 16px; height: 16px; }
.ps-card { background: #f7fbff; border: 1px solid #dcecf7; border-radius: var(--radius); padding: 12px; margin: 12px 0; }
.ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 8px; }
.ps-field { display: flex; flex-direction: column; }
.ps-field:nth-child(9), .ps-field:nth-child(10) { grid-column: 1 / 3; }
.ps-field label { font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.ps-field input, .ps-field select, .ps-field textarea { width: 100%; border: 1px solid #e7e2da; border-radius: 8px; padding: 8px; font-size: 13px; outline: none; background: #fff; box-sizing: border-box; }
.ps-field textarea { height: 46px; resize: none; }
.ps-sample { text-align: center; margin: 8px 0; }
.ps-sample a { font-size: 12px; color: var(--heart); cursor: pointer; text-decoration: underline; }

/* 子页面 modal */
.psm-modal { position: absolute; inset: 0; background: var(--bg-grad); display: none; flex-direction: column; z-index: 30; }
.psm-sheet { display: flex; flex-direction: column; height: 100%; }
.psm-head { height: 52px; background: var(--brand-grad); color: #fff; display: flex; align-items: center; padding: 0 12px; flex-shrink: 0; }
.psm-head .psm-back { font-size: 22px; width: 32px; cursor: pointer; }
.psm-head .psm-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.psm-head .psm-ok { font-size: 13px; padding: 6px 14px; border-radius: 14px; background: rgba(255,255,255,0.22); cursor: pointer; }
.psm-body { flex: 1; overflow-y: auto; padding: 16px 14px; }
.psm-desc { font-size: 12px; color: #a06a00; line-height: 1.6; background: #fff4e0; border: 1px solid #ffe2ae; padding: 9px 12px; border-radius: 10px; }
.psm-upload { background: #fff; border: 1.5px dashed var(--brand); border-radius: var(--radius); padding: 20px; text-align: center; cursor: pointer; color: var(--brand); margin-top: 12px; }
.psm-upload:hover { background: #f6fbff; }
.psm-upload .psm-upload-ic { font-size: 26px; font-weight: 600; }
.psm-upload .psm-upload-t { font-size: 14px; margin-top: 6px; font-weight: 600; }
.psm-upload .psm-upload-s { font-size: 11px; color: var(--text3); margin-top: 2px; }
.psm-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.psm-preview img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; border: 1px solid #e7e2da; }
.psm-shot { position: relative; display: inline-block; }
.psm-shot img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; border: 1px solid #e7e2da; display: block; }
.psm-shot .del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--heart); color: #fff; font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; border: 2px solid #fff; box-sizing: border-box; }

/* 问卷 */
.psm-q { background: #fff; border-radius: var(--radius); padding: 13px; margin-top: 12px; box-shadow: var(--shadow); border: 1px solid var(--card-border); }
.psm-qt { font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.psm-qopts { display: flex; flex-wrap: wrap; gap: 8px; }
.psm-qopt { padding: 9px 14px; border: 1px solid #e7e2da; border-radius: 10px; background: #faf8f5; font-size: 13px; cursor: pointer; }
.psm-qopt.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.psm-qopts .psm-qopt-custom { border-style: dashed; border-color: #c8c0b4; color: var(--text2); background: #faf8f5; }
.psm-qopts .psm-qopt-custom.on { background: #fff4e0; color: var(--warm); border-color: var(--warm); border-style: solid; }
.psm-q .psm-qinput { display: none; margin-top: 6px; }
.psm-q .psm-qinput.show { display: block; }
.psm-q .psm-qinput input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--warm); border-radius: 10px; font-size: 13px; outline: none; box-sizing: border-box; }
.psm-qopts .psm-qadd { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px dashed #c8c0b4; color: var(--text3); font-size: 17px; cursor: pointer; vertical-align: middle; line-height: 1; transition: all .15s; }
.psm-qopts .psm-qadd:hover { border-color: var(--brand); color: var(--brand); background: #f0f7ff; }
.psm-q .psm-qadd-ok { display: inline-block; padding: 7px 14px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 12px; cursor: pointer; margin-left: 8px; vertical-align: middle; }
.psm-qinput input { width: calc(100% - 90px); display: inline-block; vertical-align: middle; }
.form-label { display: block; font-size: 12px; color: var(--text2); margin: 12px 0 6px; }
.form-label:first-child { margin-top: 0; }

/* 温和提示 */
.psm-tip { position: fixed; inset: 0; background: rgba(20, 16, 40, 0.5); display: none; align-items: center; justify-content: center; z-index: 40; }
.psm-tip.show { display: flex; }
.psm-tip-box { width: 320px; max-width: 90vw; background: #fff; border-radius: 20px; padding: 24px 20px 18px; text-align: center; box-shadow: var(--shadow-lg); }
.psm-tip-box .ico { font-size: 32px; margin-bottom: 8px; font-weight: 600; color: var(--brand); }
.psm-tip-box .msg { font-size: 14px; color: var(--text); line-height: 1.6; margin-bottom: 14px; }
.psm-tip-box .tip-btns { display: flex; gap: 10px; }
.psm-tip-box .tip-btns .btn { flex: 1; padding: 11px 0; border-radius: 12px; border: none; font-size: 14px; cursor: pointer; font-weight: 600; }
.psm-tip-box .tip-btns .btn-no { background: #f0ece6; color: var(--text2); }
.psm-tip-box .tip-btns .btn-yes { background: var(--brand); color: #fff; }

/* 范文弹层 */
.like-mask { position: fixed; inset: 0; background: rgba(20, 16, 40, 0.55); display: none; align-items: center; justify-content: center; z-index: 60; }
.like-mask.show { display: flex; }
.like-panel { width: 360px; max-width: 94%; max-height: calc(100vh - 120px); background: #fff; border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(31,22,66,.22); }
.like-head { height: 52px; background: var(--brand-grad); color: #fff; display: flex; align-items: center; padding: 0 14px; flex-shrink: 0; }
.like-head .like-back { font-size: 22px; width: 30px; cursor: pointer; }
.like-head .like-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; }
.like-head .like-ok { font-size: 13px; padding: 6px 14px; border-radius: 14px; background: rgba(255,255,255,0.22); cursor: pointer; }
.like-body { flex: 1; overflow-y: auto; padding: 12px 14px 20px; }
.like-tip { font-size: 12px; color: var(--text2); margin-bottom: 10px; line-height: 1.6; }
.like-card { background: #fff; border-radius: var(--radius); padding: 13px 14px; margin-bottom: 10px; border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.like-card-title { font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 6px; }
.like-card-text { font-size: 12px; color: var(--text2); line-height: 1.7; }
.like-btn { display: block; width: 100%; margin-top: 10px; padding: 10px 0; border: none; border-radius: 12px; background: var(--brand-grad); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(14,155,206,.25); }
.like-btn:active { opacity: .85; }
.like-custom { border-style: dashed; border-color: #f0c48a; background: #fffaf3; }
.like-custom .like-card-title { color: var(--warm); }
.like-custom textarea { width: 100%; min-height: 66px; padding: 10px; border: 1px solid #ffd591; border-radius: 10px; font-size: 12px; font-family: inherit; resize: vertical; outline: none; background: #fff; box-sizing: border-box; }
.like-custom .like-btn { background: linear-gradient(135deg, #ffb35c 0%, #ff9500 100%); box-shadow: 0 2px 8px rgba(255,149,0,.28); }
.like-card.editing { border-color: var(--warm); background: #fffaf3; box-shadow: 0 2px 10px rgba(255,149,0,.18); }
.like-card-edit .like-edit-area { width: 100%; min-height: 70px; padding: 10px 12px; border: 1.5px solid var(--warm); border-radius: 10px; font-size: 12px; font-family: inherit; resize: vertical; outline: none; background: #fff; line-height: 1.7; box-sizing: border-box; }
.like-card-edit .like-edit-hint { font-size: 11px; color: var(--warm); margin-top: 6px; }
.like-btn-cancel { display: block; width: 100%; margin-top: 6px; padding: 8px 0; background: transparent; color: var(--text3); font-size: 12px; border: none; cursor: pointer; }
.like-btn-cancel:hover { color: var(--text2); }

/* 对象指南 */
.obj-guide { margin-top: 12px; background: #faf8f5; border: 1px solid #e8e0d5; border-radius: var(--radius); overflow: hidden; }
.obj-guide-head { padding: 12px 14px; font-size: 13px; color: var(--brand); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.obj-guide-head:hover { background: #f3f8fc; }
.obj-guide-head .arrow { color: var(--text3); font-size: 14px; transition: transform .2s; }
.obj-guide-head.open .arrow { transform: rotate(90deg); }
.obj-guide-body { padding: 8px 14px 14px; border-top: 1px dashed #e0d8cc; max-height: 320px; overflow-y: auto; }
.guide-block { margin-top: 10px; }
.guide-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.guide-item { font-size: 12px; color: var(--text2); line-height: 1.7; padding-left: 4px; }
.guide-item b { color: var(--text); }
.guide-example { background: #fff4e0; border: 1px dashed #ffd591; border-radius: 10px; padding: 9px 10px; margin-top: 10px; }
.guide-example .guide-item { color: #5c3a00; }
.guide-hint { font-size: 11px; color: var(--warm); margin-top: 6px; }
textarea#f_like { width: 100%; min-height: 60px; padding: 10px; border: 1px solid #e7e2da; border-radius: 10px; font-size: 13px; font-family: inherit; resize: vertical; outline: none; box-sizing: border-box; background: #fff; }
textarea#f_like:focus { border-color: var(--brand); }

/* 分析目标弹窗 */
.goal-mask { position: fixed; inset: 0; background: rgba(20, 16, 40, 0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.goal-box { width: 300px; max-width: 92%; background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow-lg); }
.goal-box h3 { font-size: 15px; color: var(--text); margin: 0 0 14px; font-weight: 600; }
.goal-scope { display: flex; gap: 8px; margin: 0 0 12px; }
.scope-chip { flex: 1; text-align: center; font-size: 12px; color: var(--text2); background: #f6f2ec; border: 1px solid #e7e2da; border-radius: 10px; padding: 8px 4px; cursor: pointer; }
.scope-chip.on { color: #fff; background: var(--brand); border-color: var(--brand); }
.goal-list { display: flex; flex-direction: column; gap: 8px; }
.goal-item { padding: 12px; border: 1px solid #e7e2da; border-radius: 12px; cursor: pointer; font-size: 14px; color: var(--text); }
.goal-item:active { background: #f0f7ff; }
.goal-name { font-weight: 500; }
.goal-custom { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.goal-custom input { flex: 1; border: none; outline: none; font-size: 13px; color: var(--text); }
.goal-custom-btn { flex-shrink: 0; font-size: 12px; color: #fff; background: var(--brand); border-radius: 10px; padding: 6px 12px; cursor: pointer; }
.goal-cta { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px; background: var(--brand-grad); color: #fff; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(18,183,245,.3); transition: transform 150ms ease, box-shadow 150ms ease; user-select: none; }
.goal-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(18,183,245,.4); }
.goal-cta:active { transform: translateY(0); }
.goal-cta-hint { font-size: 11px; font-weight: 400; opacity: .88; margin-left: 4px; }

/* 消耗统计 */
.cost-range { display: flex; gap: 8px; margin: 12px 0; }
.cost-range-btn { padding: 7px 16px; border: 1px solid #e7e2da; border-radius: 16px; font-size: 13px; color: var(--text2); cursor: pointer; background: #fff; }
.cost-range-btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.cost-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cost-card { flex: 1; min-width: 120px; background: #faf8f5; border-radius: var(--radius); padding: 14px 16px; text-align: center; border: 1px solid var(--card-border); }
.cost-card .cc-num { font-size: 20px; font-weight: 700; color: var(--brand); }
.cost-card .cc-lab { font-size: 11px; color: var(--text3); margin-top: 4px; }
.cost-acc .cc-num { color: var(--warm); }
.cost-table-wrap { margin-top: 14px; max-height: 260px; overflow-y: auto; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cost-table th, .cost-table td { border: 1px solid #f0eae0; padding: 7px 10px; text-align: center; }
.cost-table th { background: #faf8f5; font-weight: 600; }

/* 找回密码 */
.forget-modal { width: 320px; max-width: 92%; }
.forget-modal h3 { margin-bottom: 6px; }
.forget-modal .sub { margin-bottom: 14px; }
.forget-modal input { width: 100%; height: 44px; border: 1px solid #e7e2da; border-radius: 12px; padding: 0 14px; font-size: 14px; outline: none; box-sizing: border-box; background: #fdfcfa; }
.forget-modal input:focus { border-color: var(--brand); background: #fff; }
#forgetMask { position: fixed; }

/* ===== 兼容补充（仍被 HTML/JS 引用的类） ===== */
.profile-modal { width: 340px; max-width: 94%; max-height: 92%; overflow-y: auto; border-radius: 20px; }
.psm-quick { padding: 2px; }
.psm-basic { background: #f0f7fc; border: 1px solid #dcecf7; border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.psm-basic-hint { font-size: 11px; color: var(--text3); margin-top: 10px; line-height: 1.6; }
/* 分条回复形态（V42，app.js 渲染用） */
.opt-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px dashed #f0f0f0; }
.opt-row:last-of-type { border-bottom: 0; }
.opt-row .opt-idx { align-self: flex-start; font-size: 10px; color: #999; padding: 2px 6px; background: #f6f2ec; border-radius: 4px; }
.opt-row .opt-txt { width: 100%; font-size: 13px; color: var(--text); line-height: 1.55; word-break: break-word; cursor: pointer; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; transition: background .15s; }
.opt-row .opt-txt:hover { background: #f6fbff; }
.opt-row .opt-txt:active { background: #eaf6ff; }
.opt-row .opt-act { align-self: flex-start; font-size: 11px; color: var(--brand); border: 1px solid #cdeafb; border-radius: 14px; padding: 4px 12px; cursor: pointer; }
.opt-row .opt-act:active { background: #f0f7ff; }
/* 模板筛选提示（profile-setup.js） */
.tpl-filter-hint { font-size: 11px; color: var(--warm); margin-top: 8px; }
