/* ==========================================================================
   龙头 · 情绪
   深色金融面板 / 移动优先 / 无外部依赖
   ========================================================================== */

:root {
  --bg: #070b12;
  --panel: #0e1626;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #e9eff9;
  --muted: #93a2ba;
  --dim: #64748b;
  --accent: #ff6a3d;
  --accent-2: #ff9a6b;
  --gold: #e8b45a;
  --gold-2: #ffd89b;
  --red: #ff5d6c;
  --red-soft: rgba(255, 93, 108, 0.14);
  --green: #39d98a;
  --green-soft: rgba(57, 217, 138, 0.13);
  --blue: #6ea8fe;
  --amber: #f5b942;
  --cyan: #1aa5c9;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --max: 1240px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(255, 106, 61, 0.3); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 18% -10%, rgba(255, 106, 61, 0.16), transparent 60%),
    radial-gradient(760px 500px at 92% 2%, rgba(232, 180, 90, 0.1), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(110, 168, 254, 0.06), transparent 60%),
    linear-gradient(180deg, #080d16 0%, #070b12 45%, #060a10 100%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(closest-side at 50% 0%, #000 0%, transparent 75%);
}

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(7, 11, 18, 0.74);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #1a0d07;
  font-family: "Songti SC", "STSong", serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(145deg, var(--accent-2), var(--accent) 60%, #c2410c);
  box-shadow: 0 6px 20px rgba(255, 106, 61, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.brand-mark.small { width: 26px; height: 26px; border-radius: 8px; font-size: 15px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-size: 16px; letter-spacing: 0.02em; }
.brand-text small { color: var(--dim); font-size: 11px; letter-spacing: 0.04em; white-space: nowrap; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.nav-links { display: inline-flex; gap: 4px; margin-right: 6px; }
.nav-link {
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  transition: 0.2s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.active { color: var(--accent-2); background: rgba(255, 106, 61, 0.12); }

.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.date-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(57, 217, 138, 0.1);
}
.date-pill.stale::before { background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 185, 66, 0.12); }

.icon-btn, .share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s ease;
}
.icon-btn { width: 34px; padding: 0; }
.share-btn { padding: 0 13px; font-size: 12px; }
.icon-btn:hover, .share-btn:hover { color: var(--accent-2); border-color: rgba(255, 106, 61, 0.4); background: rgba(255, 106, 61, 0.08); }
.icon-btn.spin svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 提示 */
.alert {
  display: none;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(245, 185, 66, 0.3);
  border-radius: 12px;
  background: rgba(245, 185, 66, 0.08);
  color: #f7d58b;
  font-size: 13px;
}
.alert.show { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.alert.error { border-color: rgba(255, 93, 108, 0.35); background: rgba(255, 93, 108, 0.08); color: #ffb3ba; }
.alert button { border: 1px solid currentColor; border-radius: 8px; padding: 4px 10px; background: transparent; color: inherit; font-size: 12px; cursor: pointer; }

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 7vw, 82px) 0 26px;
}
.eyebrow { margin: 0 0 14px; color: var(--accent-2); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.14; letter-spacing: -0.03em; font-weight: 800; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #fff4d8 0%, var(--gold-2) 30%, var(--accent-2) 70%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { max-width: 600px; margin: 20px 0 0; color: var(--muted); font-size: clamp(14px, 1.3vw, 16px); line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.primary-btn, .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  transition: 0.2s ease;
}
.primary-btn {
  color: #1a0d07;
  background: linear-gradient(145deg, var(--accent-2), var(--accent) 60%, #c2410c);
  box-shadow: 0 10px 30px rgba(255, 106, 61, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 38px rgba(255, 106, 61, 0.3); }
.ghost-btn { border: 1px solid var(--line-strong); color: var(--muted); background: rgba(255, 255, 255, 0.025); }
.ghost-btn:hover { color: var(--text); border-color: rgba(255, 106, 61, 0.4); background: rgba(255, 106, 61, 0.06); }

.hero-panel {
  position: relative;
  min-height: 300px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(130deg, rgba(255, 106, 61, 0.4), transparent 35%, rgba(232, 180, 90, 0.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.panel-skeleton { display: flex; flex-direction: column; gap: 16px; padding: 6px 4px; }
.panel-skeleton i {
  display: block;
  height: 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.panel-skeleton i:nth-child(2) { width: 82%; }
.panel-skeleton i:nth-child(3) { width: 92%; }
.panel-skeleton i:nth-child(4) { width: 64%; }
.panel-skeleton i:nth-child(5) { width: 76%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 情绪仪表 */
.gauge-board { position: relative; z-index: 1; }
.gauge-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gauge-board-head span { font-size: 15px; font-weight: 700; }
.gauge-board-head small { color: var(--dim); font-size: 11px; }

.gauge-wrap { position: relative; display: flex; align-items: center; justify-content: center; padding: 6px 0 0; }
.gauge-svg { width: 100%; max-width: 300px; height: auto; overflow: visible; }
.gauge-track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 12; stroke-linecap: round; }
.gauge-fill { fill: none; stroke: var(--gauge, var(--accent)); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--gauge, var(--accent)) 45%, transparent)); }
.gauge-tick { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.5; stroke-dasharray: 3 4; }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 14px; text-align: center; pointer-events: none; }
.gauge-center b { font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.gauge-center small { margin-top: 6px; color: var(--muted); font-size: 12px; }
.gauge-center .gauge-delta { margin-top: 4px; color: var(--dim); font-size: 11px; }

.gauge-pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.pill.stage { border-color: color-mix(in srgb, var(--pill) 40%, transparent); background: color-mix(in srgb, var(--pill) 14%, transparent); color: var(--pill); }
.pill.pass { border-color: rgba(255, 93, 108, 0.3); background: var(--red-soft); color: #ffb3ba; }
.pill.fail { border-color: rgba(57, 217, 138, 0.28); background: var(--green-soft); color: #8ef0bd; }

.gauge-hero { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.8; text-align: center; }
.gauge-hero b { color: var(--text); font-variant-numeric: tabular-nums; }

/* 指标条 */
.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.stat-card { padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.025); }
.stat-label { color: var(--dim); font-size: 11px; letter-spacing: 0.04em; }
.stat-value { margin-top: 5px; font-size: 23px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-value small { margin-left: 2px; color: var(--dim); font-size: 11px; font-weight: 500; }
.stat-value.up { color: #ff8e99; }
.stat-value.down { color: #70e6a8; }
.stat-delta { margin-top: 4px; color: var(--muted); font-size: 11px; }
.stat-delta.up { color: #ff8e99; }
.stat-delta.down { color: #70e6a8; }

/* 分区标题 */
.section { margin-top: clamp(52px, 7vw, 84px); scroll-margin-top: 84px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.kicker { margin: 0 0 6px; color: var(--accent-2); font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; }
.section-head h2 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -0.02em; }
.section-note { max-width: 540px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; text-align: right; }

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.032), transparent 55%), rgba(14, 22, 38, 0.76);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-head h3 { margin: 0; font-size: 15px; }
.panel-head p { margin: 4px 0 0; color: var(--dim); font-size: 11px; line-height: 1.6; }
.tiny-tag { flex: 0 0 auto; padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; white-space: nowrap; }
.panel-foot { margin: 13px 0 0; color: var(--dim); font-size: 10.5px; line-height: 1.65; }

/* 分项 + 复盘 */
.subs-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 14px; }
.sub-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.sub-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 70px; gap: 10px; align-items: center; }
.sub-name { color: var(--muted); font-size: 12px; }
.sub-name small { display: block; color: var(--dim); font-size: 9.5px; }
.sub-track { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.sub-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(255, 106, 61, 0.5), var(--accent)); transition: width 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.sub-row.fail .sub-fill { background: linear-gradient(90deg, rgba(110, 168, 254, 0.45), var(--blue)); }
.sub-track .pass-mark { position: relative; display: block; height: 0; }
.sub-row { position: relative; }
.sub-score { text-align: right; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.sub-row.pass .sub-score { color: var(--accent-2); }
.sub-row.fail .sub-score { color: #8bb8ff; }
.sub-raw { grid-column: 2 / -1; margin-top: -6px; color: var(--dim); font-size: 10px; }

.review-list { margin: 14px 0 0; padding: 0 0 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.review-list li { margin: 6px 0; overflow-wrap: anywhere; }
.review-list b { color: var(--text); }
.advice-box {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--stage, var(--accent)) 35%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--stage, var(--accent)) 10%, transparent);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.8;
}
.advice-box b { color: var(--stage, var(--accent-2)); }

/* 龙头卡 */
.special-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.special-card {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(320px 160px at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%),
    var(--panel);
  overflow: hidden;
  animation: card-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.special-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--c), transparent 70%); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.special-label { color: var(--c); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.special-name { margin-top: 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.special-name b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.special-name span { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.special-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.badge.hot { border-color: rgba(255, 93, 108, 0.28); background: var(--red-soft); color: #ffb3ba; }
.badge.gold { border-color: rgba(232, 180, 90, 0.28); background: rgba(232, 180, 90, 0.08); color: var(--gold-2); }
.special-meta { margin-top: 12px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.special-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.special-empty { color: var(--dim); font-size: 12px; margin-top: 8px; }

/* 高度分布 + 龙头榜 */
.ladder-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 14px; margin-top: 14px; }
.height-list { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.height-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 28px; gap: 10px; align-items: center; }
.height-level { color: var(--gold-2); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.height-track { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.height-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(232, 180, 90, 0.4), var(--gold)); }
.height-row.top .height-fill { background: linear-gradient(90deg, rgba(255, 93, 108, 0.55), var(--red)); }
.height-count { color: var(--muted); font-family: var(--mono); font-size: 11px; text-align: right; }
.height-names { grid-column: 2 / -1; margin-top: -4px; overflow: hidden; color: var(--dim); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.leader-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.leader-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: 0.2s ease;
}
.leader-row:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.035); }
.leader-row.active { border-color: rgba(255, 106, 61, 0.4); background: rgba(255, 106, 61, 0.06); }
.leader-rank { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.leader-name { min-width: 0; }
.leader-name b { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.leader-name small { display: block; overflow: hidden; color: var(--dim); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.leader-window { color: var(--gold-2); font-size: 11.5px; white-space: nowrap; }
.leader-theme { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.leader-score { text-align: right; font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--accent-2); }

.leader-detail { margin-top: 12px; padding: 14px 16px; border: 1px solid rgba(255, 106, 61, 0.25); border-radius: 12px; background: rgba(255, 106, 61, 0.05); animation: card-in 0.35s ease both; }
.leader-detail h4 { margin: 0 0 8px; font-size: 14px; }
.leader-detail h4 span { margin-left: 6px; color: var(--dim); font-family: var(--mono); font-size: 11px; font-weight: 500; }
.leader-detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.leader-detail ul { margin: 0; padding-left: 15px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.leader-detail li.risk { color: #d8a64a; }
.leader-subs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 4px; }
.leader-sub small { display: block; color: var(--dim); font-size: 9.5px; }
.leader-sub b { font-family: var(--mono); font-size: 13px; color: var(--text); }
.leader-sub-track { height: 3px; margin-top: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.leader-sub-track i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* 昨日连板 */
.chain-panel { margin-top: 14px; }
.chain-summary { display: flex; gap: 14px; flex: 0 0 auto; }
.chain-summary div { text-align: right; }
.chain-summary b { display: block; font-family: var(--mono); font-size: 15px; }
.chain-summary small { color: var(--dim); font-size: 9.5px; }
.chain-summary b.up { color: #ff8e99; }
.chain-summary b.down { color: #70e6a8; }
.chain-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chain-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--muted);
  font-size: 11px;
}
.chain-chip b { font-family: var(--mono); font-size: 10px; }
.chain-chip.up { border-color: rgba(255, 93, 108, 0.3); background: var(--red-soft); }
.chain-chip.up b, .chain-chip.up-soft b { color: #ff9aa4; }
.chain-chip.up-soft { border-color: rgba(255, 93, 108, 0.16); }
.chain-chip.down { border-color: rgba(57, 217, 138, 0.3); background: var(--green-soft); }
.chain-chip.down b, .chain-chip.down-soft b { color: #75e6aa; }
.chain-chip.down-soft { border-color: rgba(57, 217, 138, 0.16); }
.chain-chip .chain-status { color: var(--dim); font-size: 9.5px; }
.chain-empty { color: var(--dim); font-size: 12px; }

/* 题材 */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.theme-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  animation: card-in 0.5s ease both;
  animation-delay: var(--d, 0ms);
}
.theme-card.main { border-color: rgba(255, 106, 61, 0.32); background: radial-gradient(260px 120px at 100% 0%, rgba(255, 106, 61, 0.12), transparent 70%), rgba(255, 255, 255, 0.025); }
.theme-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.theme-head b { font-size: 15px; }
.theme-card.main .theme-head b { color: var(--accent-2); }
.theme-head span { color: var(--dim); font-family: var(--mono); font-size: 10.5px; }
.theme-bar { height: 6px; margin-top: 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.theme-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, rgba(255, 106, 61, 0.45), var(--accent)); }
.theme-card.main .theme-bar i { background: linear-gradient(90deg, rgba(255, 93, 108, 0.55), var(--red)); }
.theme-meta { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.theme-meta b { color: var(--text); }

/* 情绪周期 */
.cycle-panel { padding-bottom: 14px; }
.cycle-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; color: var(--muted); font-size: 10.5px; }
.cycle-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cycle-legend i { width: 8px; height: 8px; border-radius: 50%; }
.cycle-chart-wrap { display: flex; gap: 8px; margin-top: 10px; }
.cycle-axis { display: flex; flex-direction: column; justify-content: space-between; height: 200px; padding: 0 0 22px; color: var(--dim); font-family: var(--mono); font-size: 9px; text-align: right; }
.cycle-chart { position: relative; flex: 1; height: 200px; border-bottom: 1px solid var(--line); }
.cycle-svg { position: absolute; inset: 0 0 22px; width: 100%; height: 178px; overflow: visible; }
.cycle-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.cycle-area { fill: url(#cycleFill); opacity: 0.9; }
.cycle-pass { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1; stroke-dasharray: 4 5; }
.cycle-dot { stroke: var(--bg); stroke-width: 2; cursor: pointer; transition: r 0.15s; }
.cycle-dot:hover, .cycle-dot.active { r: 6; }
.cycle-label { position: absolute; bottom: 0; transform: translateX(-50%); color: var(--dim); font-family: var(--mono); font-size: 8.5px; white-space: nowrap; pointer-events: none; }
.cycle-hit { position: absolute; top: 0; width: 32px; height: 178px; transform: translateX(-50%); cursor: pointer; }
.cycle-hits { position: absolute; inset: 0 0 22px; }
.cycle-detail { margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); font-size: 12px; color: var(--muted); line-height: 1.8; }
.cycle-detail b { color: var(--text); font-variant-numeric: tabular-nums; }
.cycle-detail .stage-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 10.5px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); margin-right: 6px; }

.stage-panel { margin-top: 14px; }
.stage-table { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.stage-cell { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.stage-cell .sc-grade { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; }
.stage-cell .sc-grade i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.stage-cell .sc-row { margin-top: 5px; color: var(--muted); font-size: 10.5px; }
.stage-cell .sc-row b { color: var(--text); font-family: var(--mono); font-size: 11px; }
.stage-cell .sc-row b.up { color: #ff8e99; }
.stage-cell .sc-row b.down { color: #70e6a8; }
.stage-empty { color: var(--dim); font-size: 12px; margin-top: 12px; }

/* 口径 */
.method-details { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.018); }
.method-details summary { padding: 16px 20px; color: var(--muted); font-size: 12.5px; cursor: pointer; list-style: none; }
.method-details summary::-webkit-details-marker { display: none; }
.method-details summary::after { content: " +"; color: var(--accent); }
.method-details[open] summary::after { content: " −"; }
.method-body { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; padding: 0 20px 20px; }
.method-col h4 { margin: 14px 0 5px; color: var(--text); font-size: 12.5px; }
.method-col h4:first-child { margin-top: 0; }
.method-col p, .method-col li { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.method-col ul { margin: 0; padding-left: 15px; }
.method-col table { width: 100%; border-collapse: collapse; font-size: 11px; color: var(--muted); }
.method-col td, .method-col th { padding: 3px 4px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.method-col th { color: var(--dim); }

/* FAQ */
.faq-list { display: grid; gap: 9px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); }
.faq-item summary { padding: 14px 16px; color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: " +"; float: right; color: var(--accent); font-weight: 400; }
.faq-item[open] summary::after { content: " −"; }
.faq-item p { margin: 0; padding: 0 16px 16px; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.faq-item strong { color: var(--text); }

/* 页脚 */
.footer { margin-top: clamp(60px, 8vw, 100px); padding: 28px 0 44px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.14); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.footer p { max-width: 620px; margin: 0; color: var(--dim); font-size: 10.5px; line-height: 1.8; }
.footer-meta { text-align: right; }
.disclaimer { margin-top: 4px !important; color: #7d6a48 !important; }

.to-top {
  position: fixed;
  right: max(16px, calc((100vw - var(--max)) / 2));
  bottom: 20px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(14, 22, 38, 0.9);
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.25s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { color: var(--accent-2); border-color: rgba(255, 106, 61, 0.4); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  max-width: calc(100vw - 32px);
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(14, 22, 38, 0.96);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { margin: 30px auto; max-width: 600px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); text-align: center; }

/* 响应式 */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 32px; }
  .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage-table { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 42px; }
  .hero-panel { min-height: 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-note { max-width: none; text-align: left; }
  .subs-grid, .ladder-grid { grid-template-columns: 1fr; }
  .special-grid { grid-template-columns: 1fr; }
  .method-body { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
  .nav-links { display: none; }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 28px); }
  .topbar { padding: 11px 14px; }
  .brand-text small { display: none; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 19px; }
  .date-pill { height: 32px; padding: 0 10px; font-size: 11px; }
  .icon-btn { width: 32px; height: 32px; }
  .share-btn { width: 32px; height: 32px; padding: 0; }
  .share-btn span { display: none; }
  .hero { padding: 32px 0 18px; gap: 24px; }
  .hero h1 { font-size: clamp(32px, 8.6vw, 44px); }
  .lede { margin-top: 14px; line-height: 1.8; }
  .hero-actions { margin-top: 20px; }
  .primary-btn, .ghost-btn { flex: 1 1 auto; min-height: 42px; padding: 0 14px; font-size: 13px; }
  .hero-panel { padding: 18px; border-radius: 16px; }
  .gauge-center b { font-size: 46px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { padding: 12px 14px; }
  .stat-value { font-size: 20px; }
  .sub-row { grid-template-columns: 84px minmax(0, 1fr) 52px; gap: 8px; }
  .leader-row { grid-template-columns: 22px minmax(0, 1fr) 70px 48px; }
  .leader-theme { display: none; }
  .leader-detail-cols { grid-template-columns: 1fr; }
  .chain-summary { flex-direction: row; gap: 12px; }
  .chain-summary div { text-align: left; }
  .theme-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .theme-card { padding: 13px 14px; }
  .theme-head b { font-size: 13.5px; }
  .cycle-axis, .cycle-chart { height: 170px; }
  .cycle-label { font-size: 7.5px; }
  .stage-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .special-name b { font-size: 22px; }
  .method-body { padding: 0 14px 16px; }
  .method-details summary { padding: 13px 14px; }
}

@media (max-width: 430px) {
  .theme-grid { grid-template-columns: 1fr; }
  .cycle-label { display: none; }
  .special-grid { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (prefers-color-scheme: light) {
  :root { color-scheme: dark; }
}

/* --------------------------------------------------------------------------
   iPhone / iPad 适配
   -------------------------------------------------------------------------- */
html {
  -webkit-tap-highlight-color: transparent;
}

@supports (-webkit-touch-callout: none) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .topbar {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }

  .footer {
    padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
  }
}
