/* ==========================================================================
   Rayman Reading Hub — 视觉系统
   关键词：Minimal / Editorial / Knowledge / Research / Reading / Quiet
   规则：留白优先、层级清晰、不用大面积装饰、不做复杂动画。
   ========================================================================== */

/* ---------------------------------------------------------------- Tokens */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
             "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: Georgia, "Times New Roman", "Songti SC", "Source Han Serif SC",
                  "Noto Serif SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --sidebar-w: 216px;
  --rail-w: 272px;
  --topbar-h: 60px;
  --radius: 10px;
  --radius-sm: 6px;
  --max-read: 76ch;
}

html[data-theme="light"] {
  --bg: #FBFAF7;
  --bg-alt: #F4F2EC;
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --surface-3: #F1EFE9;
  --border: #E7E3D9;
  --border-strong: #D5D0C2;
  --text: #23252A;
  --text-2: #55585F;
  --text-3: #8B8F97;
  --accent: #9A5B3D;
  --accent-ink: #7E452B;
  --accent-soft: rgba(154, 91, 61, .09);
  --shadow: 0 1px 2px rgba(35, 37, 42, .04), 0 4px 16px rgba(35, 37, 42, .045);
  --shadow-lg: 0 2px 6px rgba(35, 37, 42, .06), 0 16px 40px rgba(35, 37, 42, .08);
  --code-bg: #F5F3EE;
  --mark: rgba(214, 176, 96, .28);

  --c-ai: #6B5CA5;
  --c-investing: #2E7D6F;
  --c-crypto: #A9762A;
  --c-semiconductor: #3B6EA5;
  --c-cognition: #8C5A78;
  --c-business: #7A6A4F;
  --c-other: #7C8087;
}

html[data-theme="dark"] {
  --bg: #15161A;
  --bg-alt: #1A1C21;
  --surface: #1D1F24;
  --surface-2: #22252B;
  --surface-3: #282C33;
  --border: #2D3138;
  --border-strong: #3C414A;
  --text: #E9E7E2;
  --text-2: #A9AEB6;
  --text-3: #767B85;
  --accent: #D08A63;
  --accent-ink: #E0A382;
  --accent-soft: rgba(208, 138, 99, .13);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, .4), 0 18px 44px rgba(0, 0, 0, .45);
  --code-bg: #23262C;
  --mark: rgba(214, 176, 96, .22);

  --c-ai: #A99BE0;
  --c-investing: #6FC0AE;
  --c-crypto: #DDAE5C;
  --c-semiconductor: #7CAEE0;
  --c-cognition: #D097B6;
  --c-business: #BFAA84;
  --c-other: #9AA0A8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--mark); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* 细滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 3px solid var(--bg);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ---------------------------------------------------------------- Boot */
.boot {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .3s ease;
}
.boot.hide { opacity: 0; pointer-events: none; }
.boot-inner { text-align: center; }
.boot-mark {
  width: 46px; height: 46px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}
.boot-text { color: var(--text-3); font-size: 13px; margin: 0; }

/* ---------------------------------------------------------------- Topbar */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 0 0 auto; }
.brand-mark {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600; letter-spacing: .1px;
  white-space: nowrap;
}
.brand-text em {
  font-style: normal; font-size: 11px; color: var(--text-3);
  letter-spacing: .2px; white-space: nowrap;
}

.search {
  position: relative; flex: 1 1 auto; min-width: 0; max-width: 520px;
  display: flex; align-items: center;
}
.search-ico {
  position: absolute; left: 11px; width: 15px; height: 15px;
  fill: var(--text-3); pointer-events: none;
}
.search input {
  width: 100%; min-width: 0; height: 36px;
  padding: 0 30px 0 33px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 8px;
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-3);
  font-size: 16px; line-height: 1; cursor: pointer;
  display: none; place-items: center;
}
.search.has-value .search-clear { display: grid; }
.search-clear:hover { background: var(--surface-3); color: var(--text); }

.topbar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.btn:disabled { opacity: .5; cursor: default; }
.btn .ico { width: 14px; height: 14px; fill: currentColor; flex: 0 0 auto; }
.btn-primary {
  background: var(--text); color: var(--bg); border-color: var(--text);
}
.btn-primary:hover { background: var(--text-2); border-color: var(--text-2); color: var(--bg); }
.btn-accent {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn.spinning .ico { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .ico { width: 17px; height: 17px; fill: currentColor; }
.ico-sun, .ico-moon { display: none; }
html[data-theme="light"] .ico-sun { display: block; }
html[data-theme="dark"] .ico-moon { display: block; }

.nav-toggle { display: none; }
.burger, .burger::before, .burger::after {
  display: block; width: 16px; height: 1.5px;
  background: currentColor; border-radius: 2px;
}
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; }
.burger::after { top: 5px; }

/* ---------------------------------------------------------------- Shell */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--rail-w);
  align-items: start;
  max-width: 1680px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- Sidebar */
.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 22px 12px 28px 20px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 22px;
}

.nav-group + .nav-group { margin-top: 20px; }
.nav-label {
  padding: 0 10px 7px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-3);
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active {
  background: var(--surface-3);
  color: var(--text);
  font-weight: 600;
}
.nav-dot {
  width: 7px; height: 7px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--c-other);
}
.nav-item .nav-count {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-count { color: var(--text-2); }

.sidebar-foot {
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-3); line-height: 1.7;
}
.sidebar-foot .sf-row { display: flex; justify-content: space-between; gap: 8px; }
.sidebar-foot strong { color: var(--text-2); font-weight: 600; }

.scrim { display: none; }

/* ---------------------------------------------------------------- Main */
.main { min-width: 0; padding: 26px 32px 80px; }

.view { max-width: 900px; }

.page-head { margin-bottom: 24px; }
.page-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
  margin: 0 0 7px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 600; line-height: 1.2;
  margin: 0 0 8px; letter-spacing: -.2px;
}
.page-sub { margin: 0; color: var(--text-2); font-size: 14px; max-width: 68ch; }
.page-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 0 0 12px;
}
.section-title {
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
  margin: 0;
}
.section-link {
  font-size: 12.5px; color: var(--text-3); cursor: pointer;
  border-bottom: 1px solid transparent; transition: color .12s, border-color .12s;
}
.section-link:hover { color: var(--accent); border-color: var(--accent); }

.divider { height: 1px; background: var(--border); margin: 34px 0; border: 0; }

/* ---------------------------------------------------------------- 三段式 Lane */
.lanes { display: flex; flex-direction: column; gap: 14px; margin-bottom: 38px; }

.lane {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.lane-head {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  user-select: none;
}
.lane-num {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 5px;
  font-size: 11px; font-weight: 700;
  background: var(--surface-3); color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.lane-titles { min-width: 0; flex: 1 1 auto; }
.lane-title {
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.lane-sub {
  font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); margin-top: 1px;
}
.lane-hint {
  font-size: 11.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 200px; flex: 0 1 auto;
}
.lane-count {
  margin-left: auto; flex: 0 0 auto;
  font-size: 12.5px; font-variant-numeric: tabular-nums;
  color: var(--text-2); font-weight: 600;
}
.lane-caret {
  flex: 0 0 auto; width: 16px; height: 16px;
  fill: var(--text-3);
  transition: transform .18s ease;
}
.lane.collapsed .lane-caret { transform: rotate(-90deg); }
.lane-body { padding: 14px 16px 16px; }
.lane.collapsed .lane-body { display: none; }
.lane-more {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
  width: 100%;
  font-size: 12.5px; color: var(--text-3); cursor: pointer;
}
.lane-more:hover { color: var(--accent); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
}

/* 文章卡片 */
.card {
  position: relative;
  display: flex; flex-direction: column; gap: 7px;
  padding: 12px 13px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  min-width: 0;                 /* 防 grid/flex 子项被长内容撑破 */
  transition: border-color .15s, background .15s, transform .15s;
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.card-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.card-title {
  font-size: 13.5px; font-weight: 600; line-height: 1.45;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card-meta {
  font-size: 11.5px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: auto; min-width: 0;
}
.card-sum {
  font-size: 12px; color: var(--text-2); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card-badges { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: 0 0 auto; }

/* ---------------------------------------------------------------- Chips */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1.5px 7px;
  border-radius: 4px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .03em; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.chip-cat { color: #fff; }
.chip-cat[data-cat="AI"] { background: var(--c-ai); }
.chip-cat[data-cat="INVESTING"] { background: var(--c-investing); }
.chip-cat[data-cat="CRYPTO"] { background: var(--c-crypto); }
.chip-cat[data-cat="SEMICONDUCTOR"] { background: var(--c-semiconductor); }
.chip-cat[data-cat="COGNITION"] { background: var(--c-cognition); }
.chip-cat[data-cat="BUSINESS"] { background: var(--c-business); }
.chip-cat[data-cat="OTHER"] { background: var(--c-other); }

.chip-source { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
.chip-tag {
  background: var(--surface-3); color: var(--text-2);
  font-weight: 500; cursor: pointer;
}
.chip-tag:hover { background: var(--accent-soft); color: var(--accent-ink); }
.chip-clickable { cursor: pointer; }
.chip-clickable:hover { filter: brightness(1.08); }

/* 分数徽标 */
.score {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 1.5px 6px; border-radius: 4px;
  background: var(--surface-3); color: var(--text-2);
}
.score-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.score[data-band="high"] { background: var(--accent-soft); color: var(--accent-ink); }
.score[data-band="relevant"] { background: rgba(46,125,111,.11); color: #2E7D6F; }
html[data-theme="dark"] .score[data-band="relevant"] { color: #6FC0AE; }
.score[data-band="general"] { background: var(--surface-3); color: var(--text-2); }
.score[data-band="low"] { background: var(--surface-3); color: var(--text-3); }

/* 阅读状态标记 */
.status-mark {
  width: 16px; height: 16px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s, background .15s;
}
.status-mark:hover { border-color: var(--accent); }
.status-mark[data-s="reading"] { border-color: var(--accent); background: var(--accent-soft); }
.status-mark[data-s="read"] { border-color: var(--c-investing); background: var(--c-investing); }
.status-mark[data-s="read"]::after {
  content: ""; width: 7px; height: 4px;
  border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.status-mark[data-s="reading"]::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.star-btn {
  width: 18px; height: 18px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; background: transparent; padding: 0;
  cursor: pointer; color: var(--text-3);
}
.star-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.star-btn:hover { color: var(--accent); }
.star-btn[data-on="1"] { color: var(--accent); }
.star-btn[data-on="1"] svg { fill: currentColor; }

/* ---------------------------------------------------------------- Timeline */
.tl-day { margin-bottom: 26px; }
.tl-day-head {
  position: sticky; top: var(--topbar-h); z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0 9px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.tl-date {
  font-family: var(--font-display);
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
}
.tl-weekday { font-size: 11.5px; color: var(--text-3); }
.tl-counts {
  margin-left: auto; display: flex; align-items: center; gap: 9px;
  font-size: 11.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.tl-unread { color: var(--accent-ink); font-weight: 600; }

.row-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 12px;
  margin: 0 -12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid transparent;
}
.row-item:hover { background: var(--surface-2); }
.row-item + .row-item { border-top: 1px solid var(--border); }
.row-main { min-width: 0; flex: 1 1 auto; }
.row-title {
  font-size: 14.5px; font-weight: 600; line-height: 1.45;
  margin: 0 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.row-item.is-read .row-title { color: var(--text-2); font-weight: 500; }
.row-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-3); min-width: 0;
}
.row-meta .sep { opacity: .45; }
.row-sum {
  font-size: 12.5px; color: var(--text-2); line-height: 1.55;
  margin: 5px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.row-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------- Reader */
.reader { max-width: var(--max-read); }
.reader-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-3);
  cursor: pointer; margin-bottom: 20px;
}
.reader-back:hover { color: var(--accent); }
.reader-title {
  font-family: var(--font-display);
  font-size: 33px; font-weight: 600; line-height: 1.24;
  letter-spacing: -.3px;
  margin: 0 0 14px;
}
/* 详情页「原标题」行：标题已改用人工整理的规范名，原始标题保留展示以便溯源。 */
.reader-original {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: -4px 0 14px;
  font-size: 13px; line-height: 1.5; color: var(--text-3);
}
.reader-original-k {
  flex: none;
  font-size: 10.5px; letter-spacing: .04em;
  padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-3);
}
.reader-meta {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-3);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.reader-author { color: var(--text-2); font-weight: 600; }
.reader-meta .sep { opacity: .45; }

.reader-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.seg button {
  border: 0; background: transparent;
  padding: 0 12px; height: 32px;
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s, color .12s;
}
.seg button + button { border-left: 1px solid var(--border); }
.seg button:hover { background: var(--surface-3); }
.seg button.on { background: var(--text); color: var(--bg); font-weight: 600; }

.reader-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }

.summary-box {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 14px 16px;
  margin: 0 0 28px;
}
.summary-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent-ink);
  margin: 0 0 7px;
  display: flex; align-items: center; gap: 7px;
}
.summary-label .auto-tag {
  background: var(--surface-3); color: var(--text-3);
  padding: 1px 5px; border-radius: 3px; font-size: 9.5px;
  letter-spacing: .05em;
}
.summary-box p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--text-2); }

/* ---------------------------------------------------------------- AI 解析 */
/* 显示在正文上方。默认限高折叠 —— 只露出约 500px（含模板的「0. 一句话判断」），
   否则 12 节模板渲染后可达 8000px+，会把原文埋到十几屏之后。
   内层复用 .article-body 排版作用域，仅覆盖字号与间距。 */
.ai-analysis {
  border: 1px solid var(--border);
  border-left: 3px solid var(--c-ai);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 16px 18px;
  margin: 0 0 28px;
}
.ai-analysis-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  cursor: pointer; user-select: none;
}
.ai-analysis-head:hover .ai-analysis-label { text-decoration: underline; }
.ai-analysis-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--c-ai);
}
.ai-analysis-tpl {
  background: var(--surface-3); color: var(--text-3);
  padding: 1px 6px; border-radius: 3px;
  font-size: 9.5px; letter-spacing: .05em;
}
.ai-analysis-chevron {
  margin-left: auto; color: var(--c-ai); font-size: 12px; line-height: 1;
  transition: transform .2s ease;
}
.ai-analysis:not(.is-collapsed) .ai-analysis-chevron { transform: rotate(180deg); }

/* 折叠裁剪区：渐隐遮罩贴在内容底部，与下方按钮高度解耦 */
.ai-analysis-clip { position: relative; }
.ai-analysis-body.article-body { max-height: 500px; overflow: hidden; }
.ai-analysis:not(.is-collapsed) .ai-analysis-body.article-body { max-height: none; }
.ai-analysis-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 88px;
  background: linear-gradient(to bottom, rgba(250, 249, 246, 0), var(--surface-2));
  pointer-events: none;
}
.ai-analysis:not(.is-collapsed) .ai-analysis-fade { display: none; }

.ai-analysis-toggle {
  display: block; width: 100%; margin: 10px 0 0; padding: 10px 0 0;
  background: none; border: 0; border-top: 1px dashed var(--border);
  color: var(--c-ai); font-family: inherit; font-size: 11.5px;
  font-weight: 700; letter-spacing: .06em; cursor: pointer;
}
.ai-analysis-toggle:hover { color: var(--text); }

.ai-analysis-body.article-body { font-size: 14.5px; line-height: 1.75; color: var(--text-2); }
.ai-analysis-body.article-body > *:first-child { margin-top: 0; }
.ai-analysis-body.article-body .md-h { margin-top: 1.6em; margin-bottom: .55em; }
.ai-analysis-body.article-body .md-h1 { font-size: 20px; }
.ai-analysis-body.article-body .md-h2 { font-size: 17.5px; }
.ai-analysis-body.article-body .md-h3 { font-size: 15.5px; }
.ai-analysis-body.article-body .md-h4 { font-size: 14.5px; }
.ai-analysis-body.article-body .md-table { font-size: 12.5px; }
.ai-analysis-body.article-body .md-table-wrap { margin: 1.1em 0; }
.ai-analysis-body.article-body .md-quote { border-left-color: var(--c-ai); }

.video-embed {
  margin: 0 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.video-embed a { display: block; position: relative; }
.video-embed img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.video-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,.28);
  transition: background .15s;
}
.video-embed a:hover .video-play { background: rgba(0,0,0,.42); }
.video-play span {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: grid; place-items: center;
  color: #111; font-size: 18px; padding-left: 4px;
}
.video-embed-foot {
  padding: 9px 13px; font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

/* ---------------------------------------------------------------- 正文排版 */
.article-body {
  font-size: 16px; line-height: 1.82;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.article-body > *:first-child { margin-top: 0; }
.article-body .md-h {
  font-family: var(--font-display);
  font-weight: 600; line-height: 1.35;
  margin: 2em 0 .7em;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}
.article-body .md-h1 { font-size: 24px; }
.article-body .md-h2 { font-size: 21px; }
.article-body .md-h3 { font-size: 18px; }
.article-body .md-h4,
.article-body .md-h5,
.article-body .md-h6 { font-size: 16px; color: var(--text-2); }
.article-body .md-p { margin: 0 0 1.15em; }
.article-body strong { font-weight: 650; color: var(--text); }
.article-body em { font-style: italic; }
.article-body del { color: var(--text-3); }
.article-body a {
  color: var(--accent-ink);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color .12s;
}
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body .md-hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }

.article-body .md-quote {
  margin: 1.5em 0; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-2);
}
.article-body .md-quote .md-p { margin-bottom: .6em; }
.article-body .md-quote > *:last-child { margin-bottom: 0; }

.article-body .md-callout {
  margin: 1.5em 0; padding: 13px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--c-semiconductor);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.article-body .md-callout-title {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 7px;
  color: var(--c-semiconductor);
}
.article-body .md-callout-warning,
.article-body .md-callout-caution,
.article-body .md-callout-danger,
.article-body .md-callout-error { border-left-color: var(--c-crypto); }
.article-body .md-callout-warning .md-callout-title,
.article-body .md-callout-caution .md-callout-title,
.article-body .md-callout-danger .md-callout-title,
.article-body .md-callout-error .md-callout-title { color: var(--c-crypto); }
.article-body .md-callout-tip,
.article-body .md-callout-success { border-left-color: var(--c-investing); }
.article-body .md-callout-tip .md-callout-title,
.article-body .md-callout-success .md-callout-title { color: var(--c-investing); }
.article-body .md-callout-body > *:last-child { margin-bottom: 0; }

.article-body .md-pre {
  margin: 1.5em 0;
  padding: 13px 15px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 13px; line-height: 1.65;
}
.article-body .md-pre code {
  font-family: var(--font-mono);
  background: none; padding: 0; border: 0;
  color: var(--text);
  white-space: pre;
}
.article-body code.ic {
  font-family: var(--font-mono);
  font-size: .88em;
  padding: 1.5px 5px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--accent-ink);
}

.article-body ul, .article-body ol { margin: 0 0 1.15em; padding-left: 1.45em; }
.article-body li { margin-bottom: .4em; }
.article-body li > ul, .article-body li > ol { margin: .4em 0 0; }
.article-body ul { list-style: disc; }
.article-body ul ul { list-style: circle; }
.article-body ol { list-style: decimal; }

.article-body .md-table-wrap { overflow-x: auto; margin: 1.5em 0; }
.article-body .md-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  border: 1px solid var(--border);
}
.article-body .md-table th, .article-body .md-table td {
  padding: 8px 11px; border: 1px solid var(--border);
  text-align: left; vertical-align: top;
}
.article-body .md-table th {
  background: var(--surface-3); font-weight: 650; font-size: 12.5px;
  white-space: nowrap;
}
.article-body .md-table tbody tr:nth-child(even) { background: var(--surface-2); }
.article-body .ta-center { text-align: center; }
.article-body .ta-right { text-align: right; }

.article-body .md-img {
  display: block; max-width: 100%; height: auto;
  border-radius: var(--radius-sm);
  margin: 1.5em auto;
  border: 1px solid var(--border);
}
/* 远端图片失效（X/Twitter 图片会随时间过期）时的占位，避免出现破图 */
.article-body .md-img-fallback {
  display: grid; place-items: center;
  min-height: 62px; margin: 1.5em 0; padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12.5px; letter-spacing: .2px;
}
.article-body .md-video {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 13px; margin: 1.2em 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border) !important;
  font-size: 13px;
}
.article-body .md-video-badge {
  background: var(--c-crypto); color: #fff;
  padding: 2px 7px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700; flex: 0 0 auto;
}
.article-body .md-wiki {
  color: var(--text-2);
  border-bottom: 1px dotted var(--border-strong);
  cursor: help;
}
.article-body .md-ticker {
  font-weight: 650;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}
.article-body .md-handle { color: var(--text-2); }

/* ---------------------------------------------------------------- Related */
.related { margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--border); }
.related-group + .related-group { margin-top: 22px; }
.related-label {
  font-size: 11px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 9px;
}
.related-item {
  display: block; padding: 9px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.related-item:last-child { border-bottom: 0; }
.related-item:hover .related-title { color: var(--accent-ink); }
.related-title { font-size: 14px; font-weight: 600; line-height: 1.45; margin-bottom: 3px; }
.related-meta { font-size: 11.5px; color: var(--text-3); display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 筛选栏 */
.filters {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 22px;
}
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
  min-width: 42px; flex: 0 0 auto;
}
.pill {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer;
  transition: all .13s;
  white-space: nowrap;
}
.pill:hover { border-color: var(--border-strong); color: var(--text); }
.pill.on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }
.filter-select {
  height: 30px; padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface); color: var(--text);
  font-size: 12.5px;
  max-width: 190px;
}
.filter-clear {
  margin-left: auto; font-size: 12.5px; color: var(--text-3);
  cursor: pointer; border-bottom: 1px solid transparent;
}
.filter-clear:hover { color: var(--accent); border-color: var(--accent); }

.result-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
  font-size: 12.5px; color: var(--text-3);
}
.result-bar strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Brief */
.brief-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 30px;
}
.brief-stat {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.brief-stat:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.brief-stat-label {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 6px; margin-bottom: 7px;
}
.brief-stat-num {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.brief-stat-unit { font-size: 11.5px; color: var(--text-3); margin-left: 4px; }

.picks { counter-reset: pick; }
.pick {
  display: flex; gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.pick:hover .pick-title { color: var(--accent-ink); }
.pick-rank {
  counter-increment: pick;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600;
  color: var(--text-3);
  width: 26px;
  font-variant-numeric: tabular-nums;
}
.pick-rank::before { content: counter(pick); }
.pick-body { min-width: 0; flex: 1 1 auto; }
.pick-title { font-size: 15.5px; font-weight: 600; line-height: 1.45; margin-bottom: 5px; }
.pick-meta { font-size: 11.5px; color: var(--text-3); display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.pick-sum { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin: 6px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- Rail */
.rail {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 26px 20px 40px 12px;
  display: flex; flex-direction: column; gap: 26px;
}
.rail-block-title {
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
  margin: 0 0 11px;
  display: flex; align-items: center; justify-content: space-between;
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud .chip-tag { font-size: 11.5px; padding: 3px 9px; }

.rail-author {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 0; cursor: pointer;
}
.rail-author:hover .rail-author-name { color: var(--accent-ink); }
.rail-author-av {
  width: 26px; height: 26px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-3); color: var(--text-2);
  font-size: 11.5px; font-weight: 700;
}
.rail-author-name {
  font-size: 13px; font-weight: 500; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rail-author-cats { font-size: 10.5px; color: var(--text-3); }
.rail-author-n {
  margin-left: auto; font-size: 11.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.rail-sync {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12px;
}
.rail-sync-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 3px 0;
}
.rail-sync-row span:first-child { color: var(--text-3); }
.rail-sync-row span:last-child {
  font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600;
}
.rail-sync-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--text-3);
  margin-bottom: 9px;
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-investing);
}
.dot-live.busy { background: var(--c-crypto); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .28; } }

/* ---------------------------------------------------------------- Authors */
.author-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.author-card {
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.author-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.author-card-name {
  font-size: 14.5px; font-weight: 650; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.author-card-stats {
  font-size: 11.5px; color: var(--text-3);
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 7px;
}
.author-card-cats { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Admin */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px; font-weight: 650;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-body { padding: 16px; }
.kv { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 7px 14px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text-2); word-break: break-all; }
.kv dd code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--code-bg); padding: 1.5px 6px; border-radius: 4px;
  border: 1px solid var(--border);
}

.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.stat-cell { background: var(--surface); padding: 12px 14px; }
.stat-cell-label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.stat-cell-num {
  font-family: var(--font-display); font-size: 21px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.stat-cell-num.warn { color: var(--c-crypto); }

table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th, table.data td {
  padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left;
}
table.data th {
  font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600; white-space: normal;
}
/* 双语「英文主行 + 中文副行」：用于表头、统计标签等窄栏位，
   避免中文被拆成半截（如 "DURATION 耗" / "时"） */
.th-cn {
  display: block; text-transform: none; letter-spacing: 0;
  font-weight: 400; opacity: .8; margin-top: 1px;
}
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
table.data .err-path {
  font-family: var(--font-mono); font-size: 11px;
  max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  width: 36px; height: 20px; border-radius: 12px;
  background: var(--border-strong); position: relative;
  transition: background .16s; flex: 0 0 auto;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .16s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .switch-track { background: var(--c-investing); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- 分页 / 状态 */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 26px;
}
.pager-info { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.empty {
  padding: 56px 20px; text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-3);
}
.empty-title { font-family: var(--font-display); font-size: 17px; color: var(--text-2); margin-bottom: 6px; }
.empty-sub { font-size: 13px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-line { height: 12px; margin-bottom: 8px; }
.sk-card { height: 108px; }

/* ---------------------------------------------------------------- Toasts */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 300;
  display: flex; flex-direction: column; gap: 9px;
  pointer-events: none;
}
.toast {
  min-width: 220px; max-width: 380px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 13px; color: var(--text);
  pointer-events: auto;
  animation: toast-in .22s ease;
}
.toast.err { border-left: 3px solid var(--c-crypto); }
.toast.ok { border-left: 3px solid var(--c-investing); }
.toast-title { font-weight: 650; margin-bottom: 3px; }
.toast-sub { font-size: 12px; color: var(--text-3); line-height: 1.55; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1320px) {
  :root { --rail-w: 240px; }
}
@media (max-width: 1180px) {
  .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .rail { display: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: grid; }
  .brand-text em { display: none; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 120;
    width: 268px; height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding-top: 20px;
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 110;
    background: rgba(0,0,0,.36);
    opacity: 0; pointer-events: none;
    transition: opacity .22s ease;
  }
  .scrim.open { opacity: 1; pointer-events: auto; }
  .main { padding: 20px 18px 72px; }
  .reader-title { font-size: 26px; }
  .page-title { font-size: 25px; }
  .article-body { font-size: 15.5px; line-height: 1.78; }
}
@media (max-width: 620px) {
  /* 单行顶栏：手机上隐藏品牌文字，仅保留 R 标记，
     把宽度让给搜索框，避免 .topbar-actions 被挤出视口（横向溢出）。 */
  .topbar { gap: 8px; padding: 0 11px; }
  .brand-text { display: none; }
  .brand-mark { width: 28px; height: 28px; font-size: 15px; }
  .search { max-width: none; }
  .search input { height: 34px; padding: 0 28px 0 31px; font-size: 13px; }
  .sync-label { display: none; }
  #syncBtn { padding: 0 9px; }
  .icon-btn { width: 32px; height: 32px; }
  .main { padding: 16px 14px 64px; }
  .card-grid { grid-template-columns: 1fr; }
  .brief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-grid { grid-template-columns: 1fr; }
  .reader-title { font-size: 22px; }
  .page-title { font-size: 22px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
  .lane-body { padding: 12px; }
  /* 泳道头部：手机宽度不够分给「提示文案」，它会把标题挤成「今日新 / 增」，
     计数 chip 也被顶到另一行。提示是次要信息，手机上直接隐藏，把宽度还给标题。 */
  .lane-head { gap: 9px; padding: 12px 13px; }
  .lane-hint { display: none; }
  .lane-title { flex-wrap: nowrap; white-space: nowrap; }
  .lane-sub { white-space: nowrap; }
  .filters { padding: 12px; }
  .filter-label { min-width: auto; }
  .toasts { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
}

/* 数据表格：窄屏横向滚动而非撑破页面 */
.table-scroll {
  width: 100%; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll > table.data { min-width: 560px; }

/* 云端只读镜像：让「为什么不能同步」一眼可见，而不是让人以为是坏了 */
.cloud-note { border-left: 3px solid var(--accent); background: var(--accent-soft); }
.cloud-note .panel-head { color: var(--accent-ink); }
/* 云端下顶栏同步按钮降级：仍可点击（会说明原因），但视觉上不再像主操作 */
#syncBtn.cloud { opacity: .62; }
#syncBtn.cloud .sync-label::after { content: " · 只读"; font-weight: 400; }
.rail-cloud {
  font-size: 11.5px; line-height: 1.65; text-align: center;
  color: var(--accent-ink); background: var(--accent-soft);
  border-radius: 8px; padding: 7px 8px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* 打印：只留正文 */
@media print {
  .topbar, .sidebar, .rail, .reader-actions, .reader-back, .related, .toasts { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .article-body { font-size: 11.5pt; }
  .reader { max-width: none; }
}
