/* v1324 移动端精修 —— 全部走主题变量，只作用于窄屏（<=860px），桌面零影响
 * ① 底栏遮挡：主滚动容器留出「底栏高度 + 呼吸区」，滚到底不再丢内容
 * ② 市场全景板块按钮：文字硬裁 → 收紧左右内边距 + 字号降一档，完整显示
 * ③ 港美股股票名：列宽固定无法放长名 → 硬切改显式省略号（视觉从「bug」变「设计」）
 */
@media (max-width: 860px) {
  /* ① 底栏遮挡（实测 20/26 视图滚到底被 84px 固定底栏压住，最深 176px）
        底栏自带 env(safe-area-inset-bottom)，这里必须同口径补齐，否则 iPhone 全面屏仍被压 */
  #main-content {
    padding-bottom: calc(var(--bottom-nav-height, 84px) + env(safe-area-inset-bottom, 0px) + 24px) !important;
  }
  /* 兜底：若某些视图内容不在 #main-content 内滚动，给视图根也留白 */
  #tab-daily-picks, #tab-dashboard, #tab-detail, #tab-bigscreen, #tab-fund-flow,
  #tab-global-markets, #tab-lhb, #tab-news-research, #tab-stock-scanner, #tab-advisory,
  #tab-factors-view, #tab-strategy-builder, #tab-follow, #tab-algo-trading, #tab-paper-trading,
  #tab-risk-dashboard, #tab-insights, #tab-contact, #tab-pricing, #tab-evolution, #tab-wecom-panel {
    padding-bottom: calc(var(--bottom-nav-height, 84px) + env(safe-area-inset-bottom, 0px) + 24px) !important;
  }

  /* ①b 因子工坊：收藏星标按钮（☆）滚到底仍被压 47px —— 该视图容器再留一档 */
  #tab-factors-view {
    padding-bottom: calc(var(--bottom-nav-height, 84px) + env(safe-area-inset-bottom, 0px) + 84px) !important;
  }

  /* ② 市场全景板块按钮（创业板/科创板 69px 文字挤在 62px 容器） */
  #tab-bigscreen .btn {
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  /* ③ 港美股股票名（腾讯控股/阿里巴巴-W/京东集团-SW 等被硬裁） */
  #tab-global-markets .stock-name,
  #tab-global-markets .cell-name,
  #tab-global-markets td.cell-name span {
    display: inline-block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    vertical-align: bottom;
  }
}
