:root {
  --orange: #ff6a00;
  --orange-d: #e85d00;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2329;
  --sub: #6b7280;
  --line: #e5e7eb;
  --red: #e23b3b;
  --green: #1aa260;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  background: var(--orange); color: #fff; padding: 12px 16px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.brand { font-weight: 700; font-size: 17px; }
.icon-btn { background: transparent; border: none; color: inherit; font-size: 20px; cursor: pointer; padding: 4px 8px; }
.container { max-width: 640px; margin: 0 auto; padding: 14px; }
.card { background: var(--card); border-radius: 14px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px; }
.hint { display: block; font-size: 13px; color: var(--sub); margin-bottom: 8px; }
textarea { width: 100%; min-height: 140px; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  font-size: 15px; resize: vertical; outline: none; font-family: inherit; }
textarea:focus { border-color: var(--orange); }
.url-row { display: flex; gap: 8px; margin-bottom: 12px; }
.url-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 14px; outline: none; font-family: inherit; color: var(--text); }
.url-row input:focus { border-color: var(--orange); }
.url-row .btn { white-space: nowrap; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn { border: none; border-radius: 10px; padding: 11px 18px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--orange); color: #fff; }
.btn.primary:active { background: var(--orange-d); }
.btn.ghost { background: #eef0f3; color: var(--text); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.status { margin-top: 10px; font-size: 13px; color: var(--sub); min-height: 18px; }
.status.err { color: var(--red); }
.status.ok { color: var(--green); }
.status.warn { color: #b8860b; }

/* 主题卡片 */
.theme { background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.theme-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-title { font-size: 17px; font-weight: 700; margin: 0; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; color: #fff; font-weight: 600; }
.badge.core { background: #e23b3b; }
.badge.mid { background: var(--orange); }
.badge.weak { background: #7c8aa0; }
.badge.warn { background: #d9a300; }
.conf { font-size: 12px; color: var(--sub); margin-left: auto; }
.summary { margin: 10px 0; font-size: 14px; line-height: 1.5; background: #fff7f0; border-left: 3px solid var(--orange);
  padding: 8px 10px; border-radius: 6px; }
.chain { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chain span { font-size: 12px; background: #eef0f3; color: #374151; padding: 5px 9px; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--sub); font-weight: 600; background: #fafbfc; }
td .nm { font-weight: 700; }
td .cd { color: var(--sub); font-size: 12px; }
.role { display: inline-block; font-size: 11px; background: #eef0f3; border-radius: 5px; padding: 2px 6px; margin-top: 3px; }
.disclaimer { font-size: 12px; color: var(--sub); line-height: 1.6; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }

.images-section { background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.images-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.images-head h3 { margin: 0; font-size: 16px; }
.image-gallery { display: flex; flex-direction: column; gap: 14px; }
.img-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.img-item canvas { width: 100%; height: auto; display: block; }
.img-actions { display: flex; gap: 8px; padding: 8px; background: #fafbfc; }
.img-actions a, .img-actions button { flex: 1; text-align: center; text-decoration: none; font-size: 13px;
  padding: 8px; border-radius: 8px; border: none; cursor: pointer; }
.dl { background: var(--orange); color: #fff; }
.sh { background: #eef0f3; color: var(--text); }
.img-combined-tag { padding: 8px 10px; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #ff6a00, #ff8a3c); }

/* 设置弹层 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal-box { background: #fff; width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { margin: 0; }
.field { margin-bottom: 14px; }
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input[type=text], .field input[type=password] { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px; font-size: 14px; outline: none; }
.field input:focus { border-color: var(--orange); }
.seg { display: flex; gap: 16px; }
.seg label { font-size: 14px; }
.tip { font-size: 12px; color: var(--sub); margin: 6px 0 0; line-height: 1.5; }

/* ===== 底部 Tab 导航 ===== */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff;
  border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(0,0,0,.04); }
.tab { flex: 1; border: none; background: transparent; padding: 12px 0 14px; font-size: 14px; font-weight: 600;
  color: var(--sub); cursor: pointer; }
.tab.active { color: var(--orange); }
.container { padding-bottom: 70px; }

/* ===== 每日复盘页 ===== */
.review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.review-head h2 { margin: 0; font-size: 19px; }
.review-card h3 { margin: 0 0 8px; font-size: 17px; }
.review-summary { font-size: 14px; line-height: 1.6; margin: 0; color: var(--text); }
.review-body h4 { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.idx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.idx-item { background: #fafbfc; border-radius: 10px; padding: 10px; text-align: center; }
.idx-name { font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.idx-val { font-size: 16px; font-weight: 700; }
.idx-chg { font-size: 13px; font-weight: 600; }
.idx-chg.up, .mk-v.up, .right.up { color: var(--red); }
.idx-chg.down, .mk-v.down, .right.down { color: var(--green); }
.mk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk-item { background: #fafbfc; border-radius: 10px; padding: 10px; text-align: center; }
.mk-k { font-size: 12px; color: var(--sub); margin-bottom: 3px; }
.mk-v { font-size: 15px; font-weight: 700; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0;
  border-bottom: 1px solid #f0f1f3; font-size: 14px; }
.plain-list li:last-child { border-bottom: none; }
.plain-list .right { font-weight: 600; }

/* ---- 顶部醒目核心区 ---- */
.core-card { background: linear-gradient(135deg, #fff6ed, #fff); border: 1px solid #ffd9b8;
  border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.core-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.core-title { font-size: 16px; font-weight: 800; color: var(--orange); letter-spacing: 1px; }
.outlook-badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; color: #fff; }
.outlook-badge.bull { background: var(--red); }
.outlook-badge.bear { background: var(--green); }
.core-grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; align-items: stretch; }
.core-item { background: #fff; border: 1px solid #ffe3c9; border-radius: 12px; padding: 12px 10px; text-align: center; }
.core-item.pos { border-color: var(--orange); }
.core-k { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.core-v { font-size: 15px; font-weight: 700; }
.pos-v { font-size: 30px; font-weight: 900; color: var(--orange); line-height: 1.1; }
.kp-v { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.kp-chip { font-size: 15px; font-weight: 800; background: var(--orange); color: #fff;
  padding: 3px 10px; border-radius: 8px; }
.kp-chip.dim { background: #eef0f3; color: var(--sub); }
.dir-v { font-size: 18px; font-weight: 900; }
.dir-v.bull { color: var(--red); }
.dir-v.bear { color: var(--green); }
.market-sentence { margin-top: 12px; font-size: 13px; line-height: 1.7; color: #374151;
  background: #fff7f0; border-left: 3px solid var(--orange); padding: 9px 12px; border-radius: 6px; }

/* ---- 全球指数：一行四个 ---- */
.h4-sub { margin-top: 14px !important; }
.g-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.g-item { background: #fafbfc; border-radius: 10px; padding: 10px 6px; text-align: center; }
.g-name { font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.g-val { font-size: 14px; font-weight: 700; }
.g-chg { font-size: 12px; font-weight: 600; }
.g-chg.up { color: var(--red); }
.g-chg.down { color: var(--green); }

/* ---- 市场概况头部（含看多/看空） ---- */
.mk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mk-head h4 { margin: 0; }
.mk-outlook { margin-top: 10px; font-size: 13px; line-height: 1.7; color: #374151;
  background: #f4f7ff; border-left: 3px solid #3b82f6; padding: 8px 12px; border-radius: 6px; }

/* ---- 外部因素 ---- */
.ext-list { margin: 0; padding: 0; list-style: none; }
.ext-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid #f0f1f3; font-size: 14px; }
.ext-list li:last-child { border-bottom: none; }
.ext-name { color: #2563eb; font-weight: 600; min-width: 88px; }
.ext-val { color: var(--text); font-weight: 600; }
.ext-tag { margin-left: auto; font-size: 12px; color: var(--orange); background: #fff3e6;
  padding: 2px 8px; border-radius: 6px; font-weight: 600; }

/* ===== 更新红点 ===== */
.update-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ffd700;
  margin-left: 6px; vertical-align: middle; }
.update-dot.hidden { display: none; }

/* ===== 更新横幅 ===== */
.update-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  background: var(--orange); color: #fff; padding: 12px 16px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.update-banner.hidden { display: none; }
.ub-icon { font-size: 22px; line-height: 1; }
.ub-body { flex: 1; min-width: 0; }
.ub-title { font-size: 14px; font-weight: 700; }
.ub-note { font-size: 11px; opacity: .92; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ub-progress { height: 5px; background: rgba(255,255,255,.3); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.ub-bar { height: 100%; width: 0; background: #fff; border-radius: 4px; transition: width .25s; }
.ub-bar.indeterminate {
  background: linear-gradient(90deg, rgba(255,255,255,.35) 0%, #fff 50%, rgba(255,255,255,.35) 100%);
  background-size: 200% 100%;
  animation: ub-pulse 1.2s infinite linear;
}
@keyframes ub-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ub-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ub-skip, .ub-now { border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ub-skip { background: rgba(255,255,255,.25); color: #fff; }
.ub-now { background: #fff; color: var(--orange); }
.ub-now:disabled { opacity: .7; }
body.has-update .topbar { top: 52px; }

/* ===== 更新说明弹窗 ===== */
.whatsnew { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 60; display: flex;
  align-items: center; justify-content: center; padding: 0 18px; box-sizing: border-box; }
.whatsnew.hidden { display: none; }
.wn-mask { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,.45); }
.wn-card { position: relative; width: 100%; max-width: 430px; max-height: 82vh; background: #fff; border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2); display: flex; flex-direction: column; overflow: hidden; }
.wn-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.wn-title { font-size: 17px; font-weight: 800; color: var(--text); }
.wn-close { border: none; background: transparent; font-size: 18px; color: var(--sub); cursor: pointer; padding: 4px 8px; line-height: 1; }
.wn-scroll { overflow-y: auto; padding: 2px 18px 10px; -webkit-overflow-scrolling: touch; }
.wn-foot { display: flex; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.wn-foot .btn { flex: 1; }
.wn-item { margin-bottom: 14px; }
.wn-item:last-child { margin-bottom: 2px; }
.wn-v { font-size: 14px; font-weight: 800; color: var(--orange); margin-bottom: 3px; line-height: 1.4; }
.wn-date { font-size: 11px; color: var(--sub); margin-bottom: 6px; }
.wn-list { margin: 0; padding-left: 18px; }
.wn-list li { font-size: 13.5px; color: var(--text); line-height: 1.7; margin-bottom: 5px; }
.wn-hr { font-size: 12px; color: var(--sub); font-weight: 700; margin: 14px 0 8px; text-align: center; }

/* ===== 通用二次确认弹层（防误删） ===== */
.confirm-modal { align-items: center; }
.confirm-box { max-width: 420px; text-align: center; border-radius: 16px; }
.confirm-title { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.confirm-msg { font-size: 14px; color: var(--sub); line-height: 1.6; margin-bottom: 18px; word-break: break-all; }
.confirm-btns { justify-content: center; }
.confirm-btns .btn { flex: 1; max-width: 150px; }

/* ===== 保存栏（新闻映射页底部） ===== */
.save-bar { margin: 12px 0 14px; text-align: center; }
.save-date-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.save-date-label { font-size: 14px; color: var(--sub); font-weight: 600; }
.save-date-input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 15px;
  color: var(--text); background: var(--card); outline: none; font-family: inherit; }
.save-date-input:focus { border-color: var(--orange); }
.save-bar .btn { width: 100%; }

/* ===== 每日新闻分析页 ===== */
.daily-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.daily-head h2 { margin: 0; font-size: 19px; }
.daily-body { }
.daily-group { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; }
.daily-group:first-child { margin-top: 2px; }
.daily-group-date { font-size: 16px; font-weight: 800; color: var(--text); }
.daily-group-count { font-size: 12px; color: var(--sub); background: #eef0f3; border-radius: 999px; padding: 2px 9px; }

.daily-card { background: var(--card); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 10px; overflow: hidden; cursor: pointer; }
.daily-card-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 6px; }
.daily-date { font-size: 13px; font-weight: 700; color: var(--orange); }
.daily-date.editable-date { cursor: pointer; border-bottom: 1px dashed var(--orange); }
.daily-date-edit { font-size: 11px; color: var(--orange-d); margin-left: 2px; }
.daily-date.editable-date:active { background: #fff7f0; border-radius: 4px; }
.daily-date-input { font-size: 13px; font-weight: 700; color: var(--orange); border: 1px solid var(--orange);
  border-radius: 6px; padding: 2px 6px; outline: none; font-family: inherit; background: #fff7f0; }
.daily-time { font-size: 12px; color: var(--sub); }
.daily-count { font-size: 12px; color: var(--sub); margin-left: auto; background: #fff7f0;
  border: 1px solid #ffd9b8; color: var(--orange-d); border-radius: 999px; padding: 2px 8px; }
.daily-del { font-size: 14px; color: var(--sub); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.daily-del:active { background: #fdecec; }
.daily-card-body { padding: 2px 14px 12px; }
.daily-first { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.daily-tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.daily-tags li { font-size: 12px; background: #eef0f3; color: #374151; padding: 4px 9px; border-radius: 6px; }
.daily-tags li.more { background: transparent; color: var(--sub); }

.daily-detail-wrap { border-top: 1px solid #f0f1f3; padding: 12px 14px 14px; background: #fafbfc; }
.daily-detail-wrap.hidden { display: none; }
.daily-detail .theme { background: #fff; box-shadow: none; border: 1px solid var(--line); }

/* ========== 深度分层分析报告样式 ========== */
.theme.deep { padding: 14px 16px; }
.deep-sec { margin: 12px 0 0; }
.sec-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.sec-ico { font-size: 15px; line-height: 1; }
.sec-title { font-size: 15px; font-weight: 800; color: var(--text); }
.sec-p { margin: 0; font-size: 14px; line-height: 1.65; color: #334155; }

/* 对应板块 chips */
.sec-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.sector-chip { font-size: 12.5px; font-weight: 600; background: #eef3ff; color: #2f5fd0; padding: 5px 11px; border-radius: 999px; border: 1px solid #d7e2ff; display: inline-flex; align-items: center; gap: 6px; }
.sector-nm { color: #2f5fd0; }
.sector-arrow { color: #9aa7c4; font-weight: 400; font-size: 11px; }
.sector-east { background: #ff8a3c; color: #fff; padding: 1px 8px; border-radius: 999px; font-weight: 700; font-size: 11.5px; white-space: nowrap; }

/* 分层股票列表 */
.tier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tier-list li { background: #f8f9fb; border: 1px solid #eef0f3; border-radius: 10px; padding: 9px 11px; }
.tier-list.tier-core li { background: #fff5f5; border-color: #f7d7d7; }
.tier-list.tier-mid li { background: #fff8ef; border-color: #f6e3c8; }
.tier-stock { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tier-ico { font-size: 14px; }
.tier-nm { font-weight: 800; font-size: 14.5px; color: var(--text); }
.tier-cd { font-size: 12px; color: #64748b; }
.tier-conf { font-size: 11px; color: #b45309; background: #fff3e0; padding: 1px 7px; border-radius: 999px; margin-left: auto; }
.tier-logic { font-size: 13px; color: #475569; line-height: 1.55; margin-top: 4px; }
.tier-risk { font-size: 12px; color: #c0392b; margin-top: 3px; }

/* 风险提示列表 */
.risk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.risk-list li { font-size: 13px; color: #b45309; line-height: 1.5; background: #fffaf0; border-left: 3px solid #f59e0b; padding: 6px 10px; border-radius: 0 6px 6px 0; }

/* 总结 */
.deep-summary { margin-top: 12px; font-size: 13.5px; font-weight: 600; color: #1e40af; background: #eef2ff; border-radius: 8px; padding: 8px 11px; line-height: 1.55; }

/* 综合风险提示区块 */
.risk-card { border: 1px solid #f3d3cf; background: #fffaf9; margin-top: 14px; padding: 14px 16px; }
.risk-card .risk-title { font-size: 16px; font-weight: 800; color: #b42318; margin: 0 0 10px; display: flex; align-items: center; gap: 6px; }
.risk-card .risk-list li { background: #fff3f1; border-left-color: #e03e2f; color: #9a2c20; }
.risk-card .deep-summary { margin-top: 12px; background: #fdecea; color: #8a4a3d; }
.risk-card > p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #7c3f38; }

/* 对应新闻编号块 */
.related-news { display: flex; flex-direction: column; gap: 5px; margin: 8px 0 2px; padding: 7px 10px; background: #f0f4ff; border-left: 3px solid #3b82f6; border-radius: 0 8px 8px 0; }
.related-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.rel-tag { font-size: 12.5px; font-weight: 700; color: #1d4ed8; white-space: nowrap; }
.rel-src { font-size: 12px; color: #475569; line-height: 1.5; }

/* ===== 复盘页 v2：置顶动态仓位 + 卡片式列表 ===== */
.cache-badge { font-size: 11px; font-weight: 600; color: var(--orange-d); background: #fff7f0;
  border: 1px solid #ffd9b8; border-radius: 999px; padding: 2px 9px; }

/* 置顶动态仓位条 */
.top-position-card { display: flex; align-items: stretch; gap: 14px; background: linear-gradient(135deg, #fff6ed, #fff);
  border: 1px solid #ffd9b8; margin-bottom: 14px; padding: 16px; }
.top-pos-left { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.top-pos-label { font-size: 12px; font-weight: 700; color: var(--sub); display: flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: livePulse 1.6s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.top-pos-value { font-size: 34px; font-weight: 900; color: var(--orange); line-height: 1.15; margin: 4px 0 2px; }
.top-pos-value.pos-up { color: var(--red); }
.top-pos-value.pos-down { color: var(--green); }
.top-pos-sub { font-size: 12px; color: var(--sub); line-height: 1.45; }
.top-pos-right { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center;
  border-left: 1px dashed #ffd9b8; padding-left: 14px; }
.top-kp-label { font-size: 12px; font-weight: 700; color: var(--sub); margin-bottom: 8px; }
.top-kp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.top-kp-chips .kp-chip { font-size: 15px; padding: 4px 12px; }

/* 卡片式复盘列表（收起=日期+仓位，展开=详情） */
.review-card-item { background: var(--card); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 10px; overflow: hidden; cursor: pointer; }
.review-card-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; }
.review-card-date { font-size: 15px; font-weight: 800; color: var(--text); }
.review-card-pos { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--orange);
  background: #fff7f0; border: 1px solid #ffd9b8; border-radius: 999px; padding: 3px 10px; }
.review-card-arrow { font-size: 13px; color: var(--sub); transition: transform .2s; }
.review-card-item.open .review-card-arrow { }
.review-detail-wrap { border-top: 1px solid #f0f1f3; padding: 12px 14px 16px; background: #fafbfc; }
.review-detail-wrap.hidden { display: none; }
.review-detail .card { margin-bottom: 12px; }
.review-detail .core-card { margin-bottom: 12px; }

/* ---- 每日直播复盘：录播转写精简版（富文本排版，观感等同 docx） ---- */
.live-text.plain { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  font-size: 14px; line-height: 1.75; color: var(--text); }
.live-text.rich { white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  font-size: 14px; line-height: 1.75; color: var(--text); }
/* 文档大标题区 */
.lt-head { padding-bottom: 8px; margin-bottom: 10px; border-bottom: 2px solid var(--orange); }
.lt-title { font-size: 16.5px; font-weight: 800; color: var(--text); line-height: 1.4; }
.lt-sub { font-size: 12px; color: var(--sub); line-height: 1.6; margin-top: 3px; }
/* 分节标题 */
.lt-section { margin: 14px 0 8px; font-size: 15.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  border-radius: 8px; padding: 7px 12px; line-height: 1.4; }
/* 要点 / 子要点 / 普通段落 */
.lt-item { margin: 6px 0 0; padding-left: 16px; position: relative; line-height: 1.7; }
.lt-item::before { content: '▸'; position: absolute; left: 0; color: var(--orange); font-weight: 800; }
.lt-subitem { margin: 4px 0 0; padding-left: 28px; position: relative; line-height: 1.7; color: var(--sub); }
.lt-subitem::before { content: '·'; position: absolute; left: 20px; color: var(--sub); font-weight: 800; }
.lt-para { margin: 6px 0 0; line-height: 1.7; }
.lt-space { height: 6px; margin: 0; padding: 0; }
/* 直播复盘内关键个股/板块高亮标签 */
.lt-tag-stock, .lt-tag-sector {
  display: inline-block; font-size: 12.5px; font-weight: 700; line-height: 1.4;
  padding: 1px 7px; margin: 0 2px; border-radius: 6px; vertical-align: baseline;
}
.lt-tag-stock { color: #fff; background: linear-gradient(135deg, #ff4d4f, #d9363e); }   /* 个股：红 */
.lt-tag-sector { color: #fff; background: linear-gradient(135deg, #ff9500, #e8730a); } /* 板块：橙 */
.status.dim { color: var(--sub); }

/* 每晚自动报告提示条（首页顶部） */
.auto-report-bar { border: 1px solid #ffd9b8; background: linear-gradient(135deg, #fff7f0, #fff1e6); }
.auto-report-head { display: flex; align-items: center; gap: 10px; }
.auto-report-badge { font-size: 12px; font-weight: 800; color: #fff; background: var(--orange, #ff6a00);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.auto-report-title { font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.4; }
.auto-report-sub { font-size: 12px; color: var(--sub); margin-top: 6px; line-height: 1.5; }
.auto-report-bar .btn { margin-top: 10px; }

/* ===== 个股分析页 ===== */
.sa-618-row { margin-top: 14px; }
.sa-618-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px;
  color: var(--text); font-weight: 600; margin-bottom: 10px; }
.sa-618-toggle input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--orange); }
.sa-618-dates { display: flex; gap: 12px; padding: 12px; background: #f8f9fa; border-radius: 10px;
  border: 1px solid var(--line); margin-bottom: 10px; }
.sa-date-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.sa-date-field label { font-size: 12px; font-weight: 700; color: var(--sub); }
.sa-date-field input[type=date] { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-size: 14px; color: var(--text); background: #fff; width: 100%; }
.sa-date-field input[type=date]:disabled { background: #f0f0f0; color: #aaa; cursor: not-allowed; }
.sa-loading { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px;
  background: #f8f9fa; border-radius: 10px; font-size: 14px; color: var(--sub); }
.spinner { width: 22px; height: 22px; border: 3px solid #e5e7eb; border-top-color: var(--orange);
  border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.sa-error { margin-top: 12px; padding: 14px; background: #fff0f0; border-radius: 10px;
  border: 1px solid #ffcccc; font-size: 14px; color: var(--red); }
.sa-result { margin-top: 10px; }
.btn.outline { background: #fff; color: var(--orange); border: 1.5px solid var(--orange); }
.btn.outline:active { background: #fff5ec; }
.btn.tiny { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: #ffe9e9; color: #d33; }
.btn.danger:active { background: #ffd6d6; }

/* 我的报告（本机）列表 */
.sa-local { margin-top: 14px; background: var(--card); border-radius: 12px; padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.sa-local-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 8px; }
.sa-local-count { background: var(--orange); color: #fff; border-radius: 10px; padding: 1px 9px; font-size: 13px; }
.sa-local-items { list-style: none; margin: 0; padding: 0; }
.sa-local-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid #f0f1f3; }
.sa-local-item:first-child { border-top: none; }
.sa-local-info { flex: 1; min-width: 0; padding-right: 8px; }
.sa-local-name { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-local-btns { display: flex; gap: 8px; flex-shrink: 0; }
.sa-local-empty { font-size: 13px; color: #999; padding: 8px 0; line-height: 1.5; }

/* APP 内报告全屏查看层 */
.sa-viewer { position: fixed; inset: 0; background: #fff; z-index: 80; display: flex; flex-direction: column; }
.sa-viewer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #eee; background: #fafafa; flex-shrink: 0; }
.sa-viewer-title { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-viewer-frame { flex: 1; width: 100%; border: none; }

/* ===== 个股分析页内子tab ===== */
.sa-subtabs { display: flex; gap: 8px; margin-bottom: 14px; }
.sa-subtab { flex: 1; padding: 10px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 14px; color: var(--sub); cursor: pointer; transition: all .15s; }
.sa-subtab.active { border-color: var(--orange); color: var(--orange); background: #fff6ef; font-weight: 600; }

/* ===== 诊股小W 聊天 ===== */
.sa-ask-wrap { background: var(--card); border-radius: 14px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px; }
.sa-ask-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.sa-ask-badge { background: var(--orange); color: #fff; border-radius: 8px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.sa-ask-tip { font-size: 12px; color: #999; }
.sa-ask-msgs { max-height: 56vh; overflow-y: auto; padding: 4px 2px 12px; display: flex; flex-direction: column; gap: 12px; }
.sa-msg { display: flex; gap: 8px; align-items: flex-start; }
.sa-msg-avatar { width: 30px; height: 30px; border-radius: 50%; background: #f0f1f3; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.sa-msg-bubble { max-width: 78%; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.sa-msg-bot .sa-msg-bubble { background: #f5f6f8; color: var(--text); border-top-left-radius: 2px; }
.sa-msg-user { flex-direction: row-reverse; }
.sa-msg-user .sa-msg-bubble { background: var(--orange); color: #fff; border-top-right-radius: 2px; }
.sa-ask-loading { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #999; padding: 6px 2px; }
.sa-ask-input-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.sa-ask-input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14px; outline: none; font-family: inherit; resize: none; max-height: 120px; line-height: 1.4; }
.sa-ask-input:focus { border-color: var(--orange); }
.sa-ask-send { white-space: nowrap; padding: 11px 18px; }
.sa-ask-error { font-size: 13px; color: var(--red); margin-top: 8px; line-height: 1.5; }
.spinner.small { width: 16px; height: 16px; border-width: 2px; }

/* ===== 股票实验室 ===== */
.lab-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lab-head h2 { margin: 0; font-size: 19px; }
.lab-tag { font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-d)); border-radius: 999px; padding: 3px 10px; }
.lab-input-card { margin-bottom: 14px; }
.lab-stock-input { width: 100%; min-height: 84px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14px; font-family: inherit; outline: none; resize: vertical; box-sizing: border-box; }
.lab-stock-input:focus { border-color: var(--orange); }
.lab-result { display: flex; flex-direction: column; gap: 12px; }
.lab-analysis { border: 1px solid #ffd9b8; background: linear-gradient(135deg, #fff7f0, #fff1e6); }
.lab-analysis-title { font-size: 14px; font-weight: 800; color: var(--orange-d); margin-bottom: 6px; }
.lab-analysis-text { font-size: 14px; line-height: 1.7; color: var(--text); }
.lab-sub-title { font-size: 15px; font-weight: 800; color: var(--text); margin: 4px 0 10px; }
.lab-task-title { margin-top: 16px; }
.lab-candidates .lab-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-chip { font-size: 13px; background: #f2f3f5; border-radius: 8px; padding: 5px 10px; color: var(--text); }
.lab-chip-code { font-size: 11px; color: var(--sub); margin-left: 4px; }
.lab-card { display: flex; gap: 12px; align-items: flex-start; }
.lab-card-idx { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--orange-d)); color: #fff; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.lab-card-main { flex: 1; min-width: 0; }
.lab-card-title { font-size: 16px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lab-code { font-size: 12px; font-weight: 600; color: var(--sub); }
.lab-chg { font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.lab-5day { font-size: 12.5px; color: var(--sub); margin: 4px 0 2px; }
.lab-mini { margin-right: 6px; font-weight: 600; }
.lab-reason { font-size: 13.5px; line-height: 1.7; color: var(--text); margin-top: 4px; }
.lab-reason b { color: var(--orange-d); }
.up { color: #e23b3b; }   /* 涨：红 */
.down { color: #18a058; } /* 跌：绿 */
.flat { color: var(--sub); }
.lab-empty { color: var(--sub); font-size: 14px; }
.lab-time { font-size: 11.5px; color: var(--sub); text-align: right; margin-top: 2px; }
/* ===== 新闻映射页内左右滑动面板 ===== */
.news-subtabs { display: flex; gap: 8px; margin-bottom: 14px; }
.news-subtab { flex: 1; padding: 10px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; font-size: 14px; color: var(--sub); cursor: pointer; transition: all .15s; font-weight: 500; }
.news-subtab.active { border-color: var(--orange); color: var(--orange); background: #fff6ef; font-weight: 700; }

.news-swiper { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.news-swiper::-webkit-scrollbar { display: none; }
.news-swiper-track { display: flex; width: fit-content; }
.news-panel { width: calc(100vw - 28px); max-width: calc(640px - 28px); flex-shrink: 0; scroll-snap-align: start; padding-right: 14px; }
.news-panel:last-child { padding-right: 0; }

/* 每日新闻分析并入新闻页后的面板间距 */
.daily-panel { margin: 16px 0; }

/* ===== 股票实验室：任务列表 / 详情 ===== */
.lab-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.lab-stat-card { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; }
.lab-stat-num { font-size: 20px; font-weight: 800; color: var(--orange-d); }
.lab-stat-label { font-size: 12px; color: var(--sub); margin-top: 2px; }

.lab-list-view { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.lab-task-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transition: transform .08s; }
.lab-task-card:active { transform: scale(0.995); }
.lab-task-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lab-task-date { font-size: 12.5px; color: var(--sub); }
.lab-task-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.lab-status-obs { background: #fff7e6; color: #fa8c16; }
.lab-status-running { background: #e6f7ff; color: #1890ff; }
.lab-status-success { background: #f6ffed; color: #52c41a; }
.lab-status-fail { background: #fff1f0; color: #f5222d; }

.lab-task-body { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lab-task-stocks { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.lab-task-stock { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lab-task-name { font-size: 15px; font-weight: 700; color: var(--text); }
.lab-task-code { font-size: 12px; color: var(--sub); }
.lab-task-gain { font-size: 13px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: #f7f8fa; }
.lab-task-right { text-align: center; min-width: 44px; }
.lab-task-icon { font-size: 22px; }
.lab-task-right-text { font-size: 11px; color: var(--sub); margin-top: 2px; }

.lab-task-foot { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.lab-delete-btn { font-size: 12px; color: var(--sub); background: transparent; border: none; padding: 4px 8px; cursor: pointer; }

.lab-detail-view { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.lab-detail-back { align-self: flex-start; margin-bottom: 4px; }
.lab-detail-body { display: flex; flex-direction: column; gap: 12px; }

.lab-obs-empty { font-size: 13px; color: var(--sub); margin: 8px 0; text-align: center; }
.lab-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.lab-table th { background: #f7f8fa; color: var(--sub); padding: 7px 4px; text-align: center; font-weight: 600; border-bottom: 1px solid var(--line); }
.lab-table td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.lab-table tr:last-child td { border-bottom: none; }
.lab-table-total td { border-top: 1px solid var(--line); background: #fafafa; }

/* 涨跌颜色 */
.up { color: #e23b3b; }
.down { color: #18a058; }
.flat { color: var(--sub); }
