/* ================= 首页 v6（static/js/home.js） ================= */
.hm { padding: 30px 0 10px; }
.hm-head { display: flex; flex-direction: column; gap: 6px; }
.hm-greet { font-size: 11px; letter-spacing: 0.2em; color: var(--text-3); font-weight: 600; }
.hm-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hm-title h1 { font-family: var(--serif); font-weight: 900; font-size: 34px; line-height: 1.2; letter-spacing: 0.02em; }
.hm-title h1 em { font-style: normal; color: var(--up); }
.hm-badge { font-size: 12.5px; color: var(--gold); text-decoration: none; border: 1px solid var(--gold);
  padding: 5px 12px; letter-spacing: 0.06em; white-space: nowrap; background: var(--gold-soft); }
.hm-badge b { font-size: 14px; color: var(--up); }
.hm-badge s { color: var(--text-3); margin-left: 2px; }
.hm-badge.is-vip { color: var(--text-2); border-color: var(--line-2); background: none; }
.hm-badge:empty { display: none; }
.hm-badge.is-trial { color: var(--text); border-color: var(--rule); background: none; }
.hm-cz-go { margin-top: auto; align-self: flex-start; background: var(--text); color: var(--paper);
  font-weight: 700; font-size: 14px; padding: 10px 18px; margin-top: 14px; }

.hm .today-rx { margin-top: 18px; }
.hm-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border: 1px solid var(--rule); border-top: 0; padding: 12px 24px; background: var(--paper-2, #f3f0e7); }
.hm-cta .hero-cta { padding: 13px 26px; font-size: 15px; }
.hm-cta-note { font-size: 12.5px; color: var(--text-3); }
.hm-cta-note .hero-alt { margin-left: 10px;  font-size: 12.5px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* 锁住的几局：并成一行，不再每张都重复同一段话 */
.rx-slot.is-locked .rx-why { display: none; }
.rx-lockbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 0; padding: 10px 16px; border-top: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, var(--paper) 0 10px, var(--paper-2, #f3f0e7) 10px 20px);
  font-size: 12.5px; color: var(--text-2); }
.rx-lockbar a { font-weight: 700; color: var(--gold); text-decoration: none; white-space: nowrap; }

.home-growth { margin-top: 18px; }
.home-growth:empty { display: none; }

.hm-sec { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 38px 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--rule); }
.hm-sec > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.hm-sec h2 { font-family: var(--serif); font-size: 22px; font-weight: 900; letter-spacing: 0.08em; }
.hm-sec-r { font-size: 12px; color: var(--text-3); }

.hm-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px;
  grid-template-areas:
    "diag diag diag diag diag diag diag ai ai ai ai ai"
    "cz cz cz cz hold hold hold hold vip vip vip vip"; }
.hm-ai { grid-area: ai; } .hm-diag { grid-area: diag; } .hm-cz { grid-area: cz; }
.hm-hold { grid-area: hold; } .hm-vip { grid-area: vip; }
/* 会员卡不显示（免费运营模式）时，体质和持仓各占一半 */
.hm-grid:not(:has(.hm-vip)) { grid-template-areas:
    "diag diag diag diag diag diag diag ai ai ai ai ai"
    "cz cz cz cz cz cz hold hold hold hold hold hold"; }

.hm-card { border: 1px solid var(--line-2, #d9d5c8); background: var(--paper); padding: 20px 22px;
  display: flex; flex-direction: column; min-width: 0; }
.hm-k { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.2em; color: var(--gold); font-weight: 700; margin-bottom: 12px; }
.hm-k i { font-style: normal; letter-spacing: 0.1em; font-size: 10.5px; padding: 2px 8px;
  border: 1px solid currentColor; }
.hm-k i.hot { color: var(--up); }
.hm-k a { letter-spacing: 0.06em; color: var(--text-2); text-decoration: none; font-weight: 600; }
.hm-k a:hover { color: var(--text); }
.hm-more { margin-top: auto; padding-top: 12px; font-size: 13px; font-weight: 700; color: var(--text);
  text-decoration: none; }
.hm-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- AI 报告：深底主卡 ---- */
.hm-ai { background: var(--ink); color: #f3efe4; border-color: var(--ink); padding: 22px 24px; }
.hm-ai .hm-k { color: #d8b878; }
.hm-ai-h { font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1.45; color: #fbfaf7; }
.hm-ai-sub { margin-top: 14px; font-size: 11.5px; letter-spacing: 0.14em; color: #a9a291; }
.hm-ai-hooks { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: h; display: grid; gap: 8px; }
.hm-ai-hooks li { counter-increment: h; position: relative; padding-left: 26px; font-size: 13.5px;
  line-height: 1.6; color: #e6e1d3; }
.hm-ai-hooks li::before { content: counter(h); position: absolute; left: 0; top: 2px; width: 17px; height: 17px;
  border: 1px solid #6d6656; font-size: 10.5px; line-height: 15px; text-align: center; color: #d8b878;
  font-family: var(--serif); }
.hm-ai-hooks b { color: #fff; font-variant-numeric: tabular-nums; }
.hm-ai-hooks b.up { color: #ff8a7a; } .hm-ai-hooks b.down { color: #6fd3a2; }
.hm-ai-tiers { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid #3a372f; }
.hm-ai-tiers li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid #3a372f; font-size: 12.5px; color: #a9a291; }
.hm-ai-tiers li b { color: #e6e1d3; font-weight: 700; white-space: nowrap; }
.hm-ai-tiers li.on span { color: #d8b878; }
.hm-ai-tiers li span { text-align: right; }
.hm-ai-pend { margin-top: 10px; font-size: 12.5px; color: #d8b878; }
.hm-ai-last { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12.5px;
  color: #e6e1d3; text-decoration: none; }
.hm-ai-last b { color: #d8b878; white-space: nowrap; }
.hm-ai-cta { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hm-ai-go { background: #d8b878; color: #1b1a16; font-weight: 800; font-size: 14px; letter-spacing: 0.06em;
  padding: 11px 20px; text-decoration: none; }
.hm-ai-go:hover { background: #e6c98c; }
.hm-ai-alt { color: #c9c2b0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ---- 核心诊断 ---- */
.hm-d1 { font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1.45; }
.hm-d2 { margin-top: 6px; font-size: 15px; color: var(--text-2); }
.hm-d2 .up, .hm-reg .up, .hm-wl-f .up { color: var(--up); }
.hm-d2 .down, .hm-reg .down, .hm-wl-f .down { color: var(--down); }
.hm-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; }
.hm-stats .hs + .hs { border-left: 1px solid var(--line); padding-left: 16px; }
.hm-stats .k { font-size: 11px; letter-spacing: 0.14em; color: var(--text-3); font-weight: 600; }
.hm-stats .v { font-family: var(--serif); font-size: 26px; font-weight: 900; line-height: 1.3;
  font-variant-numeric: tabular-nums; }
.hm-stats .v small { font-size: 12px; color: var(--text-3); font-weight: 600; }
.hm-wl { display: flex; gap: 2px; height: 6px; margin-top: 14px; }
.hm-wl i { display: block; } .hm-wl .w { background: var(--up); } .hm-wl .l { flex: 1; background: var(--down); }
.hm-wl-f { display: flex; justify-content: space-between; font-size: 11.5px; margin-top: 4px; }
.hm-reg { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.hm-reg-t { font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; letter-spacing: 0.06em; }
.hm-reg-row { display: grid; grid-template-columns: 112px 1fr 64px; align-items: center; gap: 10px;
  font-size: 12.5px; padding: 3px 0; }
.hm-reg-row .l i { font-style: normal; color: var(--text-3); font-size: 11px; margin-left: 6px; }
.hm-reg-row .bar { position: relative; height: 10px; background: var(--paper-2, #f3f0e7); }
.hm-reg-row .bar i { position: absolute; top: 0; bottom: 0; }
.hm-reg-row .bar i.mid { left: 50%; width: 1px; background: var(--line-2, #d9d5c8); }
.hm-reg-row .bar i.up { background: var(--up); } .hm-reg-row .bar i.down { background: var(--down); }
.hm-reg-row .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.hm-headline { margin-top: 14px; font-size: 12px; color: var(--gold); background: var(--gold-soft);
  padding: 6px 10px; align-self: flex-start; }

/* ---- 交易体质 ---- */
.hm-cz-in { flex: 1; display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text); }
.hm-cz-ill { flex: 0 0 150px; }
.hm-cz-svg { width: 150px; height: auto; display: block; }
.hm-cz-txt b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 900; }
.hm-cz-txt span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.hm-cz-foot { margin-top: auto; padding-top: 12px; display: flex; gap: 18px; font-size: 13px; font-weight: 700; }
.hm-cz-foot a { color: var(--text); text-decoration: none; }
.hm-cz-foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hm-cz-wait { display: flex; gap: 14px; align-items: flex-start; }
.hm-cz-q { flex: 0 0 64px; height: 64px; border: 1px dashed var(--line-2, #d9d5c8); display: grid; place-items: center;
  font-family: var(--serif); font-size: 30px; font-weight: 900; color: var(--text-3); }
.hm-cz-wait b { font-family: var(--serif); font-size: 16px; }
.hm-cz-wait p { margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.hm-dots { display: inline-flex; gap: 5px; margin-top: 8px; }
.hm-dots i { width: 22px; height: 4px; background: var(--line); } .hm-dots i.on { background: var(--gold); }

/* ---- 持仓同形：沿用 holdings.css 的内容，换掉它贴在处方卡下面时的框 ---- */
.hm-hold { padding: 0; }
.hm-hold .hold-rx { border: 0; height: 100%; }
.hm-hold .hold-rx-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  height: 100%; padding: 20px 22px; }
.hm-hold .hold-rx-cta .go { margin-top: auto; }
.hm-hold .hold-rx-in { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 20px 22px; height: 100%; }
.hm-hold .hold-rx-in ul { flex-direction: column; gap: 6px; }
.hm-hold .hold-rx-in .go { margin-top: auto; }

/* ---- 会员对照 ---- */
.hm-vs { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hm-vs th { font-size: 11px; letter-spacing: 0.12em; color: var(--text-3); font-weight: 600; text-align: left;
  padding: 0 0 6px; }
.hm-vs td { padding: 7px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.hm-vs td:first-child { color: var(--text); padding-right: 8px; }
.hm-vs th:last-child, .hm-vs td:last-child { color: var(--gold); }
.hm-vs td b { font-weight: 800; }
.hm-vip-p { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.hm-vip-price { margin-top: 12px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.hm-vip-price .cur { font-size: 14px; color: var(--up); font-weight: 700; }
.hm-vip-price b { font-family: var(--serif); font-size: 32px; font-weight: 900; color: var(--up); line-height: 1; }
.hm-vip-price span { font-size: 12px; color: var(--text-2); }
.hm-vip-price s { font-size: 12px; color: var(--text-3); }
.hm-vip-price em { font-style: normal; font-size: 11.5px; color: var(--text-3); margin-left: auto; }
.hm-vip-go { margin-top: auto; padding-top: 12px; align-self: stretch; }
.hm-vip-go { display: block; text-align: center; background: var(--text); color: var(--paper); text-decoration: none;
  font-weight: 700; font-size: 14px; padding: 11px 0; margin-top: 14px; }

/* ---- 全部记录页头：最近对局 + 涨跌之最 ---- */
.rec-top { margin-bottom: 30px; }
.rec-top .sub-head { margin-top: 14px; }

/* ================= 平板 ================= */
@media (max-width: 980px) {
  .hm-grid, .hm-grid:not(:has(.hm-vip)) { grid-template-columns: 1fr 1fr; grid-template-areas:
      "ai ai" "diag diag" "cz hold" "vip vip"; }
}

/* ================= 手机 ================= */
@media (max-width: 640px) {
  .hm { padding-top: 18px; }
  .hm-title h1 { font-size: 24px; }
  .hm-badge { font-size: 12px; padding: 4px 10px; }
  .hm .today-rx { margin-top: 14px; }
  /* 手机上的处方卡：只留「下一局」+ 一行锁住的提示，按钮交给下面的大按钮 */
  .hm .rx-top { flex-direction: column; align-items: stretch; gap: 8px; }
  .hm .rx-prog { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
  .hm .rx-prog .n { font-size: 15px; order: 2; white-space: nowrap; }
  .hm .rx-prog .track { flex: 1; margin-top: 0; order: 1; }
  .hm .rx-prog .rx-ck { order: 3; font-size: 12px; white-space: nowrap; margin: 0; }
  .hm .rx-slot.is-locked, .hm .rx-note { display: none; }
  .hm .rx-slots { margin-top: 12px; }
  .hm .rx-slot.is-done .rx-cue, .hm .rx-slot.is-done .rx-why { display: none; }
  .hm .rx-slot.is-next .rx-foot { display: none; }
  .hm .rx-lockbar { padding: 10px 12px; }
  .hm-cta { flex-direction: column-reverse; align-items: stretch; padding: 12px 16px; gap: 10px; }
  .hm-cta .hero-cta { width: 100%; padding: 15px 18px; }
  .hm-cta-note { text-align: center; }
  .hm-sec { margin-top: 28px; }
  .hm-sec-r { display: none; }
  .hm-grid, .hm-grid:not(:has(.hm-vip)) { grid-template-columns: 1fr; gap: 12px;
    grid-template-areas: "ai" "diag" "cz" "hold" "vip"; }
  .hm-card { padding: 16px; }
  .hm-ai { padding: 18px 16px; }
  .hm-ai-h { font-size: 19px; }
  .hm-ai-go { flex: 1; text-align: center; }
  .hm-d1 { font-size: 18px; }
  .hm-d2 { font-size: 14px; }
  .hm-stats { grid-template-columns: 1fr 1fr; gap: 10px 0; }
  .hm-stats .hs:nth-child(3) { border-left: 0; padding-left: 0; }
  .hm-stats .v { font-size: 22px; }
  .hm-reg-row { grid-template-columns: 92px 1fr 58px; gap: 8px; }
  .hm-cz-ill { flex-basis: 96px; } .hm-cz-svg { width: 96px; }
  .hm-cz-txt b { font-size: 20px; }
  .hm-hold .hold-rx-cta, .hm-hold .hold-rx-in { padding: 16px; }
}

.rec-top .panel-sec { padding-top: 26px; }
.rec-top .panel-sec.tight { padding-top: 44px; }
.rec-all-h { margin-top: 48px; }

/* ================= 手机底部导航 ================= */
#tabbar, #tab-sheet { display: none; }
@media (max-width: 760px) {
  body:not(.focus):not(.landing) .pref-nag { bottom: calc(68px + env(safe-area-inset-bottom)); }
  #appbar nav { display: none; }
  .bar-row { justify-content: space-between; }
  #tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 45; background: rgba(251, 250, 247, 0.97); backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
  #tabbar a, #tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 0 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-3);
    text-decoration: none; min-height: 48px; justify-content: center; }
  #tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  #tabbar a.active, #tabbar button[aria-expanded="true"] { color: var(--text); }
  #tabbar a.active svg { stroke-width: 2; }
  #tabbar a.active span { font-weight: 800; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  body.focus #tabbar, body.landing #tabbar, body.focus #tab-sheet { display: none; }
  body.focus { padding-bottom: 0; }
  #tab-sheet:not([hidden]) ~ .pref-nag { display: none; }
  #tab-sheet:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 44;
    background: rgba(17, 17, 16, 0.28); }
  .ts-card { position: absolute; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom));
    background: var(--paper); border-top: 2px solid var(--rule); padding: 16px 16px 12px; }
  .ts-h { font-size: 11px; letter-spacing: 0.2em; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
  .ts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .ts-grid a { padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600;
    color: var(--text); text-decoration: none; }
}

.hm-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 0; counter-reset: s; }
.hm-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 92px 1fr; gap: 8px; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.hm-steps li::before { content: counter(s); font-family: var(--serif); font-weight: 900; color: var(--text-3); }
.hm-steps li b { color: var(--text); }
.hm-steps li.on::before { content: "✓"; color: var(--gold); }
.hm-steps li.on { opacity: 0.6; }
@media (max-width: 640px) { .hm-steps li { grid-template-columns: 22px 1fr; } .hm-steps li span { grid-column: 2; } }

/* ================= 手机逐页修整（2026-11-29） ================= */
.grid-2 > * { min-width: 0; }
.ret-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
  /* 结算页：三格收益在 390 宽下装不下 27px 的数字 */
  .reveal-card { padding: 30px 14px 24px; }
  .reveal-card .name { font-size: 34px; }
  .ret-tile { padding: 14px 4px; }
  .ret-tile .k { letter-spacing: 0.06em; }
  .ret-tile .v { font-size: 19px; }
  /* 统计诊断：行为行（标题 168px + 条 120px + 数值）换成两行 */
  .beh-row { flex-wrap: wrap; gap: 6px 10px; }
  .beh-row .bt { width: 100%; }
  .beh-row .bar { flex: 1; width: auto; }
  /* 风云榜：手机上只留名次、用户、榜上分、较上月、计分局、活跃分 */
  .lb-table th:nth-child(5), .lb-table td:nth-child(5),
  .lb-table th:nth-child(6), .lb-table td:nth-child(6),
  .lb-table th:nth-child(8), .lb-table td:nth-child(8) { display: none; }
}
@media (max-width: 640px) {
  /* 结算页评分卡：分数和结论上下排，不再挤成左右两窄栏 */
  .sc-head { flex-direction: column; }
  .sc-total { flex: none; flex-direction: row; align-items: baseline; justify-content: flex-start;
    gap: 10px; padding: 18px 16px 0; border-right: 0; }
  .sc-total .v { font-size: 42px; }
  .sc-verdict { padding: 8px 16px 18px; }
  .sc-item { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
}
@media (max-width: 640px) {
  /* 持仓买卖页页头：返回链接单独一行，股票名不再被挤成两行 */
  .hd-trade-head { flex-wrap: wrap; align-items: flex-end; gap: 6px 12px; }
  .hd-trade-head .day-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; flex: 1 1 100%; }
  .hd-trade-head .hd-back { flex: 1 1 100%; font-size: 12px; }
  .hd-trade-head .day-title .n { white-space: nowrap; }
  .hd-trade-head .equity { margin-left: auto; }
}
@media (max-width: 640px) {
  /* 盘面矩阵：行情时间/持仓/盈亏三段在手机上换行，不再挤成三窄栏 */
  .mx-tick { flex-wrap: wrap; gap: 4px 12px; letter-spacing: 0.06em; }
  .mx-tick span { white-space: nowrap; }
  .mx-head { padding-top: 22px; gap: 12px; }
  .mx-head h1 { font-size: 28px; }
}
@media (max-width: 720px) {
  /* 二级分页（复盘与AI / 看盘 / 专项训练）：手机上改成一行分段按钮，说明文字收起，
     原来三张竖排大卡要占掉大半屏才看到内容 */
  .mk-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0 16px; }
  .mk-tabs.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-tab { padding: 11px 4px; text-align: center; border-bottom: 0; border-right: 1px solid var(--line); }
  .mk-tab:last-child { border-right: 0; }
  .mk-tab b { font-size: 14px; letter-spacing: 0.04em; white-space: nowrap; }
  .mk-tab span { display: none; }
}
