/* ============================================================
   灵心AI Web · 极简黑白灰主题（亮/暗双主题，复刻 Android APP）
   ============================================================ */
:root{
  --primary:#1A1A1F; --accent:#3A3A40;
  --bg:#F7F7F8; --surface:#FFFFFF; --bg2:#F0F0F2;
  --input-bg:#F0F0F2; --topbar:#F0F0F2; --chat-bg:#FAFAFA;
  --text1:#1A1A1F; --text2:#5A5A66; --text3:#9A9AA3;
  --divider:#E8E8EC; --divider2:#D8D8DC;
  --btn-text:#FFFFFF;
  --bubble:#E8E8EC; --bubble-me:#E8E8EC; --bubble-other:#F0F0F2;
  --unread:#D9534F; --shadow:rgba(0,0,0,.06);
  --avatar1:#B8A88F;
  --uname:#FFFFFF;
  --radius1:#9A9AA3;
}
html[data-theme="dark"]{
  --primary:#F5F5F7; --accent:#E8E8EC;
  --bg:#0A0A0C; --surface:#15151A; --bg2:#0F0F12;
  --input-bg:#0F0F12; --topbar:#0F0F12; --chat-bg:#070708;
  --text1:#F5F5F7; --text2:#9A9AA3; --text3:#5A5A66;
  --divider:#1F1F25; --divider2:rgba(255,255,255,.10);
  --uname:#000000;
  --bubble:#25252B; --bubble-other:#18181D;
  --unread:#E85A5A; --shadow:rgba(0,0,0,.35);
  --radius1:#9A9AA3;
}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  background:var(--bg); color:var(--text1);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:15px;
  display:flex; justify-content:center; align-items:stretch;
}
.app-wrap{
  width:100%; max-width:480px; min-height:100vh;
  position:relative; overflow:hidden;
  background:var(--bg);
}
button{font-family:inherit; border:none; background:none; cursor:pointer; color:inherit}
input,textarea,select{
  font-family:inherit; font-size:15px; color:var(--text1);
  background:var(--input-bg); border:1px solid transparent;
  border-radius:10px; padding:12px 14px; outline:none; width:100%;
}
textarea{resize:none; line-height:1.6}
select{appearance:none;-webkit-appearance:none}
::placeholder{color:var(--text3)}

/* ---------- 屏幕切换 ---------- */
.screen{display:none; position:absolute; inset:0; background:var(--bg); flex-direction:column}
.screen.active{display:flex; z-index:1; animation:fadein .18s ease}
@keyframes fadein{from{opacity:0}to{opacity:1}}

/* ---------- 顶栏 ---------- */
.topbar{
  height:56px; min-height:56px; display:flex; align-items:center;
  background:var(--topbar); padding:0 8px; gap:4px;
  z-index:5;
}
.tb-back{width:40px; height:40px; font-size:24px; color:var(--text1); flex:0 0 auto}
.tb-title{font-size:17px; font-weight:700; text-align:center; color:var(--text1); letter-spacing:.06em}
.tb-center{flex:1; display:flex; flex-direction:column; align-items:center; min-width:0}
.tb-sub{font-size:11px; color:var(--text2); max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.tb-place{width:40px; flex-basis:40px}
.tb-acts{display:flex; gap:2px}
.tb-act{font-size:13px; color:var(--text1); padding:6px 8px}
.tb-action{font-size:14px; color:var(--text1); padding:8px 12px}
.tb-add{
  width:36px; height:36px; border-radius:50%;
  background:var(--primary); color:var(--uname); font-size:20px;
  display:flex; align-items:center; justify-content:center;
}
.main-title{flex:1; text-align:center}

/* ---------- 弹出菜单 ---------- */
.pop-menu{
  position:absolute; top:52px; right:12px; z-index:60;
  background:var(--surface); border-radius:12px; min-width:150px;
  box-shadow:0 6px 24px var(--shadow); overflow:hidden;
}
.pop-item{padding:13px 18px; font-size:14px; border-bottom:1px solid var(--divider)}
.pop-item:last-child{border-bottom:none}
.pop-item:active{background:var(--bg2)}

/* ---------- 页面通用 ---------- */
.page{flex:1; overflow-y:auto; padding:16px; padding-bottom:40px}
.list{flex:1; overflow-y:auto}
.card-stack{display:flex; flex-direction:column; gap:12px}
.card{background:var(--surface); border-radius:14px; padding:14px 16px; display:flex; align-items:center; gap:12px}
.card-h{font-size:13px; color:var(--text2); margin:18px 2px 10px}
.sec-h{font-size:13px; color:var(--text2); margin:20px 2px 10px}
.card-hint{font-size:12px; color:var(--text3); margin:10px 2px}
.center{align-items:center; justify-content:center; text-align:center}

/* ---------- 输入 ---------- */
.inp{margin-bottom:12px}
.inp>label.lbl{display:block; font-size:13px; color:var(--text2); margin:10px 2px 6px}
.inp select{margin-top:6px}
.cap-row{display:flex; gap:10px; align-items:center}
.cap-row input{flex:1}
.cap-img{width:104px; height:44px; border-radius:10px; background:#F0F0F2; cursor:pointer; object-fit:cover}
.sms-btn{height:44px; padding:0 14px; border-radius:10px; background:var(--bg2); color:var(--text1); font-size:13px; white-space:nowrap; flex:0 0 auto}
.err{color:#D9534F; font-size:12px; min-height:16px; margin:4px 2px}
.agree-row{display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text2); margin:4px 2px 12px}
.agree-row input{width:16px; height:16px; accent-color:var(--primary)}
.link{color:var(--text1); text-decoration:underline}

/* ---------- 按钮 ---------- */
.btn-primary{
  width:100%; height:48px; border-radius:12px; background:var(--primary);
  color:var(--uname); font-size:15px; font-weight:600; letter-spacing:.2em; margin-top:6px;
}
.btn-plain{width:100%; height:44px; color:var(--text2); font-size:14px; margin-top:4px}
.btn-primary:active,.tb-action:active{opacity:.8}

/* ---------- 启动 / 登录 ---------- */
.splash,.auth-page{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:32px;
}
.splash-logo,.auth-logo{
  width:72px; height:72px; border-radius:22px; background:var(--primary); color:var(--uname);
  font-size:36px; font-weight:700; display:flex; align-items:center; justify-content:center; margin-bottom:18px;
}
.splash-name{font-size:30px; font-weight:800; letter-spacing:.06em}
.splash-sub{font-size:13px; color:var(--text2); margin-top:6px}
.splash-loading{font-size:12px; color:var(--text3); margin-top:40px}
.auth-name{font-size:26px; font-weight:800; letter-spacing:.06em; margin-bottom:6px}
.auth-tabs{display:flex; width:100%; max-width:340px; margin:24px 0 18px; border-bottom:1px solid var(--divider)}
.auth-tab{flex:1; text-align:center; padding:12px 0; font-size:15px; color:var(--text3); position:relative}
.auth-tab.active{color:var(--text1); font-weight:600}
.auth-tab.active::after{content:""; position:absolute; left:20%; right:20%; bottom:-1px; height:2px; background:var(--primary)}
#loginForm,#regForm{width:100%; max-width:340px}

/* ---------- 底部导航 ---------- */
.bnav{
  height:58px; min-height:58px; display:flex; background:var(--topbar);
  border-top:1px solid var(--divider); z-index:5;
}
.ni{flex:1; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--text3)}
.ni.active{color:var(--text1); font-weight:700}
.main-content{flex:1; overflow:hidden; display:flex}
.tabview{flex:1; display:flex; flex-direction:column; overflow:hidden}

/* ---------- 聊天条目 / 联系人 ---------- */
.ci,.ct{display:flex; align-items:center; gap:12px; padding:10px 16px; background:var(--surface); cursor:pointer; border-bottom:1px solid var(--divider)}
.ci:active,.ct:active{background:var(--bg2)}
.avatar{
  width:48px; height:48px; min-width:48px; border-radius:50%; color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:17px; font-weight:600;
}
.avatar.lg{width:56px; height:56px; min-width:56px; font-size:20px}
.avatar.sm{width:40px; height:40px; min-width:40px; font-size:14px}
.ci-info{flex:1; min-width:0}
.ci-name{font-size:16px; font-weight:600; color:var(--text1)}
.ci-desc{font-size:13px; color:var(--text2); margin-top:2px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.arrow{color:var(--text3); font-size:20px}
.badge{background:var(--unread); color:#fff; font-size:10px; min-width:18px; height:18px; border-radius:9px; display:flex; align-items:center; justify-content:center; padding:0 5px}

/* ---------- 设置页 ---------- */
.settings-page{padding:16px; padding-bottom:40px}
.settings-h{font-size:15px; font-weight:700; margin:6px 2px 14px}
.user-card{background:var(--surface); border-radius:14px; align-items:center; cursor:pointer; margin-bottom:16px}
.uc-info{flex:1; min-width:0}
.uc-name{font-size:16px; font-weight:700}
.uc-desc{font-size:12px; color:var(--text2); margin-top:3px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.set-row{
  display:flex; align-items:center; justify-content:space-between; padding:15px 16px;
  background:var(--surface); border-bottom:1px solid var(--divider); cursor:pointer;
}
.set-row.center{justify-content:center}
.set-row.danger .sr-title{color:var(--unread)}
.sr-main{flex:1; min-width:0}
.sr-title{font-size:15px; color:var(--text1)}
.sr-desc{font-size:12px; color:var(--text2); margin-top:3px}
.set-ver{text-align:center; font-size:12px; color:var(--text3); margin-top:20px}
.settings-page .card-stack{display:flex; flex-direction:column; gap:0; border-radius:14px; overflow:hidden; box-shadow:0 2px 10px var(--shadow)}
.settings-page .card-stack .set-row:first-child{border-top-left-radius:14px;border-top-right-radius:14px}
.settings-page .card-stack .set-row:last-child{border-bottom:none;border-bottom-left-radius:14px;border-bottom-right-radius:14px}

/* ---------- 聊天页 ---------- */
.conv-opts{
  display:flex; gap:14px; padding:8px 14px; background:var(--bg2);
  font-size:12px; color:var(--text2); flex:0 0 auto;
}
.conv-opts label{display:flex; align-items:center; gap:4px; cursor:pointer}
.conv-opts input{width:14px; height:14px; accent-color:var(--primary)}
.conv-model-bar{display:flex; gap:12px; padding:4px 14px; background:var(--bg2); font-size:11px; color:var(--text3); border-top:1px solid var(--border); cursor:pointer; flex:0 0 auto}
.conv-model-bar span{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.conv-model-bar:hover{color:var(--primary)}
.msg-list{flex:1; overflow-y:auto; padding:12px; background:var(--chat-bg)}
.msg{display:flex; margin-bottom:12px; align-items:flex-end; gap:8px}
.msg.me{justify-content:flex-end}
.msg .avatar{width:36px; height:36px; min-width:36px; font-size:13px}
.msg-col{max-width:72%; display:flex; flex-direction:column}
.msg.me .msg-col{align-items:flex-end}
.bubble{
  padding:10px 13px; border-radius:14px; font-size:15px; line-height:1.55;
  word-break:break-word; white-space:pre-wrap;
}
.msg.them .bubble{background:var(--bubble-other); border-top-left-radius:4px}
.msg.me .bubble{background:var(--bubble); border-top-right-radius:4px}
.msg-time{font-size:10px; color:var(--text3); margin-top:4px}
.bubble img{max-width:220px; border-radius:8px; display:block}
.search-src{
  background:var(--bubble-other); border-radius:10px; margin-bottom:6px; overflow:hidden;
  border:1px solid var(--divider);
}
.search-src .src-head{padding:7px 10px; font-size:12px; color:var(--text2); display:flex; justify-content:space-between; cursor:pointer}
.search-src .src-body{padding:8px 10px; font-size:12px; color:var(--text2); display:none}
.thinking{
  background:var(--bubble-other); color:var(--text2); font-size:12px;
  border-radius:10px; padding:8px 10px; margin-bottom:6px; line-height:1.5; max-height:150px; overflow-y:auto;
}
.file-msg{display:flex; align-items:center; gap:10px}
.file-ic{width:40px; height:40px; border-radius:8px; background:var(--input-bg); display:flex; align-items:center; justify-content:center; font-size:20px}

.conv-bar{
  height:52px; min-height:52px; display:flex; align-items:center; gap:8px;
  padding:0 10px; background:var(--topbar); border-top:1px solid var(--divider);
}
.conv-bar input{height:38px; padding:0 14px; border-radius:19px}
.cb-plus{width:38px; height:38px; font-size:22px; color:var(--text2); flex:0 0 auto}
.cb-send{
  height:38px; padding:0 18px; border-radius:19px; background:var(--primary); color:var(--uname);
  font-size:14px; font-weight:600; flex:0 0 auto;
}
.plus-menu.overlay{position:fixed; inset:0; z-index:100; background:rgba(0,0,0,.35); display:flex; align-items:flex-end; justify-content:center}
.pm-box{background:var(--surface); width:100%; max-width:480px; border-radius:16px 16px 0 0; padding:10px 0 24px}
.pm-item{text-align:center; padding:14px; font-size:15px; border-bottom:1px solid var(--divider)}
.pm-item:last-child{border:none; color:var(--unread)}

/* ---------- 官方人设网格 ---------- */
.grid{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.pcard{background:var(--surface); border-radius:12px; padding:12px; border:1px solid var(--divider); cursor:pointer}
.pcard:active{background:var(--bg2)}
.pcard .pc-name{font-size:14px; font-weight:700}
.pcard .pc-kw{font-size:11px; color:var(--text3); margin-top:3px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}

/* ---------- 选择列表 ---------- */
.check-list{flex:1; overflow-y:auto}
.chk-row{display:flex; align-items:center; gap:12px; padding:12px 16px; background:var(--surface); border-bottom:1px solid var(--divider); cursor:pointer}
.chk-row input{width:18px; height:18px; accent-color:var(--primary)}
.chk-name{flex:1; font-size:15px}

/* ---------- 头像大图 ---------- */
.avatar-lg{
  width:84px; height:84px; border-radius:50%; background:var(--primary); color:var(--uname);
  display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:700;
  margin:6px auto 16px; cursor:pointer;
}
.line-avatar{display:flex; flex-direction:column; align-items:center; margin-bottom:14px; cursor:pointer}
.la-hint{font-size:12px; color:var(--text3); margin-top:8px}
.mem-hint{font-size:12px; color:var(--text2); background:var(--bg2); border-radius:10px; padding:10px 12px; line-height:1.6}

/* ---------- 朋友圈 ---------- */
.moment{background:var(--surface); margin:10px 14px; border-radius:14px; padding:14px 16px}
.mom-head{display:flex; gap:10px; align-items:center; margin-bottom:10px}
.mom-name{font-size:15px; font-weight:700}
.mom-time{font-size:11px; color:var(--text3); margin-top:2px}
.mom-content{font-size:14px; line-height:1.6}
.mom-imgs{display:flex; flex-wrap:wrap; gap:6px; margin-top:10px}
.mom-imgs img{width:108px; height:108px; border-radius:8px; object-fit:cover}
.mom-actions{display:flex; gap:16px; margin-top:12px; padding-top:10px; border-top:1px solid var(--divider); color:var(--text2); font-size:13px}
.mom-actions span{cursor:pointer}
.mom-actions .liked{color:var(--unread); font-weight:600}
.mom-cm{margin-top:10px; padding:10px 12px; background:var(--bg2); border-radius:10px; font-size:12px; line-height:1.7}
.mom-cm .cm-ai{font-weight:700; color:var(--text1); margin-right:2px}
.compose-text{min-height:130px; margin-bottom:12px}
.cimgs{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px}
.cimgs .ci-box{position:relative}
.cimgs img{width:88px; height:88px; border-radius:8px; object-fit:cover}
.cimgs .del{position:absolute; top:-6px; right:-6px; width:20px; height:20px; border-radius:50%; background:#D9534F; color:#fff; font-size:12px; display:flex; align-items:center; justify-content:center}
.add-img{width:88px; height:88px; border:1px dashed var(--divider2); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:28px; color:var(--text3); cursor:pointer}

/* ---------- 圆桌 ---------- */
.ttabs{display:flex; padding:10px 14px 0; gap:20px; flex:0 0 auto}
.ttabs .tab{font-size:14px; color:var(--text3); padding:8px 2px; border-bottom:2px solid transparent}
.ttabs .tab.active{color:var(--text1); font-weight:700; border-color:var(--primary)}
.meeting{background:var(--surface); border-radius:14px; margin:10px 14px; padding:14px 16px; cursor:pointer}
.mt-title{font-size:15px; font-weight:700}
.mt-topic{font-size:12px; color:var(--text2); margin-top:6px; line-height:1.5}
.mt-meta{font-size:11px; color:var(--text3); margin-top:8px}
.dbar{flex:0 0 auto; padding:8px 14px; background:var(--bg2); font-size:12px; color:var(--text2)}
.chip-wrap{display:flex; flex-wrap:wrap; gap:8px}
.chip{
  border:1px solid var(--divider2); border-radius:18px; padding:7px 14px; font-size:13px;
  background:var(--surface); cursor:pointer; color:var(--text2);
}
.chip.on{background:var(--primary); color:var(--uname); border-color:var(--primary)}
.rt-msg .bubble .speaker{display:block; font-size:11px; color:var(--text3); font-weight:700; margin-bottom:4px}

/* ---------- 密钥 ---------- */
.key-form{background:var(--bg2); border-radius:12px; padding:14px; margin:0 14px 12px}
.key-tip{font-size:12px; color:var(--text3); padding:0 16px 10px}
.ki{display:flex; align-items:center; gap:10px; padding:12px 16px; background:var(--surface); border-bottom:1px solid var(--divider)}
.ki-type{font-size:11px; padding:2px 8px; border-radius:10px; background:var(--bg2); color:var(--text2)}
.ki-main{flex:1; min-width:0}
.ki-label{font-size:14px; font-weight:600}
.ki-desc{font-size:11px; color:var(--text3); margin-top:2px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.ki-act{font-size:12px; color:var(--text1); padding:6px 8px}
.kon{color:var(--unread)} .kon2{color:var(--text2)}

/* ---------- 用量 ---------- */
.usage-sum{background:var(--surface); border-radius:14px; padding:16px; text-align:center}
.usage-num{font-size:26px; font-weight:800}
.usage-lbl{font-size:12px; color:var(--text2); margin-top:4px}
.stat-row{display:flex; justify-content:space-between; font-size:13px; padding:10px 2px; border-bottom:1px solid var(--divider); color:var(--text2)}

/* ---------- 卡片居中盒子 ---------- */
.wb-hint{font-size:13px; color:var(--text2); margin-bottom:14px}
#wbQr img{width:200px; height:200px; border-radius:12px; background:var(--surface); margin:12px auto}
.spinner{width:30px; height:30px; border:3px solid var(--divider); border-top-color:var(--text2); border-radius:50%; margin:16px auto; animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.wb-status{font-size:13px; color:var(--text2); margin-top:12px; line-height:1.6}
.license{font-size:12px; line-height:1.8; color:var(--text2); background:var(--surface); border-radius:12px; padding:14px; overflow:auto; white-space:pre-wrap}
.li-item{background:var(--surface); border-radius:12px; padding:12px 14px; margin-bottom:10px}
.li-name{font-size:14px; font-weight:700}
.li-ver{font-size:11px; color:var(--text3); margin-top:2px}
.fb-item{background:var(--surface); border-radius:12px; padding:12px 14px; margin-bottom:10px}
.fb-item .fb-t{font-size:11px; color:var(--text3); margin-bottom:6px}
.fb-item .fb-c{font-size:13px; color:var(--text1); line-height:1.5}
.fb-item .fb-r{font-size:12px; color:var(--text2); border-top:1px solid var(--divider); margin-top:8px; padding-top:8px}

/* ---------- 弹窗 ---------- */
.overlay{position:fixed; inset:0; z-index:200; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; padding:24px}
.dlg{background:var(--surface); border-radius:16px; width:100%; max-width:340px; padding:22px; text-align:center}
.dlg-title{font-size:17px; font-weight:700; margin-bottom:12px}
.dlg-body{font-size:13px; color:var(--text2); line-height:1.7; text-align:left; max-height:50vh; overflow-y:auto; margin-bottom:16px}
.dlg-actions{display:flex; gap:10px}
.dlg-actions .btn-primary{margin:0}
.lock-dlg{padding:30px 22px}
.lock-ic{font-size:30px; color:var(--text3); margin-bottom:10px}
.lock-timer{font-size:34px; font-weight:800; color:var(--primary); margin:12px 0}
.lock-sub{font-size:12px; color:var(--text3)}

/* ---------- 病娇 ---------- */
.yl-box{background:var(--surface); border-radius:18px; max-width:340px; width:100%; padding:26px 22px; text-align:center}
.yl-title{font-size:20px; font-weight:800; color:#E85A5A; margin-bottom:8px}
.yl-timer{font-size:13px; color:var(--text3); margin-bottom:14px}
.yl-body{font-size:13px; color:var(--text2); line-height:1.7; margin-bottom:18px}
.yl-actions{display:flex; gap:10px}
.yd-pop{background:var(--surface); border-radius:20px; padding:28px 24px; text-align:center; background:linear-gradient(180deg,#fff,var(--bg)); }
html[data-theme="dark"] .yd-pop{background:linear-gradient(180deg,#1c1c22,var(--bg))}
.yd-big{font-size:40px; color:#E85A5A; margin-bottom:12px}
.yd-text{font-size:14px; color:var(--text1); line-height:1.7; margin-bottom:20px}
.yd-actions{display:flex; gap:10px}
.yd-btn{flex:1; height:44px; border-radius:22px; border:1px solid var(--divider2); font-size:14px; color:var(--text1)}

/* ---------- Toast ---------- */
.toast{
  position:fixed; left:50%; bottom:90px; transform:translateX(-50%) translateY(20px);
  background:rgba(20,20,24,.92); color:#fff; font-size:13px; padding:10px 18px; border-radius:20px;
  opacity:0; pointer-events:none; transition:all .25s ease; z-index:400; max-width:80%; text-align:center;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0)}

/* ---------- 空态 / 加载 ---------- */
.empty{padding:60px 20px; text-align:center; color:var(--text3); font-size:13px}
.loading{padding:50px 20px; text-align:center; color:var(--text3); font-size:13px}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar{width:4px; height:4px}
::-webkit-scrollbar-thumb{background:var(--divider2); border-radius:2px}
::-webkit-scrollbar-track{background:transparent}

/* ---------- 联系人行 / 列表 ---------- */
.contact{display:flex; align-items:center; gap:12px; padding:12px 16px; background:var(--surface); border-bottom:1px solid var(--divider); cursor:pointer}
.contact:active{background:var(--bg2)}
.contact .contact-info{flex:1; min-width:0}
.contact .contact-name{font-size:15px; font-weight:600; color:var(--text1)}
.contact .contact-last{font-size:12px; color:var(--text3); margin-top:3px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.contact .arrow{color:var(--text3)}
.contact .tag-closed{font-size:11px; color:var(--text3); border:1px solid var(--divider2); border-radius:8px; padding:2px 8px}

/* ---------- 聊天气泡 ---------- */
.chat-row{display:flex; gap:10px; margin-bottom:14px; align-items:flex-start}
.chat-row .chat-content{max-width:78%; display:flex; flex-direction:column}
.chat-row.mine{flex-direction:row-reverse}
.chat-row .group-name{font-size:11px; color:var(--text3); margin:0 6px 4px}
.msg-text{padding:10px 14px; border-radius:14px; font-size:15px; line-height:1.65; background:var(--bubble-other); color:var(--text1); white-space:pre-wrap; word-break:break-word}
.chat-row.mine .msg-text{background:var(--bubble-me); color:var(--text1)}
.msg-img img{max-width:220px; max-height:260px; border-radius:12px; display:block; background:var(--bg2); cursor:zoom-in}
.msg-file{padding:10px 14px; border-radius:12px; background:var(--bg2); font-size:13px; color:var(--text2); cursor:pointer; display:inline-flex; align-items:center; gap:8px}
html[data-theme="dark"] .chat-row.mine .msg-text{background:var(--bubble)}

/* ---------- 官方人设卡片 ---------- */
.pcard .pcard-name{font-size:14px; font-weight:700; margin-top:8px}
.pcard .pcard-desc{font-size:11px; color:var(--text3); margin-top:3px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}

/* ---------- 勾选列表（群聊/应用锁） ---------- */
.check-list{display:flex; flex-direction:column; gap:0; background:var(--surface); border-radius:14px; overflow:hidden}
.check-item{display:flex; align-items:center; gap:12px; padding:12px 14px; border-bottom:1px solid var(--divider); font-size:14px; cursor:pointer}
.check-item:last-child{border-bottom:none}
.check-item input{width:18px; height:18px; accent-color:var(--primary); flex:none}
.check-item span{flex:1}

/* ---------- 圆桌人设选择 chips ---------- */
.chip{display:inline-block; padding:8px 14px; border-radius:18px; border:1px solid var(--divider2); font-size:13px; color:var(--text2); cursor:pointer; margin:4px}
.chip.on{background:var(--primary); color:var(--btn-text); border-color:var(--primary)}
.chip-wrap{padding:6px 0}

/* ---------- 标签 ---------- */
.tag-official{font-size:10px; color:var(--text1); border:1px solid var(--divider2); border-radius:6px; padding:1px 5px; margin-left:4px; font-weight:400}
.tag-cur{font-size:10px; color:var(--unread); margin-left:4px; font-weight:400}

/* ---------- 朋友圈 ---------- */
.moment-body{flex:1; min-width:0}
.moment .moment-name{font-size:14px; font-weight:700; color:var(--text1)}
.moment .moment-text{font-size:14px; line-height:1.6; color:var(--text1); margin:8px 0; white-space:pre-wrap; word-break:break-word}
.moment .moment-imgs{display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin:8px 0}
.moment .moment-imgs img{width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:8px; background:var(--bg2); cursor:zoom-in}
.moment .moment-meta{font-size:11px; color:var(--text3)}
.moment .m-toolbar{display:flex; gap:6px; margin-top:10px}
.moment .m-btn{font-size:12px; padding:5px 12px; border-radius:14px; background:var(--bg2); color:var(--text2)}
.moment .m-btn.danger{color:var(--unread)}
.moment .m-comments{background:var(--bg2); border-radius:10px; padding:8px 10px; margin-top:10px}
.moment .m-comment{font-size:12px; color:var(--text2); line-height:1.6}
.moment .m-comment .cn{font-weight:600; color:var(--text1)}

/* ---------- 发朋友圈 ---------- */
.cimg{position:relative; display:inline-block}
.cimg img{width:88px; height:88px; border-radius:8px; object-fit:cover}
.cimg .ci-x{position:absolute; top:-6px; right:-6px; width:20px; height:20px; border-radius:50%; background:var(--unread); color:#fff; font-size:13px; line-height:20px; text-align:center; cursor:pointer}