/* ===== 基础 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:root {
  --wx-green: #07c160;
  --wx-green-dark: #06ad56;
  --bubble-self: #95ec69;
  --bubble-other: #ffffff;
  --rail-bg: #2e2e2e;
  --rail-bg2: #262626;
  --list-bg: #f7f7f7;
  --chat-bg: #f5f5f5;
  --head-bg: #f5f5f5;
  --line: #e3e3e3;
  --text: #191919;
  --text-2: #7f7f7f;
  --text-3: #b2b2b2;
}
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #d8dbe0;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; border: none; background: none; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* ===== 桌面容器 ===== */
.desktop {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}

/* ===== 登录页 ===== */
.brand-foot {
  margin-top: 8px; padding-top: 10px; border-top: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--text-3); text-align: left; letter-spacing: .3px;
}
.app-foot {
  flex: none; min-height: 30px; display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 12px; color: #b2b2b2; background: #fafafa;
  border-top: 1px solid var(--line); user-select: none; padding: 2px 8px;
}
/* 页脚「©」由圆圈包围的 C */
.copy-mark {
  flex: none; width: 17px; height: 17px; border-radius: 50%;
  border: 1.2px solid currentColor; display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; font-weight: 700; opacity: .85;
}
.brand-foot-txt, .app-foot-txt { display: flex; flex-direction: column; line-height: 1.35; }
.brand-foot-txt b, .app-foot-txt b { font-weight: 600; }
.brand-foot-txt i, .app-foot-txt i { font-style: normal; font-size: 11px; opacity: .75; }
.login-wrap { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; background: linear-gradient(160deg, #eef2f6 0%, #dfe5ec 100%); overflow: auto; padding: 16px 0; }
/* 浏览器窗口较矮时整体等比缩小，保证注册表单全部可见 */
/* 矮屏修复：贴顶 + 盒子自滚（flex 居中 + overflow 的上溢出区滚不回去，Chrome 114 不支持 safe center） */
.login-box { width: 380px; flex: none; max-height: 100%; overflow-y: auto; margin: auto 0; }
.login-card { transform-origin: top center; }

/* 矮屏紧凑模式 */
@media (max-height: 780px) {
  .login-card { padding: 24px 26px 20px; }
  .login-brand { margin-bottom: 14px; }
  .login-logo { width: 50px; height: 50px; font-size: 27px; margin-bottom: 8px; }
  .login-title { font-size: 18px; }
  .login-tabs { margin-bottom: 14px; }
  .field { margin-bottom: 11px; }
  .field input:not([type="checkbox"]):not([type="radio"]), .code-row input:not([type="checkbox"]) { height: 38px; }
  .btn-primary { height: 40px; }
  .lpanel-tip { padding: 8px 10px; margin-bottom: 10px; }
}
@media (max-height: 620px) {
  .login-card { padding: 18px 22px 16px; }
  .login-brand { margin-bottom: 10px; }
  .login-logo { width: 42px; height: 42px; font-size: 23px; margin-bottom: 6px; }
  .login-sub { display: none; }
  .field { margin-bottom: 9px; }
  .field label { margin-bottom: 4px; }
  .field input:not([type="checkbox"]):not([type="radio"]), .code-row input:not([type="checkbox"]) { height: 34px; }
  .btn-primary { height: 36px; font-size: 14px; }
  .avatar-list button { height: 28px; font-size: 17px; }
}
.login-card {
  width: 380px; padding: 36px 34px 28px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
  text-align: left;
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-logo {
  width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 14px;
  overflow: hidden; box-shadow: 0 6px 16px rgba(3, 14, 104, .28);
}
.login-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-title { font-size: 20px; font-weight: 600; }
.login-sub { margin-top: 6px; font-size: 13px; color: var(--text-2); }

.login-tabs { display: flex; gap: 6px; background: #f2f3f5; padding: 4px; border-radius: 10px; margin-bottom: 20px; }
.ltab { flex: 1; padding: 8px 0; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.ltab.is-on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.lpanel { display: none; }
.lpanel.is-on { display: block; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
/* 只作用于文本类输入框：复选框/单选框/滑块不能被撑成 42px 的大方块 */
.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.code-row input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid #e0e0e0; border-radius: 8px; background: #fafafa;
  transition: border-color .15s, background .15s;
}
.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
.code-row input:not([type="checkbox"]):not([type="radio"]):focus { border-color: var(--wx-green); background: #fff; }
.field input:not([type="checkbox"]):not([type="radio"]):disabled { background: #f2f2f2; color: #999; cursor: not-allowed; }
.field-tip { margin-top: 5px; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.btn-code {
  flex: none; padding: 0 14px; height: 42px; border-radius: 8px;
  border: 1px solid var(--wx-green); color: var(--wx-green); font-size: 13px; white-space: nowrap;
}
.btn-code:disabled { border-color: #ccc; color: #aaa; cursor: default; }

.btn-primary {
  width: 100%; height: 44px; border-radius: 8px; margin-top: 6px;
  background: var(--wx-green); color: #fff; font-size: 15px; letter-spacing: 2px;
}
.btn-primary:hover { background: var(--wx-green-dark); }
.btn-primary:disabled { background: #b9e6cb; cursor: default; }
.btn-brand { display: flex; align-items: center; justify-content: center; gap: 8px; letter-spacing: 0; }
.wx-ico { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.wx-hint { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 14px; }

.login-msg { min-height: 20px; margin-top: 12px; font-size: 13px; color: #e64340; text-align: center; line-height: 1.6; }
.login-msg.ok { color: var(--wx-green); }
.login-foot { margin-top: 10px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.6; }
.login-link { margin-top: 12px; text-align: center; font-size: 13px; }
.login-link a { color: var(--wx-green); text-decoration: none; }
.login-link a:hover { text-decoration: underline; }
.lpanel-tip { font-size: 12px; color: var(--text-3); line-height: 1.7; background: #f6f7f9; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.rc-list { display: flex; flex-direction: column; gap: 6px; }
.rc-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.rc-item.is-on { border-color: var(--wx-green); background: #f0faf4; }
.rc-item .rc-av { font-size: 22px; width: 28px; text-align: center; }
.rc-item .rc-tx b { font-size: 14px; }
.rc-item .rc-tx span { display: block; font-size: 12px; color: var(--text-3); }
.field-err { min-height: 16px; margin-top: 5px; font-size: 12px; color: #e64340; }

/* ===== 主界面 ===== */
.main {
  width: 1080px; height: 690px; max-width: 96vw; max-height: 94vh;
  display: flex; overflow: hidden;
  background: #fff; border-radius: 10px;
  box-shadow: 0 22px 60px rgba(0,0,0,.28);
}

/* 左侧图标栏 */
.rail {
  width: 58px; flex: none; background: var(--rail-bg);
  display: flex; flex-direction: column; align-items: center; padding: 22px 0 14px;
}
.rail-avatar {
  width: 36px; height: 36px; border-radius: 5px; background: #4a4a4a;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  cursor: pointer; margin-bottom: 22px;
}
.rail-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rail-btn { position: relative; width: 44px; height: 44px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.rail-btn .ico { font-size: 20px; filter: grayscale(1) brightness(1.7); opacity: .75; }
.rail-btn:hover { background: rgba(255,255,255,.06); }
.rail-btn.is-on .ico { filter: none; opacity: 1; }
.rail-btn.is-on::before { content: ""; position: absolute; left: -7px; top: 12px; width: 3px; height: 20px; background: var(--wx-green); border-radius: 2px; }
.rail-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #fa5151; border: 1.5px solid var(--rail-bg); }
.rail-bottom { display: flex; flex-direction: column; gap: 4px; }

/* 列表栏 */
.pane-list { width: 288px; flex: none; background: var(--list-bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.list-head { height: 60px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.search-box { flex: 1; height: 28px; background: #e3e3e3; border-radius: 4px; display: flex; align-items: center; padding: 0 8px; }
.search-box .s-ico { font-size: 12px; opacity: .6; }
.search-box input { flex: 1; margin-left: 6px; background: none; font-size: 13px; }
.add-btn { width: 28px; height: 28px; border-radius: 4px; background: #e3e3e3; font-size: 18px; line-height: 1; color: #5c5c5c; }
.add-btn:hover { background: #d9d9d9; }
.list-scroll { flex: 1; overflow-y: auto; }
.list-stack { display: flex; flex-direction: column; }

/* 会话条目 */
.conv { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; position: relative; }
.conv:hover { background: #eee; }
.conv.is-on { background: #c9c9c9; }
.conv-av { width: 40px; height: 40px; flex: none; border-radius: 4px; background: #dcdcdc; display: flex; align-items: center; justify-content: center; font-size: 22px; position: relative; overflow: hidden; }
.conv-av img { width: 100%; height: 100%; object-fit: cover; }
.conv > .badge { position: absolute; left: 46px; top: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #fa5151; color: #fff; font-size: 11px; line-height: 17px; text-align: center; border: 1.5px solid var(--list-bg); z-index: 2; pointer-events: none; }
.conv-body { flex: 1; min-width: 0; }
.conv-row { display: flex; align-items: baseline; gap: 8px; }
.conv-name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { font-size: 11px; color: var(--text-3); flex: none; }
.conv-msg { margin-top: 3px; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.is-on .conv-time, .conv.is-on .conv-msg { color: #6b6b6b; }

/* 通讯录 */
.contact-sec { padding: 8px 14px 4px; font-size: 12px; color: var(--text-2); background: var(--list-bg); }
.contact { display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer; }
.contact:hover { background: #eee; }
.contact-av { width: 32px; height: 32px; flex: none; border-radius: 4px; background: #dcdcdc; display: flex; align-items: center; justify-content: center; font-size: 18px; overflow: hidden; }
.contact-av img { width: 100%; height: 100%; object-fit: cover; }
.contact-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-tag { margin-left: auto; font-size: 11px; color: var(--text-3); }

/* 聊天栏 */
.pane-chat { flex: 1; min-width: 0; background: var(--chat-bg); display: flex; flex-direction: column; position: relative; }
.chat-head { height: 60px; flex: none; background: var(--head-bg); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 18px; }
.chat-title { flex: 0 1 auto; max-width: 58%; font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-status { flex: none; font-size: 12px; color: var(--text-3); margin-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status.is-online { color: var(--wx-green); }
.more-btn, .back-btn { font-size: 20px; color: #5c5c5c; padding: 0 4px; }
.more-btn { margin-left: auto; }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--wx-green); margin-left: 5px; vertical-align: middle; }
.back-btn { display: none; font-size: 26px; margin-right: 6px; }
/* hidden 属性必须赢过移动端媒体查询里的 display:block，否则列表页也会冒出返回键 */
.back-btn[hidden] { display: none !important; }
.hold-talk { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }

.msg-scroll { flex: 1; overflow-y: auto; padding: 16px 18px 8px; overflow-anchor: none; }
.msg-stack { display: flex; flex-direction: column; gap: 14px; }
.msg-time { align-self: center; font-size: 11px; color: #b2b2b2; background: rgba(0,0,0,.04); padding: 2px 8px; border-radius: 3px; }
.msg-sys { align-self: center; font-size: 11px; color: #9a9a9a; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 78%; }
.msg.is-self { align-self: flex-end; flex-direction: row-reverse; }
.msg-av { width: 38px; height: 38px; flex: none; border-radius: 4px; background: #dcdcdc; display: flex; align-items: center; justify-content: center; font-size: 20px; overflow: hidden; }
.msg-av img { width: 100%; height: 100%; object-fit: cover; }
.msg-main { min-width: 0; }
.msg-sender { font-size: 11px; color: #9a9a9a; margin-bottom: 4px; }
.bubble {
  position: relative; padding: 9px 12px; border-radius: 5px;
  background: var(--bubble-other); font-size: 14px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.bubble::after { content: ""; position: absolute; top: 12px; left: -5px; border: 5px solid transparent; border-right-color: var(--bubble-other); border-left: 0; }
.msg.is-self .bubble { background: var(--bubble-self); }
.msg.is-self .bubble::after { left: auto; right: -5px; border-right: 0; border-left: 5px solid var(--bubble-self); }
.bubble img.media { display: block; max-width: 220px; max-height: 240px; border-radius: 4px; }
.bubble .file-link { color: #1677ff; text-decoration: none; }
.msg-fail { align-self: flex-end; font-size: 12px; color: #e64340; margin-top: 2px; }

/* 空态 */
.empty-chat { position: absolute; inset: 60px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); }
.empty-logo { width: 74px; height: 74px; border-radius: 16px; background: #e8e8e8; color: #fff; font-size: 40px; display: flex; align-items: center; justify-content: center; }
.empty-tip { font-size: 12px; }

/* 输入区 */
.composer { flex: none; border-top: 1px solid var(--line); background: #fff; padding: 6px 14px 10px; display: flex; flex-direction: column; }
.composer-tools { display: flex; gap: 4px; padding: 2px 0 4px; }
.tool { width: 30px; height: 28px; border-radius: 4px; font-size: 17px; display: flex; align-items: center; justify-content: center; opacity: .75; }
.tool:hover { background: #f0f0f0; opacity: 1; }
.composer textarea { flex: none; height: 88px; resize: none; font-size: 14px; line-height: 1.6; padding: 4px 2px; background: none; }
/* ---------- 微信式输入区：语音切换 / 按住说话 / ＋更多面板 ---------- */
.composer-main { display: flex; align-items: flex-end; gap: 6px; }
.composer-main #msgInput { flex: 1; min-width: 0; }
.hold-talk {
  flex: 1; min-width: 0; height: 88px; border-radius: 8px;
  background: #f2f4f6; border: 1px solid var(--line);
  font-size: 15px; letter-spacing: 2px; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none; touch-action: none;
  transition: background .15s ease;
}
.hold-talk[hidden] { display: none; }
.hold-talk.is-rec { background: #e2e6ea; color: var(--text-2); }
.hold-talk:active { background: #e2e6ea; }
.tool.is-active { opacity: 1; background: #eef4ee; }
.more-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px;
  padding: 18px 12px 20px; border-top: 1px solid var(--line);
}
.more-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 8px 4px; border-radius: 12px; background: none;
  font-size: 12px; color: var(--text-2); transition: background .15s ease;
}
.more-item { color: #8a8a8a; }
.more-item:hover { background: rgba(0, 0, 0, .045); }
.more-item .mi-ico {
  width: 54px; height: 54px; border-radius: 16px; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
  display: flex; align-items: center; justify-content: center;
  color: #262626;
}
.more-item .mi-ico svg { display: block; }
.more-item:active .mi-ico { background: #f0f1f3; }
/* 「我的资料」里的安卓安装包入口 */
a.apk-entry { display: inline-block; width: 100%; text-align: center; }
/* 深色壁纸模式下输入区与更多面板的适配 */
body.bg-dark-bg .more-item .mi-ico { background: rgba(255, 255, 255, .1); color: #e8e8e8; box-shadow: none; }
body.bg-dark-bg .more-item:active .mi-ico { background: rgba(255, 255, 255, .16); }
body.bg-dark-bg .more-item { color: #b5b5b5; }
body.bg-dark-bg .hold-talk { background: rgba(255, 255, 255, .07); color: var(--text); }
body.bg-dark-bg .hold-talk.is-rec, body.bg-dark-bg .hold-talk:active { background: rgba(255, 255, 255, .13); }
body.bg-dark-bg .composer-main #msgInput { background: rgba(255, 255, 255, .06); color: var(--text); }
body.bg-dark-bg .composer-main .tool:hover { background: rgba(255, 255, 255, .1); opacity: 1; }
body.bg-dark-bg .tool.is-active { background: rgba(255, 255, 255, .12); }
.composer-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.composer-foot .hint { font-size: 11px; color: var(--text-3); }
.btn-send { padding: 5px 18px; border-radius: 4px; background: #e9e9e9; color: #666; font-size: 13px; }
.btn-send.can { background: var(--wx-green); color: #fff; }
.btn-send.can:hover { background: var(--wx-green-dark); }

/* ===== 表情 ===== */
.emoji-pop { position: fixed; z-index: 60; width: 320px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.emoji-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; max-height: 190px; overflow-y: auto; }
.emoji-grid button { height: 30px; font-size: 19px; border-radius: 4px; }
.emoji-grid button:hover { background: #f0f0f0; }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.modal { width: 400px; max-height: 84vh; overflow-y: auto; background: #fff; border-radius: 12px; padding: 24px 26px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal h3 { font-size: 17px; margin-bottom: 6px; }
.modal-sub { font-size: 12px; color: var(--text-2); margin-bottom: 16px; line-height: 1.6; }
.modal-btns { display: flex; gap: 10px; margin-top: 18px; }
.btn-ghost { flex: 1; height: 40px; border-radius: 8px; background: #f2f3f5; color: #555; }
.modal-btns .btn-primary { flex: 1; margin-top: 0; height: 40px; letter-spacing: 0; }

.avatar-pick { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.avatar-pick.compact { margin-bottom: 8px; }
.avatar-preview { width: 56px; height: 56px; flex: none; border-radius: 8px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 32px; overflow: hidden; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-album { display: flex; align-items: center; gap: 10px; margin: -8px 0 14px; }
/* 资料里的密码：固定只读，改密走独立弹窗，避免误改 */
.pwd-fixed { display: flex; align-items: center; gap: 8px; }
.pwd-fixed input { flex: 1; min-width: 0; }
.pwd-fixed .btn-code { flex: none; height: 34px; padding: 0 12px; font-size: 13px; }
/* 只有「不可编辑」的输入框才显示成灰色只读样式；
 * 可编辑的（改昵称 / 重置密码 / 改归属地）要保持白底 + I 型光标 */
.pwd-fixed input:disabled,
.pwd-fixed input[readonly] {
  background: #f5f5f5; color: #999; cursor: default;
  opacity: 1; -webkit-text-fill-color: #999;
}

/* ===== 账号详情 ===== */
.udetail { max-height: 46vh; overflow-y: auto; margin-bottom: 10px; }
.ud-row { display: flex; padding: 7px 2px; border-bottom: 1px dashed #eee; font-size: 13px; }
.ud-key { flex: none; width: 82px; color: #999; }
.ud-val { flex: 1; min-width: 0; word-break: break-all; }
.ud-val.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.modal-btns .btn-ghost.danger { color: #d93025; border-color: #f3c1c1; }
.modal-btns .btn-ghost.warn { color: #b26a00; border-color: #f0d9ac; }
.btn-primary.danger { background: #d93025; }
.check-row {
  display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 4px;
  font-size: 13px; color: #444; cursor: pointer; line-height: 1.5;
}
.check-row input { margin-top: 2px; }
.seg { display: flex; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.seg button { flex: 1; height: 34px; border: 0; background: #fff; font-size: 13px; cursor: pointer; }
.seg button.is-on { background: #07c160; color: #fff; }

/* 删除名单表格 */
.del-table { max-height: 46vh; overflow-y: auto; }
.del-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.del-table th, .del-table td {
  border: 1px solid #e5e5e5; padding: 6px 8px; text-align: left; word-break: break-all;
}
.del-table th { background: #f7f7f7; color: #666; font-weight: 500; }
.del-table .empty { color: #999; font-size: 13px; text-align: center; padding: 18px 0; }

/* 用户协议 */
.agreement-body {
  max-height: 44vh; overflow-y: auto; border: 1px solid var(--line);
  border-radius: 6px; padding: 12px 14px; background: #fafafa; margin-bottom: 10px;
}
.ag-chapter {
  margin: 12px 0 6px; font-size: 14px; font-weight: 500; color: #c8102e;
  border-left: 3px solid #c8102e; padding-left: 8px;
}
.ag-chapter:first-child { margin-top: 0; }
.ag-title { margin: 10px 0 4px; font-size: 13px; font-weight: 500; }
.ag-p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.75; color: #555; }

/* 公告栏视图（独占主区域） */
.pane-ann { flex: 1; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.ann-view-title { font-size: 16px; font-weight: 600; }
.ann-view-tabs { display: flex; gap: 6px; padding: 10px 12px 0; flex-wrap: wrap; }
.ann-view-tabs .atab {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; font-size: 13px; cursor: pointer;
}
.ann-view-tabs .atab.is-on { background: #07c160; color: #fff; border-color: #07c160; }
.ann-list-full { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; }
.ann-list-full .ann-card { max-width: 760px; margin-left: auto; margin-right: auto; }
.ann-list-full .ann-card.is-new { box-shadow: 0 2px 10px rgba(240, 195, 109, .25); }
.ann-view-foot {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-top: 1px solid var(--line); font-size: 12px;
}

/* 公告栏 */
.ann-list { max-height: 46vh; overflow-y: auto; margin-bottom: 10px; }
.ann-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  margin-bottom: 10px; background: #fffdf7; position: relative;
}
.ann-card.is-new { border-color: #f0c36d; background: #fffaf0; }
.ann-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.ann-body { font-size: 13px; line-height: 1.8; white-space: pre-wrap; color: #444; }
.ann-sign { margin-top: 8px; font-size: 12px; color: #888; text-align: right; }
.ann-stamp { margin: 6px 0 0 auto; width: 104px; text-align: right; opacity: .82; transform: rotate(-8deg); }
.stamp-svg { width: 100%; height: auto; display: block; }
.pin-mark {
  display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 3px;
  background: #fdeaea; color: #c8102e; font-size: 11px; vertical-align: 1px;
}
.ann-seg button { font-size: 12px; }
.ann-targets { max-height: 30vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
.ann-pick { display: flex; align-items: center; gap: 6px; padding: 4px 2px; font-size: 13px; cursor: pointer; }
.ann-admin-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }

/* 登录页：本机账号切换 */
.recent-acc { margin-top: 12px; border-top: 1px solid #f0f0f0; padding-top: 8px; }
.ra-title { font-size: 12px; color: #999; margin-bottom: 6px; }
.ra-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.ra-item:hover { background: #f5f5f5; }
.ra-av { width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: #eee; }
.ra-name { font-weight: 500; }
.ra-wx { color: #999; font-size: 12px; }

/* 单聊 / 群聊管理：会话内搜索条 */
.dm-search { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.dm-search input { flex: 1; min-width: 0; height: 32px; }

/* 聊天记录 tab：与消息审查同款布局 */
.mf-mode { margin-bottom: 10px; max-width: 280px; }
.mf-tip { margin: 0 0 10px; font-size: 12px; }
.mf-wipe { margin-top: 14px; text-align: center; }

/* 用户删除公告（证书） */
.modal-cert { max-width: 420px; }
.cert {
  border: 2px solid #b8332f; border-radius: 10px; padding: 22px 20px;
  background: #fffdf7; color: #3a3226; font-size: 13px; line-height: 1.9;
}
.cert h2 {
  margin: 0 0 12px; text-align: center; font-size: 19px; letter-spacing: 6px;
  color: #b8332f; font-weight: 700;
}
.cert .c-salute { font-weight: 600; }
.cert .c-reason { margin: 8px 0; text-indent: 2em; }
.cert .c-tail { margin-top: 10px; color: #6b5f4a; }
.cert .c-sign { margin-top: 16px; text-align: right; line-height: 1.8; }
.cert .c-stamp {
  margin: 10px auto 0; width: 116px; opacity: .8; transform: rotate(-8deg);
}
.album-tip { font-size: 12px; color: var(--text-3); }

/* 管理面板 */
.modal-wide { width: 640px; }
.admin-tabs { display: flex; gap: 6px; background: #f2f3f5; padding: 4px; border-radius: 10px; margin-bottom: 12px; }
.atab { flex: 1; padding: 7px 0; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.atab.is-on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.admin-item.is-clickable { cursor: pointer; }
.admin-item.is-clickable:hover { background: #f7f7f7; }
.admin-chat { margin-top: 10px; max-height: 34vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fafafa; }
.admin-chat-head { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.admin-msg { display: flex; gap: 8px; padding: 5px 4px; border-bottom: 1px solid #efefef; font-size: 12px; align-items: flex-start; }
.admin-msg:last-child { border-bottom: none; }
.am-time { color: var(--text-3); flex: none; }
.am-who { color: #2b6cd4; flex: none; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-body { color: #333; word-break: break-word; }
.am-body img { max-width: 160px; max-height: 120px; border-radius: 4px; display: block; }
.admin-toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-toolbar input { flex: 1; height: 36px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fafafa; padding: 0 12px; }
.admin-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.admin-item { display: flex; gap: 10px; padding: 10px 8px; border-bottom: 1px solid #f0f0f0; align-items: flex-start; flex-wrap: wrap; }
.admin-item:last-child { border-bottom: none; }
.admin-av { width: 38px; height: 38px; flex: none; border-radius: 5px; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 20px; overflow: hidden; }
.admin-av img { width: 100%; height: 100%; object-fit: cover; }
.admin-info { flex: 1; min-width: 160px; }
.admin-name { font-size: 14px; }
.admin-wx { font-size: 12px; color: var(--text-2); margin-left: 4px; }
.admin-meta { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.admin-stat { font-size: 11px; color: var(--text-3); }
.admin-ops { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; padding-left: 48px; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 3px; background: #f0f0f0; color: #666; }
.tag-admin { background: #e8f0ff; color: #2b6cd4; }
.tag-on { background: #e6f7ec; color: #06ad56; }
.tag-ban { background: #fdeaea; color: #d93025; }
.tag-mute { background: #fff4e0; color: #b26a00; }
.req-badge {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  padding: 0 5px; margin-left: 6px; border-radius: 9px;
  background: #fa5151; color: #fff; font-size: 11px; text-align: center; vertical-align: middle;
}
.req-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.req-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.req-item .u-info { flex: 1; min-width: 0; }
.req-item .mini-btn { margin-left: 4px; }
.tag-real { background: #eef3ff; color: #3b5bdb; }
.tag-cmo {
  margin-left: 6px; background: linear-gradient(135deg, #ffd76e, #f5a623);
  color: #6b3d00; font-weight: 700; letter-spacing: .3px;
  box-shadow: 0 1px 3px rgba(245, 166, 35, .35);
}
.mini-op { font-size: 12px; padding: 4px 9px; border-radius: 5px; background: #f2f3f5; color: #555; }
.mini-op:hover { background: #e8e8e8; }
.mini-op.warn { background: #fff1f0; color: #d93025; }
.mini-op.danger { background: #d93025; color: #fff; }
.mini-op.ok { background: #e6f7ec; color: #06ad56; }
.mini-op:disabled { opacity: .5; cursor: default; }

.search-result { margin-top: 6px; min-height: 60px; border-top: 1px solid var(--line); padding-top: 12px; }
.muted { color: var(--text-2); font-size: 13px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; }
.user-row .u-av { width: 40px; height: 40px; border-radius: 5px; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.user-row .u-info { flex: 1; min-width: 0; }
.user-row .u-name { font-size: 14px; }
.user-row .u-wx { font-size: 12px; color: var(--text-2); }
.mini-btn { padding: 5px 14px; border-radius: 5px; background: var(--wx-green); color: #fff; font-size: 13px; }
.mini-btn.gray { background: #e6e6e6; color: #999; }

.pick-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.pick-item:hover { background: #f6f6f6; }
.pick-item .box { width: 18px; height: 18px; border-radius: 3px; border: 1.5px solid #cfcfcf; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; }
.pick-item.is-on .box { background: var(--wx-green); border-color: var(--wx-green); }
.pick-name { font-size: 14px; }

.card-head { display: flex; align-items: center; gap: 14px; }
.card-avatar { width: 56px; height: 56px; border-radius: 8px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.card-name { font-size: 17px; font-weight: 500; }
.card-wxid { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.card-sign { margin-top: 14px; font-size: 13px; color: #666; background: #f7f7f7; padding: 10px 12px; border-radius: 8px; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; top: 42px; transform: translateX(-50%);
  z-index: 90; max-width: 74vw;
  background: rgba(0,0,0,.78); color: #fff; font-size: 13px;
  padding: 9px 16px; border-radius: 6px; line-height: 1.5;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.16); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 移动端 ===== */
@media (max-width: 820px) {
  body { background: #fff; }
  .main { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; box-shadow: none; }
  .rail {
    position: absolute; left: 0; bottom: 0; top: auto; width: 100%; height: 52px;
    flex-direction: row; padding: 0; z-index: 30; border-top: 1px solid #3a3a3a;
  }
  .rail-avatar { display: none; }
  .rail-nav { flex-direction: row; flex: 1; justify-content: space-around; gap: 0; }
  .rail-btn { width: 52px; height: 52px; }
  .rail-btn.is-on::before { display: none; }
  .rail-bottom { display: none; }
  .pane-list { width: 100%; border-right: none; }
  .pane-chat { position: absolute; inset: 0; z-index: 20; background: var(--chat-bg); }
  .back-btn { display: block; }
  .chat-status { display: none; }
  .login-card { width: min(380px, 92vw); padding: 28px 22px; }
  .emoji-pop { width: min(320px, 92vw); }
  .modal { width: min(400px, 92vw); }
}

/* 公告页签未读红点 + 卡片展开 */
.ann-view-tabs .atab.has-unread { border-color: #e8a0a0; color: #c8102e; font-weight: 600; }
.tab-dot {
  display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 4px;
  background: #e53935; color: #fff; border-radius: 8px;
  font-size: 11px; line-height: 16px; text-align: center;
}
.ann-card { cursor: pointer; }
.ann-open-tip {
  margin-left: auto; font-size: 12px; color: #07c160; cursor: pointer;
  flex: none; padding: 2px 8px; border: 1px solid #bfe8cf; border-radius: 4px;
  user-select: none; white-space: nowrap;
}
.ann-open-tip:hover { background: #eafff2; }
.ann-detail {
  margin-top: 8px; border-top: 1px dashed #eee; padding-top: 8px;
  max-height: 52vh; overflow-y: auto; overscroll-behavior: contain;
}
/* 公告区域滚动条加宽，方便拖动 */
.ann-list-full::-webkit-scrollbar, .ann-detail::-webkit-scrollbar { width: 10px; }
.ann-list-full::-webkit-scrollbar-thumb, .ann-detail::-webkit-scrollbar-thumb {
  background: #c9c9c9; border-radius: 5px;
}
.ann-list-full::-webkit-scrollbar-thumb:hover, .ann-detail::-webkit-scrollbar-thumb:hover { background: #adadad; }

/* 消息右键菜单 */
.msg-menu {
  position: fixed; z-index: 9999; min-width: 150px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,.16);
}
.mm-item { padding: 8px 12px; font-size: 13px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.mm-item:hover { background: #f2f7f4; }
.msg-pick { display: flex; align-items: center; margin-right: 6px; }
.msg.is-multi { cursor: default; }
.msg-trans { margin-top: 4px; padding: 4px 8px; background: #f3f6ff; border-radius: 4px; font-size: 12px; color: #445; }

/* 多选操作条 */
.multi-bar {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 6px 20px rgba(0,0,0,.14); font-size: 13px; z-index: 40;
}
.fwd-list { max-height: 40vh; overflow-y: auto; margin-bottom: 10px; }
.fwd-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 6px;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.fwd-item:hover { background: #f5f5f5; }
.set-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--line); font-size: 13px;
}
.set-row > span:first-child { width: 84px; flex: none; color: #666; }

/* 深色模式（整体反色，图片与头像再反转回来） */
body.dark { filter: invert(1) hue-rotate(180deg); background: #111; }
body.dark img, body.dark video, body.dark .stamp-svg,
body.dark .ann-stamp, body.dark .c-stamp {
  filter: invert(1) hue-rotate(180deg);
}

/* 表情面板分组 */
.emoji-tabs { display: flex; gap: 4px; padding: 6px 6px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.emoji-tabs .et {
  flex: none; padding: 4px 10px; border: 0; background: none;
  font-size: 12px; color: #888; cursor: pointer; border-radius: 4px 4px 0 0;
}
.emoji-tabs .et.is-on { color: #07c160; font-weight: 600; background: #f0f9f4; }

/* 加号面板入口行 */
.add-hub { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }

/* 抽奖 */
.lucky-limited { border: 1px dashed #f0c36d; background: #fffaf0; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 12.5px; }
.lk-limited div { margin-bottom: 4px; }
.lucky-themes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lucky-themes .lt {
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; font-size: 12px; cursor: pointer;
}
.lucky-themes .lt.is-on { background: #07c160; color: #fff; border-color: #07c160; }
.lucky-modes { max-width: 300px; margin-bottom: 8px; }
.lucky-modes .lm { font-size: 12px; }
.li-row { display: flex; gap: 6px; margin-bottom: 8px; }
.li-row input { flex: 1; min-width: 0; height: 32px; }
.li-list { display: flex; flex-wrap: wrap; gap: 6px; }
.li-item {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  background: #f3f3f3; border-radius: 12px; font-size: 12px;
}
.li-item b { color: #c0392b; cursor: pointer; }
.lucky-result { min-height: 150px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.lk-stage { position: relative; width: 260px; height: 150px; display: flex; align-items: center; justify-content: center; }
.lk-wheel {
  width: 150px; height: 150px; border-radius: 50%; border: 4px solid #07c160;
  position: relative; transition: transform 3s cubic-bezier(.17,.67,.16,1);
}
.lk-seg { position: absolute; left: 50%; top: 50%; font-size: 12px; margin-left: -20px; margin-top: -8px; width: 40px; text-align: center; }
.lk-pointer { position: absolute; top: -6px; color: #c8102e; font-size: 18px; }
.lk-card { position: relative; width: 260px; height: 120px; border: 1px dashed #bbb; border-radius: 8px; overflow: hidden; }
.lk-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; }
.lk-card canvas { position: absolute; inset: 0; cursor: pointer; }
.lk-tube { font-size: 46px; }
.lk-tube.is-shake { animation: lkShake .3s infinite; }
@keyframes lkShake { 0%{transform:rotate(-8deg)} 50%{transform:rotate(8deg)} 100%{transform:rotate(-8deg)} }
.lk-slip { font-size: 40px; font-weight: 700; padding: 6px 20px; border: 2px solid; border-radius: 6px; }
.lk-slip.good { color: #c8102e; border-color: #c8102e; }
.lk-slip.mid { color: #b8860b; border-color: #b8860b; }
.lk-slip.bad { color: #555; border-color: #555; }
.lk-result { text-align: center; }
.lk-label { font-size: 12px; color: #999; }
.lk-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9998; overflow: hidden; }
.lk-confetti i {
  position: absolute; top: -12px; width: 8px; height: 14px;
  animation: lkFall 1.8s linear forwards;
}
@keyframes lkFall {
  to { transform: translateY(100vh) rotate(720deg); opacity: .2; }
}

/* 反馈星级 */
.fb-stars { display: flex; gap: 2px; justify-content: center; margin-bottom: 6px; }
.fb-star { border: 0; background: none; font-size: 24px; color: #ddd; cursor: pointer; padding: 0 1px; }
.fb-star.is-on { color: #f5a623; }
.fb-hint { text-align: center; font-size: 12px; margin-bottom: 8px; }

/* 权限勾选 */
.perm-box { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.perm-item { display: flex; align-items: center; gap: 4px; font-size: 12.5px; cursor: pointer; }

/* 找朋友泡泡 */
.bubble-input { display: flex; gap: 8px; margin-bottom: 10px; }
.bubble-input input { flex: 1; min-width: 0; height: 34px; }
.bubble-sea {
  position: relative; height: 300px; border: 1px solid #bfe3f7; border-radius: 10px;
  background: linear-gradient(180deg, #e8f7fd 0%, #d2ecfa 100%); overflow: hidden;
}
.bubble-float {
  position: absolute; width: 92px; padding: 8px 4px; text-align: center;
  background: rgba(255,255,255,.85); border: 1px solid #bfe3f7; border-radius: 50%;
  box-shadow: 0 4px 14px rgba(80,160,220,.25); cursor: pointer;
  animation: bfFloat 10s ease-in-out infinite alternate; user-select: none;
}
.bubble-float:hover { background: #fff; border-color: #6cc0ea; }
.bf-av { width: 30px; height: 30px; margin: 0 auto; border-radius: 50%; background: #eef6fb; display: flex; align-items: center; justify-content: center; }
.bf-name { font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-hobby { font-size: 11px; color: #4a90c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes bfFloat {
  0% { transform: translate(0, 0); }
  50% { transform: translate(14px, -18px); }
  100% { transform: translate(-10px, 10px); }
}

/* 找回：按 IP 查到的账号 */
.rc-ip-result { margin-top: 6px; max-height: 120px; overflow-y: auto; }
.rc-ip-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed #eee; }
.rc-ip-name { font-weight: 500; }

/* 注销账号：危险操作入口 */
.modal-danger-link { margin: 12px 0 0; text-align: center; }
.modal-danger-link a { font-size: 12.5px; color: #c0392b; text-decoration: none; }
.modal-danger-link a:hover { text-decoration: underline; }
.btn-code.danger { color: #c0392b; border-color: #f0c4c0; }
.btn-code.danger:hover { background: #fdf3f2; }

/* CMO 代注册：结果卡片 */
.reg-done {
  border: 1px solid #e6e6e6; border-radius: 8px; padding: 12px 14px;
  background: #fafafa; margin: 6px 0 14px;
}
.reg-done .rd-row {
  display: flex; gap: 12px; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed #eaeaea;
}
.reg-done .rd-row:last-child { border-bottom: none; }
.reg-done .rd-row span { width: 72px; flex: none; color: #888; }
.reg-done .rd-row b { color: #222; word-break: break-all; }

/* 聊天里的链接：蓝色、可点击、长链接自动换行 */
.bubble .msg-link {
  color: #1a6fd4;
  text-decoration: underline;
  word-break: break-all;
}
.bubble .msg-link:hover { color: #0b57b0; }
.msg.is-self .bubble .msg-link { color: #0b57b0; }

/* 登录页「我有疑问」 */
.ga-status { font-size: 12.5px; color: #8a8a8a; }
.ga-status.is-on { color: #0a8f4d; font-weight: 600; }
.ga-chat {
  max-height: 260px; overflow-y: auto; padding: 10px;
  border: 1px solid #ececec; border-radius: 8px; background: #fafafa;
  margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px;
}
.ga-chat-mini { max-height: 180px; margin-top: 10px; }
.ga-msg { display: flex; flex-direction: column; gap: 3px; max-width: 82%; }
.ga-msg.is-me { align-self: flex-end; align-items: flex-end; }
.ga-msg.is-cmo { align-self: flex-start; align-items: flex-start; }
.ga-bubble {
  padding: 7px 11px; border-radius: 10px; font-size: 13px; line-height: 1.6;
  background: #fff; border: 1px solid #eaeaea; word-break: break-word; white-space: pre-wrap;
}
.ga-msg.is-me .ga-bubble { background: #d9f7e4; border-color: #c3efd4; }
.ga-msg.is-cmo .ga-bubble { background: #fff; }
.ga-msg .msg-link { color: #1a6fd4; text-decoration: underline; word-break: break-all; }
.ga-time { font-size: 10.5px; color: #b0b0b0; }
.ga-input { display: flex; gap: 8px; }
.ga-input input { flex: 1; min-width: 0; height: 36px; }
.ga-input .btn-primary { width: auto; padding: 0 18px; height: 36px; }

/* 深色模式：移动端底部导航 / 更多抽屉 / 公告横幅 */
body.dark .mtab { background: #1c1c1c; border-top-color: #333; }
body.dark .mtab-drawer-panel { background: #1c1c1c; }
body.dark .drawer-item { color: #ddd; }
body.dark .chat-ann { background: #1e2a20; border-color: #2f4032; color: #a9d2b0; }

/* ---------- 自定义背景：全应用统一渲染（所有区域透出所选颜色/图片） ---------- */
/* 亮背景：面板轻微提雾，文字保持深色 */
body.has-user-bg.bg-light-bg .pane-list,
body.has-user-bg.bg-light-bg .pane-chat,
body.has-user-bg.bg-light-bg .pane-full { background: rgba(255, 255, 255, 0.30); }
body.has-user-bg.bg-light-bg .list-head,
body.has-user-bg.bg-light-bg .chat-head,
body.has-user-bg.bg-light-bg .app-foot { background: rgba(255, 255, 255, 0.42); }
body.has-user-bg.bg-light-bg .bubble-other { background: rgba(255, 255, 255, 0.88); }
body.has-user-bg.bg-light-bg .bubble-self { background: rgba(149, 236, 105, 0.88); }
/* 暗背景：文字与描边转浅色，气泡深色 */
body.has-user-bg.bg-dark-bg { --text: #ececec; --text-2: #b8b8b8; --text-3: #9a9a9a; --line: rgba(255, 255, 255, 0.14); --bubble-other: rgba(35, 35, 35, 0.9); --list-bg: transparent; --chat-bg: transparent; --head-bg: transparent; }
body.has-user-bg.bg-dark-bg .pane-list,
body.has-user-bg.bg-dark-bg .pane-chat,
body.has-user-bg.bg-dark-bg .pane-full { background: rgba(10, 10, 12, 0.34); }
body.has-user-bg.bg-dark-bg .list-head,
body.has-user-bg.bg-dark-bg .chat-head,
body.has-user-bg.bg-dark-bg .app-foot { background: rgba(8, 8, 10, 0.40); }
body.has-user-bg.bg-dark-bg .bubble-other { background: rgba(35, 35, 35, 0.9); }
body.has-user-bg.bg-dark-bg .bubble-self { background: rgba(149, 236, 105, 0.85); color: #10301a; }
body.has-user-bg.bg-dark-bg .msg-sys,
body.has-user-bg.bg-dark-bg .msg-time { color: rgba(255, 255, 255, 0.75); background: rgba(0, 0, 0, 0.25); }
/* 底部版权条跟随透明 */
body.has-user-bg .app-foot { background: transparent; }

/* CMO 用户备注标签（仅管理端可见） */
.tag-note { background: #fff7e6; color: #ad6800; border: 1px solid #ffe7ba; }

/* 游戏中心分区标题 */
.gc-section-title { font-size: 14px; font-weight: 600; margin: 14px 2px 8px; }
#gamesSection .full-tabs { margin: 4px 0 8px; }
/* 未上线占位卡 */
.game-card.is-soon { opacity: .75; }
.game-card.is-soon .gc-cover::after { content: "开发中"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.32); color: #fff; font-size: 13px; }
/* 游戏中心头部「更多」按钮（移动端显示） */
#btnMoreFloat2 { display: none; }

/* ================= 朋友圈 · 天气卡片 ================= */
.weather-card {
  margin: 8px 12px 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e8f3ff 0%, #f2fbff 60%, #eefaff 100%);
  border: 1px solid #d6e9f7;
  box-shadow: 0 2px 8px rgba(70, 130, 180, .08);
}
body.bg-dark-bg .weather-card { background: rgba(30, 42, 58, .75); border-color: rgba(255,255,255,.12); }
.wx-now { display: flex; align-items: center; gap: 10px; }
.wx-icon { font-size: 30px; line-height: 1; }
.wx-temp { font-size: 26px; font-weight: 700; color: #1d3557; }
body.bg-dark-bg .wx-temp { color: #cfe6ff; }
.wx-main { font-size: 14px; color: #40546b; }
body.bg-dark-bg .wx-main { color: #a9c2dd; }
.wx-city {
  margin-left: auto;
  border: none; background: rgba(255,255,255,.65); color: #2563a8;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
body.bg-dark-bg .wx-city { background: rgba(255,255,255,.12); color: #9ecbff; }
.wx-sub { font-size: 12px; color: #6b7f94; margin: 4px 0 6px 40px; }
body.bg-dark-bg .wx-sub { color: #8fa9c4; }
.wx-days { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 40px; }
.wx-day {
  font-size: 11.5px; color: #40546b; background: rgba(255,255,255,.6);
  padding: 3px 8px; border-radius: 8px; white-space: nowrap;
}
body.bg-dark-bg .wx-day { background: rgba(255,255,255,.1); color: #b6cbe2; }
.wx-ask .wx-temp { font-size: 18px; }
.wx-err { padding: 0 12px 6px; font-size: 12px; }
.wx-loading { padding: 10px 2px; }

/* ================= CMO 管理面板 · AI帮手 ================= */
.aih-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.aih-head {
  font-size: 15px; font-weight: 700; margin: 4px 0 10px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.aih-head .aih-sub { font-size: 11.5px; font-weight: 400; color: #8a97a6; }
.aih-msgs {
  flex: 1; min-height: 220px; max-height: 46vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 10px;
}
.aih-msg {
  max-width: 86%; padding: 8px 12px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.65; word-break: break-word;
}
.aih-msg.bot { background: #f2f4f7; color: #222; border-top-left-radius: 4px; align-self: flex-start; }
body.bg-dark-bg .aih-msg.bot { background: rgba(255,255,255,.1); color: #e6eef7; }
.aih-msg.me { background: #95ec69; color: #10301a; border-top-right-radius: 4px; align-self: flex-end; }
.aih-msg.aih-err { background: #fdecec; color: #b42318; }
body.bg-dark-bg .aih-msg.aih-err { background: rgba(180,35,24,.25); color: #ffb4ab; }
.aih-msg.aih-thinking { color: #8a97a6; font-style: italic; }
.aih-tag {
  display: inline-block; font-size: 11px; color: #2563a8; background: rgba(37,99,168,.1);
  border-radius: 999px; padding: 1px 8px; margin-bottom: 6px; margin-right: 6px;
}
body.bg-dark-bg .aih-tag { color: #9ecbff; background: rgba(158,203,255,.14); }
.aih-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.aih-chip {
  border: 1px solid var(--line, #ddd); background: var(--card, #fff); color: #2563a8;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
body.bg-dark-bg .aih-chip { background: rgba(255,255,255,.08); color: #9ecbff; border-color: rgba(255,255,255,.15); }
.aih-input { display: flex; gap: 8px; }
.aih-input input {
  flex: 1; padding: 9px 12px; border: 1px solid var(--line, #ddd);
  border-radius: 10px; font-size: 13.5px; background: var(--card, #fff); color: inherit;
}

/* 登录卡片始终白底深字：不跟随自定义背景的深浅模式（否则深色背景下标题/标签/账号名几乎不可见） */
body.has-user-bg .login-card,
body.has-user-bg.bg-dark-bg .login-card,
body.has-user-bg.bg-light-bg .login-card {
  --text: #191919;
  --text-2: #7f7f7f;
  --text-3: #b2b2b2;
  --line: #e5e5e5;
}

/* ================= 会话右键菜单 ================= */
.ctx-menu {
  position: fixed; z-index: 500; min-width: 168px;
  background: #fff; border-radius: 10px; padding: 5px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); border: 1px solid #ececec;
}
.ctx-item { padding: 8px 14px; font-size: 13.5px; color: #222; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.ctx-item:hover { background: #f2f4f7; }

/* ================= 聊天设置面板（⋯ 微信风格） ================= */
.wxs-layer { position: fixed; inset: 0; z-index: 480; background: rgba(0,0,0,.18); }
.wxs-panel {
  position: absolute; top: 64px; right: 16px; width: 280px;
  background: #fff; border-radius: 14px; padding: 8px 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.2);
}
.wxs-title { font-size: 13px; color: #8a8a8a; padding: 8px 2px 6px; border-bottom: 1px solid #f0f0f0; }
.wxs-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 2px; font-size: 14px; color: #222; border-bottom: 1px solid #f5f5f5;
}
.wxs-row:last-child { border-bottom: none; }
.wxs-act { cursor: pointer; }
.wxs-act:hover { background: #fafafa; }
.wxs-go { color: #c0c0c0; }
.wxs-danger span:first-child { color: #fa5151; }
.wxs-note { font-size: 11.5px; color: #b2b2b2; padding: 8px 2px 4px; }
/* 微信式开关 */
.wx-toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; cursor: pointer; }
.wx-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.wx-toggle i {
  position: absolute; inset: 0; border-radius: 999px; background: #dfdfe2; transition: background .18s;
}
.wx-toggle i::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s;
}
.wx-toggle input:checked + i { background: #07c160; }
.wx-toggle input:checked + i::after { transform: translateX(18px); }
.wx-toggle.is-dis { opacity: .45; cursor: not-allowed; }

/* 免打扰：灰色小角标 + 名字旁小铃 */
.badge.is-quiet { background: #c4c6c9; box-shadow: none; }
.quiet-mark { font-size: 10px; margin-right: 2px; }

/* ================= AI 输入区（元宝风格） ================= */
.composer.ai-mode {
  border: 1.5px solid #e3e7ec; border-radius: 20px;
  margin: 0 12px 10px; padding: 10px 12px 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06); background: #fff;
}
.composer.ai-mode .composer-tools { display: none; }
.composer.ai-mode #msgInput { height: 60px; }
.composer.ai-mode .composer-foot .hint { display: none; }
.ai-chip-wrap {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid #f0f2f5;
}
.ai-chip-holder { position: relative; display: inline-flex; }
.ai-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid #e5e7eb;
  background: #f6f8fa; font-size: 12.5px; color: #333; cursor: pointer; white-space: nowrap;
}
.ai-chip:hover { background: #eef1f4; }
.ai-caret { font-size: 10px; color: #999; }
.ai-select {
  appearance: none; -webkit-appearance: none; padding: 6px 26px 6px 12px;
  background-color: #f6f8fa; color: #333; font-size: 12.5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.ai-mode-menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 60;
  background: #fff; border-radius: 12px; padding: 6px; min-width: 250px;
  box-shadow: 0 10px 34px rgba(0,0,0,.16); border: 1px solid #eef0f3;
}
.ai-mode-menu button {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; padding: 9px 12px; border-radius: 9px;
  font-size: 13.5px; color: #222; text-align: left; cursor: pointer;
}
.ai-mode-menu button:hover { background: #f2f4f7; }
.ai-mode-menu button.is-on { background: #eef7ef; color: #07c160; font-weight: 600; }
.ai-mode-desc { font-size: 11px; color: #999; font-weight: 400; margin-top: 1px; }
body.bg-dark-bg .ai-chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #d8e2ec; }
body.bg-dark-bg .ai-mode-menu { background: #1c2430; border-color: rgba(255,255,255,.12); }
body.bg-dark-bg .ai-mode-menu button { color: #d8e2ec; }
body.bg-dark-bg .composer.ai-mode { background: rgba(20,26,34,.92); border-color: rgba(255,255,255,.12); }

/* ================= AI 思考中动态效果 ================= */
.ai-think { display: flex; align-items: center; gap: 9px; padding: 2px 0; }
.ai-think-label {
  font-size: 13px; font-weight: 600; letter-spacing: .5px;
  background: linear-gradient(90deg, #9aa1ab 20%, #07c160 50%, #9aa1ab 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: aiShimmer 1.6s linear infinite;
}
.ai-dots { display: inline-flex; gap: 4px; align-items: flex-end; height: 14px; }
.ai-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: #07c160;
  animation: aiDotBounce 1.2s ease-in-out infinite;
}
.ai-dots i:nth-child(2) { animation-delay: .15s; }
.ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-5px); opacity: 1; }
}
@keyframes aiShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
body.bg-dark-bg .ai-think-label {
  background: linear-gradient(90deg, #6b7684 20%, #4ade80 50%, #6b7684 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
}

/* ================= 语音消息气泡 ================= */
.voice-msg {
  display: flex; align-items: center; gap: 9px;
  min-width: 130px; cursor: pointer; user-select: none; -webkit-user-select: none;
}
.voice-play {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: rgba(0,0,0,.08); display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #333; padding-left: 2px;
}
.msg.is-self .voice-play { background: rgba(255,255,255,.55); color: #0a6b39; }
.voice-wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.voice-wave i {
  width: 3px; border-radius: 2px; background: currentColor; opacity: .55;
  height: 8px; transition: height .2s;
}
.voice-wave i:nth-child(2) { height: 14px; }
.voice-wave i:nth-child(3) { height: 18px; }
.voice-wave i:nth-child(4) { height: 12px; }
.voice-wave i:nth-child(5) { height: 16px; }
.voice-wave i:nth-child(6) { height: 9px; }
.voice-msg.playing .voice-wave i { animation: voiceWave .7s ease-in-out infinite alternate; }
.voice-msg.playing .voice-wave i:nth-child(2) { animation-delay: .1s; }
.voice-msg.playing .voice-wave i:nth-child(3) { animation-delay: .2s; }
.voice-msg.playing .voice-wave i:nth-child(4) { animation-delay: .3s; }
.voice-msg.playing .voice-wave i:nth-child(5) { animation-delay: .4s; }
.voice-msg.playing .voice-wave i:nth-child(6) { animation-delay: .5s; }
@keyframes voiceWave { from { height: 5px; } to { height: 18px; } }
.voice-dur { font-size: 12.5px; opacity: .8; white-space: nowrap; }
/* 录音中：麦克风按钮红色脉动 */
.tool.recording {
  background: #ffecec !important; color: #fa5151 !important; opacity: 1 !important;
  animation: recPulse 1s ease-in-out infinite;
}
@keyframes recPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(250,81,81,.5); }
  50% { box-shadow: 0 0 0 7px rgba(250,81,81,0); }
}

/* ================= 性别选择（注册 / 资料） ================= */
.gender-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.gender-seg button {
  flex: 1; min-width: 74px; padding: 9px 0; border-radius: 9px;
  border: 1px solid var(--line, #e0e0e0); background: #f6f8fa;
  font-size: 13.5px; color: #444; cursor: pointer; white-space: nowrap;
}
.gender-seg button:hover { background: #eef1f4; }
.gender-seg button.is-on {
  background: #e8f8ef; border-color: #07c160; color: #07c160; font-weight: 600;
}

/* ================= 回到底部悬浮球 ================= */
.jump-bottom {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 96px;
  z-index: 30; padding: 8px 16px; border-radius: 999px;
  background: #07c160; color: #fff; font-size: 13px; border: none;
  box-shadow: 0 4px 14px rgba(7,193,96,.4); cursor: pointer; white-space: nowrap;
}
.jump-bottom b { font-weight: 700; }
.jump-bottom:active { transform: translateX(-50%) scale(.95); }

/* ================= AI 对话历史面板 ================= */
.ai-hist-list { max-height: 46vh; overflow-y: auto; margin: 8px 0 4px; }
.ai-hist-item { padding: 10px 12px; border-radius: 10px; cursor: pointer; border-bottom: 1px solid #f2f2f2; }
.ai-hist-item:hover { background: #f5f7fa; }
.ai-hist-title { font-size: 14px; color: #222; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-hist-meta { font-size: 11.5px; color: #999; margin-top: 3px; }
body.bg-dark-bg .ai-hist-item { border-color: rgba(255,255,255,.08); color: #d8e2ec; }
body.bg-dark-bg .ai-hist-item:hover { background: rgba(255,255,255,.06); }

/* 「＋」功能面板按钮仅移动端显示（桌面端功能在输入框上方的胶囊里） */
#aiPlus { display: none; }

/* ================= 侧栏「更多」弹出组（文件/收藏/意见箱） ================= */
.rail-more { position: relative; }
.rail-flyout {
  position: absolute; left: calc(100% + 10px); bottom: 0; z-index: 90;
  display: none; flex-direction: column; gap: 4px;
  background: #fff; border: 1px solid #ececec; border-radius: 12px;
  padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.rail-more:hover .rail-flyout, .rail-flyout:hover { display: flex; }
.rail-flyout .rail-btn { background: none; }

/* ================= 公告删除键（管理员） ================= */
.ann-del { cursor: pointer; font-size: 13px; opacity: .55; margin-left: 4px; }
.ann-del:hover { opacity: 1; }

/* ================= 移动端「发现」页 ================= */
.discover-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 10px;
  padding: 20px 14px;
}
.discover-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: none; cursor: pointer; color: #333; font-size: 12px; padding: 0;
}
.discover-item .dc-ico {
  width: 50px; height: 50px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.discover-item:active .dc-ico { transform: scale(.93); }
.mtab-emoji { font-size: 22px; line-height: 1; }
body.bg-dark-bg .discover-item { color: #d8e2ec; }
body.bg-dark-bg .discover-item .dc-ico { background: rgba(255,255,255,.08); }

/* ☰ 按钮在深色侧栏上更醒目 */
#btnRailMore { color: #f2f4f7; }
#btnRailMore:hover { background: rgba(255,255,255,.14); border-radius: 12px; }

/* 弹出组：贴紧 ☰（无间隙，鼠标靠近/移动过去不会消失），按钮各自成白色卡片 */
.rail-flyout { left: 100%; padding-left: 10px; background: transparent; border: none; box-shadow: none; }
.rail-flyout .rail-btn {
  width: 44px; height: 44px; background: #fff; border: 1px solid #ececec;
  border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.rail-flyout .rail-btn:hover { background: #f2f4f7; }
body.bg-dark-bg .rail-flyout .rail-btn { background: #1c2430; border-color: rgba(255,255,255,.14); }

/* ================= 输入框右键菜单（Chrome 风格） ================= */
.ictx-menu {
  position: fixed; z-index: 520; min-width: 150px;
  background: #fff; border-radius: 10px; padding: 5px;
  box-shadow: 0 10px 34px rgba(0,0,0,.2); border: 1px solid #ececec;
}
.ictx-item { padding: 8px 14px; font-size: 13.5px; color: #222; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.ictx-item:hover { background: #f2f4f7; }
.ictx-item.is-dis { opacity: .38; cursor: default; }
.ictx-item.is-dis:hover { background: none; }
body.bg-dark-bg .ictx-menu { background: #1c2430; border-color: rgba(255,255,255,.14); }
body.bg-dark-bg .ictx-item { color: #d8e2ec; }
body.bg-dark-bg .ictx-item:hover { background: rgba(255,255,255,.08); }

/* 资料弹窗底部操作行：退出登录 + 保存 各占一半，永远横排 */
.modal-btns-bottom { display: flex; gap: 10px; margin-top: 8px; }
.modal-btns-bottom .btn-ghost, .modal-btns-bottom .btn-primary { flex: 1; }

/* 性别胶囊：去掉边框，纯底色更柔和 */
.gender-seg button { border: none; background: #f3f4f6; }
.gender-seg button.is-on { background: #e8f8ef; border: none; box-shadow: none; }

/* ================= 引用回复 ================= */
.reply-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 0 12px 6px; padding: 7px 12px;
  background: #f2f4f7; border-left: 3px solid #07c160; border-radius: 8px;
  font-size: 12.5px; color: #444;
}
.reply-bar .reply-line { display: none; }
.reply-bar .reply-body { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar .reply-body b { color: #07c160; }
.reply-bar .reply-x {
  border: none; background: none; cursor: pointer; color: #999;
  font-size: 13px; padding: 2px 4px; flex: none;
}
.reply-bar .reply-x:hover { color: #333; }
.msg-ref {
  font-size: 12px; color: #666; background: rgba(0,0,0,.05);
  border-left: 3px solid #07c160; border-radius: 6px;
  padding: 5px 8px; margin-bottom: 5px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-ref b { color: #07c160; }
.msg-ref:hover { background: rgba(0,0,0,.09); }
.msg.is-self .msg-ref { background: rgba(255,255,255,.35); color: #14532d; border-left-color: #14532d; }
.msg.is-self .msg-ref b { color: #14532d; }
@keyframes refFlash { 0%,100% { background: transparent; } 30% { background: rgba(7,193,96,.18); } }
.msg.ref-flash { animation: refFlash 1.6s ease; }
body.bg-dark-bg .reply-bar { background: rgba(255,255,255,.08); color: #d8e2ec; }
body.bg-dark-bg .msg-ref { background: rgba(255,255,255,.08); color: #b9c6d2; }
body.bg-dark-bg .msg.is-self .msg-ref { background: rgba(255,255,255,.15); }

/* ☰ 弹出组：hover 交给 JS 控制（带 260ms 延迟关闭），避免样式卡死 */
.rail-more:hover .rail-flyout { display: none; }
.rail-flyout { transition: opacity .15s ease; opacity: 0; pointer-events: none; }
.rail-flyout.is-open { display: flex; opacity: 1; pointer-events: auto; }

/* ================= 在线状态点（绿=在线 红=离线） ================= */
.dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin: 0 4px 1px 2px; vertical-align: middle; flex: none;
}
.dot.g { background: #07c160; box-shadow: 0 0 0 2px rgba(7,193,96,.15); }
.dot.r { background: #e74c3c; box-shadow: 0 0 0 2px rgba(231,76,60,.12); }

/* ================= 深色模式 v2：QQ 风格（深灰面板 + 柔和对比，不再纯黑） ================= */
body.bg-dark-bg { background: #17181b; color: #d7dade; }
body.bg-dark-bg .pane-list, body.bg-dark-bg .pane-chat, body.bg-dark-bg .pane-full { background: #1e2023; }
body.bg-dark-bg .list-head, body.bg-dark-bg .chat-head, body.bg-dark-bg .app-foot { background: #232528; }
body.bg-dark-bg .rail { background: #1a1c1f; }
body.bg-dark-bg .conv:hover, body.bg-dark-bg .conv.is-on { background: #2a2d31; }
body.bg-dark-bg .conv-msg, body.bg-dark-bg .conv-time { color: #9aa0a6; }
body.bg-dark-bg .bubble-other { background: #2c2f34; color: #d7dade; }
body.bg-dark-bg .bubble-self { background: linear-gradient(180deg, #3d7eff, #2b62d9); color: #fff; }
body.bg-dark-bg .composer { background: #232528; border-color: rgba(255,255,255,.08); }
body.bg-dark-bg #msgInput, body.bg-dark-bg .ai-select, body.bg-dark-bg input, body.bg-dark-bg select {
  background: #17181b; color: #d7dade; border-color: rgba(255,255,255,.12);
}
body.bg-dark-bg .modal, body.bg-dark-bg .qr-box, body.bg-dark-bg .msg-menu, body.bg-dark-bg .mm-item { background: #232528; color: #d7dade; }
body.bg-dark-bg .settings-view, body.bg-dark-bg .full-body, body.bg-dark-bg .settings-row { background: transparent; color: #d7dade; }
body.bg-dark-bg .tag, body.bg-dark-bg .muted { color: #9aa0a6; }
body.bg-dark-bg .btn-code { background: rgba(255,255,255,.08); color: #6ab7ff; border-color: rgba(255,255,255,.14); }
body.bg-dark-bg .btn-primary { background: #2b62d9; border-color: #2b62d9; }
body.bg-dark-bg .weather-card { background: #232528; border-color: rgba(255,255,255,.1); }
body.bg-dark-bg .wx-temp, body.bg-dark-bg .wx-main { color: #d7dade; }
body.bg-dark-bg .wx-sub, body.bg-dark-bg .wx-day { color: #9aa0a6; background: rgba(255,255,255,.06); }
body.bg-dark-bg .gc-section-title { color: #d7dade; }
body.bg-dark-bg ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }

/* 修复：is-open 必须压过 hover 隐藏规则（否则 ☰ 永远弹不出） */
.rail-flyout.is-open,
.rail-more:hover .rail-flyout.is-open { display: flex !important; opacity: 1; pointer-events: auto; }

/* ================= 元宝式 AI 左侧栏（桌面端） ================= */
.pane-chat { position: relative; }
.ai-sidebar {
  display: none; position: absolute; left: 0; top: 0; bottom: 0; width: 208px;
  background: #f7f8fa; border-right: 1px solid #ececec;
  padding: 12px 10px; z-index: 6; overflow-y: auto; flex-direction: column; gap: 6px;
}
body.ai-open .ai-sidebar { display: flex; }
body.ai-open .pane-chat .msg-scroll,
body.ai-open .pane-chat .composer,
body.ai-open .pane-chat .jump-bottom { margin-left: 208px; }
.ai-side-head { display: flex; gap: 6px; align-items: stretch; }
.ai-side-toggle {
  width: 38px; flex: none; border-radius: 10px; border: none; cursor: pointer;
  background: rgba(0,0,0,.05); color: #666; font-size: 18px; line-height: 1;
}
.ai-side-toggle:hover { background: rgba(0,0,0,.1); }
body.bg-dark-bg .ai-side-toggle { background: rgba(255,255,255,.08); color: #d7dade; }
.ai-side-new {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: none; cursor: pointer;
  background: #e8f8ef; color: #07c160; font-size: 14px; font-weight: 600; text-align: left;
}
.ai-side-new:hover { background: #d9f2e3; }
.ai-side-title { font-size: 11.5px; color: #999; margin: 10px 4px 2px; }
.ai-side-list { flex: 1; overflow-y: auto; }
.ai-side-item {
  padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; color: #333;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px;
}
.ai-side-item:hover { background: #eef0f3; }
.ai-side-item.is-on { background: #e8f8ef; color: #07c160; font-weight: 600; }
.ai-side-item .ai-side-count { float: right; font-size: 11px; color: #aaa; font-weight: 400; }
body.ai-open .chat-head { margin-left: 208px; }
@media (max-width: 820px) {
  .ai-sidebar { display: none !important; }
  body.ai-open .pane-chat .msg-scroll, body.ai-open .pane-chat .composer,
  body.ai-open .pane-chat .jump-bottom, body.ai-open .chat-head { margin-left: 0; }
}

/* AI 侧栏收起（元宝式：点聊天区左上角 ← 切换，仅桌面） */
body.ai-open.ai-side-collapsed .ai-sidebar { display: none !important; }
body.ai-open.ai-side-collapsed .pane-chat .msg-scroll,
body.ai-open.ai-side-collapsed .pane-chat .composer,
body.ai-open.ai-side-collapsed .pane-chat .jump-bottom,
body.ai-open.ai-side-collapsed .chat-head { margin-left: 0; }

/* ================= 收起会话列表（仅桌面） ================= */
.side-toggle {
  width: 26px; height: 30px; border: none; background: none; cursor: pointer;
  color: #888; font-size: 15px; border-radius: 7px; flex: none;
}
.side-toggle:hover { background: #ececec; color: #333; }
.side-expand {
  position: absolute; left: 6px; top: 8px; z-index: 45; width: 28px; height: 28px;
  border-radius: 8px; border: 1px solid #e5e5e5; background: #fff; cursor: pointer;
  display: none; align-items: center; justify-content: center; font-size: 14px; color: #666;
}
.side-expand:hover { background: #f2f4f7; }
body.side-collapsed .pane-list { display: none; }
body.side-collapsed .side-expand { display: flex; }
@media (max-width: 820px) {
  body.side-collapsed .pane-list { display: flex; }
  body.side-collapsed .side-expand { display: none; }
}
body.bg-dark-bg .ai-sidebar { background: #1e2023; border-color: rgba(255,255,255,.08); }
body.bg-dark-bg .ai-side-new { background: rgba(7,193,96,.18); color: #5fe0a1; }
body.bg-dark-bg .ai-side-item { color: #d7dade; }
body.bg-dark-bg .ai-side-item:hover { background: rgba(255,255,255,.07); }
body.bg-dark-bg .ai-side-item.is-on { background: rgba(7,193,96,.18); color: #5fe0a1; }
body.bg-dark-bg .side-toggle, body.bg-dark-bg .side-expand { background: rgba(255,255,255,.08); color: #d7dade; border-color: rgba(255,255,255,.14); }

/* ================= 用户等级徽标（聊天/列表/详情） ================= */
.lv-badge {
  display: inline-block; font-size: 10px; line-height: 1; padding: 2px 5px;
  background: #fff7e6; color: #d48806; border: 1px solid #f5d89a;
  border-radius: 5px; margin-left: 4px; font-weight: 700; vertical-align: middle;
}
body.bg-dark-bg .lv-badge { background: rgba(230,162,60,.16); color: #ffc069; border-color: rgba(255,192,105,.3); }

/* ================= AI 待发图片预览条 ================= */
.ai-pend-bar { display: flex; gap: 8px; margin: 0 12px 6px; flex-wrap: wrap; }
.ai-pend-thumb { position: relative; width: 46px; height: 46px; border-radius: 8px; overflow: hidden; border: 1px solid #e0e0e0; }
.ai-pend-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-pend-x {
  position: absolute; top: 0; right: 0; width: 16px; height: 16px;
  border: none; border-radius: 0 0 0 6px; background: rgba(0,0,0,.55);
  color: #fff; font-size: 10px; cursor: pointer; line-height: 1;
}
body.bg-dark-bg .ai-pend-thumb { border-color: rgba(255,255,255,.15); background: #17181b; }

/* ================= 「更多」抽屉（全端可用：桌面居中卡片，手机底部弹出见 mobile.css） ================= */
.mtab-drawer {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
}
.mtab-drawer[hidden] { display: none !important; }
.mtab-drawer-panel {
  width: min(480px, 92vw); max-height: 72vh; overflow-y: auto;
  background: #f7f7f7; border-radius: 16px; padding: 18px 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.mtab-drawer-title { font-size: 13px; color: #8a8a8a; margin: 0 0 12px 4px; }
.drawer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
.drawer-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; padding: 0; cursor: pointer; color: #333;
}
.drawer-item .di-ico {
  width: 46px; height: 46px; border-radius: 12px; background: #07c160;
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff;
}
.drawer-item span { font-size: 11.5px; }
.drawer-item:hover .di-ico { opacity: .85; }

/* ================= 内置游戏全屏弹层（跳一跳/接龙/消消乐共用） ================= */#jumpGameLayer { background: #080b1a; }
.game-layer-close {
  position: absolute; top: 14px; right: 16px; z-index: 10; width: 38px; height: 38px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1);
  color: #fff; font-size: 16px; cursor: pointer;
}
.game-layer-close:hover { background: rgba(255,255,255,.22); }

/* ================= 在线状态点 v2：离线改灰色（红色太像封禁） ================= */
.dot.r { background: #b3b9c0; box-shadow: 0 0 0 2px rgba(0,0,0,.06); }

/* ================= 图片消息：限宽 + 可点开大图 ================= */
.msg .media, .media { max-width: min(240px, 62vw); max-height: 300px; border-radius: 12px; cursor: zoom-in; display: block; }
.lb-layer { position: fixed; inset: 0; z-index: 560; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lb-layer img { max-width: 92vw; max-height: 74vh; object-fit: contain; border-radius: 6px; touch-action: none; cursor: grab; will-change: transform; }
.lb-layer img:active { cursor: grabbing; }
.lb-bar { margin-top: 14px; display: flex; gap: 12px; }
.lb-bar button {
  padding: 9px 22px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; font-size: 14px; cursor: pointer;
}
.lb-bar button:hover { background: rgba(255,255,255,.24); }

/* ================= 管理面板移动端适配 ================= */
@media (max-width: 820px) {
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-item { flex-wrap: wrap; }
  .admin-ops { width: 100%; margin-top: 6px; }
  .aih-wrap { height: auto; }
  .aih-msgs { max-height: 46vh; }
}

/* 收起侧栏按钮移入黑色导航栏顶部（修复挤在搜索框旁的问题） */
.side-toggle { width: 0; height: 0; border: none; padding: 0; overflow: hidden; }
#btnSideToggle.ico, #btnSideToggle { color: #cfd4da; }
#btnSideToggle:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- 移动端好友消息提醒（顶部下滑通知条） ---------- */
#msgNotify {
  position: fixed; top: 10px; left: 12px; right: 12px; z-index: 9998;
  display: flex; align-items: center; gap: 10px;
  background: rgba(28, 30, 34, .96); color: #fff;
  border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
  transform: translateY(-140%); opacity: 0;
  transition: transform .28s cubic-bezier(.2, .8, .3, 1), opacity .28s ease;
  cursor: pointer; pointer-events: none;
}
#msgNotify.is-on { transform: translateY(0); opacity: 1; pointer-events: auto; }
#msgNotify .mn-av {
  width: 36px; height: 36px; flex: none; border-radius: 8px; overflow: hidden;
  background: #3a3d44; display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
#msgNotify .mn-av img { width: 100%; height: 100%; object-fit: cover; }
#msgNotify .mn-body { flex: 1; min-width: 0; }
#msgNotify .mn-name { font-size: 13px; font-weight: 600; }
#msgNotify .mn-text { font-size: 12px; color: #b9bcc2; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------- 资料卡（点头像弹出，微信式） ---------- */
.msg-av.av-link { cursor: pointer; transition: transform .12s ease; }
.msg-av.av-link:active { transform: scale(.9); }
.pc-box { width: 320px; max-width: 92vw; padding: 22px 20px 18px; }
.pc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pc-av {
  width: 64px; height: 64px; flex: none; border-radius: 10px; background: #dcdcdc;
  display: flex; align-items: center; justify-content: center; font-size: 34px; overflow: hidden;
}
.pc-av img { width: 100%; height: 100%; object-fit: cover; }
.pc-id { flex: 1; min-width: 0; }
.pc-name { font-size: 18px; font-weight: 600; color: #111; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-kb { font-size: 12.5px; color: #888; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-online { font-size: 12px; color: #333; margin-top: 4px; }
.pc-actions { border-top: 1px solid #f0f0f0; }
.pc-row {
  display: block; width: 100%; text-align: left; padding: 13px 6px;
  background: none; border: none; border-bottom: 1px solid #f2f2f2;
  font-size: 14.5px; color: #333; cursor: pointer;
}
.pc-row:hover, .pc-row:active { background: #f7f7f7; }
.pc-row.pc-danger { color: #d64541; }
body.bg-dark-bg .pc-box { background: #26282c; }
body.bg-dark-bg .pc-name { color: #f0f0f0; }
body.bg-dark-bg .pc-kb { color: #9a9a9a; }
body.bg-dark-bg .pc-actions { border-top-color: #3a3a3a; }
body.bg-dark-bg .pc-row { color: #d8d8d8; border-bottom-color: #333; }
body.bg-dark-bg .pc-row:hover, body.bg-dark-bg .pc-row:active { background: #33353a; }
body.bg-dark-bg .pc-row.pc-danger { color: #ff7a72; }

/* ---------- 登录页：产品信息弹窗 ---------- */
.pi-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pi-logo {
  width: 58px; height: 58px; flex: none; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(3, 14, 104, .22); object-fit: cover;
}
.pi-title { flex: 1; min-width: 0; }
.pi-title b { display: block; font-size: 18px; color: #111; }
.pi-title span { display: block; font-size: 12.5px; color: #666; margin-top: 3px; }
.pi-title em { display: block; font-style: normal; font-size: 11.5px; color: #999; margin-top: 2px; }
.pi-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: #f7f8fa; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
}
.pi-row { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pi-row span { font-size: 11px; color: #999; }
.pi-row b { font-size: 13px; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-desc { margin-bottom: 14px; }
.pi-desc b { font-size: 13px; color: #333; }
.pi-desc p { font-size: 12px; color: #777; line-height: 1.7; margin-top: 5px; }
.pi-download { border-top: 1px solid #f0f0f0; padding-top: 14px; }
.pi-dl-title { font-size: 13.5px; font-weight: 600; color: #222; margin-bottom: 10px; }
.pi-dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pi-dl-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border-radius: 12px; padding: 14px 6px 12px; text-decoration: none;
  background: #f7f8fa; border: 1.5px solid transparent; transition: transform .12s ease;
}
.pi-dl-card.is-ok { background: #f0fbf2; border-color: #bfe8c8; cursor: pointer; }
.pi-dl-card.is-ok:active { transform: scale(.96); }
.pi-dl-card b { font-size: 12.5px; color: #222; margin-top: 8px; }
.pi-dl-card span { font-size: 10.5px; color: #888; margin-top: 3px; line-height: 1.4; }
.pi-dl-ico { width: 30px; height: 30px; color: #444; }
.pi-ico-android { color: #3ddc84; }
.pi-dl-card.is-ok .pi-dl-ico { color: #3ddc84; }
.pi-dl-btn {
  font-style: normal; font-size: 11px; font-weight: 600; margin-top: 8px;
  padding: 4px 12px; border-radius: 20px;
  background: #07C160; color: #fff;
}
.pi-dl-dis { background: #dfe1e5; color: #9aa0a6; }
/* 深色壁纸适配 */
body.bg-dark-bg .pi-title b { color: #f0f0f0; }
body.bg-dark-bg .pi-title span, body.bg-dark-bg .pi-title em { color: #9a9a9a; }
body.bg-dark-bg .pi-grid { background: #303339; }
body.bg-dark-bg .pi-row span { color: #8a8a8a; }
body.bg-dark-bg .pi-row b { color: #e2e2e2; }
body.bg-dark-bg .pi-desc b { color: #ddd; }
body.bg-dark-bg .pi-desc p { color: #9a9a9a; }
body.bg-dark-bg .pi-download { border-top-color: #3a3a3a; }
body.bg-dark-bg .pi-dl-title { color: #eee; }
body.bg-dark-bg .pi-dl-card { background: #303339; }
body.bg-dark-bg .pi-dl-card.is-ok { background: #1d3327; border-color: #2e6b40; }
body.bg-dark-bg .pi-dl-card b { color: #eee; }
body.bg-dark-bg .pi-dl-card span { color: #9a9a9a; }
body.bg-dark-bg .pi-dl-btn { background: #07C160; color: #fff; }
body.bg-dark-bg .pi-dl-dis { background: #45474d; color: #9aa0a6; }
/* 窄屏：下载卡保持三列但收紧 */
@media (max-width: 480px) {
  .pi-dl-grid { gap: 8px; }
  .pi-dl-card { padding: 12px 4px 10px; }
  .pi-dl-card b { font-size: 11.5px; }
  .pi-dl-card span { font-size: 10px; }
}
