
:root{
  
  --font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC","Source Han Sans SC",sans-serif;
}


body{
  letter-spacing:.2px;
  line-height:1.62;
  font-synthesis:none;
  text-rendering:optimizeLegibility;
}


h1,h2,h3,h4,h5,h6{
  font-family:var(--font-sans);
  letter-spacing:-.01em;
  line-height:1.3;
}


.panel-title,.section-title,.card-title,.module-title{
  font-family:var(--font-sans);
  letter-spacing:-.01em;
}


.num,.stat-num,.data-num,.value,.price,.change,.pct,
.ticker-value,.ticker-change,.ticker-name,
.index-value,.index-change,.quote-value,.quote-change,
.kpi-num,.metric-num,.price-now,.price-prev{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}


.nav-text,.sidebar-section-title{
  letter-spacing:.2px;
}


:root{
  
  --fs-2xs:12px; --fs-xs:13px;  --fs-sm:14px;  --fs-base:15px; --fs-md:16px;
  --fs-lg:18px;  --fs-xl:20px;  --fs-2xl:22px; --fs-3xl:24px;
  --fs-4xl:28px; --fs-5xl:32px; --fs-6xl:36px;
  
  --lh-tight:1.25; --lh-snug:1.4; --lh-normal:1.55; --lh-relaxed:1.7;
  
  --tap-min:32px; --tap-min-mobile:36px;
}


.card-value,.stat-card .card-value,.kpi-num,.metric-num,.evo-kpi-num,.algo-kpi-num{
  line-height:var(--lh-tight);
}

.dp-badge,.rank-badge,.nav-badge,.lx-dh-chip,.template-tag,.hot-tag,.tag,.badge{
  line-height:1.35;
}

th,td,label,.form-label{ line-height:var(--lh-snug); }


.lx-dh-adopt{
  min-width:var(--tap-min); min-height:var(--tap-min);
  padding:6px 12px; display:inline-flex; align-items:center; justify-content:center;
}
@media (max-width:768px){
  .lx-dh-adopt,.hot-tag,.btn-icon,.btn-star,.lang-on,.lang-off,
  .bottom-nav-item,.nav-item,.btn,.btn-sm,.btn-tab{
    min-height:var(--tap-min-mobile);
  }
  .btn-icon,.btn-star{ min-width:var(--tap-min-mobile); }
}


/* === 数据表横向溢出根治（#1171） ===
   根因：table-layout:auto 下，长文本/数字把列宽撑出视口（桌面 1377px / 移动 416px）。
   解法：固定布局 + 100% 宽度，文字列 ellipsis 截断，操作列(按钮)保持可见不裁切。
   注入层晚于 theme.css，特异性足够覆盖原 overflow 规则。 */
.table-wrap{
  table-layout:fixed;
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.table-wrap>.table{
  table-layout:fixed;
  width:100%;
}
.table-wrap>.table td:not(.col-action),
.table-wrap>.table th:not(.col-action){
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}


/* === 因子 IC 图表（手写 SVG）可读性（#1171） ===
   根因：SVG text 硬编码 font-size=8/9（user units），在窄视口缩放后过小。
   解法：字号已升 10/11；容器加 min-width 让移动端横向滚动时仍可读。 */
.ic-chart-container{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.ic-chart-svg{
  min-width:520px;
}


/* === 移动端 dashboard 网格单列化（#1171） ===
   根因：js/lx-nav-layout.js 原条无 media 门禁，注入 repeat(2,1fr)!important
   → 390px 下 watchlist 面板被挤到 25px（l:222 r:247），股票名/代码溢出 416px。
   解法（v648 源修）：在 lx-nav-layout.js 注入处加 min-width:768 / max-width:767 双门禁。
   此处保留特异性 (1,1,1) 的 !important 兜底，防未来回归。 */
@media (max-width:768px){
  #tab-dashboard body .dashboard-grid,
  #tab-dashboard body .bigscreen-grid{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
}

/* v655: ticker 顶部固定（sticky top:0 + z-index 50 + 50px 高 + margin-top:0），
   根治上方大片空白（被 hero insertBefore 挤到中部的回归防御） */
.ticker{position:sticky !important;top:0 !important;z-index:50 !important;height:50px !important;min-height:50px !important;max-height:50px !important;flex-shrink:0 !important;margin:0 !important;overflow:hidden !important}


/* === v658 响应式 Logo（内测评估清单：移动端仅图标，杜绝导航挤压错乱） ===
   特异性 #sidebar 前缀 (1,1,0) 压过 nav-refined.css 12 条 .brand-logo-img 规则
   PC ≥1200px: 图标 + 完整 lixuanlh.com
   平板 768-1199px: 图标 + lixuanlh（省略 .com 由 SVG 原生宽度控制）
   移动 <768px: 仅 L 方形图标（object-fit:cover 裁掉文字区，object-position:left 显示图标） */
#sidebar .brand-logo-img,
.brand-logo-img{
  width:172px !important;
  height:auto !important;
  object-fit:contain !important;
  object-position:left center !important;
  display:block !important;
}
@media (max-width:1199px) and (min-width:768px){
  #sidebar .brand-logo-img,
  .brand-logo-img{
    width:128px !important;
  }
}
@media (max-width:767px){
  #sidebar .brand-logo-img,
  .brand-logo-img{
    width:38px !important;
    height:38px !important;
    max-width:38px !important;
    object-fit:cover !important;
    object-position:left center !important;
    flex:none !important;
  }
}

/* === v666 hero 修复：LivingPortrait 3D mesh 在 canvas 内双图层渲染 face+body 视觉错位 === */
/* 根因：LivingPortrait 把素材拆成 face region（顶部）+ body region（底部）分别 drawImage 到 180×220 canvas */
/* 修复：禁用 hero canvas 渲染 + img 静态显示完整素材（保留演播室背景） */
/* v667（重拾 3D 时只需删除此段） */
#lx-daily-hero .lx-dh-living-canvas{display:none!important}
#lx-daily-hero .lx-dh-full-img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center 25%!important;
  border-radius:0!important;
}

/* === v668 国际股票名称列字体修复 === */
/* 根因：colgroup 名称 22% 宽度不够 + ellipsis 截断（"阿里巴巴...."）；fontWeight:400 + 中文名长导致系统字体粗 */
/* 修复：22% → 28% + 强制 nowrap + ellipsis（保持单行布局）+ font-weight:500（中等粗细平衡可读性） */
/* 注：gm-table colgroup 通过 JS 注入到 DOM（global-markets.js），CSS 调整只能改宽度/字体，列宽调整需改 JS */

/* === v668 刷新大色块蒙皮修复 === */
/* 根因：1) sidebar market-status 加载中"加载中"圆点+文字（视觉噪点） */
/*       2) main .content 容器无背景色，sidebar 渲染后右侧整片 bodyBg 深色空白（"大色块"） */
/*       3) hero .lx-dh-avatar 容器无背景，canvas disabled 后显示浏览器默认白底 */
/* 修复：main 占位背景 + hero 占位背景 + market-status 加载文本优化 */
.content{background:var(--bg-base,#0e1422);min-height:100%}
.lx-dh-avatar{background:#0e1422}
.market-status{font-size:12px;opacity:.85}
.market-status-text.loading-spinner{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent,#4f8df7);animation:none;margin-right:6px;vertical-align:middle}

/* 国际股票表名称列字号稍微加重（多字符中文名在中性字体下显细，提升可读性） */
.gm-table .cell-name,.font-weight:600;font-feature-settings:'tnum' 1}
/* 注：实际表格用 PingFang SC / 微软雅黑，14px 已可读，仅微调字重让长名"阿里巴巴-W"等更醒目 */

/* === v668 国际股票名称列字体修复 + 刷新大色块蒙皮 === */
/* 1) gm-table 名称列加 font-feature + 字重微调（长名如"阿里巴巴-W"更醒目） */
.gm-table .cell-name{font-weight:600;font-feature-settings:'tnum' 1}

/* 2) 刷新大色块蒙皮：main 占位 + hero 占位 + market-status 优化 */
.content{background:#0e1422;min-height:100%}
.lx-dh-avatar{background:#0e1422}
.market-status-text{font-size:12px;opacity:.85}

/* === v674 CLS 修复：dashboard 顶部预留学习卡+质量卡占位（消除动态插入布局位移） === */
/* 根因：learning-card + picks-quality-card JS 动态插入 dashboard 顶部 → 把下方内容推下去 → CLS 1.0 */
/* 修复：CSS ::before 占位 230px，卡片插入占用预留空间 → 零位移 */
#tab-dashboard .dashboard::before{
  content:'';
  display:block;
  min-height:230px;
  pointer-events:none;
}
/* 卡片本身高度固定（防刷新波动） */
.lx-learning-card{min-height:86px}
.lx-picks-quality{min-height:132px}

/* === v675 CLS 根治：main/dashboard 视口高度占位 === */
/* 根因：dashboard 数据渲染（t≈2400ms）撑开 #main-content → CLS 0.67 */
/* 修复：main + dashboard 提前占满视口高度 → 内部渲染零外部位移 */
#main-content.content,
#main-content{min-height:calc(100vh - 60px) !important}
#tab-dashboard .dashboard{min-height:calc(100vh - 280px) !important}
#tab-daily-picks .dashboard{min-height:calc(100vh - 280px) !important}

/* === v678 C 线 hero 复活：LivingPortrait mesh 双图层 bug（face/body 区域双画）暂不修引擎，
   改用 CSS 微动效让静态素材"活"（呼吸 scale + 轻摆 rotate，零 JS 引擎风险） === */
#lx-daily-hero .lx-dh-full-img{
  animation:lx-hero-breathe 3.8s ease-in-out infinite,
            lx-hero-sway 7.2s ease-in-out infinite;
  transform-origin:center bottom;
  will-change:transform;
}
@keyframes lx-hero-breathe{
  0%,100%{transform:scale(1) translateY(0)}
  50%{transform:scale(1.012) translateY(-1.5px)}
}
@keyframes lx-hero-sway{
  0%,100%{transform:rotate(0deg)}
  50%{transform:rotate(0.6deg)}
}

/* === v680 CLS 面板占位：dashboard 各容器固定 min-height，数据填充零增高 === */
.index-cards{min-height:88px}
.quick-entries{min-height:96px}
#tab-dashboard .rank-body,#tab-dashboard .realtime-body{min-height:320px}
#tab-dashboard .watchlist-preview{min-height:220px}
.market-overview-grid .panel-body{min-height:120px}
#sidebar-nav{min-height:420px}
.flywheel-cards{min-height:180px}
.lix-ai-screener{min-height:140px}
@media (max-width:768px){
  #tab-dashboard .rank-body,#tab-dashboard .realtime-body{min-height:260px}
  #tab-dashboard .watchlist-preview{min-height:180px}
  .market-overview-grid .panel-body{min-height:100px}
}
