/* ============================================================
   此时 · Apple HIG 外观
   语义色 + 大标题导航 + 分组列表 + 液态玻璃栏
   ============================================================ */

/* 顶栏标题字体：Manrope（本地自托管，离线可用），只含拉丁字形，
   中文标题会自动回落到系统字体，不影响追踪/设置等栏目 */
@font-face {
  font-family: "Manrope";
  src: url("/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
}

:root {
  /* --- Apple 系统语义色（浅色）--- */
  --system-bg: #f2f2f7;          /* grouped 背景 */
  --system-bg-elevated: #ffffff; /* 卡片 / 列表 */
  --system-bg-fill: #e9e9eb;     /* 输入 / 填充 */
  --label: #1c1c1e;              /* 主文字 */
  --label-2: rgba(60,60,67,0.60);/* 次文字 */
  --label-3: rgba(60,60,67,0.30);/* 三级文字 */
  --separator: rgba(60,60,67,0.18); /* 细分隔线 */
  --separator-opaque: #d1d1d6;

  /* --- 品牌强调（美团黄，作为 App tint）--- */
  --tint: #ffc300;
  --tint-deep: #c89000;          /* 黄底上的深色文字/链接 */
  --tint-soft: #fff8e1;
  --on-tint: #1c1c1e;

  /* --- 导航栏毛玻璃 --- */
  --nav-glass: rgba(250,250,250,0.72);
  /* --- iOS 27 Liquid Glass：悬浮玻璃胶囊 --- */
  --glass-bg: linear-gradient(180deg, rgba(255,255,255,0.46), rgba(255,255,255,0.26));
  --glass-border: rgba(255,255,255,0.62);
  --glass-edge: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.12) 32%, rgba(255,255,255,0.04) 62%, rgba(255,255,255,0.58) 100%);
  --glass-inner-top: rgba(255,255,255,0.92);
  --glass-inner-bottom: rgba(0,0,0,0.06);
  --glass-active-bg: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.56));
  --glass-shadow: rgba(0,0,0,0.16);
  --hero-bg: #ffd451;
  --badge-bg: #ff3b30;   /* 「有更新」红点徽标 */

  /* 顶栏语义色：浅色用品牌黄，深色换成中性深灰（亮黄在暗黑模式太刺眼）。
     状态栏画布、常驻顶栏、详情页导航栏三者共用同一组变量，保证上下同色。 */
  --topbar-bg: #ffd451;
  --topbar-fg: #1c1c1e;
  --topbar-fg-2: rgba(28,28,30,0.62);
  --topbar-border: rgba(0,0,0,0.07);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --system-bg: #000000;
    --system-bg-elevated: #1c1c1e;
    --system-bg-fill: #2c2c2e;
    --label: #ffffff;
    --label-2: rgba(235,235,245,0.60);
    --label-3: rgba(235,235,245,0.30);
    --separator: rgba(84,84,88,0.55);
    --separator-opaque: #3a3a3c;

    --tint: #ffc300;
    --tint-deep: #ffd60a;
    --tint-soft: #3a3010;
    --on-tint: #1c1c1e;

    --nav-glass: rgba(30,30,32,0.68);
    --glass-bg: linear-gradient(180deg, rgba(48,48,50,0.62), rgba(24,24,26,0.46));
    --glass-border: rgba(255,255,255,0.18);
    --glass-edge: linear-gradient(135deg, rgba(255,255,255,0.52) 0%, rgba(255,255,255,0.07) 32%, rgba(255,255,255,0.02) 62%, rgba(255,255,255,0.30) 100%);
    --glass-inner-top: rgba(255,255,255,0.24);
    --glass-inner-bottom: rgba(0,0,0,0.32);
    --glass-active-bg: linear-gradient(180deg, rgba(96,96,98,0.78), rgba(60,60,62,0.62));
    --glass-shadow: rgba(0,0,0,0.60);
    --hero-bg: #ffd451;  /* 仅保留给浅色品牌元素，顶栏不再用它 */
    --badge-bg: #ff453a;

    --topbar-bg: #1c1c1e;
    --topbar-fg: #f2f2f7;
    --topbar-fg-2: rgba(235,235,245,0.60);
    --topbar-border: rgba(84,84,88,0.55);

    color-scheme: dark;
  }
}

/* ===== 访问密码锁（全屏，解锁前盖住全部内容） ===== */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--system-bg);
}
.lock-screen.hidden { display: none; }
.lock-card {
  width: 100%;
  max-width: 340px;
  padding: 34px 28px 30px;
  background: var(--system-bg-elevated);
  border-radius: 20px;
  box-shadow: 0 12px 40px var(--glass-shadow);
  text-align: center;
}
.lock-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: var(--tint);
}
.lock-icon svg { width: 28px; height: 28px; fill: var(--on-tint); }
.lock-title { font-size: calc(22px * var(--font-scale)); font-weight: 700; color: var(--label); letter-spacing: 0.5px; }
.lock-subtitle { font-size: calc(13px * var(--font-scale)); color: var(--label-2); margin-top: 6px; }
.lock-input {
  width: 100%;
  margin-top: 22px;
  padding: 12px 14px;
  font-size: calc(16px * var(--font-scale));
  color: var(--label);
  background: var(--system-bg-fill);
  border: 1px solid var(--separator);
  border-radius: 11px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.lock-input:focus { border-color: var(--tint); }
.lock-input-pwd { margin-top: 10px; }
.lock-error { min-height: 18px; margin-top: 8px; font-size: calc(12px * var(--font-scale)); color: #ff3b30; }
.lock-btn {
  width: 100%;
  margin-top: 6px;
  padding: 13px 0;
  font-size: calc(16px * var(--font-scale));
  font-weight: 600;
  color: var(--on-tint);
  background: var(--tint);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lock-btn:disabled { opacity: 0.6; cursor: default; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  overscroll-behavior-x: none; /* 右滑返回交给应用手势，避免触发浏览器前进/后退 */
  /* 状态栏那一条取的是页面画布底色，必须和常驻顶栏同色，
     否则会出现上下两截不同色的断层。--topbar-bg 会随深浅自动切换 */
  background: var(--topbar-bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  /* 画布跟随顶栏语义色：iOS 独立模式下状态栏区域画的是 body 底色，
     与顶栏同色后顶部才是一整块平色，没有渐变也没有色差 */
  background: var(--topbar-bg);
  color: var(--label);
  line-height: 1.5;
  min-height: 100vh;
  overscroll-behavior-y: none;
  /* 顶部不留白：顶栏是 fixed 黄条，内容区自己补 44px 让位。 */
  padding-top: 0;
  padding-bottom: 0;
}

/* 内容区自己铺灰底（body 的黄只留给状态栏那一块），
   底栏上方留白也算在内容区里，玻璃底栏才不会透出黄 */
.page-content {
  background: var(--system-bg);
  min-height: 100vh;
  /* 顶栏是 fixed 的，不占文档流，这里把高度补回来 */
  padding-top: calc(env(safe-area-inset-top) + 44px);
  padding-bottom: calc(env(safe-area-inset-bottom) + 76px);
}

/* ===== 顶栏（常驻固定黄条：标题 + 更新时间） =====
   放在 fixed 层里而不是内容流里，是为了绕开 iOS 26 的
   Liquid Glass「scroll edge effect」——系统只模糊滚动内容，
   不会模糊固定层，标题文字才不会被糊掉。 */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  height: calc(env(safe-area-inset-top) + 44px);
  padding-top: env(safe-area-inset-top);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
}
.navbar-inner {
  height: 44px;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 18px;
}
.nav-main-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* Now 本身就是往期下拉开关，整块可点，点击区够大 */
.nav-title-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-title-btn:active { opacity: 0.6; }
.nav-title-btn-static { cursor: default; }
.nav-title-btn-static:active { opacity: 1; }
.nav-title-btn-static .nav-caret { display: none; }
.nav-title {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: calc(26px * var(--font-scale));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.7px;
  color: var(--topbar-fg);
  pointer-events: none;
}
/* 下拉箭头：CSS 画实心感的粗 chevron，全对比色，比 ▾ 字形更醒目 */
.nav-caret {
  position: relative;
  display: inline-block;
  align-self: center;
  width: 11px;
  height: 11px;
  margin-left: -1px;
  font-size: 0; /* 隐藏旧的 ▾ 字形 */
  transform-origin: center;
  transition: transform 0.18s ease;
}
.nav-caret::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 0;
  width: 8px;
  height: 8px;
  border-right: 2.6px solid var(--topbar-fg);
  border-bottom: 2.6px solid var(--topbar-fg);
  border-radius: 1.5px;
  transform: rotate(45deg);
}
.nav-title-btn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0; /* 往期标签变长时允许右侧整体收缩，不把标题挤出屏幕 */
}
.nav-back {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: calc(12px * var(--font-scale));
  font-weight: 600;
  color: var(--topbar-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-time {
  font-size: calc(11px * var(--font-scale));
  font-weight: 500;
  color: var(--topbar-fg-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  /* 「往期 2026年11月28日 星期六 07:00」比「更新于 07:00」长很多，
     小屏上宁可末尾省略，也不能撑破顶栏布局 */
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ===== 底部标签栏（iOS 27 Liquid Glass 悬浮胶囊） ===== */
.tabbar {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 3px;
  width: calc(100% - 32px);
  max-width: 400px;
  height: 54px;
  padding: 4px;
  border-radius: 27px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(24px) saturate(200%) brightness(1.04);
  backdrop-filter: blur(24px) saturate(200%) brightness(1.04);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-inner-top),
    inset 0 -1px 1px var(--glass-inner-bottom),
    0 10px 32px var(--glass-shadow),
    0 2px 6px var(--glass-shadow);
}
/* 渐变亮边：mask 只画 1px 边框，模拟玻璃折射出的高光轮廓 */
.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.tab {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--label-2);
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.tab-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .12s ease;
}
.tab-label {
  font-size: calc(10px * var(--font-scale));
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}
/* 选中：更实的一块玻璃 + 填充图标 + tint 色 */
.tab.active {
  color: var(--tint-deep);
  background: var(--glass-active-bg);
  box-shadow:
    inset 0 1px 0 var(--glass-inner-top),
    inset 0 -1px 1px var(--glass-inner-bottom),
    0 2px 10px var(--glass-shadow);
}
.tab.active .tab-icon { fill: currentColor; }
.tab:active .tab-icon { transform: scale(.86); }

/* ===== 标签栏外观：实色 =====
   触发：手动选「实色」，或「跟随系统」且系统开了增强对比度/降低透明度。
   实色下关掉毛玻璃与折射高光边，改用不透明卡片底 + 细描边，
   与 iOS 在系统降低透明度 / Tinted 外观下原生标签栏的观感一致。
   JS 把系统偏好统一写进 html[data-reduced]，Safari 走 prefers-contrast、
   Chrome/Android 走 prefers-reduced-transparency，CSS 只需维护这一份规则。 */
html[data-tabbar="solid"] .tabbar,
html[data-reduced="1"][data-tabbar="auto"] .tabbar {
  background: var(--system-bg-elevated);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: var(--separator);
  box-shadow: 0 6px 24px var(--glass-shadow), 0 1px 3px var(--glass-shadow);
}
html[data-tabbar="solid"] .tabbar::before,
html[data-reduced="1"][data-tabbar="auto"] .tabbar::before {
  display: none;
}
html[data-tabbar="solid"] .tab.active,
html[data-reduced="1"][data-tabbar="auto"] .tab.active {
  background: var(--tint);
  color: var(--on-tint);
  box-shadow: none;
}

/* ===== 轻提示（iOS HUD 风格） ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 82px);
  transform: translate(-50%, 8px);
  z-index: 60;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(28,28,30,0.82);
  color: #fff;
  font-size: calc(13px * var(--font-scale));
  font-weight: 500;
  /* 字号放大后允许折行，别让提示文字被屏幕边缘截断 */
  white-space: normal;
  max-width: calc(100vw - 48px);
  text-align: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== 通用卡片（iOS 分组列表：圆角面 + 细分隔线） ===== */
.list, .digest, .track-list { max-width: 720px; margin: 0 auto; }
.digest { padding: 16px 14px 32px; }
.track-list { padding: 0 14px 32px; }

.card {
  background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.card:active { background: var(--system-bg-fill); }

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 5px;
}
.card-title {
  flex: 1;
  font-size: calc(15px * var(--font-scale));
  font-weight: 600;
  line-height: 1.35;
  color: var(--label);
}
.rank {
  flex: 0 0 auto;
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
  color: var(--tint-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}
.tag {
  font-size: calc(11px * var(--font-scale));
  font-weight: 500;
  background: var(--system-bg-fill);
  color: var(--label-2);
  border-radius: 5px;
  padding: 1px 7px;
}
.tag.src { background: var(--tint-soft); color: var(--tint-deep); }
.time { font-size: calc(11px * var(--font-scale)); color: var(--label-3); margin-left: auto; }

.summary {
  font-size: calc(12.5px * var(--font-scale));
  color: var(--label-2);
  line-height: 1.5;
  border-top: 1px solid var(--separator);
  padding-top: 7px;
  margin-top: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 往期回溯面板：挂在顶栏下方的浮层，不再占据正文流 */
.archive-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 696px;
  background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 28px var(--glass-shadow);
  padding: 8px;
  max-height: 44vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.archive-tip {
  font-size: calc(12px * var(--font-scale));
  color: var(--label-2);
  padding: 4px 6px 8px;
}
.archive-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: calc(14px * var(--font-scale));
  color: var(--label);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.archive-item:active { background: var(--system-bg-fill); }
.archive-item.active {
  background: var(--tint-soft);
  color: var(--tint-deep);
  font-weight: 600;
}

.overview {
  background: var(--tint-soft);
  border: 0.5px solid var(--separator);
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 10px;
  cursor: pointer;
}
.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.overview.collapsed .overview-head { margin-bottom: 0; }
.overview-title { font-size: calc(15px * var(--font-scale)); font-weight: 700; color: var(--tint-deep); }
.overview-toggle { display: flex; align-items: center; gap: 8px; }
.overview-time { font-size: calc(11px * var(--font-scale)); color: var(--label-2); }
.overview-arrow { font-size: calc(13px * var(--font-scale)); color: var(--label-2); line-height: 1; }
.overview-body {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.75;
  color: var(--label);
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--separator);
}
.overview.collapsed .overview-body,
.overview.collapsed .overview-time { display: none; }

/* 加载 / 空态 / 失败 */
.loading, .empty {
  text-align: center;
  color: var(--label-2);
  padding: 48px 16px;
  font-size: calc(14px * var(--font-scale));
}
.muted { color: var(--label-2); font-size: calc(13px * var(--font-scale)); }
.hidden { display: none !important; }

.load-error { text-align: center; cursor: pointer; padding: 32px 16px; }
.err-title { font-size: calc(16px * var(--font-scale)); font-weight: 700; color: var(--label); margin-bottom: 8px; }
.err-msg { font-size: calc(13px * var(--font-scale)); color: var(--label-2); margin-bottom: 16px; }
.err-hint {
  display: inline-block;
  font-size: calc(13px * var(--font-scale));
  color: var(--on-tint);
  background: var(--tint);
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 600;
}

/* ===== 按钮 ===== */
.btn {
  border: none;
  background: var(--system-bg-elevated);
  color: var(--label);
  border-radius: 9px;
  padding: 8px 15px;
  font-family: inherit;
  font-size: calc(14px * var(--font-scale));
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--tint); color: var(--on-tint); font-weight: 700; }
.btn:active { opacity: .7; }
.btn:disabled { opacity: .5; cursor: default; }

/* ===== 使用者切换条 ===== */
.person-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 720px;
  margin: 12px auto 0;
  padding: 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.person-bar::-webkit-scrollbar { display: none; }
.person-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 15px 0;
}
.person-bar-label {
  font-size: calc(12px * var(--font-scale)); font-weight: 600; color: var(--tint-deep);
  background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 999px; padding: 4px 12px;
  max-width: 70vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.person-bar-badge {
  font-size: calc(10px * var(--font-scale)); color: var(--label-2);
  border: 0.5px solid var(--separator);
  border-radius: 999px; padding: 3px 8px;
}

/* 账号管理 */
.account-list { padding: 0 0 2px; }
.account-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px;
  border-top: 0.5px solid var(--separator);
}
.account-row-info { min-width: 0; flex: 1; }
.account-row-name {
  font-size: calc(14px * var(--font-scale)); font-weight: 600; color: var(--label);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.account-row-sub { font-size: calc(11.5px * var(--font-scale)); color: var(--label-2); margin-top: 2px; }
.account-row-ops { display: flex; gap: 6px; flex-shrink: 0; }
.account-op {
  font-family: inherit; font-size: calc(11.5px * var(--font-scale)); font-weight: 500;
  color: var(--tint-deep); background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator); border-radius: 7px;
  padding: 5px 9px;
}
.account-op:active { opacity: 0.6; }

/* ===== 追踪栏目 ===== */
.track-add {
  display: flex;
  gap: 8px;
  max-width: 720px;
  margin: 14px auto 12px;
  padding: 0 14px;
}
.track-input {
  flex: 1;
  min-width: 0;
  background: var(--system-bg-elevated);
  color: var(--label);
  border: 0.5px solid var(--separator);
  border-radius: 10px;
  padding: 9px 13px;
  font-family: inherit;
  font-size: calc(14px * var(--font-scale));
  outline: none;
}
.track-input:focus { border-color: var(--tint); box-shadow: 0 0 0 3px var(--tint-soft); }
.track-input::placeholder { color: var(--label-3); }

/* ===== 追踪栏目：默认折叠的展开式卡片（与「今日综述」一致） =====
   折叠时只露一行：关键词 + 「有更新」徽标 + 更新时间 + 箭头；
   点击展开才渲染小结 / 相关新闻 / 历史 / 取消追踪。 */
.track-card {
  background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.track-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  padding: 12px 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* 第一行：关键词占满剩余宽度，长词完整显示（最多两行再省略） */
.track-head-left {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; flex: 1 1 auto;
}
.track-head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.track-kw {
  font-size: calc(16px * var(--font-scale)); font-weight: 700; color: var(--label);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; white-space: normal; overflow-wrap: anywhere;
  min-width: 0; line-height: 1.28;
}
.track-badge {
  font-size: calc(10px * var(--font-scale));
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--badge-bg);
  padding: 4px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.track-arrow { font-size: calc(13px * var(--font-scale)); color: var(--label-2); line-height: 1; }

.track-card.collapsed .track-body { display: none; }
.track-body {
  padding: 0 15px 13px;
  border-top: 1px solid var(--separator);
}
.track-summary { font-size: calc(13.5px * var(--font-scale)); line-height: 1.7; color: var(--label); margin-top: 11px; }
.track-summary.pending { color: var(--label-2); font-style: italic; }
.track-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}
.track-toggle { font-size: calc(12px * var(--font-scale)); color: var(--tint-deep); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.track-remove {
  border: none; background: var(--system-bg-fill); color: var(--label-2);
  font-family: inherit; font-size: calc(12px * var(--font-scale)); border-radius: 6px;
  padding: 4px 10px; cursor: pointer; white-space: nowrap;
}
.track-history { margin-top: 11px; border-top: 1px solid var(--separator); padding-top: 9px; }
.track-report { padding: 8px 0; border-bottom: 1px solid var(--separator); }
.track-report:last-child { border-bottom: none; }
.track-report-time { font-size: calc(11px * var(--font-scale)); color: var(--label-2); margin-bottom: 4px; }
.track-report-text { font-size: calc(13px * var(--font-scale)); line-height: 1.65; color: var(--label); }
.track-news { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.track-news a { font-size: calc(12px * var(--font-scale)); color: var(--tint-deep); text-decoration: none; line-height: 1.5; }
.track-news a span { color: var(--label-2); }
.track-empty-hint { font-size: calc(12px * var(--font-scale)); color: var(--label-2); margin-top: 8px; }

/* ===== 追踪栏目：融合模式（把多个词绑成一个议题） ===== */
.track-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto 10px;
  padding: 0 14px;
}
.track-bar-hint {
  flex: 1;
  min-width: 0;
  font-size: calc(11.5px * var(--font-scale));
  line-height: 1.45;
  color: var(--label-2);
}
.track-fusion-btn {
  flex-shrink: 0;
  border: 0.5px solid var(--separator);
  background: var(--system-bg-elevated);
  color: var(--tint-deep);
  font-family: inherit;
  font-size: calc(12.5px * var(--font-scale));
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.track-fusion-btn.active {
  background: var(--tint);
  color: var(--on-tint);
  border-color: transparent;
}

/* 选择态：选中的卡片描边高亮，一眼看出要融合哪几个 */
.track-card.selectable { transition: border-color .15s, background .15s; }
.track-card.selected { border-color: var(--tint); background: var(--tint-soft); }
.fusion-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--separator-opaque);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  line-height: 1;
  color: var(--on-tint);
}
.track-card.selected .fusion-check {
  background: var(--tint);
  border-color: var(--tint);
}

/* 组合议题卡片 */
.track-group-tag {
  flex-shrink: 0;
  font-size: calc(9.5px * var(--font-scale));
  font-weight: 700;
  line-height: 1;
  color: var(--tint-deep);
  background: var(--tint-soft);
  padding: 3px 5px;
  border-radius: 5px;
  white-space: nowrap;
}
.track-members {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 15px 10px;
}
.track-member {
  font-size: calc(11px * var(--font-scale));
  color: var(--label-2);
  background: var(--system-bg-fill);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 底部融合操作条：浮在标签栏上方，避开安全区 */
.fusion-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 76px);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 400px;
  padding: 8px 8px 8px 16px;
  border-radius: 24px;
  background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .16);
}
.fusion-count { flex: 1; font-size: calc(12.5px * var(--font-scale)); color: var(--label-2); }
.fusion-cancel {
  border: none;
  background: transparent;
  color: var(--label-2);
  font-family: inherit;
  font-size: calc(12.5px * var(--font-scale));
  padding: 6px 8px;
  cursor: pointer;
}
.fusion-ok {
  border: none;
  background: var(--tint);
  color: var(--on-tint);
  font-family: inherit;
  font-size: calc(12.5px * var(--font-scale));
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.fusion-ok:disabled { opacity: .45; }
/* 融合模式下给列表留出操作条的高度，避免最后一张卡被挡住 */
#viewTrack.fusion-on #trackList { padding-bottom: 96px; }

/* ===== 弹窗（融合命名） ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .38);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-card {
  width: 100%;
  max-width: 340px;
  background: var(--system-bg-elevated);
  border-radius: 16px;
  padding: 20px 18px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .24);
}
.modal-title { font-size: calc(16px * var(--font-scale)); font-weight: 700; color: var(--label); }
.modal-desc { font-size: calc(12px * var(--font-scale)); line-height: 1.6; color: var(--label-2); margin-top: 7px; }
.group-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.group-member-chip {
  font-size: calc(12px * var(--font-scale));
  color: var(--tint-deep);
  background: var(--tint-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.group-name-input { width: 100%; margin-top: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }

/* ===== 追踪词「发展历程」：跨期汇总（阶段时间线） ===== */
.timeline-block {
  margin-top: 11px;
  padding: 12px 13px;
  background: var(--tint-soft);
  border: 0.5px solid var(--separator);
  border-radius: 10px;
}
.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.timeline-title { font-size: calc(13px * var(--font-scale)); font-weight: 700; color: var(--tint-deep); }
.timeline-meta { font-size: calc(10px * var(--font-scale)); color: var(--label-2); white-space: nowrap; }
.timeline-arc {
  font-size: calc(13px * var(--font-scale));
  line-height: 1.7;
  color: var(--label);
  margin-top: 9px;
}
.timeline-stages {
  margin-top: 11px;
  padding-left: 14px;
  border-left: 1.5px solid var(--separator);
}
.timeline-stage { position: relative; padding: 0 0 11px 4px; }
.timeline-stage:last-child { padding-bottom: 0; }
.timeline-stage::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tint-deep);
  box-shadow: 0 0 0 3px var(--system-bg-elevated);
}
.timeline-stage-period { font-size: calc(10px * var(--font-scale)); color: var(--label-2); }
.timeline-stage-title { font-size: calc(12.5px * var(--font-scale)); font-weight: 700; color: var(--label); margin-top: 2px; }
.timeline-stage-text { font-size: calc(12.5px * var(--font-scale)); line-height: 1.65; color: var(--label); margin-top: 3px; }
.timeline-sub { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--separator); }
.timeline-sub-label { font-size: calc(10px * var(--font-scale)); font-weight: 700; color: var(--label-2); letter-spacing: 0.4px; }
.timeline-points { margin-top: 5px; padding-left: 15px; }
.timeline-points li { font-size: calc(12.5px * var(--font-scale)); line-height: 1.6; color: var(--label); }
.timeline-trend { font-size: calc(12.5px * var(--font-scale)); line-height: 1.65; color: var(--label); margin-top: 4px; }
.timeline-empty { font-size: calc(12px * var(--font-scale)); color: var(--label-2); margin-top: 9px; line-height: 1.6; }
.timeline-archive-toggle {
  margin-top: 10px;
  font-size: calc(12px * var(--font-scale));
  color: var(--tint-deep);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.timeline-archive { margin-top: 9px; border-top: 1px solid var(--separator); padding-top: 8px; }
.timeline-archive-item { padding: 7px 0; border-bottom: 1px solid var(--separator); }
.timeline-archive-item:last-child { border-bottom: none; }
.timeline-archive-when { font-size: calc(10px * var(--font-scale)); color: var(--label-2); }
.timeline-archive-arc { font-size: calc(12.5px * var(--font-scale)); line-height: 1.6; color: var(--label); margin-top: 3px; }

/* ===== 设置栏目（iOS 分组设置样式） ===== */
.settings-wrap { max-width: 720px; margin: 0 auto; padding: 16px 14px 32px; }
.settings-group { margin-bottom: 22px; }
.settings-group-title {
  font-size: calc(12px * var(--font-scale));
  color: var(--label-2);
  margin: 0 14px 7px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.settings-card {
  background: var(--system-bg-elevated);
  border-radius: 12px;
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--separator);
}
.settings-row:last-child { border-bottom: none; }
/* 带选择器（字体大小/标签栏样式）的行：后面还跟着按钮组，
   不是 last-child，需显式去掉下边框，否则文字与按钮之间多一道横线 */
.settings-row-picker { border-bottom: none; }
.settings-row-main { flex: 1; min-width: 0; }
.settings-label { font-size: calc(15px * var(--font-scale)); color: var(--label); font-weight: 500; }
.settings-desc { font-size: calc(12px * var(--font-scale)); color: var(--label-2); margin-top: 3px; line-height: 1.45; }
.settings-action { flex-shrink: 0; padding: 6px 14px; font-size: calc(13px * var(--font-scale)); }

/* 字体大小选择器（分段控件） */
.font-size-picker {
  display: flex;
  gap: 4px;
  padding: 0 14px 14px;
}
.font-size-picker button {
  flex: 1;
  padding: 7px 0;
  font-size: calc(13px * var(--font-scale));
  font-weight: 500;
  color: var(--label-2);
  background: var(--system-bg-fill);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.font-size-picker button.active {
  background: var(--tint);
  color: var(--on-tint);
  font-weight: 700;
}

/* 字体大小：0.8×～3.0× 无级滑块（设置项本身也跟随缩放，只有固定栏除外） */
.font-scale-badge {
  flex-shrink: 0;
  min-width: 58px;
  text-align: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--tint-soft);
  color: var(--tint-deep);
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.font-scale-box { padding: 0 15px 14px; }
.font-scale-track { display: flex; align-items: center; gap: 10px; }
.font-scale-end {
  flex-shrink: 0;
  font-size: calc(11px * var(--font-scale));
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
}
.font-scale-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 28px;           /* 保留足够触摸高度 */
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;    /* 纵向照常滚页，横向交给滑块 */
}
.font-scale-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right,
    var(--tint) 0%, var(--tint) var(--fill, 9.09%),
    var(--system-bg-fill) var(--fill, 9.09%), var(--system-bg-fill) 100%);
}
.font-scale-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator-opaque);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}
.font-scale-range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right,
    var(--tint) 0%, var(--tint) var(--fill, 9.09%),
    var(--system-bg-fill) var(--fill, 9.09%), var(--system-bg-fill) 100%);
}
.font-scale-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator-opaque);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}
.font-scale-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.font-scale-hint { font-size: calc(11px * var(--font-scale)); color: var(--label-3); }
.font-scale-reset {
  flex-shrink: 0;
  border: 0;
  background: none;
  color: var(--tint-deep);
  font-family: inherit;
  font-size: calc(12px * var(--font-scale));
  font-weight: 600;
  padding: 5px 0 5px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.font-scale-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--system-bg-fill);
}
.font-scale-preview-label {
  display: block;
  font-size: calc(10px * var(--font-scale));
  color: var(--label-3);
  margin-bottom: 5px;
  letter-spacing: 0.4px;
}
.font-scale-preview-text {
  display: block;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  color: var(--label);
  word-break: break-word;
}

/* ===== 详情页（整页，iOS 导航栏） ===== */
.detail-page {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--system-bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: -8px 0 24px rgba(0,0,0,0.14); /* 右滑时露出左侧层级感 */
}
/* 右滑跟手：拖动期间取消动画，由 JS 实时写 transform */
.detail-page.swiping { animation: none !important; transition: none !important; }
.detail-navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  height: calc(env(safe-area-inset-top) + 44px);
  padding-top: env(safe-area-inset-top);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
}
.detail-back {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--topbar-fg);
  font-family: inherit;
  font-size: calc(16px * var(--font-scale));
  padding: 0 10px;
  height: 44px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.back-chevron { font-size: calc(30px * var(--font-scale)); line-height: 1; font-weight: 300; margin-top: -3px; }
.detail-back:active { opacity: .6; }
.detail-nav-title {
  /* 绝对居中：不受左侧返回按钮宽度影响（iOS UINavigationBar 做法） */
  position: absolute;
  left: 50%;
  top: env(safe-area-inset-top);
  transform: translateX(-50%);
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: calc(16px * var(--font-scale));
  font-weight: 600;
  color: var(--topbar-fg);
  white-space: nowrap;
  pointer-events: none;
}
.detail-body { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; }
.detail-meta { display: flex; gap: 7px; margin-bottom: 13px; }
.detail-title { font-size: calc(23px * var(--font-scale)); font-weight: 700; line-height: 1.35; color: var(--label); margin-bottom: 16px; }
.detail-text { font-size: calc(16px * var(--font-scale)); line-height: 1.85; color: var(--label); margin-bottom: 22px; white-space: pre-wrap; }
/* 正文正在补齐时的三点脉冲（仅在真慢时出现，避免闪动） */
.detail-loading {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 0 18px;
}
.detail-loading .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--label-3);
  animation: dotPulse 1.1s ease-in-out infinite;
}
.detail-loading .dot:nth-child(2) { animation-delay: .16s; }
.detail-loading .dot:nth-child(3) { animation-delay: .32s; }
@keyframes dotPulse {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.detail-keywords { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -3px 0 16px; }
.detail-keywords:empty { display: none; }
.detail-keywords .kw-label { flex: 0 0 100%; font-size: calc(11px * var(--font-scale)); color: var(--label-2); margin-bottom: 2px; }
.detail-keywords .kw {
  font-family: inherit;
  font-size: calc(12px * var(--font-scale)); line-height: 1.4; color: var(--tint-deep);
  background: var(--tint-soft); border: 0.5px solid var(--separator);
  border-radius: 999px; padding: 3px 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, opacity .12s ease;
}
.detail-keywords .kw:active { transform: scale(.94); opacity: .75; }
.detail-keywords .kw.tracked {
  color: var(--label-2);
  background: var(--system-bg-fill);
  border-color: var(--separator);
}

.detail-link {
  display: block; width: 100%; text-align: center; text-decoration: none;
  margin-top: 20px; padding: 12px; font-size: calc(15px * var(--font-scale)); border-radius: 10px; border: none; cursor: pointer;
}

/* 相关链接 */
.related-panel { margin-top: 16px; border-top: 1px solid var(--separator); padding-top: 6px; }
.related-head { font-size: calc(14px * var(--font-scale)); font-weight: 700; color: var(--label); margin: 6px 0 10px; }
.related-list { display: flex; flex-direction: column; gap: 7px; }
.related-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 0.5px solid var(--separator); border-radius: 10px;
  background: var(--system-bg-elevated); text-decoration: none; color: var(--label);
}
.related-item:active { background: var(--system-bg-fill); }
.related-item.original { border-color: var(--tint); background: var(--tint-soft); }
.related-title {
  flex: 1; font-size: calc(13px * var(--font-scale)); line-height: 1.5; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.related-src { flex: 0 0 auto; font-size: calc(11px * var(--font-scale)); color: var(--label-2); }
.related-item.original .related-src { color: var(--tint-deep); font-weight: 700; }

/* 三段式结构化分析 */
.analysis-section {
  font-size: calc(15px * var(--font-scale)); font-weight: 700; color: var(--tint-deep);
  margin: 22px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--separator);
}
.analysis-field { margin-bottom: 14px; }
.analysis-label { font-size: calc(12px * var(--font-scale)); font-weight: 600; color: var(--label-2); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.3px; }
.analysis-value { font-size: calc(14px * var(--font-scale)); line-height: 1.75; color: var(--label); }
.analysis-list { margin: 0; padding-left: 19px; }
.analysis-list li { font-size: calc(14px * var(--font-scale)); line-height: 1.7; color: var(--label); margin-bottom: 4px; }

.stakeholder-table { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--font-scale)); }
.stakeholder-table th, .stakeholder-table td {
  border: 1px solid var(--separator); padding: 7px 9px; text-align: left; vertical-align: top;
}
.stakeholder-table th { background: var(--system-bg-fill); font-weight: 600; color: var(--label); }

/* 详情滑入滑出 */
.detail-page.slide-in { animation: detailIn 0.28s cubic-bezier(.2,.8,.2,1); }
/* 滑出过程中详情页仍铺满整屏，必须立刻不接收点击，
   否则返回列表后马上点下一条会被这道"看不见的墙"吃掉 */
.detail-page.slide-out { animation: detailOut 0.22s ease-in forwards; pointer-events: none; }
@keyframes detailIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes detailOut { from { transform: translateX(0); } to { transform: translateX(100%); } }


/* ===== 字体大小设置（全站文字统一缩放，固定栏除外） =====
   所有 font-size 都写成 calc(Npx * var(--font-scale))：--font-scale 是
   「作用域倍率」，由设置页滑块把用户设定写进 <html> 的内联样式（0.8～3，
   无级），后代默认继承，所以正文、卡片、设置、聊天、弹窗全部一起缩放。
   --font-scale-user 单独记一份用户设定值，供被固定栏包住、但内容仍该
   跟随缩放的浮层（Now 的下拉往期）读回，避免被父级锁死。
   顶栏 / 详情页导航栏 / 底部标签栏是固定高度的外框，字号放大会挤破布局，
   因此在这三个容器上把作用域倍率锁回 1（其后代继承 1）。 */
:root {
  --font-scale: 1;
  --font-scale-user: 1;
}
.navbar, .detail-navbar, .tabbar { --font-scale: 1; }
/* 往期下拉虽挂在 .navbar 里，但它是内容浮层，仍要跟正文一起缩放 */
.archive-panel { --font-scale: var(--font-scale-user, 1); }

/* ===== 探索：卡片上的入口按钮 ===== */
.track-explore {
  flex-shrink: 0;
  border: 0.5px solid var(--tint);
  background: var(--tint-soft);
  color: var(--tint-deep);
  font-family: inherit;
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.track-explore:active { transform: scale(.94); opacity: .8; }
/* 已经做过深度探索的主题：实心黄 + 「已探索 ✓」，一眼看出哪些看过了 */
.track-explore.explored {
  background: var(--tint);
  color: var(--on-tint);
  border-color: transparent;
  /* 比「探索」多两个字的宽度，收紧内边距和字距，别把右侧时间挤掉 */
  padding: 5px 8px;
  letter-spacing: -.3px;
}
.track-explore .ex-tick {
  display: inline-block;
  margin-left: 2px;
  font-size: calc(10px * var(--font-scale));
  font-weight: 800;
  transform: translateY(-.5px);
}

/* ===== 探索页（复用整页详情视图） ===== */
.ex-head { margin-bottom: 16px; }
.ex-title {
  font-size: calc(23px * var(--font-scale));
  font-weight: 700;
  line-height: 1.32;
  color: var(--label);
}
.ex-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 9px; }
.ex-tag {
  font-size: calc(10px * var(--font-scale));
  font-weight: 700;
  line-height: 1;
  color: var(--tint-deep);
  background: var(--tint-soft);
  padding: 4px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.ex-tag.ghost { color: var(--label-2); background: var(--system-bg-fill); }
.ex-time { font-size: calc(11.5px * var(--font-scale)); color: var(--label-2); }
.ex-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.ex-chip {
  font-size: calc(11px * var(--font-scale));
  color: var(--label-2);
  background: var(--system-bg-fill);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.ex-warn {
  margin-top: 11px;
  font-size: calc(12px * var(--font-scale));
  line-height: 1.55;
  color: #8a5a00;
  background: #fff6df;
  border: 0.5px solid #f0d9a0;
  border-radius: 9px;
  padding: 9px 11px;
}
@media (prefers-color-scheme: dark) {
  .ex-warn { color: #ffd77a; background: rgba(255,195,0,0.12); border-color: rgba(255,195,0,0.3); }
}

/* 一句话定位：整页的题眼，给它一条品牌黄竖条 */
.ex-lead {
  font-size: calc(17px * var(--font-scale));
  font-weight: 600;
  line-height: 1.62;
  color: var(--label);
  padding-left: 12px;
  border-left: 3px solid var(--tint);
  margin: 2px 0 20px;
}

/* 分段卡片 */
.ex-sec {
  background: var(--system-bg-elevated);
  border-radius: 14px;
  padding: 15px 16px 16px;
  margin-bottom: 11px;
}
.ex-h {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: calc(12.5px * var(--font-scale));
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--label-2);
  margin-bottom: 11px;
}
.ex-h::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--tint);
  flex-shrink: 0;
}
.ex-h-sub { margin-left: auto; font-size: calc(10.5px * var(--font-scale)); font-weight: 500; color: var(--label-3); }
.ex-p {
  font-size: calc(15px * var(--font-scale));
  line-height: 1.82;
  color: var(--label);
  margin-bottom: 10px;
}
.ex-p:last-child { margin-bottom: 0; }

/* 历史脉络：左竖线 + 黄点时间轴 */
.ex-timeline { position: relative; padding-left: 3px; }
.ex-timeline::before {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 8px;
  bottom: 10px;
  width: 1.5px;
  background: var(--separator);
}
.ex-tl-item { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.ex-tl-item:last-child { padding-bottom: 0; }
.ex-tl-dot {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--tint);
  box-shadow: 0 0 0 3px var(--system-bg-elevated);
}
.ex-tl-box { flex: 1; min-width: 0; }
.ex-tl-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.ex-tl-period { font-size: calc(10.5px * var(--font-scale)); font-weight: 700; color: var(--tint-deep); white-space: nowrap; }
.ex-tl-title { font-size: calc(14.5px * var(--font-scale)); font-weight: 700; color: var(--label); }

/* 关键事实：编号 + 一条一句 */
.ex-facts { list-style: none; }
.ex-facts li {
  display: flex;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid var(--separator);
}
.ex-facts li:last-child { border-bottom: none; padding-bottom: 0; }
.ex-facts li:first-child { padding-top: 0; }
.ex-idx {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--tint-soft);
  color: var(--tint-deep);
  font-size: calc(10.5px * var(--font-scale));
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.ex-fact {
  flex: 1;
  min-width: 0;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.68;
  color: var(--label);
}

/* 各方立场 / 名词解释：小标题 + 说明 */
.ex-holder, .ex-term { padding: 9px 0; border-bottom: 1px solid var(--separator); }
.ex-holder:first-of-type, .ex-term:first-of-type { padding-top: 0; }
.ex-holder:last-of-type, .ex-term:last-of-type { border-bottom: none; padding-bottom: 0; }
.ex-holder-name {
  font-size: calc(14px * var(--font-scale));
  font-weight: 700;
  color: var(--label);
  margin-bottom: 4px;
}
.ex-term-name {
  display: inline-block;
  font-size: calc(13.5px * var(--font-scale));
  font-weight: 700;
  color: var(--tint-deep);
  background: var(--tint-soft);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 5px;
}

/* 值得盯的信号 */
.ex-watch { list-style: none; }
.ex-watch li {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.68;
  color: var(--label);
}
.ex-watch-dot { color: var(--tint-deep); font-weight: 700; flex-shrink: 0; }

/* 常见误解 */
.ex-mis {
  font-size: calc(13.5px * var(--font-scale));
  line-height: 1.72;
  color: var(--label);
  background: var(--system-bg-fill);
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.ex-mis:last-child { margin-bottom: 0; }

/* 参考来源 */
.ex-sources { padding-bottom: 12px; }
.ex-src-toggle {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: calc(12.5px * var(--font-scale));
  font-weight: 700;
  color: var(--tint-deep);
  text-align: left;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ex-src-list { margin-top: 8px; }
.ex-src {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--separator);
  text-decoration: none;
}
.ex-src:last-child { border-bottom: none; padding-bottom: 0; }
.ex-src-kind {
  display: inline-block;
  font-size: calc(9px * var(--font-scale));
  font-weight: 700;
  line-height: 1;
  color: #0a7ea4;
  background: rgba(10,126,164,0.1);
  padding: 3px 5px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: 1px;
}
.ex-src-kind.web { color: var(--label-2); background: var(--system-bg-fill); }
.ex-src-title { font-size: calc(12.5px * var(--font-scale)); line-height: 1.5; color: var(--label); }
.ex-src-meta { display: block; font-size: calc(10.5px * var(--font-scale)); color: var(--label-3); margin-top: 2px; }

/* 加载 / 失败 / 页脚 */
.ex-loading, .ex-error { padding: 44px 8px 30px; text-align: center; }
.ex-dots { display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 16px; }
.ex-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--label-3);
  animation: exPulse 1.1s ease-in-out infinite;
}
.ex-dots .dot:nth-child(2) { animation-delay: .16s; }
.ex-dots .dot:nth-child(3) { animation-delay: .32s; }
@keyframes exPulse {
  0%, 100% { opacity: .3; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1); }
}
.ex-loading-tip { font-size: calc(14.5px * var(--font-scale)); font-weight: 600; color: var(--label); margin-bottom: 8px; }
.ex-loading-sub {
  font-size: calc(12.5px * var(--font-scale));
  line-height: 1.65;
  color: var(--label-2);
  max-width: 300px;
  margin: 0 auto;
}
.ex-error-title { font-size: calc(15px * var(--font-scale)); font-weight: 700; color: var(--label); margin-bottom: 8px; }
.ex-error-msg {
  font-size: calc(13px * var(--font-scale));
  line-height: 1.65;
  color: var(--label-2);
  max-width: 300px;
  margin: 0 auto 16px;
}
.ex-retry { display: inline-block; width: auto; padding: 8px 22px; }
.ex-foot { text-align: center; margin-top: 20px; padding-bottom: 6px; }
.ex-again {
  border: 0.5px solid var(--tint);
  background: var(--tint-soft);
  color: var(--tint-deep);
  font-family: inherit;
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ex-again:active { transform: scale(.96); opacity: .85; }
.ex-foot-note {
  font-size: calc(11px * var(--font-scale));
  line-height: 1.55;
  color: var(--label-3);
  margin-top: 12px;
  padding: 0 12px;
}

/* ===== 端到端加密聊天 ===== */
.chat-head { padding: 2px 16px 12px; border-bottom: 0.5px solid var(--separator); }
.chat-head-title { font-size: calc(17px * var(--font-scale)); font-weight: 700; color: var(--label); }
.chat-head-sub { font-size: calc(11px * var(--font-scale)); color: var(--label-2); margin-top: 3px; }
.chat-messages {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 93px);
  bottom: calc(env(safe-area-inset-bottom) + 132px);
  left: 0; right: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.chat-empty { margin: auto; color: var(--label-2); font-size: calc(13px * var(--font-scale)); }
.chat-msg { max-width: 82%; align-self: flex-start; }
.chat-msg-me { align-self: flex-end; }
.chat-msg-who { font-size: calc(10.5px * var(--font-scale)); color: var(--label-2); margin: 0 4px 3px; }
.chat-msg-me .chat-msg-who { text-align: right; }
.chat-msg-body {
  font-size: calc(14.5px * var(--font-scale)); line-height: 1.45; color: var(--label);
  background: var(--system-bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: 14px; padding: 9px 13px;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.chat-msg-me .chat-msg-body { background: var(--tint); color: var(--on-tint); border-color: transparent; }
.chat-compose {
  position: fixed; bottom: calc(env(safe-area-inset-bottom) + 70px); left: 0; right: 0;
  z-index: 41;
  display: flex; gap: 8px; padding: 8px 12px;
  background: var(--system-bg);
  border-top: 0.5px solid var(--separator);
}
.chat-input {
  flex: 1; min-width: 0; padding: 10px 13px; font-size: calc(15px * var(--font-scale));
  color: var(--label); background: var(--system-bg-fill);
  border: 1px solid var(--separator); border-radius: 20px;
  font-family: inherit;
}
.chat-input:focus { outline: none; border-color: var(--tint); }
.chat-send { padding: 8px 16px; border-radius: 20px; }
.tab-badge {
  position: absolute; top: 2px; right: 50%; transform: translateX(70%);
  min-width: 16px; height: 16px; line-height: 16px;
  font-size: calc(10px * var(--font-scale)); font-weight: 700; text-align: center;
  color: #fff; background: #ff3b30; border-radius: 8px; padding: 0 4px;
}
.lock-link {
  width: 100%; margin-top: 10px; background: none; border: 0;
  color: var(--tint-deep); font-size: calc(13px * var(--font-scale)); font-family: inherit;
  text-decoration: underline;
}

/* v2.15.0 聊天：发送时间 + 已读回执 */
.chat-msg-read {
  font-size: calc(10.5px * var(--font-scale)); color: var(--label-2);
  margin: 3px 4px 0; text-align: right;
}
.chat-msg:not(.chat-msg-me) .chat-msg-read { text-align: left; }

/* ===== v2.16.0 软件介绍 ===== */
.settings-row-link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.settings-row-link:active { background: var(--system-bg-fill); }
.settings-chevron { flex-shrink: 0; font-size: calc(26px * var(--font-scale)); line-height: 1; color: var(--label-3); margin-top: -3px; }

.about-body { padding-top: 18px; }
.about-lead {
  background: var(--tint-soft);
  border-radius: 14px;
  padding: 17px 16px;
  margin-bottom: 24px;
}
.about-logo {
  font-size: calc(22px * var(--font-scale)); font-weight: 800; letter-spacing: 1px;
  color: var(--label);
}
.about-lead p {
  font-size: calc(13.5px * var(--font-scale));
  line-height: 1.75; color: var(--label); margin: 9px 0 0;
}
.about-section-title {
  font-size: calc(12px * var(--font-scale)); color: var(--label-2);
  margin: 0 2px 10px; letter-spacing: .4px;
}
.about-list { display: grid; gap: 10px; }
.about-card {
  background: var(--system-bg-elevated);
  border-radius: 12px; padding: 14px 15px;
}
.about-card-head { display: flex; align-items: center; gap: 9px; }
.about-num {
  flex-shrink: 0; font-size: calc(11px * var(--font-scale)); font-weight: 700;
  color: var(--tint-deep); background: var(--tint-soft);
  border-radius: 6px; padding: 3px 6px;
}
.about-card h3 {
  font-size: calc(15px * var(--font-scale));
  font-weight: 600; color: var(--label); margin: 0;
}
.about-card p {
  font-size: calc(13px * var(--font-scale));
  line-height: 1.7; color: var(--label-2); margin: 8px 0 0;
}
.about-foot {
  margin-top: 24px; text-align: center;
  font-size: calc(12px * var(--font-scale)); color: var(--label-3);
}

/* ===== 竹新社 · 快讯（2.18.3）=====
   卡片与「热点」完全同款：.card + .card-head + .card-title + .detail-keywords .kw。
   内容只保留标题与 AI 提炼的追踪关键词，豆沙绿主体色由下方变量覆盖提供。 */
.flash-box { margin: 14px 14px 0; }
.flash-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px 10px; gap: 10px; }
.flash-title { font-size: calc(17px * var(--font-scale)); font-weight: 700; color: var(--label); }
.flash-title::before {
  content: ""; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--tint); margin-right: 7px; vertical-align: middle;
}
.flash-sub { font-size: calc(11px * var(--font-scale)); color: var(--label-2); }
.flash-list { background: transparent; }
.flash-item { cursor: pointer; }
.flash-item:active { background: var(--system-bg-elevated); }
.flash-keywords { margin: 9px 0 0; }
.flash-keywords .kw-explore, .flash-keywords .flash-explore {
  margin-left: auto; color: var(--label-2);
  background: var(--system-bg-fill); border-color: transparent;
}
.flash-credit {
  margin: 12px 2px 0; text-align: center;
  font-size: calc(11px * var(--font-scale)); color: var(--label-3);
}
/* 快讯详情（3.0.0）：正文原样、原图 / 原视频按原始字节显示 */
.flash-detail-time {
  align-self: center; margin-left: auto;
  font-size: calc(11px * var(--font-scale)); color: var(--label-3);
}
.flash-detail-text { white-space: pre-wrap; }
.flash-detail-img, .flash-detail-video {
  display: block; width: 100%; max-width: 100%; height: auto;
  margin: 0 0 14px; border-radius: 10px;
  background: var(--system-bg-elevated);
}
.flash-detail-video { max-height: 70vh; }
.flash-detail-credit { text-align: left; margin: 18px 0 0; }
.flash-detail-link { margin-top: 10px; }
.flash-detail-expire {
  margin: 14px 0 0; text-align: center;
  font-size: calc(11px * var(--font-scale)); color: var(--label-3);
}
.flash-empty {
  padding: 26px 14px; text-align: center; color: var(--label-2);
  font-size: calc(14px * var(--font-scale));
}
.flash-more {
  display: block; width: 100%; margin-top: 10px; padding: 11px;
  border: none; border-radius: 12px; background: var(--system-bg-elevated);
  color: var(--tint-deep); font-size: calc(14px * var(--font-scale)); font-weight: 600;
}
.flash-more.hidden { display: none; }


/* ===== 热点页：综述 / 快讯 并列标签（2.18.2） ===== */
.hot-tabs {
  display: flex; gap: 6px; margin: 12px 14px 4px; padding: 4px;
  background: var(--system-bg-elevated); border-radius: 12px;
}
.hot-tab {
  flex: 1; position: relative; padding: 9px 6px; border: none;
  border-radius: 9px; background: transparent; color: var(--label-2);
  font-family: inherit; font-size: calc(15px * var(--font-scale));
  font-weight: 600; cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.hot-tab.active { background: var(--tint); color: var(--on-tint); }
.hot-tab.has-new::after {
  content: ""; position: absolute; top: 6px; right: 12px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--badge-bg);
}

/* 快讯标签：整站主体色切换为豆沙绿，与综述的品牌黄明确区分。
   放在文件末尾，浅/深两套都覆盖 :root 的同名变量。 */
html[data-hot-tab="flash"] {
  --tint: #8FB88C;
  --tint-deep: #3F6B46;
  --tint-soft: #EDF5EB;
  --on-tint: #1c1c1e;
  --topbar-bg: #C7E6C6;
  --topbar-fg: #1c1c1e;
  --topbar-fg-2: rgba(28,28,30,0.62);
  --topbar-border: rgba(0,0,0,0.07);
  --hero-bg: #C7E6C6;
}
@media (prefers-color-scheme: dark) {
  html[data-hot-tab="flash"] {
    --tint: #7FA97E;
    --tint-deep: #A9D6A6;
    --tint-soft: #26382A;
    --on-tint: #f2f2f7;
    --topbar-bg: #25372A;
    --topbar-fg: #EAF3E8;
    --topbar-fg-2: rgba(235,235,245,0.60);
    --topbar-border: rgba(84,84,88,0.55);
    --hero-bg: #25372A;
  }
}
