/* ============================================================
   许愿算法 v1.0 · 样式
   深炭底 + 香槟金，P/E/L/底 四色体系
   ============================================================ */

:root {
  --bg: #07080b;
  --bg-2: #0b0d12;
  --panel: rgba(15, 17, 23, .86);
  --panel-2: #12151c;
  --panel-3: #171b24;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .14);
  --ink: #efebe2;
  --ink-2: #b9b4a8;
  --muted: #7b7d88;
  --gold: #e2b96c;
  --gold-2: #f6dda9;
  --gold-dim: rgba(226, 185, 108, .13);
  --red: #c4422f;
  --p: #5fd3a0;
  --e: #79aeff;
  --l: #ffc36b;
  --b: #a98bff;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(226, 185, 108, .28); color: #fff; }

/* ---------------- 背景 ---------------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; transform: translateZ(0); contain: strict; }
.bg-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 90vh;
  background:
    radial-gradient(46% 58% at 22% 6%, rgba(226, 185, 108, .14), transparent 62%),
    radial-gradient(40% 50% at 82% 0%, rgba(120, 90, 200, .10), transparent 66%),
    radial-gradient(60% 40% at 50% 100%, rgba(30, 60, 90, .18), transparent 70%);
  filter: blur(8px);
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 78% 60% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 78% 60% at 50% 0%, #000 30%, transparent 78%);
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 11, .95);
}
.brand { display: flex; align-items: center; gap: 12px; }
.seal {
  display: grid; place-items: center;
  width: 34px; height: 38px; flex: none;
  color: #1a0f08; background: linear-gradient(160deg, var(--gold-2), #c99a45);
  border-radius: 5px;
  box-shadow: 0 4px 14px rgba(226, 185, 108, .22), inset 0 0 0 1px rgba(255, 255, 255, .35);
  transform: rotate(-3deg);
}
.seal svg { width: 84%; height: 84%; display: block; }
.seal.small { width: 26px; height: 29px; border-radius: 4px; }
.seal.small svg { width: 86%; height: 86%; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-txt b { font-size: 15px; letter-spacing: .04em; }
.brand-txt span { font-size: 10.5px; color: var(--muted); letter-spacing: .16em; }

.top-right { display: flex; align-items: center; gap: 14px; }
.top-note {
  font-size: 11px; color: var(--muted); letter-spacing: .08em;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 99px;
}
.seed-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 99px;
  background: rgba(255, 255, 255, .03);
}
.seed-chip span { font-size: 9px; letter-spacing: .18em; color: var(--muted); }
.seed-chip code { font-family: var(--mono); font-size: 11.5px; color: var(--gold-2); letter-spacing: .06em; }

/* ---------------- 页容器 ---------------- */
.page { max-width: 1380px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 40px; }

/* ---------------- Hero ---------------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 392px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding: clamp(44px, 6vw, 78px) 0 clamp(30px, 4vw, 48px);
}
.kicker {
  font-size: 10.5px; letter-spacing: .34em; color: var(--gold);
  text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.04; letter-spacing: -.035em;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal; color: var(--gold-2);
  position: relative; white-space: nowrap;
}
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .38em;
  background: linear-gradient(90deg, rgba(226, 185, 108, .26), rgba(226, 185, 108, 0));
  z-index: -1;
}
.lede {
  margin-top: 22px; max-width: 610px;
  font-size: 14.5px; line-height: 1.9; color: var(--ink-2);
}
.lede b { color: var(--ink); font-weight: 600; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-chips li {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--ink-2);
  padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 99px; background: rgba(255, 255, 255, .022);
}
.hero-chips li::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
}

/* 因子卡片 */
.card {
  background: linear-gradient(168deg, rgba(22, 25, 33, .92), rgba(11, 13, 18, .92));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.fm { padding: 20px; }
.fm-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; }
.fm-head h3 { font-size: 13px; letter-spacing: .1em; }
.fm-head span { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.fm-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center; gap: 11px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.fm-row > b {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 7px; font-size: 12px; font-weight: 700;
  font-family: var(--mono);
}
.fm-row strong { display: block; font-size: 12.5px; font-weight: 600; }
.fm-row small { display: block; font-size: 10px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.fm-row i {
  font-style: normal; font-size: 9.5px; color: var(--muted);
  letter-spacing: .06em; white-space: nowrap;
}
.k-p > b { color: var(--p); background: rgba(95, 211, 160, .12); }
.k-e > b { color: var(--e); background: rgba(121, 174, 255, .12); }
.k-l > b { color: var(--l); background: rgba(255, 195, 107, .12); }
.k-b > b { color: var(--b); background: rgba(169, 139, 255, .12); }
.k-k > b { color: #ff9d6a; background: rgba(255, 157, 106, .12); }
.fm-arrow {
  position: relative; height: 18px;
}
.fm-arrow::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 6px; width: 1px;
  background: linear-gradient(var(--line-2), transparent);
}
.fm-arrow::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--line-2);
}
.fm-out {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 10px;
  background: linear-gradient(120deg, rgba(226, 185, 108, .12), rgba(226, 185, 108, .02));
  border: 1px solid rgba(226, 185, 108, .22);
}
.fm-out span { font-size: 12px; color: var(--gold-2); letter-spacing: .1em; }
.fm-out small { font-size: 10px; color: var(--ink-2); }

/* ---------------- 数据源状态条 ---------------- */
.databar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-bottom: 26px; padding: 11px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .022);
  transition: border-color .25s, background .25s;
}
.databar[data-state="ok"] { border-color: rgba(95, 211, 160, .22); background: rgba(95, 211, 160, .035); }
.databar[data-state="stale"] { border-color: rgba(226, 185, 108, .32); background: rgba(226, 185, 108, .05); }
.databar[data-state="error"] { border-color: rgba(224, 122, 106, .34); background: rgba(224, 122, 106, .05); }

.db-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.db-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--muted); transition: background .25s;
}
.databar[data-state="ok"] .db-dot { background: var(--p); box-shadow: 0 0 10px var(--p); }
.databar[data-state="stale"] .db-dot { background: var(--gold); box-shadow: 0 0 10px rgba(226, 185, 108, .6); }
.databar[data-state="error"] .db-dot { background: #e07a6a; box-shadow: 0 0 10px rgba(224, 122, 106, .6); }
.databar[data-state="loading"] .db-dot { background: var(--gold); animation: pulse 1.1s ease-in-out infinite; }

.db-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.db-text b { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.db-text span { font-size: 10px; color: var(--muted); }
.db-side { display: flex; align-items: center; gap: 10px; }
.db-updated { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }

.db-hint {
  display: none; width: 100%; margin-top: 2px;
  padding-top: 10px; border-top: 1px dashed rgba(224, 122, 106, .3);
}
.databar[data-state="error"] .db-hint { display: block; }
.db-hint b { font-size: 10.5px; color: #e2a08f; }
.db-hint p { font-size: 10.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.7; }
.db-hint code {
  font-family: var(--mono); font-size: 10px; color: var(--gold-2);
  background: rgba(255, 255, 255, .06); padding: 1px 5px; border-radius: 3px;
}

/* ---------------- 工作区：输入 / 输出分区 ---------------- */
.workspace {
  display: grid; grid-template-columns: 396px minmax(0, 1fr);
  gap: 34px; align-items: stretch;
}
.zone { position: relative; min-width: 0; }
.zone-in { align-self: stretch; }
.zone-out::before {
  content: ""; position: absolute; left: -18px; top: -4px; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 6%, var(--line) 94%, transparent);
}
.zone-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; padding: 0 2px;
}
.zh-left { display: flex; align-items: center; gap: 9px; }
.zh-left h2 { font-size: 15px; letter-spacing: .06em; }
.zone-tag {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em;
  color: var(--gold); padding: 2px 7px; border-radius: 4px;
  border: 1px solid rgba(226, 185, 108, .32); background: rgba(226, 185, 108, .07);
}
.zone-tag.out { color: var(--e); border-color: rgba(121, 174, 255, .32); background: rgba(121, 174, 255, .07); }
.zone-head > p { font-size: 10px; color: var(--muted); text-align: right; line-height: 1.5; }

.zone-in .panel {
  border-top: 2px solid rgba(226, 185, 108, .42);
  background: linear-gradient(180deg, rgba(226, 185, 108, .05), rgba(15, 17, 23, .88) 140px);
}
.zone-in .panel-head h2 { color: var(--gold-2); }

/* ---------------- 面板 ---------------- */
.panel {
  position: sticky; top: 96px;
  max-height: calc(100vh - 124px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #14171e, #0f1117 60%, #0d0f14);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -34px rgba(0, 0, 0, .95);
  overflow: hidden;
}
.panel-head { padding: 18px 18px 12px; }
.panel-head h2 { font-size: 14px; letter-spacing: .06em; }
.panel-head p { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

.gametabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 0 18px; 
}
.gametabs button {
  padding: 9px 2px; font-size: 12px; color: var(--ink-2);
  background: rgba(255, 255, 255, .028);
  border: 1px solid transparent; border-radius: 9px;
  transition: .18s;
  white-space: nowrap;
}
.gametabs button:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.gametabs button.on {
  color: #1a1206; font-weight: 600;
  background: linear-gradient(160deg, var(--gold-2), #d3a555);
  box-shadow: 0 4px 14px -4px rgba(226, 185, 108, .5);
}
.game-note {
  font-size: 10px; color: var(--muted); letter-spacing: .05em;
  padding: 8px 18px 0; font-family: var(--mono);
}

.subtabs {
  display: flex; gap: 2px; padding: 12px 18px 0;
  border-bottom: 1px solid var(--line);
}
.subtabs button {
  position: relative; padding: 7px 10px 9px;
  font-size: 11.5px; color: var(--muted);
  background: none; border: 0; transition: color .18s;
}
.subtabs button:hover { color: var(--ink-2); }
.subtabs button.on { color: var(--gold-2); }
.subtabs button.on::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 1.5px;
  background: var(--gold); border-radius: 2px;
  box-shadow: 0 0 10px rgba(226, 185, 108, .5);
}

.panes { flex: 1; overflow-y: auto; padding: 16px 18px 4px; scrollbar-width: thin; }
.panes::-webkit-scrollbar { width: 6px; }
.panes::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 3px; }
.pane { display: none; }
.pane.on { display: block; animation: fadeUp .28s ease; }

/* 表单 */
.field { display: block; margin-bottom: 15px; }
.field > span {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 11.5px; color: var(--ink-2); margin-bottom: 6px; letter-spacing: .03em;
}
.field > span i { font-style: normal; font-size: 9.5px; color: var(--muted); }
input[type="text"], input[type="number"], textarea, select {
  width: 100%; padding: 9px 11px;
  color: var(--ink); font-size: 12.5px;
  background: rgba(5, 6, 9, .7);
  border: 1px solid var(--line); border-radius: 9px;
  transition: border-color .18s, box-shadow .18s;
  font-variant-numeric: tabular-nums;
}
textarea { resize: vertical; line-height: 1.65; font-family: var(--mono); font-size: 11.5px; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: rgba(226, 185, 108, .5);
  box-shadow: 0 0 0 3px rgba(226, 185, 108, .1);
}
input::placeholder, textarea::placeholder { color: #55575f; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.with-btn { display: flex; gap: 6px; }
.with-btn input { flex: 1; min-width: 0; }
.hint { display: block; font-size: 9.5px; color: var(--muted); margin-top: 5px; line-height: 1.55; }
.hint.warn { color: #b08d5f; }
.hint b { color: #d3ad72; }
.btnrow { display: flex; gap: 6px; margin-top: 7px; }

.mini {
  padding: 6px 10px; font-size: 10.5px; color: var(--ink-2);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 7px; transition: .18s; white-space: nowrap;
}
.mini:hover { color: var(--ink); background: rgba(255, 255, 255, .08); border-color: var(--line-2); }
.mini.block { width: 100%; margin-top: 6px; padding: 8px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips button {
  padding: 5px 10px; font-size: 10.5px; color: var(--ink-2);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  border-radius: 99px; transition: .16s;
}
.chips button:hover { border-color: var(--line-2); color: var(--ink); }
.chips button.on {
  color: #17200f; font-weight: 600; border-color: transparent;
  background: linear-gradient(150deg, #9fdcb8, #5fd3a0);
}

/* 运气源行 */
.sources { display: flex; flex-direction: column; gap: 6px; }
.src-row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) 44px 22px;
  gap: 5px; align-items: center;
}
.src-row input { padding: 7px 8px; font-size: 11px; }
.src-row input.days { text-align: center; font-family: var(--mono); }
.src-row .del {
  width: 22px; height: 26px; padding: 0; line-height: 1;
  color: var(--muted); background: none; border: 0; font-size: 15px;
  border-radius: 5px;
}
.src-row .del:hover { color: #e07a6a; background: rgba(224, 122, 106, .1); }

.rules { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rules li {
  position: relative; padding-left: 13px;
  font-size: 11px; color: var(--ink-2); line-height: 1.65;
}
.rules li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 4px; height: 4px; border-radius: 1px; background: var(--b);
}
.rules b { color: var(--ink); font-weight: 600; }

/* 口诀 K 面板 */
.switch { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 2px 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: relative; flex: none; width: 34px; height: 19px; border-radius: 99px;
  background: rgba(255, 255, 255, .09); border: 1px solid var(--line); transition: .2s;
}
.switch .track::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #8a8c96; transition: .2s;
}
.switch input:checked + .track { background: rgba(255, 157, 106, .22); border-color: rgba(255, 157, 106, .45); }
.switch input:checked + .track::after { transform: translateX(15px); background: #ff9d6a; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(255, 157, 106, .18); }
.switch input:disabled + .track { opacity: .38; }
.switch b { font-size: 11px; font-weight: 500; color: var(--ink-2); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; padding: 0; border: 0; border-radius: 2px;
  background: linear-gradient(90deg, #ff9d6a var(--v, 60%), rgba(255, 255, 255, .08) var(--v, 60%));
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #ff9d6a; border: 2px solid #12141a;
  box-shadow: 0 0 0 1px rgba(255, 157, 106, .5); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: #ff9d6a;
  border: 2px solid #12141a; cursor: pointer;
}

.kdefs { display: flex; flex-direction: column; gap: 4px; max-height: 252px; overflow-y: auto; padding-right: 3px; }
.kdefs::-webkit-scrollbar { width: 5px; }
.kdefs::-webkit-scrollbar-thumb { background: rgba(255, 157, 106, .25); border-radius: 3px; }
.kdef {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255, 255, 255, .02); cursor: pointer; transition: .16s;
}
.kdef:hover { border-color: rgba(255, 157, 106, .25); }
.kdef input { margin: 2px 0 0; accent-color: #ff9d6a; flex: none; }
.kdef span { min-width: 0; }
.kdef b { display: block; font-size: 10.5px; color: var(--ink); font-weight: 600; }
.kdef i { display: block; font-style: normal; font-size: 9.5px; color: var(--muted); line-height: 1.55; margin-top: 1px; }
.kdef:has(input:checked) { border-color: rgba(255, 157, 106, .3); background: rgba(255, 157, 106, .06); }

.locked-note { display: none; }
.pane.locked > *:not(.locked-note) { display: none; }
.pane.locked > .locked-note { display: block; }
.subtabs button.locked { opacity: .45; }
.subtabs button.locked.on { opacity: .8; }

/* 操作区 */
.actions {
  display: flex; gap: 8px; padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(10, 12, 16, .96), rgba(10, 12, 16, .5));
}
.primary {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 11px 14px; border: 0; border-radius: 11px;
  background: linear-gradient(150deg, var(--gold-2), #d8aa54 60%, #c19240);
  color: #191103; font-size: 14px; font-weight: 700; letter-spacing: .12em;
  box-shadow: 0 10px 26px -12px rgba(226, 185, 108, .8), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .16s, box-shadow .16s;
}
.primary small { font-size: 8.5px; font-weight: 500; letter-spacing: .06em; opacity: .62; }
.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(226, 185, 108, .9), inset 0 1px 0 rgba(255, 255, 255, .5); }
.primary:active { transform: translateY(0); }
.primary:disabled { opacity: .5; cursor: progress; transform: none; }
.ghost {
  padding: 11px 13px; font-size: 11px; color: var(--ink-2);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2);
  border-radius: 11px; transition: .18s; white-space: nowrap;
}
.ghost:hover { color: var(--ink); border-color: rgba(226, 185, 108, .4); background: rgba(226, 185, 108, .06); }

/* ---------------- 右栏 ---------------- */
.stream { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* 流水线 */
.funnel-card { padding: 20px 22px 16px; scroll-margin-top: 84px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-head h2 { font-size: 15px; letter-spacing: .05em; }
.card-head h3 { font-size: 12.5px; letter-spacing: .05em; }
.card-head p { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.card-head.tight { padding-bottom: 12px; border-bottom: 1px solid var(--line); }

.fstats { display: flex; gap: 20px; }
.fstats div { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.fstats b { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--gold-2); letter-spacing: .02em; }
.fstats span { font-size: 9px; color: var(--muted); letter-spacing: .08em; }

.layers { margin-top: 16px; display: flex; flex-direction: column; gap: 1px; }
.layers-empty { font-size: 11px; color: var(--muted); padding: 22px 0; text-align: center; }

.ghead {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 0 6px;
  font-size: 10px; letter-spacing: .16em; color: var(--muted);
}
.ghead::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ghead b {
  display: grid; place-items: center; width: 17px; height: 17px;
  border-radius: 4px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0;
}
.ghead.p b { color: var(--p); background: rgba(95, 211, 160, .12); }
.ghead.e b { color: var(--e); background: rgba(121, 174, 255, .12); }
.ghead.l b { color: var(--l); background: rgba(255, 195, 107, .12); }
.ghead.k b { color: #ff9d6a; background: rgba(255, 157, 106, .12); }
.ghead.o b { color: var(--gold); background: var(--gold-dim); }
.ghead i { font-style: normal; font-size: 9px; color: #565862; letter-spacing: .04em; }

.layer {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 128px 102px;
  align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 8px;
  opacity: 1;
  transition: background .2s, box-shadow .2s;
  scroll-margin-top: 92px;
}
.layer.on { opacity: 1; }
.layer:hover { background: rgba(255, 255, 255, .025); }
.layer.live { background: rgba(226, 185, 108, .07); box-shadow: inset 2px 0 0 var(--gold); }
.layer.p.live { background: rgba(95, 211, 160, .07); box-shadow: inset 2px 0 0 var(--p); }
.layer.e.live { background: rgba(121, 174, 255, .07); box-shadow: inset 2px 0 0 var(--e); }
.layer.l.live { background: rgba(255, 195, 107, .07); box-shadow: inset 2px 0 0 var(--l); }
.layer.k.live { background: rgba(255, 157, 106, .07); box-shadow: inset 2px 0 0 #ff9d6a; }
.layer.o.live { background: rgba(226, 185, 108, .08); box-shadow: inset 2px 0 0 var(--gold); }
.layer .lval.idle { color: #474951; }
.layer .code {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 0; text-align: center; border-radius: 5px;
}
.layer.p .code { color: var(--p); background: rgba(95, 211, 160, .1); }
.layer.e .code { color: var(--e); background: rgba(121, 174, 255, .1); }
.layer.l .code { color: var(--l); background: rgba(255, 195, 107, .1); }
.layer.k .code { color: #ff9d6a; background: rgba(255, 157, 106, .1); }
.layer.o .code { color: var(--gold); background: var(--gold-dim); }

.layer.scan .lbar { visibility: hidden; }
.layer .lname { min-width: 0; }
.layer .lname b { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); }
.layer .lname small {
  display: block; font-size: 9.5px; color: #6a6c76; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lbar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.lbar i {
  display: block; height: 100%; width: 0; border-radius: 2px;
  transition: width .7s cubic-bezier(.22, .8, .28, 1);
}
.layer.p .lbar i { background: linear-gradient(90deg, rgba(95, 211, 160, .35), var(--p)); }
.layer.e .lbar i { background: linear-gradient(90deg, rgba(121, 174, 255, .35), var(--e)); }
.layer.l .lbar i { background: linear-gradient(90deg, rgba(255, 195, 107, .35), var(--l)); }
.layer.k .lbar i { background: linear-gradient(90deg, rgba(255, 157, 106, .35), #ff9d6a); }
.layer .lval {
  font-family: var(--mono); font-size: 10px; text-align: right;
  color: var(--muted); letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.layer.cut .lval { color: #d9a06f; }
.layer.scan .lval { color: #8fa3bd; font-family: var(--sans); font-size: 9.5px; }

.drawline {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding-top: 13px;
  border-top: 1px dashed rgba(226, 185, 108, .22);
}
.drawline span {
  font-size: 9.5px; letter-spacing: .2em; color: var(--gold);
  padding: 3px 8px; border: 1px solid rgba(226, 185, 108, .3); border-radius: 4px;
}
.drawline p { font-size: 10.5px; color: var(--ink-2); }
.drawline.flash { animation: flash 1s ease; }

/* 签文区头 */
.stream-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 6px; }
.stream-head h2 { font-size: 16px; letter-spacing: .05em; }
.stream-head p { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.seedbox { display: flex; align-items: center; gap: 7px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.seedbox > span { font-size: 8.5px; letter-spacing: .18em; color: var(--muted); }
.seedbox code {
  font-family: var(--mono); font-size: 11px; color: var(--gold-2);
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(255, 255, 255, .025); letter-spacing: .08em;
}

/* 签卡 */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); gap: 14px; scroll-margin-top: 84px; }
.notes-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 54px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  color: var(--muted); text-align: center;
}
.notes-empty p { font-size: 13px; color: var(--ink-2); letter-spacing: .14em; }
.notes-empty small { font-size: 10.5px; }
.tube { display: flex; align-items: flex-end; gap: 5px; height: 42px; }
.tube i {
  display: block; width: 6px; border-radius: 3px;
  background: linear-gradient(to top, rgba(226, 185, 108, .5), rgba(226, 185, 108, .06));
  animation: sway 2.8s ease-in-out infinite;
}
.tube i:nth-child(1) { height: 26px; animation-delay: 0s; }
.tube i:nth-child(2) { height: 34px; animation-delay: .3s; }
.tube i:nth-child(3) { height: 42px; animation-delay: .6s; }
.tube i:nth-child(4) { height: 34px; animation-delay: .9s; }
.tube i:nth-child(5) { height: 26px; animation-delay: 1.2s; }

.note {
  position: relative; overflow: hidden;
  padding: 14px 15px 13px;
  background: linear-gradient(166deg, #14171f, #0a0b10 72%);
  border: 1px solid var(--line); border-radius: 15px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s ease, transform .4s ease, border-color .2s;
}
.note.on { opacity: 1; transform: none; }
.note:hover { border-color: rgba(226, 185, 108, .28); }
.note::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--gold), transparent 70%);
  opacity: .5;
}
.note-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.note-idx {
  font-family: var(--mono); font-size: 11px; color: var(--gold);
  letter-spacing: .08em;
}
.mode-tag {
  font-size: 9px; letter-spacing: .06em; color: var(--ink-2);
  padding: 2px 7px; border: 1px solid var(--line); border-radius: 99px;
  background: rgba(255, 255, 255, .03);
}
.copy-btn {
  margin-left: auto; padding: 3px 8px; font-size: 9.5px; color: var(--muted);
  background: none; border: 1px solid transparent; border-radius: 5px; transition: .16s;
}
.copy-btn:hover { color: var(--gold-2); border-color: var(--line); }
.copy-btn.done { color: var(--p); }

.balls { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.ball {
  display: grid; place-items: center; flex: none;
  width: 31px; height: 31px; border-radius: 50%;
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff3ef;
  background: radial-gradient(circle at 34% 24%, #d8483a, #9c1d13 62%, #6d100a);
  box-shadow: inset 0 -2px 5px rgba(0, 0, 0, .5), inset 0 2px 3px rgba(255, 255, 255, .22), 0 3px 10px -3px rgba(160, 33, 21, .9);
}
.ball.blue {
  background: radial-gradient(circle at 34% 24%, #4f7ee0, #20418f 62%, #142a63);
  box-shadow: inset 0 -2px 5px rgba(0, 0, 0, .5), inset 0 2px 3px rgba(255, 255, 255, .26), 0 3px 10px -3px rgba(35, 71, 156, .85);
}
.ball.sep { width: 7px; background: none; box-shadow: none; }
.ball.sep::after { content: "+"; font-size: 10px; color: var(--muted); }

.digits { display: flex; align-items: center; gap: 6px; }
.dcell {
  display: grid; place-items: center;
  width: 42px; height: 48px; border-radius: 8px;
  font-family: var(--mono); font-size: 24px; font-weight: 600;
  color: var(--gold-2);
  background: linear-gradient(160deg, rgba(226, 185, 108, .13), rgba(226, 185, 108, .02));
  border: 1px solid rgba(226, 185, 108, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 13px; padding: 9px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.metrics div { display: flex; flex-direction: column; gap: 1px; }
.metrics b {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--ink); letter-spacing: .02em;
}
.metrics i { font-style: normal; font-size: 9px; color: var(--muted); letter-spacing: .04em; }

.scoreline { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.ring {
  position: relative; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--pct, 20) * 1%), rgba(255, 255, 255, .07) 0);
  display: grid; place-items: center;
}.ring::before {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: #0d0f14;
}
.ring span {
  position: relative; font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  color: var(--gold-2);
}
.score-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.score-txt b { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.score-txt small { font-size: 9px; color: var(--muted); line-height: 1.5; }

.why {
  margin-top: 10px;
  font-family: var(--serif); font-size: 11.5px; line-height: 1.75; color: #a9a294;
}
.why::before { content: "「"; color: rgba(226, 185, 108, .5); }
.why::after { content: "」"; color: rgba(226, 185, 108, .5); }

.traces { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.traces span {
  font-size: 9px; color: #8d8678;
  padding: 2px 6px; border: 1px dashed rgba(255, 255, 255, .1); border-radius: 4px;
}
.traces span b { color: var(--gold); font-family: var(--mono); font-weight: 600; }
.traces .none { border-style: solid; border-color: transparent; color: #5c5e66; }

/* 口诀命中 */
.khits { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; align-items: center; }
.khits em { font-style: normal; font-size: 9px; color: #ff9d6a; letter-spacing: .08em; }
.khits b {
  font-size: 9px; font-weight: 500; color: #ffbe9d;
  border: 1px solid rgba(255, 157, 106, .3); background: rgba(255, 157, 106, .08);
  padding: 1px 6px; border-radius: 4px;
}
.khits b.none { color: #7a6a60; border-color: rgba(255, 255, 255, .08); background: none; }

/* 签文底部：买 / 不买 */
.note-actions { display: flex; gap: 6px; margin-top: 11px; }
.note-actions .buy {
  flex: 1; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(226, 185, 108, .34);
  background: rgba(226, 185, 108, .1);
  color: var(--gold-2); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; transition: .16s;
}
.note-actions .buy:hover { background: rgba(226, 185, 108, .18); border-color: rgba(226, 185, 108, .5); }
.note-actions .buy i { font-style: normal; font-weight: 400; font-size: 9.5px; opacity: .62; margin-left: 4px; }
.note-actions .skip {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 10.5px; transition: .16s;
}
.note-actions .skip:hover { color: var(--ink-2); border-color: var(--line-2); }
.decided-tag {
  display: inline-block; padding: 6px 11px; border-radius: 7px;
  font-size: 10px; letter-spacing: .04em;
}
.decided-tag.bought { color: var(--p); background: rgba(95, 211, 160, .1); border: 1px solid rgba(95, 211, 160, .26); }
.decided-tag.skipped { color: var(--muted); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.note.decided.bought { border-color: rgba(95, 211, 160, .26); }
.note.skipped { opacity: .5; }

/* 存档 */
.archive-card { padding: 16px 18px; }
.arc-actions { display: flex; gap: 6px; }
.archive-list { display: flex; flex-direction: column; margin-top: 4px; max-height: 292px; overflow-y: auto; }
.archive-list::-webkit-scrollbar { width: 5px; }
.archive-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 3px; }
.archive-list .ph { font-size: 11px; color: var(--muted); padding: 14px 0; }
.arc-row {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) 92px 22px;
  gap: 10px; align-items: center;
  padding: 7px 6px; border-radius: 7px; transition: background .15s;
}
.arc-row:hover { background: rgba(255, 255, 255, .025); }
.arc-p { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.arc-n { font-family: var(--mono); font-size: 11px; color: var(--ink); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc-s { font-size: 9.5px; text-align: right; color: var(--muted); white-space: nowrap; }
.arc-row.won .arc-s { color: var(--gold-2); font-weight: 600; }
.arc-row.lost .arc-n { color: #686a73; }
.arc-x {
  width: 20px; height: 20px; border: 0; background: none; border-radius: 4px;
  color: #55575f; font-size: 13px; line-height: 1; transition: .15s;
}
.arc-x:hover { color: #e07a6a; background: rgba(224, 122, 106, .1); }
.arc-note {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 9.5px; color: #6f7079; line-height: 1.7;
}
.grid2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
.weights-card, .discipline-card { padding: 16px 18px; }

.weights { display: flex; flex-direction: column; gap: 5px; }
.weights .ph { font-size: 11px; color: var(--muted); padding: 10px 0; }
.wrow {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 44px;
  align-items: center; gap: 8px;
}
.wrow .wn {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); text-align: right;
}
.wbar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .045); overflow: hidden; }
.wbar i {
  display: block; height: 100%; border-radius: 3px; width: 0;
  background: linear-gradient(90deg, rgba(226, 185, 108, .28), rgba(226, 185, 108, .75));
  transition: width .6s cubic-bezier(.22, .8, .28, 1);
}
.wrow.hot .wbar i { background: linear-gradient(90deg, rgba(255, 149, 106, .4), #ff9d6a); }
.wrow .wv {
  font-family: var(--mono); font-size: 9.5px; color: var(--muted); text-align: right;
}
.wrow.hot .wv { color: #ffb08a; }

.budget { margin: 12px 0 10px; }
.budget-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.budget-bar i {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, #5fd3a0, #e2b96c);
  transition: width .6s cubic-bezier(.22, .8, .28, 1);
}
.budget-bar i.over { background: linear-gradient(90deg, #e2b96c, #d2503c); }
.budget-legend {
  display: flex; justify-content: space-between; margin-top: 5px;
  font-size: 9px; color: var(--muted); font-family: var(--mono);
}

.alerts { display: flex; flex-direction: column; gap: 7px; }
.alerts li {
  position: relative; padding-left: 12px;
  font-size: 10.5px; line-height: 1.6; color: var(--ink-2);
}
.alerts li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--muted);
}
.alerts li.warn { color: #e2b48a; }
.alerts li.warn::before { background: #e2a05f; box-shadow: 0 0 8px rgba(226, 160, 95, .5); }
.alerts li.ok::before { background: var(--p); }
.alerts li.dim { color: #7a7c85; }

.blacklist { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.blacklist > span { font-size: 9px; letter-spacing: .14em; color: var(--muted); }
.bl-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.bl-chips em { font-style: normal; font-size: 10px; color: var(--muted); }
.bl-chips b {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  padding: 2px 6px; border-radius: 4px;
  color: #9fb4cc; background: rgba(121, 174, 255, .1);
  border: 1px solid rgba(121, 174, 255, .18);
}
.bl-chips b.strong { color: #ffb9a6; background: rgba(255, 130, 100, .1); border-color: rgba(255, 130, 100, .22); }

/* ---------------- 算法对照 ---------------- */
.spec { margin-top: clamp(48px, 7vw, 84px); padding-top: 34px; border-top: 1px solid var(--line); }
.spec header { max-width: 780px; }
.spec h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.spec-lede { margin-top: 12px; font-size: 12.5px; line-height: 1.9; color: var(--muted); }

.spec-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin-top: 26px;
}
.spec-grid article {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(170deg, rgba(20, 23, 30, .6), rgba(10, 12, 16, .4));
}
.spec-grid h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: .04em; margin-bottom: 12px;
}
.spec-grid h3 i { font-style: normal; font-size: 9px; color: var(--muted); letter-spacing: .08em; margin-left: auto; }
.tag {
  display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 5px; font-family: var(--mono); font-size: 10px; font-weight: 700;
}
.tag.p { color: var(--p); background: rgba(95, 211, 160, .13); }
.tag.e { color: var(--e); background: rgba(121, 174, 255, .13); }
.tag.l { color: var(--l); background: rgba(255, 195, 107, .13); }
.tag.b { color: var(--b); background: rgba(169, 139, 255, .13); }
.tag.k { color: #ff9d6a; background: rgba(255, 157, 106, .13); }

.spec-grid .span2 { grid-column: span 2; }
.kou-intro { font-size: 11.5px; color: var(--ink-2); line-height: 1.85; margin-bottom: 13px; }
.kou-intro b { color: var(--gold); font-weight: 600; }
.kou-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 20px; }
.kou-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 1px solid rgba(255, 157, 106, .28); }
.kou-list b { font-size: 11px; color: var(--ink); font-weight: 600; letter-spacing: .02em; }
.kou-list span { font-size: 10.5px; color: var(--muted); line-height: 1.65; }
.kou-foot { margin-top: 13px; font-size: 10.5px; color: #6f7079; line-height: 1.7; }

.spec-grid dl { display: flex; flex-direction: column; gap: 8px; }
.spec-grid dt { font-size: 10.5px; color: var(--gold); letter-spacing: .03em; }
.spec-grid dd { font-size: 11.5px; color: var(--ink-2); line-height: 1.7; margin-top: 1px; }

.notice {
  margin-top: 14px; padding: 18px 20px; border-radius: 14px;
  border: 1px solid rgba(226, 185, 108, .22);
  background: linear-gradient(120deg, rgba(226, 185, 108, .07), rgba(196, 66, 47, .05));
}
.notice b { font-size: 12px; letter-spacing: .06em; color: var(--gold-2); }
.notice p { margin-top: 7px; font-size: 11.5px; line-height: 1.85; color: var(--ink-2); }

/* ---------------- 页脚 ---------------- */
.foot {
  max-width: 1380px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line);
}
.foot-left { display: flex; align-items: center; gap: 10px; }
.foot-left p { font-size: 10.5px; color: var(--muted); }
.foot-right { font-size: 10px; color: #5e6068; letter-spacing: .08em; }

/* ---------------- 悬浮出号栏 ---------------- */
.floatbar {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: min(92vw, 460px);
  padding: 9px 10px 9px 18px;
  border-radius: 16px;
  background: #14161d;
  border: 1px solid rgba(226, 185, 108, .3);
  box-shadow: 0 22px 54px -22px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .05);
  opacity: 0; transform: translate(-50%, 20px); pointer-events: none;
  transition: opacity .26s ease, transform .26s ease;
}
.floatbar.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.fb-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden; }
.fb-info b { font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
.fb-info span { font-size: 9.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.floatbar .primary { flex: none; padding: 9px 20px; }
.floatbar.on ~ .foot { padding-bottom: 104px; }

/* ---------------- 动画 ---------------- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.8); }
}
.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 90;
  transform: translate(-50%, 14px);
  padding: 10px 18px; border-radius: 99px;
  font-size: 11.5px; color: var(--ink);
  background: rgba(22, 25, 33, .96);
  border: 1px solid rgba(226, 185, 108, .3);
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .9);
  opacity: 0; pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
  max-width: min(88vw, 480px); text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sway { 0%, 100% { transform: scaleY(1); opacity: .55; } 50% { transform: scaleY(.72); opacity: 1; } }
@keyframes flash {
  0% { border-color: rgba(226, 185, 108, .8); background: rgba(226, 185, 108, .06); }
  100% { border-color: rgba(226, 185, 108, .22); background: transparent; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-right { max-width: 520px; }
  .workspace { grid-template-columns: 1fr; gap: 30px; }
  .zone-out::before { display: none; }
  .panel { position: static; max-height: none; }
  .panes { overflow: visible; }
}
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-grid .span2 { grid-column: auto; }
  .kou-list { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 40px minmax(0, 1fr) 70px; }
  .layer .lbar { display: none; }
  .layer .lval { font-size: 9.5px; }
  .fstats { gap: 12px; }
  .top-note { display: none; }
}
@media (max-width: 620px) {
  .hero h1 { font-size: 34px; }
  .hero-chips li { font-size: 10.5px; }
  .notes { grid-template-columns: 1fr; }
  .fm-row i { display: none; }
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .ball { width: 34px; height: 34px; font-size: 13.5px; }
  .dcell { width: 38px; height: 44px; font-size: 21px; }
  .foot { flex-direction: column; align-items: flex-start; }
  .card-head { flex-direction: column; gap: 10px; align-items: flex-start; }
  .fstats { width: 100%; justify-content: space-between; }
  .stream-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .head-actions { justify-content: flex-start; }
  .layer { grid-template-columns: 38px minmax(0, 1fr) 86px; }
  .layer .lval { font-size: 9px; }
  .databar { padding: 10px 12px; gap: 8px; }
  .db-updated { display: none; }
  .zone-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .zone-head > p { text-align: left; }
  .floatbar { left: 12px; right: 12px; width: auto; max-width: none; transform: translate(0, 20px); padding-left: 14px; }
  .floatbar.on { transform: translate(0, 0); }
  .floatbar .fb-info span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .note, .layer { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   视图切换 / 折叠 / 当前层高亮（页面瘦身）
   ============================================================ */
.viewtabs {
  display: flex; justify-content: center; gap: 4px;
  padding: 14px 16px 0;
}
.viewtabs button {
  display: flex; align-items: center;
  padding: 8px 20px; border-radius: 99px;
  border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 12.5px; letter-spacing: .08em;
  transition: .18s;
}
.viewtabs button:hover { color: var(--ink-2); background: rgba(255, 255, 255, .04); }
.viewtabs button.on {
  color: var(--gold-2); background: rgba(226, 185, 108, .1);
  border-color: rgba(226, 185, 108, .28);
}
.viewtabs button i {
  font-style: normal; font-family: var(--mono); font-size: 9px;
  margin-left: 6px; padding: 1px 5px; border-radius: 99px;
  background: rgba(255, 255, 255, .08); color: var(--ink-2);
}
.viewtabs button.on i { background: rgba(226, 185, 108, .2); color: var(--gold-2); }

.view { display: none; }
.view.on { display: block; animation: fadeUp .26s ease; }

/* 紧凑 hero */
.hero.slim { display: block; padding: clamp(16px, 2.6vw, 26px) 0 clamp(14px, 2vw, 20px); }
.hero.slim .kicker { margin-bottom: 9px; }
.hero.slim h1 {
  font-size: clamp(23px, 3vw, 33px); line-height: 1.2; letter-spacing: -.02em;
  white-space: nowrap;
}
.hero.slim .lede {
  margin-top: 9px; max-width: 760px;
  font-size: 12px; line-height: 1.75; color: var(--muted);
}
.hero.slim .hero-chips { margin-top: 13px; gap: 7px; }
.hero.slim .hero-chips li { font-size: 10.5px; padding: 4px 10px; }

/* 逐层筛：当前层 + 折叠 */
.fh-left h2 { display: flex; align-items: center; gap: 10px; }
.fh-right { display: flex; align-items: center; gap: 12px; }
.fold-btn {
  padding: 2px 8px; font-size: 9.5px; font-weight: 400; letter-spacing: .04em;
  color: var(--muted); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: 5px; transition: .16s;
}
.fold-btn:hover { color: var(--ink-2); border-color: var(--line-2); }

.scan-now {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; letter-spacing: .05em; padding: 3px 9px; border-radius: 5px;
  color: var(--ink-2); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); white-space: nowrap;
}
.scan-now[hidden] { display: none; }
.scan-now.p { color: var(--p); border-color: rgba(95, 211, 160, .3); background: rgba(95, 211, 160, .08); }
.scan-now.e { color: var(--e); border-color: rgba(121, 174, 255, .3); background: rgba(121, 174, 255, .08); }
.scan-now.l { color: var(--l); border-color: rgba(255, 195, 107, .3); background: rgba(255, 195, 107, .08); }
.scan-now.k { color: #ff9d6a; border-color: rgba(255, 157, 106, .3); background: rgba(255, 157, 106, .08); }
.scan-now.o { color: var(--gold); border-color: rgba(226, 185, 108, .3); background: rgba(226, 185, 108, .08); }

.funnel-body {
  overflow: hidden;
}
.funnel-card.collapsed .funnel-body { display: none; }

/* 折叠块（面板内 / 结果区） */
.fold {
  margin-bottom: 14px; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(255, 255, 255, .018);
}
.fold > summary {
  display: flex; align-items: center; gap: 8px; list-style: none;
  padding: 9px 12px; font-size: 11.5px; color: var(--ink-2);
  cursor: pointer; user-select: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary i { font-style: normal; font-size: 9.5px; color: var(--muted); margin-left: auto; }
.fold > summary::after {
  content: "展开"; font-size: 9px; color: var(--muted);
  padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .04);
}
.fold[open] > summary::after { content: "收起"; }
.fold-body { padding: 0 12px 12px; }

.fold-block {
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, .018); overflow: hidden;
}
.fold-block > summary {
  display: flex; align-items: center; gap: 10px; list-style: none;
  padding: 12px 16px; font-size: 11.5px; color: var(--ink-2); cursor: pointer;
}
.fold-block > summary::-webkit-details-marker { display: none; }
.fold-block > summary i { font-style: normal; font-size: 9.5px; color: var(--muted); font-family: var(--mono); }
.fold-block > summary::after {
  content: "展开"; margin-left: auto; font-size: 9px; color: var(--muted);
  padding: 1px 7px; border-radius: 4px; background: rgba(255, 255, 255, .04);
}
.fold-block[open] > summary::after { content: "收起"; }
.fold-block > .grid2 { padding: 0 14px 14px; }

/* 说明页 tab */
.page-head { padding: clamp(20px, 3vw, 32px) 0 18px; max-width: 780px; }
.page-head h2 { font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -.02em; }
.page-head p:not(.kicker) { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.85; }

.spectabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.spectabs button {
  padding: 7px 15px; font-size: 11.5px; color: var(--muted);
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
  border-radius: 99px; transition: .16s;
}
.spectabs button:hover { color: var(--ink); border-color: var(--line-2); }
.spectabs button.on {
  color: #1a1206; font-weight: 600; border-color: transparent;
  background: linear-gradient(160deg, var(--gold-2), #d3a555);
}
.spec-pane { display: none; }
.spec-pane.on { display: block; animation: fadeUp .24s ease; }
.spec-card {
  padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(170deg, rgba(20, 23, 30, .6), rgba(10, 12, 16, .4));
}
.spec-card h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 14px; }
.spec-card h3 i { font-style: normal; font-size: 9px; color: var(--muted); letter-spacing: .08em; margin-left: auto; }
.spec-card dl { display: flex; flex-direction: column; gap: 9px; }
.spec-content { max-width: 1000px; }
.spec-note {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-2); line-height: 1.9;
}
.spec-note code, .db-hint code { font-family: var(--mono); font-size: 10px; color: var(--gold-2); background: rgba(255, 255, 255, .06); padding: 1px 5px; border-radius: 3px; }

/* 存档页 */
#view-archive .archive-card { padding: 18px 20px; }
#view-archive .archive-list { max-height: 62vh; }
#view-archive .arc-row { grid-template-columns: 92px minmax(0, 1fr) 120px 26px; padding: 9px 8px; }

@media (max-width: 860px) {
  .hero.slim h1 { white-space: normal; }
  .fh-right { gap: 8px; }
  .scan-now { display: none; }
  .viewtabs { padding-top: 10px; }
  .viewtabs button { padding: 7px 15px; font-size: 11.5px; }
  #view-archive .arc-row { grid-template-columns: 70px minmax(0, 1fr) 84px 22px; }
}

/* 说明页 dl 文字层级 */
.spec-card dt { font-size: 10.5px; color: var(--gold); letter-spacing: .03em; }
.spec-card dd { font-size: 11.5px; color: var(--ink-2); line-height: 1.7; margin-top: 2px; }

/* ============================================================
   v1.1 视觉升级：科技感 + 渐变毛玻璃 + 动效
   ============================================================ */

:root {
  --cyan: #7ee7ff;
  --violet: #a89aff;
  --glass-1: linear-gradient(158deg, rgba(32, 37, 49, .74), rgba(13, 15, 21, .86));
  --glass-2: linear-gradient(158deg, rgba(26, 30, 41, .64), rgba(11, 13, 19, .8));
  --glass-3: linear-gradient(158deg, rgba(24, 27, 36, .6), rgba(9, 11, 16, .74));
  --blur: saturate(1.35) blur(16px);
}

/* ---- 背景：再加一层冷调极光 ---- */
.bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(38% 34% at 78% 12%, rgba(126, 231, 255, .07), transparent 70%),
    radial-gradient(30% 28% at 12% 74%, rgba(168, 154, 255, .06), transparent 72%);
  pointer-events: none;
}

/* ---- 毛玻璃：顶栏 / 面板 / 卡片 / 状态条 / 悬浮条 ---- */
.topbar {
  background: rgba(8, 9, 13, .68);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom-color: rgba(255, 255, 255, .07);
}
.panel {
  background: var(--glass-1);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-color: rgba(255, 255, 255, .09);
  box-shadow:
    0 34px 90px -46px #000,
    inset 0 1px 0 rgba(255, 255, 255, .08),
    inset 0 0 80px -46px rgba(126, 231, 255, .5);
}
.card, .spec-card {
  position: relative;
  background: var(--glass-2);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-color: rgba(255, 255, 255, .085);
}
.databar {
  background: var(--glass-3);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
}

/* 卡片顶部渐变高光，做出玻璃边缘 */
.card::before, .panel::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 185, 108, .55) 22%, rgba(126, 231, 255, .42) 62%, transparent);
  opacity: .75; pointer-events: none; z-index: 1;
}
.panel { overflow: hidden; }

/* ---- 数字：等宽 + 高亮（渐变字在破折号/短符号上会隐形，只用于有实际文本的位置） ---- */
.fstats b { color: var(--gold-2); font-variant-numeric: tabular-nums; }
.seedbox code { color: var(--gold-2); }
.db-updated {
  background: linear-gradient(115deg, var(--gold-2) 10%, #ffe9bf 45%, var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.budget-legend span { font-variant-numeric: tabular-nums; }

/* ---- 按钮：统一图标位 + hover 光扫 ---- */
.btn-ico { width: 13px; height: 13px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mini, .ghost, .copy-btn, .buy, .skip, .arc-x { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }

.primary {
  position: relative; overflow: hidden;
  flex-direction: row; gap: 9px; justify-content: center;
  background: linear-gradient(150deg, #ffe6b4, #e8bd70 42%, #c19240);
  box-shadow: 0 12px 30px -14px rgba(226, 185, 108, .95), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.primary .btn-ico { width: 17px; height: 17px; stroke-width: 1.8; }
.primary .btn-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.actions { align-items: stretch; }
.actions .ghost { align-self: stretch; }
.primary::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -70%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg); opacity: 0; pointer-events: none;
}
.primary:hover::after { animation: sheen .85s cubic-bezier(.4, 0, .2, 1); }
@keyframes sheen {
  0% { left: -70%; opacity: 0; }
  25% { opacity: .85; }
  100% { left: 130%; opacity: 0; }
}

/* 加载 / 刷新图标旋转 */
.spin { animation: spin .9s linear infinite; transform-origin: 50% 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.mini.loading { color: var(--gold-2); border-color: rgba(226, 185, 108, .34); background: rgba(226, 185, 108, .08); }

/* ---- 卡片入场 ----
   只动 transform，不碰 opacity：动画若因环境原因不推进，内容依然可见。 */
.card, .databar, .spec-card, .arc-row {
  animation: cardIn .46s cubic-bezier(.22, .8, .28, 1);
}
/* 签文仍由 .on 触发揭示，避免扫描途中提前露出 */
.note.on { animation: noteIn .44s cubic-bezier(.22, .8, .28, 1); }
@keyframes cardIn {
  from { transform: translateY(8px) scale(.995); }
  to { transform: none; }
}
@keyframes noteIn {
  from { transform: translateY(10px) scale(.99); }
  to { transform: none; }
}
.note:nth-child(2) { animation-delay: .05s; }
.note:nth-child(3) { animation-delay: .1s; }
.note:nth-child(4) { animation-delay: .15s; }
.note:nth-child(5) { animation-delay: .2s; }

/* ---- 扫描中的当前层：流光 ---- */
.layer.live::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  animation: sweep 1.15s ease-in-out infinite;
  pointer-events: none;
}
.layer { position: relative; overflow: hidden; }
@keyframes sweep { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }

/* 数据圆点呼吸 */
.databar[data-state="ok"] .db-dot { animation: dotPulse 2.4s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(95, 211, 160, .45); }
  50% { box-shadow: 0 0 0 5px rgba(95, 211, 160, 0); }
}

/* ---- 悬浮出号栏：接近等宽 ---- */
.floatbar {
  width: min(780px, calc(100vw - 44px));
  max-width: none;
  gap: 14px;
  padding: 10px 12px 10px 20px;
  border-radius: 18px;
  background: var(--glass-1);
  backdrop-filter: saturate(1.4) blur(22px);
  -webkit-backdrop-filter: saturate(1.4) blur(22px);
  border-color: rgba(226, 185, 108, .34);
  box-shadow: 0 26px 70px -26px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.floatbar .fb-info { flex: 1; min-width: 0; }
.floatbar .fb-info b { font-size: 13px; }
.floatbar .primary { flex: 0 0 clamp(180px, 38%, 320px); }
.floatbar.on ~ .foot { padding-bottom: 116px; }

/* ---- 文字层级收紧，降低视觉噪音 ---- */
.zone-head > p { font-size: 9.5px; opacity: .7; }
.panel-head p { font-size: 10px; opacity: .75; }
.hint { font-size: 9.5px; line-height: 1.6; opacity: .72; }
.card-head p { font-size: 10px; opacity: .78; }
.hero.slim .lede { font-size: 11.5px; line-height: 1.7; opacity: .82; }
.note .why { font-size: 10.5px; opacity: .8; }

/* ---- 滚动条 ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(226, 185, 108, .45); background-clip: content-box; }

@media (max-width: 860px) {
  .floatbar { left: 12px; right: 12px; width: auto; transform: translate(0, 20px); padding-left: 16px; }
  .floatbar.on { transform: translate(0, 0); }
  .floatbar .primary { flex: 1; }
  .floatbar .fb-info b { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .databar, .spec-card, .arc-row, .note.on { animation: none; }
  .layer.live::after, .databar[data-state="ok"] .db-dot { animation: none; }
}

/* ---- 流水线：静止时只留层名与数值，悬停/扫描时才出解释，避免灰雾 ---- */
.layer .lname b { font-size: 12px; }
.layer .lname small { opacity: 0; transition: opacity .2s ease; }
.layer:hover .lname small,
.layer.live .lname small { opacity: 1; }
.lbar { height: 4px; background: rgba(255, 255, 255, .055); }
.lbar i { box-shadow: 0 0 10px -2px rgba(255, 255, 255, .18); }
.layer .code { font-variant-numeric: tabular-nums; }

/* 拥挤度说明收紧 */
.score-txt small { font-size: 8.5px; opacity: .68; letter-spacing: .01em; }

/* 入场动画用 fill:both 会锁死 opacity，跳过的注改用 filter 降低存在感 */
.note.on { animation-fill-mode: forwards; }
.note.skipped { opacity: 1; filter: opacity(.55); }
.note.skipped:hover { filter: opacity(.85); }

/* 移动端数据条：状态与刷新挤在第二行，两端对齐 */
@media (max-width: 620px) {
  .databar { padding: 10px 12px; gap: 10px; }
  .db-main { width: 100%; }
  .db-side { width: 100%; justify-content: space-between; }
  .db-text span { font-size: 9px; }
}

/* 签文可见性：用 visibility 立即生效，opacity 只做装饰，避免过渡不推进时整卡隐形 */
.note {
  opacity: 1; transform: none; visibility: hidden;
  transition: border-color .2s;
}
.note.on { visibility: visible; }

/* 移动端：更新时间保留，与刷新按钮两端对齐 */
@media (max-width: 620px) {
  .db-updated { display: inline; font-size: 9px; }
  .db-side { justify-content: space-between; }
  .databar .mini { padding: 5px 9px; }
}

/* ============================================================
   v2 视觉改版覆盖层：鹅血红 #AB372F × 暖纸白
   只覆盖颜色与动效，不动任何结构 / 交互规则
   ============================================================ */
:root {
  --red-deep: #8c2b25;
  --gold: #ab372f;            /* 历史令牌沿用：香槟金 → 鹅血红 */
  --gold-2: #c0433b;
  --gold-dim: rgba(171, 55, 47, .08);
  --bg: #f6f1e9;
  --bg-2: #fdfaf4;
  --panel: rgba(255, 253, 249, .86);
  --panel-2: #fffdf9;
  --panel-3: #f3ecdf;
  --line: rgba(43, 35, 32, .1);
  --line-2: rgba(43, 35, 32, .2);
  --ink: #2b2320;
  --ink-2: #6d615a;
  --muted: #a2938a;
  --p: #2e8e68; --e: #3d6fc4; --l: #b97a1c; --b: #7a5fd0;
  --glass-1: linear-gradient(158deg, rgba(255, 253, 249, .92), rgba(248, 242, 232, .96));
  --glass-2: linear-gradient(158deg, rgba(255, 253, 249, .9), rgba(250, 245, 236, .95));
  --glass-3: linear-gradient(158deg, rgba(255, 253, 249, .9), rgba(248, 242, 232, .95));
  --eo: cubic-bezier(.23, 1, .32, 1);
}

/* ---- 背景：素纸 + 一轮红日 ---- */
body { background: var(--bg); }
.bg::after { content: none; }
.bg-glow {
  background:
    radial-gradient(46% 58% at 20% 0%, rgba(171, 55, 47, .1), transparent 62%),
    radial-gradient(40% 50% at 82% 2%, rgba(171, 55, 47, .05), transparent 66%),
    radial-gradient(60% 40% at 50% 100%, rgba(171, 55, 47, .05), transparent 70%);
}
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(43, 35, 32, .03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 35, 32, .03) 1px, transparent 1px);
}
.bg-sun {
  position: absolute; top: -190px; right: -150px;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle at 40% 42%, #bb443b, var(--red) 58%, var(--red-deep));
  box-shadow: 0 30px 90px rgba(171, 55, 47, .22);
  animation: sunBreathe 9s var(--eo) infinite alternate;
}
.bg-sun::before {
  content: ""; position: absolute; inset: -70px; border-radius: 50%;
  border: 1px solid rgba(171, 55, 47, .12);
}
.bg-sun::after {
  content: ""; position: absolute; inset: 46px; border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .25);
  animation: sunSpin 90s linear infinite;
}
@keyframes sunBreathe { from { transform: scale(1); } to { transform: scale(1.035); } }
@keyframes sunSpin { to { transform: rotate(360deg); } }
::selection { background: rgba(171, 55, 47, .2); color: var(--ink); }

/* ---- 顶栏 ---- */
.topbar {
  background: rgba(246, 241, 233, .85);
  border-bottom-color: var(--line);
  animation: barIn .5s var(--eo) both;
}
@keyframes barIn { from { opacity: 0; transform: translateY(-8px); } }
.seal {
  color: #fdf6ec;
  background: linear-gradient(160deg, #c0433b, var(--red-deep));
  box-shadow: 0 4px 14px rgba(171, 55, 47, .3), inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.brand-txt .tagline { font-size: 12px; color: var(--ink-2); letter-spacing: .05em; }
.brand-txt .tagline em { font-style: normal; color: var(--red); font-weight: 600; }

/* ---- Hero（精简版：一句引导 + 三个数字） ---- */
.hero.slim { padding: clamp(26px, 4vw, 46px) 0 clamp(18px, 2.4vw, 28px); }
.hero-lede {
  margin: 0; max-width: 760px;
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(16px, 1.9vw, 21px); line-height: 1.6; color: var(--ink);
  animation: riseIn .6s var(--eo) .08s both;
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 52px);
  margin: 22px 0 0; padding: 0; list-style: none;
}
.hero-stats li {
  display: flex; flex-direction: column; gap: 2px;
  animation: riseIn .6s var(--eo) both;
}
.hero-stats li:nth-child(1) { animation-delay: .16s; }
.hero-stats li:nth-child(2) { animation-delay: .22s; }
.hero-stats li:nth-child(3) { animation-delay: .28s; }
.hero-stats b {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; color: var(--ink);
}
.hero-stats b i { font-style: normal; font-size: .5em; color: var(--red); margin-left: 2px; }
.hero-stats span { font-size: 11.5px; color: var(--muted); letter-spacing: .12em; }
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } }

/* ---- 表单 / 折叠块 ---- */
input[type="text"], input[type="number"], textarea, select {
  background: var(--bg-2);
  border-color: var(--line-2);
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(171, 55, 47, .55);
  box-shadow: 0 0 0 3px rgba(171, 55, 47, .12);
}
input::placeholder, textarea::placeholder { color: #b6a696; }
input[type="range"]::-webkit-slider-thumb { border-color: var(--bg-2); }
input[type="range"]::-moz-range-thumb { border-color: var(--bg-2); }
.fold, .fold-block { background: rgba(171, 55, 47, .028); }
.fold > summary::after, .fold-block > summary::after { background: rgba(43, 35, 32, .06); }
.fold > summary i, .fold-block > summary i { color: var(--muted); }
.kdef { background: var(--bg-2); }
.switch .track { background: rgba(43, 35, 32, .1); }
.switch .track::after { background: #b6a696; }
.mode-tag { background: rgba(43, 35, 32, .04); }
.spec-grid article { background: var(--glass-2); }
.db-hint code, .spec-note code { background: rgba(43, 35, 32, .06); }

/* ---- 按钮 / 标签 ---- */
.primary {
  color: #fdf6ec;
  background: linear-gradient(150deg, #c85045, var(--red) 45%, var(--red-deep));
  box-shadow: 0 12px 30px -14px rgba(171, 55, 47, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.primary:hover {
  box-shadow: 0 16px 34px -14px rgba(171, 55, 47, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.mini, .ghost { background: var(--bg-2); border-color: var(--line-2); }
.mini:hover { color: var(--red); border-color: var(--red); background: var(--gold-dim); }
.mini.loading { color: var(--red); border-color: rgba(171, 55, 47, .34); background: var(--gold-dim); }
.ghost:hover { color: var(--red); border-color: rgba(171, 55, 47, .4); background: var(--gold-dim); }
.copy-btn:hover { color: var(--red); }
.gametabs button { background: rgba(43, 35, 32, .03); }
.gametabs button:hover { background: rgba(43, 35, 32, .06); }
.gametabs button.on {
  color: #fdf6ec;
  background: linear-gradient(160deg, #c0433b, var(--red));
  box-shadow: 0 4px 14px -4px rgba(171, 55, 47, .55);
}
.chips button { background: var(--bg-2); border-color: var(--line-2); }
.chips button:hover { border-color: var(--red); color: var(--red); }
.chips button.on {
  color: #fdf6ec; border-color: var(--red);
  background: linear-gradient(150deg, #c0433b, var(--red));
}
.viewtabs button:hover { background: rgba(171, 55, 47, .06); }
.viewtabs button.on {
  color: #fdf6ec; background: var(--red); border-color: transparent;
  box-shadow: 0 4px 14px -4px rgba(171, 55, 47, .5);
}
.viewtabs button i { background: rgba(43, 35, 32, .08); }
.viewtabs button.on i { background: rgba(255, 255, 255, .22); color: #fdf6ec; }
.spectabs button { background: var(--bg-2); }
.spectabs button.on {
  color: #fdf6ec;
  background: linear-gradient(160deg, #c0433b, var(--red));
}
.actions { background: linear-gradient(to top, rgba(248, 242, 232, .9), rgba(248, 242, 232, .3)); }
.zone-in .panel {
  border-top-color: rgba(171, 55, 47, .45);
  background: linear-gradient(180deg, rgba(171, 55, 47, .045), var(--panel-2) 140px);
}

/* ---- 卡片高光 / 数字格 / 圆环 ---- */
.card::before, .panel::before {
  background: linear-gradient(90deg, transparent, rgba(171, 55, 47, .4) 30%, rgba(171, 55, 47, .18) 62%, transparent);
}
.dcell {
  color: var(--red);
  background: linear-gradient(160deg, rgba(171, 55, 47, .1), rgba(171, 55, 47, .02));
  border-color: rgba(171, 55, 47, .28);
}
.ring::before { background: var(--panel-2); }
.tube i { background: linear-gradient(to top, rgba(171, 55, 47, .5), rgba(171, 55, 47, .06)); }

/* ---- 漏斗 / 签卡 / 明细 ---- */
.note { background: linear-gradient(166deg, #fffdf9, #faf4ea 72%); }
.layer:hover { background: rgba(43, 35, 32, .03); }
.lbar { background: rgba(43, 35, 32, .06); }
.lbar i { box-shadow: none; }
.layer .lval.idle { color: #c9bbaa; }
.layer .lname small { color: #97897c; }
.ghead i { color: var(--muted); }
.traces span { color: #97897c; border-color: rgba(43, 35, 32, .16); }
.traces .none { color: #b6a696; }
.why { color: #97897c; }
.why::before, .why::after { color: rgba(171, 55, 47, .5); }
.wbar i { background: linear-gradient(90deg, rgba(171, 55, 47, .3), rgba(171, 55, 47, .8)); }
.budget-bar { background: rgba(171, 55, 47, .1); }
.budget-bar i { background: linear-gradient(90deg, #3e8e6d, #c9a13e); }
.budget-bar i.over { background: linear-gradient(90deg, #c9a13e, var(--red)); }
.alerts li.warn { color: #b06f2e; }
.alerts li.dim { color: var(--muted); }
.bl-chips b { color: #3d6fc4; background: rgba(61, 111, 196, .08); border-color: rgba(61, 111, 196, .2); }
.bl-chips b.strong { color: var(--red); background: rgba(171, 55, 47, .07); border-color: rgba(171, 55, 47, .25); }
.arc-row:hover { background: rgba(43, 35, 32, .03); }
.arc-row.lost .arc-n { color: #bfb19f; }
.arc-note, .kou-foot, .foot-right { color: var(--muted); }
.arc-list::-webkit-scrollbar-thumb, .archive-list::-webkit-scrollbar-thumb,
.panes::-webkit-scrollbar-thumb, .kdefs::-webkit-scrollbar-thumb { background: rgba(43, 35, 32, .16); }

/* ---- 悬浮条 / Toast / 滚动条 ---- */
.floatbar { border-color: rgba(171, 55, 47, .35); }
.toast {
  color: var(--ink);
  background: rgba(255, 253, 248, .97);
  box-shadow: 0 18px 44px -18px rgba(60, 40, 25, .35);
}
::-webkit-scrollbar-thumb { background: rgba(43, 35, 32, .16); }
::-webkit-scrollbar-thumb:hover { background: rgba(171, 55, 47, .4); background-clip: content-box; }

/* ---- 扫描 flash 换成红 ---- */
@keyframes flash {
  0% { border-color: rgba(171, 55, 47, .7); background: rgba(171, 55, 47, .06); }
  100% { border-color: rgba(171, 55, 47, .22); background: transparent; }
}

/* ---- 动效增强：逐层滑入 / 彩球弹入 / 按压反馈 ---- */
.layer { animation: layerIn .34s var(--eo) both; }
.layer:nth-child(1) { animation-delay: .02s; }
.layer:nth-child(2) { animation-delay: .05s; }
.layer:nth-child(3) { animation-delay: .08s; }
.layer:nth-child(4) { animation-delay: .11s; }
.layer:nth-child(5) { animation-delay: .14s; }
.layer:nth-child(6) { animation-delay: .17s; }
.layer:nth-child(7) { animation-delay: .2s; }
.layer:nth-child(8) { animation-delay: .23s; }
.layer:nth-child(n+9) { animation-delay: .26s; }
@keyframes layerIn { from { opacity: 0; transform: translateX(-8px); } }

.note.on .ball { animation: ballPop .4s var(--eo) backwards; }
.note.on .ball:nth-of-type(2) { animation-delay: .04s; }
.note.on .ball:nth-of-type(3) { animation-delay: .08s; }
.note.on .ball:nth-of-type(4) { animation-delay: .12s; }
.note.on .ball:nth-of-type(5) { animation-delay: .16s; }
.note.on .ball:nth-of-type(6) { animation-delay: .2s; }
.note.on .ball:nth-of-type(7) { animation-delay: .24s; }
.note.on .ball:nth-of-type(8) { animation-delay: .28s; }
@keyframes ballPop {
  0% { transform: scale(.85) translateY(4px); }
  60% { transform: scale(1.05); }
  100% { transform: none; }
}

.chips button:active, .mini:active, .gametabs button:active,
.viewtabs button:active, .subtabs button:active, .spectabs button:active {
  transform: scale(.95);
}

@media (prefers-reduced-motion: reduce) {
  .bg-sun, .bg-sun::after { animation: none; }
  .topbar, .hero-lede, .hero-stats li, .layer, .note.on .ball { animation: none; }
}

/* ============================================================
   v2 补完：深墨漏斗卡 + 数据条不透明
   ============================================================ */

/* 数据条：不透明底，避免背景红日透上来影响可读性 */
.databar,
.databar[data-state="ok"] { background: #fffdf9; }
.databar[data-state="stale"] { background: #fdf8ee; }
.databar[data-state="error"] { background: #fdf1ef; }
.databar[data-state="loading"] { background: #fffdf9; }
.databar { position: relative; z-index: 2; }

/* 漏斗：深墨卡（与浅色页面形成对比，是整页的视觉锚点） */
.funnel-card {
  background: linear-gradient(150deg, #2f2622, #251d1a) !important;
  border-color: #251d1a !important;
  color: #efe7dc;
  box-shadow: 0 3px 8px rgba(60, 40, 25, .1), 0 18px 44px rgba(60, 40, 25, .18);
}
.funnel-card::before {
  background: linear-gradient(90deg, transparent, rgba(232, 176, 168, .45) 30%, rgba(232, 176, 168, .12) 70%, transparent);
}
.funnel-card .card-head h2 { color: #f6efe4; }
.funnel-card .card-head p,
.funnel-card .card-head .sub { color: #9c8d82; }
.funnel-card .fstats b {
  color: #e8b0a8;
  background: none;
  -webkit-text-fill-color: currentColor;
}
.funnel-card .fstats span { color: #9c8d82; }
.funnel-card .fold-btn {
  color: #cfc3b6; border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
}
.funnel-card .fold-btn:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.funnel-card .layers-empty { color: #9c8d82; }
.funnel-card .lgroup { color: #9c8d82; border-color: rgba(255, 255, 255, .08); }

.funnel-card .layer {
  background: rgba(255, 255, 255, .035);
  border-color: rgba(255, 255, 255, .07);
}
.funnel-card .layer:hover { border-color: rgba(232, 176, 168, .34); background: rgba(255, 255, 255, .06); }
.funnel-card .layer .code { color: #e8b0a8; }
.funnel-card .layer .lname b { color: #f0e9de; }
.funnel-card .layer .lname small { color: #9c8d82; }
.funnel-card .layer .lval { color: #cfc3b6; }
.funnel-card .layer .lval.idle { color: #6f625a; }
.funnel-card .layer .lpass { color: #9c8d82; }
.funnel-card .layer .lbar { background: rgba(255, 255, 255, .09); }
.funnel-card .layer.live {
  background: rgba(192, 67, 59, .16);
  border-color: rgba(232, 176, 168, .42);
  box-shadow: inset 2px 0 0 #e8b0a8;
}
.funnel-card .drawline {
  border-color: rgba(232, 176, 168, .4);
  background: rgba(192, 67, 59, .13);
}
.funnel-card .drawline span { color: #e8b0a8; }
.funnel-card .drawline p { color: #cfc3b6; }
.funnel-card .scan-now { color: #e8b0a8; border-color: rgba(232, 176, 168, .4); background: rgba(192, 67, 59, .16); }

/* 数据条：去掉毛玻璃，避免圆角边缘把背景红日模糊溢出 */
.databar,
.databar[data-state] {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.databar .layers-empty,
.funnel-card .layers-empty { color: #b5a698; }

/* ---- Hero 右侧：红日印章 + 轨道 ---- */
.hero-art {
  position: relative; display: grid; place-items: center;
  width: 250px; height: 250px; flex: none;
  animation: sunIn .8s var(--eo) .26s both;
}
@keyframes sunIn { from { opacity: 0; transform: scale(.94); } }
.hero-art .sun {
  position: relative; width: 250px; height: 250px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #bb443b, var(--red) 56%, var(--red-deep));
  box-shadow: 0 26px 70px rgba(171, 55, 47, .35);
  animation: sunBreathe 9s var(--eo) infinite alternate;
}
.hero-art .sun::after {
  content: ""; position: absolute; inset: 44px; border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .3);
  animation: sunSpin 70s linear infinite;
}
.hero-art .sun-char {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 88px; font-weight: 900; color: #fdf6ec;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .22); transform: rotate(-4deg);
}
.hero-art .orbit {
  position: absolute; width: 330px; height: 330px; border-radius: 50%;
  border: 1px solid rgba(171, 55, 47, .18);
  animation: sunSpin 26s linear infinite;
}
.hero-art .orbit i {
  position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px;
  border-radius: 50%; background: var(--red);
  box-shadow: 0 0 14px rgba(171, 55, 47, .65);
}
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(30px, 5vw, 80px); align-items: center; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero-art { display: none; } }

/* Hero 保持单列：背景那轮红日已足够，避免双圆重叠 */
.hero.slim { display: block; grid-template-columns: none; }
.hero.slim .hero-art { display: none; }

/* 桌面端：控制台面板是 sticky，出号按钮始终可见，底部悬浮条只会和它打架
   悬浮条仅在小屏（面板不再固定）时启用 */
@media (min-width: 861px) {
  .floatbar { display: none !important; }
  .floatbar.on ~ .foot { padding-bottom: 26px; }
}

/* 签文：单列横向（v3 构图），让号码与拥挤度有呼吸感 */
.notes {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  grid-template-columns: none !important;
}
.note {
  grid-template-columns: 46px minmax(0, 1fr) auto !important;
  grid-template-areas:
    "idx balls side"
    "idx meta  actions";
  row-gap: 10px;
  padding: 16px 20px;
}
.note .note-idx { grid-area: idx; align-self: start; }
.note .balls { grid-area: balls; }
.note-side { grid-area: side; }
.note-actions { grid-area: actions; justify-self: end; }
.note .metrics { grid-area: meta; grid-column: auto !important; }
.note .why, .note .traces, .note .khits {
  grid-column: 1 / -1 !important;
  margin-top: 2px;
}
.note .why { font-size: 11.5px; }
.note .traces span { font-size: 10px; }

/* 拥挤度环：细环 + 居中数字 */
.ring, .gauge {
  width: 54px; height: 54px;
  background: conic-gradient(var(--green) calc(var(--pct, 30) * 1%), rgba(43, 35, 32, .07) 0);
}
.ring span {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; background: var(--card);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink);
}
.score-txt b { font-size: 11px; }
.score-txt small { font-size: 10px; color: var(--muted); }
.scoreline { display: flex; align-items: center; gap: 10px; }

@media (max-width: 720px) {
  .note { grid-template-columns: 40px minmax(0, 1fr) !important; grid-template-areas: "idx balls" "meta meta" "side actions"; }
  .note-side { justify-self: start; }
}

/* ============================================================
   签文卡：紧凑横向（序号 + 号码 + 指标 + 拥挤度 + 操作）
   ============================================================ */
.note {
  display: block !important;
  padding: 15px 20px 14px !important;
  border-radius: 16px !important;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-1);
}
.note-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.note-idx {
  display: inline-grid; place-items: center; height: 24px; min-width: 46px; padding: 0 9px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: #fdf6ec; background: linear-gradient(160deg, var(--red-bright), var(--red-deep));
  border-radius: 7px;
}
.note-top .mode-tag { font-size: 10.5px; color: var(--muted); background: none; border: 0; padding: 0; }
.note-top .copy-btn { margin-left: auto; height: 26px; padding: 0 10px; font-size: 10.5px; }

.note .balls, .note .nums { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.note .ball, .note .num { width: 40px; height: 40px; font-size: 15px; }

.note .metrics {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  padding: 9px 0; margin: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.note .metrics div { display: flex; align-items: baseline; gap: 5px; }
.note .metrics b { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.note .metrics i { font-style: normal; font-size: 10px; color: var(--muted); letter-spacing: .06em; }

.note .scoreline { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.note .ring {
  position: relative; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--green) calc(var(--pct, 30) * 1%), rgba(43, 35, 32, .08) 0);
}
.note .ring span {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); font-family: var(--mono); font-size: 12px; color: var(--ink);
}
.score-txt { display: flex; flex-direction: column; gap: 1px; }
.score-txt b { font-size: 11.5px; color: var(--ink-2); }
.score-txt small { display: none; }

.note .why {
  margin-top: 10px; font-size: 11.5px; line-height: 1.75; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.note .traces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.note .traces span {
  font-size: 10px; color: var(--ink-2); padding: 2px 8px;
  border-radius: 99px; background: var(--paper-2); border: 1px solid var(--line);
}
.note .khits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.note-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.note .buy, .note .skip { height: 32px; padding: 0 16px; border-radius: 99px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px; }
.note .buy { background: var(--red); color: #fdf6ec; border: 1px solid var(--red); font-weight: 600; }
.note .buy i { font-style: normal; opacity: .85; margin-left: 3px; }
.note .skip { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); }

/* 补齐主题变量（前面几段引用但项目里并未定义，导致透明背景/隐形文字） */
:root {
  --card: #fffdf9;
  --paper: #f6f1e9;
  --paper-2: #fdfaf4;
  --green: #2e8e68;
  --red-bright: #c0433b;
  --blue: #31538f;
  --dark: #251d1a;
  --dark-2: #2f2622;
}

/* 背景层 contain:strict + translateZ 会让它在部分浏览器里盖住内容，
   这里显式把内容层提到上面 */
.page, .viewtabs, .foot { position: relative; z-index: 1; }
.topbar { position: sticky; z-index: 40; }
.bg { z-index: 0 !important; }
.bg > * { pointer-events: none; }

/* .bg 的 contain:strict + translateZ(0) 会把它提升为独立合成层，导致
   z-index 排序失效、红日盖住正文。这里退回普通层叠。 */
.bg {
  z-index: -1 !important;
  contain: none !important;
  transform: none !important;
  will-change: auto !important;
}

/* ============================================================
   签文卡 · 最终覆盖（用 #notes 提高特异性，压过旧 grid 规则）
   ============================================================ */
#notes { display: flex; flex-direction: column; gap: 12px; }
#notes .note {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 15px 20px 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
#notes .note-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
#notes .note-idx {
  display: inline-grid; place-items: center; height: 24px; min-width: 46px; padding: 0 9px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: #fdf6ec; background: linear-gradient(160deg, var(--red-bright), var(--red-deep));
  border-radius: 7px; white-space: nowrap;
}
#notes .note-top .mode-tag { font-size: 10.5px; color: var(--muted); background: none; border: 0; padding: 0; }
#notes .note-top .copy-btn {
  margin-left: auto; height: 26px; padding: 0 10px; font-size: 10.5px;
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line-2); border-radius: 99px; background: var(--card); color: var(--ink-2);
}

#notes .note .balls,
#notes .note .nums { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
#notes .note .ball,
#notes .note .num {
  width: 40px; height: 40px; font-size: 15px; font-weight: 700;
  display: grid; place-items: center; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.45), rgba(255,255,255,.05) 42%), var(--red);
  box-shadow: 0 4px 12px rgba(171,55,47,.3), inset 0 -3px 6px rgba(0,0,0,.22);
}
#notes .note .ball.b,
#notes .note .num.b {
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.45), rgba(255,255,255,.05) 42%), var(--blue);
  box-shadow: 0 4px 12px rgba(49,83,143,.3), inset 0 -3px 6px rgba(0,0,0,.22);
}

#notes .note .metrics {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  padding: 9px 0; margin: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
#notes .note .metrics div { display: flex; align-items: baseline; gap: 5px; }
#notes .note .metrics b { font-family: var(--mono); font-size: 13px; color: var(--ink); }
#notes .note .metrics i { font-style: normal; font-size: 10px; color: var(--muted); letter-spacing: .06em; }

#notes .note .scoreline { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
#notes .note .ring {
  position: relative; display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--pct, 30) * 1%), rgba(43,35,32,.08) 0);
}
#notes .note .ring span {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); font-family: var(--mono); font-size: 12px; color: var(--ink);
}
#notes .note .score-txt { display: flex; flex-direction: column; gap: 1px; }
#notes .note .score-txt b { font-size: 11.5px; color: var(--ink-2); }
#notes .note .score-txt small { display: none; }

#notes .note .why {
  margin: 10px 0 0; font-size: 11.5px; line-height: 1.75; color: var(--ink-2);
}
#notes .note .traces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
#notes .note .traces span {
  font-size: 10px; color: var(--ink-2); padding: 2px 8px;
  border-radius: 99px; background: var(--paper-2); border: 1px solid var(--line);
}
#notes .note .khits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

#notes .note-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 12px;
}
#notes .note-actions .buy {
  height: 32px; padding: 0 16px; border-radius: 99px; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--red); color: #fdf6ec; border: 1px solid var(--red);
}
#notes .note-actions .buy i { font-style: normal; opacity: .85; margin-left: 3px; }
#notes .note-actions .skip {
  height: 32px; padding: 0 16px; border-radius: 99px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; color: var(--ink-2); border: 1px solid var(--line-2);
}
#notes .note .decided-tag { font-size: 11.5px; padding: 6px 12px; border-radius: 99px; }

/* 球的类名是 .ball.blue / .ball.sep */
#notes .note .ball.blue,
#notes .note .num.blue {
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.45), rgba(255,255,255,.05) 42%), var(--blue);
  box-shadow: 0 4px 12px rgba(49,83,143,.3), inset 0 -3px 6px rgba(0,0,0,.22);
}
#notes .note .ball.sep {
  width: 12px; height: 40px; background: none; box-shadow: none; border-radius: 0;
}
#notes .note .ball.sep::after {
  content: "+"; display: block; text-align: center; line-height: 40px;
  color: var(--muted); font-size: 14px;
}

/* ---- 近 100 期统计 ---- */
.stats-fold { margin-top: 4px; }
.digit-freq { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.df-row {
  display: grid; grid-template-columns: 14px 1fr 44px; gap: 8px; align-items: center;
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-2);
}
.df-row b { font-weight: 700; color: var(--ink); text-align: center; }
.df-bar { height: 6px; border-radius: 3px; background: rgba(43, 35, 32, .07); overflow: hidden; }
.df-bar i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--red-deep), var(--red-bright));
  transition: width .6s var(--eo);
}
.df-row.cold .df-bar i { background: linear-gradient(90deg, #b9a99a, #d8cabb); }
.df-row em { font-style: normal; text-align: right; color: var(--muted); font-size: 10px; }
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px;
  margin-bottom: 12px; font-size: 11px; color: var(--ink-2);
}
.stats-grid div { display: flex; justify-content: space-between; gap: 6px; }
.stats-grid b { font-family: var(--mono); color: var(--ink); font-weight: 600; }

/* ---- 中奖注数：公众买得多 / 买得少的数字 ---- */
.crowd-box {
  margin: 2px 0 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
}
.cd-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-size: 10.5px; color: var(--ink-2); margin-bottom: 7px;
}
.cd-head i { font-style: normal; font-size: 9.5px; color: var(--muted); }
.cd-line { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.cd-line > span { font-size: 9.5px; color: var(--muted); width: 48px; flex: none; }
.cd {
  display: inline-flex; align-items: baseline; gap: 3px;
  font-family: var(--mono); font-size: 10px;
  padding: 2px 7px; border-radius: 99px; border: 1px solid transparent;
}
.cd b { font-size: 11px; }
.cd.hot { color: var(--red-deep); background: rgba(171, 55, 47, .08); border-color: rgba(171, 55, 47, .18); }
.cd.cold { color: #2c6e58; background: rgba(46, 142, 104, .09); border-color: rgba(46, 142, 104, .2); }
.cd-note { margin-top: 8px; font-size: 9.5px; line-height: 1.6; color: var(--muted); }
