/* =============================================================
   姜聊 · WhatsApp 风格主题层 (V3.6)
   -------------------------------------------------------------
   · WhatsApp 浅米色背景 + 深色模式（跟随系统 / 手动切换）
   · 全部卡片、按钮圆角化（无直角）
   · 个人主页 / 通讯录 / 设置等界面重排
   · 消除列表轮询时的容器动画重放闪动
   在 jiang-v24.css 之后加载，用同等 !important 覆盖。
   主题切换：html[data-theme="light"|"dark"]，auto 时移除属性跟随系统。
   ============================================================= */

/* ---------- 主题变量：浅色（WhatsApp 米色） ---------- */
:root{
  --wx-bg:#f4f0e8;            /* 全局米色背景 */
  --wx-bg-chat:#efeae2;       /* 聊天区米色 */
  --wx-surface:#ffffff;       /* 卡片 / 列表 */
  --wx-surface-2:#f6f4ef;     /* 次级表面 / 输入区 */
  --wx-bar:#ffffff;           /* 顶栏 */
  --wx-tabbar:#ffffff;        /* 底栏 */
  --wx-text:#1f2c34;          /* 主文字 */
  --wx-text-2:#667781;        /* 次要文字 */
  --wx-text-3:#9aa4ab;        /* 时间 / 更淡 */
  --wx-line:rgba(11,20,26,.07);/* 分割线 */
  --wx-accent:#00a884;        /* 强调绿 */
  --wx-accent-deep:#008069;
  --wx-accent-soft:rgba(0,168,132,.12);
  --wx-bubble-self:#d9fdd3;   /* 自己气泡浅绿 */
  --wx-bubble-self-tx:#1f2c34;
  --wx-bubble-other:#ffffff;  /* 对方气泡 */
  --wx-bubble-other-tx:#1f2c34;
  --wx-danger:#ea4335;
  --wx-shadow:0 2px 12px rgba(11,20,26,.07);
  --wx-radius:16px;           /* 卡片圆角 */
  --wx-radius-btn:12px;       /* 按钮圆角 */
  --wx-avatar-radius:11px;    /* 头像圆角 */
}

/* ---------- 主题变量：深色 ---------- */
:root[data-theme="dark"]{
  --wx-bg:#0e161b;
  --wx-bg-chat:#0b141a;
  --wx-surface:#1f2c34;
  --wx-surface-2:#2a3942;
  --wx-bar:#1f2c34;
  --wx-tabbar:#1f2c34;
  --wx-text:#e9edef;
  --wx-text-2:#8696a0;
  --wx-text-3:#62717a;
  --wx-line:rgba(255,255,255,.07);
  --wx-accent:#00a884;
  --wx-accent-deep:#06cf9c;
  --wx-accent-soft:rgba(0,168,132,.18);
  --wx-bubble-self:#005c4b;
  --wx-bubble-self-tx:#e9edef;
  --wx-bubble-other:#202c33;
  --wx-bubble-other-tx:#e9edef;
  --wx-danger:#f15c5c;
  --wx-shadow:0 2px 14px rgba(0,0,0,.3);
}

/* 自动跟随系统（未手动指定时） */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --wx-bg:#0e161b; --wx-bg-chat:#0b141a; --wx-surface:#1f2c34; --wx-surface-2:#2a3942;
    --wx-bar:#1f2c34; --wx-tabbar:#1f2c34; --wx-text:#e9edef; --wx-text-2:#8696a0;
    --wx-text-3:#62717a; --wx-line:rgba(255,255,255,.07); --wx-accent:#00a884;
    --wx-accent-deep:#06cf9c; --wx-accent-soft:rgba(0,168,132,.18);
    --wx-bubble-self:#005c4b; --wx-bubble-self-tx:#e9edef; --wx-bubble-other:#202c33;
    --wx-bubble-other-tx:#e9edef; --wx-danger:#f15c5c; --wx-shadow:0 2px 14px rgba(0,0,0,.3);
  }
}

/* ---------- 0. 闪动修复：去掉内容进入动画重放 ---------- */
.content,.jc-list,.message-list,.screen{
  animation:none !important;
  -webkit-animation:none !important;
}
.avatar,.avatar img,.cartoon-avatar-img,.photo-avatar-img,.official-avatar{
  animation:none !important;
  transition:none !important;
  -webkit-backface-visibility:hidden; backface-visibility:hidden;
}

/* ---------- 1. 全局背景 ---------- */
html,body{ background:var(--wx-bg) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; }
body::after{ display:none !important; }
#app{ background:var(--wx-bg) !important; }
.screen{ background:var(--wx-bg) !important; }
.content{ background:transparent !important; }

/* ---------- 2. 顶栏 ---------- */
.jc-header,.chat-header,.header{
  background:var(--wx-bar) !important;
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border-bottom:1px solid var(--wx-line) !important;
  border-radius:0 !important; box-shadow:none !important; color:var(--wx-text) !important;
}
.jc-header::after,.chat-header::after,.header::after{ display:none !important; }
.jc-title,.header-title,.chat-header .title{ color:var(--wx-text) !important; font-size:17px !important; font-weight:600 !important; }
.jc-title-count{ color:var(--wx-text-2) !important; font-weight:400 !important; }
.chat-title-sub{ color:var(--wx-text-2) !important; }
.jc-header .jc-icon-btn,.chat-header .chat-back-btn,.chat-header .chat-info-btn,
.header .icon-btn,.jc-icon-btn,.icon-btn{
  background:transparent !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; box-shadow:none !important; border-radius:var(--wx-radius-btn) !important; color:var(--wx-text) !important;
}
.chat-header .chat-back-btn{ justify-content:flex-start !important; padding:0 4px 0 0 !important; }
.chat-header .chat-back-btn span{ font-size:15px !important; color:var(--wx-text) !important; }
.chat-header .chat-info-btn{ font-size:22px !important; color:var(--wx-text) !important; }

/* ---------- 3. 搜索框 ---------- */
.jc-search,.add-search-inner{
  background:var(--wx-surface-2) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; border-radius:10px !important; box-shadow:none !important;
}
.jc-search::after{ display:none !important; }
.jc-search input,.add-search-inner input{ color:var(--wx-text) !important; background:transparent !important; }
.jc-search svg{ color:var(--wx-text-2) !important; }
.jc-search input::placeholder,.composer textarea::placeholder,.login-card input::placeholder,.add-search-inner input::placeholder{ color:var(--wx-text-3) !important; opacity:1 !important; }

/* ---------- 4. 会话列表 ---------- */
.jc-list{ background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; }
.jc-list .conversation,.conversation{ background:var(--wx-surface) !important; min-height:74px !important; }
.jc-list .conversation::after{ display:none !important; }
.conversation{
  border-bottom:1px solid var(--wx-line) !important; box-shadow:none !important;
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}
.conversation:last-child{ border-bottom:0 !important; }
.conversation .avatar{ border-radius:var(--wx-avatar-radius) !important; box-shadow:none !important; }
.conv-name{ color:var(--wx-text) !important; font-weight:500 !important; }
.conv-last{ color:var(--wx-text-2) !important; }
.conv-time{ color:var(--wx-text-3) !important; }
.conv-badge,.badge,.tab-badge{ background:var(--wx-danger) !important; color:#fff !important; border-radius:10px !important; font-weight:500 !important; box-shadow:none !important; }
.self-only-tag,.muted-pill,.status-pill{ background:var(--wx-surface-2) !important; color:var(--wx-text-2) !important; border-radius:6px !important; }

/* ---------- 5. 底部导航 ---------- */
.tabbar{
  background:var(--wx-tabbar) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; border-top:1px solid var(--wx-line) !important; border-radius:0 !important; box-shadow:none !important;
}
.tabbar::before,.tabbar::after{ display:none !important; }
.tabbar .tab,.tabbar .tab.active{ background:transparent !important; border:0 !important; box-shadow:none !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; }
.tabbar .tab .tab-icon,.tabbar .tab.active .tab-icon{ background:transparent !important; box-shadow:none !important; border:0 !important; border-radius:0 !important; transform:none !important; }
.tabbar .tab .tab-icon svg{ width:25px !important; height:25px !important; stroke-width:1.8 !important; }
.tabbar .tab .tab-label{ color:var(--wx-text-2) !important; font-size:10.5px !important; font-weight:400 !important; }
.tabbar .tab.active .tab-label,.tabbar .tab.active .tab-icon svg{ color:var(--wx-accent) !important; font-weight:500 !important; }
.tabbar .tab-dot{ background:var(--wx-danger) !important; }

/* ---------- 6. 聊天气泡 ---------- */
.message-list{ background:var(--wx-bg-chat) !important; }
.msg-bubble{ -webkit-backdrop-filter:none !important; backdrop-filter:none !important; border-radius:10px !important; box-shadow:none !important; font-size:16px !important; line-height:1.5 !important; }
.msg-bubble.other{ background:var(--wx-bubble-other) !important; border:1px solid var(--wx-line) !important; color:var(--wx-bubble-other-tx) !important; box-shadow:0 1px 1px rgba(11,20,26,.04) !important; }
.msg-bubble.self{ background:var(--wx-bubble-self) !important; border:1px solid transparent !important; color:var(--wx-bubble-self-tx) !important; box-shadow:0 1px 1px rgba(11,20,26,.04) !important; }
.msg-bubble.self:after{ border-left-color:var(--wx-bubble-self) !important; }
.msg-bubble.other:before{ background:var(--wx-bubble-other) !important; }
.msg-text{ color:inherit !important; }
.time-divider{ color:var(--wx-text-3) !important; }
.msg-status,.self-status{ color:var(--wx-text-3) !important; }
.retry-link{ color:var(--wx-danger) !important; }
.chat-empty{ color:var(--wx-text-3) !important; }
.self-chat-banner,.chat-muted-banner{ background:var(--wx-accent-soft) !important; color:var(--wx-text-2) !important; border-radius:10px !important; }
.chat-muted-banner{ background:rgba(234,67,53,.1) !important; color:var(--wx-danger) !important; }

/* ---------- 7. 输入区 ---------- */
.composer{
  background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; border-top:1px solid var(--wx-line) !important; border-radius:0 !important; box-shadow:none !important;
}
.composer textarea{ background:var(--wx-surface) !important; border:1px solid var(--wx-line) !important; border-radius:10px !important; box-shadow:none !important; color:var(--wx-text) !important; font-size:16px !important; }
.composer .tool-btn{ background:transparent !important; border:0 !important; box-shadow:none !important; color:var(--wx-text-2) !important; border-radius:10px !important; }
.composer #sendBtn{ background:var(--wx-accent) !important; border:0 !important; border-radius:10px !important; box-shadow:none !important; color:#fff !important; }
.composer #sendBtn::after,.composer #sendBtn:hover::after{ display:none !important; }
.composer #sendBtn:active{ background:var(--wx-accent-deep) !important; transform:none !important; }

/* ---------- 8. 输入助手面板 ---------- */
.assist-panel{ background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; border:0 !important; border-top:1px solid var(--wx-line) !important; border-radius:0 !important; box-shadow:none !important; }
.assist-tabs{ border-bottom-color:var(--wx-line) !important; }
.assist-tab{ color:var(--wx-text-2) !important; background:transparent !important; border-radius:8px !important; box-shadow:none !important; font-weight:500 !important; }
.assist-tab.active{ color:var(--wx-accent) !important; background:var(--wx-accent-soft) !important; box-shadow:none !important; }
.assist-close{ background:transparent !important; color:var(--wx-text-2) !important; }
.assist-body .emoji-grid{ width:100% !important; gap:2px !important; overflow:hidden !important; }
.emoji-item,.tpl-item{ border-radius:8px !important; }
.emoji-item:active{ background:var(--wx-accent-soft) !important; }
.composer #moreToggle.active{ background:var(--wx-accent-soft) !important; color:var(--wx-accent) !important; box-shadow:none !important; }

/* ---------- 9. 按钮：全部圆角，去渐变高光 ---------- */
.login-btn,.mini-btn.green,.profile-btn.primary,.friend-action-main button,.admin-form button,
.pwd-form button,.message-actions button.primary,.search-box button,.add-search-inner button,#addFriendBtn,
.empty-cta,#createUserBtn{
  background:var(--wx-accent) !important; border:0 !important; border-radius:var(--wx-radius-btn) !important;
  box-shadow:none !important; color:#fff !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}
.login-btn::after,.mini-btn.green::after{ display:none !important; }
.login-btn:active:not(:disabled),.mini-btn.green:active,.profile-btn.primary:active{ transform:none !important; background:var(--wx-accent-deep) !important; }
.mini-btn.gray{ background:var(--wx-surface-2) !important; color:var(--wx-text-2) !important; border-radius:8px !important; }
.mini-btn.red,.friend-danger{ background:rgba(234,67,53,.1) !important; color:var(--wx-danger) !important; border-radius:8px !important; }
.mini-btn{ border-radius:8px !important; }

/* ---------- 10. 通用卡片：圆角、扁平、适配深色 ---------- */
.me-group,.settings-card,.stat-card,.field-banner,.tools-hero,.backup-hero,.backup-action,
.profile-card,.admin-block,.device-intro,.search-card,.add-search-card,.quota-tips,.device-item,
.admin-user-card,.about-card,.new-friends-card,.tool-card,.func-actions,.about-metrics,.admin-stat-grid{
  background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:1px solid var(--wx-line) !important; border-radius:var(--wx-radius) !important; box-shadow:var(--wx-shadow) !important;
}
.me-row,.contacts-row,.discover-row,.request-row,.profile-row,.backup-row,.settings-page .me-row,.message-actions button{
  background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border-bottom:1px solid var(--wx-line) !important; box-shadow:none !important; min-height:52px !important; color:var(--wx-text) !important;
}
.me-row:last-child,.contacts-row:last-child,.discover-row:last-child{ border-bottom:0 !important; }
.me-row .label,.contacts-row .name,.discover-row .label,.profile-row strong,.backup-row-name{ color:var(--wx-text) !important; font-weight:400 !important; }
.me-row .chevron,.contacts-row .chevron,.discover-row .chevron{ color:var(--wx-text-3) !important; }
.me-icon,.tool-card-ico{ border-radius:10px !important; box-shadow:none !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; }
.tool-card{ border-radius:var(--wx-radius) !important; }
.section-title{ color:var(--wx-text-2) !important; background:transparent !important; border:0 !important; box-shadow:none !important; }

/* ---------- 11. 通讯录：整块白底 + 圆角分组 + 字母索引 ---------- */
.contacts-group{
  background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; border-top:1px solid var(--wx-line) !important; border-bottom:1px solid var(--wx-line) !important;
  border-radius:12px !important; box-shadow:none !important; margin:0 !important; overflow:hidden;
}
.letter-head,.letter-group{ color:var(--wx-text-2) !important; background:transparent !important; }
.letter-head{ font-weight:600 !important; padding:8px 16px 5px !important; border-radius:0 !important; box-shadow:none !important; }
.letter-head span{
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  min-width:22px !important; height:22px !important;
  background:var(--wx-accent-soft) !important;
  border:0 !important; border-radius:7px !important;
  color:var(--wx-accent) !important; font-size:13px !important; font-weight:700 !important;
}
.letter-head em{ color:var(--wx-text-3) !important; font-style:normal !important; }
.alpha-index{
  background:var(--wx-surface-2) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; border-radius:12px !important; box-shadow:var(--wx-shadow) !important;
}
.alpha-index button{ color:var(--wx-accent) !important; border-radius:8px !important; font-weight:600 !important; }
.alpha-index button:active{ background:var(--wx-accent-soft) !important; }

/* ---------- 12. 「我」页 ---------- */
.me-profile{
  background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; border-radius:var(--wx-radius) !important; box-shadow:var(--wx-shadow) !important; margin:12px 12px 0 !important;
}
.me-profile .name{ color:var(--wx-text) !important; font-weight:600 !important; }
.me-profile-hint,.jc-id-line{ color:var(--wx-text-2) !important; }
.me-logout{ background:var(--wx-surface) !important; color:var(--wx-danger) !important; border:0 !important; border-radius:var(--wx-radius-btn) !important; box-shadow:var(--wx-shadow) !important; }

/* ---------- 13. 个人主页重排（WhatsApp 风格） ---------- */
.profile-page{ background:var(--wx-bg) !important; }
.profile-hero{
  background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; border-radius:var(--wx-radius) !important; box-shadow:var(--wx-shadow) !important;
  margin:14px 12px !important; padding:26px 18px 22px !important;
  display:flex !important; flex-direction:column !important; align-items:center !important; text-align:center !important;
}
.profile-hero::before{ display:none !important; }
.profile-hero > *{ position:static !important; }
.profile-avatar-wrap,.profile-avatar-btn .avatar,.profile-hero .avatar{
  width:88px !important; height:88px !important; border-radius:50% !important; box-shadow:0 6px 18px rgba(11,20,26,.16) !important;
}
.profile-avatar-btn .avatar img,.profile-hero .avatar img,.profile-hero .avatar svg{ border-radius:50% !important; }
.profile-avatar-tip{ background:var(--wx-accent-soft) !important; color:var(--wx-accent) !important; border-radius:8px !important; }
.profile-name{ color:var(--wx-text) !important; font-size:20px !important; font-weight:650 !important; margin-top:14px !important; }
.profile-account{ color:var(--wx-text-2) !important; margin-top:5px !important; }
.profile-state{ color:var(--wx-accent) !important; background:var(--wx-accent-soft) !important; border-radius:8px !important; padding:3px 10px !important; margin-top:8px !important; }
.profile-state.off{ color:var(--wx-danger) !important; background:rgba(234,67,53,.1) !important; }
.profile-page .profile-card,.profile-card{
  margin:0 12px 14px !important; padding:4px 14px !important;
  background:var(--wx-surface) !important;
  border:1px solid var(--wx-line) !important;
  box-shadow:var(--wx-shadow) !important;
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}
.profile-page .profile-row,.profile-row{ min-height:50px !important; border-bottom-color:var(--wx-line) !important; }
.profile-page .profile-row .label,.profile-page .profile-row .value{ color:var(--wx-text-2) !important; }
.profile-row > span{ color:var(--wx-text-2) !important; font-size:13.5px !important; }
.profile-row > strong{ color:var(--wx-text) !important; font-weight:500 !important; }
.profile-row .ok{ color:var(--wx-accent) !important; }
.profile-row .off{ color:var(--wx-danger) !important; }
.copy-mini{ color:var(--wx-accent) !important; background:var(--wx-accent-soft) !important; border-radius:6px !important; }
.profile-actions,.friend-danger-wrap{ margin:0 12px 10px !important; }
.profile-btn{ border-radius:var(--wx-radius-btn) !important; }
.profile-btn.primary{ background:var(--wx-accent) !important; }
.profile-btn.soft{ background:var(--wx-surface-2) !important; color:var(--wx-text) !important; border:1px solid var(--wx-line) !important; }
.official-tag,.admin-tag,.profile-muted{ border-radius:6px !important; }
.profile-tip{ color:var(--wx-text-2) !important; }

/* ---------- 14. 登录页 ---------- */
.login-screen{ background:var(--wx-bg) !important; }
.login-aurora{ display:none !important; }
.login-logo{ border-radius:22px !important; box-shadow:0 8px 24px rgba(0,168,132,.18) !important; }
.login-title{ color:var(--wx-text) !important; }
.login-sub{ color:var(--wx-text-2) !important; }
.login-card{
  background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:1px solid var(--wx-line) !important; border-radius:var(--wx-radius) !important; box-shadow:var(--wx-shadow) !important;
}
.login-card label{ color:var(--wx-text-2) !important; }
.login-card input{ background:var(--wx-surface-2) !important; border:1px solid var(--wx-line) !important; border-radius:10px !important; box-shadow:none !important; color:var(--wx-text) !important; }
.login-trust,.login-hint{ color:var(--wx-text-2) !important; }
.login-error{ color:var(--wx-danger) !important; }

/* ---------- 15. 弹层 / 配额 / 消息操作 ---------- */
.source-sheet,.jc-modal,.message-actions,.font-sheet,.clear-sheet,.backup-sheet,.tpl-manager,.sheet,.modal-card,.image-source-card{
  background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:0 !important; border-radius:18px 18px 0 0 !important; box-shadow:0 -6px 30px rgba(0,0,0,.12) !important; color:var(--wx-text) !important;
}
.source-sheet-title,.quota-row strong{ color:var(--wx-text) !important; }
.source-sheet .cancel,.sheet .cancel{ background:var(--wx-surface-2) !important; color:var(--wx-text) !important; border:0 !important; border-radius:var(--wx-radius-btn) !important; box-shadow:none !important; }
.quota-hint,.quota-loading,.quota-tips-title,.quota-tip{ color:var(--wx-text-2) !important; }
.quota-bar i{ background:var(--wx-accent) !important; border-radius:8px !important; }
.quota-row{ border-bottom-color:var(--wx-line) !important; }
.image-source-item{ background:var(--wx-surface) !important; color:var(--wx-text) !important; border-radius:10px !important; }
.message-actions button{ border-radius:10px !important; }

/* ---------- 16. 录音条 ---------- */
.rec-inline{ background:var(--wx-surface) !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important; border-top:1px solid var(--wx-line) !important; box-shadow:0 -4px 18px rgba(0,0,0,.06) !important; border-radius:0 !important; }
.rec-mid{ background:var(--wx-surface-2) !important; border:0 !important; border-radius:20px !important; }
.rec-time{ color:var(--wx-text) !important; }
.rwave i{ background:var(--wx-accent) !important; }
.rec-del{ background:var(--wx-surface-2) !important; color:var(--wx-text-2) !important; border-radius:50% !important; }
.rec-preview,.rec-retry{ background:var(--wx-accent-soft) !important; color:var(--wx-accent) !important; border-radius:50% !important; }
.rec-send{ background:var(--wx-accent) !important; border:0 !important; box-shadow:none !important; border-radius:50% !important; }
.composer.voice-recording .rec-inline{ background:var(--wx-surface) !important; box-shadow:0 -4px 18px rgba(0,0,0,.06) !important; border-radius:0 !important; }

/* ---------- 17. 媒体气泡 / 全屏预览 / 后台 ---------- */
.media-bubble{ border-radius:10px !important; }
.media-preview{ background:rgba(0,0,0,.92) !important; }
.stat-num{ color:var(--wx-text) !important; }
.stat-label{ color:var(--wx-text-2) !important; }
.device-row,.admin-device-row{ color:var(--wx-text) !important; border-bottom-color:var(--wx-line) !important; }
.about-text,.about-version,.backup-note,.settings-note,.add-tip,.field-note-card,.device-intro{ color:var(--wx-text-2) !important; }
.field-note-card{ border-radius:var(--wx-radius) !important; background:var(--wx-surface) !important; }

/* ---------- 18. 通用按压反馈 ---------- */
.conversation:active,.contacts-row:active,.me-row:active,.discover-row:active{ background:var(--wx-surface-2) !important; transform:none !important; }
button:active{ opacity:.75; }

/* 外观设置行的当前值 + 主题图标 */
.me-value{ color:var(--wx-text-2) !important; font-size:13.5px !important; margin-left:auto; margin-right:8px; }
.me-icon.violet{ background:rgba(108,99,255,.12) !important; color:#6c63ff !important; }

/* ---------- 19. 尊重减弱动效 ---------- */
@media (prefers-reduced-motion:reduce){
  .content,.jc-list,.message-list,.screen,.avatar{ animation:none !important; transition:none !important; }
}

/* =============================================================
   V3.7 · 微信风格通栏列表 + 消息宫格菜单 + 引用/多选/转发/提醒
   ============================================================= */

/* ---- A. 会话列表：微信通栏（整行白底 + 细分割，无独立卡片留白） ---- */
.jc-list{ background:var(--wx-surface) !important; }
.jc-list .self-chat-slot{ padding:0 !important; }
.jc-list .self-chat-slot .conversation{ border-bottom:1px solid var(--wx-line) !important; }
.conversation,.jc-list .conversation,.self-chat-card,.jc-list .self-chat-card{
  display:flex !important; align-items:center !important; gap:11px !important;
  width:100% !important; margin:0 !important; padding:11px 14px !important;
  min-height:72px !important; border:0 !important; border-bottom:1px solid var(--wx-line) !important;
  border-radius:0 !important; background:var(--wx-surface) !important;
  box-shadow:none !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}
.conversation::after,.jc-list .conversation::after{ display:none !important; }
.conversation:last-child,.self-chat-slot:last-child .conversation{ border-bottom:0 !important; }
.conversation .conv-avatar{ flex:0 0 auto !important; position:relative !important; }
.conversation .conv-avatar .avatar{ width:48px !important; height:48px !important; border-radius:8px !important; box-shadow:none !important; }
.conversation .conv-avatar .avatar img,.conversation .conv-avatar .avatar svg{ border-radius:8px !important; }
.conversation .conv-main{ flex:1 1 auto !important; min-width:0 !important; }
.conversation .conv-name{ font-size:16px !important; font-weight:500 !important; color:var(--wx-text) !important; line-height:1.3 !important; }
.conversation .conv-last{ font-size:13px !important; color:var(--wx-text-2) !important; margin-top:4px !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; }
.conversation .conv-side{ flex:0 0 auto !important; align-self:flex-start !important; padding-top:3px !important; }
.conversation .conv-time{ font-size:11px !important; color:var(--wx-text-3) !important; }
.conversation .conv-badge{ position:absolute !important; top:-5px !important; right:-5px !important; min-width:18px !important; height:18px !important; line-height:18px !important; font-size:11px !important; padding:0 5px !important; }
.self-only-tag,.muted-pill{ font-size:10px !important; padding:1px 6px !important; border-radius:4px !important; font-weight:400 !important; }
.jc-list .empty{ padding-top:60px !important; }

/* ---- B. 「我」页：微信通栏（资料/设置/退出 整块白底 + 细分割） ---- */
.me-content{ background:var(--wx-surface) !important; }
.me-content .me-profile,.me-content .me-group,.me-content .me-logout-wrap{
  margin:0 !important; border:0 !important; border-radius:0 !important; box-shadow:none !important;
  background:var(--wx-surface) !important;
}
.me-content .me-profile{ border-bottom:8px solid var(--wx-bg) !important; padding:18px 16px !important; min-height:96px !important; }
.me-content .me-profile .avatar{ width:64px !important; height:64px !important; border-radius:9px !important; }
.me-content .me-profile .name{ font-size:17px !important; font-weight:600 !important; }
.me-content .me-group{ border-bottom:8px solid var(--wx-bg) !important; }
.me-content .me-row{ min-height:54px !important; padding:0 16px !important; border-bottom:1px solid var(--wx-line) !important; background:var(--wx-surface) !important; }
.me-content .me-row:last-child{ border-bottom:0 !important; }
.me-content .me-icon{ width:30px !important; height:30px !important; border-radius:7px !important; }
.me-content .me-logout-wrap{ padding:0 !important; }
.me-content .me-logout{ width:100% !important; margin:0 !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; background:var(--wx-surface) !important; min-height:54px !important; font-size:16px !important; }

/* ---- C. 全局卡片收紧：去厚重边框/阴影，保留圆角 ---- */
.me-group,.settings-card,.stat-card,.field-banner,.tools-hero,.backup-hero,.backup-action,
.profile-card,.admin-block,.device-intro,.search-card,.add-search-card,.quota-tips,.device-item,
.admin-user-card,.about-card,.new-friends-card,.tool-card,.func-actions,.about-metrics,.admin-stat-grid,
.contacts-group,.discover-group,.request-group{
  border:0 !important; box-shadow:none !important;
}
.contacts-group,.discover-group,.settings-page .me-group,.settings-group{
  border-radius:10px !important; overflow:hidden !important;
}
.contacts-row,.discover-row,.request-row,.backup-row,.settings-page .me-row{ min-height:52px !important; }
.me-icon,.tool-card-ico{ box-shadow:none !important; }

/* ---- D. 消息长按菜单：微信深色圆角宫格 ---- */
.message-actions-backdrop{
  background:rgba(0,0,0,.42) !important; opacity:0; transition:opacity .14s ease !important;
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}

/* 通用底部弹层条目（转发/提醒/确认/备份等共用） */
.source-sheet-item{
  display:block !important; width:100% !important; padding:14px 20px !important;
  background:transparent !important; border:0 !important; border-bottom:1px solid var(--wx-line) !important;
  color:var(--wx-text) !important; font-size:16px !important; text-align:center !important;
  border-radius:0 !important; box-shadow:none !important;
}
.source-sheet-item:active{ background:var(--wx-surface-2) !important; }
.source-sheet .cancel{ margin-top:8px !important; }
.message-actions-backdrop.show{ opacity:1 !important; }
.message-actions.ma-grid{
  position:fixed !important; left:50% !important; bottom:calc(16px + env(safe-area-inset-bottom,0px)) !important;
  transform:translateX(-50%) translateY(12px); width:min(360px,calc(100vw - 28px)) !important;
  background:rgba(38,38,40,.96) !important; color:#f2f2f2 !important;
  border:0 !important; border-radius:16px !important; box-shadow:0 12px 40px rgba(0,0,0,.32) !important;
  -webkit-backdrop-filter:blur(12px) !important; backdrop-filter:blur(12px) !important;
  padding:0 !important; margin:0 !important; opacity:0; transition:transform .16s ease,opacity .16s ease !important;
  overflow:hidden !important;
}
.message-actions-backdrop.show .message-actions.ma-grid{ transform:translateX(-50%) translateY(0) !important; opacity:1 !important; }
.ma-grid-inner{
  display:grid !important; grid-template-columns:repeat(4,1fr) !important; gap:2px 0 !important;
  padding:14px 6px 8px !important;
}
.message-actions .ma-cell{
  display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important;
  gap:7px !important; min-height:72px !important; padding:8px 2px !important;
  background:transparent !important; border:0 !important; border-radius:10px !important; box-shadow:none !important;
  color:#f2f2f2 !important; font-size:12.5px !important;
}
.message-actions .ma-cell:active{ background:rgba(255,255,255,.12) !important; }
.message-actions .ma-cell .ma-ico{
  width:42px !important; height:42px !important; border-radius:12px !important;
  background:rgba(255,255,255,.1) !important; color:#fff !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
}
.message-actions .ma-cell .ma-ico svg{ width:22px !important; height:22px !important; }
.message-actions .ma-cell.danger{ color:#ff6b6b !important; }
.message-actions .ma-cell.danger .ma-ico{ color:#ff6b6b !important; }
.message-actions .ma-cell,
.message-actions .ma-cell:active,
.message-actions .ma-cell.danger,
.message-actions .ma-cell.danger:active,
.message-actions button.ma-cell{
  background:transparent !important; border:0 !important; box-shadow:none !important;
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
}
.message-actions .ma-cell:active .ma-ico,.message-actions .ma-cell.danger:active .ma-ico{ background:rgba(255,255,255,.16) !important; }
.message-actions .ma-cell:focus,.message-actions .ma-cell.danger:focus{ outline:none !important; background:transparent !important; }
.message-actions .ma-time{
  display:block !important; width:calc(100% - 28px) !important; margin:0 14px !important; padding:10px 0 !important;
  background:transparent !important; border:0 !important; border-top:1px solid rgba(255,255,255,.1) !important;
  color:#a9a9a9 !important; font-size:12px !important; border-radius:0 !important;
}
.message-actions .ma-cancel{
  display:block !important; width:100% !important; padding:14px 0 !important; margin:0 !important;
  background:rgba(255,255,255,.04) !important; border:0 !important; border-top:1px solid rgba(255,255,255,.08) !important;
  color:#f2f2f2 !important; font-size:15px !important; border-radius:0 !important;
}
.message-actions .ma-cancel:active{ background:rgba(255,255,255,.12) !important; }

/* ---- E. 引用条（输入区上方） ---- */
.quote-bar{
  display:flex !important; align-items:center; gap:10px !important;
  margin:0 10px 6px !important; padding:8px 12px !important;
  background:var(--wx-surface) !important; border:1px solid var(--wx-line) !important; border-radius:10px !important;
  box-shadow:none !important;
}
.quote-bar .qb-bar{ width:3px !important; align-self:stretch !important; border-radius:3px !important; background:var(--wx-accent) !important; }
.quote-bar .qb-body{ flex:1 !important; min-width:0 !important; }
.quote-bar .qb-who{ font-size:12px !important; color:var(--wx-accent) !important; font-weight:500 !important; }
.quote-bar .qb-text{ font-size:12.5px !important; color:var(--wx-text-2) !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; margin-top:2px !important; }
.quote-bar .qb-close{ width:26px !important; height:26px !important; border:0 !important; background:var(--wx-surface-2) !important; border-radius:50% !important; color:var(--wx-text-2) !important; display:flex !important; align-items:center !important; justify-content:center !important; }
.quote-bar .qb-close svg{ width:14px !important; height:14px !important; }
/* 气泡内引用块 */
.msg-quote{
  border-left:3px solid rgba(255,255,255,.7); padding:4px 8px !important; margin:0 0 6px !important;
  font-size:12px !important; line-height:1.4 !important; border-radius:0 4px 4px 0 !important;
  background:rgba(0,0,0,.06) !important; color:#5a6b63 !important; max-width:100% !important;
}
.msg-bubble.self .msg-quote{ border-left-color:rgba(0,0,0,.35) !important; background:rgba(255,255,255,.35) !important; color:#3f5147 !important; }
.msg-quote .mq-who{ font-weight:600 !important; }
:root[data-theme="dark"] .msg-quote,.quote-bar ~ * .msg-quote{ background:rgba(0,0,0,.18) !important; color:#c4d0c9 !important; }

/* ---- F. 多选模式 ---- */
.msg-row.selecting{ cursor:pointer !important; }
.msg-row.selecting .msg-check{
  flex:0 0 auto !important; align-self:center !important; width:26px !important; height:26px !important;
  display:flex !important; align-items:center !important; justify-content:center !important; color:var(--wx-text-3) !important;
}
.msg-row.selecting .msg-check.checked{ color:var(--wx-accent) !important; }
.msg-row.selecting .msg-check svg{ width:22px !important; height:22px !important; }
.multi-select-bar{
  display:flex !important; align-items:center !important; gap:4px !important;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px)) !important;
  background:var(--wx-surface) !important; border-top:1px solid var(--wx-line) !important;
}
.multi-select-bar .msb-btn{
  flex:1 1 0 !important; display:flex !important; flex-direction:column !important; align-items:center !important; gap:3px !important;
  padding:4px 0 !important; background:transparent !important; border:0 !important; border-radius:8px !important;
  color:var(--wx-text-2) !important; font-size:11px !important;
}
.multi-select-bar .msb-btn svg{ width:22px !important; height:22px !important; }
.multi-select-bar .msb-btn.danger{ color:var(--wx-danger) !important; }
.multi-select-bar .msb-count{ flex:0 0 auto !important; font-size:12.5px !important; color:var(--wx-text) !important; padding:0 4px !important; }

/* ---- G. 转发 / 提醒 / 确认 面板 ---- */
.forward-list{ max-height:52vh !important; overflow-y:auto !important; -webkit-overflow-scrolling:touch !important; }
.forward-row{
  display:flex !important; align-items:center !important; gap:12px !important; width:100% !important;
  padding:9px 18px !important; background:transparent !important; border:0 !important; border-bottom:1px solid var(--wx-line) !important;
  text-align:left !important; color:var(--wx-text) !important; font-size:15px !important;
}
.forward-row:active{ background:var(--wx-surface-2) !important; }
.forward-row .forward-avatar .avatar{ width:40px !important; height:40px !important; border-radius:8px !important; }
.forward-row .forward-name{ flex:1 !important; }
.forward-row > svg{ width:18px !important; height:18px !important; color:var(--wx-text-3) !important; }
.confirm-title{ padding:20px 22px !important; text-align:center !important; font-size:15px !important; color:var(--wx-text) !important; }
.confirm-sheet .confirm-ok{ color:var(--wx-accent) !important; font-weight:500 !important; }

/* ---- H. 深色下宫格菜单文字 ---- */
:root[data-theme="dark"] .message-actions.ma-grid,
:root[data-theme="dark"] .ma-grid .ma-cell{ color:#f2f2f2 !important; }
