:root {
  /* —— 微信风格配色 —— */
  --bg: #ededed;
  --rail-bg: #2e2e2e;          /* 微信 PC 深色图标栏 */
  --rail-icon: #b6b6b6;
  --rail-icon-active: #07c160;
  --panel-bg: #ededed;         /* 微信 PC 会话栏 */
  --panel-hover: #c9c9c9;
  --chat-bg: #f5f5f5;
  --chat-head-bg: #f5f5f5;
  --bubble-me: #95ec69;        /* 微信自己的绿气泡 */
  --bubble-me-text: #191919;
  --bubble-you: #ffffff;
  --bubble-you-text: #191919;
  --text: #191919;
  --text-sub: #9a9a9a;
  --line: #e3e3e3;
  --accent: #07c160;           /* 微信绿 */
  --accent-dark: #06ad56;
  --danger: #fa5151;
  --ok: #07c160;
  --hover: rgba(0, 0, 0, .05);
  --shadow: 0 2px 12px rgba(0, 0, 0, .09);
  --rail-w: 60px;
  --panel-w: 290px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919;
    --rail-bg: #111111;
    --panel-bg: #262626;
    --panel-hover: #3a3a3a;
    --chat-bg: #191919;
    --chat-head-bg: #262626;
    --bubble-you: #2c2c2c;
    --bubble-you-text: #e8e8e8;
    --text: #e8e8e8;
    --text-sub: #8b8f96;
    --line: #2e2e2e;
    --hover: rgba(255, 255, 255, .05);
    --shadow: 0 2px 12px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; overscroll-behavior: none;
}

#app { height: 100%; }
.app-root { height: 100%; display: flex; flex-direction: column; }
.app-root > .shell { flex: 1; min-height: 0; }
.app-root > .login-wrap { flex: 1; }
.boot-loading { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-sub); }

button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { border: none; background: none; cursor: pointer; padding: 0; }

/* ---------- 登录 ---------- */
.login-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #07c160 0%, #06ad56 55%, #0a9f8f 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 350px; background: #fff; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .16); padding: 32px 26px 22px;
}
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo .mark {
  width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 10px; background: #07c160;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 700;
}
.login-logo h1 { margin: 0; font-size: 19px; font-weight: 500; color: #191919; }
.login-logo p { margin: 6px 0 0; color: #9a9a9a; font-size: 12px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: #888; margin-bottom: 6px; }
.field input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 5px;
  border: 1px solid #e3e3e3; background: #f7f7f7; outline: none; transition: .15s;
}
.field input:focus { border-color: #07c160; background: #fff; }
.btn-primary {
  width: 100%; height: 42px; border-radius: 5px; background: #07c160; color: #fff;
  font-size: 15px; font-weight: 500; transition: .15s;
}
.btn-primary:hover { background: #06ad56; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost {
  height: 32px; padding: 0 12px; border-radius: 4px; background: rgba(0, 0, 0, .05); color: var(--text);
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.btn-ghost:hover { background: rgba(0, 0, 0, .09); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-line { background: transparent; border: 1px solid var(--line); }
.login-switch { text-align: center; margin-top: 16px; font-size: 13px; color: #9a9a9a; }
.login-switch a { color: #07c160; cursor: pointer; text-decoration: none; }
.err { background: #fde7e7; color: #fa5151; padding: 9px 12px; border-radius: 4px; font-size: 13px; margin-bottom: 14px; }

/* ---------- 主框架 ---------- */
.shell { display: flex; height: 100%; background: var(--bg); }

.rail {
  width: var(--rail-w); flex: 0 0 var(--rail-w); background: var(--rail-bg);
  display: flex; flex-direction: column; align-items: center; padding: 16px 0 12px; gap: 4px;
}
.rail-avatar {
  width: 38px; height: 38px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 500; font-size: 16px; margin-bottom: 18px; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.rail-btn {
  width: 46px; height: 40px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  color: var(--rail-icon); position: relative; transition: color .15s;
}
.rail-btn:hover { color: #d6d6d6; }
.rail-btn.active { color: var(--rail-icon-active); }
.rail-btn svg { width: 24px; height: 24px; fill: currentColor; }
.rail-btn .lb { display: none; font-size: 10px; line-height: 1.1; }
.rail-btn .badge {
  position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  background: #fa5151; color: #fff; border-radius: 8px; font-size: 10px; line-height: 16px; text-align: center;
}
.rail-spacer { flex: 1; }

.panel {
  width: var(--panel-w); flex: 0 0 var(--panel-w); background: var(--panel-bg);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0;
}
.panel-head { padding: 12px 12px 8px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-title h2 { margin: 0; font-size: 15px; font-weight: 500; }
.search-input {
  width: 100%; height: 28px; border-radius: 4px; background: #fff; border: 1px solid transparent;
  padding: 0 10px; outline: none; font-size: 13px; color: #191919;
}
.search-input:focus { border-color: #c9c9c9; }
.panel-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.conv-item {
  display: flex; gap: 10px; padding: 9px 12px; cursor: pointer; align-items: center; position: relative;
}
.conv-item:hover { background: rgba(0, 0, 0, .04); }
.conv-item.active { background: var(--panel-hover); }
.avatar {
  width: 40px; height: 40px; border-radius: 5px; flex: 0 0 40px; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 400; font-size: 16px; position: relative;
}
.avatar.sm { width: 34px; height: 34px; flex: 0 0 34px; font-size: 14px; border-radius: 4px; }
.avatar.lg { width: 60px; height: 60px; flex: 0 0 60px; font-size: 24px; border-radius: 6px; }
.avatar .on-dot {
  position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%;
  background: #07c160; border: 2px solid var(--panel-bg);
}
.conv-main { flex: 1; min-width: 0; }
.conv-row1 { display: flex; align-items: center; gap: 6px; }
.conv-name { font-weight: 400; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { font-size: 11px; color: var(--text-sub); flex: 0 0 auto; }
.conv-row2 { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.conv-last {
  flex: 1; min-width: 0; font-size: 12px; color: var(--text-sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conv-unread {
  min-width: 17px; height: 17px; padding: 0 5px; background: #fa5151; color: #fff;
  border-radius: 9px; font-size: 11px; line-height: 17px; text-align: center;
}
.pin-flag { font-size: 11px; color: var(--accent); }

.list-section { padding: 10px 14px 4px; font-size: 12px; color: var(--text-sub); display: flex; justify-content: space-between; align-items: center; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-sub); font-size: 13px; line-height: 1.8; }
.empty .big { font-size: 40px; display: block; margin-bottom: 10px; opacity: .45; }

/* ---------- 聊天区 ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--chat-bg); }
.chat-head {
  height: 56px; flex: 0 0 56px; background: var(--chat-head-bg); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 0 18px;
}
.chat-head .title { font-weight: 500; font-size: 15px; }
.chat-head .sub { font-size: 12px; color: var(--text-sub); }
.chat-head .spacer { flex: 1; }
.chat-notice {
  padding: 8px 18px; background: #fff7e6; color: #b06a00; font-size: 12px;
  border-bottom: 1px solid #f3e3c8; display: flex; gap: 6px; align-items: flex-start;
}
.chat-notice .x { cursor: pointer; margin-left: auto; opacity: .6; }

.msg-scroll { flex: 1; overflow-y: auto; padding: 16px 20px; -webkit-overflow-scrolling: touch; }
.load-more { text-align: center; color: var(--text-sub); font-size: 12px; padding: 6px 0 12px; cursor: pointer; }
.day-sep { text-align: center; margin: 12px 0; }
.day-sep span { background: rgba(0, 0, 0, .06); color: var(--text-sub); font-size: 11px; padding: 3px 8px; border-radius: 3px; }

.msg-row { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.msg-row.me { flex-direction: row-reverse; }
.msg-col { max-width: min(66%, 560px); min-width: 0; display: flex; flex-direction: column; }
.msg-row.me .msg-col { align-items: flex-end; }
.msg-name { font-size: 11px; color: var(--text-sub); margin-bottom: 4px; }
.bubble {
  background: var(--bubble-you); color: var(--bubble-you-text); border-radius: 5px; padding: 9px 12px;
  font-size: 14px; line-height: 1.5; word-break: break-word; position: relative;
}
.msg-row.me .bubble { background: var(--bubble-me); color: var(--bubble-me-text); }
.bubble img { max-width: 100%; border-radius: 4px; display: block; cursor: pointer; }
.bubble .file-card { display: flex; align-items: center; gap: 8px; }
.bubble .file-ico { font-size: 22px; }
.bubble .file-name { text-decoration: underline; word-break: break-all; }
.quote {
  background: rgba(0, 0, 0, .06); border-left: 3px solid rgba(0, 0, 0, .18); padding: 4px 8px;
  border-radius: 3px; margin-bottom: 5px; font-size: 12px; color: var(--text-sub);
  max-height: 52px; overflow: hidden;
}
.msg-row.me .quote { background: rgba(0, 0, 0, .07); border-left-color: rgba(0, 0, 0, .18); color: rgba(0, 0, 0, .55); }
.system-msg { text-align: center; color: var(--text-sub); font-size: 12px; margin: 12px 0; }
.system-msg span { background: rgba(0, 0, 0, .05); padding: 3px 10px; border-radius: 3px; }
.msg-tools { margin-top: 5px; display: flex; gap: 12px; font-size: 11px; color: var(--text-sub); }
.msg-row.me .msg-tools { justify-content: flex-end; }
.msg-tools span { cursor: pointer; }
.msg-tools span:hover { color: var(--accent); }
.recalled { font-style: italic; opacity: .7; }

.chat-input { border-top: 1px solid var(--line); background: var(--panel-bg); }
.chat-input.disabled { opacity: .75; }
.mute-bar {
  padding: 9px 16px; background: #fdecec; color: #d33a3a; font-size: 13px;
  border-top: 1px solid #f5d7d7; display: flex; gap: 8px; align-items: center;
}
.toolbar { display: flex; gap: 4px; padding: 10px 14px 0; }
.tool-btn { width: 32px; height: 30px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 17px; color: #576b95; }
.tool-btn:hover { background: rgba(0, 0, 0, .05); }
.reply-bar {
  margin: 8px 14px 0; padding: 7px 10px; background: #fff; border-radius: 4px; font-size: 12px;
  display: flex; gap: 8px; align-items: center; color: var(--text-sub);
}
.reply-bar .x { cursor: pointer; margin-left: auto; }
.input-area { display: flex; gap: 10px; align-items: flex-end; padding: 8px 14px 14px; }
.input-area textarea {
  flex: 1; resize: none; border: none; outline: none; background: transparent; font-size: 14px;
  line-height: 1.5; max-height: 120px; min-height: 24px; padding: 4px 0;
}
.input-area textarea:disabled { color: #999; }
.send-btn {
  height: 30px; padding: 0 16px; border-radius: 4px; background: #07c160; color: #fff; font-size: 13px;
}
.send-btn:hover { background: #06ad56; }
.send-btn:disabled { opacity: .5; cursor: not-allowed; }
.emoji-panel {
  position: absolute; bottom: 100%; left: 14px; width: 310px; max-height: 190px; overflow-y: auto;
  background: #fff; border: 1px solid #e3e3e3; border-radius: 6px; box-shadow: var(--shadow);
  padding: 8px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; z-index: 30;
}
.emoji-panel span { text-align: center; font-size: 19px; cursor: pointer; padding: 3px 0; border-radius: 4px; }
.emoji-panel span:hover { background: rgba(0, 0, 0, .06); }
.input-wrap { position: relative; flex: 1; }

.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-sub); gap: 12px; }
.chat-empty .logo { width: 92px; height: 92px; border-radius: 18px; background: #07c160; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 500; opacity: .9; }

/* ---------- 我的 ---------- */
.me-wrap { padding: 22px; max-width: 640px; margin: 0 auto; width: 100%; }
.me-card { background: var(--panel-bg); border-radius: 8px; padding: 18px; display: flex; gap: 16px; align-items: center; }
.me-name { font-size: 17px; font-weight: 500; }
.me-sub { color: var(--text-sub); font-size: 12px; margin-top: 5px; }
.me-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.me-row {
  background: var(--panel-bg); border-radius: 8px; padding: 14px 18px; display: flex; align-items: center;
  gap: 12px; cursor: pointer;
}
.me-row:hover { background: var(--hover); }
.me-row .spacer { flex: 1; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-sub); display: inline-block; }
.conn-dot.on { background: var(--ok); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal {
  background: #fff; border-radius: 8px; width: 100%; max-width: 420px; max-height: 86vh;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.modal-head { padding: 15px 18px; border-bottom: 1px solid #ededed; font-weight: 500; display: flex; align-items: center; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--text-sub); font-size: 18px; }
.modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 12px 18px; border-top: 1px solid #ededed; display: flex; gap: 10px; justify-content: flex-end; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px; }
.member-cell { text-align: center; cursor: pointer; }
.member-cell .avatar { margin: 0 auto 4px; }
.member-cell .nm { font-size: 11px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-cell .tag { font-size: 10px; color: #576b95; }
.member-cell .tag.warn { color: #fa5151; }
.member-cell.sel .avatar { box-shadow: 0 0 0 2px var(--accent); }

.pick-list { display: flex; flex-direction: column; gap: 2px; }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 4px; cursor: pointer; }
.pick-item:hover { background: var(--hover); }
.pick-item .spacer { flex: 1; }
.check { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #dcdcdc; flex: 0 0 18px; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 提示 ---------- */
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(0, 0, 0, .75); color: #fff; padding: 9px 16px; border-radius: 4px; font-size: 13px; max-width: 80vw; }
.toast.err { background: rgba(250, 81, 81, .92); }

/* ---------- 移动端（微信 App 风格） ---------- */
.back-btn { display: none; font-size: 22px; cursor: pointer; padding: 0 6px; }

@media (max-width: 860px) {
  :root { --panel-w: 100%; --rail-w: 100%; }
  .shell { flex-direction: column; }

  /* —— 底部 Tab（微信式） —— */
  .rail {
    order: 3; width: 100%; flex: 0 0 52px; flex-direction: row; justify-content: space-around;
    padding: 0; border-top: 1px solid #e3e3e3; background: #f7f7f7;
  }
  .rail-avatar { display: none; }
  .rail-spacer { display: none; }
  .rail-btn { width: 56px; height: 48px; flex-direction: column; gap: 1px; color: #7d7d7d; }
  .rail-btn.active { color: #07c160; }
  .rail-btn svg { width: 23px; height: 23px; }
  .rail-btn .lb { display: block; font-size: 10px; line-height: 1.1; }
  .rail-btn .badge { top: 0; right: 8px; }

  /* —— 列表页顶部导航条 —— */
  .panel { width: 100%; flex: 1; border-right: none; background: #fff; }
  .panel-head {
    background: #ededed; padding: 0 0 8px; position: sticky; top: 0; z-index: 10;
  }
  .panel-title {
    height: 46px; margin-bottom: 0; position: relative; justify-content: center; padding: 0 52px;
  }
  .panel-title h2 { font-size: 17px; font-weight: 500; color: #191919; }
  .panel-title > div {
    position: absolute; right: 10px; top: 0; height: 46px; display: flex; align-items: center; gap: 10px;
  }
  .panel-title > div .btn-ghost {
    background: none; padding: 0 4px; height: 32px; color: #191919; font-size: 17px;
  }
  .search-input { height: 32px; border-radius: 4px; margin: 0 12px; width: calc(100% - 24px); background: #fff; }

  /* —— 会话列表项 —— */
  .conv-item { padding: 11px 14px; border-bottom: 1px solid #f4f4f4; gap: 12px; }
  .conv-item:hover, .conv-item.active { background: #ececec; }
  .conv-item .avatar { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 5px; }
  .conv-name { font-size: 17px; }
  .conv-last { font-size: 14px; }
  .conv-time { font-size: 12px; }
  .conv-row2 { margin-top: 4px; }
  .list-section { padding: 14px 14px 6px; font-size: 13px; }

  /* —— 聊天页 —— */
  .chat { position: fixed; inset: 0; z-index: 50; display: none; }
  body.chat-open .chat { display: flex; }
  body.chat-open .shell > .panel,
  body.chat-open .shell > .rail { display: none; }
  .chat-head {
    background: #07c160; color: #fff; border-bottom: none; height: 48px; flex: 0 0 48px;
    padding: 0 10px; position: relative; justify-content: center;
  }
  .chat-head > .avatar.sm { display: none; }
  .chat-head .title { color: #fff; font-size: 17px; text-align: center; }
  .chat-head .sub { color: rgba(255, 255, 255, .78); font-size: 11px; }
  .chat-head .spacer { display: none; }
  .chat-head .btn-ghost { display: none; }
  .chat-head .more-btn {
    display: flex; position: absolute; right: 10px; top: 8px; background: none; color: #fff;
    font-size: 20px; height: 32px; padding: 0 8px; letter-spacing: 1px;
  }
  .back-btn { display: block; color: #fff; position: absolute; left: 8px; top: 10px; font-size: 24px; }
  .chat-notice { background: #fff7e6; padding: 8px 12px; }
  .msg-scroll { padding: 12px 10px; }
  .msg-row { margin-bottom: 18px; gap: 9px; }
  .msg-col { max-width: 74%; }
  .bubble { font-size: 16px; line-height: 1.45; padding: 10px 13px; border-radius: 6px; }
  .msg-name { font-size: 12px; margin-bottom: 4px; }
  .msg-tools { font-size: 11px; gap: 12px; margin-top: 5px; opacity: .75; }
  .system-msg span { font-size: 12px; }
  .chat-input { background: #f7f7f7; }
  .toolbar { padding: 8px 8px 0; gap: 8px; }
  .tool-btn { width: 34px; height: 32px; font-size: 19px; }
  .input-area { padding: 6px 8px 12px; gap: 8px; }
  .input-area textarea {
    background: #fff; border-radius: 5px; padding: 9px 11px; min-height: 38px; font-size: 16px;
    border: 1px solid #e3e3e3;
  }
  .input-area textarea:focus { border-color: #07c160; }
  .send-btn { height: 34px; padding: 0 18px; border-radius: 5px; font-size: 14px; }
  .rec-bar { margin: 6px 8px 0; }
  .reply-bar { margin: 6px 8px 0; }
  .emoji-panel { left: 8px; width: calc(100vw - 16px); max-width: 320px; }
  .mention-pop { left: 8px; width: calc(100vw - 16px); max-width: 280px; }

  /* —— 移动端弹窗改成底部抽屉（微信式） —— */
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%; border-radius: 14px 14px 0 0; max-height: 76vh;
    padding-bottom: env(safe-area-inset-bottom);
    animation: sheetUp .22s ease-out;
  }
  @keyframes sheetUp { from { transform: translateY(30%); opacity: .6; } to { transform: none; opacity: 1; } }
  .modal-head { padding: 16px 18px; font-size: 16px; }
  .modal-foot { padding: 12px 18px 18px; }
  .modal-foot .btn-ghost { height: 40px; padding: 0 18px; font-size: 15px; }
  .lightbox .lb-close { top: 12px; right: 14px; }
}

@media (min-width: 861px) {
  .mobile-only { display: none !important; }
}


/* ---------- 新增：头像图片 / 灯箱 / 语音 / @ / 公告 ---------- */
.avatar .ava-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px;
}
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 6px; }
.lightbox .lb-close {
  position: absolute; top: 18px; right: 22px; color: #fff; font-size: 26px; cursor: pointer;
}
.lightbox .lb-tip { color: rgba(255, 255, 255, .6); font-size: 12px; }

.bubble.at-me { box-shadow: 0 0 0 1px #fa5151 inset; }
.at-me { color: #fa5151; font-size: 11px; margin-left: 6px; }
.fwd-tip { font-size: 11px; opacity: .55; margin-top: 4px; }
.bubble .voice { height: 34px; max-width: 220px; }
.tool-btn.recording { background: #fa5151; color: #fff; animation: recpulse 1s infinite; }
@keyframes recpulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.rec-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 14px 6px;
  background: #fff; border-radius: 6px; font-size: 13px; color: #d33a3a;
}
.rec-bar .spacer { flex: 1; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #fa5151; animation: recpulse 1s infinite; }

.mention-pop {
  position: absolute; left: 14px; bottom: 100%; width: 240px; max-height: 220px; overflow-y: auto;
  background: #fff; border: 1px solid #e3e3e3; border-radius: 6px; box-shadow: var(--shadow);
  z-index: 40; padding: 4px;
}
.mention-item {
  display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 4px; cursor: pointer; font-size: 13px;
}
.mention-item:hover, .mention-item.on { background: rgba(0, 0, 0, .06); }

.notice-card {
  background: #fff7e6; border: 1px solid #f3e3c8; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px;
}
.notice-title { font-size: 13px; color: #b06a00; font-weight: 500; margin-bottom: 6px; }
.notice-body { font-size: 12px; color: #8a6100; line-height: 1.7; white-space: pre-wrap; }

/* ---------- QQ 风格补充：搜索 / 已读 / 表情回应 / @我的 / 群文件 ---------- */
.search-panel { padding: 10px 14px; background: var(--panel-bg); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.search-panel .search-input { height: 34px; }
.search-results { max-height: 260px; overflow-y: auto; margin-top: 8px; }
.search-hit { padding: 8px 10px; border-radius: 5px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.search-hit:hover { background: var(--hover); }
.hit-text { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-time { font-size: 11px; color: var(--text-sub); flex: 0 0 auto; }

.read-flag { color: var(--accent); }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.reaction {
  background: var(--panel-bg); border: 1px solid var(--line); border-radius: 11px;
  padding: 1px 8px; font-size: 12px; cursor: pointer; line-height: 1.6;
}
.reaction.on { background: rgba(7, 193, 96, .12); border-color: #07c160; color: #07c160; }

.atme-item { padding: 10px; border-bottom: 1px solid var(--line); }
.atme-head { display: flex; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 4px; }
.atme-name { font-weight: 500; color: var(--text); }
.atme-conv { color: var(--text-sub); }
.atme-all { background: #fa5151; color: #fff; border-radius: 3px; padding: 0 5px; font-size: 11px; }
.atme-text { font-size: 13px; line-height: 1.5; color: var(--text); word-break: break-word; }

.file-list { display: flex; flex-direction: column; gap: 2px; }
.file-item { display: flex; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 5px; text-decoration: none; color: inherit; }
.file-item:hover { background: var(--hover); }
.file-thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex: 0 0 40px; background: var(--hover); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.fi-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-sub { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.btn-ghost.green { background: var(--accent); color: #fff; }
