/* 手机优先、凝缩。低对比配色(护眼);报纸品牌 = category,期 = 一次生成。 */
:root {
  --bg: #181b21;
  --card: #1f232b;
  --ink: #c4c9d2;          /* 非纯白,降对比 */
  --muted: #7e8694;
  --line: #2a2f39;
  --accent: #5b94cf;       /* 柔和蓝 */
  --chip: #262b34;
  --feat: #1f2530;
  --tag-bg: #243348;
  --tag-ink: #8fbef0;
  /* 字体按 UI 语言分栈(见文件末 :lang() 覆盖):此处为默认/英文——拉丁优先,CJK 仅作兜底,
     且日文黑体排在中文黑体之前(避免拉丁界面里的 CJK 内容误用简中字形)。 */
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
          "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "PingFang SC", "Microsoft YaHei",
          "Noto Sans SC", sans-serif;
  /* 「衬线」只对拉丁生效(编辑部气质);CJK 一律回退到黑体——屏幕小字号下明朝/宋体
     笔画细、难辨认,不合屏显习惯。 */
  --serif: "Iowan Old Style", Charter, Georgia, "Times New Roman",
           "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "PingFang SC", "Microsoft YaHei",
           "Noto Sans SC", sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eceef1; --card: #ffffff; --ink: #353b44; --muted: #707885;
    --line: #e3e6ea; --accent: #336cb8; --chip: #eef1f5; --feat: #f2f5f9;
    --tag-bg: #e6eef8; --tag-ink: #2f6fc0;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
b { font-weight: 700; }
img { max-width: 100%; }
header {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
}
header .brand, header .brand a { font-weight: 700; font-size: 15px; color: var(--ink); }
header .brand a { display: inline-flex; align-items: center; gap: 4px; }
header nav { margin-left: auto; display: flex; gap: 14px; font-size: 13px; }
header nav a { display: inline-flex; align-items: center; gap: 3px; }
header nav a .msi, header .brand a .msi { font-size: 18px; vertical-align: 0; }

/* ---------- Material Symbols 图标(统一方案:{{ icon('name') }})---------- */
.msi {
  font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal;
  font-size: 1.2em; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; direction: ltr; vertical-align: -0.18em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-font-feature-settings: 'liga'; -moz-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  user-select: none; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.msi.fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
@keyframes msi-spin { to { transform: rotate(360deg); } }
.msi.spin { animation: msi-spin 1.1s linear infinite; }

/* ---------- 信息流(取消报刊:每 category 连续流 + 合并流)---------- */
.stream-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.stream-tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.stream-tabs a {
  padding: 4px 11px; border-radius: 999px; font-size: 13px; color: var(--ink);
  background: var(--chip); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 4px;
}
.stream-tabs a.on { background: var(--pa, var(--accent)); color: #fff; border-color: transparent; }
.stream-tabs .ub { font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 6px; }
.stream-tabs a.on .ub { background: rgba(255,255,255,.28); }
#read-above { margin-left: auto; font-size: 12px; }
.stream-list { display: flex; flex-direction: column; gap: 8px; }
/* 紧凑卡片:小标题 + 一行元信息(日期徽标 · favicon 源 · N源 · 时间);缩略图小、可省 */
.scard { display: flex; gap: 10px; align-items: flex-start; }
.scard.read { opacity: .5; }
.scard.flash { animation: sc-flash 0.9s ease; border-radius: 8px; }
@keyframes sc-flash { 0% { background: var(--feat); box-shadow: 0 0 0 6px var(--feat); } 100% { background: transparent; box-shadow: none; } }
.fab-next { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 24px; }
.fab-next:hover { background: var(--accent); color: #fff; border-color: transparent; }
.sc-thumb { flex: 0 0 52px; order: 2; }
.sc-thumb img { width: 52px; height: 52px; object-fit: cover; border-radius: 7px; display: block; }
.sc-main { flex: 1; min-width: 0; }
.sc-head { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.42; }
.sc-head:hover { color: var(--accent); }
.sc-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.sc-meta .chip { font-size: 11px; padding: 0 7px; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); background: var(--chip); color: var(--muted); }
.sc-meta .chip.cat { background: var(--pa, var(--accent)); color: #fff; border-color: transparent; font-weight: 600; }
.sc-meta .chip.ent { color: var(--ink); font-weight: 600; }
.sc-meta .chip.sec { color: var(--muted); }
.sc-meta .chip.fac { color: var(--muted); font-style: italic; }
.sc-meta .chip.evt { display: inline-flex; align-items: center; gap: 2px; background: transparent; border-color: var(--line); color: var(--ink); }
.sc-meta .chip.evt .msi { font-size: 13px; }
/* 可缩放全部标签:默认只显 +N,点开展开该文章的全部次要/facet 标签(核对合并/分组同类性)*/
.sc-meta .tag-more { display: inline; }
.sc-meta summary.more { cursor: pointer; list-style: none; color: var(--accent); }
.sc-meta summary.more::-webkit-details-marker { display: none; }
.sc-meta .tag-all { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-left: 4px; vertical-align: middle; }
.sc-meta details[open] summary.more { margin-right: 2px; }
.sc-meta .src { display: inline-flex; }
.sc-meta .src-n { color: var(--accent); font-weight: 700; }
.sc-meta .favicon { width: 13px; height: 13px; }
.sc-time { margin-left: auto; white-space: nowrap; }
.stream-end { text-align: center; padding: 22px; font-size: 13px; }
#sentinel { height: 1px; }
/* umbrella 组:紧凑标题区 + 融合 brief + 多卡列表(卡间细分隔线)*/
.sgroup { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 10px 12px; }
.sg-head { display: flex; align-items: baseline; gap: 7px; }
.sg-label { font-size: 15px; font-weight: 700; margin: 0; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-n { font-size: 11.5px; flex: none; }
.sg-time { margin-left: auto; font-size: 11.5px; flex: none; }
.sg-brief { margin: 5px 0 2px; font-size: 13px; line-height: 1.62; color: var(--ink); }
.sg-cards { display: flex; flex-direction: column; }
.sg-cards .scard { padding: 8px 0; border-top: 1px solid var(--line); }
.sg-cards .scard:first-child { border-top: 0; padding-top: 6px; }
/* 单卡(落单)自带边框卡片外观 */
.unit.solo .scard { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 9px 11px; }

main { max-width: 760px; margin: 0 auto; padding: 10px 10px 48px; }
.muted { color: var(--muted); }
h1 { font-size: 19px; margin: 6px 2px; }

/* ---------- tag 胶囊 ---------- */
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--tag-ink); background: var(--tag-bg);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 4px;
}
/* ---------- sources ---------- */
.sources { font-size: 12px; color: var(--muted); margin-top: 5px; }
.sources a { color: var(--muted); }
.sources a:hover { color: var(--accent); }
.sources .sep { opacity: .5; padding: 0 3px; }
.sources .src { display: inline-flex; align-items: center; gap: 3px; margin-right: 9px; white-space: nowrap; }
.favicon { width: 14px; height: 14px; border-radius: 3px; object-fit: contain; flex: none; background: var(--chip); }

/* ---------- 已读按钮 ---------- */
.readbtn {
  background: var(--chip); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 13px; font-size: 12px; font-weight: 600;
  cursor: pointer; margin: 0; white-space: nowrap;
}
.readbtn.on { background: #1d3326; color: #7fce9e; border-color: #2c5138; }
.readbtn.big { padding: 10px 26px; font-size: 14px; }
/* 重生成(次要操作)按钮 */
.ghostbtn {
  background: var(--chip); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 13px; font-size: 12px; font-weight: 600;
  cursor: pointer; margin: 0; white-space: nowrap;
}
.ghostbtn:disabled { opacity: .6; cursor: default; }
.pg-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.head-act { margin-left: auto; }
@media (prefers-color-scheme: light) { .readbtn.on { background: #e6f5ec; color: #2a7d4c; border-color: #bfe4cc; } }
.read-bottom { display: flex; justify-content: center; margin: 20px 0 6px; }

/* ---------- 首页:今日要览 ---------- */
.today-head { margin: 4px 2px 14px; }
.today-head h1 { font-family: var(--serif); font-size: 27px; font-weight: 800; margin: 0; letter-spacing: .01em; }
.today-meta { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.picks { display: flex; flex-direction: column; margin-bottom: 26px; }
.pick { padding: 14px 0; border-top: 1px solid var(--line); }
.pick:first-child { border-top: none; padding-top: 4px; }
.pick-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pick-paper { font-size: 12px; font-weight: 700; color: var(--pa); white-space: nowrap; }
.pick-paper::before { content: "● "; }
.pick-label { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.pick-label:hover { color: var(--pa); }
.pick-brief { margin: 6px 0 8px; font-family: var(--serif); font-size: 15.5px; line-height: 1.78; color: var(--ink); }
.pick .stream { margin-top: 2px; }
/* 桌面:两列要览,信息更密 */
@media (min-width: 880px) {
  .picks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
  .pick:nth-child(2) { border-top: none; padding-top: 4px; }
}

/* ---------- 报架(首页)---------- */
.idx-head { display: flex; align-items: baseline; gap: 10px; margin: 4px 2px 10px; }
.idx-head h2 { font-family: var(--serif); font-size: 18px; margin: 0; }
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .paper-grid { grid-template-columns: 1fr; } }
.paper {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid var(--pa, var(--line)); border-radius: 13px; padding: 13px; color: var(--ink);
}
.paper .badge { background: var(--pa, var(--accent)); }
.paper-top { display: flex; align-items: center; gap: 6px; }
.paper-name { font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.paper-top .badge { margin-left: auto; }
.badge.sm { font-size: 10px; padding: 0 6px; }
.paper-range { font-size: 13.5px; font-weight: 600; margin-top: 7px; }
.paper-meta { font-size: 12px; margin-top: 3px; }

/* ---------- 期视图:头部 ---------- */
.pg-head { display: flex; align-items: flex-start; gap: 10px; margin: 4px 2px 10px; }
.sb-open {
  flex: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--ink); font-size: 18px; line-height: 36px;
  text-align: center; cursor: pointer;
}
.pg-head-l { flex: 1; min-width: 0; }
.pg-brand { font-family: var(--serif); font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.pg-range { font-size: 21px; font-weight: 800; letter-spacing: .01em; }
.pg-sub { font-size: 12px; margin-top: 1px; }

/* ---------- 页内 tag 树状目录(PC 右边栏 / 移动端右抽屉)---------- */
.tag-index { font-size: 13px; }
.ti-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.ti-tree, .ti-tree ul { list-style: none; margin: 0; padding: 0; }
.ti-tree > li { margin: 4px 0; }
.ti-tree > li > a { font-weight: 650; font-size: 14px; color: var(--ink); }
.ti-tree ul { margin: 2px 0 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.ti-tree ul li { line-height: 1.6; }
.ti-tree ul a { font-size: 13px; color: var(--accent); }
.ti-tree a:hover { text-decoration: underline; }

/* 锚点跳转时不被 sticky 头部遮挡 */
.block, .subblock { scroll-margin-top: 54px; }

/* 移动端:右侧抽屉(默认)。开/关按钮 + 遮罩,与左侧 sb 同套路。 */
.ti-open {
  flex: none; border: 1px solid var(--line); border-radius: 999px; background: var(--chip);
  color: var(--ink); font-size: 12px; font-weight: 600; padding: 4px 11px; cursor: pointer; white-space: nowrap;
}
.ti-close { display: block; text-align: right; color: var(--muted); font-size: 13px; cursor: pointer; margin-bottom: 8px; }
.ti-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ti-toggle:checked ~ .ti-scrim { opacity: 1; pointer-events: auto; }
.tag-rail {
  position: fixed; top: 0; right: 0; height: 100%; width: 84%; max-width: 300px; z-index: 31;
  background: var(--card); border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 12px 28px;
  transform: translateX(100%); transition: transform .22s ease;
}
.ti-toggle:checked ~ .issue-wrap .tag-rail { transform: translateX(0); }

/* PC(宽屏):两列网格。issue 页把 main 放宽,目录成为占一列的常驻右边栏(不再脱离
   文档流,故不会盖住正文);非 issue 页 main 不受影响。隐藏抽屉开关/遮罩。 */
@media (min-width: 1100px) {
  main:has(.issue-wrap) { max-width: 1100px; }
  .issue-wrap {
    display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; align-items: start;
  }
  .issue-col { min-width: 0; }   /* 防止网格列被内容撑破 */
  .tag-rail {
    position: sticky; top: 50px; height: auto; max-height: calc(100vh - 64px);
    width: auto; max-width: none; transform: none; z-index: 1;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
    overflow-y: auto;
  }
  .ti-open, .ti-close, .ti-scrim { display: none !important; }
}

/* ---------- 头版图 ---------- */
.hero { width: 100%; aspect-ratio: 16/9; max-height: 200px; overflow: hidden; border-radius: 13px; background: var(--chip); margin: 6px 0 12px; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 本期头条(masthead lead)---------- */
.lead { display: flex; gap: 13px; align-items: stretch; margin: 6px 0 14px; padding-bottom: 14px; border-bottom: 2px solid var(--line); }
.lead-fig { flex: none; width: 132px; border-radius: 12px; overflow: hidden; background: var(--chip); }
.lead-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lead-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.lead-kick { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--pa); text-transform: uppercase; }
.lead-kick a { color: var(--pa); }
.lead-head { font-family: var(--serif); font-size: 21px; font-weight: 800; line-height: 1.28; color: var(--ink); }
.lead-head:hover { color: var(--pa); }
.lead-meter { margin-top: auto; }
.lead-meter i { height: 13px; }
.lead-meter b { font-size: 12px; }
@media (max-width: 460px) { .lead-fig { width: 104px; } .lead-head { font-size: 18px; } }

/* ---------- 本期概况(可换行标签:文字清晰,数字=权重,整体仍紧凑)---------- */
.overview { margin: 0 0 12px; }
.ov-tags { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.ov-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 2px 5px 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); background: color-mix(in srgb, var(--pa) 16%, var(--card));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-tag:hover { background: color-mix(in srgb, var(--pa) 34%, transparent); }
.ov-c { font-size: 11px; font-weight: 700; color: var(--pa); background: var(--bg);
  border-radius: 999px; padding: 0 6px; font-variant-numeric: tabular-nums; }

/* ---------- 本期关系图(折叠;不挡扫读)---------- */
.relgraph { margin: 0 0 16px; }
.relgraph > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink); list-style: none; padding: 5px 0; }
.relgraph > summary::-webkit-details-marker { display: none; }
.relgraph > summary::before { content: "▸ "; color: var(--muted); }
.relgraph[open] > summary::before { content: "▾ "; }
.relgraph-svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 4px auto 0; }
.relgraph-svg line { stroke: var(--line); opacity: .9; }
.relgraph-svg circle { fill: color-mix(in srgb, var(--pa) 30%, var(--card)); stroke: var(--pa); stroke-width: 1.5; }
.relgraph-svg a:hover circle { fill: var(--pa); }
.relgraph-svg text { fill: var(--ink); font-size: 9px; font-family: var(--sans); }
.relgraph-svg a:hover text { fill: var(--pa); }

/* ---------- 期视图:主题流(编辑部式高密度)---------- */
.issue-col { --pa: var(--accent); }                /* 每报识别色,由 .issue-wrap 内联 style 覆盖 */
.pg-brand { color: var(--pa); }
.theme { margin: 0 0 18px; scroll-margin-top: 52px; }
.theme.depth-0 { margin-top: 6px; }
/* 顶层主题标签吸顶(滚动时始终知道在读哪个实体)*/
.theme.depth-0 > .theme-h {
  position: sticky; top: 47px; z-index: 5; background: var(--bg);
  border-bottom: 1px solid var(--line); padding: 6px 0 5px; margin-bottom: 9px;
}
.theme-h { display: flex; align-items: baseline; gap: 8px; }
.theme-label { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.theme-label::before { content: ""; display: inline-block; width: 3px; height: .92em; vertical-align: -1px;
  background: var(--pa); border-radius: 2px; margin-right: 7px; }
.theme-label:hover { color: var(--pa); }
.theme-count { font-size: 12px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; flex: none; }
/* 子主题:不吸顶,缩进 + 发丝线左边 + 识别色小标签 */
.theme.depth-1, .theme.depth-2, .theme.depth-3, .theme.depth-4 {
  margin: 10px 0 12px; padding-left: 11px; border-left: 1px solid var(--line);
}
.theme:not(.depth-0) > .theme-h { padding: 1px 0 2px; margin-bottom: 5px; }
.theme:not(.depth-0) > .theme-h > .theme-label { font-size: 14.5px; color: var(--pa); font-family: inherit; }
.theme:not(.depth-0) > .theme-h > .theme-label::before { content: "› "; background: none; width: auto; height: auto; margin: 0; color: var(--muted); }
/* brief 视觉降级:廉价模型自动生成,仅作参考 → 小字、弱色、带「AI 概述」标记 */
.theme-brief { margin: 0 0 9px; font-family: var(--serif); font-size: 14px; line-height: 1.7; color: var(--muted); }
.brief-tag { display: inline-block; font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .03em;
  color: var(--muted); background: var(--chip); border: 1px solid var(--line); border-radius: 5px;
  padding: 0 5px; margin-right: 7px; vertical-align: 1px; white-space: nowrap; }
/* 兼容:未处理条目仍用 .block 外框 */
.block-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.block-label { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--ink); }
.block-label::before { content: "▦"; color: var(--muted); margin-right: 5px; }
/* 未处理条目:超出浓缩上限/预算,不丢弃,密排列出原文链接 */
.block.unproc { border-top: 2px dashed var(--line); padding-top: 12px; margin-top: 18px; }
.block.unproc .block-label::before { content: "▦"; }
.unproc-list { list-style: none; margin: 6px 0 0; padding: 0; }
.unproc-list li {
  display: flex; align-items: baseline; gap: 8px; padding: 4px 0;
  border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.5;
}
.unproc-list a { display: inline-flex; align-items: baseline; gap: 5px; color: var(--ink); }
.unproc-list a:hover { color: var(--accent); }
.unproc-list .src-meta { margin-left: auto; font-size: 11.5px; white-space: nowrap; flex: none; }
/* 条目流:扁平行,发丝线分隔,无卡片边框(缩略图左置)*/
.stream { display: flex; flex-direction: column; }
.item { display: flex; gap: 11px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: none; padding-bottom: 2px; }
.it-thumb { flex: none; width: 66px; height: 66px; border-radius: 8px; overflow: hidden; background: var(--chip); display: block; }
.it-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-main { flex: 1; min-width: 0; }
.it-head {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.46;
}
.it-head:hover { color: var(--pa); }
.src-n { font-size: 11px; font-weight: 700; color: var(--pa); margin-right: 8px; white-space: nowrap; }
/* 期视图条目:headline 为主层(块级),详情(图/胶囊/来源)默认折叠 */
.issue-col .item { display: block; padding: 8px 0; }
.it-line { display: flex; align-items: flex-start; gap: 8px; }
.it-line .it-head { flex: 1; min-width: 0; }
/* 来源量计:小竖条 + 数字,一眼看出被多少家报道(=关注度高低) */
.src-meter { flex: none; display: inline-flex; align-items: center; gap: 2px; margin-top: 3px; }
.src-meter i { width: 3px; height: 11px; border-radius: 1px; background: var(--pa); opacity: .85; }
.src-meter b { font-size: 11px; font-weight: 700; color: var(--pa); font-variant-numeric: tabular-nums; margin-left: 3px; }
.it-toggle {
  flex: none; width: 22px; height: 22px; margin: 1px 0 0; padding: 0; line-height: 19px; text-align: center;
  border: 1px solid var(--line); border-radius: 6px; background: var(--chip); color: var(--muted);
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.it-toggle:hover, .item.open .it-toggle { color: var(--pa); border-color: var(--pa); }
.it-detail { margin: 8px 0 2px; }
.it-fig { display: block; width: 100%; aspect-ratio: 16/9; max-height: 220px; overflow: hidden;
  border-radius: 10px; background: var(--chip); margin-bottom: 8px; }
.it-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-detail .sources { margin-top: 6px; }
/* 顶层主题缩略图签名:视觉锚点(图片让扫读更直观)*/
.theme-thumbs { display: flex; gap: 5px; margin: 1px 0 9px; }
.theme-thumbs .tt { flex: 1 1 0; height: 78px; border-radius: 9px; overflow: hidden; background: var(--chip); }
.theme-thumbs .tt img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 单发条目的主实体:醒目可点胶囊(识别色) */
.v2-chips .it-primary { background: var(--pa); color: #fff; font-weight: 700; border: none; }
.theme-link { flex: none; background: none; border: none; cursor: pointer; font-size: 13px; opacity: .55; padding: 0 2px; line-height: 1; }
.theme-link:hover { opacity: 1; }
.item.kbd { box-shadow: inset 3px 0 0 var(--pa); background: var(--feat); border-radius: 6px; }
#iv-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px);
  background: var(--accent); color: #fff; font-size: 13px; padding: 7px 14px; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
#iv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 可隐藏侧边栏(往期/报纸)---------- */
.sb-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sb-toggle:checked ~ .sb-scrim { opacity: 1; pointer-events: auto; }
.sidebar {
  position: fixed; top: 0; left: 0; height: 100%; width: 84%; max-width: 320px; z-index: 31;
  background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 12px 28px;
  transform: translateX(-100%); transition: transform .22s ease;
}
.sb-toggle:checked ~ .sidebar { transform: translateX(0); }
.sb-sec { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 2px 6px; }
.sb-sec:first-child { margin-top: 2px; }
.sb-papers a {
  display: inline-flex; align-items: center; gap: 5px; color: var(--ink);
  background: var(--chip); border-radius: 999px; padding: 4px 11px; font-size: 13px; margin: 0 5px 5px 0;
}
.sb-papers a.cur { background: var(--accent); color: #fff; }
.sb-issues a {
  display: flex; align-items: center; gap: 7px; color: var(--ink);
  padding: 7px 6px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.sb-issues a .r { font-weight: 600; }
.sb-issues a .n { margin-left: auto; font-size: 11px; }
.sb-issues a .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.sb-issues a.isread { opacity: .55; }
.sb-issues a.isread .dot { background: var(--line); }
.sb-issues a.cur { background: var(--feat); border-radius: 7px; }
.sb-more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; }

/* ---------- 往期归档列表(复用)---------- */
.idx-list { display: flex; flex-direction: column; gap: 8px; }
.idx-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 11px; padding: 10px 12px; color: var(--ink);
}
.idx-card.is-read { border-left-color: var(--line); opacity: .62; }
.idx-top { display: flex; align-items: center; gap: 8px; }
.idx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.idx-card.is-read .idx-dot { background: var(--line); }
.idx-range { font-weight: 700; font-size: 15px; }
.idx-id { margin-left: auto; color: var(--muted); font-size: 12px; }
.idx-meta { font-size: 12px; margin-top: 4px; }
.pager { display: flex; justify-content: space-between; margin: 16px 2px; font-size: 14px; }
.pager .next { margin-left: auto; }

/* ---------- 标签索引(瀑布流:category 块按列流式排布)---------- */
.tags-masonry { columns: 260px; column-gap: 14px; }
.tg-cat {
  break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.tg-cat { border-top: 3px solid var(--pa, var(--line)); }
.tg-cat-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
/* v2 扁平标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.tag-cloud .tc-chip { color: var(--ink); line-height: 1.3; }
.tag-cloud .tc-chip:hover { color: var(--pa, var(--accent)); }
.tg-cat-h a { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--ink); }
.tg-cat-h .muted { font-size: 11px; margin-left: auto; }
.tg-tops, .tg-subs { list-style: none; margin: 0; padding: 0; }
.tg-tops > li { margin: 4px 0; }
.tg-top { font-weight: 650; font-size: 14px; color: var(--ink); }
.tg-top:hover, .tg-subs a:hover { color: var(--accent); text-decoration: underline; }
.tg-tops .muted, .tg-subs .muted { font-size: 11px; font-weight: 400; }
.tg-subs { margin: 1px 0 3px; padding-left: 11px; border-left: 1px solid var(--line); }
.tg-subs li { line-height: 1.55; }
.tg-subs a { font-size: 13px; color: var(--accent); }

/* ---------- 按 tag 浏览全部历史(无限滚动)---------- */
.tag-hd { margin: 6px 2px 14px; }
.tag-hd h1 { font-family: var(--serif); font-size: 22px; margin: 2px 0; }
.tag-hd .tag-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pa, var(--accent)); margin-right: 8px; vertical-align: 2px; }
.tag-hd .muted { font-size: 13px; }
/* tag 页枢纽:相关标签 */
.related-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 2px 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rt-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.rt-chip { font-size: 12.5px; padding: 3px 11px; border-radius: 999px; background: var(--tag-bg); color: var(--tag-ink); white-space: nowrap; }
.rt-chip:hover { filter: brightness(1.12); }
/* 时间线:左侧竖轴 + 节点圆点,扁平行(无卡片框)*/
.tag-list { display: block; position: relative; padding-left: 17px; }
.tag-list::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tag-item { display: flex; gap: 11px; align-items: flex-start; position: relative; padding: 11px 0; border-bottom: 1px solid var(--line); background: none; }
.tag-item::before { content: ""; position: absolute; left: -16px; top: 17px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--pa, var(--accent)); box-shadow: 0 0 0 3px var(--bg); }
.ti-thumb { width: 58px; height: 58px; flex: none; border-radius: 8px; overflow: hidden; background: var(--chip); order: 2; }
.ti-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ti-body { flex: 1; min-width: 0; }
.ti-body > a { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.46; display: inline-flex; align-items: baseline; gap: 5px; }
.ti-body > a:hover { color: var(--pa, var(--accent)); }
.ti-meta { font-size: 12px; margin-top: 4px; }

/* ---------- 表单 / 提示 / 空态 ---------- */
form.box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
label { display: block; margin: 8px 0 3px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=password], input[type=number] {
  width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 14px;
}
textarea {
  width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 13px; font-family: inherit; resize: vertical;
}
code { background: var(--chip); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.schema-row { display: flex; gap: 6px; align-items: center; margin: 5px 0; }
.schema-row .schema-name { flex: none; width: 84px; font-size: 13px; font-weight: 600; }
.schema-row input { margin: 0; }
.schema-row input.sm { flex: none; width: 72px; }
.cats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 4px 0; }
.cats-grid label { display: flex; align-items: center; gap: 6px; margin: 2px 0; color: var(--ink); }
button {
  background: var(--accent); color: #fff; border: 0; border-radius: 7px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 12px;
}
.notice { font-size: 13px; padding: 8px 10px; border-radius: 7px; margin: 8px 0; }
.notice.ok { background: #1d3326; color: #7fce9e; }
.notice.err { background: #34201f; color: #e89a9a; }
.notice.run { background: #1e2a38; color: #93c2ee; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; }

/* 标签 registry 编辑页 */
div.box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.chip { display: inline-block; padding: 2px 9px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; color: var(--muted); text-decoration: none; }
.chip.on { background: var(--feat); color: var(--accent); border-color: var(--accent); }
/* 树状编辑 */
main:has(.tree) { max-width: 1200px; }
ul.tree, ul.tree ul.children { list-style: none; margin: 0; padding: 0; }
ul.tree ul.children { margin-left: 18px; border-left: 1px dashed var(--line); }
li.node { margin: 0; }
.node-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 3px 4px; border-radius: 6px; font-size: 13px; }
.node-row:hover { background: var(--feat); }
.node-row.drop-on { background: var(--feat); outline: 1px solid var(--accent); }
li.node.drag-ghost > .node-row { opacity: .4; }
/* 行状态着色(优先级:待删 > 停用 > manual;均压过 hover) */
.node-row.is-manual { background: var(--tag-bg); box-shadow: inset 3px 0 0 var(--accent); }
.node-row.is-disabled { opacity: .5; background: var(--chip); box-shadow: inset 3px 0 0 var(--muted); }
.node-row.is-delete { background: rgba(192,80,74,.18); box-shadow: inset 3px 0 0 #c0504a; opacity: 1; }
.node-row.is-delete input.nm, .node-row.is-delete textarea.kw { text-decoration: line-through; }
.node-row .drag { cursor: grab; color: var(--muted); user-select: none; padding: 0 2px; }
.node-row input.nm { min-width: 8ch; max-width: 34ch; }
.node-row textarea.kw { flex: 1 1 22ch; min-width: 16ch; line-height: 1.35; overflow: hidden; resize: vertical; white-space: pre-wrap; word-break: break-word; }
.node-row input:not([type=checkbox]), .node-row textarea.kw { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; font-family: inherit; font-size: 13px; }
.node-row .ck { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.node-row .ck.del { color: #c0504a; }
.node-row .cnt { font-size: 11px; color: var(--muted); min-width: 2ch; text-align: right; }
.node-row .addchild, .node-row .removenew { font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--chip); color: var(--muted); cursor: pointer; }
.node-row .removenew { color: #c0504a; }
.node-row.is-new { box-shadow: inset 3px 0 0 var(--accent); }
#add-top { font-size: 13px; }
/* 即时保存:行高亮一闪 + 固定 toast(不挤动布局) */
@keyframes rg-saved { from { background: var(--accent); } to { background: transparent; } }
.node-row.saved { animation: rg-saved .8s ease-out; }
#rg-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(8px);
  background: var(--accent); color: #fff; font-size: 13px; padding: 7px 14px; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
#rg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#rg-toast.err { background: #c0504a; }
/* 搜索式父级下拉 */
.combo { position: relative; }
.combo .combo-input { min-width: 8ch; max-width: 28ch; cursor: pointer; }
.combo .combo-list { display: none; position: absolute; z-index: 20; top: 100%; left: 0; min-width: 18ch; max-height: 240px; overflow: auto; margin: 2px 0 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.combo.open .combo-list { display: block; }
.combo .combo-list li { padding: 4px 8px; border-radius: 5px; cursor: pointer; font-size: 13px; white-space: nowrap; color: var(--ink); }
.combo .combo-list li:hover { background: var(--feat); color: var(--accent); }
.root-drop { margin-top: 10px; padding: 8px; text-align: center; font-size: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.root-drop.drop-on { background: var(--feat); border-color: var(--accent); color: var(--accent); }
.prompts-sec summary { cursor: pointer; margin: 4px 0; }
.prompts-sec textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.badge-ov { font-size: 11px; color: var(--accent); border: 1px solid var(--accent); border-radius: 8px; padding: 0 6px; }
/* 标签架构审阅:建议列表 */
.rv-list { list-style: none; margin: 0; padding: 0; }
.rv-item { padding: 9px 0; border-bottom: 1px solid var(--line); }
.rv-item:last-child { border-bottom: none; }
.rv-item > label { display: flex; align-items: baseline; gap: 8px; cursor: pointer; }
.rv-badge { flex: none; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; }
.rv-merge .rv-badge { background: var(--tag-bg); color: var(--tag-ink); }
.rv-rename .rv-badge { background: #1e2a38; color: #93c2ee; }
.rv-reparent .rv-badge { background: #1f2e22; color: #7fce9e; }
.rv-delete .rv-badge { background: rgba(192,80,74,.18); color: #d98a84; }
.rv-desc { font-size: 14px; }
.rv-why { font-size: 12px; margin: 2px 0 0 30px; }
/* v2 关系学习报告 */
.gr-h { font-family: var(--serif); font-size: 17px; margin: 20px 0 4px; }
.gr-note { font-size: 12px; margin: 0 0 8px; }
.gr-tab { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.gr-tab th, .gr-tab td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.gr-tab th { color: var(--muted); font-weight: 600; font-size: 11px; }
.gr-tab td { font-variant-numeric: tabular-nums; }
.kind-entity { color: #7fce9e; } .kind-topic { color: #93c2ee; } .kind-generic { color: #d98a84; }
/* v2 显示预览:次要/facet 胶囊 */
.v2-chips { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.v2-sec, .v2-facet { font-size: 11px; border-radius: 999px; padding: 1px 8px; white-space: nowrap; cursor: pointer; }
.v2-sec { background: var(--tag-bg); color: var(--tag-ink); }
.v2-facet { background: var(--chip); color: var(--muted); border: 1px solid var(--line); }
.v2-sec:hover, .v2-facet:hover { filter: brightness(1.12); text-decoration: none; }
a.v2-sec, a.v2-facet { text-decoration: none; }

/* ---------- 条目内联日期徽标 + 期视图近期日程小条 ---------- */
.evt-badge { flex: none; display: inline-flex; align-items: baseline; gap: 3px; margin-top: 2px;
  font-size: 11px; font-weight: 700; white-space: nowrap; padding: 1px 7px; border-radius: 999px;
  background: var(--chip); color: var(--ink); border-left: 3px solid var(--line); }
.evt-badge time { font-weight: 600; }
.evt-badge.k-release { border-left-color: #7fce9e; }
.evt-badge.k-event { border-left-color: #93c2ee; }
.evt-badge.k-stream { border-left-color: #c89bf0; }
.evt-badge.k-sale_end, .evt-badge.k-deadline { border-left-color: #e0a96d; }
.evt-badge.k-preorder { border-left-color: #8fbef0; }
.up-strip { display: flex; align-items: center; gap: 8px; overflow-x: auto; margin: 0 0 12px;
  padding: 7px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.up-lab { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.up-evt { flex: none; font-size: 12px; color: var(--ink); white-space: nowrap; padding-left: 7px;
  border-left: 3px solid var(--line); }
.up-evt b { color: var(--pa, var(--accent)); font-variant-numeric: tabular-nums; }
.up-evt.k-release { border-left-color: #7fce9e; }
.up-evt.k-event { border-left-color: #93c2ee; }
.up-evt.k-stream { border-left-color: #c89bf0; }
.up-evt.k-sale_end, .up-evt.k-deadline { border-left-color: #e0a96d; }

/* ---------- 日程页 ---------- */
/* 日程页:与首页信息流同款紧凑风格(避免松散 + 修手机端横向溢出)*/
.sched-bucket { margin: 0 0 14px; }
.sched-blabel { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 2px 4px;
  display: flex; gap: 6px; align-items: baseline; letter-spacing: .02em; }
.sched-list { display: flex; flex-direction: column; }
.sevt { display: flex; gap: 10px; padding: 8px 2px 8px 8px; border-top: 1px solid var(--line);
  border-left: 3px solid var(--line); align-items: flex-start; min-width: 0; }
.sevt:first-child { border-top: 0; }
/* 日期做成小日历「日砖」:月在上、日大号在下(刻意的竖排,不是意外换行)*/
.sevt-when { flex: 0 0 40px; text-align: center; padding-top: 1px; line-height: 1.05; }
.sevt-mon { display: block; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.sevt-day { display: block; font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.sevt-t { display: block; margin-top: 1px; font-size: 10.5px; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sevt-end { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; }
.sevt-main { flex: 1; min-width: 0; }
.sevt-title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4;
  overflow-wrap: anywhere; }
.sevt-title:hover { color: var(--accent); }
.sevt-kind .msi { font-size: 15px; color: var(--muted); vertical-align: -0.2em; }
.sevt.k-release { border-left-color: #7fce9e; }
.sevt.k-event { border-left-color: #93c2ee; }
.sevt.k-stream { border-left-color: #c89bf0; }
.sevt.k-sale_end, .sevt.k-deadline { border-left-color: #e0a96d; }
.sevt.k-preorder { border-left-color: #8fbef0; }
.sevt.k-update { border-left-color: var(--muted); }
.sched-related { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px;
  color: var(--muted); margin: 2px 2px 12px; }
.sched-related .chip { font-size: 12px; padding: 1px 9px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); background: var(--chip); color: var(--ink); font-weight: 600; }
.tag-sched-link { display: inline-block; margin-left: 8px; font-size: 12.5px; }

/* 移动端底部 tab 栏(拇指区);桌面隐藏 */
.botnav { display: none; }
@media (max-width: 760px) {
  header nav { display: none; }                 /* 顶栏链接收进底部 tab */
  main { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .site-foot { margin-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .botnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--bg); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .botnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 2px 8px; font-size: 11px; color: var(--muted); min-height: 44px; justify-content: center;
  }
  .botnav a.on { color: var(--accent); }
  .botnav .bi { font-size: 22px; line-height: 1; vertical-align: 0; }
}

/* 公开化:页脚 + 关于页 */
.site-foot { max-width: 760px; margin: 28px auto 0; padding: 14px 12px 32px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted); }
.site-foot nav a { color: var(--muted); }
.prose { max-width: 680px; margin: 0 auto; }
.prose h1 { font-size: 24px; margin: 6px 0 14px; }
.prose h2 { font-size: 17px; margin: 22px 0 8px; }
.prose p, .prose li { font-size: 15px; line-height: 1.7; }
.prose ul { padding-left: 20px; }
.prose li { margin: 4px 0; }

/* ================= 公开化:主题切换 + 语言切换 + 编辑部衬线 ================= */
/* 手动主题:data-theme 由 <head> 内联脚本先行设置;[data-theme] 特异度高于媒体查询,故可强制覆盖系统偏好。 */
:root { color-scheme: dark; }
@media (prefers-color-scheme: light) { :root { color-scheme: light; } }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eceef1; --card: #ffffff; --ink: #353b44; --muted: #707885;
  --line: #e3e6ea; --accent: #336cb8; --chip: #eef1f5; --feat: #f2f5f9;
  --tag-bg: #e6eef8; --tag-ink: #2f6fc0;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181b21; --card: #1f232b; --ink: #c4c9d2; --muted: #7e8694;
  --line: #2a2f39; --accent: #5b94cf; --chip: #262b34; --feat: #1f2530;
  --tag-bg: #243348; --tag-ink: #8fbef0;
}

/* 顶栏右侧工具区(主题 + 语言):独立于 nav,故移动端 nav 收起后仍可用。 */
.head-tools { display: inline-flex; align-items: center; gap: 10px; }
header nav + .head-tools { margin-left: 0; }
.iconbtn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 2px; display: inline-flex; align-items: center; border-radius: 6px;
}
.iconbtn:hover { color: var(--ink); }
.iconbtn .msi { font-size: 19px; vertical-align: 0; }
.lang-switch { display: inline-flex; gap: 6px; padding-left: 10px; border-left: 1px solid var(--line); }
.lang-switch a { color: var(--muted); font-size: 12px; line-height: 1; }
.lang-switch a.on { color: var(--ink); font-weight: 700; }
@media (max-width: 760px) { header .head-tools { margin-left: auto; } }

/* 编辑部衬线:品牌 / 主题标签 / 融合 brief / 关于正文 走 --serif(拉丁衬线 + CJK 逐字回退)。 */
header .brand a { font-family: var(--serif); letter-spacing: .1px; }
.sg-label { font-family: var(--serif); }
.sg-brief, .sc-brief { font-family: var(--serif); }
.prose h1, .prose h2 { font-family: var(--serif); }

/* ============ 按 UI 语言分字体栈(<html lang> 已由 i18n 设定) ============ */
/* 日文:黑体走 Hiragino/游ゴ/Noto Sans JP;「衬线」拉丁走 Georgia、CJK 仍回退黑体(屏显习惯)。 */
:root:lang(ja) {
  --sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
          "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", sans-serif;
  --serif: Georgia, "Times New Roman", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
           "Yu Gothic", YuGothic, "Noto Sans JP", sans-serif;
}
/* 简体中文:黑体走苹方/雅黑/Noto Sans SC;「衬线」拉丁走 Georgia、CJK 仍回退黑体(屏显习惯)。 */
:root:lang(zh) {
  --sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB",
           "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
/* CJK 阅读:略增行高,贴合中日排版习惯(拉丁维持 1.6)。 */
:root:lang(ja) body, :root:lang(zh) body { line-height: 1.75; }
:root:lang(ja) .sg-brief, :root:lang(zh) .sg-brief,
:root:lang(ja) .sc-brief, :root:lang(zh) .sc-brief,
:root:lang(ja) .prose p, :root:lang(zh) .prose p { line-height: 1.85; }
