/* ==========================================================================
   Ulink H5 — 移动端（App 化）设计系统
   尺寸/色值全部对齐 Ulink.apk：导航栏 44dp、底部 Tab 50dp、列表行 52dp、
   卡片圆角 12dp，金 #F0B90B / 涨 #0BBA99 / 跌 #EE3E57，数字用 DIN Pro。
   桌面浏览器打开时自动套一层手机外壳预览（见文件末尾）。
   ========================================================================== */

@font-face {
  font-family: 'DIN Pro';
  src: url('../../assets/font/dinpro-bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'DIN Pro';
  src: url('../../assets/font/dinpro-medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'DIN Pro';
  src: url('../../assets/font/dinpro_regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --brand: #f0b90b;
  --brand-600: #d9a400;
  --brand-soft: rgba(240, 185, 11, 0.14);
  --brand-ink: #181a20;

  --up: #0bba99;
  --down: #ee3e57;

  --bg: #f5f5f5;
  --nav: #ffffff;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --line: #eaecef;
  --line-2: #dfe3e8;

  --text: #191b27;
  --text-2: #707a8a;
  --text-3: #9aa3ad;

  --nav-h: 44px;
  --tab-h: 50px;
  --radius: 12px;
  --pad: 16px;

  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', Roboto, Helvetica, Arial, sans-serif;
  --num-font: 'DIN Pro', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme='dark'] {
  --brand-soft: rgba(240, 185, 11, 0.18);

  --bg: #14161b;
  --nav: #181b21;
  --surface: #181b21;
  --surface-2: #1e2128;
  --line: #2a2d36;
  --line-2: #343842;

  --text: #eaedf1;
  --text-2: #888c95;
  --text-3: #6b7079;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* h5.js 会把这里的内容搬进 .h5-scroll，搬之前不显示，避免外壳未就绪时闪一下 */
[data-h5='content'] { display: none; }

html { -webkit-text-size-adjust: 100%; }

body.h5 {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: none; background: none; padding: 0; }

.num { font-family: var(--num-font); font-feature-settings: 'tnum' 1; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.center { text-align: center; }
.right { text-align: right; }
.hide { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.row-b { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }
.fw { flex-wrap: wrap; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }

/* ------------------------------------------------------------------ shell -- */

.h5-scroll {
  min-height: 100dvh;
  padding-bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.h5-scroll.no-tab { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.navbar {
  position: sticky; top: 0; z-index: 60;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 6px;
  padding-inline: 8px;
  background: var(--nav);
  border-bottom: 1px solid var(--line);
}
.navbar .nb-title {
  flex: 1; text-align: center; font-size: 17px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.navbar .nb-btn {
  min-width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; color: var(--text); cursor: pointer;
}
.navbar .nb-btn:active { background: var(--surface-2); }
.navbar .nb-btn svg { width: 20px; height: 20px; }

/* 左上角「我的」入口（App 里个人中心不在底部导航） */
.navbar .nb-profile {
  width: 32px; min-width: 32px; height: 32px; margin-left: 2px;
  border-radius: 50%; border: 1.5px solid var(--brand);
  background: var(--brand-soft); color: var(--brand-600);
}
[data-theme='dark'] .navbar .nb-profile { color: var(--brand); }
.navbar .nb-profile svg { width: 18px; height: 18px; }
.navbar .nb-txt { font-size: 13px; font-weight: 600; padding: 0 8px; white-space: nowrap; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: var(--nav);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font-size: 10px; font-weight: 600; color: var(--text-2);
}
.tabbar a img { width: 22px; height: 22px; object-fit: contain; }
.tabbar a img.tab-logo { width: 24px; height: 24px; }
.tabbar a span { line-height: 1.1; }
.tabbar a.active { color: var(--brand); }
.tabbar a:active { opacity: 0.7; }

.page-sub {
  padding: 10px var(--pad) 2px;
  color: var(--text-2); font-size: 12px;
}

/* ----------------------------------------------------------------- cards --- */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-pad { padding: 14px; }
.gap { padding: 0 var(--pad) 12px; }
.sec {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad) 8px;
}
.sec h3 { margin: 0; font-size: 15px; font-weight: 700; }
.sec .more { font-size: 12px; color: var(--text-2); }

.hero-band {
  padding: 12px var(--pad) 18px;
  background: linear-gradient(180deg, var(--brand-soft), transparent);
}

.brand-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px var(--pad);
}
.brand-row img { height: 22px; }
.brand-row .acts { display: flex; align-items: center; gap: 14px; }
.brand-row .acts img { width: 21px; height: 21px; opacity: 0.85; }

/* ------------------------------------------------------------------ 顶部资产 -- */

.asset-card {
  position: relative; overflow: hidden;
  margin: 0 var(--pad);
  padding: 16px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #1c1f27 0%, #0b0e13 58%, #241f10 100%);
}
.asset-card::after {
  content: ''; position: absolute; right: -50px; top: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 185, 11, 0.38), transparent 70%);
}
.asset-card .lbl { position: relative; font-size: 12px; color: rgba(255, 255, 255, 0.66); }
.asset-card .val {
  position: relative; margin-top: 4px;
  font-size: 27px; font-weight: 700; font-family: var(--num-font);
}
.asset-card .sub { position: relative; margin-top: 6px; font-size: 11.5px; color: rgba(255, 255, 255, 0.6); }
.asset-card .quick {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin-top: 16px;
}
.asset-card .quick a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: rgba(255, 255, 255, 0.88);
}
.asset-card .quick img { width: 22px; height: 22px; }
.asset-card .quick .pill {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12);
}

/* 首页金刚区 */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.entry {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 2px; font-size: 11.5px; color: var(--text-2); text-align: center;
}
.entry:active { opacity: 0.6; }
.entry img { width: 30px; height: 30px; object-fit: contain; }
.entry .ico-box {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft);
}
.entry .ico-box img { width: 22px; height: 22px; }

.banner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.banner {
  position: relative; overflow: hidden;
  min-height: 96px; padding: 12px;
  border-radius: var(--radius); background: var(--surface);
  display: flex; flex-direction: column; justify-content: space-between;
}
.banner h4 { margin: 0; font-size: 13.5px; }
.banner p { margin: 3px 0 0; font-size: 11px; color: var(--text-2); max-width: 68%; }
.banner .art { position: absolute; right: -6px; bottom: -8px; width: 74px; opacity: 0.95; }
.banner:active { transform: scale(0.985); }

/* --------------------------------------------------------------- 行情列表 --- */

.coin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px var(--pad);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.coin-row:last-child { border-bottom: none; }
.coin-row:active { background: var(--surface-2); }
.coin-row .nm { font-size: 14px; font-weight: 700; }
.coin-row .nm small { font-size: 11px; color: var(--text-3); font-weight: 500; }
.coin-row .vol { font-size: 11px; color: var(--text-3); font-family: var(--num-font); }
.coin-row .px { text-align: right; }

.coin-ico { width: 30px; height: 30px; border-radius: 50%; object-fit: contain; flex: none; }
.coin-ico-sm { width: 22px; height: 22px; border-radius: 50%; object-fit: contain; flex: none; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-600);
}
[data-theme='dark'] .avatar { color: var(--brand); }

.pct {
  display: inline-block; min-width: 62px; text-align: center;
  padding: 3px 6px; border-radius: 6px; color: #fff;
  font-family: var(--num-font); font-weight: 700; font-size: 12.5px;
}
.pct.up { background: var(--up); }
.pct.down { background: var(--down); }
.pct.flat { background: var(--text-3); }

.spark { width: 62px; height: 26px; display: block; }

/* ------------------------------------------------------------------ tabs ---- */

.seg-tabs {
  display: flex; gap: 4px; overflow-x: auto;
  padding: 8px var(--pad);
  background: var(--nav);
  scrollbar-width: none;
}
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tabs button {
  flex: none; padding: 6px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.seg-tabs button.active { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.seg-tabs.underline { gap: 0; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.seg-tabs.underline button { border-radius: 0; border-bottom: 2px solid transparent; padding: 9px 12px; }
.seg-tabs.underline button.active {
  background: transparent; color: var(--text); border-bottom-color: var(--brand);
}

.seg {
  display: flex; padding: 3px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.seg button { flex: 1; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.seg button.active { background: var(--surface); color: var(--text); }
.seg.up button.active { background: var(--up); color: #fff; }
.seg.down button.active { background: var(--down); color: #fff; }

/* ------------------------------------------------ 顶部模块导航（对齐 App） ---
   App 币币页：现货 / 闪兑 / 买币 纯文字 Tab（选中加粗 + 金色下划线）
   App 合约页：永续合约 / 策略交易 / 闪电合约 / 无限模式 金框分段（选中金色填充） */

.top-tabs { position: relative; z-index: 40; background: var(--surface); }

.top-tabs.plain {
  display: flex; align-items: center; gap: 2px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
}
.top-tabs.plain button {
  position: relative; padding: 11px 12px;
  font-size: 15px; font-weight: 600; color: var(--text-2);
}
.top-tabs.plain button.active { color: var(--text); font-weight: 700; }
.top-tabs.plain button.active::after {
  content: ''; position: absolute; left: 50%; bottom: 3px;
  width: 18px; height: 2px; margin-left: -9px;
  border-radius: 2px; background: var(--brand);
}

.top-tabs.boxed {
  display: flex; margin: 8px var(--pad) 0;
  border: 1px solid var(--brand); border-radius: 8px;
  overflow: hidden; background: var(--surface);
}
.top-tabs.boxed button {
  position: relative; flex: 1; height: 38px;
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  border-right: 1px solid var(--brand);
}
.top-tabs.boxed button:last-child { border-right: none; }
.top-tabs.boxed button.active { background: var(--brand); color: var(--brand-ink); }

.top-tabs .new-badge {
  position: absolute; top: -1px; right: 1px;
  padding: 0 4px; font-size: 9px; font-weight: 700; line-height: 13px;
  color: #fff; background: #e8342f;
  border-radius: 0 6px 0 6px;
}

/* 交易对选择行（App 的 BTCUSDT ▼ + 图标） */
.pair-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--pad) 8px; background: var(--surface);
}
.pair-bar .pp { display: flex; align-items: baseline; gap: 6px; font-size: 17px; font-weight: 700; }
.pair-bar .pp small { font-size: 11px; font-weight: 600; color: var(--text-2); }
.pair-bar .chev { width: 12px; height: 12px; opacity: .6; }
.pair-bar .acts { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pair-bar .acts img { width: 20px; height: 20px; opacity: .8; }

.ob-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 6px 12px; font-size: 10.5px; color: var(--text-3);
}
.ob-head span:last-child { text-align: right; }

/* ------------------------------------------------------------------ cells --- */

.cells { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.cell {
  display: flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 11px var(--pad);
  border-bottom: 1px solid var(--line);
}
.cell:last-child { border-bottom: none; }
.cell.link:active { background: var(--surface-2); }
.cell img.ci { width: 20px; height: 20px; object-fit: contain; flex: none; }
.cell .t { font-size: 14px; font-weight: 600; }
.cell .s { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.cell .v { margin-left: auto; font-size: 13px; color: var(--text-2); }
.cell .arrow { width: 14px; height: 14px; margin-left: 6px; opacity: 0.5; flex: none; }
.cell .badge {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-600);
}
[data-theme='dark'] .cell .badge { color: var(--brand); }
.cell .badge.up { background: rgba(11, 186, 153, 0.14); color: var(--up); }
.cell .badge.down { background: rgba(238, 62, 87, 0.14); color: var(--down); }

/* ------------------------------------------------------------------ forms --- */

.field { padding: 12px var(--pad); border-bottom: 1px solid var(--line); background: var(--surface); }
.field:last-child { border-bottom: none; }
.field > label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.field .row-b > label { margin: 0; }
.input {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 14px; outline: none;
}
.input:focus { border-color: var(--brand); }
.input::placeholder { color: var(--text-3); }
.input.num { font-family: var(--num-font); }
textarea.input { height: auto; padding: 10px 12px; resize: none; }
select.input { appearance: none; }
.prefix { display: flex; align-items: center; gap: 8px; }
.prefix .code { font-family: var(--num-font); color: var(--text-2); flex: none; }
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; }
.code-row .btn { flex: none; height: auto; padding: 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-outline { background: transparent; border: 1px solid var(--line-2); }
.btn-up { background: var(--up); color: #fff; }
.btn-down { background: var(--down); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 48px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; }

.footer-bar {
  position: sticky;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  z-index: 65;
  margin-top: 12px;
  padding: 10px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.footer-bar .row { gap: 10px; }

.link { color: var(--brand-600); font-weight: 600; }
[data-theme='dark'] .link { color: var(--brand); }

.tip {
  padding: 10px 12px; border-radius: 10px;
  background: var(--brand-soft); color: var(--text-2); font-size: 11.5px; line-height: 1.6;
}
.tip.warn { background: rgba(238, 62, 87, 0.1); }
.err { color: var(--down); font-size: 11.5px; min-height: 15px; margin-top: 4px; }

.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-2); }
.check input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--brand); flex: none; }

/* ------------------------------------------------------------------ charts -- */

.kline-wrap { position: relative; background: var(--surface); }
.kline-wrap canvas { width: 100%; display: block; }
.kline-legend {
  position: absolute; left: 10px; top: 8px;
  display: flex; gap: 10px; font-size: 10.5px; color: var(--text-2);
  font-family: var(--num-font); pointer-events: none;
}
.book { font-family: var(--num-font); font-size: 11.5px; }
.book-row {
  position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr;
  padding: 2.5px 12px;
}
.book-row .depth { position: absolute; top: 0; bottom: 0; right: 0; pointer-events: none; }
.book-row.ask .depth { background: rgba(238, 62, 87, 0.12); }
.book-row.bid .depth { background: rgba(11, 186, 153, 0.12); }
.book-row span { position: relative; }
.book-row span:not(:first-child) { text-align: right; }
.book-mid {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-block: 1px solid var(--line);
}

.balance-line {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0; padding: 10px var(--pad);
  background: var(--surface-2); font-size: 11.5px; color: var(--text-2);
}
.balance-line b { display: block; font-family: var(--num-font); color: var(--text); font-size: 13px; }

/* ------------------------------------------------------------- bottom sheet -- */

.sheet-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.22s;
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  max-height: 82dvh; overflow-y: auto;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateY(102%); transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
.sheet.show { transform: translateY(0); }
.sheet-head {
  position: sticky; top: 0; background: var(--surface);
  padding: 12px var(--pad) 10px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.sheet-head::before {
  content: ''; position: absolute; left: 50%; top: 6px;
  width: 34px; height: 4px; margin-left: -17px; border-radius: 999px;
  background: var(--line-2);
}
.sheet-head h4 { margin: 6px 0 0; font-size: 15px; }
.sheet-body { padding: 12px var(--pad); }

/* ------------------------------------------------------------------ misc ---- */

.stepper { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); }
.stepper .dot {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-600);
}
.stepper .line { flex: 1; height: 1px; background: var(--line-2); }

.progress { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); }

.badge-lg {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--surface-2); color: var(--text-2);
}
.badge-lg.gold { background: var(--brand-soft); color: var(--brand-600); }
[data-theme='dark'] .badge-lg.gold { color: var(--brand); }
.badge-lg.up { background: rgba(11, 186, 153, 0.14); color: var(--up); }
.badge-lg.down { background: rgba(238, 62, 87, 0.14); color: var(--down); }

.empty { padding: 46px 0; text-align: center; color: var(--text-3); font-size: 12.5px; }
.empty img { width: 96px; margin: 0 auto 10px; opacity: 0.9; }

.avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-600);
}
[data-theme='dark'] .avatar-lg { color: var(--brand); }

.profile-metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; }
.profile-metrics div { text-align: center; }
.profile-metrics b { display: block; font-family: var(--num-font); font-size: 15px; }
.profile-metrics span { font-size: 10.5px; color: var(--text-2); }

.poster-sm { width: 84px; border-radius: 10px; border: 1px solid var(--line); }

.qr-sm { width: 120px; padding: 8px; background: #fff; border-radius: 10px; }

.news-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px var(--pad); background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: none; }
.news-item:active { background: var(--surface-2); }
.news-item .tt {
  font-size: 13.5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-item time { font-size: 11px; color: var(--text-3); font-family: var(--num-font); flex: none; }

.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }

.toast-host {
  position: fixed; left: 0; right: 0; bottom: 90px; z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(24, 26, 32, 0.94); color: #fff;
  padding: 9px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  max-width: 82vw; animation: t-in 0.18s ease both;
}
@keyframes t-in { from { opacity: 0; transform: translateY(8px); } }

.switch {
  position: relative; width: 42px; height: 24px; border-radius: 999px;
  background: var(--line-2); flex: none; transition: background-color 0.18s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform 0.18s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.switch[aria-checked='true'] { background: var(--brand); }
.switch[aria-checked='true']::after { transform: translateX(18px); }

/* 商品/理财卡 */
.product {
  display: flex; align-items: center; gap: 12px;
  padding: 13px var(--pad); background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.product:last-child { border-bottom: none; }
.rate { font-family: var(--num-font); font-size: 19px; font-weight: 700; color: var(--brand); }

/* 跟单交易员卡 */
.trader { padding: 12px var(--pad); background: var(--surface); border-bottom: 1px solid var(--line); }
.trader .metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.trader .metrics div { text-align: center; }
.trader .metrics b { display: block; font-family: var(--num-font); font-size: 14px; }
.trader .metrics span { font-size: 10px; color: var(--text-2); }

/* 任务卡 */
.task {
  padding: 13px var(--pad); background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.task:last-child { border-bottom: none; }
.task .lv {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand-600);
}
[data-theme='dark'] .task .lv { color: var(--brand); }

/* ---------------------------------------------------- 桌面预览：手机外壳 --- */

.h5-desktop-bar { display: none; }

@media (min-width: 561px) {
  body.h5 {
    min-height: 100vh;
    background:
      radial-gradient(900px 480px at 80% -10%, rgba(240, 185, 11, 0.16), transparent 60%),
      var(--bg);
    padding: 22px 0 60px;
  }
  .h5-desktop-bar {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    max-width: 420px; margin: 0 auto 14px;
    font-size: 12px; color: var(--text-2);
  }
  .h5-desktop-bar select,
  .h5-desktop-bar button {
    height: 30px; border-radius: 8px; border: 1px solid var(--line-2);
    background: var(--surface); color: var(--text); font-size: 12px; padding: 0 8px;
    cursor: pointer;
  }

  .h5-scroll {
    position: relative;
    width: 420px; height: 860px;
    margin: 0 auto;
    overflow-y: auto; overflow-x: hidden;
    border-radius: 38px;
    border: 10px solid #12151a;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    background: var(--bg);
    padding-bottom: 0;
    scrollbar-width: none;
  }
  .h5-scroll::-webkit-scrollbar { display: none; }
  .navbar { border-radius: 28px 28px 0 0; }
  .tabbar {
    position: absolute; width: 400px; left: 50%; margin-left: -200px;
    bottom: 0; border-radius: 0 0 28px 28px;
  }
  .sheet, .sheet-mask { max-width: 420px; margin: 0 auto; left: 0; right: 0; }
  .toast-host { bottom: 120px; }
}

@media (max-width: 380px) {
  :root { --pad: 13px; }
  .asset-card .val { font-size: 24px; }
}
