/* =========================================================================
 * AICompix · 设计系统（深色主题）
 * 配色源自品牌 Logo：黑底 + 白字 + 绿色强调（#76B900）
 * 涨跌色遵循中国市场惯例：红涨绿跌
 * ========================================================================= */

:root {
  --bg: #0b0d0f;
  --bg-soft: #121518;
  --surface: #15181c;
  --surface-2: #1a1e23;
  --border: #262b31;
  --border-strong: #333a42;

  --text: #f2f4f6;
  --text-2: #c0c7cf;
  --muted: #8b939d;

  --primary: #76b900;                     /* 品牌绿（取自 Logo） */
  --primary-dark: #5e9600;
  --primary-soft: rgba(118, 185, 0, .14);
  --primary-line: rgba(118, 185, 0, .45);
  --on-primary: #10130a;                  /* 绿底上的文字用近黑，对比更清晰 */

  --up: #ff5a5f;          /* 涨价（中国市场惯例：红涨） */
  --up-soft: rgba(255, 90, 95, .12);
  --down: #2fbf71;        /* 跌价（绿跌） */
  --down-soft: rgba(47, 191, 113, .12);
  --warn: #f5a623;
  --warn-soft: rgba(245, 166, 35, .12);
  --mute-soft: #20242a;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
p { margin: 0 0 8px; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ------------------------------------------------------------- 布局骨架 */

.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 15, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 22px;
}

.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--primary);
  color: var(--on-primary); font-size: 14px; font-weight: 800;
}
.logo-sub { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 2px; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 7px 13px; border-radius: 999px; color: var(--text-2);
  font-weight: 500; font-size: 13.5px; transition: .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }

.top-search { position: relative; width: 220px; }
.top-search input {
  width: 100%; height: 34px; padding: 0 12px 0 32px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); font-size: 13px; color: var(--text); outline: none;
}
.top-search input:focus { border-color: var(--primary-line); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }
.top-search .ico { position: absolute; left: 11px; top: 8px; color: var(--muted); font-size: 13px; }

.userbox { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: 12.5px;
}

.page { flex: 1; max-width: 1280px; width: 100%; margin: 0 auto; padding: 22px 20px 56px; }

.footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 22px 20px; color: var(--muted); font-size: 12.5px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }

/* --------------------------------------------------------------- 组件 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-size: 13.5px; font-weight: 500; cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary-line); color: var(--primary-dark); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--on-primary); }
.btn-ghost { border-color: transparent; background: var(--bg-soft); }
.btn-sm { height: 28px; padding: 0 11px; font-size: 12.5px; }
.btn-lg { height: 40px; padding: 0 22px; font-size: 14.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 8px; }

.section { margin-bottom: 22px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; }
.section-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.split-l { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 18px; align-items: start; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--mute-soft); color: var(--text-2); white-space: nowrap;
}
.badge-ok { background: var(--down-soft); color: #6ee7a0; }
.badge-bad { background: var(--up-soft); color: #ff9296; }
.badge-warn { background: var(--warn-soft); color: #fbbf24; }
.badge-info { background: var(--primary-soft); color: var(--primary-dark); }
.badge-mute { background: var(--mute-soft); color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 12.5px; color: var(--text-2); cursor: pointer; transition: .15s;
}
.chip:hover { border-color: var(--primary-line); color: var(--primary-dark); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.chip .cnt { font-size: 11px; opacity: .7; }

/* 涨跌 */
.delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--muted); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); color: var(--muted);
  font-weight: 600; font-size: 12px; white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }
.table .price { font-weight: 700; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px;
  color: var(--text); outline: none; font-family: inherit; transition: .15s;
}
textarea.input { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.6; }
.input:focus { border-color: var(--primary-line); box-shadow: 0 0 0 3px var(--primary-soft); }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.switch input { display: none; }
.switch .track {
  width: 38px; height: 21px; border-radius: 999px; background: #333a42; position: relative; transition: .18s;
}
.switch .track::after {
  content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(17px); }

/* 统计块 */
.stat { padding: 15px 17px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* 产品卡 */
.pcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: .18s; display: flex; flex-direction: column; position: relative;
}
.pcard:hover { border-color: var(--primary-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.pcard .thumb { position: relative; }
.pcard .thumb img { width: 100%; height: 132px; object-fit: cover; }
.pcard .body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .brand { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.pcard .name { font-size: 13.5px; font-weight: 600; line-height: 1.45; color: var(--text); min-height: 39px; }
.pcard .name:hover { color: var(--primary-dark); }
.pcard .prow { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.pcard .price { font-size: 18px; font-weight: 800; color: var(--up); font-variant-numeric: tabular-nums; }
.pcard .price small { font-size: 11px; font-weight: 500; color: var(--muted); display: block; }
.pcard .meta { display: flex; gap: 6px; flex-wrap: wrap; }

.fav-btn {
  position: absolute; top: 9px; right: 9px; width: 30px; height: 30px;
  border-radius: 50%; border: none; background: rgba(21, 24, 28, .92); cursor: pointer;
  display: grid; place-items: center; font-size: 15px; color: var(--muted); transition: .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.fav-btn:hover { color: var(--up); transform: scale(1.06); }
.fav-btn.on { color: var(--up); }

/* 图表 */
.chart-wrap { width: 100%; }
.chart-tip {
  position: absolute; pointer-events: none; background: rgba(10, 12, 14, .96);
  color: #fff; border-radius: 7px; padding: 6px 10px; font-size: 12px; line-height: 1.45;
  white-space: nowrap; z-index: 5; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.chart-tip b { font-size: 13.5px; display: block; }
.chart-tip span { color: #c3cade; font-size: 11px; }
.chart-empty { padding: 50px 0; text-align: center; color: var(--muted); font-size: 13px; }

.range-tabs { display: inline-flex; gap: 2px; background: var(--bg-soft); padding: 3px; border-radius: var(--radius-sm); }
.range-tabs button {
  border: none; background: transparent; padding: 5px 11px; border-radius: 6px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; font-weight: 500; transition: .15s;
}
.range-tabs button:hover { color: var(--text); }
.range-tabs button.active { background: var(--surface-2); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }

/* 侧栏筛选 */
.side-block { padding: 15px 17px; border-bottom: 1px solid var(--border); }
.side-block:last-child { border-bottom: none; }
.side-block h4 { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.side-list { display: flex; flex-direction: column; gap: 2px; }
.side-list button {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; padding: 7px 10px; border: none; background: transparent; border-radius: 7px;
  font-size: 13px; color: var(--text-2); cursor: pointer; text-align: left; transition: .13s;
}
.side-list button:hover { background: var(--bg-soft); color: var(--text); }
.side-list button.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.side-list .n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 资讯 */
.nlist { display: flex; flex-direction: column; }
.nitem { display: flex; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--border); transition: .15s; }
.nitem:last-child { border-bottom: none; }
.nitem:hover { background: var(--surface-2); }
.nitem .nt { flex: 1; min-width: 0; }
.nitem .ntitle { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.5; }
.nitem:hover .ntitle { color: var(--primary-dark); }
.nitem .nsum { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.nitem .nmeta { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

/* 面包屑 */
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--primary); }

/* 空态 */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty .big { font-size: 34px; opacity: .35; margin-bottom: 10px; }
.empty h4 { font-size: 15px; color: var(--text-2); margin-bottom: 6px; }

/* 提示条 */
.notice {
  display: flex; gap: 10px; padding: 12px 15px; border-radius: var(--radius-sm);
  background: var(--primary-soft); border: 1px solid var(--primary-line);
  color: var(--text-2); font-size: 12.8px; line-height: 1.6;
}
.notice.warn { background: var(--warn-soft); border-color: rgba(245, 166, 35, .4); }
.notice.mute { background: var(--surface-2); border-color: var(--border); }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: #20242a; color: var(--text); padding: 11px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; box-shadow: 0 8px 26px rgba(0,0,0,.24); animation: tin .22s ease;
  max-width: 330px;
}
.toast.ok { background: #0f7a3d; }
.toast.err { background: #b4232b; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 弹层 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .62); z-index: 150;
  display: grid; place-items: center; padding: 20px; animation: tin .18s ease;
}
.modal {
  background: var(--surface); border-radius: 14px; width: 100%; max-width: 460px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55); overflow: hidden;
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 9px; background: var(--surface-2); }

/* 键值列表 */
.kv { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 1px 0; font-size: 13px; }
.kv .k { color: var(--muted); padding: 8px 0; }
.kv .v { color: var(--text); padding: 8px 0; font-weight: 500; }

.bar { height: 6px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); }

.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs button {
  border: none; background: none; padding: 10px 0; font-size: 14px; color: var(--text-2);
  cursor: pointer; font-weight: 500; position: relative;
}
.tabs button.active { color: var(--primary-dark); font-weight: 700; }
.tabs button.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary);
}

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; } .between { justify-content: space-between; } .center-x { align-items: center; }
.gap6 { gap: 6px; } .gap10 { gap: 10px; } .gap14 { gap: 14px; }
.wrap { flex-wrap: wrap; }

/* 响应式 */
@media (max-width: 1080px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-l { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-search { width: 150px; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 16px 13px 44px; }
  .kv { grid-template-columns: 88px minmax(0, 1fr); }
  .split-l { grid-template-columns: minmax(0, 1fr); }
}

/* 打印 */
@media print { .topbar, .footer, .no-print { display: none; } }

/* =========================================================================
 * 实时后端接入层：数据来源标识 + 启动占位
 * 目的：任何时候都让用户明确知道「当前看到的是真实报价还是演示数据」，
 *      避免把演示价格误当成真实行情（文档 4.3 价格真实性要求）。
 * ========================================================================= */

.bootsplash { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.bootsplash-in { text-align: center; }
.bootsplash-in h3 { margin: 16px 0 6px; font-size: 17px; color: var(--text); }
/* 默认不显示：只有等待超过 8 秒（多半撞上免费实例冷启动）才由引导脚本放开，
   避免每次启动都平白多一行字。 */
.boot-hint { display: none; max-width: 320px; margin: 10px auto 0; line-height: 1.7; }
.logo-mark.big {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; font-size: 20px;
  background: var(--primary); color: var(--on-primary); font-weight: 700;
}

/* =========================================================================
 * 产品图出处标注 + 资讯社媒分享
 *
 * 图片一旦脱离它的来源单独流通，出了问题就追溯不回来 —— 所以真实产品图
 * 旁边必须能看见出处。平台自绘示意图没有"来源"可言，前端不渲染这个标注。
 * ========================================================================= */

.thumb { position: relative; }

.img-credit {
  position: absolute; right: 6px; bottom: 6px;
  padding: 2px 7px; border-radius: 999px;
  font-size: 10.5px; line-height: 1.7;
  color: #fff; background: rgba(18, 24, 40, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  pointer-events: none; white-space: nowrap; max-width: 92%;
  overflow: hidden; text-overflow: ellipsis;
}
/* 详情页用完整版：不叠在图上，避免遮住产品主体 */
.img-credit.lg {
  position: static; margin-top: 8px; max-width: none;
  color: var(--muted); background: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  font-size: 11.5px; text-align: center; white-space: normal;
}

/* 兜底图垫一层浅底：让人一眼看出这是示意图，而不是产品照片没加载出来 */
img.img-fallback { background: var(--bg-soft); }

/* 产品详情「产品图片（N张）」图集：对齐 ZOL 详情页图片区 ——
   标题 + 网格缩略图（4 列），点击切主图；每格下方标图片种类。 */
.pd-gallery {
  margin-top: 10px;
}
.pd-gal-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 8px;
}
.pd-gallery .pd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pd-thumb {
  position: relative; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  cursor: pointer;
  display: block; width: 100%; padding: 0;
  /* 缩略图放在按钮自身的背景上（内联 style 给的是 background-image）。
     这里**不要**写 `background: none` —— 那个简写会把 background-image 一起清掉，
     缩略图就整片变灰。 */
  background-color: var(--bg-soft);
  background-size: cover; background-position: center;
}
.pd-thumb::before {
  /* 只负责撑出 3:2 的盒子，**不能**带不透明底色 ——
     底色会盖住父元素的 background-image，看到的就只是灰块。 */
  content: ''; display: block; padding-top: 66%;
}
.pd-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(118, 185, 0, .35); }
.pd-thumb-kind {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 9.5px; line-height: 1.2; color: var(--text-2);
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 2px 4px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 产品图预览层（灯箱）
 *
 * 显隐**只**由 .open 这一个 class 决定，打开/关闭都只切 class、不重绘页面 ——
 * 重绘会把详情页连同正看着的那张图一起重建掉。
 * 层级放在模态（150）之上、吐司（200）之下：提示要能盖住灯箱。 */
.lb {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 190; align-items: center; justify-content: center;
}
.lb.open { display: flex; animation: lbIn .18s ease-out; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-mask {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(4, 6, 3, .93);
}
.lb-figure {
  position: relative; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-width: min(94vw, 1200px);
}
.lb-img {
  max-width: 100%; max-height: 78vh; object-fit: contain;
  border-radius: 8px; background: #0b0d0f;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .65);
}
.lb-cap { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.lb-tag {
  background: rgba(118, 185, 0, .16); border: 1px solid rgba(118, 185, 0, .45);
  color: #c9e77f; border-radius: 999px; padding: 2px 10px; font-size: 11.5px;
}
.lb-count { font-variant-numeric: tabular-nums; }
.lb-nav, .lb-close {
  position: absolute; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
}
.lb-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; font-size: 26px; line-height: 1; }
.lb-nav:hover, .lb-close:hover { background: rgba(118, 185, 0, .3); border-color: var(--primary); }
.lb-prev { left: max(14px, 2.5vw); }
.lb-next { right: max(14px, 2.5vw); }
.lb-close { top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 10px; font-size: 16px; }

/* 资讯列表项里的紧凑分享按钮。
   列表项整体是 <a>，而 <a> 内不允许嵌 <button>，因此这个按钮是 <span>；
   点击时的跳转由事件处理里的 preventDefault 拦下。 */
.nitem { position: relative; }
.nitem .nt { padding-right: 42px; }

.icon-btn {
  position: absolute; right: 12px; top: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font-size: 13px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary-line); }

/* 资讯详情页的分享区 */
.share-box {
  margin-top: 16px; padding: 14px 15px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.share-box .btn { text-decoration: none; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-static {
  display: inline-flex; align-items: center;
  padding: 2.5px 9px; border-radius: 999px;
  font-size: 12px; color: var(--primary);
  background: var(--primary-soft); border: 1px solid var(--primary-line);
}

/* ------------------------------------------------------- 图片管理（后台） */

.img-cell {
  width: 168px; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface-2);
}
.img-cell.primary { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-line); }
.img-cell img { width: 100%; height: 104px; object-fit: contain; background: #0b0d0f; }
.img-cell .img-meta { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ncover {
  width: 128px; height: 84px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); flex: none;
}

/* =========================================================================
 * 门户化新增：产业链指数滚动带 / 广告轮播 / 攒机入口 / 新品角标 / 分享图标
 * ========================================================================= */

/* ------------------------------------------------ 产业链指数（滚动大盘） */
.idx-ticker {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 14px; margin-bottom: 22px; height: 44px; overflow: hidden;
}
.idx-cap {
  flex: none; font-size: 12px; font-weight: 700; color: var(--primary);
  border: 1px solid var(--primary-line); background: var(--primary-soft);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
/* 只在**异常态**出现的提示（未接入行情源 / 等待首次抓取 / N 项待更新）。
   正常态胶囊里只有「产业链行情」四个字 —— 常驻的「更新于 X 小时前」是视觉噪音，
   已按需求去掉。指数抓取失败时会保留上一次成功值，上面这行提示就是那件事的唯一可见信号，
   所以它不能跟着一起删。 */
.idx-cap .idx-note { display: block; font-size: 10px; font-weight: 600; color: var(--muted); }
.idx-win { flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.idx-track { display: inline-flex; align-items: center; white-space: nowrap; animation: aic-marquee 55s linear infinite; will-change: transform; }
.idx-ticker:hover .idx-track { animation-play-state: paused; }
.idx-seq { display: inline-flex; align-items: center; }
.idx-item { display: inline-flex; align-items: baseline; gap: 7px; padding: 0 6px; font-size: 12.5px; }
.idx-name { color: var(--text-2); font-weight: 500; }
.idx-val { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.idx-sep { color: var(--border-strong); padding: 0 8px; }
/* 本次未取到、显示上次成功值的条目：压低整体透明度 + 挂一个感叹号。
   不用「—」或隐藏掉：那会让它与"这个指数根本不存在"混为一谈。 */
.idx-item.is-stale { opacity: .62; }
.idx-stale { color: var(--warn, #f59e0b); font-weight: 800; margin-left: 3px; }

@keyframes aic-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }   /* 序列渲染了两遍，平移一半即无缝循环 */
}
@media (prefers-reduced-motion: reduce) {
  .idx-track, .bn-carousel { animation: none; }
}

/* ------------------------------------------------ 首页全屏幻灯片轮播（对齐小米官网） */
.bn-carousel {
  position: relative;
  width: 100%;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b0d0f;
}
.bn-viewport { position: relative; width: 100%; }
.bn-slide {
  position: absolute; inset: 0;
  display: block;
  text-decoration: none;
  opacity: 0;
  transition: opacity .5s ease;
  z-index: 1;
}
.bn-slide.is-active { opacity: 1; z-index: 2; position: relative; }
.bn-slide img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}
.bn-slide img.bn-noimg { visibility: hidden; background: var(--bg-soft); }
/* 品名浮层：居中大字（对齐小米官网「品牌 + 大标题 + 副标」排版） */
.bn-cap {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 78%;
  max-width: 620px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 70%);
  border-radius: 12px;
  padding: 18px 8px;
}
.bn-cap-brand {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(255,255,255,.85);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bn-cap-title {
  display: block;
  font-size: clamp(22px, 3.6vw, 40px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.bn-cap-sub {
  display: block;
  font-size: clamp(13px, 1.6vw, 17px);
  color: rgba(255,255,255,.82);
  margin-top: 8px;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
/* 左上角「广告」角标（合规：必须可识别） */
.bn-ad {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 11px;
  color: var(--text);
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 3px 10px;
  backdrop-filter: blur(3px);
  z-index: 3;
}
/* 左右箭头 */
.bn-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
  backdrop-filter: blur(3px);
}
.bn-arrow:hover { background: rgba(0,0,0,.6); transform: translateY(-50%) scale(1.06); }
.bn-prev { left: 14px; }
.bn-next { right: 14px; }
/* 底部圆点指示 */
.bn-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}
.bn-dot {
  width: 26px; height: 3px;
  border-radius: 2px;
  border: none;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  padding: 0;
  transition: background .2s, width .2s;
}
.bn-dot.is-active { background: #76b900; width: 38px; }

/* ------------------------------------------------ 悬浮攒机入口（最前层） */
.build-fab {
  position: fixed; right: 22px; bottom: 86px; z-index: 120;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 62px; height: 62px; border-radius: 16px;
  background: linear-gradient(150deg, #86cc00, #5e9600);
  color: #10130a; font-size: 11.5px; font-weight: 800; line-height: 1.1;
  place-items: center; text-align: center; padding-top: 9px;
  box-shadow: 0 8px 26px rgba(118, 185, 0, .38), 0 2px 8px rgba(0, 0, 0, .4);
  transition: .16s;
}
.build-fab:hover { transform: translateY(-2px) scale(1.03); text-decoration: none; box-shadow: 0 12px 30px rgba(118, 185, 0, .45), 0 2px 8px rgba(0, 0, 0, .4); }
.build-fab svg { width: 22px; height: 22px; }
@media (max-width: 720px) { .build-fab { right: 13px; bottom: 74px; width: 56px; height: 56px; } }

/* ------------------------------------------------ 攒机页 */
.build-qr { position: sticky; top: 76px; }
.qr-img { width: 200px; height: 200px; object-fit: contain; border-radius: 10px; border: 1px solid var(--border); margin: 4px auto 0; background: #fff; }
.svc-card {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 13px; cursor: pointer; transition: .15s; background: var(--surface-2);
}
.svc-card:hover { border-color: var(--primary-line); }
.svc-card.on { border-color: var(--primary); background: var(--primary-soft); }
.svc-card input { margin-top: 3px; accent-color: var(--primary); }
.svc-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.svc-name { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.svc-desc { font-size: 12px; color: var(--muted); line-height: 1.55; }
.svc-flag {
  font-size: 10.5px; font-weight: 700; color: #10130a;
  background: linear-gradient(120deg, #86cc00, #76b900);
  border-radius: 999px; padding: 1.5px 8px; white-space: nowrap;
}
.svc-card.exclusive { border-color: var(--primary-line); border-style: dashed; }

/* ------------------------------------------------ 新品角标 */
.new-flag {
  position: absolute; left: 9px; top: 9px;
  background: linear-gradient(120deg, #86cc00, #5e9600); color: #10130a;
  font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2.5px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35); letter-spacing: .04em;
}

/* ------------------------------------------------ 热门标签
 *
 * 冷启动期站内还没有搜索量，热度由「站内行为 + 报价覆盖度 + 运营置顶」合成
 * （见后端 services/hot.py）。所以标签只表达"相对更受关注"，不写
 * 「X 人在看」这类要凭空造的数字 —— 编一个出来，后台一查就对不上。
 * 分数构成在详情页与后台都能展开看，标签只是它的入口。 */
.badge-hot {
  background: linear-gradient(120deg, #ff8a3d, #ff5a5f); color: #fff;
  font-weight: 700; border: 0;
}
/* 新品标签：与详情页卡片右上角的那条「新品」飘带是同一个判断（isNew），
   只是换成了可内联的胶囊 —— 表格里放飘带会把行高撑开。 */
.badge-new {
  background: var(--primary-soft); color: var(--primary-dark);
  font-weight: 700; border: 1px solid rgba(43, 92, 255, .28);
}
.pcard.is-hot { border-color: rgba(255, 138, 61, .45); }
/* 左侧竖条：列表里一眼能扫出热门，比再读一遍角标快 */
.pcard.is-hot::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #ff8a3d, #ff5a5f); z-index: 2;
}

/* 「搜索 / 官网」小标：挂在按钮文案后面。
 * 作用只有一个 —— 让用户在**点之前**就知道这一跳不是商品详情页。 */
.link-tag {
  display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 999px;
  background: rgba(127, 127, 127, .2); font-size: 10px; font-weight: 700;
  vertical-align: 1px;
}

/* ------------------------------------------------ 分享图标按钮 */
.share-ico {
  display: inline-flex; width: 17px; height: 17px; flex: none;
  color: var(--sk, var(--muted));
}
.share-ico svg { width: 100%; height: 100%; }
.share-ico:not(.static) {
  width: 20px; height: 20px; padding: 3px; border-radius: 6px;
  background: var(--sk, var(--surface)); color: #fff;
}
.share-btn { gap: 7px; }
.icon-btn svg { width: 15px; height: 15px; }

/* ---------------------------------------- 微信朋友圈二维码弹窗 */
/* 白底是刚需：微信扫一扫要求码与背景有足够对比度，深色底会让识别率下降，
   有些机型直接扫不出来。所以这里不跟随主题变量。 */
.qr-box { text-align: center; padding: 4px 0 2px; }
.qr-img {
  display: inline-flex; padding: 10px; border-radius: 12px;
  background: #fff; border: 1px solid var(--border);
}
.qr-img canvas { display: block; image-rendering: pixelated; }
.qr-cap { margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.qr-link {
  margin-top: 10px; font-size: 11.5px; color: var(--muted);
  word-break: break-all; line-height: 1.7;
}

/* =========================================================================
 * 产品视频 / 新品图鉴
 *
 * 两者都是**外链索引卡片**：整卡是一个 <a target="_blank">，站内不放播放器，
 * 也不转存封面文件（图片仍来自来源站点，失败就退化成占位块）。
 * ========================================================================= */

/* 占位块：封面缺失 / 加载失败时的兜底。
 * 不做「灰底 + 破碎图标」，那看起来像页面坏了；给一块带说明的浅面板更像"待补"。 */
.vthumb-ph {
  width: 100%; height: 150px; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 9px, var(--mute-soft) 9px, var(--mute-soft) 18px);
  color: var(--muted); font-size: 12px;
}

/* ------------------------------------------------------------ 视频卡片 */
.vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vcard {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  transition: .16s;
}
.vcard:hover {
  border-color: var(--primary-line); box-shadow: var(--shadow);
  transform: translateY(-1px); text-decoration: none;
}
.vthumb { position: relative; background: var(--surface-2); }
.vthumb img { width: 100%; height: 150px; object-fit: cover; }
/* 时长角标贴在右下角：视频列表里用户先看"多长"，再决定要不要点进去 */
.vdur {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0, 0, 0, .72); color: #fff;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 2px 7px; border-radius: 5px; letter-spacing: .02em;
}
/* 播放按钮只是"这里点得动、会跳走"的视觉提示，不拦截点击（pointer-events: none） */
.vplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .5); color: #fff; font-size: 15px; padding-left: 3px;
  pointer-events: none; opacity: .92;
}
.vcard:hover .vplay { background: var(--primary); color: var(--on-primary); }
.vbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vtitle { font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--text); }
.vcard:hover .vtitle { color: var(--primary-dark); }
.vmeta {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted); margin-top: auto;
}

/* -------------------------------------------------------- 新品图鉴卡片 */
/* 复用 .pcard 的骨架（缩略图 + body + 角标），只补外链卡需要的差异 */
.ncard { color: var(--text); text-decoration: none; }
.ncard:hover { text-decoration: none; }
.ncard .thumb { position: relative; background: var(--surface-2); }
.ncard .body { gap: 9px; }
.ncard .name { min-height: 0; }

@media (max-width: 900px) {
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .vgrid { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================================
 * 资讯评论
 *
 * 阅读不需要登录，**发表评论才需要**（用户要能匿名看完再决定要不要注册）。
 * 所以评论区在未登录时不是隐藏，而是照常列出已有评论 + 一个引导登录的提示条。
 * ========================================================================= */

.cmt-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.cmt-count { font-weight: 700; font-size: 14px; }
.cmt-count small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }

.cmt-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cmt-form textarea {
  width: 100%; min-height: 84px; resize: vertical;
  font-family: inherit; font-size: 13.5px; line-height: 1.7;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.cmt-form textarea:focus { outline: none; border-color: var(--primary-line); }
.cmt-form .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmt-form .row .small { margin-right: auto; }

/* 未登录引导条：文案明确说"登录后才可评论"，避免用户敲完字才被打回 */
.cmt-gate {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: 10px; padding: 12px 14px; margin-top: 12px;
  font-size: 13px; color: var(--text-2);
}
.cmt-gate .btn { margin-left: auto; }

.cmt-list { display: flex; flex-direction: column; margin-top: 4px; }
.cmt-item {
  display: flex; gap: 11px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cmt-item:last-child { border-bottom: none; }
/* 头像只放首字母，不引第三方头像服务（少了外部请求与隐私面） */
.cmt-avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-dark);
  font-weight: 800; font-size: 14px; text-transform: uppercase;
}
.cmt-main { min-width: 0; flex: 1; }
.cmt-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.cmt-who b { color: var(--text); font-size: 13px; }
.cmt-who .muted { color: var(--muted); }
.cmt-text {
  font-size: 13.5px; line-height: 1.75; color: var(--text-2);
  margin-top: 5px; white-space: pre-wrap; word-break: break-word;
}

/* ------------------------------------------------ 产品评价（带星级）
 *
 * 与资讯评论共用 .cmt-* 那套骨架，这里只补星级相关的部分 ——
 * 产品评价与资讯讨论在版式上本就该看起来是同一件事的两处入口，
 * 另起一套类名只会让两边慢慢长歪。 */

.pcmt-rate { display: flex; align-items: center; gap: 2px; margin-bottom: 2px; }
.pcmt-rate .star {
  background: none; border: 0; cursor: pointer; padding: 0 2px;
  font-size: 22px; line-height: 1; color: var(--border);
  transition: color .12s, transform .12s;
}
.pcmt-rate .star:hover { transform: scale(1.12); }
/* 选中态：实心金色。用 --up 系（红）/--down 系（绿）都不合适 ——
   星级是评价强度，不是涨跌方向，借用涨跌色会让人误读。 */
.pcmt-rate .star.on { color: #f5b301; }

.pcmt-stars { color: #f5b301; font-size: 12.5px; letter-spacing: 1px; }

/* 评分汇总：左侧大号均分 + 右侧五档分布条 */
.pcmt-sum {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 14px 0 4px; border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.pcmt-avg { text-align: center; min-width: 76px; }
.pcmt-avg-num {
  font-size: 30px; font-weight: 800; line-height: 1.1; color: #f5b301;
}
.pcmt-bars { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.pcmt-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pcmt-n { color: var(--muted); width: 34px; flex: none; }
.pcmt-bar {
  flex: 1; height: 7px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden;
}
.pcmt-bar i { display: block; height: 100%; border-radius: 999px; background: #f5b301; }
.pcmt-total { font-size: 12px; color: var(--muted); }

/* ----------------------------------------------------------------- 骨架屏
 *
 * 目录按需装载后，详情页要等一次网络往返才有内容。等待期间必须给出
 * **形状**（和真实内容同尺寸的灰块），而不是一个转圈的图标 —— 形状能让人
 * 预期内容会出现在哪，也不会在数据到达时让整页高度跳一下。
 * 动画只做透明度呼吸：位置不变，扫光式的位移动画在深色底上更晃眼。
 */
.skel {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  min-height: 12px;
}
.skel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent);
  animation: skel-breathe 1.5s ease-in-out infinite;
}
@keyframes skel-breathe {
  0%, 100% { opacity: .35; }
  50%      { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .skel::after { animation: none; opacity: .5; }
}

/* 「只采到一个点」的走势图状态。
 *
 * 图表引擎要两个点才能连成线，而真实采集刚开始时往往只有一个点。
 * 这时既不能画一条假的平线（看着像"价格一直没变"），也不能退成
 * 「暂无记录」（把真采到的那条观测一起说成没有）。把那个点本身放大展示。 */
.chart-single {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 220px; padding: 26px 16px; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2);
}
.chart-single .k { font-size: 12.5px; color: var(--muted); }
.chart-single .v {
  font-size: 38px; font-weight: 800; letter-spacing: -.02em;
  margin: 4px 0 2px; font-variant-numeric: tabular-nums;
}
.chart-single .d { font-size: 12.5px; color: var(--muted); }
.chart-single .note {
  font-size: 12.5px; color: var(--text-2); line-height: 1.75;
  max-width: 520px; margin-top: 12px;
}

/* ============================================================
 * 第三方登录（微信等）
 * ------------------------------------------------------------
 * 登录页的按钮区不是表单控件，视觉上要弱于主登录按钮：
 * 它是"另一条路"，不是"下一步"。所以走描边 + 图标，
 * 主操作（登录 / 创建账号）保持实心。
 * ============================================================ */
.auth-third {
  margin-top: 18px;
}
.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 14px;
  color: var(--muted); font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-providers {
  display: flex; flex-direction: column; gap: 9px;
}
.auth-provider {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  font-size: 13.5px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.auth-provider:hover {
  border-color: var(--primary-line); background: var(--primary-soft);
}
.auth-provider:disabled {
  opacity: .5; cursor: not-allowed;
}
.auth-provider-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; color: var(--text-2);
}

/* ============================================================ 站内信
 *
 * 顶栏铃铛 + 消息中心列表。
 *
 * 角标颜色用站点绿而不是红：这里没有"涨跌"语义，用红会和行情页的红涨
 * 撞口径（用户会以为是一条跌价提醒）。绿色只表示"有新东西"。
 */
.nbell {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  color: var(--text-2); text-decoration: none;
  border: 1px solid transparent; transition: border-color .15s, color .15s;
}
.nbell:hover { color: var(--text); border-color: var(--border-strong); }
.nbell-ico { font-size: 16px; line-height: 1; }
.nbell-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--primary); color: var(--on-primary);
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}

.notif-list { display: flex; flex-direction: column; }
.notif {
  display: flex; gap: 12px; padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.notif:last-child { border-bottom: 0; }
/* 未读只用左侧一道竖条 + 略微提亮底色标识。
 * 不加粗标题：加粗会让整页看起来都是重点，等于没有重点。 */
.notif.unread { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--primary); }
.notif-ico {
  flex: 0 0 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--mute-soft); color: var(--text-2); font-size: 14px;
}
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; color: var(--text); }
.notif-body {
  font-size: 12.5px; color: var(--text-2); line-height: 1.75; margin-top: 4px;
  word-break: break-word;
}

/* 账户中心：登录方式列表 */
.idt-list {
  display: flex; flex-direction: column;
}
.idt-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.idt-row:last-child { border-bottom: none; }
.idt-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: 0 0 26px;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--bg-soft); color: var(--text-2);
}
.idt-main { flex: 1; min-width: 0; }
.idt-name { font-size: 13.5px; font-weight: 600; }
.idt-val { white-space: nowrap; }

/* 回调页的转圈 */
.spinner {
  width: 26px; height: 26px; margin: 0 auto;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: aic-spin .8s linear infinite;
}
@keyframes aic-spin { to { transform: rotate(360deg); } }
