/* H5 合约站 · E 套精简变量 */
:root {
  --bg: #08090d;
  --card: #12131a;
  --card-inset: #0c0d12;
  --line: rgba(255, 255, 255, 0.065);
  --text: #e8eaed;
  --muted: #858895;
  --icon: #969bab;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --danger: #f87171;
  --up: #34d399;
  --down: #fb7185;
  --elev-1: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  --elev-2: 0 12px 40px rgba(0, 0, 0, 0.45);
  --app-max: 430px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  min-height: 100%;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 80% at 50% -35%, rgba(120, 140, 180, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(40, 50, 80, 0.2), transparent 45%);
}
body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100%;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.015em;
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.app-view {
  position: relative;
  z-index: 1;
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), var(--elev-2);
}
@media (max-width: 480px) {
  .app-view { max-width: none; box-shadow: none; }
}
.page-guest .app-view { padding-bottom: 24px; box-shadow: none; }

.hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 14px;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.hdr-btn, .hdr-btn.hollow {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--icon);
  text-decoration: none;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  box-shadow: var(--elev-1);
  cursor: pointer;
  font-family: inherit;
}
button.hdr-btn {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0;
}
.hdr-btn svg { stroke: currentColor; }
/* 星标：勿在 SVG 上写 fill 属性，否则部分 WebView 下 CSS 改不了实心颜色 */
#trade-watch-btn .trade-star-ic path {
  fill: none;
  stroke: currentColor;
  transition: fill 0.12s ease, stroke 0.12s ease;
}
#trade-watch-btn.on {
  color: #fbbf24;
}
#trade-watch-btn.on .trade-star-ic path {
  fill: #fbbf24;
  stroke: #fbbf24;
}
.hdr-title { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.hdr-mid { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; }
.hdr-mid .chev { opacity: 0.5; }
.hdr-mid .chev.trade-symbol-chev {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 1px;
  opacity: 0.82;
  color: var(--muted);
}
.hdr-mid .chev.trade-symbol-chev svg {
  stroke: currentColor;
}
body.symbol-sheet-open .hdr-mid .chev.trade-symbol-chev,
button.hdr-mid.hdr-link:active .chev.trade-symbol-chev {
  opacity: 1;
  color: var(--text);
}

.home-market-banner {
  margin: 4px 16px 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--elev-1), 0 12px 32px rgba(0, 0, 0, 0.22);
  height: clamp(140px, 38vw, 220px);
  background: var(--card-inset);
}
.home-market-banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 0 16px 12px;
  box-shadow: var(--elev-1), 0 8px 24px rgba(0, 0, 0, 0.2);
}
.search-box svg { flex-shrink: 0; stroke: var(--icon); }
.search-box input {
  flex: 1; border: none; background: transparent; color: var(--text);
  font-size: 14px; font-family: inherit; outline: none;
}
.search-box input::placeholder { color: var(--muted); }

.notice-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.03) 0%, transparent 42%), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 16px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--elev-1), 0 10px 28px rgba(0, 0, 0, 0.22);
}
.notice-card .ni { color: var(--icon); flex-shrink: 0; margin-top: 2px; }
.notice-card .ni svg { stroke: currentColor; }
.notice-card .nt { font-size: 13px; color: var(--muted); line-height: 1.5; font-weight: 500; }

.seg-tabs {
  display: flex; gap: 22px; margin: 0 16px 4px; border-bottom: 1px solid var(--line);
}
.seg-tabs button {
  background: none; border: none; color: var(--muted);
  font-size: 13px; font-family: inherit; font-weight: 600;
  padding: 10px 0; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.seg-tabs button.on { color: var(--text); border-bottom-color: var(--text); }

.page-strip { padding: 0 16px; }
.m-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 12px; border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}
.m-row:last-child { border-bottom: none; }
.m-row:active { background: rgba(255, 255, 255, 0.035); }
.m-chg { font-size: 12px; font-weight: 600; margin-top: 4px; }
.m-chg.up { color: var(--up); }
.m-chg.down { color: var(--down); }

.pair-row.m-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 6px;
}
.pair-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  position: relative;
}
.pair-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pair-icon-wrap.has-err .pair-icon {
  display: none;
}
.pair-icon-letter {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.pair-icon-wrap.has-err .pair-icon-letter {
  display: flex;
}
.pair-info {
  flex: 1;
  min-width: 0;
}
.pair-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pair-ticker {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.pair-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.pair-vol-line {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.pair-tail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pair-price-cell {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 5.25rem;
}
.pair-price-cell.pair-price-tick {
  animation: pairPriceTick 0.5s ease;
}
@keyframes pairPriceTick {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(1.4); color: #f0f4fa; }
}
.pair-chg-pill {
  min-width: 4.6rem;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1.15;
}
.pair-chg-pill.up {
  background: rgba(52, 211, 153, 0.22);
  color: var(--up);
}
.pair-chg-pill.down {
  background: rgba(251, 113, 133, 0.22);
  color: var(--down);
}
.list-hint {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* 账单页 */
.ledger-page {
  padding-top: 10px;
}
.ledger-filter-panel {
  margin: 0 0 18px;
  padding: 14px 14px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.05) 0%, transparent 45%),
    var(--card);
  box-shadow: var(--elev-1), 0 12px 36px rgba(0, 0, 0, 0.22);
}
.ledger-filter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}
.ledger-filter-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.ledger-filter-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.88;
}
.ledger-filter-wrap {
  position: relative;
  margin: 0 -2px;
  overflow: hidden;
}
.ledger-filter-wrap::before,
.ledger-filter-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22px;
  z-index: 1;
  pointer-events: none;
}
.ledger-filter-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--card), transparent);
}
.ledger-filter-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, var(--card), transparent);
}
.ledger-filter-scroll {
  display: flex;
  gap: 10px;
  padding: 4px 6px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  z-index: 2;
}
.ledger-filter-scroll::-webkit-scrollbar {
  display: none;
}
.ledger-filter-chip {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--elev-1);
  transition:
    transform 0.12s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.15s ease;
}
.ledger-filter-chip:active {
  transform: scale(0.96);
}
.ledger-filter-chip.on {
  color: var(--text);
  border-color: rgba(52, 211, 153, 0.5);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.24), rgba(52, 211, 153, 0.07));
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.1),
    0 10px 28px rgba(52, 211, 153, 0.14);
}

.ledger-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}
.ledger-card {
  padding: 14px 16px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, transparent 52%),
    var(--card);
  box-shadow: var(--elev-1);
}
.ledger-card-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ledger-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: rgba(52, 211, 153, 0.14);
  color: var(--up);
  border: 1px solid rgba(52, 211, 153, 0.32);
}
.ledger-amt {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.ledger-amt--in {
  color: var(--up);
}
.ledger-amt--out {
  color: var(--down);
}
.ledger-card-row2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}
.ledger-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.ledger-coin {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.ledger-time {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.82;
  margin-top: 8px;
}
.ledger-card-remark {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 8px;
  word-break: break-word;
}
.ledger-amt--neutral {
  color: var(--muted);
}
.ledger-load-more {
  display: none;
  width: calc(100% - 32px);
  margin: 14px 16px 28px;
}
.hdr-link {
  text-decoration: none;
  color: inherit;
}
button.hdr-mid.hdr-link {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: center;
}

/* 交易页 · 选择交易对底部面板 */
.symbol-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}
.symbol-sheet:not([hidden]) {
  pointer-events: auto;
}
.symbol-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.symbol-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
  z-index: 1;
}
.symbol-sheet-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.symbol-sheet-x {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card-inset);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.symbol-sheet-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 8px;
  padding: 10px 12px;
  background: var(--card-inset);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  flex-shrink: 0;
}
.symbol-sheet-search-wrap svg { flex-shrink: 0; stroke: currentColor; }
.symbol-sheet-search {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.symbol-sheet-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px 24px;
}
.sym-sheet-hint {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.sym-sheet-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 12px 10px;
  margin: 4px 0;
  border: none;
  border-radius: 10px;
  background: var(--card-inset);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.sym-sheet-row:active { opacity: 0.92; }
.sym-sheet-row.is-current {
  outline: 2px solid rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.08);
}
.sym-sheet-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sym-sheet-last {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #e8ecf3;
}
.sym-sheet-chg {
  min-width: 64px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sym-sheet-chg.up { color: var(--up); }
.sym-sheet-chg.down { color: var(--down); }

body.symbol-sheet-open {
  overflow: hidden;
}
.trade-subline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 14px;
  flex-wrap: wrap;
}
.trade-meta { font-size: 12px; color: var(--muted); font-weight: 500; }

.kline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 16px 8px;
  gap: 10px;
}
.kline-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); }
.kline-int {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.kline-int button {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card-inset);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.kline-int button.on {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

/* 必须盖过后面 .chart-box 的 flex，否则手机端两个子节点横排、K 线区宽可被压成 0 */
.chart-box.chart-live {
  display: block !important;
  flex-direction: unset !important;
  flex-wrap: unset !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  padding: 0;
  overflow: hidden;
}
/* 与 .page-strip 的左右 padding 二选一，避免手机端双重缩进导致 K 线过窄 */
.page-strip .chart-box.chart-live {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
}
.chart-live {
  position: relative;
  padding: 0 !important;
  overflow: hidden;
  min-height: 300px;
}
.trade-lv-chart {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 300px;
  min-width: 0;
  min-height: 300px;
  position: relative;
  z-index: 2;
  flex: none !important;
  touch-action: pan-x pan-y pinch-zoom;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  box-sizing: border-box;
}
.trade-lv-chart.chart-pending {
  opacity: 0.82;
  transition: opacity 0.2s ease-out;
}
.chart-fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}

.panel-hd {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 16px 16px 8px;
}

.depth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 8px;
}
.depth-col {
  background: var(--card-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 120px;
}
.depth-col.asks .depth-h { color: var(--down); }
.depth-col:not(.asks) .depth-h { color: var(--up); }
.depth-h {
  font-size: 11px;
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
}
.depth-rows { max-height: 220px; overflow-y: auto; }
.depth-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.depth-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  opacity: 0.16;
  border-radius: 0 4px 4px 0;
  transition: width 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}
.depth-row.bid .depth-bar-fill {
  background: var(--up);
}
.depth-row.ask .depth-bar-fill.depth-bar-fill-r {
  left: auto;
  right: 0;
  border-radius: 4px 0 0 4px;
  background: var(--down);
}
.depth-price,
.depth-qty {
  position: relative;
  z-index: 1;
}
.depth-row.bid .depth-price { color: var(--up); }
.depth-row.ask .depth-price { color: var(--down); }
.depth-qty {
  color: var(--muted);
  font-size: 11px;
}
.depth-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 12px; }

.order-panel {
  margin: 0 16px 24px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--elev-1);
}
.order-avail-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 14px;
  background: var(--card-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.order-avail-main { min-width: 0; flex: 1; }
.order-avail-caption {
  display: block; font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.03em; margin-bottom: 4px;
}
.order-avail-value {
  display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #e8ecf3; line-height: 1.2; word-break: break-all;
}
.order-avail-go {
  flex-shrink: 0; padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  color: var(--text); border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}
.order-avail-go:active { opacity: 0.9; }
.order-side { display: flex; gap: 10px; margin-bottom: 8px; }
.order-side .os {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card-inset);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.order-side .os.on {
  color: var(--up);
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.08);
}
.order-side .os.short.on {
  color: var(--down);
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.08);
}
.order-quick-amt {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 6px 0 12px;
}
.order-quick-amt .order-quick-lbl {
  width: 100%; font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: -2px;
}
.order-quick-amt .oqa {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card-inset); color: var(--text);
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
  min-width: 0;
}
.order-quick-amt .oqa-pct {
  color: #a8b4c8; font-size: 12px;
}
.order-quick-amt .oqa:active { opacity: 0.88; transform: scale(0.98); }

/* 下单区 · 止盈止损卡片 */
.tpsl-panel {
  margin: 14px 0 0;
  padding: 14px 14px 12px;
  background: var(--card-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--elev-1);
}
.tpsl-row { margin-bottom: 14px; }
.tpsl-row:last-child { margin-bottom: 0; }
.tpsl-row-hd {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.tpsl-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.tpsl-dot.tp {
  background: var(--up);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.45);
}
.tpsl-dot.sl {
  background: var(--down);
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.4);
}
.tpsl-row-title {
  font-size: 12px; font-weight: 800; color: var(--text);
}
.tpsl-row-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.tpsl-row-tag.tp {
  color: rgba(52, 211, 153, 0.95);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.22);
}
.tpsl-row-tag.sl {
  color: rgba(251, 113, 133, 0.95);
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.22);
}
.tpsl-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.tpsl-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px; font-weight: 700; font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.tpsl-chip:active { transform: scale(0.97); opacity: 0.92; }
.tpsl-chip.tp:not(.tpsl-chip-muted):hover { border-color: rgba(52, 211, 153, 0.35); }
.tpsl-chip.sl:not(.tpsl-chip-muted):hover { border-color: rgba(251, 113, 133, 0.35); }
.tpsl-chip.tp.on {
  color: #b6f5d6;
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.14);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.12);
}
.tpsl-chip.sl.on {
  color: #fecaca;
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(251, 113, 133, 0.12);
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.1);
}
.tpsl-chip-muted {
  color: var(--muted);
  font-weight: 600;
  border-style: dashed;
  opacity: 0.95;
}
.tpsl-chip-muted.on {
  color: var(--text);
  border-style: solid;
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.btn-secondary {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.btn-secondary:active { opacity: 0.92; }

.trade-wallet-hint {
  margin: 0 16px 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.trade-main-seg {
  margin: 0 16px 12px !important;
  flex-wrap: wrap;
  gap: 8px 16px !important;
}
.trade-main-seg button {
  font-size: 12px;
  padding: 8px 0;
}
.pos-list { padding: 0 16px 24px; }
.pos-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--elev-1);
}
.pos-card.muted { opacity: 0.92; }
.pos-hd { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.pos-hd .up { color: var(--up); }
.pos-hd .down { color: var(--down); }
.pos-lev { font-size: 12px; color: var(--muted); font-weight: 600; }
.pos-other { font-size: 11px; color: var(--muted); font-weight: 600; }
.pos-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
}
.pos-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.pos-row strong.up { color: var(--up); }
.pos-row strong.down { color: var(--down); }
.btn-close-pos {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.08);
  color: var(--down);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.form-page { padding: 0 16px 24px; }
.form-page .btn-primary { margin-top: 8px; }

/* —— 实名认证：壳层与注册页 login-shell / guest-card 对齐 —— */
.kyc-page {
  padding: 0 0 calc(18px + env(safe-area-inset-bottom));
}
.kyc-shell {
  flex: 1;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: clamp(8px, 2vh, 14px) 16px calc(12px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.kyc-shell > .guest-card.kyc-shell-card {
  padding: 8px 0 24px;
}
.kyc-shell .guest-card.kyc-shell-card .form-block .field-label:first-child {
  margin-top: 2px;
}
/* 与注册页 field-input 一致的内边距与字号；聚焦态与全站绿色强调统一 */
.kyc-shell input.field-input {
  padding: 14px 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card-inset);
  color-scheme: dark;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.kyc-shell input.field-input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.kyc-shell input.field-input:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
}
.kyc-shell .field-label {
  margin: 14px 0 6px;
}
.kyc-shell .guest-card.kyc-shell-card .form-block > .field-label:first-child {
  margin-top: 2px;
}
/* 下拉与文本框同材质（弱化其它页充币专用渐变） */
.kyc-shell select.field-input.h5-select {
  padding: 14px 46px 14px 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card-inset);
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.kyc-shell select.field-input.h5-select:hover {
  border-color: rgba(255, 255, 255, 0.14);
}
.kyc-shell select.field-input.h5-select:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(52, 211, 153, 0.14);
}
.kyc-shell select.field-input.h5-select:active {
  border-color: rgba(52, 211, 153, 0.35);
}

.kyc-banner {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 14px;
}
.kyc-banner--pending {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}
.kyc-banner--ok {
  background: rgba(52, 211, 153, 0.09);
  border-color: rgba(52, 211, 153, 0.38);
  color: var(--up);
}
.kyc-banner--reject {
  background: rgba(251, 113, 133, 0.08);
  border-color: rgba(251, 113, 133, 0.35);
  color: var(--down);
}
.kyc-readonly-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--elev-1);
  margin-bottom: 18px;
}
.kyc-ro-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.kyc-ro-row:last-child { border-bottom: none; padding-bottom: 0; }
.kyc-ro-k {
  flex-shrink: 0;
  width: 104px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.kyc-ro-v {
  text-align: right;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}
.kyc-ro-row--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.kyc-ro-row--stack .kyc-ro-k {
  width: auto;
  text-align: left;
}
.kyc-id-preview {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}
.kyc-id-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.kyc-upload-zone {
  position: relative;
  display: block;
  min-height: 148px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.kyc-upload-zone:hover {
  border-color: rgba(52, 211, 153, 0.38);
  background: linear-gradient(165deg, rgba(52, 211, 153, 0.07), rgba(255, 255, 255, 0.02));
}
.kyc-upload-zone:focus-within {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}
.kyc-upload-zone.has-preview {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.35);
}
.kyc-upload-overlay-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
  font-size: 0;
}
.kyc-upload-visual {
  position: relative;
  z-index: 1;
  min-height: 148px;
  padding: 18px 14px;
  box-sizing: border-box;
  pointer-events: none;
}
.kyc-upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  min-height: 112px;
}
.kyc-upload-zone.has-preview .kyc-upload-empty {
  display: none;
}
.kyc-upload-svg {
  color: rgba(52, 211, 153, 0.88);
  opacity: 0.95;
}
.kyc-upload-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.kyc-upload-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.kyc-upload-preview-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 112px;
}
.kyc-upload-zone.has-preview .kyc-upload-preview-wrap {
  display: flex;
}
.kyc-upload-thumb {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.kyc-upload-rehint {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.kyc-upload-zone.has-preview .kyc-upload-visual {
  padding: 12px;
}
.kyc-upload-hint {
  margin: 6px 0 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
}

/* —— 充币页 —— */
.deposit-page { padding-top: 12px; }

/* H5 统一下拉（充币 / 提币 / 划转 / 闪兑等）：去掉系统默认箭头，与深色卡片一致 */
.h5-select-wrap {
  position: relative;
  display: block;
}
.h5-select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  pointer-events: none;
  opacity: 0.72;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%239698ab' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.h5-select-wrap:focus-within::after {
  opacity: 1;
  transform: rotate(0.001deg);
}
select.field-input.h5-select {
  -webkit-appearance: none;
  appearance: none;
  padding: 15px 46px 15px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
  color-scheme: dark;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%),
    var(--card-inset);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
select.field-input.h5-select:hover {
  border-color: rgba(255, 255, 255, 0.14);
}
select.field-input.h5-select:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(52, 211, 153, 0.14);
}
select.field-input.h5-select:active {
  border-color: rgba(52, 211, 153, 0.35);
}

.deposit-card {
  margin: 14px 0 22px;
  padding: 16px 16px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(155deg, rgba(52, 211, 153, 0.07) 0%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%),
    var(--card);
  box-shadow: var(--elev-1), 0 12px 32px rgba(0, 0, 0, 0.2);
}
.deposit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.deposit-k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  flex-shrink: 0;
}
.deposit-v {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}
.deposit-addr-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.deposit-copy-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: var(--up);
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: -0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, transform 0.12s ease;
}
.deposit-copy-btn:active:not(:disabled) {
  opacity: 0.88;
  transform: scale(0.97);
}
.deposit-copy-btn.is-disabled,
.deposit-copy-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}
.deposit-addr-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--card-inset);
  border: 1px solid rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.deposit-addr-str {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--text);
  word-break: break-all;
}
.deposit-addr-box--tap {
  cursor: pointer;
  transition: background 0.15s ease;
}
.deposit-addr-box--tap:active {
  background: rgba(255, 255, 255, 0.045);
}
.ledger-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.ledger-item .t { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.ledger-item .amt { font-variant-numeric: tabular-nums; font-weight: 700; }
.ledger-item .amt.pos { color: var(--up); }
.ledger-item .amt.neg { color: var(--down); }
.ledger-item .meta { font-size: 11px; color: var(--muted); margin-top: 6px; }

.trade-price { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 16px 2px; }
.trade-price.up { color: var(--up); }
.chart-box {
  height: auto;
  min-height: 300px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 0 16px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%), var(--card-inset);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; font-weight: 500;
  box-shadow: var(--elev-1);
}

.asset-hero { text-align: center; padding: 8px 16px 16px; }
.asset-hero .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.asset-hero .num { font-size: 32px; font-weight: 800; margin: 10px 0; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.asset-hero .sub { font-size: 13px; color: var(--up); font-weight: 600; }

/* —— 资产页：紧凑总览 + 双账户并排 + 横向工具条 —— */
.asset-summary-card {
  margin: 0 16px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, transparent 55%), var(--card);
  box-shadow: var(--elev-1), 0 10px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.asset-summary-head {
  text-align: center;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.asset-summary-lbl {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}
.asset-summary-num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.asset-usdt-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.asset-usdt-cell {
  padding: 12px 12px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.asset-usdt-cell:last-child { border-right: none; }
.asset-usdt-cell--contract {
  background: rgba(51, 215, 120, 0.04);
}
.asset-usdt-tag {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}
.asset-usdt-avail {
  display: block;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-all;
}

/* 划转页：可划转余额强调块（紧贴「从」账户） */
.transfer-avail-card {
  position: relative;
  margin: 8px 0 20px;
  padding: 14px 16px 16px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(155deg, rgba(52, 211, 153, 0.07) 0%, var(--card-inset) 42%, var(--card-inset) 100%);
  border: 1px solid rgba(52, 211, 153, 0.14);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.transfer-avail-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #4ade80, rgba(52, 211, 153, 0.35));
  opacity: 0.95;
}
.transfer-avail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.transfer-avail-caption {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.transfer-avail-unit {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(52, 211, 153, 0.9);
}
.transfer-avail-value {
  margin: 0;
  font-size: clamp(22px, 5.4vw, 27px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: #ecfdf5;
  text-shadow: 0 0 48px rgba(52, 211, 153, 0.22);
  word-break: break-all;
}
.transfer-avail-value.transfer-avail-placeholder {
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
  text-shadow: none;
}
.transfer-avail-card--quote {
  margin-top: 4px;
  margin-bottom: 16px;
}
.transfer-avail-card.is-hidden {
  display: none !important;
}
.h5-balance-subnum {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #a7f3d0;
  word-break: break-all;
}
.h5-balance-subnum.transfer-avail-placeholder {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.asset-toolbar {
  display: flex;
  align-items: stretch;
  margin: 0 16px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--elev-1);
  overflow: hidden;
}
.asset-tool {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
  min-height: 56px;
}
.asset-tool:last-child { border-right: none; }
.asset-tool:active { background: rgba(255, 255, 255, 0.05); }
.asset-tool-ic {
  display: flex;
  color: var(--icon);
}
.asset-tool-ic svg { stroke: currentColor; }
.asset-tool-txt { letter-spacing: 0.02em; }

.acct-block--tight {
  padding: 12px 14px;
  margin-bottom: 8px;
}
.acct-block--tight h3 {
  margin-bottom: 4px;
}
.acct-block-desc {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.4;
  font-weight: 500;
}

.asset-line-main--compact {
  padding: 6px 0 4px;
  font-size: 13px;
}
.asset-ic-wrap--sm {
  width: 28px;
  height: 28px;
}
.asset-ic-wrap--sm .asset-ic-letter { font-size: 11px; }

.acct-block {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.025) 0%, transparent 50%), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 16px 10px;
  box-shadow: var(--elev-1), 0 8px 24px rgba(0, 0, 0, 0.15);
}
.acct-block h3 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted);
  margin-bottom: 12px;
}
.acct-block .row2 { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--muted); padding: 6px 0; }
.acct-block .row2 strong { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

.asset-coin-block { padding: 4px 0 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.asset-coin-block:last-child { border-bottom: none; }
.asset-line-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 2px;
  font-size: 14px;
  font-weight: 600;
}
.asset-ic-wrap {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  position: relative;
}
.asset-ic-wrap .asset-ic { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-ic-wrap .asset-ic-letter {
  display: none;
  position: absolute; inset: 0;
  align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--text);
}
.asset-ic-wrap.has-err .asset-ic { display: none; }
.asset-ic-wrap.has-err .asset-ic-letter { display: flex; }
.asset-line-main .asset-tick { flex: 1; min-width: 0; color: var(--text); letter-spacing: 0.02em; }
.asset-line-main .asset-amt { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }

.asset-split-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0; font-size: 14px;
}
.asset-split-row .k { color: var(--muted); font-weight: 600; }
.asset-split-row .v { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.asset-split-row.muted-row { font-size: 13px; }
.asset-split-row.muted-row .v { color: var(--muted); font-weight: 600; }
.asset-pending-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.asset-pending-row:last-child { border-bottom: none; }
.asset-pending-row .asset-tick { flex: 1; font-weight: 700; }
.asset-pending-row .asset-amt { font-variant-numeric: tabular-nums; }
.asset-pending-link {
  font-size: 12px; font-weight: 700; color: var(--up);
  text-decoration: none; padding: 6px 12px; border-radius: var(--radius-sm);
  border: 1px solid rgba(51, 215, 120, 0.35);
}

.hero-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.04) 0%, transparent 45%), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 16px 16px;
  box-shadow: var(--elev-1), 0 12px 32px rgba(0, 0, 0, 0.22);
}
.hero-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #2a2d3a, #1a1b22);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--icon);
}
.avatar svg { stroke: currentColor; }
.hero-meta { flex: 1; min-width: 0; }
.hero-meta .vip { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.hero-meta .phone { font-size: 13px; color: var(--muted); font-weight: 500; }
.balance-inset {
  background: var(--card-inset);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  padding: 14px 16px;
}
.balance-inset .lbl {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 8px;
}
.balance-inset .num {
  font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.grid4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin: 0 16px 16px;
}
.grid2 {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin: 0 16px 16px;
}
.grid2 .g-item-wide,
.grid4 .g-item-wide { grid-column: 1 / -1; padding: 12px; }
.g-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 6px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.15s ease, border-color 0.15s ease;
  box-shadow: var(--elev-1);
}
.g-item:active { transform: scale(0.97); border-color: rgba(255, 255, 255, 0.12); }
.g-item .ic {
  width: 28px; height: 28px; margin: 0 auto 8px;
  color: var(--icon);
  display: flex; align-items: center; justify-content: center;
}
.g-item .ic svg { stroke: currentColor; }
.g-item span:last-child { font-size: 11px; font-weight: 600; color: var(--muted); }

.menu-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 16px 20px;
  box-shadow: var(--elev-1), 0 10px 28px rgba(0, 0, 0, 0.18);
}
.menu-card a {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text); text-decoration: none;
}
.menu-card a:last-child { border-bottom: none; }
.menu-card .mi { width: 22px; height: 22px; color: var(--icon); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.menu-card .mi svg { stroke: currentColor; }
.menu-card .mt { flex: 1; font-size: 15px; font-weight: 500; }
.menu-card .ar { color: var(--muted); font-size: 18px; font-weight: 300; }

.btn-logout {
  display: block; width: calc(100% - 32px); margin: 0 16px 24px; padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--danger);
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer;
}

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--app-max);
  bottom: 0;
  height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; z-index: 50;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}
@media (max-width: 480px) {
  .tabbar { left: 0; transform: none; max-width: none; }
}
.tabbar-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; font-family: inherit; color: var(--muted);
  text-decoration: none;
  background: none; border: none;
  font-size: 10px; font-weight: 600;
}
.tabbar-item.on { color: var(--text); }
.tabbar-item .ti { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: inherit; }
.tabbar-item .ti svg { stroke: currentColor; }

.guest-card { padding: 8px 16px 24px; }

/* —— 登录页：顶栏网格 + 居中壳层 + 面板表单 —— */
.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.login-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  flex-shrink: 0;
}

.login-topbar-lead {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.login-topbar-title {
  grid-column: 2;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
}

.login-topbar-trail {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.login-reg-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  box-shadow: var(--elev-1);
  font-size: 12px;
  font-weight: 700;
  color: var(--icon);
  text-decoration: none;
  font-family: inherit;
  letter-spacing: -0.02em;
  -webkit-tap-highlight-color: transparent;
}

.login-reg-link:active {
  opacity: 0.88;
}

.login-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(14px, 3vh, 22px);
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: clamp(4px, 2vh, 14px) 16px calc(24px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.login-hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.login-brand-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(68vw, 248px);
  height: min(68vw, 248px);
  background:
    radial-gradient(ellipse 50% 45% at 50% 50%, rgba(212, 175, 96, 0.2) 0%, transparent 72%),
    radial-gradient(ellipse 55% 50% at 50% 55%, rgba(45, 212, 191, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  filter: blur(0.5px);
}

.login-brand-ring {
  position: relative;
  z-index: 1;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255, 235, 190, 0.28), rgba(35, 30, 22, 0.92)),
    var(--card-inset);
  box-shadow:
    0 0 0 1px rgba(212, 175, 96, 0.25),
    0 18px 44px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.login-brand-mark {
  display: block;
  width: min(44vw, 152px);
  height: auto;
  max-height: 132px;
  border-radius: 17px;
  object-fit: contain;
}

.login-brand-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-tagline {
  margin: 16px 0 0;
  padding: 0 14px;
  max-width: 300px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.03em;
  color: rgba(196, 200, 210, 0.78);
}

.login-shell > .guest-card.login-shell-card {
  padding: 8px 0 24px;
}

.form-block { margin-top: 8px; }
.field-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); margin: 14px 0 6px; }
.field-input {
  width: 100%; padding: 14px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card-inset); color: var(--text);
  font-size: 15px; font-family: inherit;
}
.field-input::placeholder { color: var(--muted); opacity: 0.8; }

/* 止盈止损 · 自定义 %：与 .tpsl-chip 同尺寸的胶囊输入（与快捷按钮同一 flex 行，覆盖 .field-input） */
.tpsl-chips input.tpsl-pct-mini.field-input {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  padding: 8px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  -moz-appearance: textfield;
}
.tpsl-chips-sl input.tpsl-pct-mini.field-input {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
}
.tpsl-chips input.tpsl-pct-mini.field-input::-webkit-outer-spin-button,
.tpsl-chips input.tpsl-pct-mini.field-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* 未填时对齐旧版「不设」chip：虚线弱化 */
.tpsl-chips input.tpsl-pct-mini.field-input:placeholder-shown {
  border-style: dashed;
  color: var(--muted);
  font-weight: 600;
  opacity: 0.95;
}
.tpsl-chips input.tpsl-pct-mini.field-input:focus {
  outline: none;
  border-style: solid;
  opacity: 1;
}
.tpsl-chips input.tpsl-pct-mini.field-input:focus:not(.tpsl-pct-mini-sl) {
  border-color: rgba(52, 211, 153, 0.35);
}
.tpsl-chips input.tpsl-pct-mini-sl.field-input:focus {
  border-color: rgba(251, 113, 133, 0.35);
}
.tpsl-chips input.tpsl-pct-mini.field-input.tpsl-pct-mini--on {
  border-style: solid;
  color: #b6f5d6;
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.14);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.12);
  font-weight: 700;
  opacity: 1;
}
.tpsl-chips input.tpsl-pct-mini-sl.field-input.tpsl-pct-mini--on {
  color: #fecaca;
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(251, 113, 133, 0.12);
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.1);
}
.btn-primary {
  width: 100%; margin-top: 22px; padding: 15px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #4ade80 0%, var(--up) 100%);
  color: #022c16; font-size: 15px; font-weight: 800; font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 24px rgba(52, 211, 153, 0.18);
}
.form-hint { margin-top: 18px; text-align: center; font-size: 13px; }
.form-hint a { color: var(--icon); font-weight: 600; }

.page-foot-hint {
  margin: 20px 16px; font-size: 12px; color: var(--muted); line-height: 1.5;
}
.page-foot-hint code { font-size: 11px; background: var(--card-inset); padding: 2px 6px; border-radius: 4px; }

#h5-toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%);
  z-index: 9999; max-width: 86%;
  padding: 12px 18px; border-radius: 12px;
  background: rgba(30, 32, 40, 0.95); color: var(--text);
  font-size: 14px; font-weight: 500; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
#h5-toast.show { opacity: 1; }

.support-page { padding: 8px 16px 24px; }
.support-list { display: flex; flex-direction: column; gap: 12px; }
.support-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.support-brand-img {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 12px; object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.support-mid { flex: 1; min-width: 0; }
.support-ch-name {
  font-size: 13px; font-weight: 700; color: #e8ecf3; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 6px;
}
.support-value {
  font-size: 16px; font-weight: 600; color: #ffffff;
  word-break: break-all; line-height: 1.4;
}
.support-value--muted {
  font-weight: 500; color: #8b95a8; font-size: 15px;
}
.support-copy {
  flex-shrink: 0; min-width: 68px; padding: 10px 16px; border-radius: 10px;
  border: none; cursor: pointer; font-size: 14px; font-weight: 700;
  color: #fff; background: #4f6bed;
  box-shadow: 0 2px 10px rgba(79, 107, 237, 0.35);
}
.support-copy:active { opacity: 0.9; transform: scale(0.98); }
.support-copy-ph {
  flex-shrink: 0; width: 68px; min-height: 1px;
}
