/* =============================================
   聊天室样式：PC 双栏 + 移动单栏自适应
   支持浅色/暗色双主题（data-theme）
   ============================================= */
:root {
  --bg-body: #eef1f5;
  --bg-side: #f7f8fa;
  --bg-main: #fff;
  --bg-chat: #f8fafc;
  --bg-hover: #eef1f5;
  --bg-active: #e2e8f0;
  --border: #eef0f3;
  --border-2: #e2e8f0;
  --border-3: #f1f3f5;
  --text-1: #1f2937;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --text-4: #9ca3af;
  --bubble: #fff;
  --bubble-mine: #bfe3ff;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-dim: #93c5fd;
  --scrollbar: #cbd5e1;
  --online: #22c55e;
  --badge: #ef4444;
}
html[data-theme="dark"] {
  --bg-body: #0f172a;
  --bg-side: #111827;
  --bg-main: #0b1220;
  --bg-chat: #0f172a;
  --bg-hover: #1e293b;
  --bg-active: #243244;
  --border: #1e293b;
  --border-2: #273449;
  --border-3: #1a2433;
  --text-1: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --text-4: #7c8aa0;
  --bubble: #1e293b;
  --bubble-mine: #1d4ed8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-dim: #1e40af;
  --scrollbar: #334155;
  --online: #22c55e;
  --badge: #ef4444;
}
html[data-theme="dark"] body { background: var(--bg-body); }
html[data-theme="dark"] .msg-row.mine .msg-content,
html[data-theme="dark"] .msg-row.mine .msg-file,
html[data-theme="dark"] .msg-row.mine .msg-img-wrap,
html[data-theme="dark"] .msg-row.mine .msg-voice .v-play { color: #fff; }
html[data-theme="dark"] .msg-row.mine .msg-voice .v-dur { color: #cbd5e1; }
html[data-theme="dark"] .msg-row.mine .msg-meta { color: #7c8aa0; }
html[data-theme="dark"] .msg-img-wrap { background: transparent; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  background: var(--bg-body); color: var(--text-1); font-size: 14px;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 双栏容器 ===== */
.app { display: flex; height: 100vh; width: 100%; }
.sidebar {
  flex: 0 0 300px; width: 300px; max-width: 300px;
  background: var(--bg-side); border-right: 1px solid var(--border-2);
  display: flex; flex-direction: column; min-height: 0;
}
.chat-area { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-main); }

/* ===== 左侧栏 ===== */
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.me { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.me:hover { opacity: .85; }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.me-info { display: flex; flex-direction: column; min-width: 0; }
.me-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-status {
  border: 0; background: none; color: var(--text-2); font-size: 11px; padding: 0;
  outline: none; cursor: pointer; max-width: 110px;
}
.status-dot {
  position: absolute; bottom: 0; right: 0; width: 11px; height: 11px;
  background: var(--online); border-radius: 50%; border: 2px solid var(--bg-side);
}
.side-actions { display: flex; gap: 6px; }
.icon-btn {
  background: none; border: 0; color: var(--text-2); padding: 6px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.icon-btn:hover { background: var(--bg-active); color: var(--text-1); }
.dot-badge {
  position: absolute; top: 2px; right: 2px; width: 9px; height: 9px;
  background: var(--badge); border-radius: 50%; border: 2px solid var(--bg-side);
}
.side-tabs { display: flex; border-bottom: 1px solid var(--border); }
.stab {
  flex: 1; padding: 10px 0; text-align: center; background: none; border: 0;
  color: var(--text-2); font-size: 14px; border-bottom: 2px solid transparent;
}
.stab.on { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* 会话列表 */
.conv-list { flex: 1; overflow-y: auto; min-height: 0; }
.conv-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  cursor: pointer; border-bottom: 1px solid var(--border-3);
}
.conv-item:hover { background: var(--bg-hover); }
.conv-item.on { background: var(--bg-active); }
.conv-main { flex: 1; min-width: 0; }
.conv-row { display: flex; justify-content: space-between; align-items: center; }
.conv-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 11px; color: var(--text-4); flex: 0 0 auto; margin-left: 8px; }
.conv-last { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.badge {
  background: var(--badge); color: #fff; font-size: 11px; border-radius: 10px;
  min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px; margin-left: 6px;
  flex: 0 0 auto;
}
.empty-list { text-align: center; color: var(--text-4); padding: 40px 0; font-size: 13px; }

/* ===== 头像 ===== */
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 16px; user-select: none;
}
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar .online-dot {
  position: absolute; bottom: 0; right: 0; width: 10px; height: 10px;
  background: var(--online); border: 2px solid var(--bg-main); border-radius: 50%;
}

/* ===== 右侧聊天区 ===== */
.chat-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg-chat);
}
.empty-box { text-align: center; color: var(--text-3); }
.empty-box p { margin-top: 12px; font-size: 14px; }
.chat-box { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); background: var(--bg-chat);
}
.back-btn { display: none; background: none; border: 0; color: var(--text-2); padding: 4px; border-radius: 6px; }
.chat-title { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-name { font-size: 15px; font-weight: 700; }
.chat-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.msg-list { flex: 1; overflow-y: auto; padding: 16px 14px; background: var(--bg-chat); }

/* 群公告条 */
.announce-bar {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  margin: 0 12px 8px; padding: 7px 10px; font-size: 13px; color: #166534;
}
html[data-theme="dark"] .announce-bar { background: rgba(22,163,74,.14); border-color: rgba(22,163,74,.4); color: #86efac; }
.announce-bar .tag {
  background: #16a34a; color: #fff; font-size: 12px; border-radius: 4px;
  padding: 1px 7px; flex: 0 0 auto;
}
.announce-bar span:not(.tag) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-bar .x { border: 0; background: none; color: #94a3b8; font-size: 16px; cursor: pointer; flex: 0 0 auto; }
.announce-bar.owner { cursor: pointer; }

/* 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(15,23,42,.88); color: #fff; font-size: 14px;
  padding: 9px 18px; border-radius: 20px; z-index: 9999; max-width: 80%;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 表情面板 */
.emoji-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-item { font-size: 26px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; }
.emoji-item:hover { background: var(--bg-hover); }

/* 图片消息 */
.msg-img-wrap { padding: 4px; background: var(--bubble); border: 1px solid var(--border); border-radius: 10px; }
.msg-img { display: block; max-width: 260px; max-height: 300px; border-radius: 8px; cursor: zoom-in; }
.msg-row.mine .msg-img-wrap { background: var(--bubble-mine); border-color: var(--bubble-mine); }

/* 文件消息卡片 */
.msg-file {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--bubble); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); min-width: 180px; max-width: 260px;
}
.msg-row.mine .msg-file { background: var(--bubble-mine); border-color: var(--bubble-mine); }
.msg-file .f-ic { font-size: 26px; flex: 0 0 auto; }
.msg-file .f-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-file .f-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.msg-file .f-size { font-size: 12px; color: var(--text-3); }

/* 图片查看器 */
.modal-mask.viewer { background: rgba(0,0,0,.9); cursor: zoom-out; }

/* 消息气泡 */
.load-more {
  text-align: center; color: var(--primary); font-size: 12px; cursor: pointer;
  padding: 4px 0 12px;
}
.load-more:hover { text-decoration: underline; }
.msg-row { display: flex; gap: 10px; margin-bottom: 14px; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-bubble { max-width: 62%; min-width: 0; cursor: pointer; }
.msg-meta { font-size: 11px; color: var(--text-4); margin-bottom: 3px; line-height: 1.35; }
.msg-row.mine .msg-meta { text-align: right; }
/* 群消息：上面是名字，下面是时间 */
.msg-row.group .msg-meta .from { color: var(--primary); display: block; font-size: 12px; margin-bottom: 2px; }
/* 管理员头衔 */
.admin-tag {
  display: inline-block; font-size: 10px; line-height: 1; color: #fff; background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 8px; padding: 2px 6px; margin-left: 6px; vertical-align: 1px; font-weight: 600; letter-spacing: .5px;
}
/* 官方群标签 */
.official-tag {
  display: inline-block; font-size: 10px; line-height: 1; color: #1d4ed8; background: #dbeafe;
  border-radius: 8px; padding: 2px 6px; margin-left: 6px; vertical-align: 1px; font-weight: 600;
}
html[data-theme="dark"] .official-tag { color: #93c5fd; background: rgba(37,99,235,.25); }
.msg-content {
  background: var(--bubble); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 14px;
  line-height: 1.6; word-break: break-word; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.msg-row.mine .msg-content { background: var(--bubble-mine); color: #fff; border-color: var(--bubble-mine); }
.msg-time-divider {
  text-align: center; color: var(--text-3); font-size: 11px; margin: 10px 0 16px;
}
/* 系统消息（进群/退群/被踢/撤回） */
.sys-msg {
  text-align: center; color: var(--text-3); font-size: 12px;
  background: rgba(148,163,184,.12); border-radius: 6px;
  padding: 4px 10px; margin: 8px auto; width: fit-content; max-width: 80%;
}
/* 回复引用块 */
.msg-reply {
  background: rgba(37,99,235,.08); border-left: 3px solid var(--primary-dim);
  border-radius: 4px; padding: 5px 8px; font-size: 12px; color: var(--text-2);
  margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* @某人 高亮 */
.msg-content .at { color: var(--primary); font-weight: 600; }
html[data-theme="dark"] .msg-content .at { color: #60a5fa; }
/* Markdown：加粗 / 代码 / 斜体 */
.msg-content strong { font-weight: 700; }
.msg-content em { font-style: italic; }
.msg-content code {
  background: rgba(127,127,127,.15); padding: 1px 5px; border-radius: 4px;
  font-family: Consolas, Menlo, monospace; font-size: .92em;
}
/* 通知引导条 */
#pushBanner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(90deg, #1d4ed8, #2563eb); color: #fff;
  padding: 9px 14px; font-size: 13px;
}
#pushBanner button {
  background: #fff; color: #1d4ed8; border: none; border-radius: 6px;
  padding: 4px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
}
#pushBanner #btnClosePush { cursor: pointer; font-size: 18px; padding: 0 6px; opacity: .85; }

/* AI 思考中 */
.msg-content.thinking { display: flex; align-items: center; color: var(--text-2); font-size: 13px; }.msg-content.thinking .dots i {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; margin-left: 3px; animation: thinkBlink 1.2s infinite;
}
.msg-content.thinking .dots i:nth-child(2) { animation-delay: .2s; }
.msg-content.thinking .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes thinkBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* 输入区 */
.chat-input {
  padding: 8px 10px;
  border-top: 1px solid var(--border); background: var(--bg-main);
}
.input-row { display: flex; align-items: flex-end; gap: 8px; }
.input-tools { display: flex; gap: 2px; flex: 0 0 auto; }
.input-tools .icon-btn {
  width: 34px; height: 34px; border: 0; background: none; color: var(--text-2);
  border-radius: 8px; cursor: pointer;
}
.input-tools .icon-btn:hover { background: var(--bg-hover); color: var(--primary); }
.reply-bar {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--bg-hover); border-radius: 6px; padding: 5px 10px; font-size: 12px;
  color: var(--text-2); margin-bottom: 6px;
}
.reply-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar .x { border: 0; background: none; color: var(--text-3); font-size: 16px; cursor: pointer; }
.chat-input textarea {
  flex: 1; border: 1px solid var(--border-2); border-radius: 18px; padding: 8px 14px;
  resize: none; line-height: 1.5; max-height: 96px; outline: none; background: var(--bg-chat);
  font-size: 14px; color: var(--text-1);
}
.chat-input textarea:focus { border-color: var(--primary-dim); background: var(--bg-main); }
.input-right { display: flex; gap: 2px; flex: 0 0 auto; align-items: flex-end; }
.input-right .icon-btn {
  width: 34px; height: 34px; border: 0; background: none; color: var(--text-2);
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.input-right .icon-btn:hover { background: var(--bg-hover); color: var(--primary); }
.input-right .icon-btn:disabled, .input-tools .icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.input-right .icon-btn.rec { color: #ef4444; background: #fee2e2; animation: micPulse 1s ease-in-out infinite; }
@keyframes micPulse { 50% { opacity: .55; } }
.btn-send {
  background: var(--primary); color: #fff; border: 0; border-radius: 50%;
  width: 34px; height: 34px; flex: 0 0 auto; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.btn-send:hover { background: var(--primary-hover); }
.btn-send:disabled { background: var(--primary-dim); cursor: not-allowed; }

/* 消息操作条（气泡下方：回复/撤回） */
.msg-ops {
  display: none; align-items: center; gap: 12px; margin-top: 4px;
  font-size: 12px; color: var(--text-3); padding: 0 2px;
}
.msg-row.mine .msg-ops { justify-content: flex-end; }
.msg-ops .op-btn {
  border: 0; background: none; color: var(--primary); font-size: 12px; cursor: pointer;
  padding: 2px 6px; border-radius: 4px;
}
.msg-ops .op-btn:hover { background: rgba(37,99,235,.08); }

/* 语音消息 */
.msg-voice { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 150px; }
.msg-voice .v-play {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; flex: 0 0 auto;
}
.msg-voice .v-bar { flex: 1; height: 4px; background: rgba(37,99,235,.18); border-radius: 2px; overflow: hidden; min-width: 60px; }
.msg-voice .v-bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 2px; }
.msg-voice .v-dur { font-size: 12px; color: var(--text-2); flex: 0 0 auto; }
.msg-row.mine .msg-voice .v-play { background: var(--primary-hover); }

/* ===== 登录页 ===== */
.login-body {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  overflow: auto;
}
.login-card {
  background: #fff; border-radius: 16px; padding: 34px 32px 30px; width: 360px;
  max-width: 92vw; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-logo { text-align: center; }
.login-card h1 { text-align: center; font-size: 22px; margin-top: 10px; }
.login-sub { text-align: center; color: #94a3b8; font-size: 13px; margin: 6px 0 18px; }
.tabbar { display: flex; border-bottom: 1px solid #eef0f3; margin-bottom: 18px; }
.tab {
  flex: 1; padding: 9px 0; background: none; border: 0; font-size: 15px;
  color: #64748b; border-bottom: 2px solid transparent;
}
.tab.on { color: #2563eb; font-weight: 600; border-bottom-color: #2563eb; }
.fld { display: block; margin-bottom: 14px; }
.fld > span { display: block; font-size: 13px; color: #64748b; margin-bottom: 6px; }
.fld input {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px;
  outline: none; font-size: 14px;
}
.fld input:focus { border-color: #93c5fd; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-dot {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; padding: 0;
}
.avatar-dot.on { border-color: #1e293b; }
.err { color: #dc2626; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.btn-primary {
  width: 100%; background: #2563eb; color: #fff; border: 0; border-radius: 8px;
  padding: 11px 0; font-size: 15px; margin-top: 4px;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; }
.btn-primary.sm { width: auto; padding: 8px 18px; font-size: 13px; margin: 0; }

/* ===== 弹层 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: var(--bg-main); border-radius: 12px; width: 420px; max-width: 94vw;
  max-height: 82vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.modal.sm { width: 320px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; }
.modal-head .x { background: none; border: 0; font-size: 22px; color: var(--text-4); padding: 0 4px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input { flex: 1; border: 1px solid var(--border-2); border-radius: 8px; padding: 9px 12px; outline: none; background: var(--bg-main); color: var(--text-1); }
.search-row input:focus { border-color: var(--primary-dim); }
.group-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.group-actions input { flex: 1; border: 1px solid var(--border-2); border-radius: 8px; padding: 9px 12px; outline: none; background: var(--bg-main); color: var(--text-1); }
.group-actions input:focus { border-color: var(--primary-dim); }
.sec-title { font-size: 13px; color: var(--text-2); margin: 14px 0 8px; font-weight: 600; }
.usr-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border-3); }
.usr-row .info { flex: 1; min-width: 0; }
.usr-row .name { font-size: 14px; font-weight: 600; }
.usr-row .sub { font-size: 12px; color: var(--text-3); }
.tag-owner { color: #f59e0b; font-size: 11px; font-weight: 600; }
.usr-ops { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.btn-mini {
  background: var(--primary); color: #fff; border: 0; border-radius: 6px;
  padding: 5px 12px; font-size: 12px;
}
.btn-mini.gray { background: var(--bg-active); color: var(--text-2); }
.btn-mini.green { background: #16a34a; }
.btn-mini:disabled { background: var(--scrollbar); }
.btn-mini.danger { background: #ef4444; }
.btn-mini.danger:hover { background: #dc2626; }
.profile { text-align: center; padding: 22px 18px; }
.profile .name { font-size: 17px; font-weight: 700; margin-top: 10px; }
.profile .sub { color: var(--text-3); font-size: 13px; margin: 4px 0 16px; }
.profile-actions { display: flex; gap: 10px; justify-content: center; }
.me-profile-top { display: flex; align-items: center; gap: 14px; padding: 10px 2px 6px; }
.me-profile-name { font-size: 18px; font-weight: 700; }
.me-profile-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.avatar-palette { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 2px; }
.palette-dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; box-sizing: border-box; }
.palette-dot.on { border-color: var(--text-1); }
.palette-dot:hover { transform: scale(1.1); }

/* 分段选择（免打扰/主题） */
.seg-row { display: flex; background: var(--bg-hover); border-radius: 8px; padding: 3px; gap: 3px; }
.seg-btn {
  flex: 1; border: 0; background: none; color: var(--text-2); font-size: 13px;
  padding: 7px 0; border-radius: 6px; cursor: pointer;
}
.seg-btn.on { background: var(--bg-main); color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg-btn:hover:not(.on) { color: var(--text-1); }

/* 连接状态条 */
.conn-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: #f59e0b; color: #fff; text-align: center; font-size: 13px;
  padding: 6px 0;
}

/* ===== 移动端单栏 ===== */
@media (max-width: 760px) {
  .sidebar { flex: 1; width: 100%; max-width: 100%; }
  .chat-area { position: fixed; inset: 0; z-index: 50; display: none; }
  .chat-area.show { display: flex; }
  .back-btn { display: inline-flex; }
  .msg-bubble { max-width: 80%; }
  /* 移动端表单字号放大，避免 iOS 聚焦缩放 */
  body { font-size: 16px; }
  .login-card input, .search-row input, .group-actions input, .chat-input textarea { font-size: 16px; }
}
