/* ============================================================
   可读性：统一字体 + 全站字号缩放 + 无障碍微调
   ============================================================ */

:root,
[data-theme="dark"] {
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --serif: var(--ui-font);
  --sans: var(--ui-font);
  --mono: var(--ui-font);
  --font-scale: 1;
}

html {
  font-family: var(--ui-font);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body,
button,
input,
textarea,
select,
kbd,
code {
  font-family: var(--ui-font);
}

body {
  font-size: calc(16px * var(--font-scale, 1));
  letter-spacing: .005em;
}

h1, h2, h3, h4, .serif, .brand-name, .section-title, .watch-title,
.article-content p, blockquote {
  font-family: var(--ui-font);
}

/* 可读的正文行高，同时保留原有版式 */
.article-content p { line-height: 1.95; }
.video-card__title, .list-row__title, .hot-row__title { letter-spacing: .005em; }

/* 让字号按钮的文字示例不跟随后台缩放时的父级继承，仅用于预览 */
.settings-option__sample { font-family: var(--ui-font); }

/* 超长语言或放大字号时允许控件换行，而不是横向溢出 */
.header-inner { flex-wrap: nowrap; min-width: 0; }
.main-nav { min-width: 0; }
.header-actions { flex-wrap: nowrap; }
.utility-tools { min-width: 0; }

@media (max-width: 620px) {
  .header-inner { gap: 8px; }
  .brand-text { min-width: 0; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
