/* =========================================================================
   视觉：深墨蓝底 + 香槟金点缀的交易所风格（默认深色，可切换浅色）。
   布局：毛玻璃顶栏 → 滚动公告 → 视图（交易 / 账户 / 管理）。
   账户与管理为“左侧导航 + 右侧内容”，手机端导航横向滚动。
   ========================================================================= */
:root {
  /* 深色（默认） */
  --bg: #0a0d14; --bg-2: #0e121b;
  --surface: #121722; --surface-2: #161c29; --sunk: #0d1119;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .055);
  --fg: #eceff5; --fg-2: #c3cad6; --muted: #858fa3;
  --ink: #d9b46c; --ink-2: #f0d9a6; --ink-3: #a97e35; --ink-fg: #1a1408;   /* 香槟金：主按钮、链接、强调 */
  --gold: #e3bd74; --gold-bg: rgba(217, 180, 108, .1);
  --buy: #2fc489; --buy-bg: rgba(47, 196, 137, .12); --sell: #f2606f; --sell-bg: rgba(242, 96, 111, .12);
  --info: #8ab4ff; --info-bg: rgba(110, 150, 255, .1);
  --glow-1: rgba(217, 180, 108, .13); --glow-2: rgba(80, 110, 255, .12);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -12px rgba(0, 0, 0, .55);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7);
  --f-body: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-num: "Manrope", "Noto Sans SC", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 16px; --r-sm: 10px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f3ee; --bg-2: #efece5;
  --surface: #ffffff; --surface-2: #fbfaf7; --sunk: #f3f1ec;
  --line: rgba(20, 24, 33, .1); --line2: rgba(20, 24, 33, .065);
  --fg: #12161f; --fg-2: #3a4252; --muted: #6b7384;
  --ink: #9c7228; --ink-2: #c79a4a; --ink-3: #7d5a1c; --ink-fg: #ffffff;
  --gold: #a87a2c; --gold-bg: rgba(168, 122, 44, .09);
  --buy: #0f9a63; --buy-bg: rgba(15, 154, 99, .1); --sell: #d63a4a; --sell-bg: rgba(214, 58, 74, .09);
  --info: #2f5fc4; --info-bg: rgba(47, 95, 196, .08);
  --glow-1: rgba(199, 154, 74, .16); --glow-2: rgba(90, 120, 230, .08);
  --shadow: 0 1px 2px rgba(20, 24, 33, .04), 0 10px 30px -14px rgba(20, 24, 33, .16);
  --shadow-lg: 0 30px 80px -20px rgba(20, 24, 33, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg); font: 14px/1.6 var(--f-body);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0;
}
/* 顶部光晕 */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: 520px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 12% -60px, var(--glow-1), transparent 70%),
    radial-gradient(700px 320px at 88% -80px, var(--glow-2), transparent 70%);
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(217, 180, 108, .35); }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.addr, .codes, td.num.small { font-family: var(--f-mono); letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
[hidden] { display: none !important; }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸ "; color: var(--ink); }
details[open] summary::before { content: "▾ "; }

/* ---------- 顶栏 ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line2); }
.top-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 19px; color: var(--fg); letter-spacing: .01em; }
.brand:hover { color: var(--fg); }
.mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(140deg, var(--ink-2), var(--ink) 45%, var(--ink-3)); box-shadow: 0 6px 18px -6px rgba(217, 180, 108, .6), inset 0 1px 0 rgba(255, 255, 255, .35); }
.mark svg { width: 20px; stroke: #1a1408; }
.mark.logo { width: auto; min-width: 36px; background: none; border-radius: 0; box-shadow: none; }
.mark.logo img { height: 36px; max-width: 190px; object-fit: contain; display: block; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { position: relative; padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; transition: color .15s, background .15s; }
.nav a:hover { color: var(--fg); }
.nav a.on { color: var(--fg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.who { display: flex; align-items: center; gap: 10px; }
.chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); }
.chip:hover { color: var(--fg); border-color: var(--ink); }
.ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; color: var(--ink-fg); background: linear-gradient(140deg, var(--ink-2), var(--ink-3)); }
.lang, .theme { font-weight: 700; letter-spacing: .02em; }
.theme svg { width: 17px; height: 17px; }

/* ---------- 按钮 / 表单 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; white-space: nowrap; color: var(--fg); transition: border-color .15s, background .15s, transform .08s, box-shadow .15s, filter .15s; }
.btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ink) 60%, var(--line)); color: var(--fg); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.pri { border: 0; color: var(--ink-fg); background: linear-gradient(180deg, var(--ink-2), var(--ink) 55%, var(--ink-3)); box-shadow: 0 8px 22px -10px rgba(217, 180, 108, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.pri:hover:not(:disabled) { filter: brightness(1.06); color: var(--ink-fg); }
.btn.buy { border: 0; color: #fff; background: linear-gradient(180deg, #3bd597, var(--buy)); box-shadow: 0 8px 20px -10px rgba(47, 196, 137, .8); }
.btn.sell { border: 0; color: #fff; background: linear-gradient(180deg, #ff7683, var(--sell)); box-shadow: 0 8px 20px -10px rgba(242, 96, 111, .8); }
.btn.buy:hover:not(:disabled), .btn.sell:hover:not(:disabled) { filter: brightness(1.07); color: #fff; }
.btn.ghost { border-color: transparent; background: none; color: var(--ink); padding: 0 8px; box-shadow: none; }
.btn.ghost:hover:not(:disabled) { color: var(--ink-2); border-color: transparent; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 50px; font-size: 15.5px; font-weight: 700; width: 100%; border-radius: 12px; letter-spacing: .02em; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; font-weight: 600; letter-spacing: .01em; }
.in { display: flex; align-items: center; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); padding: 0 14px; gap: 8px; min-width: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
.in:hover { border-color: color-mix(in srgb, var(--fg) 18%, transparent); }
.in:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(217, 180, 108, .14); background: var(--surface); }
.in input, .in select, .in textarea { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; height: 100%; color: var(--fg); }
.in select option { background: var(--surface); color: var(--fg); }
.in input::placeholder, .in textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.in .unit { color: var(--muted); font-size: 13px; font-weight: 600; }
.in button { border: 0; background: none; color: var(--ink); font-weight: 700; padding: 0; }
input[type="checkbox"] { accent-color: var(--ink); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.6); }
:root[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator { filter: none; }
.form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--sunk); border: 1px solid var(--line2); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 9px; color: var(--muted); font-weight: 700; transition: color .15s, background .15s; }
.seg button:hover:not(:disabled) { color: var(--fg); }
.seg button.on { background: var(--surface-2); color: var(--fg); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 4px 12px -4px rgba(0, 0, 0, .5), 0 0 0 1px var(--line); }
.seg.trade button.on.b { background: var(--buy); color: #fff; box-shadow: 0 6px 18px -8px var(--buy); }
.seg.trade button.on.s { background: var(--sell); color: #fff; box-shadow: 0 6px 18px -8px var(--sell); }
.err { color: var(--sell); font-size: 13px; font-weight: 600; }
.err:empty { display: none; }
.notice { background: var(--gold-bg); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); border-radius: 12px; padding: 12px 16px; font-size: 13.5px; line-height: 1.7; }
.notice.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }

/* ---------- 面板 ---------- */
.panel { position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.panel-h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 18px 22px; border-bottom: 1px solid var(--line2); }
.panel-h h2, .panel-h h3 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -.005em; }
.panel-h h2 { font-size: 18px; }
.panel-b { padding: 22px; }
.sp { flex: 1; }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); font-weight: 700; }
h1 { margin: 6px 0 0; font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; text-wrap: balance; }
h1 .x { margin: 0 .2em; background: linear-gradient(180deg, var(--ink-2), var(--ink-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty { padding: 44px 22px; text-align: center; color: var(--muted); }
.loading { padding: 64px 0; text-align: center; color: var(--muted); }

/* ---------- 交易页 ---------- */
.mhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; padding-block: 38px 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.trust svg { width: 14px; height: 14px; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat { padding: 18px 22px; border-right: 1px solid var(--line2); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat dt { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.stat dd { margin: 6px 0 0; font-size: 24px; font-weight: 800; font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat dd small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 5px; letter-spacing: 0; }
.stat dd a { color: inherit; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat { border-bottom: 1px solid var(--line2); } .stat:nth-child(2n) { border-right: 0; } .stat:last-child { grid-column: 1 / -1; border-bottom: 0; } .stat dd { font-size: 20px; } }
.balbar { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; padding: 15px 22px; font-size: 13px; color: var(--muted); background: linear-gradient(90deg, var(--gold-bg), transparent 60%); border-radius: var(--r) var(--r) 0 0; }
.balbar b { color: var(--fg); font-family: var(--f-num); font-variant-numeric: tabular-nums; font-weight: 800; margin-left: 2px; }
.stack { display: grid; gap: 18px; padding-bottom: 40px; }
.rules { display: grid; gap: 8px; font-size: 13px; color: var(--muted); padding: 18px 22px; border-top: 1px solid var(--line2); line-height: 1.7; }
.rules b { color: var(--fg-2); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 22px; background: var(--sunk); border-bottom: 1px solid var(--line2); }
.filters .field { width: 160px; }
.filters .in { height: 40px; border-radius: 10px; background: var(--surface); }
.coinbar { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 18px; scrollbar-width: thin; }
.coinbar a { position: relative; display: grid; gap: 2px; min-width: 128px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--fg); flex: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.coinbar a:hover { border-color: color-mix(in srgb, var(--ink) 50%, var(--line)); transform: translateY(-1px); color: var(--fg); }
.coinbar a b { font-size: 15.5px; font-weight: 800; letter-spacing: .01em; }
.coinbar a span { font-size: 13px; color: var(--muted); font-family: var(--f-num); font-variant-numeric: tabular-nums; font-weight: 600; }
.coinbar a.on { border-color: transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, linear-gradient(140deg, var(--ink-2), var(--ink-3)) border-box; border: 1px solid transparent; box-shadow: 0 10px 28px -14px rgba(217, 180, 108, .7); }
.coinbar a.on b { color: var(--ink); }

/* 表格 */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 12px 22px; border-bottom: 1px solid var(--line2); white-space: nowrap; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 14px 22px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--fg) 3%, transparent); }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
.book td { padding-block: 18px; }
.seller { display: flex; gap: 12px; align-items: center; }
.seller b { display: block; font-weight: 700; }
.price { font-size: 21px; font-weight: 800; font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price small { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 7px; background: var(--sunk); color: var(--fg-2); border: 1px solid var(--line2); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-ok { background: var(--buy-bg); color: var(--buy); }
.p-wait { background: var(--gold-bg); color: var(--gold); }
.p-no { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
.p-bad { background: var(--sell-bg); color: var(--sell); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.c-buy { color: var(--buy); } .c-sell { color: var(--sell); }
.pos { color: var(--buy); } .neg { color: var(--sell); }
.pager { display: flex; justify-content: flex-end; gap: 8px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line2); }
@media (max-width: 720px) {
  .book thead { display: none; }
  .book tr { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; padding: 16px 18px; border-bottom: 1px solid var(--line2); }
  .book td { padding: 0; border: 0; }
  .book td:nth-child(1), .book td:nth-child(4) { grid-column: 1 / -1; }
  .book td.r { grid-row: 2; grid-column: 2; align-self: center; }
}

/* ---------- 账户 / 管理 ---------- */
.split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding-block: 30px 48px; align-items: start; }
.side { display: grid; gap: 3px; position: sticky; top: 90px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; transition: color .15s, background .15s; }
.side a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 4%, transparent); }
.side a.on { color: var(--ink); background: var(--gold-bg); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; padding-top: 16px; } .side { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; } .side a { white-space: nowrap; } }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sell); color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; font-family: var(--f-num); box-shadow: 0 4px 10px -4px var(--sell); }
.cards2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .cards2 { grid-template-columns: 1fr; } }
.asset { padding: 22px; display: grid; gap: 14px; overflow: hidden; }
.asset .big { font-size: 32px; font-weight: 800; font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.15; overflow-wrap: anywhere; }
.asset .big small { font-size: 13.5px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.addr { font-size: 14px; overflow-wrap: anywhere; background: var(--sunk); border: 1px dashed color-mix(in srgb, var(--ink) 35%, var(--line)); padding: 14px 16px; border-radius: 12px; color: var(--fg); }
.qr { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 12px 30px -12px rgba(0, 0, 0, .6); }
.qr img, .qr canvas { width: 100% !important; height: auto !important; }
.depo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 560px) { .depo { grid-template-columns: 1fr; } }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; background: var(--sunk); border: 1px solid var(--line); padding: 16px; border-radius: 12px; }
.list-row { display: flex; gap: 12px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.logo-preview { height: 76px; min-width: 190px; max-width: 290px; display: grid; place-items: center; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; background: var(--sunk); }
.logo-preview img { height: 52px; width: auto; max-width: 260px; object-fit: contain; }


/* ---------- 弹窗 / 提示 ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(4, 6, 10, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.modal { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); width: min(500px, 100%); max-height: 100%; overflow: auto; border-radius: 20px; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(760px, 100%); }
.mh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 26px 0; }
.mh h2 { margin: 4px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.mx { border: 0; background: var(--sunk); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--muted); display: grid; place-items: center; }
.mx:hover { color: var(--fg); }
.mb { padding: 20px 26px 26px; display: grid; gap: 16px; }
.sum { background: var(--sunk); border: 1px solid var(--line2); border-radius: 14px; padding: 14px 16px; }
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); padding: 12px 20px; border-radius: 12px; font-weight: 600; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
.toast::before { content: "✓"; color: var(--buy); font-weight: 800; margin-right: 8px; }
.toast.bad { background: var(--sell); color: #fff; border-color: transparent; }
.toast.bad::before { content: "!"; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .modal { animation: up .22s cubic-bezier(.2, .8, .2, 1); }
  .toast { animation: up .2s ease-out; }
  @keyframes up { from { transform: translateY(12px); opacity: 0; } }
  .toast { animation-name: toastIn; }
  @keyframes toastIn { from { transform: translate(-50%, 10px); opacity: 0; } }
  #view > * { animation: fadeIn .28s ease-out; }
  @keyframes fadeIn { from { opacity: .4; transform: translateY(4px); } }
}

.foot { padding-block: 26px 32px; color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 8px 22px; border-top: 1px solid var(--line2); margin-top: auto; }

/* ---------- 顶部滚动公告 ---------- */
.ticker { background: linear-gradient(90deg, var(--gold-bg), color-mix(in srgb, var(--gold-bg) 40%, transparent)); border-bottom: 1px solid var(--line2); color: var(--fg-2); }
.tk-in { display: flex; align-items: center; gap: 12px; height: 40px; }
.tk-icon { color: var(--ink); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-bg); }
.tk-icon svg { width: 15px; height: 15px; }
.tk-view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.tk-track { display: inline-flex; white-space: nowrap; animation: tk-run 30s linear infinite; font-size: 13.5px; font-weight: 500; }
.tk-gap { display: inline-flex; }
.tk-item { padding-right: 64px; position: relative; }
.tk-item::after { content: "◆"; position: absolute; right: 26px; color: color-mix(in srgb, var(--ink) 55%, transparent); font-size: 8px; top: 50%; transform: translateY(-50%); }
.tk-item b { color: var(--ink); font-weight: 800; }
.ticker:hover .tk-track, .ticker:focus-within .tk-track { animation-play-state: paused; }
@keyframes tk-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tk-in { height: auto; padding-block: 8px; }
  .tk-track { animation: none; white-space: normal; display: block; }
  .tk-gap { display: none; }
  .tk-item { display: block; padding-right: 0; }
  .tk-item::after { display: none; }
}

/* ---------- 手机 ---------- */
@media (max-width: 640px) {
  .top-in { gap: 10px; height: 60px; }
  .brand span:last-child { display: none; }
  .chip .nm { display: none; }
  .chip { padding: 3px; }
  .nav a { padding: 7px 10px; }
  .mhead { padding-block: 24px 16px; }
  .panel-h, .panel-b, .filters, .rules, .balbar { padding-left: 16px; padding-right: 16px; }
  th, td { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 520px) {
  .top-in { gap: 6px; }
  .nav a { padding: 7px 8px; }
  .lang, .theme { padding: 0 6px; }
  #wReg { display: none; }
  .wrap { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
}

/* 手续费统计 */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .cards3 { grid-template-columns: 1fr; } }
.fee-chart { width: 100%; height: auto; display: block; }
.fee-chart .grid { stroke: var(--line); stroke-width: 1; }
.fee-chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--f-num); }
.fee-chart .g1 { stop-color: var(--ink-2); }
.fee-chart .g2 { stop-color: var(--ink-3); }
.fee-chart rect:hover { filter: brightness(1.15); }
tr.total td { background: var(--gold-bg); border-top: 1px solid var(--line); }
td.num:first-child { white-space: nowrap; }
.chip .nm, .seller b { unicode-bidi: plaintext; }
.btn.del { color: var(--sell); }
.btn.del:hover:not(:disabled) { border-color: var(--sell); color: var(--sell); }
table.tight th, table.tight td { padding-left: 14px; padding-right: 14px; }
table.tight th:first-child, table.tight td:first-child { padding-left: 22px; }
table.tight th:last-child, table.tight td:last-child { padding-right: 22px; }
table.tight th { white-space: normal; letter-spacing: .03em; vertical-align: bottom; }
