/* CK-find — 深色信息流 + 股市终端 */
:root {
  --bg: #000000;
  --card: #16181c;
  --card-2: #1c1f24;
  --border: #2f3336;
  --border-soft: rgba(47, 51, 54, 0.85);
  --text: #e7e9ea;
  --muted: #71767b;
  --blue: #1d9bf0;
  --blue-soft: rgba(29, 155, 240, 0.12);
  --blue-hover: #1a8cd8;
  --up: #f4212e;
  --up-soft: rgba(244, 33, 46, 0.12);
  --down: #00ba7c;
  --down-soft: rgba(0, 186, 124, 0.12);
  --warn: #ffd400;
  --purple: #7856ff;
  --radius: 16px;
  --shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 12px 40px rgba(0,0,0,0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
.muted { color: var(--muted); }
.tiny { font-size: 0.78rem; line-height: 1.5; }

/* 顶部 ticker */
.ticker {
  position: sticky; top: 0; z-index: 30;
  height: 36px; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #0a0a0a, #111827 40%, #0a0a0a);
  display: flex; align-items: center;
}
.ticker-track {
  display: flex; gap: 28px; white-space: nowrap;
  animation: ticker 40s linear infinite;
  padding-left: 100%;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.ticker-item {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 0.78rem; font-family: var(--mono); font-weight: 650;
}
.ticker-item .t-name { color: var(--muted); font-family: var(--font); font-weight: 600; }
.ticker-item .t-px { color: var(--text); }

.shell {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: 260px minmax(0, 640px) 340px;
  min-height: calc(100vh - 36px);
}

.board-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px 6px; border-bottom: 1px solid transparent;
}
.board-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 750; color: var(--muted);
  letter-spacing: 0.02em;
}
.board-label svg { color: var(--blue); }
.board-legend { display: flex; gap: 10px; font-size: 0.72rem; font-weight: 700; }
.board-legend .lg { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); }
.board-legend .lg.up { color: var(--up); background: var(--up-soft); border-color: rgba(244,33,46,.25); }
.board-legend .lg.down { color: var(--down); background: var(--down-soft); border-color: rgba(0,186,124,.25); }
.board-legend .lg.flat { color: var(--muted); }

.build-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 10px 16px;
  background: linear-gradient(90deg, rgba(29,155,240,.12), transparent);
  border-bottom: 1px solid rgba(29,155,240,.25);
  color: var(--blue); font-size: 0.84rem; font-weight: 650;
}
.build-banner[hidden] { display: none !important; }
.build-spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(29,155,240,.25); border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.feed-head {
  display: grid; grid-template-columns: 1fr auto;
  gap: 12px; padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  position: sticky; top: 61px; z-index: 8;
  background: rgba(0,0,0,.88); backdrop-filter: blur(10px);
}
.fh-cols { display: grid; grid-template-columns: 72px 88px; gap: 8px; text-align: right; }

/* ========== Left nav ========== */
.nav {
  position: sticky; top: 0; height: 100vh;
  padding: 8px 12px 16px;
  display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--border);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 18px; color: var(--text);
  border-radius: 18px; width: fit-content;
  transition: background .15s;
}
.nav-brand:hover { background: rgba(231,233,234,.08); }
.logo {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 20px rgba(29,155,240,.25);
  transition: transform .2s, box-shadow .2s;
}
.logo-svg { width: 42px; height: 42px; display: block; border-radius: 14px; }
.nav-brand:hover .logo {
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 0 0 1px rgba(240,185,11,.35), 0 10px 28px rgba(29,155,240,.35);
}
.brand-meta { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.brand-text {
  font-weight: 800; font-size: 1.28rem; letter-spacing: -0.04em;
}
.brand-sub {
  font-size: 0.68rem; color: var(--muted); font-weight: 650; letter-spacing: 0.04em;
}
.nav-links { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 16px;
  border: 0; background: transparent; color: var(--text);
  padding: 12px 16px; border-radius: 999px; cursor: pointer;
  font-size: 1.2rem; font-weight: 500; text-align: left;
  transition: background .12s;
}
.nav-item:hover { background: rgba(231, 233, 234, 0.1); }
.nav-item.active { font-weight: 800; }
.nav-item.active .ico { color: var(--blue); }
.nav-item .ico { display: grid; place-items: center; width: 28px; }
.nav-cta {
  margin: 14px 8px 0; width: calc(100% - 16px);
  box-shadow: 0 0 0 0 rgba(29,155,240,.4);
  transition: transform .15s, box-shadow .2s, background .15s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(29,155,240,.25); }
.nav-foot {
  margin-top: auto;
  padding: 12px 8px 8px;
  border-top: 1px solid var(--border);
}

/* 侧栏市场状态卡 */
.market-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(28,31,36,.98), rgba(12,14,18,.96));
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.market-card[data-live="1"] {
  border-color: rgba(0, 186, 124, 0.35);
  box-shadow: 0 0 0 1px rgba(0,186,124,.08), 0 8px 24px rgba(0,0,0,.25);
}
.market-card-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.market-card-title {
  font-size: 0.72rem; font-weight: 750; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.market-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 700; color: var(--muted);
  padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
}
.market-card[data-live="1"] .market-live {
  color: var(--down);
  border-color: rgba(0,186,124,.3);
  background: var(--down-soft);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #555; flex-shrink: 0;
}
.market-card[data-live="1"] .live-dot {
  background: var(--down);
  box-shadow: 0 0 0 0 rgba(0,186,124,.55);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,186,124,.45); }
  70% { box-shadow: 0 0 0 7px rgba(0,186,124,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,186,124,0); }
}
.market-rows { display: flex; flex-direction: column; gap: 6px; }
.market-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(47,51,54,.65);
}
.market-flag {
  width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 0.65rem; font-weight: 800; color: #fff;
}
.market-flag.cn { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.market-flag.us { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.market-name {
  font-size: 0.86rem; font-weight: 700; color: var(--text);
}
.market-state {
  font-size: 0.78rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid transparent;
  max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.market-state.open {
  color: var(--down);
  border-color: rgba(0,186,124,.3);
  background: var(--down-soft);
}
.market-state.pre {
  color: var(--blue);
  border-color: rgba(29,155,240,.3);
  background: var(--blue-soft);
}
.market-state.closed {
  color: var(--muted);
  border-color: var(--border);
}

/* 主栏标题旁精简状态 */
.tl-sub-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin-top: 3px;
}
.tl-sub { margin: 0; }
.session-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 650; color: var(--muted);
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(22,24,28,.7);
  max-width: 100%;
}
.session-inline .si-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #555; flex-shrink: 0;
}
.session-inline.live {
  color: var(--text);
  border-color: rgba(0,186,124,.35);
  background: rgba(0,186,124,.08);
}
.session-inline.live .si-dot {
  background: var(--down);
  animation: pulse 1.8s infinite;
}
#sessionInlineText {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: min(320px, 70vw);
  font-variant-numeric: tabular-nums;
}

/* ========== Buttons ========== */
.btn-primary {
  border: 0; border-radius: 999px; padding: 14px 18px; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-outline {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 700;
  transition: background .12s, border-color .12s;
}
.btn-outline:hover { background: rgba(239, 243, 244, 0.08); border-color: #536471; }
.btn-outline:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 12px; cursor: pointer; font-weight: 700; font-size: 0.9rem;
}
.btn-ghost:hover { background: rgba(239,243,244,.08); color: var(--text); }
.btn-ghost.accent { color: var(--blue); }
.btn-ghost.accent:hover { background: var(--blue-soft); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text); cursor: pointer;
  display: grid; place-items: center; font-size: 1rem;
}
.icon-btn:hover { background: rgba(239,243,244,.08); }

/* ========== Timeline ========== */
.timeline { border-right: 1px solid var(--border); min-width: 0; }
.tl-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.tl-title-wrap h1 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.tl-sub { margin: 2px 0 0; color: var(--muted); font-size: 0.78rem; }
.mode-row { display: flex; gap: 6px; flex-shrink: 0; }
.chip {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
  font-size: 0.86rem; font-weight: 700; transition: all .15s;
}
.chip:hover { border-color: #536471; color: var(--text); }
.chip.active {
  color: #fff; background: var(--blue); border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,155,240,.18);
}

.compose {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 0.95rem;
  background: var(--card); border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.avatar.lg { width: 52px; height: 52px; border-radius: 16px; }
.avatar.brand-avatar {
  border: 0; padding: 0; background: transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 6px 16px rgba(29,155,240,.2);
}
.avatar.brand-avatar svg { width: 100%; height: 100%; display: block; }
.avatar.mono-av {
  border: 0;
  position: relative;
  color: #fff;
  isolation: isolate;
}
.avatar.mono-av svg { width: 100%; height: 100%; display: block; }
.compose-field { flex: 1; min-width: 0; }
#search {
  width: 100%; border: 1px solid transparent; outline: none;
  background: var(--card); border-radius: 999px;
  padding: 12px 18px; color: var(--text);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
#search:focus {
  border-color: var(--blue);
  background: #000;
  box-shadow: 0 0 0 3px rgba(29,155,240,.2);
}
#search::placeholder { color: var(--muted); }
.compose-actions { display: flex; justify-content: flex-end; gap: 4px; margin-top: 8px; }

/* indices */
.indices-rail {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 1px; background: var(--border); border-bottom: 1px solid var(--border);
}
.idx {
  background: var(--bg); padding: 11px 12px;
  transition: background .12s; cursor: default;
  position: relative; overflow: hidden;
}
.idx::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: transparent;
}
.idx.up::after { background: linear-gradient(90deg, transparent, var(--up)); }
.idx.down::after { background: linear-gradient(90deg, transparent, var(--down)); }
.idx:hover { background: #080808; }
.idx .idx-top {
  display: flex; justify-content: space-between; align-items: center; gap: 4px;
}
.idx .name {
  color: var(--muted); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idx .mkt {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted);
}
.idx .mkt.cn { color: #fbbf24; border-color: rgba(251,191,36,.3); }
.idx .mkt.us { color: var(--blue); border-color: rgba(29,155,240,.3); }
.idx .mkt.hk { color: #a78bfa; border-color: rgba(167,139,250,.3); }
.idx .price {
  font-weight: 750; margin-top: 3px;
  font-variant-numeric: tabular-nums; font-size: 0.95rem;
  font-family: var(--mono);
}
.idx .chg {
  font-weight: 750; font-size: 0.8rem;
  font-variant-numeric: tabular-nums; font-family: var(--mono);
  margin-top: 1px;
}

/* stats */
.stats-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(22,24,28,.5), transparent);
}
.stat-pill {
  display: flex; align-items: baseline; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border-soft);
  font-size: 0.78rem;
}
.stat-pill.grow { margin-left: auto; }
.stat-pill .k { color: var(--muted); }
.stat-pill .v { font-weight: 750; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 0.82rem; }

/* feed posts */
.feed { display: flex; flex-direction: column; }
.post {
  display: grid; grid-template-columns: 48px 1fr; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
  animation: fadeIn .28s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.post:hover { background: rgba(255, 255, 255, 0.03); }
.post-body { min-width: 0; }
.post-hd { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.post-id { min-width: 0; flex: 1; }
.post-side {
  text-align: right; flex-shrink: 0;
  display: grid; grid-template-columns: 72px 88px; gap: 8px; align-items: start;
}
.post-nav-col, .post-chg-col { text-align: right; }
.post-nav-label, .post-session {
  font-size: 0.68rem; color: var(--muted); font-weight: 650; margin-bottom: 2px;
}
.post-nav-val {
  font-family: var(--mono); font-size: 0.88rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--text);
}
@media (max-width: 520px) {
  .feed-head .fh-cols, .post-side { grid-template-columns: 1fr; }
  .post-nav-col { display: none; }
  .feed-head .fh-cols span:first-child { display: none; }
}
.post-name {
  font-weight: 750; font-size: 0.98rem; line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-code {
  color: var(--muted); font-size: 0.84rem; margin-top: 2px;
  font-family: var(--mono);
}
.post-pct {
  font-size: 1.28rem; font-weight: 800;
  font-variant-numeric: tabular-nums; font-family: var(--mono);
  white-space: nowrap; letter-spacing: -0.03em;
  padding: 2px 0; line-height: 1.1;
}
.post-meta b { color: var(--text); font-weight: 700; }
.mono { font-family: var(--mono); font-size: 0.78rem; }
.hold-name { font-weight: 650; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--border); }
.table-wrap .hold-table th:first-child,
.table-wrap .hold-table td:first-child { padding-left: 12px; }
.table-wrap .hold-table th:last-child,
.table-wrap .hold-table td:last-child { padding-right: 12px; }
.formula-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; line-height: 1.55; font-size: 0.86rem;
}
.footer-note { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.78rem; }

.post-pct.up { color: var(--up); text-shadow: 0 0 24px rgba(244,33,46,.15); }
.post-pct.down { color: var(--down); text-shadow: 0 0 24px rgba(0,186,124,.15); }
.post-pct.flat { color: var(--muted); }

.bar-wrap {
  margin-top: 8px; height: 3px; border-radius: 99px;
  background: rgba(255,255,255,.06); overflow: hidden;
}
.bar {
  height: 100%; border-radius: 99px; max-width: 100%;
  transition: width .4s ease;
}
.bar.up { background: linear-gradient(90deg, transparent, var(--up)); }
.bar.down { background: linear-gradient(90deg, transparent, var(--down)); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  font-size: 0.78rem; color: var(--blue); font-weight: 650;
  transition: opacity .12s;
}
.tag:hover { text-decoration: underline; }

.post-meta {
  margin-top: 10px; color: var(--muted); font-size: 0.8rem;
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center;
}
.post-meta .meta-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-flex; align-items: center;
  font-size: 0.7rem; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); font-weight: 700;
}
.badge.warn { color: #111; background: var(--warn); border-color: var(--warn); }
.badge.danger { color: var(--up); border-color: rgba(244,33,46,.35); background: var(--up-soft); }
.badge.ok { color: var(--down); border-color: rgba(0,186,124,.35); background: var(--down-soft); }
.badge.blue { color: var(--blue); border-color: rgba(29,155,240,.4); background: var(--blue-soft); }

.post-actions {
  display: flex; gap: 4px; margin-top: 10px; color: var(--muted);
}
.act {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 10px; cursor: pointer;
  font-size: 0.78rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .12s, color .12s;
}
.act:hover { background: var(--blue-soft); color: var(--blue); }
.act.danger:hover { background: var(--up-soft); color: var(--up); }

/* skeleton */
.skeleton-post {
  display: grid; grid-template-columns: 48px 1fr; gap: 12px;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.sk {
  background: linear-gradient(90deg, #16181c 25%, #1f2328 50%, #16181c 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sk.av { width: 40px; height: 40px; border-radius: 999px; }
.sk.line { height: 12px; margin-bottom: 8px; }
.sk.line.w60 { width: 60%; }
.sk.line.w40 { width: 40%; }
.sk.line.w80 { width: 80%; }
.skeleton-line {
  height: 36px; border-radius: 8px; margin-bottom: 8px;
  background: linear-gradient(90deg, #16181c 25%, #1f2328 50%, #16181c 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite linear;
  list-style: none;
}

.pager {
  display: flex; justify-content: center; align-items: center; gap: 16px;
  padding: 20px; border-top: 1px solid var(--border);
}
.page-info {
  font-family: var(--mono); font-size: 0.85rem; color: var(--muted);
  min-width: 64px; text-align: center;
}
.empty {
  padding: 56px 24px; text-align: center; color: var(--muted);
}
.empty .empty-ico {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 1.4rem;
}
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 1.15rem; }
.empty p { margin: 0; font-size: 0.9rem; }

/* ========== Right rail ========== */
.rail {
  position: sticky; top: 0; height: 100vh; overflow: auto;
  padding: 12px 16px 28px;
  scrollbar-width: thin;
}
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px;
  border: 1px solid transparent;
}
.card.glass {
  background: linear-gradient(160deg, rgba(28,31,36,.95), rgba(22,24,28,.9));
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.card h3 { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.pill-soft {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--blue);
  background: var(--blue-soft); padding: 3px 8px; border-radius: 999px;
}
.pill-soft.live { color: var(--down); background: var(--down-soft); }
.engine-list { list-style: none; margin: 0; padding: 0; }
.engine-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; font-size: 0.88rem; color: var(--muted);
  border-bottom: 1px solid rgba(47,51,54,.5);
}
.engine-list li:last-child { border-bottom: 0; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
}
.dot.blue { background: var(--blue); }
.dot.green { background: var(--down); }
.dot.gold { background: var(--warn); }
.dot.purple { background: var(--purple); }

.trend-list { list-style: none; margin: 0; padding: 0; }
.trend-list li {
  padding: 10px 0; border-bottom: 1px solid rgba(47,51,54,.5);
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  font-size: 0.9rem;
}
.trend-list li:last-child { border-bottom: 0; }
.trend-list .t-name {
  font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trend-list .t-pct {
  font-family: var(--mono); font-weight: 750; font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.disclaimer { line-height: 1.55; }

/* ========== Drawer ========== */
.drawer-mask {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(91, 112, 131, 0.4);
  backdrop-filter: blur(2px);
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; width: min(500px, 100vw); height: 100%;
  background: #000; border-left: 1px solid var(--border); z-index: 50;
  transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,.5);
}
.drawer.open { transform: translateX(0); }
.drawer-hd {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(0,0,0,.92);
  backdrop-filter: blur(12px); z-index: 2;
}
.drawer-title-row { display: flex; gap: 12px; align-items: center; min-width: 0; }
.drawer-hd h2 {
  margin: 0; font-size: 1.15rem; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px;
}
.drawer-bd { padding: 16px; overflow: auto; flex: 1; }

.kv {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.kv .cell {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border-radius: 14px; padding: 12px 14px;
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.kv .cell:hover { border-color: #3e444a; }
.kv .label {
  color: var(--muted); font-size: 0.72rem; font-weight: 650;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.kv .value {
  margin-top: 6px; font-weight: 800; font-size: 1.2rem;
  font-variant-numeric: tabular-nums; font-family: var(--mono);
}
.section-title {
  margin: 18px 0 10px; font-size: 1rem; font-weight: 800;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--blue);
}
/* 首页限购条 */
.limit-strip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  font-size: 0.78rem;
}
.limit-strip .ls-label {
  font-weight: 800; color: var(--muted);
  letter-spacing: 0.04em; font-size: 0.7rem;
}
.limit-strip .ls-val { font-weight: 750; color: var(--text); }
.limit-strip .ls-min { color: var(--muted); margin-left: auto; font-weight: 650; }
.limit-strip.warn {
  border-color: rgba(255,212,0,.35); background: rgba(255,212,0,.08);
}
.limit-strip.warn .ls-val { color: #fbbf24; }
.limit-strip.danger {
  border-color: rgba(244,33,46,.35); background: var(--up-soft);
}
.limit-strip.danger .ls-val { color: var(--up); }
.limit-strip.ok {
  border-color: rgba(0,186,124,.3); background: var(--down-soft);
}
.limit-strip.ok .ls-val { color: var(--down); }
.limit-strip.pending { opacity: 0.75; }

/* 详情页 */
.detail-loading { padding: 28px 12px; }
.detail-hero {
  display: grid; grid-template-columns: 1.2fr 0.9fr; gap: 12px;
  margin-bottom: 14px;
}
.detail-hero-main {
  border-radius: 16px; padding: 16px;
  background: linear-gradient(145deg, rgba(29,155,240,.16), rgba(22,24,28,.95));
  border: 1px solid rgba(29,155,240,.28);
}
.detail-hero-label {
  font-size: 0.72rem; font-weight: 750; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.detail-hero-pct {
  font-size: 2rem; font-weight: 850; font-family: var(--mono);
  font-variant-numeric: tabular-nums; margin: 6px 0 4px; line-height: 1.1;
}
.detail-hero-sub { font-size: 0.82rem; color: var(--muted); }
.detail-hero-sub b { color: var(--text); font-family: var(--mono); }
.detail-hero-side { display: flex; flex-direction: column; gap: 8px; }
.mini-metric {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 0.82rem;
}
.mini-metric span { color: var(--muted); font-weight: 650; }
.mini-metric b { font-family: var(--mono); font-weight: 800; }
.conf-high { color: var(--down) !important; }
.conf-medium { color: var(--blue) !important; }
.conf-low { color: var(--muted) !important; }

.limit-panel {
  border-radius: 16px; padding: 14px; margin-bottom: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(28,31,36,.98), rgba(16,18,22,.96));
}
.limit-panel.ok { border-color: rgba(0,186,124,.35); box-shadow: inset 0 0 0 1px rgba(0,186,124,.08); }
.limit-panel.warn { border-color: rgba(255,212,0,.35); }
.limit-panel.danger { border-color: rgba(244,33,46,.35); }
.limit-panel-hd {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.limit-panel-title { font-weight: 800; font-size: 0.95rem; }
.limit-status-pill {
  font-size: 0.75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
}
.limit-panel.ok .limit-status-pill { color: var(--down); border-color: rgba(0,186,124,.3); background: var(--down-soft); }
.limit-panel.warn .limit-status-pill { color: #fbbf24; border-color: rgba(255,212,0,.3); background: rgba(255,212,0,.1); }
.limit-panel.danger .limit-status-pill { color: var(--up); border-color: rgba(244,33,46,.3); background: var(--up-soft); }
.limit-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.limit-cell {
  padding: 10px; border-radius: 12px;
  background: rgba(0,0,0,.28); border: 1px solid rgba(47,51,54,.6);
  display: flex; flex-direction: column; gap: 4px;
}
.limit-cell.wide { grid-column: 1 / -1; }
.limit-cell .k { font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.limit-cell .v { font-size: 0.92rem; font-weight: 750; }

.nav-panel {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 14px;
}
.nav-panel-item {
  padding: 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.nav-panel-item .k { font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.nav-panel-item .v { font-size: 0.98rem; font-weight: 800; }
.nav-panel-item .s { font-size: 0.7rem; color: var(--muted); }
.nav-panel-item .mono { font-family: var(--mono); }

.formula-details {
  margin-bottom: 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--card); overflow: hidden;
}
.formula-details summary {
  cursor: pointer; padding: 12px 14px; font-weight: 750; font-size: 0.9rem;
  list-style: none; color: var(--text);
}
.formula-details summary::-webkit-details-marker { display: none; }
.formula-details[open] summary { border-bottom: 1px solid var(--border); }
.formula-details .formula-box {
  margin: 0; border: 0; border-radius: 0; background: transparent;
}
.count-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 7px; margin-left: 6px;
  border-radius: 999px; font-size: 0.72rem; font-weight: 800;
  background: var(--blue-soft); color: var(--blue); vertical-align: middle;
}
.hold-code { font-size: 0.72rem; margin-top: 2px; }
.empty-soft {
  padding: 16px; border-radius: 12px; border: 1px dashed var(--border);
  color: var(--muted); text-align: center; font-size: 0.88rem;
}
.limit-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; line-height: 1.55; font-size: 0.9rem;
}
@media (max-width: 520px) {
  .detail-hero { grid-template-columns: 1fr; }
  .nav-panel { grid-template-columns: 1fr; }
}
.hold-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.hold-table th, .hold-table td {
  padding: 10px 6px; border-bottom: 1px solid var(--border);
}
.hold-table th {
  color: var(--muted); font-weight: 650; text-align: left;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.hold-table tr:hover td { background: rgba(255,255,255,.02); }
.hold-table .num {
  text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono);
}
.limit-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.limit-row:hover { background: rgba(255,255,255,.02); }

/* about entry + modal */
.about-entry {
  width: 100%; text-align: left; cursor: pointer; color: inherit;
  transition: border-color .15s, transform .15s;
}
.about-entry:hover { border-color: rgba(29,155,240,.45); transform: translateY(-1px); }
.about-entry-desc { margin: 0; }

/* 必须写，否则 .modal { display:flex } 会盖掉 HTML hidden，导致关不掉 */
[hidden] {
  display: none !important;
}

.modal-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(91, 112, 131, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-mask:not([hidden]) {
  display: block;
}
.modal {
  position: fixed; z-index: 90;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 28px));
  max-height: min(86vh, 720px);
  background: #000; border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
  flex-direction: column; overflow: hidden;
}
.modal:not([hidden]) {
  display: flex;
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
.modal-hd {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.modal-hd h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.modal-bd {
  padding: 8px 16px 16px; overflow: auto; flex: 1;
  -webkit-overflow-scrolling: touch;
}
.modal-sec { padding: 12px 0; border-bottom: 1px solid rgba(47,51,54,.6); }
.modal-sec:last-child { border-bottom: 0; }
.modal-sec h3 {
  margin: 0 0 8px; font-size: 0.95rem; font-weight: 800; color: var(--blue);
}
.modal-sec p { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.6; color: var(--text); }
.about-list { list-style: none; margin: 0; padding: 0; }
.about-list li {
  display: flex; gap: 12px; padding: 8px 0; font-size: 0.9rem;
  border-bottom: 1px solid rgba(47,51,54,.4);
}
.about-list li:last-child { border-bottom: 0; }
.about-list .k { color: var(--muted); min-width: 72px; flex-shrink: 0; }
.about-list .v { word-break: break-all; }
.modal-ft {
  padding: 12px 16px 16px; border-top: 1px solid var(--border);
}
.modal-ft .btn-primary { width: 100%; }

/* toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #fff; font-weight: 700;
  padding: 12px 20px; border-radius: 999px; z-index: 100;
  box-shadow: 0 8px 30px rgba(29,155,240,.35);
  animation: toastIn .25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* color utils used in JS */
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.flat { color: var(--muted) !important; }

/* 语言切换 */
.lang-switch {
  display: flex;
  gap: 0;
  margin: 10px 12px 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
  flex-shrink: 0;
}
.lang-switch.compact {
  margin: 0;
  align-self: center;
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  padding: 7px 12px;
  cursor: pointer;
  line-height: 1;
  transition: background .15s, color .15s;
}
.lang-btn:hover { color: var(--text); background: rgba(255,255,255,.04); }
.lang-btn.active {
  background: var(--blue-soft);
  color: var(--blue);
}
.lang-switch.compact .lang-btn {
  padding: 6px 10px;
  font-size: 0.72rem;
}

/* ========== Responsive ========== */
@media (max-width: 1140px) {
  .shell { grid-template-columns: 80px minmax(0, 1fr); }
  .rail { display: none; }
  .brand-text, .brand-sub, .brand-meta, .nav-item .lbl, .nav-cta .cta-label { display: none; }
  .nav { width: 80px; padding: 8px; align-items: center; }
  .nav-item { justify-content: center; padding: 12px; width: 52px; }
  .nav-cta { width: 52px; height: 52px; padding: 0; border-radius: 999px; margin: 8px 0 0; }
  .nav-cta::after { content: "↻"; font-size: 1.2rem; }
  .nav-brand { padding: 8px; }
  .nav-foot { display: none; }
  .session-inline { display: inline-flex; }
}
@media (max-width: 680px) {
  .shell { grid-template-columns: 1fr; }
  .feed-head { top: 56px; }
  .ticker { font-size: 0.72rem; }
  .nav {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0;
    height: auto; width: 100%; z-index: 30;
    flex-direction: row; justify-content: space-around; align-items: center;
    border-right: 0; border-top: 1px solid var(--border);
    background: rgba(0,0,0,.92); backdrop-filter: blur(16px);
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  }
  .nav-brand, .nav-cta, .nav-foot, .nav > .lang-switch { display: none; }
  .nav-links {
    flex-direction: row; width: 100%; justify-content: space-around;
  }
  .nav-item {
    flex-direction: column; gap: 2px; width: auto; padding: 8px 12px;
    font-size: 0.65rem;
  }
  .nav-item .lbl { display: block !important; font-size: 0.68rem; }
  .nav-item .ico svg { width: 22px; height: 22px; }
  .timeline { padding-bottom: 76px; border-right: 0; }
  .tl-header { flex-wrap: wrap; }
  .stat-pill.grow { margin-left: 0; width: 100%; }
  .kv { grid-template-columns: 1fr 1fr; }
}
