/* 银行板块智能问答 Agent — 浅色简洁主题 */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2329;
  --text2: #646a73;
  --text3: #8f959e;
  --primary: #2f54eb;
  --primary-weak: #eef2ff;
  --up: #d93025;      /* 涨-红 */
  --up-bg: #fdeceb;
  --down: #0a8f4e;    /* 跌-绿 */
  --down-bg: #e8f5ef;
  --flat: #646a73;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(31,35,41,.06), 0 4px 14px rgba(31,35,41,.05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; }

/* ---------- 顶栏 ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.brand-title { font-size: 19px; font-weight: 700; display: block; }
.brand-sub { font-size: 12.5px; color: var(--text3); display: block; }
.nav { display: flex; gap: 6px; }
.nav a { padding: 9px 18px; border-radius: 10px; font-size: 15.5px; font-weight: 500; color: var(--text2); transition: .15s; }
.nav a:hover { background: var(--primary-weak); color: var(--primary); }
.nav a.active { background: var(--primary); color: #fff; font-weight: 600; }

/* ---------- 布局 ---------- */
.main { max-width: 1200px; margin: 20px auto 40px; padding: 0 20px; }
.view { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.footer { text-align: center; color: var(--text3); font-size: 12.5px; padding: 18px 20px 30px; border-top: 1px solid var(--border); margin-top: 30px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.footnote { color: var(--text3); font-size: 12.5px; margin-top: 10px; }

/* ---------- 统计条 ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.stat-item .k { font-size: 13px; color: var(--text3); }
.stat-item .v { font-size: 20px; font-weight: 700; margin-top: 2px; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search-input { flex: 1; min-width: 220px; max-width: 340px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; outline: none; transition: .15s; }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; color: var(--text2); font-size: 14px; cursor: pointer; transition: .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary { background: var(--primary); color: #fff; border: none; border-radius: 10px; padding: 10px 22px; font-size: 15px; font-weight: 600; cursor: pointer; transition: .15s; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { background: #b9c2f5; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--text2); border: 1.5px solid var(--border); border-radius: 10px; padding: 9px 16px; font-size: 14px; cursor: pointer; transition: .15s; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; padding: 12px 12px; color: var(--text3); font-weight: 600; font-size: 13px; border-bottom: 1.5px solid var(--border); white-space: nowrap; background: #fafbfc; position: sticky; top: 0; }
.table td { padding: 11px 12px; border-bottom: 1px solid #f0f1f3; white-space: nowrap; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: #f6f8ff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--primary); }
.sortable.sorted-asc::after { content: " ↑"; color: var(--primary); }
.sortable.sorted-desc::after { content: " ↓"; color: var(--primary); }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.pill.up { background: var(--up-bg); }
.pill.down { background: var(--down-bg); }
.pill.flat { background: #f0f1f3; }
.cat-tag { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12.5px; color: var(--text2); background: #f0f2f5; }

/* ---------- 详情页 ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); font-size: 14.5px; margin-bottom: 14px; padding: 6px 12px 6px 8px; border-radius: 8px; }
.back-link:hover { background: #fff; color: var(--primary); }
.stock-head { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px; box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.stock-name { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stock-price { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stock-change { font-size: 17px; font-weight: 600; }
.section-title { font-size: 17px; font-weight: 700; margin: 24px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--primary); }
.period-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.period-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.period-card .k { font-size: 13.5px; color: var(--text3); }
.period-card .v { font-size: 21px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.period-card .d { font-size: 12.5px; color: var(--text3); }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kv { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.kv .k { font-size: 12.5px; color: var(--text3); }
.kv .v { font-size: 16.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.chart-card { padding: 16px 18px; }
.chart-card svg { width: 100%; height: auto; display: block; }
.flow-table td, .flow-table th { white-space: nowrap; }

/* ---------- 推荐板 ---------- */
.radar-head { background: linear-gradient(135deg, #2f54eb 0%, #4069eb 100%); color: #fff; border-radius: var(--radius); padding: 24px 28px; margin-bottom: 14px; }
.radar-head h2 { font-size: 22px; font-weight: 700; }
.radar-head p { opacity: .92; font-size: 14px; margin-top: 6px; }
.radar-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
.radar-meta .m .k { font-size: 12.5px; opacity: .85; }
.radar-meta .m .v { font-size: 18px; font-weight: 700; }
.factor-bar { display: inline-flex; align-items: center; gap: 6px; }
.fbar { width: 64px; height: 6px; border-radius: 3px; background: #f0f1f3; position: relative; overflow: hidden; }
.fbar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; }
.score-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 3px 10px; border-radius: 8px; background: var(--primary-weak); color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 700; font-size: 14px; background: #f0f2f5; color: var(--text2); }
.rank-no.top1 { background: #fff3d6; color: #b45309; }
.rank-no.top2 { background: #f1f3f5; color: #556; }
.rank-no.top3 { background: #fdeee2; color: #b4551d; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; margin-right: 4px; }
.tag.hot { background: var(--up-bg); color: var(--up); }
.tag.cold { background: var(--down-bg); color: var(--down); }
.tag.neutral { background: #f0f2f5; color: var(--text2); }
.disclaimer { background: #fffbe6; border: 1px solid #ffe58f; border-radius: 10px; padding: 12px 16px; font-size: 13.5px; color: #614700; margin-top: 14px; }
.loading-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px 20px; text-align: center; }
.loading-box .t { font-size: 16.5px; font-weight: 600; margin-bottom: 10px; }
.loading-box .s { color: var(--text3); font-size: 14px; }
.progress { width: 100%; max-width: 420px; height: 8px; background: #eef0f3; border-radius: 4px; margin: 16px auto 0; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: 4px; transition: width .3s; }

/* ---------- 短线雷达 ---------- */
.swing-head { background: linear-gradient(135deg, #2f54eb 0%, #4069eb 100%); color: #fff; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.swing-head h2 { font-size: 21px; font-weight: 700; }
.swing-head p { opacity: .93; font-size: 13.5px; margin-top: 6px; line-height: 1.65; max-width: 720px; }
.swing-head-right { text-align: right; flex-shrink: 0; }
.swing-asof { font-size: 13px; opacity: .9; margin-bottom: 8px; }
.swing-env { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--text2); margin-bottom: 8px; }
.swing-stats { background: var(--primary-weak); border: 1px solid #d5dcf5; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--text); margin-bottom: 14px; line-height: 1.7; }
.swing-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; cursor: pointer; transition: .15s; }
.swing-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(47,84,235,.12); }
.sw-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sw-rank { width: 26px; height: 26px; border-radius: 8px; background: #f0f2f5; color: var(--text2); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sw-name { font-size: 16.5px; flex: 1; min-width: 160px; }
.sw-score { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lv { padding: 3px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.lv-buy { background: var(--primary); color: #fff; }
.lv-consider { background: #fff3d6; color: #b45309; }
.lv-watch { background: #f0f2f5; color: var(--text2); }
.sw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 9px; margin-bottom: 10px; }
.sw-ul { list-style: none; margin: 4px 0 0; }
.sw-ul li { font-size: 13px; color: var(--text2); padding: 2px 0 2px 16px; position: relative; line-height: 1.6; }
.sw-ul li::before { content: "·"; position: absolute; left: 4px; color: var(--primary); font-weight: 700; }
.sw-why { margin-bottom: 8px; }
.sw-why-t { font-size: 13.5px; font-weight: 700; }
.sw-risk { background: #fffbe6; border: 1px solid #ffe58f; border-radius: 9px; padding: 9px 12px; margin-bottom: 8px; }
.sw-risk .sw-ul li::before { color: #b45309; }
.sw-meta { font-size: 12px; color: var(--text3); border-top: 1px dashed var(--border); padding-top: 8px; line-height: 1.6; }

/* ---------- 问答页 ---------- */
.qa-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .qa-layout { grid-template-columns: 1fr; } }
.qa-main { padding: 18px 20px; display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 520px; }
.qa-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.qa-title { font-size: 18px; font-weight: 700; }
.qa-sub { font-size: 12.5px; color: var(--text3); margin-top: 2px; }
.model-select { border: 1.5px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; color: var(--text2); outline: none; max-width: 180px; }
.retrieval-badge { border: 1.5px solid var(--primary); background: var(--primary-weak); color: var(--primary); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.retrieval-note { color: var(--text2); font-size: 13.5px; line-height: 1.7; margin-bottom: 10px; }
.chat { flex: 1; overflow-y: auto; padding: 16px 4px; display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 10px; max-width: 92%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; }
.msg-avatar.ai { background: var(--primary); color: #fff; }
.msg-avatar.me { background: #f0f2f5; color: var(--text2); }
.msg-body { padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.msg.assistant .msg-body { background: #f6f8ff; border: 1px solid #e3e9ff; border-top-left-radius: 4px; }
.msg.user .msg-body { background: var(--primary); color: #fff; border-top-right-radius: 4px; white-space: pre-wrap; }
.msg-text { word-break: break-word; }
.msg-text ul, .msg-text ol { padding-left: 20px; margin: 6px 0; }
.cite-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; margin: 0 2px; border-radius: 5px; background: #dfe7ff; color: var(--primary); font-size: 11.5px; font-weight: 700; cursor: pointer; vertical-align: 1px; border: none; }
.cite-chip:hover { background: var(--primary); color: #fff; }
.cite-demo { display: inline-block; padding: 0 5px; border-radius: 5px; background: #dfe7ff; color: var(--primary); font-size: 11.5px; font-weight: 700; }
.sources { margin-top: 12px; border-top: 1px dashed #d5dcf5; padding-top: 10px; }
.sources-title { font-size: 12.5px; color: var(--text3); margin-bottom: 8px; }
.source-item { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.source-item .loc { color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.source-item .loc b { font-size: 13.5px; }
.source-item .quote { color: var(--text2); background: #fafbfc; border-left: 3px solid #dfe7ff; padding: 6px 10px; border-radius: 0 6px 6px 0; }
.no-hit { background: #fff7e6; border: 1px solid #ffd591; color: #614700; }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #9fb0ff; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 12px; }
.suggest button { border: 1.5px solid var(--border); background: #fff; color: var(--text2); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; cursor: pointer; transition: .15s; }
.suggest button:hover { border-color: var(--primary); color: var(--primary); }
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-row textarea { flex: 1; resize: none; max-height: 120px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; font-family: inherit; outline: none; transition: .15s; }
.chat-input-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.qa-side { display: flex; flex-direction: column; gap: 14px; }
.side-card { padding: 16px 18px; }
.side-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.kb-list { list-style: none; }
.kb-list li { padding: 6px 0; border-bottom: 1px dashed #f0f1f3; font-size: 13.5px; color: var(--text2); display: flex; justify-content: space-between; gap: 8px; }
.kb-list li:last-child { border-bottom: none; }
.kb-list .cat { color: var(--text3); font-size: 12px; white-space: nowrap; }
.kb-list li.daily { color: var(--primary); font-weight: 600; }
.rule-list { list-style: none; }
.rule-list li { font-size: 13.5px; color: var(--text2); padding: 5px 0 5px 18px; position: relative; }
.rule-list li::before { content: "·"; position: absolute; left: 6px; color: var(--primary); font-weight: 700; }
.error-banner { background: var(--up-bg); border: 1px solid #f5c6c2; color: var(--up); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 10px; }

/* ---------- 每日条件化信号与公开资讯 ---------- */
.signal-panel, .news-panel { margin: 14px 0; padding: 18px; }
.signal-head, .news-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.signal-head h3, .news-head h3 { font-size: 18px; }
.signal-head p, .news-head p { color: var(--text3); font-size: 13px; margin-top: 3px; }
.signal-source, .news-head > span { color: var(--text2); background: #f0f2f5; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; white-space: nowrap; }
.signal-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.signal-columns h4 { margin: 5px 0 8px; font-size: 14px; }
.signal-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 8px; background: #fff; }
.signal-card.strong { border-left: 4px solid var(--up); }
.signal-card.weak { border-left: 4px solid var(--down); }
.signal-card.value { border-left: 4px solid #d97706; }
.signal-card.quality { border-left: 4px solid var(--primary); }
.dim { color: var(--text3); font-size: 12px; font-weight: 400; }
.signal-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.signal-metrics, .signal-reason, .signal-rule, .signal-date, .signal-footnote { color: var(--text2); font-size: 12.5px; margin-top: 6px; }
.signal-date { color: var(--text3); }
.signal-empty, .news-loading { border-radius: 9px; background: #fafbfc; border: 1px dashed var(--border); color: var(--text3); padding: 16px; font-size: 13.5px; }
.news-section-title { font-size: 14px; margin: 12px 0 2px; color: var(--text2); }
.news-item { padding: 12px 0; border-top: 1px solid #f0f1f3; }
.news-title { font-weight: 650; line-height: 1.5; }
.news-item p { color: var(--text2); font-size: 13px; margin-top: 4px; }
.news-meta { font-size: 12px; color: var(--text3); margin-top: 5px; }
.news-meta a { margin-left: 8px; }

/* ---------- 响应式（手机端） ---------- */
@media (max-width: 640px) {
  /* --- 顶栏：只留品牌，导航移到底部 --- */
  .topbar-inner { padding: 10px 14px; gap: 0; }
  .brand { gap: 10px; }
  .brand-logo { width: 36px; height: 36px; font-size: 20px; border-radius: 9px; }
  .brand-title { font-size: 15.5px; line-height: 1.3; }
  .brand-sub { font-size: 11.5px; }

  /* --- 底部 Tab Bar --- */
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    display: flex; gap: 0;
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 14px rgba(31,35,41,.07);
  }
  .nav a {
    flex: 1; text-align: center; padding: 6px 2px;
    font-size: 12.5px; font-weight: 500; border-radius: 9px; color: var(--text2);
    display: flex; flex-direction: column; align-items: center; gap: 1px;
  }
  .nav a::before { font-size: 17px; line-height: 1.2; }
  .nav a[data-route="list"]::before { content: "📋"; }
  .nav a[data-route="radar"]::before { content: "📈"; }
  .nav a[data-route="swing"]::before { content: "⚡"; }
  .nav a[data-route="qa"]::before { content: "💬"; }
  .nav a { font-size: 12px; }
  .nav a:hover { background: transparent; color: var(--text2); }
  .nav a.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }

  /* --- 主体留白 --- */
  .main { padding: 0 12px; margin: 14px auto 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .footer { padding: 16px 14px calc(78px + env(safe-area-inset-bottom)); font-size: 11.5px; margin-top: 20px; }

  /* --- 统计条：2 列紧凑 --- */
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .stat-item { padding: 10px 12px; }
  .stat-item .k { font-size: 11.5px; }
  .stat-item .v { font-size: 17px; }

  /* --- 工具栏：搜索全宽 + 分类横向滑动 --- */
  .toolbar { gap: 8px; margin-bottom: 12px; }
  .search-input { min-width: 100%; max-width: none; padding: 11px 14px; font-size: 16px; }
  .chips { flex-wrap: wrap; }
  #catChips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  #catChips::-webkit-scrollbar { display: none; }
  .chip { padding: 8px 14px; font-size: 13.5px; white-space: normal; }
  #catChips .chip { white-space: nowrap; flex-shrink: 0; }
  .btn-ghost { padding: 10px 16px; min-height: 40px; }

  /* --- 表格 → 卡片流 --- */
  .card { border-radius: 11px; }
  .table-wrap { overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody { display: block; width: 100%; }
  .table tbody tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px;
    background: #fff; border: 1px solid var(--border); border-radius: 11px;
    padding: 12px 14px; margin-bottom: 9px;
  }
  .table tbody tr:active { background: #f6f8ff; }
  .table td {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 1px 0; border: none; white-space: normal; font-size: 13.5px; text-align: right;
  }
  .table td::before {
    content: attr(data-label); color: var(--text3); font-size: 12px;
    flex-shrink: 0; text-align: left;
  }
  .table td:empty::before { display: none; }
  .table td.c-name { order: 0; grid-column: 1 / -1; font-size: 16px; justify-content: flex-start; }
  .table td.c-name::before { display: none; }
  .table td.c-code { order: 1; }
  .table td.c-cat { order: 2; }
  .table td.c-price { order: 3; font-size: 15px; font-weight: 700; }
  .table td.c-pct { order: 4; }
  .table td.c-amount { order: 5; }
  .table td.c-turnover { order: 6; }
  .table td.c-pe { order: 7; }
  .table td.c-pb { order: 8; }
  .table td.c-mcap { order: 9; grid-column: 1 / -1; }
  .table td.c-change, .table td.c-vr { display: none; }   /* 涨跌额/量比手机上省略 */
  .table td.c-date { grid-column: 1 / -1; font-weight: 600; justify-content: flex-start; }
  .table td.c-date::before { display: none; }
  .flow-table tbody tr { grid-template-columns: 1fr 1fr; }
  .table tbody tr td[colspan] { display: block; grid-column: 1 / -1; text-align: center; }

  /* --- 短线雷达 --- */
  .swing-head { padding: 16px; flex-direction: column; gap: 10px; }
  .swing-head h2 { font-size: 18.5px; }
  .swing-head p { font-size: 12.5px; }
  .swing-head-right { text-align: left; display: flex; align-items: center; gap: 10px; }
  .swing-asof { margin-bottom: 0; font-size: 12.5px; }
  .swing-env { padding: 10px 12px; font-size: 12.5px; }
  .swing-stats { padding: 10px 12px; font-size: 12.5px; }
  .swing-card { padding: 12px 13px; }
  .sw-name { font-size: 15.5px; min-width: 0; flex: 1 1 100%; order: 1; }
  .sw-rank { order: 0; }
  .sw-score { order: 2; margin-left: auto; }
  .sw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sw-grid .kv { padding: 9px 11px; }
  .sw-grid .kv .v { font-size: 15px; }
  .sw-ul li { font-size: 12.5px; }

  /* --- 个股详情 --- */
  .stock-head { padding: 16px; gap: 10px; }
  .stock-name { font-size: 20px; }
  .stock-price { font-size: 30px; }
  .stock-change { font-size: 15px; }
  .period-grid, .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .period-card { padding: 12px 13px; }
  .period-card .v { font-size: 18px; }
  .section-title { font-size: 16px; margin: 20px 0 10px; }
  .chart-card { padding: 12px; }

  /* --- 推荐板 --- */
  .radar-head { padding: 18px 16px; }
  .radar-head h2 { font-size: 19px; }
  .radar-meta { gap: 12px; }
  .radar-meta .m .v { font-size: 16px; }

  .signal-panel, .news-panel { padding: 14px; margin: 12px 0; }
  .signal-columns { grid-template-columns: 1fr; gap: 10px; }
  .signal-title { align-items: flex-start; }
  .signal-head h3, .news-head h3 { font-size: 16.5px; }

  /* --- 问答页 --- */
  .qa-layout { display: block; }
  .qa-layout > * { min-width: 0; }
  .qa-main {
    padding: 14px 14px 12px; height: auto; min-height: 0; max-height: none;
  }
  .qa-head { padding-bottom: 10px; }
  .qa-title { font-size: 16.5px; }
  .retrieval-badge { font-size: 11.5px; padding: 4px 10px; }
  .chat { padding: 12px 0; gap: 14px; -webkit-overflow-scrolling: touch; min-height: 220px; max-height: 44vh; }
  .msg { max-width: 100%; gap: 8px; }
  .msg-avatar { width: 30px; height: 30px; font-size: 11.5px; }
  .msg-body { padding: 9px 12px; font-size: 14.5px; }
  .suggest { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 0 10px; }
  .suggest::-webkit-scrollbar { display: none; }
  .suggest button { padding: 8px 14px; font-size: 13.5px; white-space: nowrap; flex-shrink: 0; }
  .chat-input-row textarea { font-size: 16px; max-height: 90px; padding: 11px 13px; }
  .btn-primary { padding: 11px 18px; min-height: 44px; }
  .qa-side { order: 2; }
  .side-card { padding: 14px; }
  .source-item { font-size: 12.5px; }

  /* --- 触摸与滚动 --- */
  input, textarea, select, button { font-size: 16px; }
  .btn-ghost, .chip, .suggest button { font-size: 13.5px; }
  body { -webkit-tap-highlight-color: transparent; }
  .table, .msg-text, .news-title { overflow-wrap: anywhere; }
}
