/* ============ 币安页面截图生成器 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  --bg: #fff;
  --card: #f7f8fa;
  --card2: #fdfdfd;
  --line: #ededed;
  --text: #1e2329;
  --sub: #848689;
  --sub2: #b2b5b8;
  --accent: #f0b90b;
  --up: #0ecb81;
  --down: #f6465d;
  --blue: #2b6eff;
  --purple: #8c6bd8;
  --mag: #c15da2;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Roboto, sans-serif;
  color: var(--text);
  background: #e9eaec;
  font-size: 14px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body[data-mode="dark"] {
  --bg: #181a20;
  --card: #1e2329;
  --card2: #2b3139;
  --line: #2b3139;
  --text: #eaecef;
  --sub: #848689;
  --sub2: #5e6673;
  --up: #0ecb81;
  --down: #f6465d;
  background: #0b0c0f;
}
body[data-mode="dark"] #stage { background: #0b0c0f; }

#stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9eaec;
}
#phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  font-size: 14px;
}
@media (min-width: 560px) {
  #stage { padding: 18px; align-items: flex-start; }
  #phone { height: 880px; max-height: calc(100vh - 36px); border-radius: 26px; box-shadow: 0 18px 60px rgba(0,0,0,.28); }
}

/* ---------- 状态栏（内置绘制，非真实手机状态栏） ---------- */
#statusbar {
  flex: none;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  user-select: none;
}
#statusbar[hidden] { display: none; }
.sb-left { display: flex; align-items: center; gap: 6px; }
.sb-time { font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.sb-extra { font-size: 12px; font-weight: 600; color: var(--sub); }
.sb-right { display: flex; align-items: center; gap: 5px; }
.sb-speed { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; margin-right: 2px; }
.sb-speed b { font-size: 10.5px; font-weight: 700; }
.sb-speed i { font-size: 8px; font-style: normal; color: var(--sub); letter-spacing: .2px; }
.sb-sig { display: flex; align-items: flex-end; gap: 1.5px; height: 11px; }
.sb-sig span { width: 3px; background: currentColor; border-radius: .5px; opacity: .28; }
.sb-sig span:nth-child(1) { height: 4px; }
.sb-sig span:nth-child(2) { height: 6px; }
.sb-sig span:nth-child(3) { height: 8.5px; }
.sb-sig span:nth-child(4) { height: 11px; }
.sb-sig span.on { opacity: 1; }
.sb-wifi { width: 15px; height: 11px; }
.sb-bat { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 13px; padding: 0 4px; border-radius: 3.5px; background: var(--text); color: var(--bg); font-size: 10px; font-weight: 700; min-width: 24px; }
.sb-bat::after { content: ""; position: absolute; right: -2px; width: 2px; height: 5px; border-radius: 0 2px 2px 0; background: var(--text); }
.sb-bat.low { background: var(--down); }

/* ---------- 主内容 ---------- */
#app {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg);
  position: relative;
}
#app::-webkit-scrollbar { width: 0; height: 0; }
.screen { padding-bottom: 14px; }
.pad { padding-left: 16px; padding-right: 16px; }
.mt6 { margin-top: 6px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; } .mt18 { margin-top: 18px; }
.row { display: flex; align-items: center; }
.row-b { display: flex; align-items: center; justify-content: space-between; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap14 { gap: 14px; }
.grow { flex: 1 1 auto; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up { color: var(--up); } .down { color: var(--down); } .sub { color: var(--sub); }
.b { font-weight: 700; } .b6 { font-weight: 600; }
.f10 { font-size: 10px; } .f11 { font-size: 11px; } .f12 { font-size: 12px; } .f13 { font-size: 13px; }
.f15 { font-size: 15px; } .f17 { font-size: 17px; } .f20 { font-size: 20px; } .f24 { font-size: 24px; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.card { background: var(--card); border-radius: 12px; padding: 14px 14px; }
.card.flat { background: var(--card2); }
.sep { height: 1px; background: var(--line); margin: 12px 0; }
.chip { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px; background: var(--card); color: var(--sub); }
.chip.gray { background: #eef0f2; color: var(--sub); }
body[data-mode="dark"] .chip.gray { background: #2b3139; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 12px; border-radius: 6px; background: var(--card); font-size: 12.5px; color: var(--text); }
.pill.on { background: var(--accent); font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; font: inherit; border-radius: 8px; cursor: pointer; }
.btn.buy { background: var(--up); color: #fff; }
.btn.sell { background: var(--down); color: #fff; }
.btn.yel { background: var(--accent); color: #1e2329; font-weight: 700; }
.btn.ghost { background: var(--card); color: var(--text); }
.btn.line { background: transparent; border: 1px solid var(--line); }
.btn.big { height: 46px; font-size: 16px; font-weight: 700; border-radius: 8px; }
.btn.mid { height: 38px; font-size: 14px; font-weight: 600; }
.btn.sm { height: 28px; font-size: 12px; padding: 0 10px; border-radius: 6px; }
.btn:active { filter: brightness(.94); }
svg.ic { display: block; }

/* ---------- 顶栏 / 页签 ---------- */
.hdr { display: flex; align-items: center; gap: 10px; padding: 6px 14px 8px; }
.hdr .title { font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.hdr .title.sm { font-size: 19px; }
.icon-btn { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.tabs { display: flex; align-items: center; gap: 20px; padding: 0 16px; height: 40px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .t { position: relative; font-size: 15px; color: var(--sub); padding: 8px 0; }
.tabs .t.on { color: var(--text); font-weight: 700; }
.tabs .t.on::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 2px; width: 20px; height: 3px; border-radius: 2px; background: var(--accent); }
.tabs.tight { gap: 16px; }
.tabs.tight .t { font-size: 14px; padding: 6px 0; }
.tabs.und { border-bottom: 1px solid var(--line); }

/* ---------- 首页 ---------- */
.home-top { display: flex; align-items: center; gap: 10px; padding: 6px 14px 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: #ffe9b3; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.seg { display: inline-flex; align-items: center; padding: 2px; background: var(--card); border-radius: 8px; }
.seg .s { padding: 5px 14px; font-size: 13px; color: var(--sub); border-radius: 6px; }
.seg .s.on { background: var(--bg); color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.badge-dot { position: absolute; top: -3px; right: -4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--down); color: #fff; font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.search { display: flex; align-items: center; gap: 6px; margin: 0 14px 14px; padding: 9px 12px; background: var(--card); border-radius: 8px; color: var(--sub); font-size: 13.5px; }
.a-sum { padding: 2px 16px 0; }
.a-sum .lab { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.a-sum .big { font-size: 34px; font-weight: 700; letter-spacing: -1px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.a-sum .big small { font-size: 15px; font-weight: 600; margin-left: 5px; letter-spacing: 0; }
.a-sum .cny { font-size: 13px; color: var(--sub); margin-top: 2px; }
.a-sum .today { font-size: 13px; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.curve-wrap { position: relative; margin: 6px -4px 0; }
.curve-wrap canvas { display: block; width: 100%; height: 148px; }
.curve-lab { position: absolute; right: 6px; font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; }
.periods { display: flex; justify-content: space-between; padding: 6px 8px 2px; }
.periods .p { font-size: 13px; color: var(--sub); padding: 5px 10px; border-radius: 14px; }
.periods .p.on { color: var(--text); font-weight: 600; background: var(--card); }
.banner { display: flex; align-items: center; gap: 10px; margin: 12px 14px 0; padding: 12px; background: var(--card); border-radius: 12px; }
.banner .gift { width: 38px; height: 38px; border-radius: 8px; background: #fff6cc; display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none; }
.banner .txt { font-size: 14px; font-weight: 700; }
.dots { display: flex; gap: 4px; justify-content: center; margin-top: 6px; }
.dots i { width: 4px; height: 4px; border-radius: 2px; background: var(--sub2); }
.dots i.on { width: 12px; background: var(--text); }
.wl { margin: 14px 0 0; }
.wl-tabs { display: flex; gap: 18px; padding: 0 16px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.wl-tabs::-webkit-scrollbar { display: none; }
.wl-tabs .t { font-size: 15px; color: var(--sub); padding: 8px 0 6px; }
.wl-tabs .t.on { color: var(--text); font-weight: 700; }
.wl-sub { display: flex; gap: 16px; padding: 4px 16px 6px; }
.wl-sub .t { font-size: 13.5px; color: var(--sub); padding: 4px 0; }
.wl-sub .t.on { color: var(--text); font-weight: 700; }
.th { display: flex; align-items: center; padding: 6px 16px; font-size: 12px; color: var(--sub); }
.th .c { flex: 1; }
.th .c.r { text-align: right; flex: 0 0 34%; }
.coin-row { display: flex; align-items: center; padding: 11px 16px; }
.coin-row .c1 { flex: 1 1 34%; display: flex; align-items: center; gap: 8px; min-width: 0; }
.coin-row .c2 { flex: 0 0 30%; text-align: right; font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.coin-row .c3 { flex: 0 0 30%; display: flex; justify-content: flex-end; }
.cicon { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; }
.cicon.bnb { background: #f0b90b; color: #1e2329; }
.cicon.btc { background: #f7931a; }
.cicon.eth { background: #627eea; }
.cicon.sol { background: linear-gradient(135deg,#9945ff,#14f195); }
.cicon.xrp { background: #23292f; }
.cicon.doge { background: #c2a633; }
.cicon.usdt { background: #26a17b; }
.cicon.usdc { background: #2775ca; }
.cicon.act { background: #1e2329; }
.cicon.gen { background: #848689; }
.chg { min-width: 74px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 8px; }
.chg.up { background: var(--up); } .chg.down { background: var(--down); }
.chg.plain { background: transparent; color: inherit; min-width: 0; }

/* ---------- 资产 ---------- */
.asset-head { padding: 4px 16px 0; }
.asset-head .lab { font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.asset-head .big { font-size: 32px; font-weight: 700; letter-spacing: -1px; margin-top: 6px; display: flex; align-items: flex-end; gap: 5px; }
.asset-head .big small { font-size: 14px; font-weight: 600; padding-bottom: 4px; }
.asset-head .cny { font-size: 13px; color: var(--sub); margin-top: 4px; }
.spark-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spark-row canvas { width: 118px; height: 40px; display: block; }
.today-line { font-size: 13.5px; margin-top: 10px; display: flex; align-items: center; gap: 4px; }
.act-grid { display: flex; justify-content: space-between; padding: 18px 16px 6px; }
.act-grid .a { width: 62px; text-align: center; }
.act-grid .box { width: 52px; height: 52px; margin: 0 auto 6px; border-radius: 14px; background: var(--card); display: flex; align-items: center; justify-content: center; }
.act-grid .lb { font-size: 13px; }
.dist-card { margin: 8px 14px 0; }
.dist-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.dist-bar i { display: block; height: 100%; }
.bal-row { display: flex; align-items: center; padding: 14px 16px; gap: 10px; }
.bal-row .l { flex: none; display: flex; align-items: center; gap: 9px; width: 106px; }
.bal-row .m { flex: 1 1 auto; text-align: right; }
.bal-row .amt { font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bal-row .eq { font-size: 12.5px; color: var(--sub); margin-top: 3px; font-variant-numeric: tabular-nums; }
.bal-row .pnl { font-size: 12.5px; margin-top: 3px; }
.bal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.mini-btn { height: 28px; padding: 0 14px; border-radius: 6px; background: var(--card); font-size: 12.5px; display: inline-flex; align-items: center; }

/* ---------- 行情 ---------- */
.mkt-chips { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.mkt-chips::-webkit-scrollbar { display: none; }
.mkt-chips .c { flex: none; height: 28px; padding: 0 12px; border-radius: 6px; background: var(--card); font-size: 13px; display: inline-flex; align-items: center; }
.mkt-chips .c.on { background: #fff6cc; color: #b7900b; font-weight: 700; }
body[data-mode="dark"] .mkt-chips .c.on { background: #2b2410; color: var(--accent); }

/* ---------- 详情页(报价) ---------- */
.q-price { display: flex; align-items: flex-start; padding: 6px 16px 0; gap: 14px; }
.q-price .l { flex: 0 0 46%; min-width: 0; }
.q-price .p { font-size: 34px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.q-price .p.down { color: var(--down); } .q-price .p.up { color: var(--up); }
.q-price .chg { font-size: 15px; font-weight: 600; margin-top: 6px; display: inline-block; }
.q-price .cny { font-size: 13px; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.q-stats { flex: 1 1 auto; display: grid; grid-template-columns: auto auto; gap: 7px 10px; font-size: 12.5px; }
.q-stats .k { color: var(--sub); white-space: nowrap; }
.q-stats .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-badges { display: flex; align-items: center; gap: 10px; padding: 10px 16px 0; font-size: 13px; }
.q-badges .b1 { padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.stock-line { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 11px 12px; background: var(--card); border-radius: 10px; font-size: 14px; }
.stock-line .tg { padding: 2px 7px; border-radius: 4px; background: var(--bg); font-size: 12px; font-weight: 600; }
.tf-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px 4px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tf-row::-webkit-scrollbar { display: none; }
.tf-row .t { font-size: 14px; color: var(--sub); flex: none; }
.tf-row .t.on { color: var(--text); font-weight: 700; }
.tf-row .more { display: inline-flex; align-items: center; gap: 3px; }
.chart-box { position: relative; margin: 0 4px; }
.chart-box canvas { display: block; width: 100%; height: 300px; }
.chart-box.tall canvas { height: 340px; }
.chart-box.short canvas { height: 236px; }
.legend { font-size: 12.5px; color: var(--sub); padding: 2px 12px 0; display: flex; gap: 12px; flex-wrap: wrap; }
.legend .ma { color: var(--mag); }
.legend .vma { color: var(--purple); }
.ind-strip { display: flex; gap: 18px; padding: 10px 16px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; border-top: 1px solid var(--line); margin-top: 4px; }
.ind-strip::-webkit-scrollbar { display: none; }
.ind-strip .i { font-size: 13.5px; color: var(--sub); flex: none; }
.ind-strip .i.on { color: var(--text); font-weight: 700; }
.ret-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 8px 12px 4px; }
.ret-grid .c { text-align: left; }
.ret-grid .k { font-size: 12.5px; color: var(--sub); }
.ret-grid .v { font-size: 13.5px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.q-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; }
.q-foot .tools { display: flex; gap: 14px; flex: none; }
.q-foot .tool { width: 40px; text-align: center; font-size: 11px; color: var(--text); }
.q-foot .tool .box { width: 30px; height: 30px; margin: 0 auto 3px; display: flex; align-items: center; justify-content: center; }
.q-foot .btn { flex: 1 1 0; }

/* ---------- 合约交易页 ---------- */
.tr-head { padding: 6px 14px 0; }
.tr-head .sym { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tr-head .sym .tag { font-size: 12px; font-weight: 600; color: var(--sub); background: var(--card); padding: 3px 7px; border-radius: 5px; }
.tr-head .chgtext { font-size: 14px; font-weight: 700; margin-top: 2px; }
.ladder { height: 14px; margin: 8px 14px 0; border-radius: 3px; background: linear-gradient(90deg, var(--up) 0 62%, #eef0f2 62% 100%); }
.pos-card { margin: 12px 14px 0; padding: 14px; background: var(--card); border-radius: 12px; }
.pos-card .h { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 700; }
.side-ic { width: 20px; height: 20px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.side-ic.buy { background: var(--up); } .side-ic.sell { background: var(--down); }
.pos-card .h .sub { font-size: 12px; font-weight: 600; }
.pnl-line { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 14px; }
.pnl-line .k { font-size: 13px; color: var(--sub); display: flex; align-items: center; gap: 5px; }
.pnl-line .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pnl-line .r { text-align: right; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; margin-top: 14px; }
.pgrid .k { font-size: 11.5px; color: var(--sub); display: flex; align-items: center; gap: 3px; }
.pgrid .v { font-size: 15px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.realized { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 10px 12px; background: var(--bg); border-radius: 8px; font-size: 13px; }
.pos-btns { display: flex; gap: 10px; margin-top: 14px; }
.pos-btns .btn { flex: 1 1 0; height: 40px; background: var(--bg); font-size: 14px; font-weight: 600; }
.orf { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.orf .left { flex: 1 1 48%; min-width: 0; }
.orf .right { flex: 0 0 42%; }
.orf .seg2 { display: flex; background: var(--card); border-radius: 8px; padding: 2px; }
.orf .seg2 .s { flex: 1 1 0; text-align: center; padding: 7px 0; font-size: 14.5px; color: var(--sub); border-radius: 6px; }
.orf .seg2 .s.on.buy { background: var(--up); color: #fff; font-weight: 600; }
.orf .seg2 .s.on.sell { background: var(--down); color: #fff; font-weight: 600; }
.orf .chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.orf .chips .pill { height: 28px; }
.fld { display: flex; align-items: center; gap: 8px; margin-top: 10px; height: 38px; padding: 0 12px; background: var(--card); border-radius: 8px; font-size: 14px; }
.fld .ph { color: var(--sub2); }
.fld .u { margin-left: auto; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.fld-row { display: flex; gap: 8px; margin-top: 10px; }
.fld-row .fld { flex: 1 1 0; margin-top: 0; }
.btn-best { height: 38px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--text); background: transparent; font-size: 13.5px; font-weight: 600; flex: none; }
.slider { position: relative; height: 22px; margin-top: 14px; }
.slider .track { position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--line); }
.slider .knob { position: absolute; top: 5px; width: 12px; height: 12px; background: var(--bg); border: 1.5px solid var(--sub2); transform: rotate(45deg); }
.slider .knob.act { border-color: var(--text); background: var(--text); }
.kv { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 13.5px; }
.kv .k { color: var(--sub); display: flex; align-items: center; gap: 6px; }
.kv .v { font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.plus { width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: #1e2329; font-size: 13px; line-height: 15px; text-align: center; font-weight: 700; }
.cbx { width: 15px; height: 15px; border-radius: 3px; border: 1.5px solid var(--sub2); display: inline-block; flex: none; }
.cbx.on { background: var(--accent); border-color: var(--accent); }
.ob .ask, .ob .bid { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 13px; position: relative; font-variant-numeric: tabular-nums; }
.ob .bar { position: absolute; right: 0; top: 2px; bottom: 2px; opacity: .13; }
.ob .ask { color: var(--down); } .ob .bid { color: var(--up); }
.ob .sz { color: var(--text); }
.ob .last { font-size: 19px; font-weight: 700; text-align: center; margin: 9px 0 2px; font-variant-numeric: tabular-nums; }
.ob .avg { font-size: 12px; color: var(--sub2); text-align: center; border-bottom: 1px dashed var(--line); padding-bottom: 8px; font-variant-numeric: tabular-nums; }
.ratio { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; }
.ratio .bar { flex: 1 1 auto; height: 4px; border-radius: 2px; overflow: hidden; display: flex; background: var(--down); }
.ratio .bar i { display: block; height: 100%; background: var(--up); }
.ord-row { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ord-row .l1 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; }
.ord-row .l2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.ord-row .k { font-size: 11px; color: var(--sub); }
.ord-row .v { font-size: 13.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.empty { padding: 34px 0; text-align: center; color: var(--sub2); font-size: 13px; }

/* ---------- 底部导航 ---------- */
#navbar {
  flex: none;
  height: 54px;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--bg);
  user-select: none;
}
#navbar .n { position: relative; flex: 1 1 0; text-align: center; color: var(--sub); font-size: 10.5px; }
#navbar .n .ic { margin: 0 auto 2px; color: var(--sub); }
#navbar .n.on { color: var(--text); font-weight: 600; }
#navbar .n.on .ic { color: var(--text); }
#navbar .n .dot { position: absolute; top: 2px; right: 26%; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- 浮动按钮 / 编辑器 / toast ---------- */
#fab { position: fixed; right: 14px; bottom: 74px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
#fab button { height: 38px; padding: 0 15px; border: 0; border-radius: 19px; background: #1e2329; color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.22); cursor: pointer; }
#fab button:active { transform: scale(.97); }
body[data-mode="dark"] #fab button { background: #f0b90b; color: #1e2329; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast .t { background: rgba(30,35,41,.94); color: #fff; padding: 9px 16px; border-radius: 20px; font-size: 13px; max-width: 84vw; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
#toast .t.err { background: rgba(246,70,93,.95); }
#toast .t.ok { background: rgba(14,203,129,.95); color: #062a1c; }

#editor {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; top: auto;
  height: 62vh; height: 62dvh; max-height: 760px;
  transition: height .18s ease, transform .22s ease;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
  transform: translateY(100%);
}
#editor.open { transform: translateY(0); }
#editor.tall { height: 92vh; height: 92dvh; max-height: 1100px; }
@media (min-width: 700px) {
  #editor { left: auto; right: 0; width: 470px; height: 100vh; border-radius: 0; box-shadow: -10px 0 40px rgba(0,0,0,.2); }
}
.ed-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ed-head .grip { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); width: 34px; height: 4px; border-radius: 2px; background: var(--line); }
.ed-body { flex: 1 1 auto; overflow-y: auto; padding: 0 14px 18px; }
.ed-foot { flex: none; display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.ed-foot .btn { flex: 1 1 0; height: 40px; font-size: 14px; }
.grp { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.grp > .gh { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
.grp > .gh .ar { color: var(--sub); font-size: 12px; }
.grp > .gc { padding: 2px 12px 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 10px; border-top: 1px solid var(--line); }
.grp.closed > .gc { display: none; }
.f { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.f > label { font-size: 11px; color: var(--sub); display: flex; align-items: center; gap: 4px; }
.f input[type=text], .f input[type=number], .f select, .f textarea {
  width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--text); font: inherit; font-size: 13px; outline: none;
}
.f textarea { height: 62px; padding: 6px 8px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--accent); background: var(--bg); }
.f.full { grid-column: 1 / -1; }
.f .hint { font-size: 10.5px; color: var(--sub2); }
.f .sw { display: flex; align-items: center; gap: 6px; height: 32px; font-size: 12.5px; }
.item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 10px; margin-top: 8px; grid-column: 1 / -1; }
.item .ih { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.item .ig { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 8px; }
.item .ig .f > label { font-size: 10.5px; }
.item .ig .f input, .item .ig .f select { height: 30px; font-size: 12.5px; }
.x-del { border: 0; background: var(--card); color: var(--down); border-radius: 5px; height: 22px; padding: 0 8px; font-size: 11.5px; }
.add-row { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 8px; }
.add-row .btn { height: 32px; padding: 0 12px; font-size: 12.5px; }
.tabs-ed { display: flex; gap: 6px; padding: 0 0 10px; overflow-x: auto; white-space: nowrap; }
.tabs-ed .t { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--card); font-size: 12.5px; display: inline-flex; align-items: center; }
.tabs-ed .t.on { background: var(--accent); font-weight: 700; }
.note { font-size: 11.5px; color: var(--sub); line-height: 1.5; padding: 8px 10px; background: var(--card); border-radius: 8px; margin-bottom: 10px; }
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.35); }
body.capturing #fab, body.capturing #editor, body.capturing #toast, body.capturing .scrim { display: none !important; }
body.capturing #stage { padding: 0 !important; background: transparent !important; }
body.capturing #phone { box-shadow: none !important; border-radius: 0 !important; }

/* ---------- 交易记录 / 历史 ---------- */
.his-head { display: flex; align-items: center; padding: 8px 14px 10px; gap: 8px; }
.his-head .mid { flex: 1 1 auto; text-align: center; }
.his-head .t1 { font-size: 19px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.his-head .t2 { font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.his-head .ends { flex: none; display: flex; gap: 14px; align-items: center; width: 62px; justify-content: flex-end; }
.his-head .st { flex: none; width: 62px; }
.notice { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 13.5px; }
.notice .txt { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice .x { color: var(--sub); font-size: 15px; padding: 0 2px; }
.mini-trade { display: flex; align-items: center; gap: 10px; padding: 0 14px 10px; }
.mini-trade .btn { flex: 1 1 auto; height: 42px; font-size: 15.5px; font-weight: 700; }
.mini-trade .step { flex: none; height: 30px; padding: 0 10px; border-radius: 6px; background: var(--card); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--sub); }
.fchips { display: flex; align-items: center; gap: 8px; padding: 4px 14px 12px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchips .fc { flex: none; height: 30px; padding: 0 12px; border-radius: 6px; background: var(--card); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.fchips .fun { margin-left: auto; flex: none; color: var(--sub); }
.subtabs { display: flex; align-items: center; gap: 10px; padding: 2px 14px 10px; }
.subtabs .s { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 13px; color: var(--sub); display: inline-flex; align-items: center; }
.subtabs .s.on { background: var(--card); color: var(--text); font-weight: 700; }
.subtabs .inf { margin-left: auto; color: var(--sub2); }
.note-line { font-size: 13px; color: var(--sub); padding: 0 16px 8px; }
.note-line .star { line-height: 1.55; }
.end-note { text-align: center; color: var(--sub); font-size: 13.5px; padding: 18px 0 10px; }
.divider { height: 1px; background: var(--line); margin: 0 16px; }

/* 资金流水 */
.flow { padding: 0 16px; }
.flow-item { padding: 14px 0 12px; }
.flow-item .l1 { display: flex; align-items: baseline; justify-content: space-between; }
.flow-item .as { font-size: 17px; font-weight: 700; }
.flow-item .tm { font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; }
.flow-item .kv { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; font-size: 14px; }
.flow-item .kv .k { color: var(--sub); }
.flow-item .kv .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.flow-item .kv .v.amt { font-size: 15px; }

/* 当前委托卡片 */
.od-card { padding: 14px 16px; }
.od-card .l1 { display: flex; align-items: center; gap: 8px; }
.od-card .sym { font-size: 17px; font-weight: 700; }
.od-card .tag { font-size: 11.5px; color: var(--sub); background: var(--card); padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.od-card .prog { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12.5px; color: var(--sub); }
.od-card .prog .bar { width: 34px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.od-card .prog .bar i { display: block; height: 100%; background: var(--text); }
.od-card .btns { display: flex; gap: 8px; }
.od-card .btns .btn { height: 30px; padding: 0 14px; background: var(--card); font-size: 13px; font-weight: 600; border-radius: 6px; }
.od-card .l2 { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13.5px; }
.od-card .l2 .ty { font-weight: 600; }
.od-card .l2 .tm { color: var(--sub); font-size: 13px; font-variant-numeric: tabular-nums; }
.od-card .l3 { margin-top: 12px; }
.od-card .kv { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; font-size: 14px; }
.od-card .kv .k { color: var(--sub); }
.od-card .kv .v { font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 5px; }

/* 订单历史 / 历史成交 */
.oh-item { padding: 14px 16px 12px; }
.oh-item .l1 { display: flex; align-items: center; gap: 8px; }
.oh-item .sym { font-size: 17px; font-weight: 700; }
.oh-item .tag { font-size: 11.5px; color: var(--sub); background: var(--card); padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.oh-item .tm { margin-left: auto; font-size: 13px; color: var(--sub); display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.oh-item .l2 { margin-top: 4px; font-size: 13.5px; font-weight: 600; }
.oh-item .kv { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 14px; }
.oh-item .kv .k { color: var(--sub); }
.oh-item .kv .v { font-weight: 600; font-variant-numeric: tabular-nums; }

/* 仓位历史 */
.ph-card { padding: 14px 16px; }
.ph-card .l1 { display: flex; align-items: center; gap: 8px; }
.ph-card .sym { font-size: 17px; font-weight: 700; }
.ph-card .tag { font-size: 11.5px; color: var(--sub); background: var(--card); padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.ph-card .mode { font-size: 11.5px; color: var(--sub); background: var(--card); padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.ph-card .rt { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; margin-top: 14px; }
.ph-grid .k { font-size: 11.5px; color: var(--sub); }
.ph-grid .v { font-size: 15px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.ph-grid .v.down { color: var(--down); } .ph-grid .v.up { color: var(--up); }
.ph-times { margin-top: 14px; }
.ph-times .kv { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 13.5px; }
.ph-times .kv .k { color: var(--sub); }
.ph-times .kv .v { color: var(--text); font-variant-numeric: tabular-nums; }

/* 图表水印 / 盘口表头 */
.chart-wm { position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%); display: flex; align-items: center; gap: 6px; color: #dfe1e6; font-size: 17px; font-weight: 700; letter-spacing: 1.5px; pointer-events: none; }
body[data-mode="dark"] .chart-wm { color: #2b3139; }
.ob-fund { text-align: right; font-size: 11.5px; color: var(--sub); padding-bottom: 6px; }
.ob-fund b { display: block; font-size: 13px; color: var(--text); font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ob-hd { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--sub2); border-bottom: 1px solid var(--line); padding-bottom: 5px; margin-bottom: 3px; line-height: 1.25; }
.tabs-ed { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 8px 0; }
