/* ============================================
   阿鹏资讯站 主样式 v3
   设计风格: today.ai — 浅色、温暖、现代
   v3: 板块分区、条目右下角操作、字号加大、
       图表、重点高亮、微信/夸克适配
   ============================================ */

:root {
  --accent: #FF6B35;
  --accent-soft: #FFF0EB;
  --accent-deep: #E2551F;
  --ink: #1A1A2E;
  --ink-2: #374151;
  --ink-3: #6B7280;
  --ink-4: #9CA3AF;
  --line: #E5E7EB;
  --line-soft: #F0F0F0;
  --bg: #F0F4F8;
  --card: #FFFFFF;
  --up: #E11D48;
  --down: #059669;
  --num: #2563EB;
  --radius: 14px;
  --reading: 760px;
  --fs-base: 16px;
  --fs-body: 16px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  background: linear-gradient(180deg, #EEF2F7 0%, #F0F4F8 100%);
  color: var(--ink);
  font-size: var(--fs-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}

a { color: #4F86C6; text-decoration: none; }
a:hover { color: #35699F; }
button { font-family: inherit; }

/* === 顶部导航栏 === */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; height: 56px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.topbar .logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 700; color: var(--ink);
  white-space: nowrap; cursor: pointer; letter-spacing: -0.01em;
}
.topbar .logo-img {
  height: 30px; width: auto; display: block;
}
.topbar .logo .accent { color: var(--accent); }
.topbar .date-today { color: var(--ink-4); font-size: 13px; white-space: nowrap; }
.topbar .search-wrap { flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.topbar .search-wrap input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  background: #F5F7FA; border: 1px solid var(--line);
  border-radius: 18px; color: var(--ink); font-size: 15px;
  outline: none; transition: border-color .15s, background .15s;
}
.topbar .search-wrap input:focus { border-color: var(--accent); background: #FFF; }
.topbar .search-wrap input::placeholder { color: var(--ink-4); font-size: 14px; }
.topbar .search-wrap .search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--ink-4); font-size: 14px; pointer-events: none;
}
.topbar .admin-link {
  color: var(--ink-3); font-size: 14px; white-space: nowrap;
  padding: 6px 12px; border-radius: 8px;
}
.topbar .admin-link:hover { background: #F5F7FA; color: var(--accent); }
.topbar .menu-btn {
  display: none; background: none; border: none;
  color: var(--ink); font-size: 20px; cursor: pointer; padding: 4px 6px;
}

/* === 布局 === */
.layout { display: flex; min-height: calc(100vh - 56px); }

/* === 侧边栏 === */
.sidebar {
  width: 220px; flex-shrink: 0; padding: 16px 12px;
  border-right: 1px solid var(--line);
  position: sticky; top: 56px; height: calc(100vh - 56px);
  overflow-y: auto;
}
.sidebar .nav-group { margin-bottom: 20px; }
.sidebar .nav-group h4 {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-4); margin-bottom: 8px; padding: 0 8px;
}
.sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink-3); font-size: 14.5px; cursor: pointer;
  user-select: none;
}
.sidebar .nav-item:hover { background: #E8EDF2; color: var(--ink); }
.sidebar .nav-item.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.sidebar .nav-item .icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar .nav-item .count {
  margin-left: auto; font-size: 12px; color: var(--ink-4);
  background: #F5F7FA; padding: 1px 8px; border-radius: 10px;
}
.sidebar .nav-item.active .count { background: #FFD4C2; color: var(--accent-deep); }
.nav-tip p { font-size: 12.5px; color: var(--ink-4); line-height: 1.7; padding: 0 8px 6px; }

/* === 主内容区 === */
.main { flex: 1; padding: 20px 28px 60px; max-width: 1160px; min-width: 0; }
.main-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.main-header h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.01em; }
.period-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.period-tab {
  padding: 7px 16px; border-radius: 20px;
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  border: 1px solid #D1D5DB; background: #FFF; color: var(--ink-3);
}
.period-tab.active { background: var(--accent); color: #FFF; border-color: var(--accent); }
.period-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* ============================================
   平台热榜聚合（外部聚合站，只放一个链接）
   与简报自带的「🔥 阿鹏热榜」是两个东西，刻意做得很轻，不占篇幅
   ============================================ */
.platform-hot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(135deg, #FFF4EC 0%, #FFE8D6 100%);
  border: 1px solid #FFD0A8;
  border-radius: 10px; padding: 9px 14px; margin-bottom: 14px;
}
.platform-hot-badge {
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 999px;
  padding: 3px 10px; white-space: nowrap;
}
.platform-hot-head { display: flex; align-items: baseline; gap: 5px; }
.platform-hot-title { font-size: 14px; font-weight: 600; color: #8A4A1F; }
.platform-hot-note { font-size: 11.5px; color: #B07A45; }
.platform-hot-link {
  font-size: 14px; font-weight: 700; color: var(--accent);
  background: #fff; border: 1px solid #FFD0A8;
  border-radius: 8px; padding: 3px 10px;
  transition: transform .12s, box-shadow .12s;
}
.platform-hot-arrow { display: inline-block; margin-left: 2px; }
.platform-hot-link:hover {
  color: #fff; background: var(--accent); border-color: var(--accent);
  transform: translateY(-1px); box-shadow: 0 3px 8px rgba(255,107,53,.3);
}

/* ============================================
   板块
   ============================================ */
.section {
  background: var(--card); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.section-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 20px; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #FFF 0%, #FCFDFE 100%);
}
.section-head h2 {
  font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
}
.section-head .section-icon { font-size: 19px; }
.section-count {
  font-size: 12px; color: var(--accent-deep); background: var(--accent-soft);
  padding: 2px 10px; border-radius: 10px; font-weight: 600; white-space: nowrap;
}
.section-caret { color: var(--ink-4); font-size: 12px; }
.section.collapsed .section-body,
.section.collapsed .section-note { display: none; }
.section.collapsed .section-caret { transform: rotate(-90deg); }
.section-note {
  padding: 8px 20px; font-size: 12.5px; color: var(--ink-4);
  background: #FAFBFC; border-bottom: 1px solid var(--line-soft);
}
.section-body { padding: 14px 16px 18px; }

/* ============================================
   条目（每条消息一张小卡）
   ============================================ */
.news-item {
  position: relative;
  background: #FBFCFD;
  border: 1px solid #EEF1F5;
  border-left: 3px solid #E3E8EF;
  border-radius: 12px;
  padding: 14px 16px 10px;
  margin-bottom: 12px;
}
.news-item:last-child { margin-bottom: 2px; }
.news-item:hover { background: #F8FAFC; border-left-color: #C9D3DF; }
.section[data-section="hot"] .news-item,
.section[data-section="signal"] .news-item { border-left-color: #FFC9B4; background: #FFFCFA; }

.news-item .item-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 7px;
}
.news-item .item-sub {
  font-size: 12px; font-weight: 600; color: #6B7A90;
  background: #EEF2F7; padding: 2px 9px; border-radius: 6px;
}
.news-item .item-lead { font-size: 12.5px; color: var(--ink-4); }
.news-item .item-rank {
  font-family: 'Times New Roman', Times, serif;
  font-size: 13px; font-weight: 700; color: #1F7A4D;
  background: #E4F5EA; padding: 1px 10px; border-radius: 10px;
  white-space: nowrap;
}
.news-item .item-src { font-size: 12px; color: #B6BFCC; white-space: nowrap; }
.news-item .item-meta-right {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
}

.news-item .item-title {
  font-size: 16.5px; font-weight: 650; line-height: 1.55;
  color: var(--ink); margin-bottom: 6px; max-width: var(--reading);
}
.news-item .item-content {
  font-size: var(--fs-body); line-height: 1.85; color: var(--ink-2);
  max-width: var(--reading);
  word-break: break-word; overflow-wrap: anywhere;
}
.news-item .item-content p { margin-bottom: 8px; }
.news-item .item-content p:last-child { margin-bottom: 0; }
.news-item .item-content ul,
.news-item .item-content ol { padding-left: 20px; margin-bottom: 8px; }
.news-item .item-content li { margin-bottom: 4px; }
.news-item .item-content h1,
.news-item .item-content h2,
.news-item .item-content h3 { font-size: 16px; color: var(--ink); margin: 10px 0 6px; }
.news-item .item-content blockquote {
  border-left: 3px solid var(--accent); margin: 8px 0; padding: 6px 12px;
  color: var(--ink-3); background: #FFF8F5; border-radius: 0 6px 6px 0;
}
.news-item .item-content code {
  background: #EEF2F7; padding: 1px 6px; border-radius: 4px; font-size: 14px;
}
.news-item .item-content hr { border: none; border-top: 1px dashed var(--line); margin: 10px 0; }

/* 重点内容上色 */
.item-content strong, .item-title strong { color: var(--accent-deep); font-weight: 650; }
.hl-num { color: var(--num); font-weight: 600; }
.hl-up { color: var(--up); font-weight: 600; }
.hl-down { color: var(--down); font-weight: 600; }
.hl-quote { color: #7C5CD6; }

/* 右下角操作按钮（需求5、6：放在每条右下角、带文字、别太大） */
.news-item .item-actions {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed #EDF0F4;
}
.news-item .item-actions button {
  display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #FFF; color: #5B6675;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.news-item .item-actions button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.news-item .item-actions button.is-on {
  background: var(--accent-soft); border-color: var(--accent);
  color: var(--accent-deep); font-weight: 600;
}
.news-item .item-actions button[data-action="obsidian"].copied {
  background: #E9F8EF; border-color: #34A853; color: #1E7A3C;
}
.news-item.compact .item-actions { border-top: none; padding-top: 4px; }

/* ============================================
   图表
   ============================================ */
.chart {
  background: #F7F9FC; border: 1px solid #EDF1F6;
  border-radius: 10px; padding: 12px 14px; margin: 10px 0;
  max-width: var(--reading);
}
.chart-head {
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  margin-bottom: 9px; display: flex; align-items: center; gap: 8px;
}
.chart-hint { font-size: 11.5px; color: var(--ink-4); font-weight: 400; }
.chart-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.chart-row:last-child { margin-bottom: 0; }
.chart-label {
  width: 96px; flex-shrink: 0; font-size: 13px; color: var(--ink-3);
  text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chart-track {
  flex: 1; height: 14px; background: #E9EEF4; border-radius: 7px; overflow: hidden;
}
.chart-track i { display: block; height: 100%; border-radius: 7px; background: #8FAECC; }
.chart-track i.up { background: linear-gradient(90deg, #F58AA2, var(--up)); }
.chart-track i.down { background: linear-gradient(90deg, #6DD3A8, var(--down)); }
.chart-track i.ord { background: linear-gradient(90deg, #FFC9B4, var(--accent)); }
.chart-value {
  width: 74px; flex-shrink: 0; font-size: 12.5px; font-weight: 600;
  color: var(--ink-3); text-align: right; white-space: nowrap;
}
.chart-value.up { color: var(--up); }
.chart-value.down { color: var(--down); }
.chart-value.ord { color: var(--accent-deep); }

/* ============================================
   表格
   ============================================ */
.table-wrap, .item-content > table { max-width: 100%; }
.item-content table {
  border-collapse: collapse; width: 100%;
  margin: 10px 0; font-size: 14.5px;
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.item-content table thead th {
  background: #F2F5F9; color: var(--ink-3);
  font-weight: 600; font-size: 13px; text-align: left;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.item-content table tbody td {
  padding: 9px 10px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2); vertical-align: top; line-height: 1.7;
}
.item-content table tbody tr:last-child td { border-bottom: none; }
.item-content table tbody tr:nth-child(even) { background: #FAFBFD; }

/* ============================================
   热榜速览
   ============================================ */
.hot-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.hot-tab {
  padding: 6px 13px; border-radius: 16px; font-size: 13px;
  border: 1px solid var(--line); background: #FFF; color: var(--ink-3); cursor: pointer;
}
.hot-tab.active { background: var(--accent); color: #FFF; border-color: var(--accent); font-weight: 600; }
.hot-list { display: none; }
.hot-list.open { display: block; }
.hot-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed #EDF0F4;
}
.hot-row:last-child { border-bottom: none; }
.hot-rank {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #FFF; background: #C7D0DA;
}
.hot-rank.rank-1 { background: #EF4444; }
.hot-rank.rank-2 { background: #F97316; }
.hot-rank.rank-3 { background: #F59E0B; }
.hot-main { flex: 1; min-width: 0; }
.hot-title { font-size: 15.5px; color: var(--ink); line-height: 1.6; display: block; }
.hot-title:hover { color: var(--accent); }
.hot-bar { height: 3px; background: #EDF0F4; border-radius: 2px; margin-top: 6px; overflow: hidden; }
.hot-bar i { display: block; height: 100%; background: linear-gradient(90deg, #FFC9B4, var(--accent)); }
.hot-heat { flex-shrink: 0; font-size: 12px; color: var(--ink-4); padding-top: 3px; }
.hot-src { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }
.hot-more {
  display: block; width: 100%; margin-top: 8px; padding: 7px;
  background: #F7F9FC; border: 1px solid var(--line-soft); border-radius: 8px;
  color: var(--ink-3); font-size: 13px; cursor: pointer;
}
.hot-stamp { font-size: 11.5px; color: var(--ink-4); margin-top: 10px; text-align: right; }
.hot-brief { margin-top: 8px; }

/* ============================================
   划词菜单（出现在选中文字下方）
   ============================================ */
.selection-menu {
  position: fixed; z-index: 9999;
  display: none;
  background: rgba(28, 30, 40, 0.96);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  overflow: hidden;
  padding: 4px;
}
.selection-menu.visible { display: flex; }
.selection-menu .menu-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; height: 46px;
  border: none; background: none; cursor: pointer;
  color: #EDEFF3; font-size: 15px; line-height: 1;
}
.selection-menu .menu-item span { font-size: 11.5px; color: #C8CDD6; }
.selection-menu .menu-item:hover { background: rgba(255,255,255,0.1); border-radius: 9px; }
.selection-menu .menu-item.is-on { background: rgba(255,107,53,0.22); }
.selection-menu .menu-item.is-on span { color: #FFB694; font-weight: 600; }
.selection-menu .menu-item.flash { background: rgba(255,107,53,0.35); }
.selection-menu .menu-item.obsidian.copied { background: rgba(52,168,83,0.3); }

/* ============================================
   Toast / 空状态 / 加载
   ============================================ */
.toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%);
  background: rgba(26,26,46,0.94); border-radius: 12px;
  padding: 11px 20px; color: #FFF; font-size: 14.5px; font-weight: 500;
  box-shadow: 0 6px 22px rgba(0,0,0,0.18); z-index: 10000;
  opacity: 0; transition: opacity .25s, transform .25s;
  pointer-events: none; max-width: 86vw; text-align: center;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.empty-state { text-align: center; padding: 56px 20px; color: var(--ink-4); }
.empty-state .icon { font-size: 44px; margin-bottom: 14px; }
.empty-state p { font-size: 15.5px; margin-bottom: 4px; }
.empty-state .empty-sub { font-size: 13px; color: #C3CAD4; }

.loading { text-align: center; padding: 44px; color: var(--ink-4); font-size: 14.5px; }
.loading .spinner {
  display: inline-block; width: 28px; height: 28px;
  border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   归档卡片
   ============================================ */
.brief-card {
  background: var(--card); border-radius: 12px; margin-bottom: 10px;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.brief-toggle { padding: 15px 18px; cursor: pointer; }
.brief-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; flex-wrap: wrap; }
.period-badge {
  font-size: 12px; font-weight: 600; padding: 2px 10px;
  border-radius: 12px; color: #FFF; background: #6B9FD4; white-space: nowrap;
}
.period-badge.午间 { background: var(--accent); }
.period-badge.晚间 { background: #8B5CF6; }
.period-badge.夜间 { background: #1E3A5F; }
.period-badge.专题 { background: #10B981; }
.brief-title { font-size: 16.5px; font-weight: 600; }
.brief-summary { font-size: 14px; color: var(--ink-3); line-height: 1.7; }
.brief-detail { display: none; padding: 0 12px 14px; }
.brief-card.expanded .brief-detail { display: block; }
.brief-card.expanded .brief-toggle { border-bottom: 1px solid var(--line-soft); }

/* ============================================
   收藏 / 追踪
   ============================================ */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filter-bar .filter-label { font-size: 13px; color: var(--ink-4); }
.filter-bar .filter-chip {
  padding: 5px 14px; border-radius: 18px; font-size: 13px; cursor: pointer;
  border: 1px solid #D1D5DB; background: #FFF; color: var(--ink-3);
}
.filter-bar .filter-chip.active { background: var(--accent); color: #FFF; border-color: var(--accent); }
.anno-search-wrap { margin-bottom: 16px; }
.anno-search-wrap input {
  width: 100%; height: 40px; padding: 0 14px;
  background: #FFF; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-size: 15px; outline: none;
}
.anno-search-wrap input:focus { border-color: var(--accent); }

.annotation-card {
  background: #FFF; border-radius: 12px; padding: 14px 18px; margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.annotation-card .anno-text {
  font-size: 15.5px; line-height: 1.75; margin-bottom: 8px;
  border-left: 3px solid var(--accent); padding-left: 12px; color: var(--ink);
}
.annotation-card .anno-text.star { border-left-color: #FBBF24; }
.annotation-card .anno-text.track { border-left-color: #6B9FD4; }
.annotation-card .anno-note {
  margin-top: 8px; padding: 8px 12px; background: #F5F7FA;
  border-radius: 8px; font-size: 13.5px; color: var(--ink-3);
}
.annotation-card .anno-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-4);
}
.annotation-card .anno-badge { padding: 2px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; }
.annotation-card .anno-badge.star { background: #FFFBEA; color: #B45309; }
.annotation-card .anno-badge.important { background: var(--accent-soft); color: var(--accent-deep); }
.annotation-card .anno-badge.track { background: #EBF2FA; color: #2F6499; }
.annotation-card .anno-delete,
.annotation-card .anno-obsidian {
  background: none; border: none; color: var(--ink-4);
  cursor: pointer; font-size: 13px; padding: 4px 2px;
}
.annotation-card .anno-obsidian { margin-left: auto; }
.annotation-card .anno-obsidian:hover { color: #7C5CD6; }
.annotation-card .anno-delete:hover { color: var(--accent); }

.track-card {
  background: #FFF; border-radius: 12px; padding: 16px 20px; margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.track-card .track-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.track-card .track-name { font-size: 16px; font-weight: 600; }
.track-card .track-desc { color: var(--ink-3); font-size: 14px; }
.track-timeline { padding-left: 14px; border-left: 2px solid var(--line); }
.track-timeline .timeline-item {
  padding: 7px 0 7px 14px; position: relative;
  font-size: 14.5px; color: var(--ink-2); line-height: 1.7;
}
.track-timeline .timeline-item::before {
  content: ''; position: absolute; left: -20px; top: 14px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.timeline-date { font-size: 12px; color: var(--ink-4); }

.date-group {
  font-size: 14px; font-weight: 600; color: var(--ink-4);
  margin: 22px 0 10px; padding-left: 2px;
}
.search-count { color: var(--ink-3); font-size: 14px; margin-bottom: 14px; }

/* === 移动端底部导航 === */
.mobile-nav { display: none; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
  :root { --reading: 100%; }
  .main { padding: 16px 16px 88px; }
}

@media (max-width: 768px) {
  .topbar { padding: 0 12px; gap: 8px; height: 52px; }
  .topbar .date-today { display: none; }
  .topbar .search-wrap { max-width: none; }
  .topbar .admin-link { display: none; }
  .topbar .menu-btn { display: block; }

  .sidebar {
    position: fixed; top: 52px; left: -240px; z-index: 200;
    height: calc(100vh - 52px); background: #FFF; width: 240px;
    transition: left .22s ease; box-shadow: 2px 0 12px rgba(0,0,0,0.1);
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay {
    display: none; position: fixed; top: 52px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3); z-index: 150;
  }
  .sidebar-overlay.visible { display: block; }

  .main-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .main-header h1 { font-size: 20px; }
  .main-header .period-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }

  .section-head { padding: 13px 14px; }
  .section-head h2 { font-size: 16.5px; }
  .section-body { padding: 12px 10px 14px; }
  .news-item { padding: 13px 13px 9px; }
  .news-item .item-title { font-size: 16px; }
  .news-item .item-src { margin-left: 0; }
  .news-item .item-actions { gap: 6px; }
  .news-item .item-actions button { height: 34px; padding: 0 10px; font-size: 13px; }

  .chart-label { width: 74px; font-size: 12.5px; }
  .chart-value { width: 62px; font-size: 12px; }

  /* 表格太宽就转成「标签: 值」堆叠卡片，不再横向挤 */
  .item-content table { display: block; border: 1px solid var(--line-soft); border-radius: 10px; overflow: visible; }
  .item-content table thead { display: none; }
  .item-content table tbody, .item-content table tr, .item-content table td { display: block; width: 100%; }
  .item-content table tr { border-bottom: 1px solid var(--line-soft); padding: 8px 10px; }
  .item-content table tr:last-child { border-bottom: none; }
  .item-content table td { border: none !important; padding: 3px 0 !important; }
  .item-content table td::before {
    content: attr(data-label);
    display: block; font-size: 12px; font-weight: 600;
    color: var(--ink-4); margin-bottom: 1px;
  }
  .item-content table td:first-child { font-weight: 600; color: var(--ink); }

  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: #FFF; border-top: 1px solid var(--line); height: 56px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav .nav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; background: none; border: none; color: var(--ink-4);
    font-size: 10.5px; cursor: pointer;
  }
  .mobile-nav .nav-btn .icon { font-size: 18px; }
  .mobile-nav .nav-btn.active { color: var(--accent); }

  .toast { bottom: 74px; }
}

/* ============================================
   微信 / 夸克 / UC：降噪提速
   ============================================ */
html.is-wechat body { background: #F2F5F8; }
html.is-wechat .section,
html.is-wechat .brief-card,
html.is-wechat .annotation-card { box-shadow: none; border: 1px solid #E9EDF2; }
html.is-wechat .topbar { box-shadow: none; }
html.is-wechat .selection-menu { box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
html.is-wechat .chart-track i,
html.is-wechat .hot-bar i { background-image: none; }
html.is-quark .loading .spinner,
html.is-uc .loading .spinner { animation-duration: 1s; }

/* 阅读偏好：系统深色模式不反转正文，保持可读性 */
@media (prefers-reduced-motion: reduce) {
  .toast, .sidebar { transition: none; }
}

/* === 滚动条 === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }
/* ============================================================
   v3.1 修复：板块细边框 / 判断块 / 来源页脚 / 环形图 / 按钮缩排
   ============================================================ */

/* 各大板块大框：莫兰迪浅色 1px 细边框，底色不变
   v3.2：板块 id 与 v6.0 简报对齐（hot→apeng_hot，新增 mood/fx/tools/ai_tools/ai/startup） */
.section { border: 3px solid #E5E7EB; border-radius: 14px; }
.section[data-section=apeng_hot] { border-color: #E7C6B8; }
.section[data-section=signal]  { border-color: #CDBFD9; }
.section[data-section=mood]    { border-color: #D6C2CE; }
.section[data-section=brief]   { border-color: #C8D2DE; }
.section[data-section=market]  { border-color: #BCC9DE; }
.section[data-section=fx]      { border-color: #BFD3C9; }
.section[data-section=tech]    { border-color: #B9D2C8; }
.section[data-section=ai]      { border-color: #B6CFD6; }
.section[data-section=ai_tools]{ border-color: #C2D6C9; }
.section[data-section=tools]   { border-color: #CBD3C2; }
.section[data-section=startup] { border-color: #D3C8B4; }
.section[data-section=estate]  { border-color: #D8C5B1; }
.section[data-section=sports]   { border-color: #C5D5BB; }
.section[data-section=ent]     { border-color: #E5C5CF; }
.section[data-section=creator] { border-color: #E7D4BA; }
.section[data-section=mind]    { border-color: #CEC5DF; }
.section[data-section=world]   { border-color: #BCCCD3; }
.section[data-section=books]   { border-color: #E1D7BB; }
.section[data-section=policy]   { border-color: #BBC5D1; }
.section[data-section=action]  { border-color: #E5C1B1; }
.section[data-section=gap]     { border-color: #D4D4D4; }
.section[data-section=other]   { border-color: #DBDBDB; }

/* 判断块：淡紫 callout，和正文区分开 */
.item-judgment {
  margin-top: 8px; padding: 8px 10px;
  background: #F1EDF7; border-left: 3px solid #9B8CC0;
  border-radius: 6px; font-size: 13.5px; line-height: 1.6;
  display: flex; gap: 8px; align-items: flex-start;
}
.item-judgment .j-tag {
  flex: 0 0 auto; font-size: 11px; color: #fff; background: #9B8CC0;
  padding: 1px 7px; border-radius: 8px; margin-top: 2px;
}
.item-judgment .j-text { flex: 1; color: #4A4258; }

/* 我的观点块：淡蓝 callout，和正文/判断区分开 */
.item-opinion {
  margin-top: 8px; padding: 8px 10px;
  background: #EDF4FC; border-left: 3px solid #6FA8DC;
  border-radius: 6px; font-size: 13.5px; line-height: 1.6;
  display: flex; gap: 8px; align-items: flex-start;
}
.item-opinion .op-tag {
  flex: 0 0 auto; font-size: 11px; color: #fff; background: #6FA8DC;
  padding: 1px 7px; border-radius: 8px; margin-top: 2px;
}
.item-opinion .op-text { flex: 1; color: #33506E; }

/* 其他观点块：淡灰 callout + 列表 */
.item-others {
  margin-top: 8px; padding: 8px 10px;
  background: #F5F7F9; border-left: 3px solid #B6C0CC;
  border-radius: 6px; font-size: 13px; line-height: 1.7;
}
.item-others .op-tag {
  display: inline-block; font-size: 11px; color: #fff; background: #B6C0CC;
  padding: 1px 7px; border-radius: 8px; margin-bottom: 5px;
}
.item-others .op-list { padding-left: 18px; margin: 0; }
.item-others .op-list li { margin-bottom: 3px; color: #4A5568; }

/* 折线图（近5天趋势） */
.chart-line .line-chart { width: 100%; height: auto; display: block; }
.line-chart .lc-xl { font-size: 10.5px; fill: #6B7280; }
.line-chart .lc-dot { font-size: 9.5px; font-weight: 600; }
.line-chart .lc-lane { font-size: 11px; font-weight: 600; }

/* 板块末尾的来源汇总 */
.section-sources {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed #E5E7EB;
  font-size: 12px; color: #9CA3AF; line-height: 1.7;
}

/* 投资类板块的风险提示小字 */
.section-risk {
  margin-top: 10px; padding: 8px 12px;
  background: #FFF8F1; border: 1px dashed #F0C9A8; border-radius: 8px;
  font-size: 11.5px; color: #B07A45; line-height: 1.6;
}

/* 全站底部页脚：AI 生成标识 + 免责声明 */
.site-footer {
  margin-top: 22px; padding: 18px 20px 26px;
  border-top: 1px solid var(--line-soft, #EEF1F5);
  text-align: center;
}
.site-footer .footer-ai {
  font-size: 12.5px; color: #6B7280; line-height: 1.8;
}
.site-footer .footer-disclaimer {
  margin-top: 6px; font-size: 11.5px; color: #9CA3AF; line-height: 1.8;
}
.site-footer .footer-brand {
  margin-top: 10px; font-size: 11.5px; color: #B0B7C3;
}

/* 环形图（占比饼） */
.chart-donut-wrap .donut-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.chart-donut-wrap .donut {
  width: 130px; height: 130px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.chart-donut-wrap .donut-hole {
  width: 74px; height: 74px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #6B7280;
}
.chart-donut-wrap .donut-legend { flex: 1; min-width: 160px; }
.chart-donut-wrap .lg-row {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px;
  padding: 2px 0; color: #4B5563;
}
.chart-donut-wrap .lg-row i {
  width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto;
}
.chart-donut-wrap .lg-row .lg-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-donut-wrap .lg-row b { color: #1F2937; font-weight: 600; }

/* 操作按钮：缩小、单行不换行 */
.news-item .item-actions {
  display: flex; flex-wrap: nowrap; gap: 4px;
  margin-top: 8px; padding-top: 6px; border-top: 1px dashed #F0F0F0;
}
.news-item .item-actions button {
  display: inline-flex; align-items: center; gap: 3px;
  height: 26px; padding: 0 8px; font-size: 12px; line-height: 1;
  border: 1px solid #E5E7EB; background: #FAFAFA; border-radius: 6px;
  color: #6B7280; white-space: nowrap; flex: 0 0 auto;
}
.news-item .item-actions button span { font-size: 12px; }
.news-item .item-actions button:hover { background: #F3F4F6; color: #1F2937; }

/* 手机端：图表纵向堆叠，按钮不换行 */
@media (max-width: 640px) {
  .chart-donut-wrap .donut-row { flex-direction: column; align-items: center; }
  .chart-donut-wrap .donut-legend { width: 100%; }
  .news-item .item-actions { flex-wrap: nowrap; overflow-x: auto; }
  .news-item .item-actions button { flex: 0 0 auto; }
}
/* === v3.2 图表修正：手机端标签左/条形中/数值右 === */
.chart .chart-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.chart .chart-label {
  width: 84px; flex-shrink: 0; font-size: 12.5px; color: #6B7280;
  text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chart .chart-track { flex: 1; height: 12px; background: #EEF2F7; border-radius: 6px; overflow: hidden; }
.chart .chart-value {
  width: 78px; flex-shrink: 0; font-size: 12.5px; font-weight: 600;
  text-align: right; white-space: nowrap;
}
@media (max-width: 640px) {
  .chart .chart-label { width: 74px; font-size: 12px; }
  .chart .chart-value { width: 72px; font-size: 12px; }
}
/* === v3.3 行动建议分组 + 表格紧凑 + 涨跌箭头 === */
.action-group { margin-bottom: 14px; }
.action-group:last-child { margin-bottom: 0; }
.action-group-head {
  font-size: 13px; font-weight: 600; color: #6B7280;
  padding: 6px 10px; margin-bottom: 6px;
  background: #F5F5F4; border-radius: 6px;
}
/* v10.1：市场数据按 ### 子块分组（A股 / 美股 / 港股 / 加密 / 大宗商品）。
   橙色左条 = 站点主色，用来和行动建议的灰色分组区分开。 */
.market-group { margin-bottom: 18px; }
.market-group:last-child { margin-bottom: 0; }
.market-group-head {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .02em; color: #374151;
  padding: 5px 12px; margin-bottom: 8px;
  background: #F5F7FA; border-left: 3px solid var(--accent); border-radius: 4px;
}
@media (max-width: 600px) {
  .market-group { margin-bottom: 14px; }
  .market-group-head { font-size: 12px; padding: 4px 10px; }
}
.item-content table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  margin: 6px 0; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.item-content table th, .item-content table td {
  padding: 6px 10px; border: 1px solid #E5E7EB; text-align: left; white-space: nowrap;
}
.item-content table th { background: #F9FAFB; font-weight: 600; color: #374151; }
.cell-up { color: #DC2626; font-weight: 600; }
.cell-down { color: #059669; font-weight: 600; }
/* === v3.4 表格分区控制 + period tag + 判断字号 === */

/* 全局表格：默认不横滑（常规内容正常排版） */
.item-content table {
  display: table !important; overflow: visible !important;
  white-space: normal !important;
}
.item-content table th, .item-content table td {
  white-space: normal !important; word-break: break-word;
}

/* 社会情绪/国际/行情板块：表格太宽，允许横滑 */
.section[data-section=mind] .item-content table,
.section[data-section=world] .item-content table,
.section[data-section=policy] .item-content table,
.section[data-section=market] .item-content table,
.section[data-section=fx] .item-content table,
.section[data-section=crossborder] .item-content table {
  display: block !important; overflow-x: auto !important;
}
.section[data-section=mind] .item-content th,
.section[data-section=mind] .item-content td,
.section[data-section=world] .item-content th,
.section[data-section=world] .item-content td,
.section[data-section=policy] .item-content th,
.section[data-section=policy] .item-content td,
.section[data-section=market] .item-content th,
.section[data-section=market] .item-content td,
.section[data-section=fx] .item-content th,
.section[data-section=fx] .item-content td,
.section[data-section=crossborder] .item-content th,
.section[data-section=crossborder] .item-content td {
  white-space: nowrap !important;
}

/* period 标签（午间/晚间）加底色 */
.item-src {
  display: inline-block; padding: 1px 7px; border-radius: 8px;
  background: #EEF2F7; color: #64748B; font-size: 11px;
}

/* 判断块字号略放大 */
.item-judgment { font-size: 14px !important; line-height: 1.7 !important; }
/* 图表标签宽度放宽，不再截断中文 */
.chart .chart-label {
  width: auto !important; flex: 0 0 auto; max-width: 110px;
  white-space: normal; overflow: visible; text-overflow: clip;
}
/* === v3.5 修正：手机端所有表格横滑 + 图表排序对齐 === */

/* 手机端：所有表格统一横滑，不再被压成竖排 */
@media (max-width: 640px) {
  .item-content table {
    display: block !important; overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .item-content table th, .item-content table td {
    white-space: nowrap !important; word-break: keep-all;
  }
}

/* 图表行对齐：标签可能换行，垂直居中 */
.chart .chart-row {
  align-items: center; min-height: 28px;
}
.chart .chart-label {
  line-height: 1.3; align-self: center;
}
/* 图表标签固定宽度，所有条形左对齐同一起点 */
.chart .chart-label {
  flex: 0 0 96px !important; width: 96px !important; max-width: 96px !important;
  white-space: normal; overflow: visible; text-overflow: clip;
  text-align: left; padding-right: 8px;
}
/* === v3.6 彻底修复手机端表格：tr/td 恢复表格单元格，外层横滑 === */
@media (max-width: 640px) {
  .item-content table {
    display: block !important; overflow-x: auto !important;
    -webkit-overflow-scrolling: touch; border: none !important;
  }
  .item-content table thead,
  .item-content table tbody,
  .item-content table tr,
  .item-content table th,
  .item-content table td {
    display: table-cell !important; width: auto !important;
    white-space: nowrap !important;
  }
  .item-content table thead { display: table-header-group !important; }
  .item-content table tbody { display: table-row-group !important; }
  .item-content table tr { display: table-row !important; }
}
/* === v3.7 手机端表格最终修复：关掉伪标签，长内容列允许换行 === */
@media (max-width: 640px) {
  .item-content table {
    display: block !important; overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line-soft) !important; border-radius: 10px;
  }
  .item-content table thead { display: table-header-group !important; }
  .item-content table tbody { display: table-row-group !important; }
  .item-content table tr { display: table-row !important; border: none !important; padding: 0 !important; }
  .item-content table th,
  .item-content table td {
    display: table-cell !important; width: auto !important;
    border: 1px solid var(--line-soft) !important;
    padding: 8px 10px !important; white-space: normal !important;
    word-break: break-word; line-height: 1.5;
  }
  /* 关掉那个堆叠模式的伪标签 */
  .item-content table td::before { content: none !important; display: none !important; }
  /* 第一列和短数字列不换行，长文本列给最大宽度 */
  .item-content table td:first-child { white-space: nowrap !important; font-weight: 600; }
}
/* === v3.8 手机端表格：每列最小宽度，一行约10字 === */
@media (max-width: 640px) {
  .item-content table th,
  .item-content table td {
    min-width: 110px !important;
    max-width: 200px !important;
  }
  .item-content table td:first-child { min-width: 120px !important; }
}
/* === v10 新板块边框配色（莫兰迪） === */
.section[data-section=macro]    { border-color: #B8C5D6; }  /* 蓝灰 */
.section[data-section=calendar]{ border-color: #C9BFD4; }  /* 淡紫 */
.section[data-section=fringe]  { border-color: #D4B8C5; }  /* 藕粉——异端感 */

/* 边缘观察卡片：左侧加一条细紫线，提示"这是异端" */
.section[data-section=fringe] .news-item {
  border-left: 3px solid #B088A8 !important;
  background: #FDFAFB;
}

/* 宏观仪表盘：表格紧凑 */
.section[data-section=macro] .item-content table {
  font-size: 12.5px;
}
/* === v3.5 修复：表格宽度按内容撑开，防止单元格重叠 === */
@media (max-width: 640px) {
  .item-content table {
    display: block !important; overflow-x: auto !important;
    width: max-content !important; max-width: 100% !important;
    border-collapse: separate !important; border-spacing: 0;
  }
  .item-content table th,
  .item-content table td {
    min-width: 100px !important; max-width: 240px !important;
    white-space: normal !important; word-break: break-word;
    vertical-align: top !important;
  }
}

/* v3.3 归档"加载更多"按钮（历史归档翻页） */
.load-more-btn {
  display: block;
  width: 100%;
  margin: 20px 0 8px;
  padding: 12px 16px;
  border: 1px dashed #D1D5DB;
  border-radius: 12px;
  background: #FAFAFA;
  color: #6B7280;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.load-more-btn:hover:not(:disabled) {
  border-color: #FF6B35;
  color: #FF6B35;
  background: #FFF7F2;
}
.load-more-btn:disabled {
  opacity: .6;
  cursor: default;
}
