/* ========== 流金 FLUX MONEY · 样式 ========== */
:root {
  --bg: #000000;
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.34);
  --tx: #f2f2f2;
  --tx-2: rgba(255, 255, 255, 0.58);
  --tx-3: rgba(255, 255, 255, 0.34);
  --gold: #d8b878;
  --gold-dim: rgba(216, 184, 120, 0.55);
  --up: #ff5a5a;
  --down: #3ddc97;
  --panel-radius: 22px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas, "PingFang SC", monospace;
}
/* 国际配色：绿涨红跌 */
body.intl-color {
  --up: #3ddc97;
  --down: #ff5a5a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font);
  font-weight: 200;
  overflow: hidden;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; letter-spacing: inherit; }
b { font-weight: 400; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.up { color: var(--up); }
.down { color: var(--down); }
.m5 { color: #e6c26e; }
.m10 { color: #7fb3ff; }
.m20 { color: #c79bff; }

/* ========== P1 启动闪屏 ========== */
#splash {
  position: fixed; inset: 0; z-index: 100;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease;
  cursor: pointer;
}
#splash.leaving { opacity: 0; pointer-events: none; }
#splash-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.splash-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 38%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.splash-content {
  position: relative; z-index: 2;
  text-align: center;
  animation: splashIn 1.2s ease both;
}
@keyframes splashIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.splash-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 100;
  letter-spacing: 0.42em;
  margin-left: 0.42em; /* 平衡字距 */
  color: #fff;
}
.splash-logo-slot {
  display: flex; justify-content: center; align-items: center;
  margin-bottom: 28px;
}
.splash-logo {
  display: block;
  width: 112px; height: 112px;
  border-radius: 20%;
  filter: drop-shadow(0 0 30px rgba(216, 184, 120, 0.18));
}
.splash-cn {
  margin-top: 18px;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 200;
  letter-spacing: 1.1em;
  margin-left: 1.1em;
  color: rgba(255, 255, 255, 0.92);
}
.splash-by {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 200;
  letter-spacing: 0.3em;
  margin-left: 0.3em;
  color: var(--tx-3);
}
.splash-dash {
  width: 210px; height: 0;
  margin: 34px auto 30px;
  border-top: 1px dashed rgba(255, 255, 255, 0.38);
}
.splash-loading {
  font-size: 13px;
  font-weight: 200;
  letter-spacing: 0.18em;
  color: var(--tx-2);
}
.splash-loading .dots i {
  font-style: normal;
  animation: dotBlink 1.4s infinite;
}
.splash-loading .dots i:nth-child(2) { animation-delay: 0.2s; }
.splash-loading .dots i:nth-child(3) { animation-delay: 0.4s; }
.splash-loading .dots i:nth-child(4) { animation-delay: 0.6s; }
.splash-loading .dots i:nth-child(5) { animation-delay: 0.8s; }
.splash-loading .dots i:nth-child(6) { animation-delay: 1s; }
@keyframes dotBlink {
  0%, 60%, 100% { opacity: 0.15; }
  30% { opacity: 1; }
}
.splash-foot {
  position: absolute; bottom: 34px; left: 0; right: 0; z-index: 2;
  text-align: center;
}
.splash-slogan {
  font-size: 13px; font-weight: 200;
  letter-spacing: 0.5em; margin-left: 0.5em;
  color: var(--tx-2);
}
.splash-hint {
  margin-top: 14px;
  font-size: 10px; font-weight: 200;
  letter-spacing: 0.3em; margin-left: 0.3em;
  color: var(--tx-3);
  opacity: 0;
  animation: hintIn 1s ease 2.2s forwards;
}
@keyframes hintIn { to { opacity: 1; } }

/* ========== 主界面框架 ========== */
.app {
  height: 100vh;
  display: flex; flex-direction: column;
  opacity: 0;
  transition: opacity 0.7s ease;
}
body.ready .app { opacity: 1; }
body.booting .app { visibility: hidden; }

.topbar {
  height: 52px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-logo-slot { display: inline-flex; align-self: center; }
.brand-logo {
  display: block;
  width: 30px; height: 30px;
  border-radius: 8px;
  filter: drop-shadow(0 0 10px rgba(216, 184, 120, 0.12));
}
.brand-cn { font-size: 17px; font-weight: 300; letter-spacing: 0.35em; color: var(--gold); }
.brand-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--tx-3); align-self: center; }
.brand-en { font-size: 11px; font-weight: 200; letter-spacing: 0.28em; color: var(--tx-2); }
.status-badge {
  font-size: 9px; letter-spacing: 0.14em;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--tx-3);
  align-self: center;
}
.status-badge.live { color: #3ddc97; border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.07); }
.status-badge.err { color: #ff5a5a; border-color: rgba(255, 90, 90, 0.4); background: rgba(255, 90, 90, 0.07); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.clock { font-family: var(--mono); font-size: 12px; color: var(--tx-2); font-variant-numeric: tabular-nums; }
.icon-btn {
  background: none; border: none; color: var(--tx-2);
  cursor: pointer; padding: 6px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--tx); background: rgba(255, 255, 255, 0.06); }

.layout {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 34fr 66fr;
  grid-template-rows: 42fr 58fr;
  gap: 14px;
  padding: 0 22px 22px;
}
.layout > .panel-left { grid-row: span 2; }
.panel-live, .panel-us { min-height: 0; }

/* 面板通用 */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 12px;
  min-height: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0) 40%);
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex: none;
}
.panel-title { font-size: 14px; font-weight: 300; letter-spacing: 0.14em; color: var(--tx); }
.panel-sub { font-size: 10px; font-weight: 200; letter-spacing: 0.2em; color: var(--tx-3); }

/* 搜索框 */
.searchbox { position: relative; flex: none; }
.search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tx-3); pointer-events: none; }
.searchbox input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px 11px 38px;
  color: var(--tx);
  font-family: inherit; font-size: 13px; font-weight: 200; letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.searchbox input::placeholder { color: var(--tx-3); }
.searchbox input:focus { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  z-index: 30;
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 14px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
}
.sr-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.15s;
}
.sr-row:last-child { border-bottom: none; }
.sr-row:hover { background: rgba(255, 255, 255, 0.05); }
.sr-name { font-size: 13px; font-weight: 300; min-width: 72px; }
.sr-code { font-family: var(--mono); font-size: 11px; color: var(--tx-3); }
.sr-price { margin-left: auto; font-family: var(--mono); font-size: 12px; }
.sr-pct { font-family: var(--mono); font-size: 11px; min-width: 62px; text-align: right; }
.sr-empty { padding: 14px; font-size: 12px; color: var(--tx-3); text-align: center; letter-spacing: 0.1em; }
.sr-btn {
  flex: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--tx-2);
  font-size: 10px;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.05em;
}
.sr-btn:hover { color: var(--tx); border-color: var(--line-strong); }
.sr-btn.gold { color: var(--gold-dim); border-color: rgba(216, 184, 120, 0.35); }
.sr-btn.gold:hover { color: var(--gold); border-color: var(--gold-dim); }

/* 指数栏 */
.indices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: none; }
.index-chip {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.index-chip:hover { border-color: var(--line); }
.idx-top { display: flex; justify-content: space-between; align-items: baseline; }
.idx-name { font-size: 11px; font-weight: 200; color: var(--tx-2); letter-spacing: 0.1em; }
.idx-pct { font-family: var(--mono); font-size: 12px; }
.idx-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.idx-val { font-family: var(--mono); font-size: 17px; font-weight: 300; letter-spacing: 0; }
.idx-spark { flex: none; opacity: 0.9; }
.idx-time { font-size: 8px; color: var(--tx-3); font-family: var(--mono); letter-spacing: 0.05em; margin-top: 2px; }

/* 关注列表 */
.watch { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.watch-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; font-weight: 200; color: var(--tx-2); letter-spacing: 0.1em;
  flex: none;
}
.watch-head b { font-family: var(--mono); font-weight: 400; color: var(--tx); margin-left: 2px; }
.watch-tip { font-size: 10px; color: var(--tx-3); letter-spacing: 0.08em; }
.watch-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-right: 2px;
}
.watch-list::-webkit-scrollbar, .live-feed::-webkit-scrollbar, .search-results::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .analysis-list::-webkit-scrollbar { width: 4px; }
.watch-list::-webkit-scrollbar-thumb, .live-feed::-webkit-scrollbar-thumb, .search-results::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .analysis-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 2px; }

.stock-card {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 12px 14px 10px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  flex: none;
}
.stock-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.025); transform: translateY(-1px); }
.card-top { display: flex; align-items: baseline; gap: 8px; }
.card-name { font-size: 13px; font-weight: 300; }
.card-code { font-family: var(--mono); font-size: 10px; color: var(--tx-3); }
.card-remove {
  position: absolute; top: 8px; right: 8px;
  width: 20px; height: 20px;
  border: none; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--tx-3);
  font-size: 11px; line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.stock-card:hover .card-remove { opacity: 1; }
.card-remove:hover { color: var(--up); background: rgba(255, 90, 90, 0.12); }
.card-spark { margin: 6px 0 2px; display: block; width: 100%; }
.card-spark-wrap { position: relative; margin: 6px 0 2px; min-height: 44px; }
.card-spark-label {
  position: absolute; right: 10px; top: 8px; z-index: 2;
  font-size: 8px; color: var(--tx-3); letter-spacing: 0.08em;
}
.card-bottom { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.card-price { font-family: var(--mono); font-size: 14px; font-weight: 300; }
.card-pct-wrap { display: flex; align-items: baseline; gap: 8px; }
.card-pct-label { font-size: 9px; color: var(--tx-3); letter-spacing: 0.1em; }
.card-pct { font-family: var(--mono); font-size: 14px; font-weight: 300; }
.watch-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 22px 14px;
  text-align: center;
  font-size: 11px; color: var(--tx-3); letter-spacing: 0.12em;
  line-height: 2;
}
.us-note { flex: none; font-size: 9px; color: var(--tx-3); letter-spacing: 0.14em; text-align: center; padding-top: 2px; }

/* ========== 直播面板 ========== */
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--up);
}
.live-badge.off { color: var(--tx-3); }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  animation: livePulse 1.6s ease infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.35); }
  50% { opacity: 0.55; box-shadow: 0 0 0 4px rgba(255, 90, 90, 0); }
}
.cam-badge {
  margin-left: auto;
  font-size: 9px; letter-spacing: 0.1em;
  color: var(--tx-3);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 7px;
}
.cam-badge.on { color: #3ddc97; border-color: rgba(61, 220, 151, 0.4); }

/* 信号源模块 */
.sig {
  position: relative; flex: none; height: 128px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  background: #050505;
}
.sig-stage { position: absolute; inset: 0; }
.sig-stage video, .sig-stage iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; object-fit: cover; background: #000;
}
.sig-hud-top, .sig-hud-bot {
  position: absolute; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 6px 10px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 3; pointer-events: none;
}
.sig-hud-top { top: 0; }
.sig-hud-bot { bottom: 0; color: rgba(255, 255, 255, 0.5); }
.sig-live { display: inline-flex; align-items: center; gap: 5px; color: #ff5a5a; }
.sig-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff5a5a; animation: livePulse 1.6s infinite; }
.sig-empty {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; text-align: center;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 8px, transparent 8px 16px), #070707;
}
.sig-empty b { font-size: 12px; font-weight: 300; letter-spacing: 0.3em; color: var(--tx-2); }
.sig-empty span { font-size: 9px; color: var(--tx-3); letter-spacing: 0.1em; }
.sig-empty .ghost-btn { width: auto; padding: 6px 14px; margin-top: 4px; }
.sig-ext {
  flex: none;
  font-size: 9px; color: var(--tx-3); letter-spacing: 0.08em;
  text-decoration: none; text-align: center;
}
.sig-ext:hover { color: var(--tx-2); }
.feed-label {
  flex: none;
  display: flex; justify-content: space-between;
  font-size: 9px; letter-spacing: 0.14em; color: var(--tx-3);
}
.live-split {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 14px;
}
.live-divider { background: var(--line-soft); }
.live-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.live-col-head { display: flex; align-items: baseline; gap: 8px; flex: none; }
.live-col-head b { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.12em; }
.live-col-head span { font-size: 10px; color: var(--tx-3); letter-spacing: 0.12em; }
.live-feed {
  flex: 1; min-height: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  gap: 4px;
}
.feed-row {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.015);
  animation: feedIn 0.5s ease both;
  flex: none;
}
@keyframes feedIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.feed-row.dim { opacity: 0.42; animation: none; }
.feed-time { color: var(--tx-3); font-size: 10px; flex: none; }
.feed-tk { min-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-tk b { font-weight: 400; color: var(--tx); font-size: 11px; }
.feed-tk span { color: var(--tx-3); font-size: 10px; margin-left: 4px; font-family: var(--font); font-weight: 200; }
.feed-price { margin-left: auto; }
.feed-pct { min-width: 58px; text-align: right; }
.feed-delta { min-width: 46px; text-align: right; color: var(--tx-3); }
.feed-delta.up { color: var(--up); }
.feed-delta.down { color: var(--down); }
.feed-tag {
  flex: none;
  font-size: 9px;
  color: var(--gold);
  border: 1px solid rgba(216, 184, 120, 0.4);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.1em;
  font-family: var(--font); font-weight: 200;
}
.feed-off {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--tx-3); letter-spacing: 0.2em;
  border: 1px dashed var(--line-soft);
  border-radius: 12px;
}

/* ========== 详情页 ========== */
.detail {
  position: fixed; inset: 0; z-index: 60;
  background: #000;
  display: flex; flex-direction: column;
  padding: 0 22px 22px;
  animation: detailIn 0.35s ease both;
}
@keyframes detailIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.detail-head {
  height: 64px; flex: none;
  display: flex; align-items: center; gap: 18px;
}
.detail-title { display: flex; align-items: baseline; gap: 10px; }
.detail-title b { font-size: 20px; font-weight: 300; letter-spacing: 0.06em; }
#d-code { font-size: 12px; color: var(--tx-3); }
.d-market {
  font-size: 9px; letter-spacing: 0.15em;
  color: var(--gold-dim);
  border: 1px solid rgba(216, 184, 120, 0.35);
  border-radius: 4px;
  padding: 2px 7px;
}
.detail-price { display: flex; align-items: baseline; gap: 12px; margin-left: 8px; }
.detail-price b { font-family: var(--mono); font-size: 24px; font-weight: 300; }
.detail-price .pct { font-family: var(--mono); font-size: 14px; }
.detail-tabs { margin-left: auto; display: flex; gap: 4px; }
.detail-tabs button {
  background: none; border: none;
  color: var(--tx-3);
  font-size: 12px; font-weight: 200; letter-spacing: 0.1em;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 9px;
  transition: all 0.2s;
}
.detail-tabs button:hover { color: var(--tx-2); }
.detail-tabs button.on { color: var(--tx); background: rgba(255, 255, 255, 0.08); }
.ma-legend { font-size: 10px; color: var(--tx-2); display: flex; gap: 12px; }
.ma-legend i { font-style: normal; margin-right: 3px; }
.ma-legend .m5 { color: #e6c26e; }
.ma-legend .m10 { color: #7fb3ff; }
.ma-legend .m20 { color: #c79bff; }

.detail-body {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
}
.chart-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  min-height: 0;
  overflow: hidden;
}
#chart { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.chart-tip {
  position: absolute; z-index: 5;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.9;
  color: var(--tx-2);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.chart-tip b { color: var(--tx); font-weight: 400; }

.analysis {
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  display: flex; flex-direction: column;
  padding: 16px;
  gap: 10px;
  min-height: 0;
}
.analysis-head { display: flex; justify-content: space-between; align-items: baseline; flex: none; font-size: 13px; font-weight: 300; letter-spacing: 0.12em; }
.analysis-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ana-box {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px 13px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  flex: none;
  animation: anaIn 0.4s ease both;
}
.ana-box:nth-child(2) { animation-delay: 0.06s; }
.ana-box:nth-child(3) { animation-delay: 0.12s; }
.ana-box:nth-child(4) { animation-delay: 0.18s; }
.ana-box:nth-child(5) { animation-delay: 0.24s; }
.ana-box:nth-child(6) { animation-delay: 0.3s; }
@keyframes anaIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.ana-box:hover { border-color: var(--gold-dim); background: rgba(216, 184, 120, 0.04); }
.ana-box.hit { border-color: rgba(216, 184, 120, 0.3); }
.ana-box.off { opacity: 0.5; border-style: dashed; }
.ana-box.off:hover { opacity: 0.85; }
.ana-row1 { display: flex; align-items: center; gap: 8px; }
.ana-row1 b { font-size: 13px; font-weight: 300; }
.ana-row1 .conf { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--tx-3); }
.ana-sum { display: block; margin-top: 6px; font-size: 11px; font-weight: 200; color: var(--tx-2); line-height: 1.7; }
.tag {
  flex: none;
  font-size: 9px; font-weight: 200; letter-spacing: 0.12em;
  border-radius: 4px;
  padding: 2px 7px;
  border: 1px solid;
}
.tag-bull { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, transparent); background: color-mix(in srgb, var(--up) 8%, transparent); }
.tag-bear { color: var(--down); border-color: color-mix(in srgb, var(--down) 45%, transparent); background: color-mix(in srgb, var(--down) 8%, transparent); }
.tag-neutral { color: var(--tx-2); border-color: var(--line); background: rgba(255, 255, 255, 0.04); }
.ana-off {
  flex: 1;
  border: 1px dashed var(--line);
  border-radius: 14px;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center;
  color: var(--tx-3); font-size: 11px; letter-spacing: 0.14em;
  line-height: 2;
  text-align: center;
  padding: 20px;
}
.ana-off .ghost-btn { pointer-events: auto; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: detailIn 0.25s ease both;
}
.modal {
  width: min(520px, calc(100vw - 48px));
  max-height: min(620px, calc(100vh - 80px));
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.28s ease both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  flex: none;
}
.modal-head b { font-size: 15px; font-weight: 300; letter-spacing: 0.06em; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 18px; overflow-y: auto; font-size: 12px; line-height: 2; }
.modal-body h4 {
  font-size: 11px; font-weight: 300; letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin: 14px 0 4px;
}
.modal-body h4:first-child { margin-top: 0; }
.modal-body p { font-weight: 200; color: var(--tx-2); }
.modal-conf { font-family: var(--mono); font-size: 11px; color: var(--tx-3); margin-top: 14px; letter-spacing: 0.08em; }

/* 设置抽屉 */
.drawer-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  animation: detailIn 0.25s ease both;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 75;
  width: 380px;
  background: #070707;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
  flex: none;
}
.drawer-head b { font-size: 16px; font-weight: 300; letter-spacing: 0.2em; }
.drawer-head .icon-btn { margin-left: auto; align-self: center; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px 24px; }
.set-group { padding: 16px 0 6px; border-bottom: 1px solid var(--line-soft); }
.set-group:last-child { border-bottom: none; }
.set-group-title { font-size: 10px; letter-spacing: 0.3em; color: var(--tx-3); margin-bottom: 12px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 0;
}
.set-info b { display: block; font-size: 13px; font-weight: 300; }
.set-info span { display: block; font-size: 10px; font-weight: 200; color: var(--tx-3); margin-top: 3px; letter-spacing: 0.05em; }

/* 开关 */
.switch {
  flex: none;
  width: 40px; height: 22px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  cursor: pointer;
  transition: all 0.25s;
}
.switch::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--tx-3);
  transition: all 0.25s;
}
.switch.on { background: rgba(216, 184, 120, 0.18); border-color: var(--gold-dim); }
.switch.on::after { left: 21px; background: var(--gold); }

/* 分段选择 */
.seg { display: flex; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; flex: none; }
.seg button {
  background: none; border: none;
  color: var(--tx-3);
  font-size: 11px; font-weight: 200; letter-spacing: 0.05em;
  padding: 6px 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.seg button + button { border-left: 1px solid var(--line-soft); }
.seg button.on { color: var(--tx); background: rgba(255, 255, 255, 0.08); }
.seg button:hover { color: var(--tx-2); }
.seg button.on:hover { color: var(--tx); }

.about { font-size: 11px; font-weight: 200; color: var(--tx-2); line-height: 2.2; letter-spacing: 0.05em; }
.ghost-btn {
  margin-top: 12px;
  width: 100%;
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--tx-2);
  font-size: 12px; font-weight: 200; letter-spacing: 0.15em;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.ghost-btn:hover { color: var(--tx); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.ghost-btn.small { width: auto; padding: 6px 12px; font-size: 11px; margin-top: 0; }
.src-row { display: flex; gap: 8px; margin: 4px 0 8px; }
.src-row input {
  flex: 1; min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--tx);
  font-family: var(--mono); font-size: 11px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s;
}
.src-row input:focus { border-color: var(--line-strong); }
.src-row select {
  flex: none;
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--tx-2);
  font-size: 11px;
  padding: 8px;
  outline: none;
}
.src-hint { font-size: 9px; color: var(--tx-3); line-height: 1.9; letter-spacing: 0.05em; }
.d-updated { font-size: 9px; color: var(--tx-3); }
.chart-wrap.loading::after {
  content: "正在拉取行情数据…";
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-3); font-size: 11px; letter-spacing: 0.2em;
  background: rgba(0, 0, 0, 0.55);
}

/* Toast */
.toast {
  position: fixed; bottom: 34px; left: 50%; z-index: 90;
  transform: translateX(-50%);
  background: rgba(16, 16, 16, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--tx);
  font-size: 12px; font-weight: 200; letter-spacing: 0.1em;
  padding: 10px 20px;
  animation: toastIn 0.3s ease both;
  pointer-events: none;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 窄屏兜底 */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; overflow-y: auto; }
  .panel-left { grid-row: auto; min-height: 420px; }
  .detail-body { grid-template-columns: 1fr; overflow-y: auto; }
  .analysis { max-height: 320px; }
}

/* ---------- 卡券：管理后台派发表单 ---------- */
.tag-gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.card-issue-form {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
}
.cif-row { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.cif-row > label { flex: none; width: 34px; color: var(--tx-3); font-weight: 200; letter-spacing: 0.2em; }
.cif-target { display: flex; align-items: center; gap: 8px; flex: 1; }
.cif-target input,
.cif-row input[type="number"] {
  height: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--tx);
  padding: 0 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.cif-target input { flex: 1; min-width: 0; }
.cif-row input[type="number"] { width: 72px; }
.cif-target input:focus, .cif-row input[type="number"]:focus { border-color: var(--gold-dim); }
.cif-hint { margin-left: auto; font-size: 10px; color: var(--tx-3); font-weight: 200; }
.card-issue-result {
  font-size: 11px; line-height: 1.8; color: var(--gold);
  padding: 8px 10px;
  border: 1px dashed color-mix(in srgb, var(--gold) 40%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--gold) 5%, transparent);
  word-break: break-all;
}
.mt { margin-top: 14px; }

/* ---------- 卡券：用户礼包弹窗 ---------- */
.card-present {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  width: min(400px, calc(100vw - 48px));
  padding: 30px 26px 26px;
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 22px;
  animation: modalIn 0.32s ease both;
}
.card-present-tip { font-size: 10px; letter-spacing: 0.18em; color: var(--tx-3); font-weight: 200; }
.card-present-btns { display: flex; gap: 10px; width: 100%; }
.card-present-btns button { flex: 1; }
.gift-card {
  position: relative;
  width: 100%;
  border-radius: 18px;
  padding: 22px 22px 18px;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(216, 184, 120, 0.28), transparent 55%),
    radial-gradient(100% 120% at 90% 100%, rgba(216, 184, 120, 0.12), transparent 50%),
    linear-gradient(155deg, #14110b 0%, #0d0c08 60%, #191510 100%);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(216, 184, 120, 0.18);
  transition: opacity 0.4s ease, filter 0.4s ease;
}
.gift-card.charge {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(61, 220, 151, 0.18), transparent 55%),
    radial-gradient(100% 120% at 90% 100%, rgba(216, 184, 120, 0.14), transparent 50%),
    linear-gradient(155deg, #101408 0%, #0b0d08 60%, #12160f 100%);
  border-color: color-mix(in srgb, var(--up) 40%, transparent);
}
.gift-card.used { opacity: 0.35; filter: grayscale(0.8); }
.gc-shine {
  position: absolute; top: -60%; bottom: -60%; left: -30%;
  width: 45%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  animation: gcShine 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gcShine {
  0% { left: -45%; }
  55%, 100% { left: 130%; }
}
.gc-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.gc-logo {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.22em;
  color: #0d0c08;
  background: linear-gradient(135deg, #e8cf9a, var(--gold));
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: 400;
}
.gift-card.charge .gc-logo { background: linear-gradient(135deg, #a9f0cd, var(--up)); }
.gc-brand { font-size: 11px; letter-spacing: 0.3em; color: var(--tx-3); font-weight: 200; }
.gc-type { font-size: 12px; letter-spacing: 0.34em; color: var(--gold-dim); font-weight: 200; margin-bottom: 6px; }
.gift-card.charge .gc-type { color: color-mix(in srgb, var(--up) 65%, #fff); }
.gc-value {
  font-size: 34px; font-weight: 200; letter-spacing: 0.04em;
  color: var(--tx);
  margin-bottom: 18px;
}
.gc-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 10px; color: var(--tx-3);
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 12px;
  letter-spacing: 0.08em;
}
.gc-note { margin-top: 8px; font-size: 10px; color: var(--tx-3); font-weight: 200; letter-spacing: 0.06em; }

/* ---------- 主按钮 / 危险按钮 ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px; font-weight: 300; letter-spacing: 0.14em;
  color: #0d0c08;
  background: linear-gradient(135deg, #e8cf9a, #d8b878);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); }
.btn-primary.small { height: 30px; padding: 0 14px; font-size: 11px; width: auto; margin-top: 0; }
.btn-primary.wide { width: 100%; height: 38px; }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--down) 55%, transparent);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px; font-weight: 300; letter-spacing: 0.14em;
  color: var(--down);
  background: color-mix(in srgb, var(--down) 10%, transparent);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-danger:hover { filter: brightness(1.25); }
.btn-danger:active { transform: translateY(1px); }

/* ---------- FUA经济上行指数 ---------- */
.fua-chip { grid-column: 1 / -1; cursor: pointer; }
.fua-chip .idx-top { margin-bottom: 2px; }
.fua-chip .idx-time { margin-top: 6px; }
.fua-bars { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.fua-bar {
  display: grid;
  grid-template-columns: 44px 1fr 58px;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}
.fua-bar em {
  font-style: normal;
  font-weight: 200;
  letter-spacing: 0.12em;
  color: var(--tx-2);
  white-space: nowrap;
}
.fua-bar .track {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}
.fua-bar .track i {
  position: absolute; top: 0; bottom: 0; left: 50%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.fua-bar .track i.up { background: linear-gradient(90deg, color-mix(in srgb, var(--up) 55%, transparent), var(--up)); transform: none; }
.fua-bar .track i.down { background: linear-gradient(270deg, color-mix(in srgb, var(--down) 55%, transparent), var(--down)); }
.fua-bar .fv { text-align: right; font-family: var(--mono); font-size: 10px; }
.fua-loading { font-size: 10px; color: var(--tx-3); font-weight: 200; letter-spacing: 0.14em; }
