/* lx-home-picks.css — v994 首屏 AI 精选卡（禁欲极简 · 纯色细线 · 大留白 · 中国红涨绿跌） */
.lhp {
  margin: 0 0 14px 0;
  padding: 14px 16px 10px;
  border: 1px solid var(--line-faint, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  background: transparent;
}
.lhp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.lhp-title-row { display: flex; align-items: baseline; gap: 10px; }
.lhp-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--text-primary, #f6f9fd);
}
.lhp-date { font-size: 12px; color: var(--text-muted, #7c8db0); font-variant-numeric: tabular-nums; }
.lhp-head-right { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lhp-cred { font-size: 12px; color: var(--text-secondary, #dae4f1); }
.lhp-more {
  font-size: 12px;
  color: var(--text-muted, #7c8db0);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.lhp-more:hover { color: var(--text-primary, #f6f9fd); }

.lhp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.lhp-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line-faint, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  min-width: 0;
  transition: border-color .15s;
}
.lhp-card:hover { border-color: rgba(255, 255, 255, 0.2); }
.lhp-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.lhp-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #f6f9fd);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lhp-code { font-size: 11px; color: var(--text-muted, #7c8db0); font-variant-numeric: tabular-nums; }
.lhp-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.lhp-price { font-size: 16px; font-weight: 600; color: var(--text-primary, #f6f9fd); font-variant-numeric: tabular-nums; }
.lhp-chg { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lhp-chg.up { color: var(--up, #e5484d); }
.lhp-chg.down { color: var(--down, #2e9e6b); }
.lhp-chg.flat { color: var(--text-muted, #7c8db0); }

.lhp-lines { display: flex; flex-direction: column; gap: 3px; padding-top: 6px; border-top: 1px solid var(--line-faint, rgba(255, 255, 255, 0.08)); }
.lhp-line {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--text-secondary, #dae4f1);
  font-variant-numeric: tabular-nums;
}
.lhp-plus { color: var(--up, #e5484d); }
.lhp-minus { color: var(--down, #2e9e6b); }
.lhp-reason {
  font-size: 11px;
  color: var(--text-muted, #7c8db0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lhp-foot { margin-top: 10px; font-size: 11px; color: var(--text-muted, #7c8db0); }

/* ===== v1000：扫描背书条 / T+5 战绩徽标 / 指标行强化 / 弱市保护 / reason 双行 ===== */
.lhp-scan {
  font-size: 11.5px;
  color: var(--text-muted, #7c8db0);
  margin: -4px 0 10px;
  letter-spacing: .2px;
}
.lhp-scan b { color: var(--text-secondary, #dae4f1); font-weight: 600; font-variant-numeric: tabular-nums; }
/* v1003：盘中更新徽标 */
.lhp-live {
  color: var(--up, #e5484d);
  font-weight: 600;
  font-size: 10.5px;
  border: 1px solid var(--up, #e5484d);
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 4px;
  white-space: nowrap;
}
.lhp-rec {
  font-size: 12px;
  color: var(--up, #e5484d);
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.lhp-rec:hover { text-decoration: underline; }
/* 指标行强化：值加粗、百分比醒目 */
.lhp-lbl { color: var(--text-muted, #7c8db0); }
.lhp-val { font-weight: 600; color: var(--text-primary, #f6f9fd); }
.lhp-line .lhp-plus, .lhp-line .lhp-minus { font-weight: 700; }
.lhp-pos { color: var(--text-secondary, #dae4f1); font-weight: 500; }
.lhp-weak {
  font-size: 10px;
  color: var(--text-muted, #7c8db0);
  border: 1px solid var(--line-faint, rgba(255, 255, 255, 0.14));
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.5;
  white-space: nowrap;
}
/* reason 双行完整展示 */
.lhp-reason {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

/* 平板：3 列 */
@media (max-width: 1180px) { .lhp-grid { grid-template-columns: repeat(3, 1fr); } }
/* 移动端：横向滑动 snap（首屏露出约 1.6 张卡） */
@media (max-width: 767px) {
  .lhp { padding: 12px 12px 8px; margin-bottom: 10px; }
  .lhp-head { flex-wrap: wrap; }
  .lhp-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 2px;
  }
  .lhp-card { flex: 0 0 76%; scroll-snap-align: start; }
}

/* ===== v1004 🅲 移动端表格横向滚动修复（detail/lhb/stock-scanner/wecom-panel 四视图 673-924px 超 390 视口） ===== */
@media (max-width: 768px) {
  /* 包裹容器显式横向滚动（fx: fund-flow-table-wrap 仅 overflow-y；table-wrap 无 overflow；lhb-card 裸装表格） */
  .fund-flow-table-wrap,
  .table-wrap,
  .wxd-tablewrap,
  .fo-table-wrap,
  .fo-t-quote,
  .lhb-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  /* 移动端表格紧凑化：字级/留白降档，提升单屏信息量 */
  .lhb-table th, .lhb-table td { padding: 6px 8px; font-size: 11px; }
  .table-scanner th, .table-scanner td,
  .wxd-table th, .wxd-table td,
  .fund-flow-table th, .fund-flow-table td,
  .data-table th, .data-table td { padding: 6px 8px; font-size: 11.5px; }
  /* 首列（股票名/代码）粘性，横向滑动不丢上下文 */
  .lhb-table th:first-child, .lhb-table td:first-child,
  .table-scanner th:first-child, .table-scanner td:first-child,
  .wxd-table th:first-child, .wxd-table td:first-child {
    position: sticky; left: 0; z-index: 1;
    background: var(--bg-elev, #141a26);
    box-shadow: 1px 0 0 var(--line-faint, rgba(255,255,255,.06));
  }
}

/* v1004b dashboard 挤压修复（桌面+移动双端同病）：flex 父链固定高（.app > main.main > #main-content 内滚），
   首屏静态区块吃满后 tab-dashboard 仅剩 44px 内滚条（桌面实测同样 44px）→ 全端脱 flex 自然展开，由 #main-content 统一滚动 */
#tab-dashboard { flex: none !important; height: auto !important; overflow: visible !important; }

/* ===== v1005 🅲 B方案：移动端非首页视图隐藏静态区块（老板拍板 B） =====
   现状: 精选卡 376px + 官宣/活体 58px 常驻 #main-content 顶部 → 业务视图仅剩 ~312px 内滚夹缝
   修复: 活动 tab ≠ dashboard 时隐藏三块静态区，业务视图全高可用（桌面不变；iOS15.4+/Chrome105+ :has 全覆盖） */
@media (max-width: 768px) {
  #main-content:has(.tab-content.active:not(#tab-dashboard)) #lx-home-picks,
  #main-content:has(.tab-content.active:not(#tab-dashboard)) #lx-living-status,
  #main-content:has(.tab-content.active:not(#tab-dashboard)) #lx-guanxuan {
    display: none !important;
  }
}

/* ===== v1008 🅲 第二拍：hero + 精选卡移动端世界级精修（禁欲极简 · 纯色细线 · 大留白） ===== */
@media (max-width: 767px) {
  /* --- hero：纵向布局（头像居中横幅 → 标题/副文全宽 → 指数芯片 2 列等宽网格） ---
     修复: 横向布局把文字列压到 216px、芯片一列排长队；CSS 内战需 ID 特异度 + 本文件最后加载双保险 */
  .lx-daily-hero { padding: 18px 16px 16px !important; border-radius: 16px !important; }
  #lx-daily-hero .lx-dh-inner { flex-direction: column !important; align-items: center !important; gap: 12px !important; }
  #lx-daily-hero .lx-dh-avatar {
    width: 148px !important; height: 178px !important; flex: none !important;
    border-radius: 14px !important; align-self: center !important;
  }
  #lx-daily-hero .lx-dh-body { width: 100% !important; }
  .lx-dh-title { font-size: 20px !important; line-height: 1.3 !important; text-wrap: balance; }
  .lx-dh-sub { line-height: 1.55 !important; margin-top: 6px !important; }
  #lx-daily-hero .lx-dh-indices {
    display: grid !important; grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important; margin-top: 12px !important;
    flex-wrap: unset !important; overflow: visible !important;
  }
  #lx-daily-hero .lx-dh-chip {
    display: flex !important; align-items: center !important; justify-content: space-between !important;
    width: auto !important; flex: none !important;
    padding: 7px 12px !important; border-radius: 10px !important;
    background: rgba(90, 140, 255, .07) !important;
    border: 1px solid rgba(90, 140, 255, .20) !important;
    font-size: 12.5px !important; letter-spacing: .2px !important;
  }
  #lx-daily-hero .lx-dh-chip b { font-size: 12.5px !important; font-weight: 600 !important; font-variant-numeric: tabular-nums !important; }

  /* --- 精选卡：头部收紧 + 卡片大留白 + 隐藏滚动条更干净 --- */
  .lhp-head { margin-bottom: 8px; }
  .lhp-scan { margin: -2px 0 8px; }
  .lhp-grid { scrollbar-width: none; }
  .lhp-grid::-webkit-scrollbar { display: none; }
  .lhp-card { padding: 12px 14px; gap: 8px; }
  .lhp-name { font-size: 13.5px; }
  .lhp-price { font-size: 17px; }
  .lhp-lines { gap: 4px; padding-top: 8px; }
}


/* ===== v1010 全设备适配：平板/电子书/窄屏带 ===== */
/* ① 768-1023 平板带：picks 涨幅榜复活（768 边界曾同时命中 max-width:768 隐藏 + min-width:768 412px CLS 锁 → 255px 空洞） */
@media (min-width: 768px) and (max-width: 1023px) {
  #lx-daily-hero .lx-dh-picks {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-top: 14px !important;
  }
}
/* ② 481-767 窄平板/电子书带：精选卡 44%（2.2 张可见，不再 576px 巨卡）
   （文本居中被撤回：.lx-dh-title 为 flex 容器，text-align 无效反致标题错位，保持左对齐一致） */
@media (min-width: 481px) and (max-width: 767px) {
  .lhp-card { flex-basis: 44% !important; }
}

/* ===== v1012 导航精致化：rc-fab 桌面让位侧栏（原 left:16 压住「AI 分析」导航项，实测 overlapNav=AI 分析） ===== */
@media (min-width: 1024px) {
  #lx-reco-card { left: calc(var(--sidebar-width, 300px) + 16px) !important; }
}


/* ===== v1013 首页吸引力第二拍：排名徽章 + 现价涨跌着色（中国红涨绿跌） ===== */
.lhp-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 6px; flex: none;
  border: 1px solid var(--line-faint, rgba(255, 255, 255, 0.14));
  color: var(--text-muted, #7c8db0);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.lhp-rank.r1 { border-color: rgba(212, 169, 78, 0.55); color: #e8c87a; background: rgba(212, 169, 78, 0.08); }
.lhp-price.up { color: var(--up, #e5484d); }
.lhp-price.down { color: var(--down, #2e9e6b); }

/* v1015 数字人移动端整肃块已撤回（v1016）：三条规则全被 ai-avatar JS inline !important 定位 + dock-geometry.css 权威层特异度压制，正确落点已迁至 dock-geometry.css + ai-avatar-v285.js _bottomNavOffset */
