/* ============================================================
   桌面端皮肤 v2「寒夜」（resend.com 质感 · 仅 PC）
   - 纯黑页面底 + 大量留白；白→灰白渐变衬线大标题（中文章节标题用宋体声部）
   - 卡片 = #141517→#191b1e 深灰渐变 + 右上冰蓝微光，发丝线描边
   - 冰蓝(#d6ebfd)是唯一品牌强调色；红绿只上涨跌语义；金只上金价/历史低
   - 数字一律 Inter 自托管 + tabular；语义上不再有"模块彩色"（那是移动端皮肤的特征）
   仅 index.html / admin.html / login.html / scrolls.html(桌面UA) 加载。
   移动端(mobile-theme.css)与其作用域互不干扰。
   ============================================================ */

/* ---------- 0. 自托管字体（Inter · latin 子集） ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/inter-800.woff2') format('woff2');
}

/* ---------- 1. 令牌（寒夜，覆盖 style.css 双主题） ---------- */
html,
html.dark {
  color-scheme: dark;

  --bg: #000000;
  --bg-deep: #000000;
  --card: #141517;
  --card-2: #1a1c1f;
  --surface-float: #1c1e23;
  --line: rgba(255, 255, 255, 0.07);
  --hair: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f0f0f0;
  --text-2: #d4d5d9;
  --muted: #a0a2a7;
  --faint: #70727a;

  --accent: #d6ebfd;
  --accent-strong: #ffffff;
  --accent-soft: rgba(214, 235, 253, 0.09);
  --on-accent: #0b0f14;

  --ice: #d6ebfd;
  --ice-soft: rgba(214, 235, 253, 0.09);

  --up: #ff453a;          /* 1:1 demo C：涨·红 */
  --up-soft: rgba(255, 69, 58, 0.12);
  --down: #30d158;         /* 1:1 demo C：跌·绿 */
  --down-soft: rgba(48, 209, 88, 0.12);
  --gold: #d5b26b;
  --gold-soft: rgba(255, 214, 10, 0.10);
  --timer: #f0f0f0;
  --timer-soft: rgba(255, 255, 255, 0.05);
  --run: #d6ebfd;
  --run-strong: #8fb7d6;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 12px 32px -14px rgba(0, 0, 0, 0.65);
  --shadow-3: 0 28px 80px -22px rgba(0, 0, 0, 0.85);
  --ring: 0 0 0 3px rgba(214, 235, 253, 0.30);

  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.09);

  /* 衬线标题渐变填色（resend 特征） */
  --grad-title: linear-gradient(to right bottom, #fff 30%, rgba(255, 255, 255, 0.5));
  --glow: radial-gradient(closest-side, rgba(214, 235, 253, 0.08), transparent 72%);

  /* 字体角色 */
  --font-serif: Georgia, "Times New Roman", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", SimSun, serif;
  --font-num: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* 衬线渐变大标题（禁斜体、负字距克制；中文标题专用声部） */
.display-title,
.view-head h2,
.login-brand h1,
.t-hero-title {
  font-family: var(--font-serif);
  font-weight: 800;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
  line-height: 1.2;
}

/* ---------- 2. 世界底：纯黑 + 顶部一道极淡冰蓝氛围 ---------- */
html {
  background:
    radial-gradient(58% 40% at 50% -6%, rgba(214, 235, 253, 0.07) 0%, transparent 60%),
    #000000;
  background-attachment: fixed;
}
html body { position: relative; z-index: 1; background: transparent; }
html ::selection { background: rgba(214, 235, 253, 0.22); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.24); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   resend 组件层（仅桌面 UA；is-touch（手机看桌面版除外）仍需可用，
   但避免影响移动端页面 → 以下覆盖仅在 html:not(.is-touch) 生效）
   ============================================================ */
html:not(.is-touch) body { font-family: -apple-system, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }

/* --- 按钮三档：白底主 CTA / 幽灵描边 / 冰蓝文字 --- */
html:not(.is-touch) .btn { border-radius: 10px; font-size: 13px; }

html:not(.is-touch) .btn.primary {
  background: #fff; border-color: #fff; color: #0a0a0a;
  font-weight: 600;
  box-shadow: none;
}
html:not(.is-touch) .btn.primary:hover {
  background: #e8e8ea; border-color: #e8e8ea;
}
html:not(.is-touch) .btn.tint {
  background: transparent; border-color: rgba(255, 255, 255, 0.14);
  color: #e6e7e9; font-weight: 500;
}
html:not(.is-touch) .btn.tint:hover {
  background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}
html:not(.is-touch) .btn.small { border-radius: 8px; }
html:not(.is-touch) .btn.small.icon {
  border-color: transparent; background: transparent; color: #9a9ca1;
}
html:not(.is-touch) .btn.small.icon:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
html:not(.is-touch) .btn.danger-text { color: var(--up); }
html:not(.is-touch) .btn.gold {
  background: #fff; border-color: #fff; color: #0a0a0a; font-weight: 700;
}
html:not(.is-touch) .btn.gold:hover { background: #e8e8ea; border-color: #e8e8ea; }
html:not(.is-touch) .btn.profile { color: #c9cacd; }

/* 图标钮内的 svg 对齐 + 星标状态色 */
html:not(.is-touch) .btn svg, html:not(.is-touch) .star-btn svg,
html:not(.is-touch) .t-del svg, html:not(.is-touch) .co-del svg,
html:not(.is-touch) .md-del svg { display: block; }
html:not(.is-touch) .star-btn { color: rgba(255, 255, 255, 0.5); }
html:not(.is-touch) .star-btn.on { color: var(--gold); filter: none; }
html:not(.is-touch) .t-run-badge .dot { width: 6px; height: 6px; background: var(--run); box-shadow: 0 0 8px rgba(214, 235, 253, 0.5); }
html:not(.is-touch) .lrow .c-tools .star-btn { position: static; }

/* 服务器切换胶囊：极简，选中白字 + 白底黑字高对比 */
html:not(.is-touch) .svc-chip { border-color: transparent; color: #9a9ca1; }
html:not(.is-touch) .svc-chip:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
html:not(.is-touch) .svc-chip.on {
  background: #fff; border-color: #fff; color: #0a0a0a;
}

/* 标签筛选：颜色退成 8px 圆点，主体中性 */
html:not(.is-touch) .tag-chip {
  --tc: var(--muted);
  color: #c4c5c9; background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.10);
  font-weight: 500;
  gap: 6px;
}
html:not(.is-touch) .tag-chip::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--tc); opacity: .9; flex: none;
}
html:not(.is-touch) .tag-chip:hover { border-color: rgba(255, 255, 255, 0.22); color: #fff; }
html:not(.is-touch) .tag-chip.on { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); }
html:not(.is-touch) .tag-chip.mini::before { width: 6px; height: 6px; }
html:not(.is-touch) .tag-chip .tag-count { color: var(--faint); }
html:not(.is-touch) .tag-hint { display: none; }

/* 分段控件：轨道近黑、激活白底黑字 */
html:not(.is-touch) .tabs, html:not(.is-touch) .seg { background: #0c0c0e; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; }
html:not(.is-touch) .tab, html:not(.is-touch) .seg button { border-radius: 8px; color: #9a9ca1; }
html:not(.is-touch) .tab.active, html:not(.is-touch) .seg button.active {
  background: #1d1e22; color: #fff; font-weight: 600;
  box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.12);
}

/* 卡片渐变配方 + 冰蓝右上微光（唯一出现处；弹窗 .dialog 不参与，保持轻量浮层） */
html:not(.is-touch) .card,
html:not(.is-touch) .panel,
html:not(.is-touch) .gcard,
html:not(.is-touch) .stat-card,
html:not(.is-touch) .lm-row,
html:not(.is-touch) .tag-check {
  position: relative;
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(214, 235, 253, 0.05) 0%, rgba(214, 235, 253, 0) 42%),
    linear-gradient(42deg, #141517 0%, #191b1e 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-1);
}

/* 弹窗：轻量浮层——纯色底 + 细边 + 最小阴影，去渐变玻璃感 */
html:not(.is-touch) .dialog {
  background: color-mix(in srgb, var(--surface-float) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 60px -34px rgba(0, 0, 0, 0.5);
}

/* 弹窗遮罩：柔和淡黑 + 轻微模糊，不压层 */
html:not(.is-touch) .modal {
  background: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(1px) saturate(1.02);
  -webkit-backdrop-filter: blur(1px) saturate(1.02);
}

/* 表格头弱化 */
html:not(.is-touch) th { background: rgba(255, 255, 255, 0.03); color: #8f9198; font-weight: 600; letter-spacing: 0.04em; }
html:not(.is-touch) td, html:not(.is-touch) th { border-color: rgba(255, 255, 255, 0.06); }

/* 输入框：深底 + 发丝边，聚焦冰蓝 */
html:not(.is-touch) input, html:not(.is-touch) select {
  background: #101113; border-color: rgba(255, 255, 255, 0.13);
  border-radius: 8px; color: var(--text);
}
html:not(.is-touch) input:focus, html:not(.is-touch) select:focus {
  border-color: rgba(214, 235, 253, 0.65); box-shadow: var(--ring);
}
html:not(.is-touch) .sort-bar select, html:not(.is-touch) .sort-bar input[type=number] { background: #101113; }
html:not(.is-touch) .trade-form { background: rgba(255, 255, 255, 0.02); border-color: rgba(255, 255, 255, 0.08); }

/* 数字大字的 Inter 化（等宽数字特性随字面） */
html:not(.is-touch) .price,
html:not(.is-touch) .l-price,
html:not(.is-touch) .lh-value,
html:not(.is-touch) .stat .v,
html:not(.is-touch) .stat-card .v,
html:not(.is-touch) .invite-code,
html:not(.is-touch) .g-big,
html:not(.is-touch) .me-stats .hs .v,
html:not(.is-touch) .t-result .tr-item .v,
html:not(.is-touch) .t-disc .t-clock,
html:not(.is-touch) .r-row .r-price {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ============================================================
   布局：左侧导航 + 主区
   ============================================================ */
.shell { display: flex; min-height: 100vh; align-items: stretch; }

.side {
  flex: 0 0 216px; width: 216px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 12px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }

.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; min-width: 0; }
.side-brand img { width: 32px; height: 32px; border-radius: 9px; flex: none; opacity: .95; }
.side-brand .sb-text { min-width: 0; line-height: 1.3; }
.side-brand b {
  display: block; font-size: 14.5px; font-weight: 800; letter-spacing: 0.5px; white-space: nowrap;
  font-family: var(--font-serif);
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #fff;
}
.side-brand span { display: block; font-size: 9.5px; color: #55575d; letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.sn-item {
  display: flex; align-items: center; gap: 11px;
  border: 1px solid transparent; background: transparent; color: #a0a2a7;
  font-size: 13.5px; font-weight: 500; text-align: left;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.sn-item .sn-ico { width: 18px; text-align: center; flex: none; }
.sn-item .sn-ico svg { display: block; margin: 0 auto; }
.sn-item:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.sn-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.09);
  font-weight: 600;
}
.sn-item.active .sn-ico { color: var(--accent); }
.sn-item .sn-key {
  margin-left: auto; font-size: 10px; color: #55575d;
  font-family: var(--font-num); border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px; padding: 1px 6px; letter-spacing: 0;
}
.sn-item.active .sn-key { color: #8f9198; }

.side-sep { height: 1px; background: rgba(255, 255, 255, 0.07); margin: 10px 8px; flex: none; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.side-foot .sn-item { font-size: 12.5px; padding: 7px 12px; }

.shell-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* 顶栏：黑玻璃发丝边 */
.topbar {
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.topbar-main { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
.svc-bar { display: flex; align-items: center; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.svc-bar::-webkit-scrollbar { display: none; }
.svc-bar .svc-chip { flex: none; white-space: nowrap; }
.shell-main > main { flex: 1; padding: 14px 32px 48px; width: 100%; max-width: 1560px; margin: 0 auto; }

/* ---------- 视图切换 ---------- */
.view { animation: view-in .28s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }

.view-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.view-head h2 { margin: 0; font-size: 30px; letter-spacing: 0.01em; }
.view-head .vh-sub { font-size: 13px; color: #8f9198; }
.view-head .vh-spacer { flex: 1 1 auto; align-self: center; }
.view-head .vh-actions { display: flex; gap: 8px; align-items: center; }

/* 视图内玻璃卡 */
.gcard {
  min-width: 0;
  border-radius: 14px;
  padding: 18px 20px;
}
.gcard .ghead {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  margin: 0 0 12px; color: #c4c5c9;
  text-transform: none;
}
.gcard .ghead .gh-sub { font-size: 12px; color: #8f9198; font-weight: 400; letter-spacing: 0; }
.gcard .ghead .gh-side { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.gcard .ghead::after { content: ''; flex: 1; min-width: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); margin-bottom: 4px; }

/* ---------- 行情视图 ---------- */
#view-market .sort-bar { margin-bottom: 16px; }
#view-market .cmp-grid { margin-top: 30px; }
.cmp-grid { gap: 24px; }

/* 涨跌榜：参考计时面板——去卡片底框，标题 + 底部细线 + 表格 */
#summaryPanels .panel {
  background: none; border: none; border-radius: 0; box-shadow: none;
  padding: 0; min-width: 0;
}
#summaryPanels .panel h3 {
  font-size: 13px; letter-spacing: .05em;
  margin: 0 0 2px; padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
#summaryPanels table.slim th { padding: 8px 8px 5px; }
#summaryPanels table.slim td { padding: 6px 8px; font-size: 12px; }

/* ---------- 账本视图 ---------- */
.trader-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-chip {
  border: 1px solid rgba(255, 255, 255, 0.10); background: transparent; color: #a0a2a7;
  font-size: 13px; font-weight: 500; padding: 7px 15px; border-radius: 999px; cursor: pointer;
  transition: all .16s var(--ease);
  font-variant-numeric: tabular-nums;
}
.t-chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.t-chip.on {
  color: #0a0a0a; background: #fff; border-color: #fff; font-weight: 600;
}
.t-chip small { font-size: 10px; opacity: .6; margin-left: 3px; }

.ledger-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 130% at 88% -30%, rgba(214, 235, 253, 0.05) 0%, transparent 52%),
    linear-gradient(42deg, #101113 0%, #17181b 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 26px 30px;
  margin-bottom: 16px;
}
.lh-label { font-size: 11px; font-weight: 700; letter-spacing: 3px; color: var(--muted); text-transform: uppercase; }
.lh-value {
  font-size: 46px; font-weight: 800; line-height: 1.12;
  font-variant-numeric: tabular-nums; margin: 8px 0 2px;
}
.lh-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.lh-value .lh-rmb { font-size: 15px; font-weight: 600; color: var(--gold); margin-left: 14px; letter-spacing: 0; }
.lh-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: #8f9198; }
.lh-row b { font-variant-numeric: tabular-nums; color: #e6e7e9; font-weight: 700; }
.lh-row b.up { color: var(--up); }
.lh-row b.down { color: var(--down); }
.lh-row .lh-div { width: 1px; background: rgba(255, 255, 255, 0.10); align-self: stretch; }

.ledger-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ledger-cols + .ledger-cols { margin-top: 16px; }
.gcard table { font-size: 12.5px; }
.gcard .table-wrap { max-height: 400px; margin-top: 2px; border: none; padding: 0; }
.gcard .table-wrap table { min-width: 100%; }
.pos-pnl.up, .pnl-cell.up { color: var(--up); font-weight: 700; }
.pos-pnl.down, .pnl-cell.down { color: var(--down); font-weight: 700; }
.pos-pnl.flat, .pnl-cell.flat { color: var(--faint); }

/* ---------- 计时视图 ---------- */
.timer-wrap { max-width: 900px; margin: 0 auto; }
.timer-wrap .seg { margin-bottom: 16px; }

.t-hero {
  position: relative;
  background: radial-gradient(58% 46% at 50% 0%, color-mix(in srgb, var(--timer) 10%, transparent) 0%, transparent 72%);
  border: none; border-radius: 0; box-shadow: none;
  padding: 20px 20px 24px;
  text-align: center;
  animation: view-in .35s var(--ease);
}
.t-hero-cap { font-size: 10px; font-weight: 600; letter-spacing: 6px; color: #6c6e75; }
.t-hero-title { margin: 6px 0 0; font-size: 30px; letter-spacing: 2px; }

.go-core {
  position: relative; display: block;
  width: 148px; height: 148px;
  margin: 22px auto 12px;
  border: none; padding: 0; border-radius: 50%;
  background: none; cursor: pointer;
  transition: transform .15s var(--ease);
}
.go-halo {
  position: absolute; inset: -16%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(214, 235, 253, 0.16) 0%, transparent 66%);
  animation: go-halo-k 3.6s ease-in-out infinite;
}
.go-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.10) 0%, transparent 46%),
    linear-gradient(152deg, #1c1e21 4%, #0d0e10 100%);
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow:
    0 18px 44px -10px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -14px 30px rgba(0, 0, 0, 0.55);
  transition: transform .16s var(--ease);
}
.go-core:hover .go-face { transform: scale(1.03); }
.go-core:active .go-face { transform: scale(.94); }
.go-core.pressed { animation: none; transform: scale(.92); }
.go-text {
  font-family: var(--font-num);
  font-size: 52px; font-weight: 800; letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 0 26px rgba(214, 235, 253, 0.35);
  transform: translateY(-2px);
}
.go-burst {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid rgba(214, 235, 253, 0.7);
  opacity: 0; pointer-events: none;
  transform: scale(.5);
}
.go-burst.on { animation: go-burst-k .62s var(--ease) forwards; }
@keyframes go-burst-k {
  0% { opacity: .9; transform: scale(.6); }
  100% { opacity: 0; transform: scale(1.9); }
}
@keyframes go-halo-k { 0%, 100% { opacity: .5; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.05); } }

.t-hero .t-chair { display: block; margin: 0 auto 4px; width: 60px; height: auto; image-rendering: pixelated; opacity: .9; }
.t-mob { display: block; margin: 6px auto 4px; width: 56px; height: auto; image-rendering: pixelated; opacity: .9; }

.t-fields {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px;
  width: 100%; max-width: 540px; margin: 14px auto 6px;
}
.tf-cell input {
  width: 100%; min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px;
  background: #101113; color: #fff;
  padding: 10px 12px; font-size: 13.5px; text-align: center;
}
.tf-cell input:focus { outline: none; border-color: rgba(214, 235, 253, 0.6); }
.tf-cell input::placeholder { color: #6c6e75; font-size: 12px; }
.tf-cell .unit-hint { margin: 0; }
.t-hero-note { font-size: 12px; font-weight: 400; color: #6c6e75; margin-top: 12px; letter-spacing: .2px; }
.unit-hint { font-size: 11px; color: #8f9198; margin-top: 3px; font-variant-numeric: tabular-nums; min-height: 14px; }
.unit-hint:empty { display: none; }

/* 进行中：黑色圆盘 + 冰蓝脉冲 */
.t-run {
  position: relative;
  background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--run) 10%, transparent) 0%, transparent 74%);
  border: none; border-radius: 0; box-shadow: none;
  padding: 24px 20px 22px; text-align: center;
  overflow: visible;
  animation: view-in .3s var(--ease);
}
.t-run h3 { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 6px; font-size: 15px; font-weight: 700; color: #d4d5d9; }
.t-run-name { max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-run-badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c4c5c9; font-size: 10px; font-weight: 600; letter-spacing: 2px;
}
.t-run-badge .dot { background: var(--run); }
.t-disc {
  position: relative;
  width: 196px; height: 196px; margin: 22px auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.t-pulse {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(214, 235, 253, 0.30);
  animation: t-pulse-k 2.8s cubic-bezier(.16, 1, .3, 1) infinite;
}
.t-pulse.p2 { animation-delay: 1.4s; }
@keyframes t-pulse-k {
  0% { transform: scale(.8); opacity: .8; }
  70%, 100% { transform: scale(1.45); opacity: 0; }
}
.t-disc-face {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 44%),
    #0d0e10;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 22px 50px -14px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.t-disc-cap { font-size: 10px; font-weight: 600; letter-spacing: 4px; color: #6c6e75; }
.t-disc .t-clock { font-size: 40px; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 0 30px rgba(214, 235, 253, 0.30); }
.t-run .t-sub { font-size: 12.5px; color: #8f9198; margin-bottom: 18px; }
.t-run .t-btns { display: flex; gap: 10px; justify-content: center; }
.t-btn-finish {
  min-width: 120px; padding: 13px 22px; border: none; border-radius: 10px; cursor: pointer;
  background: #fff; color: #0a0a0a;
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.t-btn-finish:hover { background: #e8e8ea; }
.t-btn-finish:active { transform: scale(.97); }
.t-btn-cancel {
  padding: 13px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14); background: transparent; color: #a0a2a7;
  font-size: 13px; font-weight: 500;
}
.t-btn-cancel:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }

/* 结算结果卡 */
.t-result {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px; padding: 18px; text-align: center;
  animation: view-in .4s var(--ease);
}
.t-result .tr-title { font-size: 14px; font-weight: 600; letter-spacing: .08em; margin-bottom: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-result .tr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.t-result .tr-item .k { font-size: 11px; color: var(--muted); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-result .tr-item .v { font-size: 20px; font-weight: 800; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.t-result .tr-item .v small { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.t-result .tr-item .v.muted { color: var(--faint); }
.t-result .tr-levelup { white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-block; margin-top: 12px; padding: 4px 14px; border-radius: 999px;
  background: rgba(255, 100, 101, 0.10); color: var(--up);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}

.timer-lower { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: stretch; }
.t-hist-list { display: flex; flex-direction: column; gap: 8px; }
.t-block-title {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .05em; color: var(--text-2);
  margin: 0 0 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.t-block-title .gh-sub { font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.t-hist-list { display: flex; flex-direction: column; }
.t-hist {
  background: transparent; border: none; border-radius: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 2px; position: relative;
  display: flex; align-items: center; gap: 12px;
  transition: background .15s var(--ease);
}
.t-hist:first-child { border-top: 1px solid var(--line); }
.t-hist:hover { background: transparent; }
.t-hist .th-main { flex: 1; min-width: 0; }
.t-hist .th-name { font-weight: 600; font-size: 13px; color: #e6e7e9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-hist .th-name .lvl-badge {
  display: inline-block; font-size: 10px; padding: 1px 8px; border-radius: 999px;
  background: rgba(214, 235, 253, 0.10); color: var(--accent);
  font-weight: 600; margin-left: 6px;
}
.t-hist .th-sub { font-size: 11px; color: #8f9198; margin-top: 2px; }
.t-hist .th-stats { text-align: right; font-variant-numeric: tabular-nums; flex: none; }
.t-hist .th-exp { font-family: var(--font-num); font-size: 15px; font-weight: 800; color: #fff; }
.t-hist .th-rate { font-size: 10.5px; color: #6c6e75; }
.t-hist .t-del, .t-hist .t-edit { background: none; border: none; color: #6c6e75; cursor: pointer; font-size: 13px; padding: 6px; border-radius: 8px; transition: all .14s var(--ease); }
.t-hist .t-edit:hover { color: var(--accent); background: rgba(214, 235, 253, 0.10); }
.t-hist .t-del:hover { color: var(--up); background: rgba(255, 100, 101, 0.10); }

/* 经验表折叠面板 */
.m-exptable { border: none; border-radius: 0; background: transparent; border-top: 1px solid var(--line); margin-top: 0; display: flex; flex-direction: column; }
.m-exptable summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; font-size: 13px; font-weight: 700; letter-spacing: .05em; color: #d4d5d9;
}
.m-exptable summary::-webkit-details-marker { display: none; }
.m-exptable summary .chev { margin-left: auto; color: #6c6e75; transition: transform .2s var(--ease); font-size: 10px; }
.m-exptable[open] summary .chev { transform: rotate(180deg); }
.m-exptable-tools { display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; }
.m-exptable-tools input {
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; background: #101113; color: #fff;
  padding: 7px 10px; font-size: 13px; width: 110px;
}
.m-exptable .table-wrap { max-height: 320px; margin: 0 2px 2px; flex: 1 1 auto; }

/* 计时月历 */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-head b { flex: 1; text-align: center; font-size: 14px; letter-spacing: .08em; }
.cal-week {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 8px; font-weight: 500;
  letter-spacing: .1em;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  min-height: 60px; border: none; border-radius: 10px;
  background: transparent; color: var(--text-2); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 6px 2px; transition: background .14s var(--ease), color .14s var(--ease);
}
.cal-cell:hover { background: var(--card-2); color: var(--text); }
.cal-cell.blank { background: transparent; min-height: 0; cursor: default; }
.cal-cell b { font-size: 12.5px; font-weight: 600; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.cal-cell small { font-size: 9px; color: var(--muted); text-align: center; line-height: 1.35; font-weight: 500; font-variant-numeric: tabular-nums; }
.cal-cell.today { color: var(--accent); }
.cal-cell.today b { color: var(--accent); }
.cal-cell.sel { background: var(--accent-soft); color: var(--accent); }
.cal-cell.sel b { color: var(--accent); }
#calDayList .t-hist { margin-bottom: 0; }

/* ---------- 金价视图 ---------- */
#view-gold { max-width: 700px; margin: 0 auto; }
/* 顶部 hero：本服金价大数字 + 金价换算，同一张卡、左右分栏 */
.gold-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 24px; align-items: center;
  padding: 24px 28px; margin-bottom: 18px;
}
.gh-left { min-width: 0; }
.gh-kicker { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.gh-rate { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 6px; }
.gh-rate span {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 46px; font-weight: 800; letter-spacing: -0.02em; color: var(--text);
}
.gh-rate small { font-size: 13px; font-weight: 500; color: var(--muted); }
.gh-tip { font-size: 12px; color: var(--muted); line-height: 1.7; }

.gh-calc { min-width: 0; border-left: 1px solid var(--line); padding-left: 24px; }
.gh-calc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.gh-calc-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--text-2); }
.gh-calc-hint { font-size: 12.5px; color: var(--gold); margin-left: auto; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.gh-calc-row { display: flex; align-items: center; gap: 12px; }
.gh-calc-row input {
  flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--field, #101113); color: var(--text);
  padding: 12px 13px; font-size: 17px; font-weight: 600;
  font-family: var(--font-num); font-variant-numeric: tabular-nums; text-align: center;
}
.gh-calc-row input:focus { outline: none; border-color: rgba(214,235,253,.6); box-shadow: var(--ring); }
.gh-calc-row input::placeholder { color: var(--faint); }
.gc-eq { font-size: 15px; color: var(--muted); }

/* 排序工具条：分段控件 + 单位切换 */
.gold-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.gold-bar .seg { margin-right: auto; }
.gold-bar #goldViewBtn { margin-left: 8px; }
#goldViewBtn.on { border-color: var(--gold); color: var(--gold); }

/* 榜单：行式，可展开走势 */
.gold-list { display: flex; flex-direction: column; gap: 10px; }
.r-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; transition: border-color .16s var(--ease), background .16s var(--ease);
}
.r-row:hover { border-color: var(--line-strong); }
.r-row .r-rank {
  flex: none; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-size: 11px; font-weight: 700;
  background: var(--card-2); color: var(--muted); font-variant-numeric: tabular-nums;
}
.gold-list > .g-row:nth-child(1) .r-rank { color: var(--up); background: var(--up-soft); }
.gold-list > .g-row:nth-child(2) .r-rank, .gold-list > .g-row:nth-child(3) .r-rank { color: var(--accent); background: var(--accent-soft); }
.r-row .r-main { flex: 0 1 auto; min-width: 0; }
.r-row .r-name { font-weight: 600; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-row .r-sub { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }


.r-row .r-price { flex: none; font-size: 18px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 24h前对比靠右收尾 */

.r-row .r-price small { font-size: 10px; font-weight: 500; color: var(--muted); }
.r-row .r-sub { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.r-row .r-pct { flex: none; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }



.r-row .r-pct.up { color: var(--up); }
.r-row .r-pct.down { color: var(--down); }
.r-row .r-pct.flat { color: var(--faint); }
.r-row.current { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.badge-current {
  flex: none; font-size: 9px; letter-spacing: .12em; color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 999px;
  padding: 1px 7px; font-weight: 600; margin-left: 10px; vertical-align: 1px;
}

.g-row { background: transparent; border: none; border-radius: 0; overflow: visible; }
.g-row.open .r-row { border-radius: 12px 12px 0 0; border-bottom-color: transparent; }
.g-row .g-head { border: none; margin-bottom: 0; cursor: pointer; }
.g-chev { flex: none; display: inline-flex; color: var(--muted); font-size: 10px; margin-left: 8px; transition: transform .2s var(--ease), color .2s var(--ease); }
.g-row.open .g-chev { transform: rotate(180deg); color: var(--accent); }
.g-panel {
  background: var(--card-2); border-radius: 0 0 12px 12px; padding: 14px 18px 18px;
  border-top: 1px solid var(--line); animation: view-in .3s var(--ease);
}
.g-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.g-panel-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--text-2); }
.g-panel-meta { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-panel-meta::after { content: none; }
.g-days { margin-left: auto; }
.g-chart { height: 240px; }
.g-chart .g-empty {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 12.5px;
}

/* 浅色：hero 数字描边、边框颜色随令牌 */
html.light .gh-calc { border-left-color: var(--line); }
html.light .gh-calc-row input { background: #fcfbf9; }

/* ---------- 我的视图 ---------- */
.me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 1060px; align-items: start; }
.me-col { display: flex; flex-direction: column; gap: 16px; }

.me-card .me-head { display: flex; align-items: center; gap: 16px; }
.me-ava { width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 8px 22px rgba(0, 0, 0, .5); }
.me-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.me-admin {
  font-size: 9px; letter-spacing: .14em; padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(214, 235, 253, 0.3); color: var(--accent); font-weight: 600;
}
.me-char { font-size: 12px; color: #8f9198; margin-top: 3px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.me-stats .hs {
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px;
  padding: 14px 8px; text-align: center;
}
.me-stats .hs .v { font-size: 19px; font-weight: 800; }
.me-stats .hs .v.up { color: var(--up); }
.me-stats .hs .v.down { color: var(--down); }
.me-stats .hs .k { font-size: 11px; color: #8f9198; margin-top: 4px; letter-spacing: .06em; }


.md-count { font-size: 11px; color: #8f9198; font-variant-numeric: tabular-nums; margin-left: auto; font-weight: 500; }
.md-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.md-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 11px 13px;
}
.md-main { flex: 1; min-width: 0; }
.md-name { font-size: 13px; font-weight: 600; color: #e6e7e9; }
.md-sub { font-size: 11px; color: #8f9198; margin-top: 1px; font-variant-numeric: tabular-nums; }
.md-del {
  border: 1px solid rgba(255, 255, 255, 0.12); background: transparent; color: #8f9198;
  font-size: 11.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  transition: all .14s var(--ease);
}
.md-del:hover { color: var(--up); border-color: rgba(255, 100, 101, .4); background: var(--up-soft); }
.md-empty { font-size: 12.5px; color: #6c6e75; padding: 10px 2px; }

.me-menu { display: flex; flex-direction: column; gap: 2px; }
.me-menu-item {
  display: flex; align-items: center; gap: 12px;
  border: none; background: transparent; color: #e6e7e9;
  font-size: 13.5px; font-weight: 500; text-align: left;
  padding: 12px 10px; border-radius: 10px; cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.me-menu-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.me-menu-item .mi-ico { width: 18px; text-align: center; flex: none; color: #8f9198; }
.me-menu-item .mi-ico svg { display: block; margin: 0 auto; }
.me-menu-item:hover .mi-ico { color: var(--accent); }
.me-menu-item .mi-side { margin-left: auto; font-size: 12px; color: #8f9198; font-variant-numeric: tabular-nums; }
.me-menu-item.danger { color: var(--up); }
.me-menu-item.danger .mi-ico { color: var(--up); }
.me-timer-sub { font-size: 12px; color: #8f9198; }
.me-entry {
  display: flex; align-items: center; gap: 14px; width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08); background: #141517; color: #fff;
  border-radius: 14px; padding: 16px 18px; cursor: pointer; text-align: left;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.me-entry:hover { border-color: rgba(255, 255, 255, 0.22); background: #18191c; }
.me-entry .me-ico-lg { font-size: 20px; width: 34px; height: 34px; border-radius: 9px; background: rgba(214, 235, 253, 0.08); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.me-entry b { display: block; font-size: 14px; font-weight: 700; }
.me-entry i { display: block; font-style: normal; font-size: 12px; color: #8f9198; margin-top: 2px; }
.me-entry .hp-arrow { color: #55575d; }

.me-legal { font-size: 11px; color: #6c6e75; line-height: 1.9; opacity: .9; }
.me-legal .ml-line + .ml-line { margin-top: 2px; }

/* ---------- 仪式感（克制版）：闪光 / 彩纸 / 结果勋章 ---------- */
.fx-flash { position: fixed; inset: 0; z-index: 88; pointer-events: none; background: #fff; opacity: 0; }
.fx-flash.on { animation: fx-flash-k .55s ease-out; }
@keyframes fx-flash-k { 0% { opacity: 0; } 18% { opacity: .85; } 100% { opacity: 0; } }
.fx-confetti { position: fixed; inset: 0; z-index: 89; pointer-events: none; overflow: hidden; }
.fx-confetti .cf {
  position: absolute; top: -3vh; width: 5px; height: 10px; border-radius: 1px;
  background: var(--c, #fff); opacity: .55;
  animation: cf-fall var(--d, 2.2s) cubic-bezier(.23, 1, .32, 1) forwards;
  transform: rotate(var(--r, 0deg));
}
@keyframes cf-fall {
  0% { transform: translateY(0) rotate(0); opacity: .6; }
  100% { transform: translateY(110vh) rotate(var(--r2, 540deg)); opacity: 0; }
}
.medal-pop {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  overflow: hidden; cursor: pointer;
}
.medal-rays {
  position: absolute; width: 620px; height: 620px;
  background: conic-gradient(from 0deg, transparent 0 16deg, rgba(214, 235, 253, 0.10) 16deg 22deg, transparent 22deg 48deg);
  border-radius: 50%; animation: medal-spin 26s linear infinite; pointer-events: none;
}
.medal-card {
  position: relative; width: min(92vw, 470px);
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(214, 235, 253, 0.06) 0%, transparent 44%),
    linear-gradient(42deg, #141517, #1a1b1f);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px; padding: 30px 26px 20px; text-align: center;
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; align-items: center;
  animation: medal-in .6s cubic-bezier(.2, 1.4, .36, 1);
}
.medal-img { width: 78px; height: 78px; object-fit: contain; opacity: .92; }
.medal-data { width: 100%; }
.medal-tip { margin-top: 12px; font-size: 10px; letter-spacing: 3px; color: var(--muted); white-space: nowrap; }
@keyframes medal-in { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes medal-spin { to { transform: rotate(360deg); } }

/* ---------- 弹窗补充 ---------- */
.dialog { border-radius: 16px; }
.dialog.slim { max-width: 480px; }
.tf-trader { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.tf-trader select { border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 9px; background: #101113; color: #fff; padding: 9px 11px; font-size: 13px; min-width: 170px; }
.cashout-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; margin-top: 12px; }
.co-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 11px 13px;
}
.co-main { flex: 1; min-width: 0; }
.co-gold { font-weight: 700; color: #e6e7e9; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.co-gold small { font-size: 10px; color: #8f9198; font-weight: 500; }
.co-sub { font-size: 11px; color: #8f9198; margin-top: 1px; font-variant-numeric: tabular-nums; }
.co-right { text-align: right; flex: none; }
.co-rmb { font-weight: 700; color: #fff; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.co-del { background: none; border: none; color: #6c6e75; cursor: pointer; font-size: 13px; padding: 6px; border-radius: 8px; }
.co-del:hover { color: var(--up); background: rgba(255, 100, 101, 0.10); }
.cashout-sum { font-size: 13px; color: #8f9198; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.cashout-sum b { color: #fff; font-weight: 700; }
.tl-note-toggle {
  align-self: flex-start; background: none; border: none; color: #8f9198;
  font-size: 12px; cursor: pointer; padding: 2px 0;
}
.tl-note-toggle:hover { color: #fff; }
.dialog input.hidden { display: none; }
.m-form { display: flex; flex-direction: column; gap: 10px; }
.m-form input, .m-form-row input, .m-form select {
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px;
  background: #101113; color: #fff;
  padding: 11px 13px; font-size: 14px; width: 100%;
}
.m-form input:focus, .m-form select:focus { outline: none; border-color: rgba(214, 235, 253, 0.6); }
.m-form-submit {
  margin-top: 4px; padding: 13px; font-size: 14px; font-weight: 700; letter-spacing: 2px;
  background: #fff; color: #0a0a0a; border: none; border-radius: 10px; cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.m-form-submit:hover { background: #e8e8ea; }
.m-form-submit:active { transform: scale(.97); }
.m-form-row { display: flex; gap: 10px; }
.m-form-row .seg { flex: none; }
.m-form-row input { flex: 1; min-width: 0; width: auto; }

/* 空状态 */
.empty { color: #6c6e75; }
.empty .big { font-size: 26px; font-weight: 200; letter-spacing: 2px; opacity: .5; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .side { flex-basis: 68px; width: 68px; padding: 16px 8px 12px; }
  .side-brand { justify-content: center; padding-bottom: 12px; }
  .side-brand img { display: none; }
  .side-brand .sb-text, .sn-item .sn-text, .sn-item .sn-key { display: none; }
  .sn-item { justify-content: center; padding: 12px 0; }
  .side-sep { margin: 8px 6px; }
  .side-foot .sn-item { justify-content: center; }
  .shell-main > main { padding: 22px 24px 44px; }
}
@media (max-width: 980px) {
  .shell { flex-direction: column; }
  .side {
    position: sticky; top: 0; z-index: 30; height: auto;
    flex-direction: row; align-items: center; flex-basis: auto; width: auto;
    padding: 10px 14px; gap: 6px;
    border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto; overflow-y: hidden;
  }
  .side-brand { padding: 0 6px 0 0; flex: none; }
  .side-brand img { display: block; width: 26px; height: 26px; }
  .side-brand .sb-text { display: block; }
  .side-brand b { font-size: 13px; }
  .side-brand span { display: none; }
  .side-nav { flex-direction: row; flex: 1 1 auto; gap: 2px; }
  .sn-item { padding: 8px 11px; white-space: nowrap; }
  .sn-item .sn-text { display: inline; font-size: 12.5px; }
  .sn-item .sn-ico { width: 16px; }
  .side-sep { display: none; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; padding-top: 0; flex: none; }
  .side-foot .sn-item { padding: 8px 9px; }
  .ledger-cols, .timer-lower, .gold-top { grid-template-columns: minmax(0, 1fr); }
  .t-result .tr-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .shell-main > main { padding: 16px 14px 36px; }
  .view-head h2 { font-size: 24px; }
  .ledger-hero { padding: 20px 20px 18px; }
  .lh-value { font-size: 34px; }
  .t-fields { grid-template-columns: 1fr; max-width: 100%; }
  .invite-code { font-size: 17px; letter-spacing: 4px; }
  .me-stats .hs .v { font-size: 16px; }
  .cal-cell { min-height: 52px; }
  .r-row .r-price { font-size: 16px; }
  .t-run .t-btns { flex-direction: column; align-items: stretch; }
}
html.is-touch .sn-item { padding: 12px 14px; }

/* reduced-motion 兜底 */
@media (prefers-reduced-motion: reduce) {
  .go-core, .go-halo, .t-disc-face, .t-pulse, .medal-rays { animation: none !important; }
}

/* ============================================================
   v3.1 呼吸感与弹窗收束（宽屏边距 / 区块节距 / 紧凑对话框）
   ============================================================ */
@media (min-width: 681px) {
  .shell-main > main {
    padding-left: clamp(20px, 2.8vw, 40px);
    padding-right: clamp(20px, 2.8vw, 40px);
    padding-bottom: 72px;
  }
}

/* 区块节距：同一元素间距统一，拉开段与段的节奏 */
.view-head { margin-bottom: 26px; }
.ledger-cols, .timer-lower, .me-grid, .gold-top { gap: 20px; }
.ledger-cols + .ledger-cols { margin-top: 20px; }
.ledger-hero { margin-bottom: 20px; }
.timer-lower, .gold-top { margin-top: 20px; }
#view-market .cmp-grid { margin-top: 34px; }
.cmp-grid { gap: 20px; }
.gcard { padding: 20px 24px; }
.gcard .ghead { margin-bottom: 14px; }

/* 紧凑对话框：窄身、两列字段、块级主操作 */
.dialog.slim { max-width: 400px; }
.dialog.slim .dialog-head { margin-bottom: 12px; }
.dialog.slim .dialog-head h2 { font-size: 15px; letter-spacing: .06em; }
.tf-trader { margin-bottom: 12px; font-size: 12.5px; }
.tf-trader select { min-width: 150px; padding: 8px 10px; }
.form-stack { display: flex; flex-direction: column; gap: 8px; }
.form-stack > input, .form-stack .f-grid2 input {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13); background: #101113; color: var(--text);
}
.form-stack input::placeholder { color: #6c6e75; }
.form-stack input:focus { outline: none; border-color: rgba(214, 235, 253, 0.6); box-shadow: var(--ring); }
.form-stack > .btn.gold { margin-top: 6px; padding: 12px; letter-spacing: .18em; }
.form-stack > .unit-hint { padding-left: 2px; }
.f-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.f-grid2 .seg { width: 100%; }
.f-grid2 .seg button { flex: 1; padding: 9px 6px; font-size: 12.5px; }
#finishModal .hint { font-size: 12px; color: #8f9198; }
#finishModal .m-form input { padding: 10px 12px; }
.f-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 2px; }
.f-foot .btn { padding: 11px; justify-content: center; font-weight: 600; }

/* ============================================================
   白天模式（html.light）：浅色暖纸底，与暗色同一套组件/布局
   ============================================================ */
html.light {
  color-scheme: light;

  --bg: #f4f3ef;
  --bg-deep: #efeeea;
  --card: #ffffff;
  --card-2: #ededea;
  --surface-float: #ffffff;
  --line: rgba(24, 22, 16, 0.09);
  --hair: rgba(24, 22, 16, 0.09);
  --line-strong: rgba(24, 22, 16, 0.17);
  --text: #201f1b;
  --text-2: #55544e;
  --muted: #77766e;
  --faint: #9c9b93;

  --accent: #b25c1e;
  --accent-strong: #94491a;
  --accent-soft: rgba(178, 92, 30, 0.10);
  --on-accent: #ffffff;

  --ice: #b25c1e;
  --ice-soft: rgba(178, 92, 30, 0.10);

  --up: #c0392b;
  --up-soft: rgba(192, 57, 43, 0.10);
  --down: #1e7f54;
  --down-soft: rgba(30, 127, 84, 0.10);
  --gold: #9a6a00;
  --gold-soft: rgba(154, 106, 0, 0.12);
  --timer: #201f1b;
  --timer-soft: rgba(24, 22, 16, 0.05);
  --run: #b25c1e;
  --run-strong: #94491a;

  --shadow-1: 0 1px 2px rgba(24, 22, 16, 0.05), 0 1px 3px rgba(24, 22, 16, 0.04);
  --shadow-2: 0 10px 28px -14px rgba(24, 22, 16, 0.22);
  --shadow-3: 0 26px 70px -24px rgba(24, 22, 16, 0.35);
  --ring: 0 0 0 3px rgba(178, 92, 30, 0.28);

  --grad-title: linear-gradient(to right bottom, #201f1b 30%, rgba(32, 31, 27, 0.55));
  --glow: radial-gradient(closest-side, rgba(178, 92, 30, 0.10), transparent 72%);
}

/* 世界底 / 滚动条 */
html.light { background: radial-gradient(56% 40% at 50% -6%, rgba(178, 92, 30, 0.10) 0%, transparent 58%), #f4f3ef; }
html.light ::selection { background: rgba(178, 92, 30, 0.18); color: #201f1b; }
html.light ::-webkit-scrollbar-thumb { background: rgba(24, 22, 16, 0.22); }
html.light ::-webkit-scrollbar-thumb:hover { background-color: rgba(24, 22, 16, 0.34); }
html.light body { color: var(--text); }

/* 玻璃壳：顶栏 / 侧栏 / 底色 */
html.light .topbar { background: rgba(255, 255, 255, 0.78); border-bottom-color: var(--line); }
html.light .side { background: rgba(255, 255, 255, 0.6); border-right-color: var(--line); }
html.light .sn-item:hover { background: var(--card-2); color: var(--text); }
html.light .sn-item { color: var(--muted); }
html.light .sn-item.active { background: var(--accent-soft); border-color: transparent; color: var(--text); }
html.light .sn-item.active .sn-ico { color: var(--accent); }
html.light .sn-item .sn-key { color: var(--faint); border-color: var(--line); }
html.light .side-sep { background: var(--line); }

/* 卡片配方改浅：取消冰蓝高光叠层，改极淡暖影 */
html.light .card,
html.light .panel,
html.light .gcard,
html.light .stat-card,
html.light .lm-row,
html.light .tag-check {
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(178, 92, 30, 0.04) 0%, rgba(178, 92, 30, 0) 40%),
    linear-gradient(42deg, #ffffff 0%, #fbfaf7 100%);
  border-color: var(--line);
}
/* 弹窗浮面单独对齐（浅色白浮面，不随卡片渐变） */
html.light .dialog {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-color: rgba(24, 22, 16, 0.14);
}

/* 主按钮/CTA：白底黑字 → 枫橙实底白字 */
html.light .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
html.light .btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
html.light .btn.gold { background: var(--accent); border-color: var(--accent); color: #fff; }
html.light .btn.gold:hover { background: var(--accent-strong); color: #fff; }
html.light .btn.tint { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
html.light .btn.tint:hover { background: var(--card-2); border-color: var(--line-strong); color: var(--text); }
html.light .btn.small.icon:hover { background: var(--card-2); color: var(--text); }
html.light .m-form-submit, html.light .t-btn-finish { background: var(--accent); color: #fff; }
html.light .t-btn-finish:hover, html.light .m-form-submit:hover { background: var(--accent-strong); }
html.light .btn.profile { color: var(--muted); }

/* 选中胶囊：反转为墨色实底白字（或强调色） */
html.light .svc-chip.on,
html.light .t-chip.on { background: #201f1b; border-color: #201f1b; color: #fff; }
html.light .svc-chip:hover, html.light .t-chip:hover { color: var(--text); background: var(--card-2); }

/* 分段控件轨道浅化 */
html.light .tabs, html.light .seg { background: #e8e7e2; border-color: rgba(24, 22, 16, 0.06); }
html.light .tab.active, html.light .seg button.active { background: #ffffff; color: var(--text); border-color: var(--line-strong); }

/* 输入控件：白底墨字 */
html.light input, html.light select, html.light textarea,
html.light .tf-cell input, html.light .gc-row input, html.light .form-stack input,
html.light .form-stack .f-grid2 input, html.light .m-exptable-tools input,
html.light .tf-trader select, html.light .m-form input, html.light .m-form-row input,
html.light .sort-bar select, html.light .sort-bar input[type=number] {
  background: #fcfbf9; border-color: var(--line-strong); color: var(--text);
}
html.light input::placeholder, html.light .sort-bar input::placeholder { color: var(--muted); }
html.light input:focus, html.light select:focus { border-color: rgba(178, 92, 30, 0.55); box-shadow: var(--ring); }
html.light .sort-bar select { color: var(--text); }
html.light .sort-bar select option { color: var(--text); background: var(--card); }
html.light .trade-form { background: var(--card-2); border-color: var(--line); }

/* 浅底白字修正 → 正文色（金价类数字保留金色语义） */
html.light .invite-code,
html.light .th-exp,
html.light .co-rmb,
html.light .lh-value { color: var(--text); }
html.light .r-row .r-price { color: var(--text); }
html.light .lh-value .lh-rmb,
html.light .gc-hint,
html.light .badge-current { color: var(--gold); }

/* 表头 / 表线 / 空态弱化 */
html.light th { background: rgba(24, 22, 16, 0.03); color: var(--muted); }
html.light td, html.light th { border-color: rgba(24, 22, 16, 0.06); }
html.light .badge-stale { color: var(--muted); background: var(--card-2); }
html.light .t-hist:hover { border-color: var(--line-strong); }

/* 浅色里的深色仪表盘（GO/计时圆盘/勋章）保持深色，强调色描边 */
html.light .go-face {
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.14) 0%, transparent 46%), linear-gradient(152deg, #2a2b28 4%, #141412 100%);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 44px -10px rgba(24, 22, 16, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
html.light .go-text { color: #fff; }
html.light .t-disc-face {
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 44%), #141412;
  border-color: rgba(255, 255, 255, 0.26);
}
html.light .t-disc .t-clock { color: #fff; }
html.light .t-run-badge .dot { background: var(--run); box-shadow: none; }
html.light .fx-flash { background: #fff; }
html.light .modal { background: rgba(32, 31, 27, 0.26); }

/* 细节灰字 → muted */
html.light .view-head .vh-sub,
html.light .gcard .gh-sub,
html.light .summary-note,
html.light .me-hint,
html.light .me-legal,
html.light .t-hero-note,
html.light .t-run .t-sub { color: var(--muted); }

/* 金价行本服描边、涨跌徽章保持语义 */
html.light .r-row.current { border-color: rgba(154, 106, 0, 0.5); }
html.light .empty { color: var(--faint); }

/* 移动端手机看桌面版：跟随浅色亦可（触屏） */

/* 卷轴大全内嵌视图（主站内） */
#view-scrolls { padding: 0; }
.view-scrolls-frame {
  display: block; width: 100%; height: calc(100vh - 200px); min-height: 520px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
}

.t-lower-block { display: flex; flex-direction: column; }

/* 记一笔「选」：输入行 + 选择器弹窗 */
.pick-row { display: flex; gap: 8px; align-items: center; }
.pick-row input { flex: 1; min-width: 0; }
.pick-row .btn { flex: none; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; margin-top: 12px; }
.pick-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px solid var(--line); background: transparent; border-radius: 10px;
  padding: 10px 12px; color: var(--text); cursor: pointer;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.pick-item:hover { border-color: var(--line-strong); background: var(--card-2); }
.pick-item .pi-main { flex: 1; min-width: 0; }
.pick-item .pi-name { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item .pi-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.pick-item .pi-pick { flex: none; font-size: 11px; color: var(--muted); }
.pick-item:hover .pi-pick { color: var(--accent); }
.pick-tabs { margin-bottom: 2px; }
.pick-dialog { display: flex; flex-direction: column; }
.pick-search input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #101113; color: var(--text); padding: 10px 12px; font-size: 13px;
}
.pick-search input:focus { outline: none; border-color: rgba(214,235,253,.6); box-shadow: var(--ring); }
html.light .pick-search input { background: #fcfbf9; }

/* 窄弹窗垂直居中（宽详情弹窗保持顶部） */
.modal:has(.dialog.slim) { align-items: center; padding-top: 24px; }

/* 弹窗头部/关闭钮：更轻、更小 */
html:not(.is-touch) .dialog-head { margin-bottom: 16px; gap: 12px; }
html:not(.is-touch) .dialog-head h2 { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
html:not(.is-touch) .dialog .close {
  width: 26px; height: 26px; background: transparent; color: var(--muted);
  font-size: 15px; border-radius: 8px;
}
html:not(.is-touch) .dialog .close:hover { background: var(--card-2); color: var(--text); }
html:not(.is-touch) .dialog .hint { color: var(--muted); }
html.light .dialog { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 24px 60px -34px rgba(24,22,16,.25); }

/* 金价页：底框统一毛玻璃通透（与弹窗呼应） */
#view-gold .gold-hero,
#view-gold .r-row,
#view-gold .g-row {
  background: color-mix(in srgb, var(--card) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--line-strong) 55%, transparent);
}
#view-gold .gold-hero { border-radius: 20px; }
#view-gold .g-row:hover, #view-gold .r-row:hover { border-color: color-mix(in srgb, var(--line-strong) 80%, transparent); }
#view-gold .g-panel { background: color-mix(in srgb, var(--card-2) 55%, transparent); }
html.light #view-gold .gold-hero,
html.light #view-gold .r-row,
html.light #view-gold .g-row {
  background: rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-color: rgba(24, 22, 16, 0.10);
}
html.light #view-gold .g-panel { background: rgba(255, 255, 255, 0.4); }
/* 「本服」徽章列：非本服行同宽占位，保证所有行列统一 */
.badge-blank { visibility: hidden; }


/* 顶栏不重复板块名标题，只留信息副标 */
.vb-left h2 { display: none !important; }


/* 视图工具行：内容区顶部右对齐 */
.ledger-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ledger-head .trader-chips { flex: 1 1 auto; min-width: 0; }
.ledger-head .view-tools { margin-left: auto; }
.view-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

html.light .ledger-hero {
  background:
    radial-gradient(120% 130% at 88% -30%, rgba(178, 92, 30, 0.05) 0%, transparent 52%),
    linear-gradient(42deg, #ffffff 0%, #fbfaf7 100%);
  border-color: var(--line);
}

/* 顶部栏视图操作区：随切换更新，固定右上 */
#viewTools { display: inline-flex; align-items: center; gap: 8px; }
#viewTools .btn { white-space: nowrap; }

/* 顶部栏纵向两行：第一行品牌/状态/操作，第二行服务器 chips 一行 */
.topbar { display: flex; flex-direction: column; gap: 8px; }
.svc-bar .svc-group { max-width: none; flex-wrap: nowrap; }

/* 服务器切换：紧凑下拉 */
.svc-picker { position: relative; flex: none; }
.svc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--card-2); color: var(--text);
  padding: 6px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.svc-btn:hover { border-color: var(--line-strong); }
.svc-caret { font-size: 9px; color: var(--muted); }
.svc-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 132px; background: var(--surface-float);
  border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: var(--shadow-2); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.svc-menu[hidden] { display: none; }
.svc-menu button {
  border: none; background: transparent; color: var(--text);
  text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.svc-menu button:hover { background: var(--card-2); }
.svc-menu button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* 服务器切换：与品牌同排一行小 chips（不折行、窄屏横向滚动） */
.topbar-main .svc-group { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar-main .svc-group::-webkit-scrollbar { display: none; }
.topbar-main .svc-chip {
  flex: none; white-space: nowrap; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; transition: all .15s var(--ease);
}
.topbar-main .svc-chip:hover { background: var(--card-2); color: var(--text); }
.topbar-main .svc-chip.on { background: #fff; border-color: #fff; color: #0a0a0a; font-weight: 600; }
html.light .topbar-main .svc-chip.on { background: #1b1b1a; border-color: #1b1b1a; color: #fff; }

/* 顶部状态信息：更小、单行，超宽省略（避免换行被遮挡） */
.topbar .status { font-size: 11.5px; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.topbar .status .dot, .topbar .status .gold-chip { flex: none; white-space: nowrap; }
.topbar .status b { white-space: nowrap; }

/* 顶部一行更紧凑：缩小品牌标题 / 状态 / 操作按钮，给服务器 chips 让位 */
.topbar-main { gap: 10px; }
.brand h1 { font-size: 14px; }
.topbar .status { font-size: 10.5px; }
.topbar .actions { gap: 5px; }
.topbar .actions .btn { padding: 5px 10px; font-size: 12px; }
.topbar .actions .btn.primary { padding: 6px 12px; }
.topbar .svc-group { gap: 3px; }

/* 状态信息：右下角小浮标（不占内容区、不堆在顶部） */
.status-fab {
  position: fixed; right: 12px; bottom: 12px; z-index: 35;
  display: inline-flex; align-items: center; gap: 3px 8px; flex-wrap: wrap;
  max-width: calc(100vw - 24px); padding: 4px 10px;
  font-size: 9.5px; line-height: 1.4; color: var(--muted);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .55);
  pointer-events: auto; opacity: .92; user-select: none;
}
.status-fab .dot, .status-fab .gold-chip { flex: none; white-space: nowrap; }
.status-fab b { white-space: nowrap; color: var(--text-2); font-weight: 500; }
html.light .status-fab { background: rgba(255, 255, 255, .78); }

/* ===== 账本/行情：同步移动端（持仓卖出快捷 / 流水日期分组 / hero 快捷入口 / 持仓总览条） ===== */

/* 详情弹窗：记买入/记卖出 直达（占满摘要网格一行） */
.summary .d-actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 2px; }

/* 流水：日期分组行 + 每日买卖净额 */
#tradesBody .trade-day-head td { padding-top: 14px; font-size: 12px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--line); }
#tradesBody .trade-day-head .up { color: var(--up); }
#tradesBody .trade-day-head .down { color: var(--down); }
#tradesBody .trade-day-head .muted { color: var(--muted); }
/* 层级：道具名突出、方向徽标弱化 */
#tradesBody td:nth-child(2) { font-size: 14.5px; }
#tradesBody .side-badge { font-size: 10px; padding: 1px 6px; vertical-align: 1px; }

/* 账本 hero：快捷操作 + 「?」盈亏口径说明 */
/* 快捷操作：总盈亏右侧 2×2 小格（买入/卖出/出金/记一笔） */
.lh-quick {
  display: grid; grid-template-columns: repeat(2, minmax(52px, auto));
  gap: 4px; align-self: center; margin-left: 16px; padding-left: 18px;
  border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.lh-quick button {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 3.5px 9px; border-radius: 7px; border: 1px solid var(--line);
  background: none; color: var(--text-2); cursor: pointer; font-size: 10px; white-space: nowrap;
}
.lh-quick button:hover { color: var(--gold); border-color: var(--gold); }
.lh-q { flex: none; width: 18px; height: 18px; margin-left: 6px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; }
.lh-q:hover { color: var(--text-2); }
.lh-tip { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* 行情页：持仓总览摘要条（点击「查看账本」直达） */
.asset-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; }
.asset-strip[hidden] { display: none; }
.asset-strip .as-label { color: var(--muted); }
.asset-strip .as-div { width: 1px; height: 14px; background: var(--line); }
.asset-strip .btn { margin-left: auto; }

/* 账本切换行内的操作 chips（＋记一笔 / 管理账本：从顶栏移入账本板块） */
.t-chip-act { border-style: dashed; color: var(--muted); }
.t-chip-act:hover { color: var(--text-2); border-color: var(--gold); }

/* ===== 账本 · 1:1 demo C 双栏数据报（再降字半档、加间距一档） ===== */

/* 版面：1240px版心，12px基准，整体留白放宽 */
#view-ledger {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 16px 56px;          /* 上下留白加宽 */
  font-size: 11px;
  line-height: 1.55;
}
#view-ledger .t-chip { font-size: 10px; padding: 4px 10px; }

/* KPI条：3 列左对齐（持仓市值 / 总盈亏 / 均价），字号 22px 克制 */
.kpi-strip { display: flex; gap: 0; margin: 18px 0 8px; flex-wrap: wrap; row-gap: 12px; align-items: flex-start; }
.kpi-strip > div { padding: 4px 24px 4px 0; margin-right: 24px; border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.kpi-strip > div:last-child { border-right: none; margin-right: 0; }
.kpi-strip .k { font-size: 10px; color: var(--muted); margin-bottom: 4px; letter-spacing: .04em; }
.kpi-strip .v {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.15;
}
.kpi-strip .v small { font-size: 10px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.kpi-strip .v-sub {
  margin-top: 4px; font-size: 10px; font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-weight: 400; letter-spacing: .01em;
}
.kpi-strip .v-sub.dim { color: var(--muted); }
.kpi-strip .v.dim { color: var(--text-2); }
.kpi-strip .v.up { color: var(--up); }
.kpi-strip .v.down { color: var(--down); }

/* 双栏：左侧紧凑（减小 padding 和列宽 gap） */
.lcols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); margin-top: 18px; column-gap: 24px; }
.lcol-l { padding-right: 18px; border-right: 1px solid var(--line); min-width: 0; }
.lcol-r { padding-left: 18px; min-width: 0; }
@media (max-width: 1000px) {
  .lcols { grid-template-columns: 1fr; column-gap: 0; }
  .lcol-l { border-right: none; padding-right: 0; }
  .lcol-r { padding-left: 0; }
}

/* 板块：间距收紧，标签字号小；板块头无任何边框 */
.lsec { margin-top: 22px; border: none; }
.lsec:first-child { margin-top: 4px; }
.lsec-head { display: flex; align-items: baseline; gap: 8px; border: none; padding-bottom: 2px; }
.lsec-head h2 {
  margin: 0; font: 600 9px/1.4 ui-monospace, "SF Mono", Consolas, monospace;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.lsec-head .ln { font-family: ui-monospace, Consolas, monospace; font-size: 9.5px; color: var(--gold); }
/* lsec-hint + lextra：隐藏，不显示白话提示与扩展说明 */
.lsec-hint, .lsec-head .lextra { display: none !important; }

/* 表格：th 9.5px、td 11.5px；行高加大；列距加大到 14px；行间 hairline；板块头无框 */
#view-ledger table { width: 100%; border-collapse: collapse; border: none; }
#view-ledger thead { border: none; }
#view-ledger th {
  font: 500 9px/1.4 ui-monospace, "SF Mono", Consolas, monospace;
  color: var(--muted); text-align: right;
  padding: 5px 10px 4px; border: none;
  white-space: nowrap;
}
#view-ledger th:first-child { text-align: left; padding-left: 2px; }
#view-ledger td {
  padding: 7px 10px; text-align: right; border: none; border-bottom: 1px solid var(--hair);
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 11px; font-variant-numeric: tabular-nums; color: var(--text-2);
  white-space: nowrap; background: none; line-height: 1.4; vertical-align: middle; box-shadow: none;
}
#view-ledger tr:last-child td { border-bottom: none; }
#view-ledger td:first-child { text-align: left; padding-left: 2px; font-family: inherit; max-width: 220px; }
#view-ledger td:first-child .nm {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
#view-ledger tbody tr { transition: background .12s; }
#view-ledger tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
#view-ledger .nm { font-size: 11px; font-weight: 600; color: var(--text); }
tr:hover .nm { color: var(--gold); }
.pct-suffix { font-size: 9px; opacity: .8; }

/* 卖出幽灵按钮：缩小一档 */
#view-ledger [data-sellpos] {
  background: none; border: 1px solid var(--line); color: var(--text-2);
  font-size: 9.5px; padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
#view-ledger [data-sellpos]:hover { color: var(--gold); border-color: var(--gold); }

/* 持仓星标：13px */
#view-ledger .star {
  cursor: pointer; font-size: 13px; line-height: 1; margin-left: 8px;
  color: color-mix(in srgb, var(--muted) 55%, transparent); user-select: none; vertical-align: -1px;
}
#view-ledger .star:hover { color: var(--gold); }
#view-ledger .star.on { color: var(--gold); }

/* 流水时间线：行高加大，日期组间距加大 */
.tl-day {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 11px; font-weight: 600; color: var(--text-2);
  padding: 14px 0 6px; border-bottom: 1px solid var(--hair);
  letter-spacing: .04em;
}
.tl-day:first-child { padding-top: 6px; }
.tl-day .net { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 10px; }
.tl-day .net.up { color: var(--up); }
.tl-day .net.down { color: var(--down); }
.tl-day .net.muted { color: var(--muted); }
.tl-row {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  font-variant-numeric: tabular-nums; flex-wrap: nowrap;
}
.tl-row:hover { background: rgba(255, 255, 255, 0.03); }
.tl-t { font-family: ui-monospace, Consolas, monospace; font-size: 10px; color: var(--muted); width: 36px; flex: none; }
/* 买入/卖出 badge：紫/金高对比，软底+边框+圆角，min-width 保证对齐 */
.tl-side {
  font-size: 9.5px; font-weight: 700; min-width: 32px; flex: none;
  padding: 1px 6px; border-radius: 999px; text-align: center;
  letter-spacing: .02em; line-height: 1.6;
}
.tl-side.buy {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.tl-side.sell {
  color: #d4a017;
  background: rgba(212, 160, 23, 0.14);
  border: 1px solid rgba(212, 160, 23, 0.3);
}
.tl-name { flex: 1 1 auto; min-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 11px; color: var(--text); }
.tl-amt { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--text-2); white-space: nowrap; flex: none; }
.tl-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 9.5px; padding: 2px 4px; flex: none; }
.tl-del:hover { color: var(--down); }
@media (max-width: 1240px) { .tl-amt.detail { display: none; } }

/* ===== 全局字体收敛（仅桌面端；style.css 为双端共享不动） ===== */
body { font-size: 12.5px; }
.btn { font-size: 12px; padding: 5px 11px; }
.btn.small { font-size: 11px; padding: 4px 9px; }
.brand h1 { font-size: 13px; }
.svc-chip { font-size: 11px; padding: 2px 7px; }
.sec-title { font-size: 12.5px; }

/* ===== Shell 沉浸感：侧栏/顶栏收窄，留白加多（全部视图） ===== */
.shell-main .side, .side { flex: 0 0 160px; width: 160px; padding: 13px 8px 10px; }
.shell-main .sn-item { font-size: 12px; gap: 8px; }
.shell-main .side-foot .sn-item { font-size: 11px; padding: 5px 9px; }
.shell-main .topbar { padding: 6px 14px; gap: 10px; }
.shell-main main { padding: 22px 30px 44px; max-width: 1560px; margin: 0 auto; width: 100%; }

/* ===== 钱包/账本视图 · 色彩逻辑（贴 demo C：数字 base、正数 up、负数 down、买卖紫/金、板块金） ===== */
#view-ledger .nm, #view-ledger .tl-name { color: var(--text); }
#view-ledger .nm:hover { color: var(--gold); }
#view-ledger .lsec-head h2 { color: var(--gold); letter-spacing: .14em; opacity: .85; }
#view-ledger .lsec-head .ln { color: var(--gold); }
#view-ledger .lsec-head .lextra { color: var(--muted); }
#view-ledger .lsec-hint { color: var(--muted); }
#view-ledger th, .tl-day .net { color: var(--muted); }
#view-ledger td { color: var(--text-2); }
#view-ledger td.up, .kpi-strip .v.up, .tl-day .net.up { color: var(--up); font-weight: 600; }
#view-ledger td.down, .kpi-strip .v.down, .tl-day .net.down { color: var(--down); font-weight: 600; }
/* .tl-side.buy/sell 已在 badge 化区段定义（紫/金） */
.tl-day .net.muted { color: var(--muted); }
/* 持仓星标金色 */
#view-ledger .star { color: color-mix(in srgb, var(--gold) 45%, transparent); font-size: 14px; margin-left: 8px; }
#view-ledger .star:hover, #view-ledger .star.on { color: var(--gold); }
/* 卖出按钮：金色描边，金色字 */
#view-ledger [data-sellpos] { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
#view-ledger [data-sellpos]:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); border-color: var(--gold); }

/* 金价页：hero（当前金价 + 金价换算）去底框，回归无框数据面 */
#view-gold .gold-hero {
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 2px 0 14px;
}
html.light #view-gold .gold-hero {
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
}
