/* QUANT store — ink desk + copper accent */
:root {
  --ink: #07090d;
  --ink-2: #0e1218;
  --panel: rgba(18, 24, 32, 0.82);
  --panel-solid: #121820;
  --line: rgba(196, 165, 116, 0.14);
  --line-strong: rgba(196, 165, 116, 0.28);
  --text: #e9e2d6;
  --muted: #8f877a;
  --copper: #c4a574;
  --copper-bright: #dfc396;
  --mint: #3dba9c;
  --coral: #e07060;
  --warn: #d4a017;
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Sarasa Mono SC", "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--ink); color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body { position: relative; overflow-x: hidden; }

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(196, 165, 116, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 165, 116, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 20%, transparent 75%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 15% -10%, rgba(196, 165, 116, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 35% at 90% 10%, rgba(61, 186, 156, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(224, 112, 96, 0.04), transparent 55%);
}

.top, #app, .foot, dialog { position: relative; z-index: 1; }

a { color: var(--copper-bright); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #fff; }
.muted { color: var(--muted); }
.err { color: var(--coral); font-size: 13px; min-height: 1.2em; margin: 0; }
.hidden { display: none !important; }
.pos { color: var(--coral); }   /* 红赚 */
.neg { color: var(--mint); }    /* 绿亏 */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.72);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 12px; color: var(--text);
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--mono); font-weight: 600; font-size: 16px;
  color: var(--ink);
  background: linear-gradient(145deg, var(--copper-bright), var(--copper));
  box-shadow: 0 0 0 1px rgba(223, 195, 150, 0.35), 0 8px 24px rgba(196, 165, 116, 0.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-weight: 800; font-size: 15px; letter-spacing: 0.18em;
}
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; margin-top: 2px; }
.top-right { display: flex; gap: 12px; align-items: center; }
.nav {
  display: flex; gap: 6px; align-items: center; flex: 1; justify-content: center;
  margin: 0 16px;
}
.nav a {
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 8px 12px; border-radius: 999px; text-decoration: none;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--copper-bright); text-decoration: none; }
.nav a.active {
  color: var(--ink); background: linear-gradient(145deg, var(--copper-bright), var(--copper));
}
@media (max-width: 860px) {
  .top { flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; margin: 0; }
}
.home-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px;
}
@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } }
.home-card {
  display: block; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: inherit;
  text-decoration: none; transition: border-color .2s, transform .2s;
}
.home-card:hover { border-color: var(--line-strong); transform: translateY(-2px); text-decoration: none; color: inherit; }
.home-card .hk { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--copper); margin-bottom: 10px; }
.home-card h3 { margin: 0 0 8px; font-size: 18px; }
.home-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.preview-hint { font-size: 11px; color: var(--muted); margin: 0 0 8px; padding: 0 2px; }
.user-chip {
  font-family: var(--mono); font-size: 12px; color: var(--copper-bright);
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(196, 165, 116, 0.06);
}

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px;
  background: linear-gradient(145deg, var(--copper-bright), var(--copper));
  color: var(--ink);
  transition: transform .2s var(--ease), filter .2s, box-shadow .2s;
  box-shadow: 0 6px 18px rgba(196, 165, 116, 0.22);
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--copper); color: var(--copper-bright); filter: none; }
.btn.good {
  background: linear-gradient(145deg, #55cbb0, var(--mint));
  color: #042018; box-shadow: 0 6px 18px rgba(61, 186, 156, 0.25);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

#app { max-width: 1180px; margin: 0 auto; padding: 28px 20px 56px; }

/* ---------- store hero ---------- */
.hero {
  margin-bottom: 36px;
  animation: rise 0.7s var(--ease) both;
}
.hero-kicker {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.22em; color: var(--copper);
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0 0 12px; font-size: clamp(34px, 6vw, 56px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.05;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--copper-bright), #fff 45%, var(--mint));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  max-width: 36em; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.hero-meta b { color: var(--text); font-weight: 500; }

.section-label {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 8px 0 16px; gap: 12px;
}
.section-label h2 {
  margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- cards ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.card {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 20px 18px;
  cursor: pointer; backdrop-filter: blur(8px);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s;
  animation: rise 0.6s var(--ease) both;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--copper), transparent);
  opacity: 0; transition: opacity .25s;
}
.card:hover {
  border-color: var(--line-strong); transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }
.card-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 10px;
}
.card h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.card-tag {
  flex-shrink: 0; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted);
}
.card-tag.owned { color: var(--mint); border-color: rgba(61, 186, 156, 0.35); background: rgba(61, 186, 156, 0.08); }
.card .meta { font-size: 12px; color: var(--muted); line-height: 1.55; }
.card .meta .sid { font-family: var(--mono); font-size: 11px; opacity: 0.85; margin-bottom: 4px; }
.card .stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.stat-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; letter-spacing: 0.04em; }
.stat-val { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px;
}
.card .price {
  font-family: var(--mono); font-size: 20px; font-weight: 600; color: var(--copper-bright);
}
.card .price.free { color: var(--mint); font-size: 14px; letter-spacing: 0.08em; }
.card-cta { font-size: 12px; color: var(--muted); }

/* ---------- detail ---------- */
.detail-head { margin-bottom: 20px; animation: rise 0.55s var(--ease) both; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); margin-bottom: 14px;
}
.back-link:hover { color: var(--copper-bright); text-decoration: none; }
.detail-head h1 {
  margin: 0 0 10px; font-size: clamp(24px, 4vw, 32px); font-weight: 750;
  letter-spacing: -0.02em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,0.02);
}
.badge.owned { color: var(--mint); border-color: rgba(61, 186, 156, 0.35); background: rgba(61, 186, 156, 0.08); }
.badge.lock { color: var(--warn); border-color: rgba(212, 160, 23, 0.35); background: rgba(212, 160, 23, 0.08); }

.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 16px 0 8px;
}
@media (max-width: 720px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.kpi .k { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 6px; }
.kpi .v { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.disclaimer-line { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.unlock-bar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  background: linear-gradient(120deg, rgba(196, 165, 116, 0.08), rgba(61, 186, 156, 0.05));
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 18px;
  animation: rise 0.55s var(--ease) 0.05s both;
}
.unlock-bar .unlock-copy { flex: 1; min-width: 200px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.unlock-bar strong {
  font-family: var(--mono); font-size: 22px; color: var(--copper-bright); font-weight: 600;
}

.eq-block {
  margin-bottom: 16px; animation: rise 0.55s var(--ease) 0.08s both;
}
.eq-block .eq-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.eq-mini {
  height: 128px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px 6px;
}

.layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 14px; min-height: 520px;
  animation: rise 0.55s var(--ease) 0.1s both;
}
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

.side {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; max-height: 680px; overflow: auto;
}
.side-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.side input, .side select, .auth-box input {
  width: 100%; background: var(--ink-2); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: 9px 10px; font-family: var(--font); font-size: 13px;
  outline: none; transition: border-color .2s;
}
.side input:focus, .side select:focus, .auth-box input:focus { border-color: var(--copper); }
.side select { cursor: pointer; }

.sym-item {
  padding: 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.sym-item:hover { background: rgba(255, 255, 255, 0.03); }
.sym-item.active {
  border-color: var(--line-strong);
  background: rgba(196, 165, 116, 0.07);
}
.sym-item .code { font-weight: 600; }
.sym-item .code .muted { font-weight: 400; margin-left: 4px; }
.sym-item .sub { color: var(--muted); font-size: 11px; margin-top: 4px; font-family: var(--mono); }

.chart-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chart-wrap {
  position: relative; background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; min-height: 480px;
}
.chart-caption {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 4px 8px; font-size: 11px; color: var(--muted); letter-spacing: 0.08em;
}
#chart { width: 100%; height: min(70vh, 720px); min-height: 520px; }
#vol { width: 100%; height: 90px; margin-top: 2px; }
.wm {
  pointer-events: none; position: absolute; inset: 36px 8px 8px; display: flex; flex-wrap: wrap;
  align-content: space-around; justify-content: space-around; opacity: 0.06;
  font-family: var(--mono); font-size: 16px; color: #fff; user-select: none; z-index: 2;
}
.wm span { transform: rotate(-24deg); padding: 36px; white-space: nowrap; }

.table-wrap {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: auto; max-height: 300px;
}
.table-caption {
  padding: 10px 14px 0; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--mono); }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
th {
  color: var(--muted); font-weight: 500; font-family: var(--font);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  position: sticky; top: 0; background: var(--panel-solid);
}
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(196, 165, 116, 0.04); }

/* ---------- auth ---------- */
.auth-box { display: flex; flex-direction: column; gap: 12px; min-width: min(320px, 86vw); padding: 4px; }
.auth-head { margin-bottom: 4px; }
.auth-kicker {
  display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--copper); margin-bottom: 6px;
}
.auth-box h3 { margin: 0; font-size: 22px; font-weight: 700; }
.auth-box label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.auth-box .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
dialog {
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--panel-solid); color: var(--text);
  padding: 22px; box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(4, 6, 10, 0.72); backdrop-filter: blur(4px); }
dialog[open] { animation: pop 0.28s var(--ease); }

.empty {
  color: var(--muted); padding: 56px 20px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,0.01);
}

.foot {
  text-align: center; padding: 28px 16px 40px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line); margin-top: 24px;
}
.foot-brand {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--copper); margin-bottom: 8px;
}
.foot p { margin: 0; }
.foot-legal-strong {
  max-width: 720px; margin: 0 auto 12px !important; line-height: 1.65; color: var(--text-dim, var(--muted));
}
.foot-links {
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
  margin: 0 0 10px !important;
}
.foot-links a { color: var(--copper-bright); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-meta, .foot-beian { margin-top: 6px !important; font-size: 11px; opacity: 0.85; }
.foot-beian a { color: var(--muted); }

.risk-banner {
  position: sticky; top: 0; z-index: 40;
  background: rgba(20, 16, 10, 0.94);
  border-bottom: 1px solid rgba(212, 160, 23, 0.35);
  backdrop-filter: blur(8px);
}
.risk-banner-inner {
  max-width: 1100px; margin: 0 auto; padding: 10px 16px;
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
}
.risk-banner p {
  margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); flex: 1;
}
.risk-banner strong { color: var(--warn, #d4a017); font-weight: 600; }
.risk-banner a { color: var(--copper-bright); }

.hero-risk {
  margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted);
  max-width: 52ch;
}
.hero-risk a { color: var(--copper-bright); }

.consent-block { margin-top: 2px; }
.consent-line {
  display: flex !important; flex-direction: row !important; align-items: flex-start;
  gap: 10px !important; font-size: 12px; line-height: 1.5; color: var(--muted);
}
.consent-line input { width: auto !important; margin-top: 3px; accent-color: var(--copper); }
.consent-line a { color: var(--copper-bright); }

/* legal pages */
.legal-body { min-height: 100vh; }
.legal-doc {
  max-width: 760px; margin: 0 auto; padding: 28px 20px 64px;
  animation: rise 0.45s var(--ease) both;
}
.legal-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--copper); margin: 0 0 8px;
}
.legal-doc h1 {
  margin: 0 0 10px; font-size: clamp(26px, 4vw, 34px); font-weight: 750;
}
.legal-meta { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 24px; }
.legal-doc h2 {
  margin: 28px 0 10px; font-size: 17px; font-weight: 650;
  color: var(--text);
}
.legal-doc ol { margin: 0; padding-left: 1.2em; color: var(--muted); line-height: 1.7; font-size: 14px; }
.legal-doc li { margin: 0 0 8px; }
.legal-doc p { color: var(--muted); line-height: 1.7; font-size: 14px; }
.legal-doc a { color: var(--copper-bright); }
.legal-foot-note {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px !important;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
