/* =========================================================================
   排版层 v1 —— 字体与字形的统一
   -------------------------------------------------------------------------
   问题：
     · 字体栈里排在前面的 "Segoe UI Variable Text" / -apple-system 在 Windows 上
       不存在，实际落到了 Light 字重的字形，看起来又细又糊
     · 叠加了负字距（-.003em）和 650/680 这类"合成粗体"，中文笔画发虚
     · 分隔条用了品牌渐变底 + 蓝字，和正文抢眼
   做法：
     · 拉丁优先 Segoe UI，中文优先微软雅黑 UI（Windows）/ 苹方（macOS）/ 系统无衬线
     · 关闭合成粗体，只用 400/500/600/700 四档真实字重
     · 去掉负字距，统一正字距；数字等宽
     · 分隔条改为纯文字，不抢正文
   ========================================================================= */

:root {
  --font-sans: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
    "Source Han Sans SC", "Noto Sans CJK SC", "Hiragino Sans GB", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html, body, button, input, textarea, select {
  font-family: var(--font-sans) !important;
  font-synthesis: none;            /* 禁止合成粗体/斜体，避免笔画发虚 */
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;   /* 中文不需要 ligature 优化 */
  letter-spacing: 0 !important;    /* 清掉之前所有负字距 */
}

/* 中文段落别用 100 以下的行高，会挤成一坨 */
body { line-height: 1.55; }

/* ---------- 字重只用真实四档 ---------- */
h1, h2, h3, .list-title-row h2, .chat-head-name, .empty-inner h3 {
  font-weight: 700 !important;
}
.li-name, .btn.primary, .app-menu .mi .t, .modal-head h3 {
  font-weight: 600 !important;
}
.bubble, .field input, .field textarea, .composer textarea, .li-preview, .row-sub, .row-title {
  font-weight: 400 !important;
}
.msg-sender, .q-name, .pip, .dev-name {
  font-weight: 600 !important;
}

/* ---------- 字号：正文略放大，阅读更松 ---------- */
.bubble {
  font-size: 15px !important;
  line-height: 1.5 !important;
  letter-spacing: .01em !important;
}
.li-name { font-size: 15px !important; }
.li-preview { font-size: 13.5px !important; line-height: 1.35 !important; }
.chat-head-name { font-size: 15.5px !important; }
.chat-head-sub { font-size: 12.5px !important; }
.li-time, .msg-meta, .media-meta {
  font-variant-numeric: tabular-nums;      /* 时间数字等宽，不跳 */
  font-feature-settings: "tnum";
  letter-spacing: 0 !important;
}
.modal .row-title { font-size: 14.5px !important; }
.modal .row-sub { font-size: 12.5px !important; line-height: 1.4 !important; }
.app-menu .mi .t { font-size: 14px !important; }
.app-menu .mi .d { font-size: 12px !important; }

/* ---------- 分隔条：纯文字，不要胶囊底和品牌渐变 ---------- */
.msg-sep span,
.msg-system span {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: .04em !important;
  color: var(--txt-2) !important;
}
[data-theme="light"] .msg-sep span,
[data-theme="light"] .msg-system span { color: #7c8794 !important; }
[data-theme="dark"] .msg-sep span,
[data-theme="dark"] .msg-system span { color: #8b9bab !important; }
.msg-system span { font-style: normal !important; }

/* 未读分割线也统一成中性色 */
.msg-unread { color: var(--txt-2) !important; font-weight: 500 !important; }
[data-theme="light"] .msg-unread { color: #7c8794 !important; }

/* ---------- 引用块 / 转发标记不抢眼 ---------- */
.fwd-flag { font-style: normal !important; opacity: .85; }
.bubble .quote .q-name { font-weight: 600 !important; }

/* ---------- 手机端：中文字号再上一档 ---------- */
@media (max-width: 860px) {
  .bubble { font-size: 16px !important; line-height: 1.5 !important; }
  .li-name { font-size: 16px !important; }
  .li-preview { font-size: 13.5px !important; }
  .chat-head-name { font-size: 16px !important; }
  .msg-sep span, .msg-system span { font-size: 12px !important; }
  .composer textarea { font-size: 16px !important; }
}
