/* ==========================================================================
   密聊 — WhatsApp Web 视觉层（覆盖式，不改 DOM / 不改 xchat-app.js）
   颜色全部取自 WhatsApp Web 实测 token：
     浅色  文字 #111B21 / 次 #667781 / 线 #E9EDEF / 墙纸 #F5F1EB
           入站 #FFFFFF / 出站 #D9FDD3 / 品牌 #00A884 / 未读点 #25D366 / 已读 #53BDEB
     深色  文字 #E9EDEF / 次 #8696A0 / 线 #222D34 / 面板 #111B21
           入站 #202C33 / 出站 #005C4B / 背景 #0B141A
   载入顺序：必须放在页面原有 <style> 之后。
   ========================================================================== */

/* ---------------- 1. 变量 ---------------- */
:root{
  --wa-text:#111B21;
  --wa-text-2:#667781;
  --wa-text-3:#8696A0;
  --wa-icon:#54656F;
  --wa-line:#E9EDEF;
  --wa-line-soft:#F0F2F5;
  --wa-surface:#FFFFFF;
  --wa-app:#F0F2F5;
  --wa-wall:#F5F1EB;
  --wa-in:#FFFFFF;
  --wa-out:#D9FDD3;
  --wa-accent:#00A884;
  --wa-accent-2:#008069;
  --wa-accent-soft:#D9FDD3;
  --wa-badge:#25D366;
  --wa-tick:#667781;
  --wa-tick-read:#53BDEB;
  --wa-danger:#EA0038;
  --wa-radius:7.5px;
  --wa-shadow-bubble:0 1px .5px rgba(11,20,26,.13);
  --wa-shadow-pop:0 2px 8px rgba(11,20,26,.14);
  --wa-font:"Segoe UI","Helvetica Neue",Helvetica,Arial,"PingFang SC","Microsoft YaHei",sans-serif;
  /* 兼容项目原有变量名（部分规则直接引用了它们） */
  --tx:var(--wa-text); --tx2:var(--wa-text-2); --tx3:var(--wa-text-3);
  --line:var(--wa-line); --card:var(--wa-surface); --card2:var(--wa-surface);
  --bg-base:var(--wa-app); --accent:var(--wa-accent); --accent2:var(--wa-accent-2);
  --accent-soft:var(--wa-accent-soft); --danger:var(--wa-danger);
  --bubble-them:var(--wa-in); --bubble-them-line:rgba(11,20,26,.08);
  --tabbar-bg:var(--wa-surface); --input-bg:var(--wa-surface);
  --theme-grad:none;
}

html[data-wa="dark"]{
  --wa-text:#E9EDEF; --wa-text-2:#8696A0; --wa-text-3:#8696A0; --wa-icon:#AEBAC1;
  --wa-line:#222D34; --wa-line-soft:#182229; --wa-surface:#111B21; --wa-app:#0B141A;
  --wa-wall:#0B141A; --wa-in:#202C33; --wa-out:#005C4B;
  --wa-accent:#00A884; --wa-accent-soft:#005C4B; --wa-tick:#8696A0; --wa-tick-read:#53BDEB;
  --wa-shadow-bubble:0 1px .5px rgba(0,0,0,.35);
  --wa-shadow-pop:0 4px 14px rgba(0,0,0,.5);
}
html[data-wa="dark"]{ --bubble-them-line:rgba(255,255,255,.06); }

/* ---------------- 2. 外壳：把手机框做成 WhatsApp 的窗口 ---------------- */
body{
  background:var(--wa-app) !important;
  color:var(--wa-text) !important;
  font-family:var(--wa-font) !important;
  -webkit-font-smoothing:antialiased;
}
.stage{ background:transparent !important; }
.phone{
  width:100% !important; max-width:460px !important;
  height:100vh !important; height:100dvh !important;
  max-height:none !important;
  border-radius:0 !important;
  background:var(--wa-surface) !important;
  box-shadow:0 0 0 1px rgba(11,20,26,.08), 0 12px 40px rgba(11,20,26,.16) !important;
  overflow:hidden !important;
}
@media (min-width:520px){
  .phone{ border-radius:6px !important; height:min(96vh, 940px) !important; margin:auto !important; }
}
.app{ background:var(--wa-app) !important; }
.statusbar{ display:none !important; }
.homebar{ display:none !important; }

/* ---------------- 3. 登录页（WhatsApp Web 登录观感） ---------------- */
.auth{
  background:#FCF5EB !important;
}
html[data-wa="dark"] .auth{ background:#0B141A !important; }
.auth-card{
  background:transparent !important;
  box-shadow:none !important;
  border:0 !important;
  max-width:420px !important;
  padding:0 22px !important;
}
.auth-brand{ margin-bottom:18px !important; }
.auth-logo{
  width:64px !important; height:64px !important;
  border-radius:50% !important;
  background:var(--wa-accent) !important;
  box-shadow:none !important;
}
.auth-brand-name{
  font-size:26px !important; font-weight:400 !important; letter-spacing:-.2px !important;
  color:var(--wa-text) !important;
}
.auth-brand-sub{ font-size:13.5px !important; color:var(--wa-text-2) !important; }
.auth-panel{
  background:var(--wa-surface) !important;
  border-radius:12px !important;
  box-shadow:0 12px 28px rgba(11,20,26,.10), 0 2px 4px rgba(11,20,26,.06) !important;
  padding:26px 24px 22px !important;
  border:0 !important;
}
.auth-panel-title{
  font-size:19px !important; font-weight:500 !important; color:var(--wa-text) !important;
  letter-spacing:0 !important;
}
.auth-panel-en{ font-size:12.5px !important; color:var(--wa-text-3) !important; }
.field label{ color:var(--wa-text-2) !important; font-size:12.5px !important; }
.field input{
  background:var(--wa-surface) !important;
  border:1px solid var(--wa-line) !important;
  border-radius:8px !important;
  color:var(--wa-text) !important;
  font-size:14.5px !important;
  padding:11px 12px !important;
}
.field input:focus{ border-color:var(--wa-accent) !important; box-shadow:0 0 0 1px var(--wa-accent) !important; }
.field input::placeholder{ color:var(--wa-text-3) !important; }
.auth-pwd-tip{ color:var(--wa-text-3) !important; font-size:12px !important; }
.auth-submit{
  background:var(--wa-accent) !important;
  color:#fff !important;
  border-radius:8px !important;
  font-size:15px !important; font-weight:500 !important;
  box-shadow:none !important;
  padding:12px !important;
}
.auth-submit:active{ background:var(--wa-accent-2) !important; }
.auth-switch{ color:var(--wa-text-2) !important; }
.auth-legal{ color:var(--wa-text-3) !important; font-size:12px !important; }
.auth-legal b{ color:var(--wa-accent) !important; }
.auth-hint{ color:var(--wa-text-2) !important; }
.auth-ver{ color:var(--wa-text-3) !important; font-size:12px !important; }

/* ---------------- 4. 顶栏 / 页面标题 ---------------- */
.page-head{
  background:var(--wa-surface) !important;
  border-bottom:1px solid var(--wa-line) !important;
  min-height:56px !important;
  padding:6px 10px !important;
  gap:10px !important;
}
.page-title{
  font-size:16.5px !important; font-weight:500 !important;
  color:var(--wa-text) !important; letter-spacing:0 !important;
}
.page-head .icon-btn,.icon-btn{
  width:38px !important; height:38px !important;
  border-radius:50% !important;
  color:var(--wa-icon) !important;
  background:transparent !important;
  transition:background-color .15s ease !important;
}
.icon-btn:hover,.icon-btn:active{ background:rgba(11,20,26,.06) !important; }
html[data-wa="dark"] .icon-btn:hover{ background:rgba(255,255,255,.06) !important; }

/* ---------------- 5. 搜索栏 ---------------- */
.search{
  background:var(--wa-line-soft) !important;
  border:0 !important;
  border-radius:9px !important;
  height:35px !important;
  color:var(--wa-text-2) !important;
}
.search input{ background:transparent !important; color:var(--wa-text) !important; }
.search input::placeholder{ color:var(--wa-text-3) !important; }

/* ---------------- 6. 会话列表 ---------------- */
.list,.vscroll{ background:var(--wa-surface) !important; }
.ci-row{
  padding:0 !important; gap:0 !important;
  border-bottom:0 !important;
  background:var(--wa-surface) !important;
}
.ci{
  display:flex !important; gap:13px !important; align-items:center !important;
  padding:10px 14px !important;
  background:transparent !important;
  transition:background-color .12s linear !important;
}
.ci:active,.ci:hover{ background:var(--wa-line-soft) !important; }
.ci-wrap{ border-bottom:1px solid var(--wa-line) !important; }
.ci-wrap:last-child{ border-bottom:0 !important; }
.av{
  width:49px !important; height:49px !important;
  border-radius:50% !important;
  background:#DFE5E7 !important;
  color:#54656F !important;
  font-size:17px !important; font-weight:500 !important;
  overflow:hidden !important;
}
html[data-wa="dark"] .av{ background:#2A3942 !important; color:#AEBAC1 !important; }
.ci-main{ flex:1 !important; min-width:0 !important; padding:0 !important; }
.ci-name{ font-size:16.5px !important; font-weight:400 !important; color:var(--wa-text) !important; }
.ci-prev{
  font-size:13.5px !important; color:var(--wa-text-2) !important; margin-top:2px !important;
}
.ci-time{ font-size:12px !important; color:var(--wa-text-3) !important; }
.ci-badge{
  background:var(--wa-badge) !important; color:#fff !important;
  border-radius:50% !important; min-width:20px !important; height:20px !important;
  font-size:11.5px !important; font-weight:600 !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
}
.ci-emoji,.ci-send{ color:var(--wa-text-3) !important; }
.sec-label{ color:var(--wa-text-3) !important; font-size:12px !important; }
.empty{ color:var(--wa-text-3) !important; }

/* ---------------- 7. 聊天页 ---------------- */
.chat{ background:var(--wa-wall) !important; }
.chat-body{
  background-color:var(--wa-wall) !important;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23E3DACC' stroke-width='1.6' stroke-linecap='round'><path d='M18 26c6 0 6 8 12 8'/><circle cx='44' cy='20' r='5'/><path d='M72 16v10M78 21H66'/><path d='M96 30l8 8M104 30l-8 8'/><path d='M14 62a10 10 0 0 1 10-10'/><path d='M40 54c4-4 10-4 14 0s-4 10-8 12'/><circle cx='84' cy='58' r='6'/><path d='M104 66l6 6'/><path d='M22 96c0-6 5-10 11-10s11 4 11 10'/><path d='M62 88v12M68 92l8-8'/><path d='M92 92a8 8 0 1 1 16 0 8 8 0 0 1-16 0z'/></g></svg>") !important;
  background-size:auto !important;
  padding:10px 6% 6px !important;
}
html[data-wa="dark"] .chat-body{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%231B2A33' stroke-width='1.6' stroke-linecap='round'><path d='M18 26c6 0 6 8 12 8'/><circle cx='44' cy='20' r='5'/><path d='M72 16v10M78 21H66'/><path d='M96 30l8 8M104 30l-8 8'/><path d='M14 62a10 10 0 0 1 10-10'/><path d='M40 54c4-4 10-4 14 0s-4 10-8 12'/><circle cx='84' cy='58' r='6'/><path d='M104 66l6 6'/><path d='M22 96c0-6 5-10 11-10s11 4 11 10'/><path d='M62 88v12M68 92l8-8'/><path d='M92 92a8 8 0 1 1 16 0 8 8 0 0 1-16 0z'/></g></svg>") !important;
}
.chat > .page-head{
  background:var(--wa-surface) !important;
  border-bottom:1px solid var(--wa-line) !important;
}
.chat > .page-head .page-title{ font-size:16px !important; }
.ghead-sub{ font-size:12.5px !important; color:var(--wa-text-2) !important; }

/* 日期胶囊 */
.msg-date{
  align-self:center !important;
  background:var(--wa-surface) !important;
  color:var(--wa-text-2) !important;
  font-size:12.5px !important;
  padding:5px 12px !important;
  border-radius:7.5px !important;
  box-shadow:var(--wa-shadow-bubble) !important;
  margin:10px auto !important;
}
html[data-wa="dark"] .msg-date{ background:#182229 !important; color:#8696A0 !important; }

/* 消息行 */
.msg-row{ padding:0 0 !important; margin:2px 0 !important; gap:6px !important; }
.msg-col{ max-width:78% !important; }
.bubble{
  background:var(--wa-in) !important;
  color:var(--wa-text) !important;
  border:0 !important;
  border-radius:var(--wa-radius) !important;
  padding:6px 9px 8px 9px !important;
  font-size:14.2px !important;
  line-height:19px !important;
  box-shadow:var(--wa-shadow-bubble) !important;
  position:relative !important;
}
.msg-row.them .bubble{ border-top-left-radius:0 !important; }
.msg-row.me .bubble{
  background:var(--wa-out) !important;
  border-top-right-radius:0 !important;
}
html[data-wa="dark"] .msg-row.me .bubble{ background:var(--wa-out) !important; }

/* 气泡小尾巴（WhatsApp 的三角） */
.msg-row .bubble::before{
  content:"" !important;
  position:absolute !important;
  top:0 !important;
  width:8px !important; height:13px !important;
  background:inherit !important;
}
.msg-row.them .bubble::before{ left:-8px !important; clip-path:polygon(100% 0,100% 100%,0 0) !important; }
.msg-row.me .bubble::before{ right:-8px !important; clip-path:polygon(0 0,0 100%,100% 0) !important; }

/* 气泡内时间/已读 */
.msg-readst{
  color:var(--wa-tick) !important;
  font-size:11px !important;
  margin-left:6px !important;
}
.msg-readst.read{ color:var(--wa-tick-read) !important; }
.mtime,.sender{ color:var(--wa-text-3) !important; font-size:11px !important; }
.msg-recalled{ color:var(--wa-text-3) !important; font-style:italic !important; }
.msg-img,.msg-video{ border-radius:6px !important; }

/* 输入中三点 */
.typing i{ background:var(--wa-text-3) !important; }

/* 引用条 */
.quote-bar{
  background:var(--wa-surface) !important;
  border-left:3px solid var(--wa-accent) !important;
  border-radius:6px !important;
  color:var(--wa-text-2) !important;
}

/* 输入区 */
.chat-input{
  background:var(--wa-surface) !important;
  border-top:0 !important;
  padding:6px 8px !important;
  gap:6px !important;
}
html[data-wa="dark"] .chat-input{ background:#111B21 !important; }
.chat-input input,
.chat-input textarea{
  background:var(--wa-surface) !important;
  border:0 !important;
  border-radius:8px !important;
  color:var(--wa-text) !important;
  font-size:15px !important;
  padding:10px 14px !important;
  box-shadow:var(--wa-shadow-bubble) !important;
}
html[data-wa="dark"] .chat-input input,
html[data-wa="dark"] .chat-input textarea{ background:#2A3942 !important; }
.chat-input input::placeholder{ color:var(--wa-text-3) !important; }
.ci-send,.ci-plus,.ci-emoji{
  color:var(--wa-icon) !important;
  transition:color .15s ease !important;
}
.ci-send.on,.ci-send.accent{ color:var(--wa-accent) !important; }

/* ---------------- 8. 底部 Tab（WhatsApp 绿） ---------------- */
.tabbar{
  background:var(--wa-surface) !important;
  border-top:1px solid var(--wa-line) !important;
  backdrop-filter:none !important;
  min-height:58px !important;
}
html[data-wa="dark"] .tabbar{ background:#111B21 !important; }
.tab{ color:var(--wa-text-3) !important; font-size:11px !important; }
.tab span{ font-size:11px !important; }
.tab.on{ color:var(--wa-accent) !important; }
.tab-badge{ background:var(--wa-badge) !important; color:#fff !important; }

/* ---------------- 9. 设置行 / 卡片（WhatsApp 设置观感） ---------------- */
.list{ background:var(--wa-surface) !important; }
.row-list{
  background:var(--wa-surface) !important;
  border:0 !important;
  border-radius:0 !important;
  margin:0 !important;
  overflow:hidden !important;
  box-shadow:0 1px 0 var(--wa-line) !important;
}
.row{
  padding:14px 16px !important;
  border-bottom:1px solid var(--wa-line) !important;
  background:var(--wa-surface) !important;
  transition:background-color .12s linear !important;
}
.row:active{ background:var(--wa-line-soft) !important; }
.row:last-child{ border-bottom:0 !important; }
.lab{ font-size:15.5px !important; color:var(--wa-text) !important; }
.val{ font-size:14px !important; color:var(--wa-text-2) !important; }
.chev{ color:var(--wa-text-3) !important; }
.ic{ color:var(--wa-icon) !important; }
.ric{ color:var(--wa-icon) !important; }
.sg-item{ background:var(--wa-surface) !important; }
.sg-item .ic{ color:var(--wa-icon) !important; }
.danger-row,.m-danger{ color:var(--wa-danger) !important; }
.note{ color:var(--wa-text-3) !important; font-size:12.5px !important; }
.sec-label{ text-transform:none !important; letter-spacing:0 !important; }

/* 个人资料页 */
.profile-hero{ background:var(--wa-surface) !important; border-bottom:1px solid var(--wa-line) !important; }
.hero-name{ font-size:19px !important; color:var(--wa-text) !important; font-weight:500 !important; }
.pxid,.qtxt,.ptip{ color:var(--wa-text-2) !important; }

/* ---------------- 10. 按钮 ---------------- */
.btn-p{
  background:var(--wa-accent) !important;
  background-image:none !important;
  color:#fff !important;
  border-radius:8px !important;
  font-size:15px !important; font-weight:500 !important;
  box-shadow:none !important;
  padding:12px !important;
}
.btn-p:active{ background:var(--wa-accent-2) !important; }
.btn-ghost{
  background:transparent !important;
  border:1px solid var(--wa-line) !important;
  color:var(--wa-accent) !important;
  border-radius:8px !important;
  font-size:15px !important;
  box-shadow:none !important;
}

/* ---------------- 11. 弹层：sheet / modal / toast ---------------- */
.overlay{ background:rgba(11,20,26,.32) !important; }
.sheet{
  background:var(--wa-surface) !important;
  border-radius:16px 16px 0 0 !important;
  border-top:0 !important;
  box-shadow:var(--wa-shadow-pop) !important;
  padding:8px 0 18px !important;
  max-height:86% !important;
}
.sheet::before{
  background:#D1D7DB !important;
  width:36px !important; height:4px !important;
  margin:8px auto 12px !important;
}
.sheet-title{
  font-size:15px !important; font-weight:500 !important;
  color:var(--wa-text) !important;
  padding:8px 16px !important;
}
.sheet-grid{ gap:0 !important; }
.sg-item{
  display:flex !important; align-items:center !important; gap:16px !important;
  padding:14px 16px !important;
  border-bottom:1px solid var(--wa-line) !important;
  font-size:15.5px !important; color:var(--wa-text) !important;
}
.sg-item:last-child{ border-bottom:0 !important; }
.sg-item:active{ background:var(--wa-line-soft) !important; }
.sg-item .ic{
  width:24px !important; text-align:center !important;
  color:var(--wa-accent) !important;
}

.modal{
  background:var(--wa-surface) !important;
  border-radius:12px !important;
  box-shadow:var(--wa-shadow-pop) !important;
  border:0 !important;
  padding:22px 22px 16px !important;
  max-width:340px !important;
}
.m-title{ font-size:17px !important; font-weight:500 !important; color:var(--wa-text) !important; }
.m-sub{ font-size:13.5px !important; color:var(--wa-text-2) !important; line-height:1.5 !important; }
.m-actions{ gap:10px !important; }
.m-ok{
  background:var(--wa-accent) !important; color:#fff !important;
  border-radius:8px !important; font-size:14.5px !important; font-weight:500 !important;
}
.m-cancel{
  background:transparent !important; color:var(--wa-accent) !important;
  border:1px solid var(--wa-line) !important; border-radius:8px !important;
  font-size:14.5px !important;
}
.m-danger{ background:var(--wa-danger) !important; color:#fff !important; border-radius:8px !important; }

.toast{
  background:#323739 !important;
  color:#E9EDEF !important;
  border-radius:8px !important;
  font-size:13.5px !important;
  box-shadow:var(--wa-shadow-pop) !important;
}
html[data-wa="dark"] .toast{ background:#233138 !important; }

/* 条款层 */
.legal-layer{ background:var(--wa-app) !important; }
.legal-hd{ background:var(--wa-surface) !important; border-bottom:1px solid var(--wa-line) !important; }
.legal-body{ color:var(--wa-text) !important; font-size:14.5px !important; line-height:1.6 !important; }

/* ---------------- 12. 引导页 ---------------- */
.onboard{ background:#FCF5EB !important; }
html[data-wa="dark"] .onboard{ background:#0B141A !important; }
.ob-title{ color:var(--wa-text) !important; font-size:21px !important; font-weight:500 !important; }
.ob-sub,.ob-tip{ color:var(--wa-text-2) !important; font-size:13px !important; }
.ob-demo{
  background:var(--wa-accent) !important; color:#fff !important;
  border-radius:8px !important; font-size:15px !important;
}
.ob-blank{
  background:transparent !important; color:var(--wa-accent) !important;
  border:1px solid var(--wa-line) !important; border-radius:8px !important;
}

/* ---------------- 13. 主题 / 背景选择器（保留功能，改观感） ---------------- */
.theme-grid,.sw-grid,.bg-grid{ background:transparent !important; }
.sw{
  border-radius:10px !important;
  border:2px solid transparent !important;
  box-shadow:0 0 0 1px var(--wa-line) !important;
}
.sw.on{ border-color:var(--wa-accent) !important; box-shadow:none !important; }
.bg-preview{ border-radius:10px !important; }

/* ---------------- 14. 动效（与 WhatsApp Web 同套节奏） ---------------- */
@keyframes wa-pop-in{ from{opacity:0;transform:translateY(6px) scale(.97)} to{opacity:1;transform:none} }
@keyframes wa-fade-in{ from{opacity:0} to{opacity:1} }
@keyframes wa-sheet-up{ from{transform:translateY(100%)} to{transform:translateY(0)} }
@keyframes wa-dot{ 0%,60%,100%{opacity:.4;transform:translateY(0)} 30%{opacity:1;transform:translateY(-2px)} }
@keyframes wa-push-in{ from{transform:translateX(100%)} to{transform:translateX(0)} }

.msg-row.fresh .bubble,
.bubble{ animation:wa-pop-in .22s cubic-bezier(.1,1,.36,1) both; }
.app.in-chat .chat{ animation:wa-push-in .3s cubic-bezier(.66,0,.34,1) both; }
.overlay.show .sheet{ animation:wa-sheet-up .28s cubic-bezier(.66,0,.34,1) both; }
.typing i{ animation:wa-dot 1.35s infinite !important; }
.typing i:nth-child(2){ animation-delay:.18s !important; }
.typing i:nth-child(3){ animation-delay:.36s !important; }
.tab,.icon-btn,.row,.ci{ transition:background-color .12s linear, color .15s ease !important; }

@media (prefers-reduced-motion:reduce){
  .msg-row.fresh .bubble,.bubble,.app.in-chat .chat,.overlay.show .sheet,.typing i{ animation:none !important; }
}


/* ==========================================================================
   第二遍：列表页头部 / 筛选 chips / 头像圆形 / 聊天壁纸 / 气泡时间
   （这些块在 app 里是 .hero + .tabs + .tab-pill，第一遍没覆盖到）
   ========================================================================== */

/* ---------- 列表页头部：WhatsApp 侧栏观感 ---------- */
.hero{
  background:var(--wa-surface) !important;
  padding:10px 12px 0 !important;
  border-bottom:1px solid var(--wa-line) !important;
}
.hero-top{
  display:flex !important; align-items:center !important; gap:12px !important;
  padding:2px 4px 10px !important;
}
.hero-top .av{
  width:40px !important; height:40px !important; border-radius:50% !important;
  background:#DFE5E7 !important; flex:none !important; position:relative !important;
}
.hero-top .av img{ width:100% !important; height:100% !important; object-fit:cover !important; border-radius:50% !important; }
.hero-name{
  font-size:16px !important; font-weight:600 !important; color:var(--wa-text) !important;
  line-height:1.25 !important;
}
.brand{ font-size:12.5px !important; color:var(--wa-text-2) !important; }
.online{
  margin-left:auto !important; display:flex !important; align-items:center !important; gap:6px !important;
  font-size:12px !important; color:var(--wa-accent) !important;
}
.online i{
  width:7px !important; height:7px !important; border-radius:50% !important;
  background:var(--wa-accent) !important; display:inline-block !important;
}
/* 头部的在线小绿点（头像右下） */
.hero-top .dot,.page-head .dot{
  position:absolute !important; right:-1px !important; bottom:-1px !important;
  width:11px !important; height:11px !important; border-radius:50% !important;
  background:var(--wa-badge) !important; border:2px solid var(--wa-surface) !important;
}

/* ---------- 搜索：WhatsApp 的圆角搜索条 ---------- */
.hero .search{
  background:var(--wa-line-soft) !important;
  border:0 !important; border-radius:9px !important;
  height:36px !important; padding:0 12px !important;
  display:flex !important; align-items:center !important; gap:8px !important;
  margin:0 2px 8px !important;
  color:var(--wa-text-3) !important;
}
.hero .search input{
  background:transparent !important; border:0 !important;
  color:var(--wa-text) !important; font-size:14.5px !important;
  box-shadow:none !important;
}
.hero .search input::placeholder{ color:var(--wa-text-3) !important; }

/* ---------- 筛选 chips（全部 / 好友 / 群组） ---------- */
.tabs{
  display:flex !important; gap:8px !important; align-items:center !important;
  padding:0 2px 10px !important;
}
.tab-pill{
  background:var(--wa-surface) !important;
  border:1px solid var(--wa-line) !important;
  border-radius:999px !important;
  padding:6px 13px !important;
  font-size:13.5px !important; color:var(--wa-text-2) !important;
  display:inline-flex !important; align-items:center !important; gap:6px !important;
  height:auto !important; line-height:1.2 !important;
  transition:background-color .15s ease, color .15s ease, border-color .15s ease !important;
}
.tab-pill.on{
  background:#E7FCE3 !important;
  border-color:transparent !important;
  color:#008069 !important;
}
html[data-wa="dark"] .tab-pill.on{ background:#103529 !important; color:#71EB85 !important; }
.tab-pill .cnt{
  min-width:17px !important; height:17px !important; padding:0 4px !important;
  border-radius:999px !important;
  background:var(--wa-line-soft) !important; color:var(--wa-text-2) !important;
  font-size:11px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important;
}
.tab-pill.on .cnt{ background:#D9FDD3 !important; color:#008069 !important; }

/* ---------- 头像统一圆形（内联 13px 圆角要压掉） ---------- */
.av{ border-radius:50% !important; overflow:hidden !important; }
.av img{ width:100% !important; height:100% !important; object-fit:cover !important; border-radius:50% !important; display:block !important; }
.msg-row .av{ width:28px !important; height:28px !important; }

/* ---------- 聊天壁纸：压掉用户自定义背景，换成 WhatsApp 壁纸 ---------- */
.chat-bg{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><g fill='none' stroke='%23E3DACC' stroke-width='1.6' stroke-linecap='round'><path d='M20 28c6 0 6 8 12 8'/><circle cx='48' cy='22' r='5'/><path d='M76 18v10M82 23H70'/><path d='M104 32l8 8M112 32l-8 8'/><path d='M16 66a10 10 0 0 1 10-10'/><path d='M44 58c4-4 10-4 14 0s-4 10-8 12'/><circle cx='90' cy='62' r='6'/><path d='M112 70l6 6'/><path d='M24 104c0-6 5-10 11-10s11 4 11 10'/><path d='M66 96v12M72 100l8-8'/><path d='M98 100a8 8 0 1 1 16 0 8 8 0 0 1-16 0z'/></g></svg>") !important;
  background-size:auto !important;
  background-repeat:repeat !important;
  background-position:top left !important;
  background-color:var(--wa-wall) !important;
  opacity:1 !important;
  filter:none !important;
}
html[data-wa="dark"] .chat-bg{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><g fill='none' stroke='%231B2A33' stroke-width='1.6' stroke-linecap='round'><path d='M20 28c6 0 6 8 12 8'/><circle cx='48' cy='22' r='5'/><path d='M76 18v10M82 23H70'/><path d='M104 32l8 8M112 32l-8 8'/><path d='M16 66a10 10 0 0 1 10-10'/><path d='M44 58c4-4 10-4 14 0s-4 10-8 12'/><circle cx='90' cy='62' r='6'/><path d='M112 70l6 6'/><path d='M24 104c0-6 5-10 11-10s11 4 11 10'/><path d='M66 96v12M72 100l8-8'/><path d='M98 100a8 8 0 1 1 16 0 8 8 0 0 1-16 0z'/></g></svg>") !important;
  background-color:var(--wa-wall) !important;
}
.chat-body{ background:transparent !important; background-image:none !important; }

/* ---------- 气泡内的时间（把 .mtime 拉进气泡右下角） ---------- */
.msg-col{ position:relative !important; display:flex !important; flex-direction:column !important; }
.msg-col .bubble{ padding-bottom:8px !important; padding-right:9px !important; }
.msg-col .mtime{
  align-self:flex-end !important;
  margin:-17px 9px 0 0 !important;
  padding:0 !important;
  font-size:11px !important; line-height:1 !important;
  color:var(--wa-tick) !important;
  pointer-events:none !important;
  z-index:2 !important;
}
.msg-row.me .msg-col .mtime{ color:#667781 !important; }
html[data-wa="dark"] .msg-row.me .msg-col .mtime{ color:rgba(233,237,239,.6) !important; }
.msg-row .bubble{ padding-right:12px !important; }

/* ---------- 输入区：WhatsApp 的白色输入条 ---------- */
.chat-input{
  display:flex !important; align-items:flex-end !important; gap:8px !important;
  padding:6px 8px 8px !important;
  background:var(--wa-surface) !important;
  border-top:0 !important;
}
.chat-input .ci-text{
  flex:1 !important;
  background:var(--wa-surface) !important;
  border:0 !important;
  border-radius:8px !important;
  box-shadow:var(--wa-shadow-bubble) !important;
  color:var(--wa-text) !important;
  font-size:15px !important;
  line-height:20px !important;
  padding:9px 12px !important;
  max-height:110px !important;
  min-height:38px !important;
}
html[data-wa="dark"] .chat-input .ci-text{ background:#2A3942 !important; }
.chat-input .ci-text::placeholder{ color:var(--wa-text-3) !important; }
.chat-input .ci-plus,.chat-input .ci-emoji,.chat-input .ci-voice,.chat-input .ci-send{
  width:38px !important; height:38px !important; flex:none !important;
  border:0 !important; background:transparent !important;
  color:var(--wa-icon) !important; border-radius:50% !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
}
.chat-input .ci-send.on{ color:var(--wa-accent) !important; }
.chat-input .ci-send.off{ color:var(--wa-text-3) !important; opacity:1 !important; }

/* ---------- 顶部返回 + 会话头 ---------- */
.chat > .page-head .av{ border-radius:50% !important; }
.chat > .page-head .hero-name{ font-size:16px !important; font-weight:500 !important; }
.chat > .page-head .ghead-sub{ font-size:12px !important; color:var(--wa-text-2) !important; }
.spacer{ flex:1 !important; }

/* ---------- 日期胶囊 ---------- */
.day-div{
  align-self:center !important;
  background:var(--wa-surface) !important;
  color:var(--wa-text-2) !important;
  font-size:12.5px !important;
  padding:5px 12px !important;
  border-radius:7.5px !important;
  box-shadow:var(--wa-shadow-bubble) !important;
  margin:8px auto !important;
}
html[data-wa="dark"] .day-div{ background:#182229 !important; color:#8696A0 !important; }


/* ==========================================================================
   第三遍：细节修正（chips 不贴边 / 会话行分隔线 / 搜索图标间距）
   ========================================================================== */
.tabs{
  overflow-x:auto !important; overflow-y:hidden !important;
  padding-right:12px !important;
  scrollbar-width:none !important;
  -webkit-overflow-scrolling:touch !important;
}
.tabs::-webkit-scrollbar{ display:none !important; }
.hero .search svg{ flex:none !important; margin-right:2px !important; }
.hero .search input{ padding-left:0 !important; }

/* 会话行分隔线：与 WhatsApp 一样从头像右侧开始 */
.ci{ position:relative !important; border-bottom:0 !important; }
.ci::after{
  content:"" !important;
  position:absolute !important; left:76px !important; right:0 !important; bottom:0 !important;
  height:1px !important; background:var(--wa-line) !important;
}
.msg-row .av::after{ content:none !important; }
.ci-wrap:last-child .ci::after{ display:none !important; }


/* ==========================================================================
   第四遍：日期胶囊 / 气泡内时间与勾 / 系统提示 / 尾巴微调
   ========================================================================== */
.day-div{
  width:fit-content !important;
  margin:8px auto !important;
  align-self:center !important;
  font-size:12.5px !important;
  padding:5px 12px !important;
  border-radius:7.5px !important;
  background:var(--wa-surface) !important;
  color:var(--wa-text-2) !important;
  box-shadow:var(--wa-shadow-bubble) !important;
}

/* 气泡给右下角时间留位置 */
.msg-col .bubble{ padding-bottom:18px !important; }
.msg-col .mtime{
  margin:-15px 10px 2px 0 !important;
  font-size:11px !important;
  line-height:1 !important;
  color:var(--wa-tick) !important;
}
html[data-wa="dark"] .msg-col .mtime{ color:rgba(233,237,239,.62) !important; }

/* “已读/未读”文字换成 WhatsApp 的双勾 */
.msg-readst{
  display:inline-block !important;
  font-size:0 !important;
  line-height:1 !important;
  margin-left:4px !important;
  letter-spacing:0 !important;
}
.msg-readst::after{
  content:"\2713\2713" !important;
  font-size:12px !important;
  letter-spacing:-4px !important;
  font-weight:400 !important;
}
.msg-readst.on{ color:var(--wa-tick-read) !important; }
.msg-readst:not(.on){ color:var(--wa-tick) !important; }
.msg-row.me .msg-readst{ color:var(--wa-tick) !important; }
.msg-row.me .msg-readst.on{ color:var(--wa-tick-read) !important; }

/* 系统提示（“无效的好友”这类）做成 WhatsApp 的小胶囊 */
.note{
  width:fit-content !important;
  margin:8px auto !important;
  padding:5px 12px !important;
  border-radius:7.5px !important;
  background:var(--wa-surface) !important;
  color:var(--wa-text-2) !important;
  font-size:12.5px !important;
  box-shadow:var(--wa-shadow-bubble) !important;
  text-align:center !important;
}
html[data-wa="dark"] .note{ background:#182229 !important; color:#8696A0 !important; }

/* 尾巴收一点，更接近 WhatsApp 的小三角 */
.msg-row .bubble::before{ height:11px !important; width:7px !important; }
.msg-row.them .bubble::before{ left:-7px !important; }
.msg-row.me .bubble::before{ right:-7px !important; }


/* ==========================================================================
   第五遍：入站消息不显示勾、单聊不显示对方头像（WhatsApp 实际行为）
   ========================================================================== */
.msg-row.them .msg-readst{ display:none !important; }
.msg-row.them:not(.gmsg) .av{ display:none !important; }
.msg-row.them:not(.gmsg) .msg-col{ max-width:calc(78% + 34px) !important; }
.msg-col .bubble{ padding-left:10px !important; }
.msg-row.them .bubble::before{ left:-6px !important; }
.msg-row.me .bubble::before{ right:-6px !important; }


/* ==========================================================================
   第六遍：设置页图标去色块、行标题字重、登录页 Logo 图形
   ========================================================================== */
.ric,.ic,.ico{
  background:transparent !important;
  color:var(--wa-icon) !important;
  border-radius:0 !important;
  width:24px !important; height:24px !important;
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
}
.ric svg,.ic svg{ color:inherit !important; stroke:currentColor !important; }

/* 行标题（内联 16px/700 压成 WhatsApp 的 15.5px/400） */
.row > div:nth-child(2) > div:first-child{
  font-size:15.5px !important;
  font-weight:400 !important;
  color:var(--wa-text) !important;
}
.row > div:nth-child(2) > div:last-child{
  font-size:12.5px !important;
  color:var(--wa-text-2) !important;
}
.row .av{ width:56px !important; height:56px !important; }

/* 登录页 Logo：绿色圆里放一个聊天气泡 */
.auth-logo{
  background:var(--wa-accent) !important;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M12 3.2C7.2 3.2 3.4 6.8 3.4 11.2c0 2.4 1.2 4.5 3.1 6L6 21l4-1.7c.6.1 1.3.2 2 .2 4.8 0 8.6-3.6 8.6-8.3S16.8 3.2 12 3.2z'/></svg>") !important;
  background-size:62% !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
}


/* ==========================================================================
   第七遍：接上 app 自己的夜间模式开关（body[data-mode="dark"]）
   —— app 用 body 属性切深色，之前只认 html[data-wa]，所以点“深色”没反应
   ========================================================================== */
body[data-mode="dark"]{
  --wa-text:#E9EDEF; --wa-text-2:#8696A0; --wa-text-3:#8696A0; --wa-icon:#AEBAC1;
  --wa-line:#222D34; --wa-line-soft:#182229; --wa-surface:#111B21; --wa-app:#0B141A;
  --wa-wall:#0B141A; --wa-in:#202C33; --wa-out:#005C4B;
  --wa-tick:#8696A0; --wa-tick-read:#53BDEB;
  --wa-shadow-bubble:0 1px .5px rgba(0,0,0,.35);
  --wa-shadow-pop:0 4px 14px rgba(0,0,0,.5);
  --tx:var(--wa-text); --tx2:var(--wa-text-2); --tx3:var(--wa-text-3);
  --line:var(--wa-line); --card:var(--wa-surface); --card2:var(--wa-surface);
  --bg-base:var(--wa-app); --tabbar-bg:var(--wa-surface);
  --bubble-them:var(--wa-in); --bubble-them-line:rgba(255,255,255,.06);
  background:var(--wa-app) !important; color:var(--wa-text) !important;
}
body[data-mode="dark"] .hero,
body[data-mode="dark"] .page-head,
body[data-mode="dark"] .tabbar,
body[data-mode="dark"] .chat-input,
body[data-mode="dark"] .list,
body[data-mode="dark"] .row,
body[data-mode="dark"] .row-list,
body[data-mode="dark"] .sheet,
body[data-mode="dark"] .modal,
body[data-mode="dark"] .legal-hd,
body[data-mode="dark"] .profile-hero,
body[data-mode="dark"] .phone{ background:var(--wa-surface) !important; }
body[data-mode="dark"] .chat-bg{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><g fill='none' stroke='%231B2A33' stroke-width='1.6' stroke-linecap='round'><path d='M20 28c6 0 6 8 12 8'/><circle cx='48' cy='22' r='5'/><path d='M76 18v10M82 23H70'/><path d='M104 32l8 8M112 32l-8 8'/><path d='M16 66a10 10 0 0 1 10-10'/><path d='M44 58c4-4 10-4 14 0s-4 10-8 12'/><circle cx='90' cy='62' r='6'/><path d='M112 70l6 6'/><path d='M24 104c0-6 5-10 11-10s11 4 11 10'/><path d='M66 96v12M72 100l8-8'/><path d='M98 100a8 8 0 1 1 16 0 8 8 0 0 1-16 0z'/></g></svg>") !important;
  background-color:var(--wa-wall) !important;
}
body[data-mode="dark"] .chat-input .ci-text{ background:#2A3942 !important; }
body[data-mode="dark"] .tab-pill.on{ background:#103529 !important; color:#71EB85 !important; }
body[data-mode="dark"] .day-div,
body[data-mode="dark"] .note{ background:#182229 !important; color:#8696A0 !important; }
body[data-mode="dark"] .toast{ background:#233138 !important; }
body[data-mode="dark"] .msg-col .mtime{ color:rgba(233,237,239,.62) !important; }
body[data-mode="dark"] .av{ background:#2A3942 !important; color:#AEBAC1 !important; }
body[data-mode="dark"] .icon-btn:hover{ background:rgba(255,255,255,.06) !important; }
body[data-mode="dark"] .auth,
body[data-mode="dark"] .onboard{ background:#0B141A !important; }


/* 搜索框去掉 app 自带的主色光晕 */
.hero .search,.hero .search input{ box-shadow:none !important; }


/* 双勾尺寸调准（WhatsApp 约 16–18px 宽） */
.msg-readst::after{ font-size:13px !important; letter-spacing:-2px !important; }
.msg-readst{ margin-left:5px !important; }
.msg-col .bubble{ padding-right:11px !important; }


/* ==========================================================================
   第八遍：去掉任何"黑框"来源 —— 页面底色钉死、手机容器不再有描边/阴影、
   移动端满幅、桌面端只有一条浅灰细边（WhatsApp 窗口感）
   ========================================================================== */
html{ background:#F0F2F5 !important; }
html[data-wa="dark"]{ background:#0B141A !important; }
body{ background:#F0F2F5 !important; background-image:none !important; }
body[data-mode="dark"]{ background:#0B141A !important; }
.stage,.auth-open{ background:transparent !important; }
.phone-cap,.statusbar,.homebar{ display:none !important; }

/* 移动端：满幅、无边框、无阴影 */
.phone{
  box-shadow:none !important;
  border:0 !important;
  outline:0 !important;
  border-radius:0 !important;
}
/* 桌面端：只留一条 1px 浅灰细边，像 WhatsApp 的窗口边框 */
@media (min-width:520px){
  .phone{
    border:1px solid #E9EDEF !important;
    border-radius:8px !important;
    box-shadow:0 1px 3px rgba(11,20,26,.06) !important;
  }
  html[data-wa="dark"] .phone,
  body[data-mode="dark"] .phone{ border-color:#222D34 !important; }
}


/* body 也带 .auth-open 类，上一段 .auth-open{transparent!important} 会把它刷成透明
   → 这里用更高优先级钉死页面底色（黑框的根源就是这个） */
body.auth-open{ background:#F0F2F5 !important; background-image:none !important; }
body.auth-open[data-mode="dark"]{ background:#0B141A !important; }
html[data-wa="dark"] body.auth-open{ background:#0B141A !important; }


/* ==========================================================================
   第九遍：任何宽度都不留"框"；深色模式设置页用字面色压住白底
   ========================================================================== */
.phone{
  border:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
}
@media (min-width:520px){
  .phone{ border:0 !important; box-shadow:none !important; border-radius:0 !important; }
}

/* 深色：设置页/列表行 */
body[data-mode="dark"] .row,
body[data-mode="dark"] .row-list,
body[data-mode="dark"] .list,
body[data-mode="dark"] .cells,
body[data-mode="dark"] .sg-item,
body[data-mode="dark"] .profile-hero,
body[data-mode="dark"] .page-head,
body[data-mode="dark"] .hero,
body[data-mode="dark"] .tabbar,
body[data-mode="dark"] .chat-input{
  background:#111B21 !important;
}
body[data-mode="dark"] .lab,
body[data-mode="dark"] .page-title,
body[data-mode="dark"] .hero-name{ color:#E9EDEF !important; }
body[data-mode="dark"] .val,
body[data-mode="dark"] .note,
body[data-mode="dark"] .brand{ color:#8696A0 !important; }
body[data-mode="dark"] .row,
body[data-mode="dark"] .ci::after{ border-color:#222D34 !important; }
body[data-mode="dark"] .row > div:nth-child(2) > div:first-child{ color:#E9EDEF !important; }
body[data-mode="dark"] .row > div:nth-child(2) > div:last-child{ color:#8696A0 !important; }
body[data-mode="dark"] .chev,body[data-mode="dark"] .ic,body[data-mode="dark"] .ric{ color:#AEBAC1 !important; }


/* 深色：与 body[data-mode] 等价的一套（html[data-wa] 手动可控，方便外部/嵌入切换） */
html[data-wa="dark"] .row,
html[data-wa="dark"] .row-list,
html[data-wa="dark"] .list,
html[data-wa="dark"] .cells,
html[data-wa="dark"] .sg-item,
html[data-wa="dark"] .profile-hero,
html[data-wa="dark"] .hero,
html[data-wa="dark"] .page-head,
html[data-wa="dark"] .tabbar,
html[data-wa="dark"] .chat-input,
html[data-wa="dark"] .phone{ background:#111B21 !important; }
html[data-wa="dark"] .lab,
html[data-wa="dark"] .page-title,
html[data-wa="dark"] .hero-name,
html[data-wa="dark"] .row > div:nth-child(2) > div:first-child{ color:#E9EDEF !important; }
html[data-wa="dark"] .val,
html[data-wa="dark"] .note,
html[data-wa="dark"] .brand,
html[data-wa="dark"] .row > div:nth-child(2) > div:last-child{ color:#8696A0 !important; }
html[data-wa="dark"] .chev,html[data-wa="dark"] .ic,html[data-wa="dark"] .ric{ color:#AEBAC1 !important; }
html[data-wa="dark"] .row,html[data-wa="dark"] .ci::after{ border-color:#222D34 !important; }


/* 设置页分隔线（app 把 .row 的底边写成 0，这里按 WhatsApp 补回来） */
.row-list .row:not(:last-child){ border-bottom:1px solid var(--wa-line) !important; }
html[data-wa="dark"] .row-list .row:not(:last-child),
body[data-mode="dark"] .row-list .row:not(:last-child){ border-bottom-color:#222D34 !important; }

/* 深色搜索框用 WhatsApp 的 #202C33 */
html[data-wa="dark"] .hero .search,
body[data-mode="dark"] .hero .search{ background:#202C33 !important; }


/* 会话行 hover/按下：深色下用 #202C33，浅色下 #F0F2F5（之前会被 .ci-wrap 的白底盖住） */
.ci:hover,.ci:active,.ci-wrap:hover .ci{ background:var(--wa-line-soft) !important; }
html[data-wa="dark"] .ci:hover,html[data-wa="dark"] .ci:active,
body[data-mode="dark"] .ci:hover,body[data-mode="dark"] .ci:active{ background:#202C33 !important; }
.ci-wrap{ background:var(--wa-surface) !important; }
html[data-wa="dark"] .ci-wrap,body[data-mode="dark"] .ci-wrap{ background:#111B21 !important; }


/* ==========================================================================
   第十遍：壁纸密度、气泡尾巴、行距微调（贴 WhatsApp 的观感）
   ========================================================================== */
.chat-bg{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'><g fill='none' stroke='%23E9E2D6' stroke-width='1.15' stroke-linecap='round'><path d='M12 16c4 0 4 6 8 6'/><circle cx='34' cy='12' r='3.4'/><path d='M54 10v7M57.5 13.5h-7'/><path d='M76 20l5 5M81 20l-5 5'/><path d='M10 44a7 7 0 0 1 7-7'/><path d='M32 38c3-3 7-3 10 0s-3 7-6 8'/><circle cx='64' cy='42' r='4'/><path d='M80 48l4 4'/><path d='M16 72c0-4 3.5-7 7.5-7s7.5 3 7.5 7'/><path d='M46 66v8M50 69l5-5'/><path d='M70 69a5.5 5.5 0 1 1 11 0 5.5 5.5 0 0 1-11 0z'/></g></svg>") !important;
  background-size:auto !important;
  background-repeat:repeat !important;
}
html[data-wa="dark"] .chat-bg,
body[data-mode="dark"] .chat-bg{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'><g fill='none' stroke='%231A2830' stroke-width='1.15' stroke-linecap='round'><path d='M12 16c4 0 4 6 8 6'/><circle cx='34' cy='12' r='3.4'/><path d='M54 10v7M57.5 13.5h-7'/><path d='M76 20l5 5M81 20l-5 5'/><path d='M10 44a7 7 0 0 1 7-7'/><path d='M32 38c3-3 7-3 10 0s-3 7-6 8'/><circle cx='64' cy='42' r='4'/><path d='M80 48l4 4'/><path d='M16 72c0-4 3.5-7 7.5-7s7.5 3 7.5 7'/><path d='M46 66v8M50 69l5-5'/><path d='M70 69a5.5 5.5 0 1 1 11 0 5.5 5.5 0 0 1-11 0z'/></g></svg>") !important;
}

/* 气泡尾巴：改用圆角三角，边缘更柔和 */
.msg-row .bubble::before{
  width:8px !important;
  height:12px !important;
  border-radius:0 2px 0 0 !important;
}
.msg-row.them .bubble::before{
  left:-8px !important;
  clip-path:polygon(100% 0,100% 100%,0 0) !important;
  border-top-left-radius:2px !important;
}
.msg-row.me .bubble::before{
  right:-8px !important;
  clip-path:polygon(0 0,0 100%,100% 0) !important;
  border-top-right-radius:2px !important;
}

/* 消息间距与气泡内边距（WhatsApp Web: 2px 间距 / 6px 9px 8px） */
.msg-row{ margin:1.5px 0 !important; }
.msg-col .bubble{ padding:6px 9px 18px 9px !important; }


/* ==========================================================================
   第十一遍：悬停时出现的"黑边"
   原因：会话行上下各有一条分隔线（.ci-wrap 的 border-bottom + .ci::after），
        悬停底色一出来，两条 1px 线就被衬成"框"；再叠加浏览器对可点元素的
        默认 focus 描边，就成了黑边。做法：只留一条极淡分隔线 + 干掉 focus 描边。
   ========================================================================== */
.ci-wrap{ border-bottom:0 !important; }
.ci::after{
  height:1px !important;
  background:#F5F5F5 !important;      /* WhatsApp 的分隔线在白底上几乎看不见 */
}
html[data-wa="dark"] .ci::after,
body[data-mode="dark"] .ci::after{ background:#1B262D !important; }

/* 悬停底色不要再带出任何描边/阴影/外框 */
.ci, .ci:hover, .ci:active, .ci:focus,
.ci-wrap:hover, .ci-wrap:focus-within{
  outline:0 !important;
  box-shadow:none !important;
  border:0 !important;
}
.row, .row:hover, .row:active, .row:focus,
.tab-pill, .tab-pill:hover, .tab-pill:focus,
.icon-btn, .icon-btn:hover, .icon-btn:focus,
.tab, .tab:hover, .tab:focus,
.sg-item, .sg-item:hover, .sg-item:focus,
.msg-row, .msg-row:hover,
.hero, .page-head, .search, .search:hover{
  outline:0 !important;
  outline-offset:0 !important;
}
/* 只保留这些元素该有的阴影，别被上面整条清掉 */
.search:focus-within{ box-shadow:0 0 0 3px #D9FDD3 !important; border:0 !important; }
html[data-wa="dark"] .search:focus-within,
body[data-mode="dark"] .search:focus-within{ box-shadow:0 0 0 3px #103529 !important; }

/* 悬停底色统一成 WhatsApp 的 #F0F2F5（深色 #202C33） */
.ci:hover, .ci:active{ background:#F0F2F5 !important; }
html[data-wa="dark"] .ci:hover, html[data-wa="dark"] .ci:active,
body[data-mode="dark"] .ci:hover, body[data-mode="dark"] .ci:active{ background:#202C33 !important; }


/* 悬停时行内分隔线一并隐藏（WhatsApp 也是悬停行没有下划线） */
.ci:hover::after, .ci:active::after, .ci:focus::after{ opacity:0 !important; }
.ci:focus-visible, .row:focus-visible, .tab-pill:focus-visible, .icon-btn:focus-visible,
.tab:focus-visible, .sg-item:focus-visible{ outline:none !important; }
/* 行内子元素一律不允许带出描边/阴影 */
.ci *, .ci-wrap *, .row *, .tab-pill *, .sg-item *{ box-shadow:none !important; }
.ci *:focus, .row *:focus{ outline:none !important; }


/* ==========================================================================
   第十二遍：滚动条也会被看成"黑边"（悬停/滚动时才出现）
   WhatsApp 是隐藏式细滚动条，这里统一压成浅色细条
   ========================================================================== */
.list,.chat-body,.vscroll,.sheet,.legal-body,.row-list{
  scrollbar-width:thin !important;
  scrollbar-color:#C4C9CC transparent !important;
}
.list::-webkit-scrollbar,.chat-body::-webkit-scrollbar,.vscroll::-webkit-scrollbar,
.sheet::-webkit-scrollbar,.legal-body::-webkit-scrollbar{ width:6px !important; height:6px !important; }
.list::-webkit-scrollbar-track,.chat-body::-webkit-scrollbar-track,
.vscroll::-webkit-scrollbar-track,.sheet::-webkit-scrollbar-track{ background:transparent !important; }
.list::-webkit-scrollbar-thumb,.chat-body::-webkit-scrollbar-thumb,
.vscroll::-webkit-scrollbar-thumb,.sheet::-webkit-scrollbar-thumb{
  background:rgba(11,20,26,.18) !important;
  border-radius:3px !important;
  border:0 !important;
}
html[data-wa="dark"] .list,html[data-wa="dark"] .chat-body,html[data-wa="dark"] .vscroll,
body[data-mode="dark"] .list,body[data-mode="dark"] .chat-body,body[data-mode="dark"] .vscroll{
  scrollbar-color:#374248 transparent !important;
}
html[data-wa="dark"] .list::-webkit-scrollbar-thumb,
html[data-wa="dark"] .chat-body::-webkit-scrollbar-thumb,
body[data-mode="dark"] .list::-webkit-scrollbar-thumb,
body[data-mode="dark"] .chat-body::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.18) !important; }
::-webkit-scrollbar-corner{ background:transparent !important; }


/* ==========================================================================
   第十三遍：真正的"黑边"来源找到了 —— 会话行内部两个 .ci-row 带着白底，
   悬停时父行变灰、子行仍是白条，交界处就成了一圈深色/白色硬边。
   把行内子元素全部改成透明，让底色只由 .ci 一层负责。
   ========================================================================== */
.ci-row{ background:transparent !important; }
.ci-main{ background:transparent !important; }
.ci-text,.ci-name,.ci-prev,.ci-time,.ci-actions,.ci-emoji,.ci-send,.ci-plus{ background:transparent !important; }
.ci-row, .ci-main, .ci-text{ transition:background-color .12s linear !important; }

/* 设置行同理：行内不要有自带白底 */
.row > div{ background:transparent !important; }


/* ==========================================================================
   第十四遍：把 app 残留的"老品牌色"换成 WhatsApp 的（逐页扫描出来的）
   残留色：#2FDC9A（旧薄荷绿）、#939BA9（旧灰）、#052E20（深绿文字）
   ========================================================================== */

/* 在线点：WhatsApp 的 #25D366 + 白描边 */
.dot{
  background:#25D366 !important;
  border:2px solid var(--wa-surface) !important;
  box-shadow:none !important;
}
html[data-wa="dark"] .dot,body[data-mode="dark"] .dot{ border-color:#111B21 !important; }

/* 次级文字统一到 #8696A0 */
.dev-sub,.about-ver,.friend-card-status,.sec-label,.note,.empty,
.friend-card-bio,.pxid,.qtxt,.ptip,.dev-row,.legal-body,.ob-tip{
  color:var(--wa-text-3) !important;
}
.dev-badge{
  background:#E7FCE3 !important;
  color:#008069 !important;
  border:0 !important;
  border-radius:999px !important;
  font-size:11.5px !important;
  padding:3px 10px !important;
}
html[data-wa="dark"] .dev-badge,body[data-mode="dark"] .dev-badge{ background:#103529 !important; color:#71EB85 !important; }

/* 选中态的对勾/圆点用品牌绿 */
.mark,.ck,.sw.on::after,.bg-item.on .ck{
  background:#00A884 !important;
  color:#fff !important;
  border:0 !important;
}

/* 外观页预览：做成 WhatsApp 的对话预览 */
.preview{
  background:var(--wa-wall) !important;
  border:0 !important;
  border-radius:12px !important;
  padding:14px !important;
  box-shadow:0 1px 3px rgba(11,20,26,.08) !important;
}
.pv-b{
  border-radius:7.5px !important;
  font-size:13px !important;
  color:#111B21 !important;
  box-shadow:0 1px .5px rgba(11,20,26,.13) !important;
}
.pv-b.them{ background:#FFFFFF !important; border-top-left-radius:0 !important; }
.pv-b.me{ background:#D9FDD3 !important; border-top-right-radius:0 !important; }
html[data-wa="dark"] .pv-b.them{ background:#202C33 !important; color:#E9EDEF !important; }
html[data-wa="dark"] .pv-b.me{ background:#005C4B !important; color:#E9EDEF !important; }

/* 主题色圆点：做成 WhatsApp 的圆形色板 */
.sw-grid{ display:flex !important; flex-wrap:wrap !important; gap:14px !important; padding:6px 22px 18px !important; }
.sw{
  width:38px !important; height:38px !important;
  border-radius:50% !important;
  border:0 !important;
  position:relative !important;
  box-shadow:0 0 0 1px rgba(11,20,26,.10) !important;
}
.sw.on{ box-shadow:0 0 0 2px #00A884 !important; }
.sw.on::after{
  content:"\2713" !important;
  position:absolute !important; inset:0 !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  color:#fff !important; font-size:16px !important; font-weight:700 !important;
  text-shadow:0 1px 2px rgba(0,0,0,.25) !important;
}

/* 分段控件（外观/好友申请）做成 WhatsApp 的 pill */
.seg{ display:flex !important; gap:8px !important; padding:0 16px !important; margin:10px 0 6px !important; }
.seg button{
  flex:1 !important; height:36px !important;
  border:1px solid var(--wa-line) !important;
  border-radius:999px !important;
  background:transparent !important;
  color:var(--wa-text-2) !important;
  font-size:13.5px !important;
}
.seg button.on{
  background:#E7FCE3 !important;
  border-color:transparent !important;
  color:#008069 !important;
  font-weight:500 !important;
}
html[data-wa="dark"] .seg button.on,body[data-mode="dark"] .seg button.on{ background:#103529 !important; color:#71EB85 !important; }

/* 聊天背景选择格子 */
.bg-grid{ gap:12px !important; padding:0 16px !important; }
.bg-preview{ border-radius:10px !important; box-shadow:0 0 0 1px var(--wa-line) !important; }


/* 好友申请的"同意/拒绝"按钮：去掉内联白底，改成 WhatsApp 的文字按钮 */
[data-act="fr-agree"]{
  background:transparent !important;
  color:#00A884 !important;
  border:0 !important;
  font-size:14px !important;
  font-weight:500 !important;
  padding:6px 8px !important;
}
[data-act="fr-refuse"]{
  background:transparent !important;
  color:#EA0038 !important;
  border:0 !important;
  font-size:14px !important;
  font-weight:400 !important;
  padding:6px 8px !important;
}
.ci-actions{ display:flex !important; align-items:center !important; gap:2px !important; }
.ci-actions .ci-badge{ min-width:auto !important; height:auto !important; border-radius:6px !important; }


/* 好友申请计数：WhatsApp 用绿色角标，不用红色 */
b[style*="--danger"]{
  background:#25D366 !important;
  color:#fff !important;
  border-radius:999px !important;
  min-width:20px !important;
  height:20px !important;
  line-height:20px !important;
  font-size:11.5px !important;
  font-weight:600 !important;
  padding:0 6px !important;
  display:inline-block !important;
  text-align:center !important;
}


/* ==========================================================================
   第十五遍：三处用户反馈
   ① 双勾改用 WhatsApp 的实心双勾形状（原来是两个字符 ✓✓，字形不对）
   ② 聊天背景：大预览和选择格子之间没有间距，黏在一起
   ③ 群聊操作弹层：原来是 4 列图标网格，改成 WhatsApp 的纵向操作列表
   ========================================================================== */

/* ① 双勾：用 SVG 蒙版画出 WhatsApp 的形状，颜色跟随 currentColor */
.msg-readst{ font-size:0 !important; }
.msg-readst::after{
  content:"" !important;
  display:inline-block !important;
  width:16px !important;
  height:11px !important;
  background-color:currentColor !important;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'><g fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'><path d='M1.4 6.5 4.6 9.7 12.2 2'/><path d='M7 6.5 10.2 9.7 17.4 2'/></g></svg>") center/contain no-repeat !important;
  mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'><g fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'><path d='M1.4 6.5 4.6 9.7 12.2 2'/><path d='M7 6.5 10.2 9.7 17.4 2'/></g></svg>") center/contain no-repeat !important;
  vertical-align:-1px !important;
}
.msg-readst.on{ color:#53BDEB !important; }
.msg-readst:not(.on){ color:#8696A0 !important; }

/* ② 聊天背景：预览与格子之间留间距，格子固定 3 列不溢出 */
.bg-preview{
  margin:12px 16px 18px !important;
  border-radius:12px !important;
  box-shadow:0 0 0 1px var(--wa-line) !important;
}
.bg-grid{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:12px !important;
  padding:0 16px 20px !important;
}
.bg-item,.bg-preview{ overflow:hidden !important; }
.bg-item{
  border-radius:12px !important;
  box-shadow:0 0 0 1px var(--wa-line) !important;
  aspect-ratio:1 / 1 !important;
  position:relative !important;
}
.bg-item.on{ box-shadow:0 0 0 2px #00A884 !important; }
.bg-item .nm{
  position:absolute !important; left:8px !important; bottom:8px !important;
  font-size:12px !important; color:#fff !important;
  background:rgba(11,20,26,.55) !important;
  padding:2px 8px !important; border-radius:999px !important;
  backdrop-filter:blur(4px) !important;
}

/* ③ 弹出层：纵向操作列表（WhatsApp 的动作面板） */
.sheet{ padding:6px 0 calc(10px + env(safe-area-inset-bottom,0px)) !important; }
.sheet-title{
  text-align:left !important;
  padding:14px 22px 10px !important;
  font-size:13.5px !important;
  color:var(--wa-text-2) !important;
  font-weight:500 !important;
}
.sheet .sheet-grid{
  display:block !important;
  padding:0 !important;
}
.sheet .sg-item{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:22px !important;
  height:52px !important;
  padding:0 22px !important;
  border-bottom:1px solid var(--wa-line) !important;
  font-size:15.5px !important;
  color:var(--wa-text) !important;
  background:transparent !important;
}
.sheet .sg-item:last-child{ border-bottom:0 !important; }
.sheet .sg-item:active{ background:var(--wa-line-soft) !important; }
.sheet .sg-item .ic{
  width:22px !important; height:22px !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  color:var(--wa-icon) !important;
  background:transparent !important;
  border-radius:0 !important;
  flex:none !important;
}
.sheet .sg-item .ic svg{ width:22px !important; height:22px !important; }
/* 退出群聊 / 删除类动作标红 */
[data-act="group-quit"],[data-act="friend-del"],[data-act="logout"],[data-act="chat-clear"]{ color:#EA0038 !important; }
[data-act="group-quit"] .ic,[data-act="friend-del"] .ic,[data-act="logout"] .ic,[data-act="chat-clear"] .ic{ color:#EA0038 !important; }
html[data-wa="dark"] .sheet .sg-item,body[data-mode="dark"] .sheet .sg-item{ border-color:#222D34 !important; }


/* ==========================================================================
   第十六遍：媒体消息（图片 / 语音 / 文件）按 WhatsApp 的样子排版
   ========================================================================== */
.bubble.media{ padding:3px !important; overflow:hidden !important; }
.msg-img{
  display:block !important;
  width:auto !important; max-width:236px !important;
  max-height:280px !important; min-width:120px !important; min-height:80px !important;
  border-radius:5px !important;
  object-fit:cover !important;
  background:#E9EDEF !important;
}
html[data-wa="dark"] .msg-img,body[data-mode="dark"] .msg-img{ background:#2A3942 !important; }
.bubble.media .mtime{ margin-top:-15px !important; margin-right:10px !important; }
.bubble.media .mtime span, .bubble.media .msg-readst{ color:#fff !important; text-shadow:0 1px 2px rgba(0,0,0,.35) !important; }

/* 语音条 */
.msg-voice{
  display:inline-flex !important; align-items:center !important; gap:10px !important;
  min-width:150px !important; height:40px !important;
  padding:0 12px !important; border:0 !important;
  background:transparent !important; color:var(--wa-text) !important;
  font-size:14px !important; font-family:inherit !important;
  position:relative !important;
}
.msg-voice::before{
  content:"" !important; width:26px !important; height:26px !important;
  border-radius:50% !important; background:#00A884 !important;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8 5v14l11-7z'/></svg>") center/18px no-repeat !important;
  mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8 5v14l11-7z'/></svg>") center/18px no-repeat !important;
  flex:none !important;
}

/* 文件条 */
.msg-file{
  display:flex !important; align-items:center !important; gap:10px !important;
  min-width:190px !important;
  padding:10px 12px !important;
  color:var(--wa-text) !important; text-decoration:none !important;
  font-size:14px !important; line-height:1.3 !important;
  background:rgba(11,20,26,.04) !important;
  border-radius:6px !important;
}
html[data-wa="dark"] .msg-file,body[data-mode="dark"] .msg-file{ background:rgba(255,255,255,.06) !important; }


/* 红色危险项要在纵向列表里也生效（提高选择器权重） */
.sheet .sheet-grid .sg-item[data-act="group-quit"],
.sheet .sheet-grid .sg-item[data-act="friend-del"],
.sheet .sheet-grid .sg-item[data-act="logout"],
.sheet .sheet-grid .sg-item[data-act="chat-clear"],
.sheet .sheet-grid .sg-item[data-act="account-cancel"]{
  color:#EA0038 !important;
}
.sheet .sheet-grid .sg-item[data-act="group-quit"] .ic,
.sheet .sheet-grid .sg-item[data-act="friend-del"] .ic,
.sheet .sheet-grid .sg-item[data-act="logout"] .ic,
.sheet .sheet-grid .sg-item[data-act="chat-clear"] .ic,
.sheet .sheet-grid .sg-item[data-act="account-cancel"] .ic{ color:#EA0038 !important; }


/* 修正：图标去掉方框；只有"退出/删除"类才红；红项的文字也要红 */
.sheet .sg-item .ic,
.sheet .sheet-grid .sg-item .ic{
  border:0 !important;
  background:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
  outline:0 !important;
}
/* 清空记录不算危险操作，恢复成普通颜色 */
.sheet .sheet-grid .sg-item[data-act="chat-clear"],
.sheet .sheet-grid .sg-item[data-act="chat-clear"] .ic{ color:var(--wa-icon) !important; }
.sheet .sheet-grid .sg-item[data-act="chat-clear"] span{ color:var(--wa-text) !important; }

.sheet .sheet-grid .sg-item[data-act="group-quit"],
.sheet .sheet-grid .sg-item[data-act="friend-del"],
.sheet .sheet-grid .sg-item[data-act="logout"],
.sheet .sheet-grid .sg-item[data-act="account-cancel"]{ color:#EA0038 !important; }
.sheet .sheet-grid .sg-item[data-act="group-quit"] .ic,
.sheet .sheet-grid .sg-item[data-act="friend-del"] .ic,
.sheet .sheet-grid .sg-item[data-act="logout"] .ic,
.sheet .sheet-grid .sg-item[data-act="account-cancel"] .ic{ color:#EA0038 !important; }
.sheet .sheet-grid .sg-item[data-act="group-quit"] span,
.sheet .sheet-grid .sg-item[data-act="friend-del"] span,
.sheet .sheet-grid .sg-item[data-act="logout"] span,
.sheet .sheet-grid .sg-item[data-act="account-cancel"] span{ color:#EA0038 !important; }

/* 标题与第一行之间的空隙收紧 */
.sheet .sheet-title{ padding:12px 22px 6px !important; margin:0 !important; }


/* ==========================================================================
   v3 修：真实后端下暴露的 4 处硬伤
   ① 好友申请的分段控件：外层白底轨道 + 溢出 → 只剩两颗 pill
   ② 分享 / 群聊操作弹层：宽度跟着视口走（桌面 1440 全宽）→ 锁到手机列宽
   ③ 群头像：紫色圆角方块浮在灰色圆上 → 渐变块铺满圆
   ④ 连续消息：每一条都带"小尾巴"→ 只有一组里的第一条带
   ========================================================================== */

/* ① 分段控件 */
.seg{
  background:transparent !important;
  padding:0 !important;
  margin:10px 16px 8px !important;
  box-sizing:border-box !important;
  width:auto !important;
  gap:8px !important;
  border-radius:0 !important;
  box-shadow:none !important;
  overflow:visible !important;
}
.seg button{
  box-sizing:border-box !important;
  height:36px !important;
  border-radius:999px !important;
  background:transparent !important;
  border:1px solid var(--wa-line) !important;
  color:var(--wa-text-2) !important;
  font-size:13.5px !important;
  font-weight:400 !important;
}
.seg button.on{
  background:#E7FCE3 !important;
  border-color:transparent !important;
  color:#008069 !important;
  font-weight:500 !important;
}
html[data-wa="dark"] .seg button,body[data-mode="dark"] .seg button{ border-color:#222D34 !important; }
html[data-wa="dark"] .seg button.on,body[data-mode="dark"] .seg button.on{ background:#103529 !important; color:#71EB85 !important; }

/* ② 弹层宽度锁到手机列 */
.overlay .sheet{
  max-width:460px !important;
  width:100% !important;
  margin:0 auto !important;
  box-sizing:border-box !important;
}
.share-head{ padding:14px 0 12px !important; gap:8px !important; }
.share-head .ob-logo{ width:56px !important; height:56px !important; border-radius:16px !important; display:flex !important; align-items:center !important; justify-content:center !important; }
.share-head b{ font-size:15.5px !important; font-weight:500 !important; }
.share-head span{ font-size:12.5px !important; color:var(--wa-text-3) !important; }

/* ③ 群头像铺满圆形 */
.av .gav{
  width:100% !important;
  height:100% !important;
  border-radius:50% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:17px !important;
  font-weight:500 !important;
  color:#fff !important;
  letter-spacing:0 !important;
}

/* ④ 连续消息只留一条尾巴 */
.msg-row.them + .msg-row.them .bubble{ border-top-left-radius:7.5px !important; }
.msg-row.them + .msg-row.them .bubble::before{ display:none !important; }
.msg-row.me + .msg-row.me .bubble{ border-top-right-radius:7.5px !important; }
.msg-row.me + .msg-row.me .bubble::before{ display:none !important; }

/* v3 补：分享面板里的链接行留出左右内边距，不要贴边 */
.sheet > .m-sub{ padding:0 22px !important; margin:0 0 12px !important; }


/* v5：连续消息之间留出真实间距，不要贴着（用户反馈"黏在一起"） */
.msg-row{ margin-top:0 !important; margin-bottom:0 !important; }
.msg-row + .msg-row{ margin-top:6px !important; }
.msg-row.them + .msg-row.me,
.msg-row.me + .msg-row.them{ margin-top:10px !important; }
/* 日期/系统提示之后的第一条也留出呼吸 */
.day, .sys, .msg-day{ margin-bottom:6px !important; }


/* ==========================================================================
   v6：气泡时间排到右下角同一行（WhatsApp 的做法）+ 页面转场动画
   ========================================================================== */

/* 时间贴到气泡右下角，文字在同一行右侧留出位置 */
.msg-col{ position:relative !important; }
.bubble{ padding:5px 9px 6px !important; }
.msg-row.them .bubble{ padding-right:46px !important; }
.msg-row.me .bubble{ padding-right:64px !important; }
.msg-row .mtime{
  position:absolute !important;
  right:8px !important;
  bottom:5px !important;
  margin:0 !important;
  float:none !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:3px !important;
  font-size:11px !important;
  line-height:1 !important;
  letter-spacing:0 !important;
  color:var(--wa-text-3) !important;
  white-space:nowrap !important;
}
.msg-row.me .mtime{ color:#667781 !important; }
html[data-wa="dark"] .msg-row.me .mtime,body[data-mode="dark"] .msg-row.me .mtime{ color:rgba(233,237,239,.62) !important; }

/* 图片/视频气泡上的时间用白字压图 */
.msg-row .bubble.media ~ .mtime{ color:#fff !important; text-shadow:0 1px 2px rgba(0,0,0,.45) !important; }

/* 页面转场：进 = 从右滑入，返回 = 从左滑入 */
@keyframes waPageFwd{ from{ opacity:.35; transform:translate3d(14%,0,0) } to{ opacity:1; transform:none } }
@keyframes waPageBack{ from{ opacity:.35; transform:translate3d(-14%,0,0) } to{ opacity:1; transform:none } }
#view.nav-fwd{ animation:waPageFwd .24s cubic-bezier(.2,.9,.28,1) both !important; }
#view.nav-back{ animation:waPageBack .24s cubic-bezier(.2,.9,.28,1) both !important; }
@media (prefers-reduced-motion: reduce){
  #view.nav-fwd,#view.nav-back{ animation:none !important; }
}


/* v6 补：转场动画改挂到 <html data-nav>，避免被应用重写 #view 的 class 冲掉 */
#view.nav-fwd,#view.nav-back{ animation:none !important; }
html[data-nav="fwd"] #view{ animation:waPageFwd .24s cubic-bezier(.2,.9,.28,1) both !important; }
html[data-nav="back"] #view{ animation:waPageBack .24s cubic-bezier(.2,.9,.28,1) both !important; }
@media (prefers-reduced-motion: reduce){
  html[data-nav="fwd"] #view,html[data-nav="back"] #view{ animation:none !important; }
}


/* 转场动画只保留 keyframes，播放由 wa-motion.js 直接写到 #view 的 inline style */
html[data-nav] #view{ animation:none !important; }


/* v6 补：气泡内边距用更高优先级压住应用自带的 18px 下内边距
   （原来时间被塞在 18px 的空白里，看着像两行） */
#view .msg-row .bubble{
  padding:6px 46px 6px 9px !important;
  line-height:19px !important;
}
#view .msg-row.me .bubble{ padding-right:64px !important; }
#view .msg-row .bubble.media{ padding:3px !important; }
#view .msg-row .mtime{ bottom:6px !important; }


/* v10：在线小绿点被头像的 overflow:hidden 裁掉了一半 */
.av{ overflow:visible !important; }
.av .dot{
  right:0 !important;
  bottom:0 !important;
  width:13px !important;
  height:13px !important;
  border:2px solid var(--wa-surface) !important;
  border-radius:50% !important;
  box-shadow:none !important;
  box-sizing:border-box !important;
  z-index:2 !important;
}
html[data-wa="dark"] .av .dot,
body[data-mode="dark"] .av .dot{ border-color:#111B21 !important; }
/* 群头像裁切改由自身圆角负责，不再依赖父级 overflow */
.av .gav{ overflow:hidden !important; }


/* v11：筛选 chip 底下残留的旧"下划线"指示条（22×3 的 #2FDC9A）去掉，
   选中态只靠 pill 底色区分 */
.tab-pill::after,
.tab-pill.on::after{ display:none !important; content:none !important; }
.tab-pill{
  border:0 !important;
  background:transparent !important;
  color:var(--wa-text-2) !important;
  border-radius:999px !important;
  padding:6px 13px !important;
  font-size:13px !important;
  font-weight:400 !important;
}
.tab-pill.on{
  background:#E7FCE3 !important;
  color:#008069 !important;
  font-weight:500 !important;
}
html[data-wa="dark"] .tab-pill,body[data-mode="dark"] .tab-pill{ background:transparent !important; color:#8696A0 !important; }
html[data-wa="dark"] .tab-pill.on,body[data-mode="dark"] .tab-pill.on{ background:#103529 !important; color:#71EB85 !important; }


/* v12：撤回提示与时间重叠 —— 撤回行按其自身规则排版，时间不再绝对定位压在文字上 */
.msg-row:has(.msg-recalled) .mtime{ display:none !important; }
.msg-row:has(.msg-recalled) .av{ display:none !important; }
.msg-row:has(.msg-recalled) .msg-col{ width:100% !important; max-width:100% !important; }
.msg-row:has(.msg-recalled){ margin:6px 0 !important; }
.msg-recalled{
  width:100% !important;
  text-align:center !important;
  font-size:12.5px !important;
  line-height:18px !important;
  color:var(--wa-text-3) !important;
  font-style:italic !important;
  background:rgba(11,20,26,.05) !important;
  border-radius:7.5px !important;
  padding:5px 10px !important;
  box-sizing:border-box !important;
}
html[data-wa="dark"] .msg-recalled,body[data-mode="dark"] .msg-recalled{ background:rgba(255,255,255,.05) !important; }

/* 兼容不支持 :has() 的浏览器：撤回气泡没有 .bubble，用相邻选择器兜底 */
.msg-col > .msg-recalled + .mtime{ display:none !important; }


/* v12 补：撤回提示去掉底色，只留居中斜体灰字（和 WhatsApp 一致） */
.msg-recalled{
  background:transparent !important;
  padding:3px 10px !important;
}
html[data-wa="dark"] .msg-recalled,body[data-mode="dark"] .msg-recalled{ background:transparent !important; }


/* v14：好友申请的分段控件加滑动指示器（切换时胶囊会从左滑到右） */
#frSeg{
  position:relative !important;
  display:flex !important;
  gap:0 !important;
  height:42px !important;
  padding:3px !important;
  margin:10px 16px 8px !important;
  background:transparent !important;
  border:1px solid var(--wa-line) !important;
  border-radius:999px !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
#frSeg::before{
  content:"" !important;
  position:absolute !important;
  top:3px !important;
  left:3px !important;
  width:calc(50% - 3px) !important;
  height:34px !important;
  border-radius:999px !important;
  background:#E7FCE3 !important;
  transform:translateX(0) !important;
  transition:transform .26s cubic-bezier(.2,.9,.28,1) !important;
  z-index:0 !important;
}
#frSeg:has(button.on:nth-child(2))::before{ transform:translateX(100%) !important; }
#frSeg button{
  position:relative !important;
  z-index:1 !important;
  flex:1 1 0 !important;
  height:34px !important;
  margin:0 !important;
  border:0 !important;
  background:transparent !important;
  color:var(--wa-text-2) !important;
  font-size:13.5px !important;
  font-weight:400 !important;
  border-radius:999px !important;
  transition:color .18s ease !important;
}
#frSeg button.on{ background:transparent !important; color:#008069 !important; font-weight:500 !important; }
html[data-wa="dark"] #frSeg,body[data-mode="dark"] #frSeg{ border-color:#222D34 !important; }
html[data-wa="dark"] #frSeg::before,body[data-mode="dark"] #frSeg::before{ background:#103529 !important; }
html[data-wa="dark"] #frSeg button.on,body[data-mode="dark"] #frSeg button.on{ color:#71EB85 !important; }
@media (prefers-reduced-motion: reduce){ #frSeg::before{ transition:none !important; } }


/* v15：分段控件整块是每次切换都重建的（容器被替换 → 滑动指示器无法过渡）。
   改成"新选中的那颗自己长出来"：填充 + 轻微缩放淡入，重建也一定会播。 */
#frSeg::before{ content:none !important; display:none !important; }
#frSeg{
  border:1px solid var(--wa-line) !important;
  background:transparent !important;
  gap:8px !important;
  padding:3px !important;
  height:42px !important;
  overflow:hidden !important;
}
@keyframes waSegFill{
  from{ background-color:rgba(231,252,227,0); transform:scale(.94); opacity:.55; }
  to{ background-color:#E7FCE3; transform:scale(1); opacity:1; }
}
#frSeg button{
  flex:1 1 0 !important;
  height:34px !important;
  border:0 !important;
  border-radius:999px !important;
  background:transparent !important;
  color:var(--wa-text-2) !important;
  font-size:13.5px !important;
  transition:color .18s ease !important;
}
#frSeg button.on{
  background:#E7FCE3 !important;
  color:#008069 !important;
  font-weight:500 !important;
  animation:waSegFill .24s cubic-bezier(.2,.9,.28,1) both !important;
}
html[data-wa="dark"] #frSeg button.on,body[data-mode="dark"] #frSeg button.on{
  background:#103529 !important; color:#71EB85 !important;
}
@media (prefers-reduced-motion: reduce){ #frSeg button.on{ animation:none !important; } }


/* v16：分段控件每次切换会被整块重建 → 用整块的"淡入 + 轻微放大"，重建即播；
   选中的胶囊同时做填充动画（waSegFill）。纯 CSS，不依赖 JS。 */
#frSeg{ animation:waSegSwap .22s cubic-bezier(.2,.9,.28,1) both !important; }
@keyframes waSegSwap{
  from{ opacity:.55; transform:scale(.97); }
  to{ opacity:1; transform:scale(1); }
}
@media (prefers-reduced-motion: reduce){ #frSeg{ animation:none !important; } }


/* ==========================================================================
   v17：用户协议 / 隐私政策页
   ① 桌面下铺满 1440px（像个"单独页"，不像应用内的二级页）→ 锁到手机列宽
   ② 小标题被写死成白色，浅色模式下标题直接看不见 → 改用主题色
   ========================================================================== */
.legal-layer{
  left:50% !important;
  right:auto !important;
  transform:translateX(-50%) !important;
  width:min(460px, 100%) !important;
  max-width:460px !important;
  box-shadow:0 0 30px rgba(11,20,26,.20) !important;
}
.legal-hd{
  background:var(--wa-surface) !important;
  border-bottom:1px solid var(--wa-line) !important;
  padding:10px 8px 10px 4px !important;
}
.legal-hd .page-title{
  color:var(--wa-text) !important;
  font-size:16.5px !important;
  font-weight:500 !important;
}
.legal-body{
  background:var(--wa-app) !important;
  color:var(--wa-text) !important;
  padding:18px 20px 56px !important;
  font-size:14.5px !important;
  line-height:1.75 !important;
  overflow-y:auto !important;
}
.legal-body b,
.legal-body strong{
  display:block !important;
  color:var(--wa-text) !important;
  font-size:14.5px !important;
  font-weight:600 !important;
  font-style:normal !important;
  margin:20px 0 6px !important;
  letter-spacing:0 !important;
}
.legal-body b:first-child,
.legal-body strong:first-child{ margin-top:0 !important; }
.legal-body, .legal-body *{ text-align:left !important; }
html[data-wa="dark"] .legal-body,body[data-mode="dark"] .legal-body{ background:#111B21 !important; }


/* v18：协议页正文用白底（深色用 #111B21），更像文档页；外层灰底只做衬底 */
.legal-body{ background:var(--wa-surface) !important; }
html[data-wa="dark"] .legal-body,body[data-mode="dark"] .legal-body{ background:#0B141A !important; }
.legal-body b, .legal-body strong{ color:var(--wa-text) !important; }


/* ==========================================================================
   v19：二维码花掉
   原因：QR 是 29×29 的 <svg><rect> 拼的，容器 168px、内边距 10px → SVG 148px，
   148/29 = 5.1px（非整数），加上 shape-rendering:crispEdges 把每个 rect 按设备像素
   吸附，模块宽度不一致 → 看着像缺块。桌面下容器还会被拉宽，更糟。
   改法：尺寸取 29 的整数倍（174px = 29×6），居中显示，弹窗锁手机列宽。
   ========================================================================== */
.modal, .modal-card, .modal-box{ max-width:460px !important; }
.qr-box{
  width:196px !important;
  height:196px !important;
  padding:11px !important;
  box-sizing:border-box !important;
  margin:14px auto 10px !important;
  border-radius:12px !important;
  background:#FFFFFF !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:visible !important;
}
.qr-box svg{
  width:174px !important;
  height:174px !important;
  display:block !important;
  flex:none !important;
  shape-rendering:crispEdges !important;
}
html[data-wa="dark"] .qr-box,body[data-mode="dark"] .qr-box{ background:#FFFFFF !important; }


/* v20：头像占位底色跟随主题（浅色不能再是深灰 #2A3942） */
.av{ background:#E9EDEF !important; }
html[data-wa="dark"] .av,body[data-mode="dark"] .av{ background:#2A3942 !important; }


/* v21：头像底色（应用里 .av 的规则更具体，用 #view 提高优先级） */
#view .av{ background:#E9EDEF !important; }
body[data-mode="dark"] #view .av,
html[data-wa="dark"] #view .av{ background:#2A3942 !important; }


/* v22：外观页预览气泡的深色规则补上 body[data-mode] 版本（应用切深色走的是 body 属性） */
body[data-mode="dark"] .pv-b.them{ background:#202C33 !important; color:#E9EDEF !important; }
body[data-mode="dark"] .pv-b.me{ background:#005C4B !important; color:#E9EDEF !important; }
body[data-mode="dark"] .preview{ background:var(--wa-wall) !important; }


/* v23：登录设备页的设备图标底色是旧品牌深色 #0D0F14 → 跟随主题 */
.dev-ico{ background:#F0F2F5 !important; color:var(--wa-icon) !important; }
body[data-mode="dark"] .dev-ico,html[data-wa="dark"] .dev-ico{ background:#202C33 !important; color:#AEBAC1 !important; }
