/* ==========================================================
   热点捕手 —— 静态原型样式
   移动端优先，兼容 PC（居中限宽容器）
   ========================================================== */
:root {
  --blue: #2b7cf0;
  --blue-deep: #1e6fe6;
  --blue-soft: #dcecff;
  --red: #e0483f;
  --orange: #f0813f;
  --purple: #7a5bd6;
  --green: #2fae6f;
  --ink: #20304c;
  --gray: #8b96a8;
  --line: #e3ecf8;
  --bg: #f2f7fd;
  --card-line: #d5e4f7;
  --app-w: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #dce7f3, #e8eef6);
  color: var(--ink);
  min-height: 100vh;
}
a { color: inherit; }

/* ---------- 应用容器（PC 居中） ---------- */
.app {
  position: relative;
  max-width: var(--app-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  box-shadow: 0 0 28px rgba(70, 110, 170, .18);
  padding-bottom: 170px;
}

/* ---------- 顶部 BANNER ---------- */
.banner {
  position: sticky; top: 0; z-index: 20;
  text-align: center;
  padding: 18px 16px 24px;
  background: linear-gradient(180deg, #b9d8ff 0%, #d9ebff 55%, var(--bg) 100%);
}
.banner h1 { font-size: 18px; letter-spacing: 2px; }
.banner .sub { margin-top: 6px; font-size: 12px; color: #5c6c86; }
.banner.hero { padding: 30px 16px 30px; }
.banner.hero h1 { font-size: 22px; letter-spacing: 3px; }
.banner .bell {
  position: absolute; right: 16px; top: 20px;
  width: 22px; height: 22px; color: #40507a;
}
.update-bar { background: #eaf3ff; padding: 9px 16px; font-size: 12px; color: #5c6c86; }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 14px;
  margin: 12px;
  box-shadow: 0 2px 8px rgba(90, 130, 190, .08);
}
.card h2 { font-size: 16px; }
.card-hd { display: flex; align-items: baseline; gap: 8px; }
.card-hd .more { margin-left: auto; color: var(--gray); font-size: 12px; text-decoration: none; }
.muted { color: var(--gray); font-size: 12px; }

/* ---------- 热点统计 ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; text-align: center; }
.stat .lb { font-size: 12px; color: #5c6c86; display: flex; justify-content: center; align-items: center; gap: 5px; }
.stat .vl { margin-top: 6px; font-size: 21px; font-weight: 800; }
.help {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
  font-size: 10px; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: help; flex: none;
}
.v-red { color: var(--red); }
.v-blue { color: var(--blue); }
.v-orange { color: var(--orange); }
.v-gray { color: #9aa6b8; }
.v-green { color: var(--green); }

.yest { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 10px; }
.yest .hd { font-size: 13px; font-weight: 700; border-left: 3px solid var(--blue); padding-left: 8px; }
.yest .cols { display: flex; margin-top: 12px; }
.yest .cols > div { flex: 1; text-align: center; }
.yest .cols .k { font-size: 12px; color: #5c6c86; }
.yest .cols .v { margin-top: 5px; font-size: 17px; font-weight: 800; }

/* ---------- 查看详情折叠 & 走势图 ---------- */
.collapse-btn {
  margin-top: 12px; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--blue-soft); border: none; border-radius: 10px;
  padding: 11px 14px; font-size: 13px; font-weight: 600; color: #33507a;
  cursor: pointer;
}
.collapse-btn svg { width: 16px; height: 16px; transition: transform .25s; }
#collapseWrap.open .collapse-btn svg { transform: rotate(180deg); }
.chart-panel { display: none; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px 8px; }
#collapseWrap.open .chart-panel { display: block; }
.chart-title { display: flex; justify-content: center; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; }
#trendChart svg { width: 100%; height: auto; display: block; margin-top: 6px; }
.legend { display: flex; justify-content: center; gap: 20px; font-size: 12px; color: #5c6c86; margin-top: 6px; }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: middle; }
.chart-stats { display: flex; justify-content: space-around; gap: 8px; margin-top: 8px; font-size: 12px; color: #5c6c86; }
.chart-stats b { color: var(--ink); font-weight: 700; }

/* ---------- 热点条目 ---------- */
.hot-item { display: block; padding: 12px 0 4px; border-top: 1px dashed var(--line); text-decoration: none; }
.hot-item:first-child { border-top: none; }
.hot-date { font-size: 12px; color: var(--gray); }
.hot-title { margin-top: 6px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.hot-row { margin: 8px 0 6px; display: flex; align-items: center; gap: 8px; }
.chip-hot {
  background: linear-gradient(135deg, #ff9a3f, #f0503f);
  color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 4px; flex: none;
}
.link { color: var(--blue); font-size: 13px; }

/* ---------- 热点榜列表 ---------- */
.hl-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px dashed var(--line); text-decoration: none; }
.hl-item:first-child { border-top: none; }
.rank {
  flex: none; width: 20px; height: 20px; margin-top: 2px;
  border-radius: 6px; background: #c3cddc; color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rank.r1 { background: var(--red); }
.rank.r2 { background: var(--orange); }
.rank.r3 { background: #f2b23f; }
.hl-main { flex: 1; min-width: 0; }
.hl-title { display: block; font-size: 14px; font-weight: 700; line-height: 1.45; }
.hl-meta { display: flex; gap: 12px; margin-top: 5px; font-size: 12px; color: var(--gray); }
.hl-meta .heat { color: var(--red); }
.hl-item > svg { width: 16px; height: 16px; color: #b9c4d6; margin-top: 6px; flex: none; }

/* ---------- 详情页 ---------- */
.summary { margin-top: 12px; font-size: 13px; line-height: 1.9; color: #3c4c66; }
.summary.boxed { background: #f2f8ff; border: 1px solid #dcebff; border-radius: 10px; padding: 10px 12px; }
.impact { margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.tag {
  background: #eaf3ff; border: 1px solid #cfe2ff; color: #3a7bd5;
  font-size: 12px; font-weight: 400; padding: 3px 12px; border-radius: 999px;
}

/* ---------- 基金产品卡片 ---------- */
.fund {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin-top: 10px;
}
.fund-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.f-main { flex: 1; min-width: 0; }
.fund .name { font-size: 15px; font-weight: 700; overflow-wrap: break-word; word-break: break-word; }
.fund .nums { display: flex; gap: 16px; margin-top: 8px; }
.fund .num .k { font-size: 10px; color: #a8b2c2; }
.fund .num .v { margin-top: 2px; font-size: 15px; font-weight: 800; }
.spark { flex: none; width: 112px; text-align: right; }
.spark svg { width: 112px; height: 36px; }
.spark .cap { display: block; font-size: 11px; color: var(--gray); margin-top: 2px; }
.fund-intro { margin-top: 8px; font-size: 12px; line-height: 1.7; color: #5c6c86; }

/* ---------- 持仓与信号 ---------- */
.status-card .status { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-card h2 { font-size: 16px; }
.status-card .muted { margin-top: 6px; }
.status-card .shield { width: 46px; height: 46px; flex: none; }
.signal {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; margin-top: 8px; font-size: 14px; font-weight: 600;
}
.signal:first-of-type { margin-top: 12px; }
.sig-buy { color: var(--red); font-weight: 700; }
.sig-sell { color: var(--green); font-weight: 700; }

/* ---------- 签约页 ---------- */
.benefit { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px dashed var(--line); }
.benefit:first-of-type { border-top: none; }
.benefit .ic {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.benefit .ic svg { width: 20px; height: 20px; }
.benefit b { font-size: 14px; }
.benefit p { margin-top: 4px; font-size: 12px; color: var(--gray); line-height: 1.7; }
.agree { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; font-size: 12px; color: #5c6c86; line-height: 1.7; }
.agree input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.agree a { color: var(--blue); text-decoration: none; }
.btn-big {
  display: block; width: 100%; margin-top: 18px;
  padding: 13px 0; border: none; border-radius: 999px;
  background: linear-gradient(90deg, #3f8df5, #1e6fe6);
  color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 6px 14px rgba(30, 110, 230, .3);
  cursor: pointer; text-align: center; text-decoration: none;
}
.btn-big:disabled { background: #c3cddc; box-shadow: none; cursor: not-allowed; }

/* ---------- 底部浮动操作框（跳转签约页，已签约隐藏） ---------- */
.float-bar {
  position: fixed; bottom: 68px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: calc(var(--app-w) - 24px);
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 8px 8px 8px 16px;
  box-shadow: 0 6px 18px rgba(60, 100, 160, .2);
  z-index: 29; text-decoration: none;
}
.float-bar .txt { font-size: 15px; font-weight: 700; }
.btn-sign {
  border: none; background: linear-gradient(90deg, #3f8df5, #1e6fe6);
  color: #fff; font-size: 15px; font-weight: 700;
  padding: 11px 28px; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(30, 110, 230, .35);
  cursor: pointer; text-decoration: none;
}
.btn-sign.small { padding: 9px 18px; font-size: 13px; }
body.signed .float-bar { display: none; }

/* ---------- 底部 TAB ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--app-w);
  display: flex; background: #fff; border-top: 1px solid var(--line);
  z-index: 30; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 7px; color: #9aa6b8; font-size: 11px; text-decoration: none;
}
.tabbar a.on { color: var(--blue); }
.tabbar svg { width: 22px; height: 22px; }

/* ---------- 权限状态显隐 & 打码 ---------- */
body.signed .only-unsigned { display: none !important; }
body:not(.signed) .only-signed { display: none !important; }
body:not(.signed) .maskable {
  filter: blur(5px);
  opacity: .5;
  user-select: none;
  pointer-events: none;
}

/* ---------- 页脚 / 演示切换 ---------- */
.page-foot { padding: 6px 22px 20px; text-align: center; color: #a8b2c2; font-size: 11px; line-height: 1.8; }
.demo-toggle { color: #7f8ea6; text-decoration: underline dotted; cursor: pointer; }

/* ---------- 提示 Toast ---------- */
.toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  background: rgba(30, 45, 70, .88); color: #fff;
  font-size: 13px; padding: 9px 18px; border-radius: 999px;
  z-index: 60; display: none; max-width: 86%;
}
.toast.show { display: block; }

/* ---------- PC 适配 ---------- */
@media (min-width: 560px) {
  body { background: linear-gradient(180deg, #cfdded, #e3ebf4); }
  .app { min-height: 100vh; }
}
