/* See — info.gggg.site 极简个人站点（前身 Alpha/ɑ） */

/* 全局兜底：未显式定色的表单控件继承前景色，防 iOS 系统蓝 */
button, select, input { color: inherit; font: inherit; }

:root {
  --bg: #faf9f7;
  --bg-elev: #ffffff;
  --fg: #1a1a1c;
  --fg-2: #6b6b70;
  --fg-3: #9a9aa0;
  --line: #e8e6e2;
  --accent: #1a1a1c;
  --dot: #c8442e;
  --sheet-bg: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0b;
    --bg-elev: #141416;
    --fg: #f0eeea;
    --fg-2: #9a9aa0;
    --fg-3: #6b6b70;
    --line: #232326;
    --accent: #f0eeea;
    --sheet-bg: #141416;
    --shadow: 0 1px 3px rgba(0,0,0,.4);
  }
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #faf9f7; --bg-elev: #ffffff; --fg: #1a1a1c; --fg-2: #6b6b70; --fg-3: #9a9aa0;
  --line: #e8e6e2; --accent: #1a1a1c; --dot: #c8442e; --sheet-bg: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,.05);
}
html[data-theme="green"] {
  color-scheme: light;
  --bg: #f2f2f2; --bg-elev: #ffffff; --fg: #191919; --fg-2: #7f7f7f; --fg-3: #b2b2b2;
  --line: #e2e2e2; --accent: #07c160; --dot: #07c160; --sheet-bg: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0b; --bg-elev: #141416; --fg: #f0eeea; --fg-2: #9a9aa0; --fg-3: #6b6b70;
  --line: #232326; --accent: #f0eeea; --sheet-bg: #141416; --shadow: 0 1px 3px rgba(0,0,0,.4);
}
/* 墨水屏档（board §4.1 基线）：纯黑白、灰阶加深防抖动、无阴影 */
html[data-theme="ink"] {
  color-scheme: light;
  --bg: #ffffff; --bg-elev: #ffffff; --fg: #000000; --fg-2: #3a3a3a; --fg-3: #4a4a4a;
  --line: #b8b8b8; --accent: #000000; --dot: #000000; --sheet-bg: #ffffff;
  --shadow: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, "PingFang SC", "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
#app { display: flex; flex-direction: column; min-height: 100dvh; }

/* 顶栏 */
#topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand .glyph {
  font-family: "Snell Roundhand", "Brush Script MT", "Times New Roman", serif;
  font-size: 30px; line-height: 1; padding: 0 3px;
}
.brand .word { font-size: 15px; letter-spacing: .12em; color: var(--fg-2); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  border: 0; background: transparent; color: var(--fg);
  font-size: 19px; line-height: 1; padding: 8px 10px; border-radius: 10px;
  cursor: pointer; text-decoration: none; display: inline-flex;
}
.icon-btn:active { background: var(--bg-elev); }

/* 主视图 */
#view { flex: 1; padding: 4px 0 12px; }

/* 工具条（阅读模块内） */
.toolbar {
  display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto;
  scrollbar-width: none;
}
.toolbar::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line); background: var(--bg); color: var(--fg-2);
  border-radius: 99px; padding: 5px 14px; font-size: 13px; white-space: nowrap;
  cursor: pointer;
}
.chip.on { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* 文章列表 */
.item {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  cursor: pointer; display: flex; flex-direction: column; gap: 5px;
}
.item:active { background: var(--bg-elev); }
.item .meta { font-size: 12.5px; color: var(--fg-3); display: flex; gap: 8px; align-items: center; }
.item .meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dot); flex: none; }
.item .meta .dot.read { background: transparent; border: 1px solid var(--line); }
.item .title { font-size: 16px; font-weight: 600; line-height: 1.42; }
.item.read .title { color: var(--fg-2); font-weight: 500; }
.item .origin { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty { text-align: center; color: var(--fg-3); padding: 64px 24px; font-size: 14px; }
.empty .glyph { font-size: 46px; display: block; margin-bottom: 12px; font-family: "Snell Roundhand", "Brush Script MT", Georgia, serif; }
.spin { text-align: center; color: var(--fg-3); padding: 48px 0; font-size: 13px; }

/* 订阅页 */
.cat { padding: 8px 16px 2px; font-size: 13px; color: var(--fg-3); letter-spacing: .06em; }
.feed {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.feed:active { background: var(--bg-elev); }
.feed .name { font-size: 15px; }
.feed .cnt { font-size: 13px; color: var(--fg-3); }
.feed .cnt.hot { color: var(--dot); }

/* 设置页 */
.card { background: var(--bg-elev); border-radius: 14px; margin: 14px 16px; padding: 4px 0; box-shadow: var(--shadow); }
.row { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.row:last-child { border-bottom: 0; }
.row .k { color: var(--fg-2); }
.row .v { color: var(--fg); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row button, .row select {
  border: 0; background: transparent; color: var(--fg); font-size: 15px; cursor: pointer;
}
.hint { font-size: 12.5px; color: var(--fg-3); padding: 4px 18px 12px; }

/* 登录页 */
.login { display: flex; flex-direction: column; align-items: center; padding: 18vh 28px 0; gap: 6px; }
.login .glyph { font-family: Georgia, serif; font-style: italic; font-size: 64px; line-height: 1; }
.login h1 { font-size: 17px; font-weight: 600; letter-spacing: .1em; margin: 4px 0 20px; color: var(--fg-2); }
.login form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; }
.login input {
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--fg);
  border-radius: 12px; padding: 13px 14px; font-size: 16px; outline: none;
}
.login input:focus { border-color: var(--fg-2); }
.btn-main {
  border: 0; background: var(--accent); color: var(--bg);
  border-radius: 12px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.login .note { font-size: 12.5px; color: var(--fg-3); margin-top: 10px; text-align: center; line-height: 1.7; }

/* 文章详情浮层 */
#sheet {
  position: fixed; inset: 0; z-index: 50; background: var(--sheet-bg);
  overflow-y: auto; overscroll-behavior: contain;
  animation: up .22s ease;
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-top {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 8px) 10px 8px;
  background: var(--sheet-bg);
  border-bottom: 1px solid var(--line);
}
.sheet-actions { display: flex; gap: 2px; }
#sheet-body { padding: 20px 20px calc(env(safe-area-inset-bottom) + 48px); max-width: 720px; margin: 0 auto; }
#sheet-body h1.art { font-size: 21px; line-height: 1.4; margin: 0 0 10px; }
#sheet-body .art-meta { font-size: 13px; color: var(--fg-3); margin-bottom: 18px; display: flex; gap: 10px; }
#sheet-body .art-content { font-size: 16.5px; line-height: 1.75; }
#sheet-body .art-content img { max-width: 100%; height: auto; border-radius: 8px; }
#sheet-body .art-content pre { overflow-x: auto; font-size: 13.5px; }
#sheet-body .art-content a { color: inherit; text-decoration: underline; text-decoration-color: var(--fg-3); }
#sheet-body .art-content.video-player { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: #000; }
#sheet-body .art-content.video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 底部导航 */
#tabbar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; background: var(--bg);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 7px; border: 0; background: transparent; cursor: pointer;
  color: var(--fg-3); font-size: 11px;
}
.tab .ico { font-size: 20px; line-height: 1; }
.tab.on { color: var(--fg); }

/* 缓存提示 */
.cache-note { font-size: 12px; color: var(--fg-3); padding: 8px 16px 0; }
.empty .sub { font-size: 12px; color: var(--fg-3); }

/* 热榜 */
.chip.dim { opacity: .4; }
.chip.soft { pointer-events: none; }
.board-note { font-size: 12.5px; color: var(--fg-3); padding: 6px 16px 10px; }
.rank-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.rank-row:active, .rank-row:hover { background: var(--bg-elev); }
.rk {
  flex: none; width: 24px; text-align: center;
  font-family: Georgia, serif; font-style: italic;
  font-size: 16px; color: var(--fg-3); line-height: 1.4;
}
.rk.top { color: #c8442e; font-weight: 700; }
.rk-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rk-title { font-size: 15px; line-height: 1.45; }
.rk-desc {
  font-size: 12.5px; color: var(--fg-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dim-t { font-size: 13px; color: var(--fg-3); }
button.plain { border: 0; background: transparent; color: var(--fg); font-size: 15px; cursor: pointer; }

/* ---------- 桌面/宽屏（≥900px）：三栏布局 ---------- */
#sidebar { display: none; }
@media (min-width: 900px) {
  #tabbar { display: none; }
  #app {
    display: grid;
    grid-template-columns: 216px minmax(320px, 388px) 1fr;
    grid-template-rows: auto 1fr;
    height: 100dvh;
  }
  #topbar { grid-column: 1 / -1; }
  #sidebar {
    display: flex; flex-direction: column; grid-row: 2;
    border-right: 1px solid var(--line); overflow-y: auto;
    padding: 10px 0 env(safe-area-inset-bottom);
  }
  #view {
    grid-row: 2; overflow-y: auto; border-right: 1px solid var(--line);
    max-height: calc(100dvh - 56px);
  }
  #sheet {
    position: static; grid-row: 2; inset: auto;
    overflow-y: auto; max-height: calc(100dvh - 56px);
    animation: none;
  }
  #tabbar, #tabbar * { pointer-events: none; }

  /* 热榜/设置视图：中栏+右栏合并拉宽，缓解拥挤 */
  #app.wide-tab #view {
    grid-column: 2 / -1;
    border-right: 0;
  }
  #app.wide-tab #sheet { display: none; }

  /* 侧栏导航 */
  #side-nav { display: flex; flex-direction: column; padding: 4px 8px; }
  .side-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border: 0; border-radius: 10px;
    background: transparent; color: var(--fg-2);
    font-size: 14px; cursor: pointer; text-align: left;
  }
  .side-item .ico { font-size: 17px; width: 20px; text-align: center; }
  .side-item:hover { background: var(--bg-elev); }
  .side-item.on { color: var(--fg); background: var(--bg-elev); font-weight: 600; }
  #side-feeds { padding: 12px 8px 4px; border-top: 1px solid var(--line); margin-top: 12px; }
  #side-feeds .cat { padding: 4px 12px 6px; }
  #side-feeds .feed { padding: 8px 12px; border: 0; border-radius: 8px; }
  #side-feeds .feed:hover { background: var(--bg-elev); }
  .side-foot { margin-top: auto; padding: 14px 16px; font-size: 11.5px; color: var(--fg-3); }

  /* 列表悬停与标题收敛 */
  .item:hover { background: var(--bg-elev); }
  .item .title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .feed:hover { background: var(--bg-elev); }

  /* 阅读栏占位 */
  .pane-empty {
    height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 14px; color: var(--fg-3);
  }
  .pane-empty .glyph { font-family: Georgia, serif; font-style: italic; font-size: 84px; opacity: .32; }
  .pane-empty .tip { font-size: 13px; letter-spacing: .08em; }
}


/* 热度角标 */
.rank-row { align-items: center; }
.rk-hot {
  flex: none; margin-left: auto; font-size: 12px; color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}

/* 热榜筛选平铺（不横向滚动） */
.toolbar.wrap { flex-wrap: wrap; overflow: visible; padding: 12px 16px 4px; gap: 8px; }

/* ---------- 热榜金刚块网格（单行紧凑，支持左右滑动切榜） ---------- */
.bgrid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 5px; padding: 8px 16px 5px;
}
.bcell {
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 4px;
  min-width: 0; border: 1px solid var(--line); background: var(--bg-elev);
  border-radius: 9px; padding: 6px 2px; cursor: pointer;
}
.bcell:active { transform: scale(.97); }
.bcell .ico { font-size: 13px; line-height: 1; color: var(--fg); }
.bcell .nm { font-size: 11px; color: var(--fg-2); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcell.on { border-color: var(--accent); background: var(--accent); }
.bcell.on .ico { color: var(--bg); }
.bcell.on .nm { color: var(--bg); font-weight: 600; }
.bcell.off { opacity: .38; }
@media (min-width: 900px) {
  .bgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* ---------- 阅读来源金刚块（移动端；桌面用侧栏） ---------- */
.fgrid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 5px; padding: 4px 16px 8px;
}
.fcell {
  min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--line); background: var(--bg-elev);
  border-radius: 9px; padding: 6px 4px; cursor: pointer;
  color: var(--fg-2); /* 裸文本按钮缺省 color 会被 iOS 用系统蓝渲染 */
}
.fcell:active { transform: scale(.97); }
.fcell .nm { font-size: 11.5px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcell .cnt {
  color: var(--dot); font-size: 10.5px; font-weight: 600; flex: none;
  font-variant-numeric: tabular-nums;
}
/* v56：数字是「双击清空该来源未读」的独立触点（单击只给提示）——有数字时才扩大命中区 */
.fcell .cnt:not(:empty), #side-feeds .feed .cnt:not(:empty) {
  cursor: pointer; padding: 3px 4px; margin: -3px -4px; border-radius: 6px;
  touch-action: manipulation; /* 数字上也要杀掉双击缩放，保证两次轻点都能出 click */
}
.fcell .cnt:not(:empty):active, #side-feeds .feed .cnt:not(:empty):active { background: rgba(128, 128, 128, .28); }
.fcell.on { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.fcell.on .nm { color: var(--bg); font-weight: 600; }
.fcell.on .cnt { color: var(--bg); opacity: .8; }
@media (min-width: 900px) {
  .fgrid { display: none; }
}


/* 榜单缩略图 */
.rk-img {
  flex: none; width: 64px; height: 44px; object-fit: cover;
  border-radius: 6px; background: var(--line);
}

/* 下拉刷新指示器（iOS 原生风格：弧形 spinner，随下拉转紧、松手连续旋转） */
#ptr {
  position: fixed; top: 54px; left: 50%; z-index: 40;
  width: 24px; height: 24px; margin-left: -12px;
  pointer-events: none;
  transform: translateY(calc(-30px + var(--pull, 0) * 30px));
  opacity: var(--pull, 0);
}
#ptr.armed { transform: translateY(0); }
#ptr.spin { transform: translateY(0); opacity: 1; transition: opacity .12s ease; }
.ptr-arc {
  display: block; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--fg-3) 30%, transparent);
  border-top-color: var(--fg);
  transform: rotate(calc(var(--pull, 0) * 260deg));
}
#ptr.spin .ptr-arc { animation: ptrspin .7s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* v22: 操作反馈 toast 与已收藏入口 */
#toast {
  position: fixed; left: 50%; bottom: calc(64px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-elev); color: var(--fg);
  padding: 8px 16px; border-radius: 99px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  z-index: 99; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.feed.starred .name { color: #e8b339; font-weight: 600; }

/* ---------- 原生化触摸体验：禁双击缩放/长按选中/呼出菜单（正文与输入框保留） ---------- */
* { -webkit-tap-highlight-color: transparent; }
body {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
  touch-action: manipulation; /* 杀双击缩放与 300ms 点击延迟 */
}
img, a { -webkit-user-drag: none; }
.art-content, input, textarea { -webkit-user-select: text; user-select: text; }
.glyph svg { display: block; }
.brand .glyph svg { border-radius: 8px; }
.brand .glyph { color: var(--fg); display: inline-flex; } /* logo 随主题换色：浅色黑线/深色白线 */
.logo-w { display: none; } /* 默认浅色/微信绿：黑线版 */
html[data-theme="dark"] .logo-b { display: none; }
html[data-theme="dark"] .logo-w { display: inline; }
@media (prefers-color-scheme: dark) { /* 跟随系统深色：白线版（墨水屏档恒黑笔） */
  html:not([data-theme="light"]):not([data-theme="green"]):not([data-theme="ink"]) .logo-b { display: none; }
  html:not([data-theme="light"]):not([data-theme="green"]):not([data-theme="ink"]) .logo-w { display: inline; }
}

/* v50 用户菜单（右上角下拉） */
#umenu {
  position: fixed; top: calc(env(safe-area-inset-top) + 52px); right: 12px; z-index: 80;
  width: min(78vw, 300px); background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); padding: 4px 0; overflow: hidden;
}
.um-head { padding: 12px 16px 10px; font-size: 15px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); }
.um-head .um-sub { font-size: 12px; color: var(--fg-3); font-weight: 400; }
.um-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; font-size: 15px; border: 0; background: transparent; color: var(--fg); width: 100%; text-align: left; cursor: pointer; }
.um-row + .um-row { border-top: 1px solid var(--line); }
.um-row .k { color: var(--fg-2); }
.um-row select { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 8px; padding: 4px 8px; font-size: 14px; }
.um-row.btn:active { background: var(--bg); }
.um-row.danger { color: #c8442e; }

/* v50 财经 tab：大盘速览条（A股习惯：涨红跌绿） */
.mkt { display: flex; gap: 6px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none; }
.mkt::-webkit-scrollbar { display: none; }
.mkt .mk { flex: none; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--bg-elev); color: var(--fg-2); }
.mkt .mk.up { color: #d64541; }
.mkt .mk.dn { color: #2e9e5b; }

/* v51 热榜浮层：视频内嵌（修既有 .video-player 无样式问题）与封面大图 */
.video-player { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: #000; margin: 4px 0 14px; }
.video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.art-img { display: block; width: 100%; border-radius: 10px; margin: 4px 0 14px; }
.rk-star { flex: none; margin-left: 6px; font-size: 13px; color: var(--dot); }
.rank-row { cursor: pointer; }

/* v53 tab 图标（SVG 线条，随主题/选中色变色） */
.tab .ico svg { display: block; width: 26px; height: 26px; margin: 0 auto; }
.side-item .ico svg { display: block; width: 20px; height: 20px; }

/* v54 榜单行内收藏按钮 */
.rk-save { flex: none; border: 0; background: none; color: var(--fg-3); font-size: 17px; line-height: 1; padding: 8px 2px 8px 8px; cursor: pointer; }
.rk-save.on { color: var(--dot); }

/* ---------- v59 墨水屏档适配（board 规格 §4.1：BOOX Note X3 Pro 实测 Chrome 缩放 ~0.85） ---------- */
/* 动画/过渡全灭：e-ink 逐帧刷新白闪无信息量；按压缩放回归静态描边 */
html[data-theme="ink"] * { animation: none !important; transition: none !important; }
html[data-theme="ink"] .bcell:active, html[data-theme="ink"] .fcell:active { transform: none; }
html[data-theme="ink"] #toast { box-shadow: none; border: 1px solid var(--line); }
html[data-theme="ink"] #umenu { box-shadow: none; }
html[data-theme="ink"] .card { box-shadow: none; border: 1px solid var(--line); }
/* 字号整体上浮一档补偿 0.85 缩放（有效字号≈布局×0.85），行距同步放宽 */
html[data-theme="ink"] body { font-size: 17px; }
html[data-theme="ink"] .item .title { font-size: 19px; }
html[data-theme="ink"] .item .meta { font-size: 14px; }
html[data-theme="ink"] .rk-title { font-size: 18px; }
html[data-theme="ink"] .rk-desc { font-size: 14px; }
html[data-theme="ink"] .rk { font-size: 17px; }
html[data-theme="ink"] .rk-hot { font-size: 13px; }
html[data-theme="ink"] .chip { font-size: 14px; padding: 7px 16px; }
html[data-theme="ink"] .feed .name { font-size: 17px; }
html[data-theme="ink"] .fcell .nm { font-size: 13px; }
html[data-theme="ink"] .mkt .mk { font-size: 13px; }
html[data-theme="ink"] #sheet-body h1.art { font-size: 23px; }
html[data-theme="ink"] #sheet-body .art-content { font-size: 18px; line-height: 1.8; }
/* 触控目标 ≥36px（board a01 基线） */
html[data-theme="ink"] .tab { padding: 10px 0 9px; font-size: 12.5px; }
/* 灰阶下颜色独占信号失效：涨跌/热榜前三/未读数等一律黑白等价（涨跌自带 +/- 文本） */
html[data-theme="ink"] .mkt .mk.up, html[data-theme="ink"] .mkt .mk.dn { color: #000; }
html[data-theme="ink"] .rk.top { color: #000; }
html[data-theme="ink"] .feed .cnt.hot { color: #000; font-weight: 600; }
html[data-theme="ink"] .fcell .cnt { color: #000; font-weight: 600; }
html[data-theme="ink"] .feed.starred .name { color: #000; }
html[data-theme="ink"] .rk-save.on { color: #000; }
html[data-theme="ink"] .um-row.danger { color: #000; text-decoration: underline; }

/* ---------- AI 简报（v65） ---------- */
.brief-sec { margin: 4px 0 6px; }
.brief-h { font-weight: 600; font-size: 15px; padding: 10px 2px 4px; }
.brief-h .sub { font-weight: 400; font-size: 11px; color: var(--fg-2); margin-left: 6px; }
.brief-item { padding: 8px 2px 2px; border-bottom: 1px solid var(--bg); }
.brief-item .title { font-size: 15px; line-height: 1.4; }
.brief-d { font-size: 13px; color: var(--fg-2); line-height: 1.55; margin: 3px 0 8px; }
.brief-item.lk, .rank-row.lk { cursor: pointer; }
html[data-theme="ink"] .brief-h .sub, html[data-theme="ink"] .brief-d { color: #3a3a3a; }

/* ---------- 简报成文段落（v68） ---------- */
.brief-p { font-size: 15px; line-height: 1.85; margin: 0 2px 12px; text-align: justify; }
.brief-sec .rank-row { padding: 8px 2px; }
html[data-theme="ink"] .brief-p { color: #000; }

/* ---------- 简报总结块与板块 tab（v73） ---------- */
.brief-sum { background: var(--bg-elev); border: 1px solid rgba(0,0,0,.06); border-radius: 10px; margin: 10px 0 4px; overflow: hidden; }
.brief-sum-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; color: var(--fg-2); font-size: 12px; }
.brief-sum-head .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-sum-head .tog { flex-shrink: 0; }
.brief-sum.collapsed .brief-sum-body { display: none; }
.brief-pt { border-top: 1px solid rgba(0,0,0,.05); }
.brief-pt summary { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 500; }
.brief-pt summary::-webkit-details-marker { display: none; }
.brief-pt summary::before { content: "▸"; color: var(--fg-3); flex-shrink: 0; transition: transform .15s; }
.brief-pt[open] summary::before { transform: rotate(90deg); }
.brief-pt .pt-sec { font-style: normal; font-size: 10px; color: var(--fg-3); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; flex-shrink: 0; }
.brief-pt p { margin: 0 12px 10px; font-size: 13.5px; line-height: 1.7; color: var(--fg-2); }
.brief-tabs { margin: 4px 0 8px; overflow-x: auto; white-space: nowrap; }
html[data-theme="ink"] .brief-sum { background: #fff; border-color: #000; }
html[data-theme="ink"] .brief-pt p { color: #3a3a3a; }

/* ---------- 简报高亮与 AI 入口（v74） ---------- */
.hl { font-weight: 600; color: var(--dot); }
.hl.n { font-weight: 700; }
html[data-theme="ink"] .hl { color: #000; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pt-ai, .rk-ai {
  flex: none; border: 0; background: none; color: var(--fg-3);
  font-size: 13px; line-height: 1; padding: 8px 2px 8px 8px; cursor: pointer;
}
.pt-ai { padding: 0 0 0 6px; align-self: center; }
.pt-ai:active, .rk-ai:active { color: var(--dot); }
html[data-theme="ink"] .pt-ai, html[data-theme="ink"] .rk-ai { color: #555; }

/* ✨ AI 浮窗（简报 tab 专属，board 同款入口） */
#ai-fab {
  position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 64px);
  z-index: 55; /* 桌面端 #sheet 常驻右栏 z50，浮窗须在其上；仍在 AI 弹层(60)之下 */ width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--fg);
  font-size: 19px; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
#ai-fab:active { background: var(--accent); color: var(--bg); }

/* AI 对话弹层（资讯问答/发看板；语音+文字） */
.ag-mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35);
  display: flex; align-items: flex-end; justify-content: center;
}
.ag-sheet {
  width: min(640px, 100%); max-height: 86dvh; min-height: 46dvh;
  display: flex; flex-direction: column;
  background: var(--sheet-bg); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 14px 14px 0 0; box-shadow: 0 -4px 24px rgba(0,0,0,.12);
  animation: up .2s ease;
}
.ag-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 14px 6px; font-weight: 600; font-size: 15px;
}
.ag-head .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-x { border: 0; background: none; color: var(--fg-3); font-size: 15px; padding: 4px 6px; cursor: pointer; }
.ag-tip { margin: 0 14px 8px; font-size: 12px; color: var(--fg-3); line-height: 1.5; }
.ag-convo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px 10px; }
.ag-line { display: flex; gap: 8px; margin: 8px 0; align-items: flex-start; }
.ag-line .who {
  flex: none; font-size: 11px; padding: 2px 7px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--fg-2); margin-top: 2px;
}
.ag-line.you { flex-direction: row-reverse; }
.ag-line.you .who { background: var(--accent); color: var(--bg); border-color: transparent; }
.ag-line .what { font-size: 14px; line-height: 1.65; min-width: 0; overflow-wrap: anywhere; }
.ag-line.you .what { color: var(--fg-2); }
.ag-line.acts .what { font-size: 12.5px; color: var(--fg-3); }
.ag-line.dim { color: var(--fg-3); font-size: 12.5px; justify-content: center; }
.ag-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px);
  border-top: 1px solid var(--line);
}
.ag-bar button {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--fg);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.ag-bar button:disabled { opacity: .4; }
.ag-bar #ag-mic.rec { background: var(--dot); color: #fff; border-color: transparent; }
.ag-bar #ag-send { background: var(--accent); color: var(--bg); border-color: transparent; }
.ag-bar input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 19px;
  background: var(--bg); padding: 9px 14px; font-size: 14px; outline: none;
}
@media (min-width: 900px) {
  .ag-mask { align-items: center; padding: 24px; }
  .ag-sheet { border-radius: 14px; border-bottom: 1px solid var(--line); max-height: 78vh; }
}
html[data-theme="ink"] .ag-sheet { background: #fff; }
html[data-theme="ink"] .ag-bar input { background: #fff; }

/* ---------- 小雷大智慧·本地合集（v78） ---------- */
.xl-sec { padding: 10px 14px 2px; }
.xl-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.xl-title { font-weight: 600; font-size: 14px; }
.xl-sub { font-size: 11px; opacity: .55; }
.xl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.xl-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet-bg);
  text-align: left; overflow: hidden; }
.xl-card:active { opacity: .7; }
.xl-idx { font-size: 10px; opacity: .45; letter-spacing: .05em; }
.xl-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.xl-meta { font-size: 11px; opacity: .55; }
.xl-badge { position: absolute; top: 8px; right: 8px; font-size: 10px; color: var(--bg);
  background: var(--dot); border-radius: 99px; padding: 2px 7px; }
.xl-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: transparent; }
.xl-bar i { display: block; height: 100%; background: var(--dot); }
.xl-play { padding: 12px 14px 24px; }
.xl-bar-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.xl-ptitle { font-weight: 600; font-size: 14px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xl-play video { width: 100%; max-height: 62vh; background: #000; border-radius: 10px; }
.xl-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.xl-note { font-size: 11px; opacity: .5; margin-top: 10px; }
