/* Newsroom v6 - 新闻门户布局重做
 * 改进 v5：
 * 1. 默认亮色主题（DESIGN.md §2），顶栏拆两行：品牌行 + 命令面板搜索行
 * 2. 刷新控件收进齿轮 dropdown，主题按钮独立右上角
 * 3. Hero 焦点区（本小时最重要 1-3 条大卡）+ 普通流密度提升
 * 4. 源 avatar 色块、相对时间、筛选摘要条
 * 5. 侧栏 240px：导航 / 细分分类（左色条）/ 热门标签 chips / 数据概览折叠
 * 6. 热搜三列 grid（>1200px）/ 双列 / 单列
 * 7. 底栏三栏：版权平台数 | 快捷链接 | cron 推送提示
 */

:root {
  --bg: #f5f6f8;
  --bg-soft: #eef0f3;
  --card: #ffffff;
  --card-hover: #fbfcfd;
  --card-elevated: #ffffff;
  --border: #e6e8eb;
  --border-soft: #f0f2f5;
  --text: #1f2328;
  --text-2: #4b5563;
  --muted: #9aa3af;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-text: #ffffff;
  /* 分类 accent (克制使用) */
  --c-ai: #7c3aed;
  --c-cn: #ea580c;
  --c-hy: #ca8a04;
  --c-policy: #16a34a;
  --c-finance: #0891b2;
  --c-other: #94a3b8;
  /* 排名色 */
  --top1: #ef4444;
  --top2: #f97316;
  --top3: #eab308;
  /* 状态色 */
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
}
[data-theme="dark"] {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --card: #161b22;
  --card-hover: #1c2128;
  --card-elevated: #21262d;
  --border: #30363d;
  --border-soft: #21262d;
  --text: #e6edf3;
  --text-2: #b1bac4;
  --muted: #7d8590;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-soft: #1f6feb33;
  --accent-text: #0d1117;
  --c-ai: #a78bfa;
  --c-cn: #fb923c;
  --c-hy: #facc15;
  --c-policy: #4ade80;
  --c-finance: #22d3ee;
  --c-other: #9ca3af;
  --top1: #ff6e6e;
  --top2: #ffa040;
  --top3: #ffd040;
  --danger: #f87171;
  --danger-soft: #2d1a1a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.6;
  overscroll-behavior-y: contain; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body { min-height: 100dvh; display: flex; flex-direction: column; }
button, .nav-item, .tag-chip, .tag, .ptab { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
svg { display: inline-block; vertical-align: -2px; flex-shrink: 0; }
main { display: block; }

/* ====== 顶栏：第 1 行 品牌 | 第 2 行 命令面板搜索 ====== */
.topbar { position: sticky; top: 0; z-index: 100; background: var(--card); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.tb-row { max-width: 1400px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; width: 100%; }
.tb-top { height: 56px; gap: 16px; justify-content: space-between; }
.tb-ctrl { height: 46px; gap: 10px; padding-top: 2px; padding-bottom: 6px; }
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; }
.overlay.show { display: block; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 7px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; min-width: 38px; min-height: 38px; transition: all .15s; }
.icon-btn:hover { background: var(--bg-soft); color: var(--accent); }

.menu-btn { display: none; border-color: var(--border); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { display: none; align-items: center; color: #ff6b35; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 命令面板式搜索：占满中段 */
.cmd-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); transition: all .15s; }
.cmd-search:focus-within { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 3px var(--accent-soft); }
.cmd-search .search-ic { color: var(--muted); display: inline-flex; pointer-events: none; }
.cmd-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--text); font-size: 13px; padding: 8px 0; }
.cmd-search input::placeholder { color: var(--muted); }
.cmd-search button { padding: 5px 14px; border-radius: 7px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); cursor: pointer; font-size: 13px; font-weight: 500; transition: background .15s; flex-shrink: 0; }
.cmd-search button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* 刷新设置：齿轮 dropdown */
.gear-wrap { position: relative; flex-shrink: 0; }
.gear-btn { border-color: var(--border); }
.gear-pop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card-elevated); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 12px 14px; min-width: 200px; display: flex; flex-direction: column; gap: 10px; z-index: 120; }
.gear-pop[hidden] { display: none; }
.gear-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); }
.gear-row select { padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; cursor: pointer; }
.gear-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); cursor: pointer; font-size: 13px; transition: all .15s; }
.gear-refresh:hover { border-color: var(--accent); color: var(--accent); }
.auto { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.auto input { cursor: pointer; }
[data-tab="news"] .gear-wrap { display: none; }

/* ====== Tabs ====== */
.primary-tabs { display: flex; background: var(--card); border-bottom: 1px solid var(--border); height: 42px; align-items: stretch; flex-shrink: 0; padding: 0 24px; max-width: 1400px; margin: 0 auto; width: 100%; }
.ptab { background: transparent; border: none; color: var(--text-2); padding: 0 20px; font-size: 14px; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; display: flex; align-items: center; gap: 6px; }
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ====== Status bar ====== */
.status-bar { padding: 8px 24px; font-size: 12px; color: var(--text-2); display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--border-soft); background: var(--card); flex-shrink: 0; min-height: 32px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-policy);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 3px rgba(22,163,74,0.15); } 50% { box-shadow: 0 0 0 5px rgba(22,163,74,0.05); } }
.status-dot.stale { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); animation: none; }
.status-dot.error { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.15); animation: none; }
.sep { color: var(--border); }

/* ====== Views ====== */
.view-news, .view-trending { display: block; }
.view[hidden] { display: none; }
[data-tab="news"] .view-trending { display: none; }
[data-tab="trending"] .view-news { display: none; }

/* ====== Layout ====== */
.layout { display: flex; gap: 16px; padding: 16px 24px; max-width: 1400px; width: 100%; margin: 0 auto; flex: 1; min-height: 0; align-items: flex-start; }
.layout > .view { flex: 1; min-width: 0; }

/* 侧栏：按 tab 显示新闻导航 / 热搜平台 */
[data-tab="news"] .sb-trend { display: none; }
[data-tab="trending"] .sb-news { display: none; }

/* ====== Sidebar (240px, sticky 多级) ====== */
.sidebar { width: 240px; flex-shrink: 0; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px; position: sticky; top: 190px; max-height: calc(100dvh - 206px); overflow-y: auto; }
.sb-group { margin-bottom: 6px; }
.sb-label { font-size: 11px; color: var(--muted); margin: 10px 10px 6px; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; gap: 5px; }
.sb-label svg { width: 13px; height: 13px; opacity: .8; }
.nav-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text-2); margin-bottom: 1px; transition: all .12s; min-height: 38px; }
.nav-item:hover { background: var(--bg-soft); color: var(--text); }
.nav-item.active { background: var(--accent); color: var(--accent-text); font-weight: 500; }
.nav-item .cnt { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: var(--bg-soft); color: var(--muted); min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.nav-item.active .cnt { background: rgba(255,255,255,0.2); color: var(--accent-text); }
.nav-item .lbl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-item .lbl svg { width: 14px; height: 14px; opacity: .7; }
.nav-item.active svg { opacity: 1; }
.nav-item .plat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
/* 细分分类：左侧 4px 色条 */
.nav-item.cat-item { padding-left: 12px; border-left: 4px solid var(--cat-color, var(--c-other)); border-radius: 4px 7px 7px 4px; }
.nav-item.cat-item.active { border-left-color: rgba(255,255,255,0.6); }
.nav-item.cat-item .lbl { gap: 7px; }

/* 侧栏热门标签 chips */
.sb-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 8px 8px; }
.tag-chip { padding: 3px 11px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); cursor: pointer; font-size: 12px; line-height: 1.5; white-space: nowrap; transition: all .12s; }
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* 数据概览折叠区 */
.sb-details summary { list-style: none; cursor: pointer; }
.sb-details summary::-webkit-details-marker { display: none; }
.sb-summary .chev { margin-left: auto; transition: transform .15s; }
.sb-details[open] .chev { transform: rotate(180deg); }
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 8px 10px; }
.ov-card { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px; background: var(--bg-soft); border-radius: 8px; }
.ov-num { font-size: 16px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.ov-lbl { font-size: 11px; color: var(--muted); }

/* ====== 筛选摘要条 ====== */
.filter-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 14px; margin-bottom: 10px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; font-size: 13px; color: var(--accent); }
.filter-summary[hidden] { display: none; }
.filter-summary .fs-label { font-weight: 600; }
.filter-summary .fs-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-summary button { padding: 3px 10px; border-radius: 6px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; font-size: 12px; flex-shrink: 0; transition: all .12s; }
.filter-summary button:hover { background: var(--accent); color: var(--accent-text); }

/* ====== Hero 焦点区 ====== */
.hero { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.hero[hidden] { display: none; }
.hero-item {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--hero-color, var(--c-ai));
  border-radius: 10px;
  padding: 14px 16px 14px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.hero-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--hero-color, var(--c-ai)); }
.hero-item.open { box-shadow: var(--shadow-md); }
.hero-item .hero-flag { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; color: #fff; background: var(--hero-color, var(--c-ai)); line-height: 1.5; }
.hero-item .hero-flag svg { width: 11px; height: 11px; }
.hero-item .meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; padding-right: 74px; }
.hero-item .title { font-size: 17px; line-height: 1.5; font-weight: 700; color: var(--text); margin-top: 2px; padding-right: 60px; }
.hero-item .title a { color: inherit; }
.hero-item .title a:hover { color: var(--accent); }
.hero-item .summary { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.hero-item .foot { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.hero-item .foot .src { color: var(--text-2); font-weight: 600; }

/* ====== 普通流：卡片密度提升 ====== */
.list { display: flex; flex-direction: column; gap: 6px; }
.item {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--c-other);
  border-radius: 8px;
  padding: 12px 14px 12px 16px;
  cursor: pointer;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.item:hover { background: var(--card-hover); border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.item.open { background: var(--card-hover); border-color: var(--accent); box-shadow: var(--shadow-md); }
.item.cat-ai, .hero-item.cat-ai { border-left-color: var(--c-ai); }
.item.cat-cn, .hero-item.cat-cn { border-left-color: var(--c-cn); }
.item.cat-hy, .hero-item.cat-hy { border-left-color: var(--c-hy); }
.item.cat-policy, .hero-item.cat-policy { border-left-color: var(--c-policy); }
.item.cat-finance, .hero-item.cat-finance { border-left-color: var(--c-finance); }

/* 源 avatar：首字母色块 */
.src-avatar { width: 16px; height: 16px; border-radius: 4px; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; }

.item .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 5px; flex-wrap: wrap; }
.item .meta .src { color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.item .meta .time { color: var(--muted); font-variant-numeric: tabular-nums; }
.item .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }

.badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; border: 1px solid; line-height: 1.4; }
.badge svg { width: 10px; height: 10px; }
.badge.ai { background: rgba(124,58,237,0.08); color: var(--c-ai); border-color: rgba(124,58,237,0.18); }
.badge.cn { background: rgba(234,88,12,0.08); color: var(--c-cn); border-color: rgba(234,88,12,0.18); }
.badge.pushed { background: var(--bg-soft); color: var(--muted); border-color: var(--border); }
.badge.cat { background: var(--bg-soft); color: var(--text-2); border-color: var(--border); }

.item .title { font-size: 15px; line-height: 1.5; font-weight: 600; color: var(--text); margin-top: 2px; }
.item .title a { color: inherit; text-decoration: none; }
.item .title a:hover { color: var(--accent); }
.item .tags { display: flex; column-gap: 4px; row-gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.tag { padding: 2px 8px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); font-size: 11px; line-height: 1.5; color: var(--text-2); cursor: pointer; transition: color .12s, border-color .12s; }
.tag:hover { color: var(--accent); border-color: var(--accent); }

.item .foot, .hero-item .foot { display: flex; gap: 10px; align-items: center; margin-top: 7px; font-size: 12px; color: var(--muted); }
.item .foot .src { color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.item .foot .hint { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; opacity: .8; }

.article { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 14px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.article .art-loading { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.article .art-err { color: var(--danger); }
.article .art-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--accent); font-size: 13px; font-weight: 500; }
.article .art-link:hover { text-decoration: underline; }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, var(--bg-soft) 0%, var(--border-soft) 50%, var(--bg-soft) 100%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; }

/* ====== Pager / 空 / 错误状态 ====== */
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 16px; align-items: center; color: var(--text-2); font-size: 13px; padding: 8px; }
.pager button { padding: 6px 14px; border-radius: 7px; border: 1px solid var(--border); background: var(--card); color: var(--text-2); cursor: pointer; font-size: 13px; transition: all .12s; min-height: 38px; display: inline-flex; align-items: center; gap: 4px; }
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager #pageInfo { font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 56px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--card); border: 1px dashed var(--border); border-radius: 10px; }
.empty .empty-ic { color: var(--muted); opacity: .7; }
.empty .empty-title { font-size: 15px; font-weight: 600; color: var(--text-2); }
.empty .empty-desc { font-size: 13px; color: var(--muted); }
.empty .empty-cta { margin-top: 4px; padding: 7px 16px; border-radius: 7px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); cursor: pointer; font-size: 13px; font-weight: 500; transition: background .15s; }
.empty .empty-cta:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.error-box { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--danger-soft); border: 1px solid var(--danger); border-radius: 10px; color: var(--danger); }
.error-box .error-title { font-size: 14px; font-weight: 600; }
.error-box .retry-btn { padding: 7px 18px; border-radius: 7px; border: 1px solid var(--danger); background: var(--danger); color: #fff; cursor: pointer; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: opacity .15s; }
.error-box .retry-btn:hover { opacity: .88; }

/* ====== 热搜区：三列 grid ====== */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 4px 0 16px; width: 100%; }
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.loading { color: var(--muted); padding: 60px; text-align: center; font-size: 14px; grid-column: 1 / -1; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .12s; }
.card:hover { box-shadow: var(--shadow-md); }
.card-header { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-soft); }
.card-title { display: flex; align-items: center; gap: 10px; }
.card-badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; }
.card-name { font-size: 14px; font-weight: 600; }
.card-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-body { padding: 0; flex: 1; }
.t-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 16px; text-decoration: none; color: var(--text); transition: background .12s; border-bottom: 1px solid var(--border-soft); }
.t-item:last-child { border-bottom: none; }
.t-item:hover { background: var(--bg-soft); }
.t-item .item-rank { flex: 0 0 22px; font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 1px; font-variant-numeric: tabular-nums; text-align: center; }
.t-item .item-rank.top1 { color: var(--top1); }
.t-item .item-rank.top2 { color: var(--top2); }
.t-item .item-rank.top3 { color: var(--top3); }
.t-item .item-text { flex: 1; min-width: 0; }
.t-item .item-title { font-size: 13px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.t-item .item-meta { display: flex; gap: 8px; margin-top: 3px; font-size: 11px; color: var(--muted); align-items: center; }
.t-item .item-score { color: var(--top1); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.t-item .item-score svg { width: 11px; height: 11px; }
.t-item .item-tag { padding: 1px 6px; background: var(--bg-soft); border-radius: 8px; font-size: 10px; color: var(--text-2); }
.t-item.error-item .item-title { color: var(--danger); }
.t-item.empty-item .item-title { color: var(--muted); font-style: italic; }

/* ====== 底栏（三栏） ====== */
footer { border-top: 1px solid var(--border-soft); background: var(--card); margin-top: auto; padding: 16px 24px; max-width: 1400px; width: 100%; margin-left: auto; margin-right: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.ft-col { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ft-col.ft-left { flex: 1 1 260px; }
.ft-col.ft-links { justify-content: center; flex: 0 1 auto; }
.ft-col.ft-right { flex: 1 1 260px; justify-content: flex-end; text-align: right; }
.ft-brand { font-weight: 700; color: var(--text-2); }
.ft-links { gap: 14px; }
.ft-links a { color: var(--accent); }
.ft-links a:hover { text-decoration: underline; }
.ft-links .sep { color: var(--border); }

/* ====== Animations ====== */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.item, .hero-item { animation: fadeInUp .3s ease both; }

/* ====== Responsive (移动端优先) ====== */
@media (max-width: 900px) {
  .layout { padding: 12px; gap: 12px; }
  .sidebar { width: 210px; }
  .grid { gap: 12px; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .tb-row { padding: 0 14px; }
  .tb-top { height: 52px; }
  .tb-ctrl { height: 44px; }
  h1 { font-size: 18px; }
  .brand-sub { display: none; }
  .primary-tabs { padding: 0 14px; }
  .ptab { padding: 0 14px; font-size: 13px; }
  .status-bar { padding: 6px 14px; font-size: 11px; }
  .layout { flex-direction: column; padding: 10px; gap: 10px; }
  .sidebar { position: fixed; left: -260px; top: 0; bottom: 0; width: 250px; border-radius: 0; border: none; border-right: 1px solid var(--border); max-height: none; padding: 60px 8px 12px; z-index: 100; transition: left .25s ease; overflow-y: auto; background: var(--card); box-shadow: 4px 0 16px rgba(0,0,0,0.1); }
  .sidebar.open { left: 0; }
  .nav-item { padding: 8px 12px; min-height: 38px; }
  .item { padding: 11px 12px 11px 14px; }
  .item .title { font-size: 14px; }
  .hero-item .title { font-size: 15px; padding-right: 0; }
  .hero-item .meta { padding-right: 0; }
  .grid { grid-template-columns: 1fr; padding: 4px 0 12px; gap: 12px; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .ft-col.ft-right { justify-content: flex-start; text-align: left; }
}
@media (max-width: 480px) {
  .tb-row { padding: 0 10px; }
  .tb-top { height: 48px; gap: 8px; }
  .tb-ctrl { height: 42px; gap: 6px; }
  .cmd-search button { padding: 5px 10px; font-size: 12px; }
  h1 { font-size: 16px; }
  .ptab { padding: 0 10px; font-size: 12px; }
  .menu-btn { padding: 4px 6px; }
  .layout { padding: 8px; gap: 8px; }
  .item { padding: 10px 12px; }
  .item .title { font-size: 13px; line-height: 1.45; }
  .item .meta { font-size: 11px; gap: 5px; }
  .hero-item { padding: 12px; }
  .hero-item .title { font-size: 14px; }
  .hero-item .summary { font-size: 12px; }
  .pager button { padding: 5px 10px; font-size: 12px; min-height: 38px; }
  .gear-pop { min-width: 180px; }
}
