:root {
  --bg: #0b0e14;
  --bg2: #10151f;
  --panel: #151c29;
  --panel2: #1b2435;
  --line: #26324a;
  --text: #e8edf7;
  --muted: #8b97ad;
  --accent: #f0b90b;
  --accent2: #ffd75e;
  --green: #0ecb81;
  --red: #f6465d;
  --blue: #4aa3ff;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter','PingFang SC','Microsoft YaHei',system-ui,sans-serif;
  background: radial-gradient(1200px 500px at 70% -10%, #16233d 0%, var(--bg) 55%);
  color: var(--text); line-height: 1.6; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
/* 数字输入框右侧那两个原生小箭头（Chrome/Safari 的 spin button、搜索框的清除按钮）
   在深色主题里又灰又突兀，还会被误认成「删除」按钮 —— 全局关掉，输入框干净。 */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button,
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* 头像位：底下一层是「首字 + 稳定配色」的圆牌，有真实头像时用 <img> 盖在上面，
   图挂了 <img> 自己移除，露出圆牌。所以头像位永远不会是空的。 */
.av { position: relative; flex: none; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; letter-spacing: .5px; overflow: hidden; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

/* 抢位进度条：这件事没有确定的终点（等别人退席位），所以用一条循环流动的亮条表示
   「正在跑」，而不是按百分比假装有进度；抢到填满绿、失败填满红。 */
.gbar { height: 6px; border-radius: 999px; background: var(--panel2); overflow: hidden; margin-top: 8px; }
.gbar > i { display: block; height: 100%; width: 100%; border-radius: 999px; background: var(--accent); }
.gbar.run > i { width: 38%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: gbarRun 1.15s linear infinite; }
.gbar.ok > i { background: var(--green); }
.gbar.bad > i { background: var(--red); }
.gbar.off > i { background: var(--line); }
@keyframes gbarRun { from { transform: translateX(-100%); } to { transform: translateX(265%); } }
@media (prefers-reduced-motion: reduce) { .gbar.run > i { animation: none; } }
/* 抢位历史记录：一行一条，条目攒多了也不会把页面撑散。 */
.grab-mini { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.grab-mini > b { font-weight: 600; }
.grab-mini-why { color: var(--red); }
.grab-hist-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- header / nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); background: rgba(11,14,20,.82); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 26px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; display: block; flex: none;
  box-shadow: 0 4px 14px rgba(240,185,11,.28); }
.nav .links { display: flex; gap: 20px; color: var(--muted); font-size: 14px; }
.nav .links a:hover { color: var(--text); }
.nav .spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); padding: 9px 18px; font-size: 14px; transition: .15s; }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #f7931a); color: #151109; font-weight: 700; border: none; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(246,70,93,.5); color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled, .btn:disabled:hover { opacity: .45; cursor: not-allowed; transform: none; border-color: var(--line); }

/* ---------- hero & sections ---------- */
/* 背景是一张画好的矢量图（渐隐网格 + 光晕 + 曲线），不是 emoji 拼的。 */
.hero { position: relative; padding: 84px 0 60px; text-align: center; overflow: hidden;
  background: url(/img/hero-glow.svg) center top / cover no-repeat; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 180px; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,14,20,0), var(--bg)); }
.hero .wrap { position: relative; z-index: 1; }
/* 手机端首页的展示图：只在窄屏出现，电脑端保持纯文案的居中 hero。 */
.hero-visual { display: none; }
.badge { display: inline-flex; gap: 8px; align-items: center; background: rgba(240,185,11,.12); color: var(--accent2); border: 1px solid rgba(240,185,11,.35); padding: 6px 14px; border-radius: 999px; font-size: 13px; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.15; margin: 22px auto 16px; max-width: 820px; font-weight: 800; letter-spacing: -.5px; }
.hero h1 .hl { background: linear-gradient(90deg, var(--accent), #f7931a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--muted); font-size: 17px; max-width: 700px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.exchanges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; color: var(--muted); font-size: 13px; }
.exchanges span { border: 1px solid var(--line); background: var(--panel); padding: 6px 14px; border-radius: 999px; }
.exchanges .tag { color: var(--green); }

section { padding: 64px 0; }
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head .kicker { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 40px); margin-top: 8px; }
.sec-head p { color: var(--muted); margin-top: 10px; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: .18s; }
.card:hover { border-color: #3a4b6e; transform: translateY(-2px); }
/* 图标位统一成「琥珀色渐变底 + 矢量图标」，比原来的 emoji 干净得多。 */
.card .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none;
  font-size: 18px; font-weight: 800; color: var(--accent2);
  background: linear-gradient(160deg, rgba(240,185,11,.20), rgba(240,185,11,.05));
  border: 1px solid rgba(240,185,11,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.22);
  margin-bottom: 14px; }
.card .ic svg { width: 22px; height: 22px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.pill.ok { color: var(--green); border-color: rgba(14,203,129,.4); background: rgba(14,203,129,.08); }
.pill.wait { color: var(--blue); border-color: rgba(74,163,255,.4); background: rgba(74,163,255,.08); }

/* ---------- pricing ---------- */
.pricing .card { display: flex; flex-direction: column; }
.pricing .price { font-size: 40px; font-weight: 800; margin: 6px 0 2px; }
.pricing .price small { font-size: 15px; color: var(--muted); font-weight: 400; }
.pricing ul { list-style: none; margin: 18px 0 22px; display: grid; gap: 9px; font-size: 14px; }
.pricing li { color: var(--muted); padding-left: 24px; position: relative; }
.pricing li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.pricing li.no::before { content: '—'; color: #56617a; }
.pricing .hot { border-color: rgba(240,185,11,.55); box-shadow: var(--shadow); position: relative; }
.pricing .hot .flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #151109; font-weight: 700; font-size: 12px; padding: 3px 14px; border-radius: 999px; }

/* ---------- testimonials / faq / footer ---------- */
.tst { text-align: left; }
.tst .who { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tst .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#2d4263,#16233d); display: grid; place-items: center; font-weight: 700; }
.tst p { color: var(--muted); font-size: 14px; }
details.faq { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px 20px; }
details.faq + details.faq { margin-top: 12px; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.faq summary::after { content: '+'; font-size: 20px; color: var(--accent); }
details.faq[open] summary::after { content: '−'; }
details.faq .a { color: var(--muted); font-size: 14px; margin-top: 12px; }
.footer { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--muted); font-size: 13px; }
.footer .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; margin-bottom: 26px; }
.footer h4 { color: var(--text); margin-bottom: 10px; font-size: 14px; }
.footer a:hover { color: var(--text); }
.footer .risk { font-size: 12px; color: #66718a; border-top: 1px solid var(--line); padding-top: 18px; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); background: rgba(16,21,31,.7); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side .brand { padding: 4px 10px 18px; }
/* 左侧导航：文字统一白色（含当前页），选中态靠底色 + 左侧高亮条区分，
   不再靠改字色 —— 一改字色就会半天看不清。图标是内联 SVG，取 currentColor 跟着变白。 */
.side .item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #fff; font-size: 14px; cursor: pointer; margin-bottom: 4px; }
.side .item:hover { background: var(--panel2); color: #fff; }
.side .item.active { background: rgba(240,185,11,.16); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side .item .nav-ic { width: 18px; height: 18px; flex: none; opacity: .95; }
.side .item.active .nav-ic { opacity: 1; }
.side .count { margin-left: auto; font-size: 12px; color: var(--accent2); }
/* 侧边栏按功能分组：标题居中在两侧分隔线中间（— 跟单 —） */
.side .group { display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,.5);
  letter-spacing: .6px; padding: 12px 12px 4px; }
.side .group::before, .side .group::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.main { padding: 22px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.topbar h2 { font-size: 22px; }
.topbar .spacer { flex: 1; }
.chip { background: var(--panel2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: 13px; }

/* 右上角账户区：随机头像 + 账户 ID + 下拉（账户信息 / 退出登录） */
.acct-wrap { position: relative; }
.acct { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 14px 4px 4px; cursor: pointer; }
.acct:hover { border-color: var(--accent); }
.acct-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.acct-meta b { font-size: 13px; font-weight: 600; }
.acct-meta .small { font-size: 11px; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); z-index: 80; }
.acct-item { padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.acct-item:hover { background: var(--panel2); color: var(--text); }
/* 头像颜色由用户 ID 哈希出来，同一个账号永远同一个色，省掉外链图片。 */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #0d1117; flex: none; }
.avatar.lg { width: 46px; height: 46px; font-size: 19px; }
.hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 4px; }

/* ---------- 总览：账户资产 / 小指标 / 持仓卡片 ---------- */
.ov-assets { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; }
.ov-assets-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.ov-assets-num { font-size: 32px; font-weight: 700; letter-spacing: -1px; line-height: 1.15; margin-top: 6px; }
.ov-assets-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.asset-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--panel2); color: var(--muted); }
.asset-pill.up { background: rgba(14,203,129,.15); color: var(--green); }
.asset-pill.down { background: rgba(246,70,93,.15); color: var(--red); }
/* 刚提交完支付单：不是「未核销」，系统还在核对，提示刷新即可。 */
.pay-pending { margin-top: 12px; padding: 10px 12px; border-radius: 10px; line-height: 1.7;
  border: 1px solid rgba(240,185,11,.35); background: rgba(240,185,11,.08); color: var(--accent2); }
.pay-pending .btn { margin-left: 6px; }
.ov-curve-wrap { margin-top: 14px; }
.ov-curve { display: block; width: 100%; height: 84px; }
.ov-curve-axis { display: flex; justify-content: space-between; margin-top: 4px;
  color: #54627a; font-size: 10.5px; }

.ov-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.ov-mini-card { position: relative; background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.ov-mini-card .k { display: block; color: var(--muted); font-size: 12.5px; }
.ov-mini-card .v { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.4px; margin-top: 6px; }
.ov-mini-card .v .unit { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }

.ov-pospanel { padding: 0; overflow: hidden; }
.ov-pos-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; }
.ov-pos-head h3 { font-size: 15px; margin: 0; }
.pos-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid rgba(38,50,74,.6); }
.pos-row:hover { background: rgba(27,36,53,.45); }
.coin { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: #12100a; }
.pos-main { flex: 1; min-width: 0; }
.pos-main b { display: block; font-size: 14px; }
.pos-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.pos-pnl { text-align: right; flex: none; min-width: 116px; font-variant-numeric: tabular-nums; }
.pos-pnl b { display: block; font-size: 15px; }
.pos-pnl span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ov-pospanel > .empty { padding: 26px 18px; }
.ov-pos-foot { padding: 12px 18px; border-top: 1px solid rgba(38,50,74,.6); }

.up { color: var(--green); } .down { color: var(--red); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid rgba(38,50,74,.5); vertical-align: middle; }
.table tr:hover td { background: rgba(27,36,53,.5); }
/* 仓位表：标记价 / 保证金 / 收益额 每秒都在变。默认的表是「按内容分配列宽」，
   数字一变长变短，整张表的列就跟着横向挪一下 —— 用户看到的是「排版在来回变」。
   这里定死列宽 + 等宽数字，数字怎么变，列一分都不动。
   nowrap 是配套的：换行会让行高忽高忽低，比横向挪更晃眼。 */
.pos-table { table-layout: fixed; font-variant-numeric: tabular-nums; }
.pos-table th, .pos-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 带单员持仓 8 列：币种 / 方向 / 杠杆 / 大小 / 开仓价格 / 标记价格 / 保证金 / 收益额（收益率） */
.pos-lead th:nth-child(1), .pos-lead td:nth-child(1) { width: 11%; }
.pos-lead th:nth-child(2), .pos-lead td:nth-child(2) { width: 7%; }
.pos-lead th:nth-child(3), .pos-lead td:nth-child(3) { width: 7%; }
.pos-lead th:nth-child(4), .pos-lead td:nth-child(4) { width: 13%; }
.pos-lead th:nth-child(5), .pos-lead td:nth-child(5) { width: 11.5%; }
.pos-lead th:nth-child(6), .pos-lead td:nth-child(6) { width: 11.5%; }
.pos-lead th:nth-child(7), .pos-lead td:nth-child(7) { width: 15%; }
.pos-lead th:nth-child(8), .pos-lead td:nth-child(8) { width: 24%; }
/* 自己跟单复制出来的仓位 8 列：币种 / 方向 / 数量 / 开仓价 / 现价 / 保证金 / 浮动盈亏 / 开仓时间 */
.pos-mine th:nth-child(1), .pos-mine td:nth-child(1) { width: 11%; }
.pos-mine th:nth-child(2), .pos-mine td:nth-child(2) { width: 8%; }
.pos-mine th:nth-child(3), .pos-mine td:nth-child(3) { width: 12%; }
.pos-mine th:nth-child(4), .pos-mine td:nth-child(4) { width: 11.5%; }
.pos-mine th:nth-child(5), .pos-mine td:nth-child(5) { width: 11.5%; }
.pos-mine th:nth-child(6), .pos-mine td:nth-child(6) { width: 13%; }
.pos-mine th:nth-child(7), .pos-mine td:nth-child(7) { width: 13%; }
.pos-mine th:nth-child(8), .pos-mine td:nth-child(8) { width: 19%; }
.pos-mine th:nth-child(8), .pos-mine td:nth-child(8) { white-space: nowrap; }
/* 「套餐权限不够」的统一遮罩：底下是真实功能的样子（虚化掉），中间压一枚胶囊
   说清楚要哪个套餐，下面挂开通按钮。内容不删 —— 用户先看见这功能长什么样，
   才有升级的动机；直接摆一句「没权限」等于什么都不说。 */
.locked { position: relative; border-radius: var(--radius); overflow: hidden; }
.locked-body { filter: blur(7px) saturate(.65); opacity: .34; pointer-events: none; user-select: none; }
.locked-cover { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(21,28,41,.30), rgba(11,14,20,.66)); }
.locked-inner { text-align: center; }
.locked-pill { display: inline-flex; align-items: center; gap: 9px; padding: 10px 20px; border-radius: 999px;
  background: rgba(21,28,41,.94); border: 1px solid rgba(240,185,11,.42); color: #fff;
  font-size: 14.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.locked-pill svg { width: 17px; height: 17px; flex: none; color: var(--accent2); }
.locked-cta { margin-top: 14px; }
/* 遮罩下面那层骨架：只是让「虚化的内容」看起来像真东西，不是真表单。 */
.sk { border-radius: 7px; background: rgba(255,255,255,.075); }
.sk-h { height: 17px; width: 44%; margin-bottom: 16px; }
.sk-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 13px; }
.sk-2 .sk { height: 38px; }
.sk-wide { height: 56px; margin-bottom: 14px; }
.sk-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 10px; }
.sk-row .sk { height: 13px; }
.sk-row .sk:first-child { background: rgba(255,255,255,.11); }
.side-by { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.panel h3 { font-size: 15px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 36px 0; }
.tag { font-size: 11px; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.tag.g { background: rgba(14,203,129,.12); color: var(--green); }
.tag.r { background: rgba(246,70,93,.12); color: var(--red); }
.tag.y { background: rgba(240,185,11,.12); color: var(--accent2); }
.tag.b { background: rgba(74,163,255,.12); color: var(--blue); }

/* 币种标签输入：输入币种名回车添加，多个用英文逗号分隔；标签右上角 × 删除 */
.chip-field .chip-box { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center;
  min-height: 34px; margin-top: 6px; padding: 10px 12px; background: var(--bg2);
  border: 1px dashed var(--line); border-radius: 9px; }
.chip-tag { position: relative; display: inline-flex; align-items: center;
  background: rgba(240,185,11,.12); color: var(--accent2); border: 1px solid rgba(240,185,11,.35);
  border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: .3px; padding: 4px 10px; }
.chip-tag .chip-x { position: absolute; top: -7px; right: -7px; width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
  font-size: 12px; line-height: 1; border-radius: 50%;
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted); transition: .15s; }
.chip-tag .chip-x:hover { background: var(--red); border-color: var(--red); color: #fff; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* forms / modal */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 9px 11px; outline: none; font: inherit; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field input:disabled, .field textarea:disabled { opacity: .6; cursor: not-allowed; }
/* 暂时锁死的选项（如「抢位只有币安」）：长得像输入框，但不能选，一眼看得出是平台限制。 */
.locked-value { display: flex; align-items: center; gap: 8px; min-height: 38px;
  padding: 8px 11px; background: var(--bg2); border: 1px dashed var(--line); border-radius: 9px; }
/* 收款「实时监测」状态条：一个会呼吸的圆点 + 上次/下次核对时间，代替手动扫描按钮。 */
.monitor { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin-bottom: 14px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; }
.monitor > .dot { flex: none; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #66718a; }
.monitor.live { border-color: rgba(14,203,129,.42); background: rgba(14,203,129,.06); }
.monitor.live > .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(14,203,129,.16);
  animation: gwPulse 2s ease-in-out infinite; }
.monitor.bad { border-color: rgba(246,70,93,.45); background: rgba(246,70,93,.06); }
.monitor.bad > .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(246,70,93,.16); }
@keyframes gwPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* 平台公告：总览页里的一条无限滚动带，左侧一道细色条 + 淡底。不弹窗、不遮内容，
   内容自己滚过来所以不用点进去；读完点 ✕ 收起，回看走侧边栏「公告」。 */
.annbar { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  margin: 0 0 16px; background: var(--bg2); border: 1px solid var(--line);
  border-left: 3px solid var(--blue); border-radius: 10px; font-size: 13px; overflow: hidden; }
.annbar[hidden] { display: none; }
.annbar .ann-tag { flex: none; font-size: 11px; letter-spacing: .5px; color: var(--blue);
  background: rgba(74,163,255,.12); border: 1px solid rgba(74,163,255,.3);
  padding: 2px 7px; border-radius: 6px; }
/* 两边淡出，滚出来的字不会硬生生被边框切断。 */
.annbar .ann-marquee { flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
.annbar .ann-track { display: flex; width: max-content; animation-name: annMarquee;
  animation-timing-function: linear; animation-iteration-count: infinite; }
.annbar .ann-run { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; padding-right: 26px; }
.annbar .ann-seg { display: inline-flex; align-items: baseline; gap: 8px; }
.annbar .ann-seg b { font-weight: 600; }
.annbar button.ann-seg { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
/* 每条公告都是能点开看全文的：标题常显下划线，用户一眼知道这里可以点。
   鼠标悬停再提亮一点，确认「这条正在被指着」。 */
.annbar button.ann-seg b { text-decoration: underline; text-underline-offset: 3px; }
.annbar button.ann-seg:hover b { color: var(--text); }
.annbar .ann-text { color: var(--muted); }
.annbar .ann-dot { color: var(--muted); }
/* 鼠标停在上面就暂停，方便看清长公告。 */
.annbar .ann-marquee:hover .ann-track { animation-play-state: paused; }
@keyframes annMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.annbar .ann-x { flex: none; background: none; border: 0; padding: 2px 4px; line-height: 1;
  color: var(--muted); font: inherit; cursor: pointer; }
.annbar .ann-x:hover { color: var(--text); }
/* 级别只体现在左侧细条和标签上，整条保持低调。 */
.annbar.lv-warn { border-left-color: var(--accent); }
.annbar.lv-warn .ann-tag { color: var(--accent2); background: rgba(240,185,11,.12); border-color: rgba(240,185,11,.32); }
.annbar.lv-success { border-left-color: var(--green); }
.annbar.lv-success .ann-tag { color: var(--green); background: rgba(14,203,129,.12); border-color: rgba(14,203,129,.32); }

/* 公告弹窗：正文可能挺长，用中间的大窗口（手机上也是居中大框，不做底部抽屉）。 */
.modal.ann-modal { width: min(760px, 100%); }
/* 全文保留换行，别把用户写的排版挤没了。 */
.ann-full { margin-top: 4px; font-size: 14px; line-height: 1.75; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.ann-modal .ann-full { font-size: 15px; line-height: 1.8; }
.ann-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.ann-pin { font-size: 11px; color: var(--accent2); background: rgba(240,185,11,.1);
  border: 1px solid rgba(240,185,11,.32); border-radius: 5px; padding: 1px 5px; margin-right: 4px; }

.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.check input { width: 15px; height: 15px; }
/* 带单员在交易所的等级（传奇 / 大师 / 冠军…）：用金色和普通标签区分开，不摆奖牌图标。 */
.chip.badge { color: var(--accent); border: 1px solid rgba(240,185,11,.42); background: rgba(240,185,11,.1);
  display: inline-flex; align-items: center; gap: 5px; font-weight: 700;
  /* 卡片右上角位置窄：不许被名字挤成两行（「传奇」竖排看着像勋章，还会撑高整行）。 */
  flex: none; white-space: nowrap; }

/* 弹窗里的分组：一条细分割线 + 小标题，把十几个字段切成「跟单对象 / 资金与执行 /
   止盈止损 / 风控与过滤」几块，长表单一眼能扫完。 */
/* 长表单（创建 / 编辑跟单）分节：每节一张浅卡片，标题后面挂一句这一节在干嘛，
   比一条条横线加灰色小标好扫。 */
.fgroup { margin-top: 14px; padding: 14px 16px 4px; border: 1px solid var(--line);
  border-radius: 14px; background: rgba(27,36,53,.4); }
.fgroup-t { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 13.5px; font-weight: 700; color: var(--text); letter-spacing: 0; margin-bottom: 12px; }
.fgroup-t span { font-size: 12px; font-weight: 400; color: var(--muted); }
/* 当前模式下用不到的选项：变灰并明确不可点，别让用户以为点坏了。 */
.dim { opacity: .45; cursor: not-allowed; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* 服务器出口 IP：等宽字 + 单行省略。用只读 input 会在深色主题里留一块白底，
   窄屏还会把整张卡片撑出横向滚动条 —— 换成 code 之后两个毛病一起没了。 */
.ip-row { display: flex; align-items: center; gap: 10px; }
.ip-row code { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; color: var(--accent2); }
.ip-row .btn { flex: 0 0 auto; }
/* 邀请码 / 邀请链接：邀请码用大字等宽显示，一眼能念给朋友；名单只列前几个，别把弹窗撑爆。 */
.invite-code { letter-spacing: 2px; font-weight: 700; }
.invite-list { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.7; color: var(--muted); }
/* 邀请规则：一条一行、点句成行，别把弹窗塞成一段密不透风的文字。 */
.invite-rules { margin: 6px 0 10px; padding-left: 18px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.invite-rules b { color: var(--text); }
/* 邀请奖励页：左边「拿去分享的东西」，右边「规则 + 名单」。
   分成两栏之后整页不再空旷，也不用上下滚着找。 */
.invite-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start; }
.invite-col { min-width: 0; }
.invite-h { font-size: 13.5px; margin: 0 0 8px; }
.invite-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.invite-stat > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; display: grid; gap: 4px; }
.invite-stat .k { font-size: 11.5px; color: var(--muted); }
.invite-stat b { font-size: 20px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.invite-stat small { font-size: 12px; font-weight: 500; color: var(--muted); }
@media (max-width: 900px) { .invite-grid { grid-template-columns: 1fr; gap: 18px; } }
/* 活动推广文案：给用户直接拿去发好友的一句话。 */
.invite-promo { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
  background: linear-gradient(90deg, rgba(240,185,11,.16), rgba(240,185,11,.04)); border: 1px solid rgba(240,185,11,.35); color: var(--accent2); }
/* z-index 必须高过手机底部导航（.mobnav 是 120）：否则长表单的「确定」会被底栏压住看不见。
   仍低于 toast（200）和公告弹窗（240），提示能盖在弹窗上。 */
.modal-bg { position: fixed; inset: 0; background: rgba(4,6,10,.7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 190; padding: 18px; }
.modal { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 24px; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 14px; }
/* 弹窗开着的时候锁住背景：手机上不锁，手指在弹窗外一划，后面的页面跟着滚，
   关掉弹窗位置也跑了（公告、持仓详情这些长内容最容易撞上）。
   开关键在 app.js 里由 MutationObserver 统一管，所有弹窗入口都覆盖。 */
html.cs-modal-open, html.cs-modal-open body { overflow: hidden; }
/* overflow:hidden 在手机上不一定拦得住背景滚动，所以把 body 钉住（top 由 JS 设成
   -当前滚动位置，视觉上停在原地不动）。关弹窗时 JS 会把 top 清掉并滚回原位。 */
html.cs-modal-open body { overscroll-behavior: none; position: fixed; left: 0; right: 0; width: 100%; }
/* 长表单（比如创建跟单）底层按钮太多，容易把「确定」顶到滚动区外面：
   底部操作条吸在弹窗下沿，滚到哪都点得到。 */
.modal-actions { position: sticky; bottom: -24px; z-index: 2; display: flex; gap: 10px;
  justify-content: flex-end; margin: 18px -24px -24px; padding: 14px 24px;
  background: var(--bg2); border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.modal-actions .btn { min-width: 128px; }
/* 公告弹窗要盖住手机底部导航（.mobnav 是 z-index 120），否则正文长的时候
   弹窗下沿会被导航条压住。居中大框的规则见下面的手机媒体查询。 */
.modal-bg.ann-bg { z-index: 240; }
/* 手机 UA 上一律用居中大框：不依赖视口宽度，桌面版浏览器（视口 >760px）也照样居中。 */
html.cs-mobile .modal-bg.ann-bg { align-items: center; padding: 14px; }
html.cs-mobile .modal-bg.ann-bg .modal { width: 100%; max-width: 100%; border-radius: 18px;
  border-bottom: 1px solid var(--line); max-height: 84vh; padding: 22px 18px; }
/* 首页/总览的「去开通套餐」：电脑端一行（左文案右按钮），手机端竖排居中。 */
.plan-cta { border-color: rgba(240,185,11,.5); margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.plan-cta .plan-cta-text { flex: 1; min-width: 220px; }
/* 登录卡片里的卖点块：只在手机端出现（桌面端弹窗居中，本来就不空）。 */
.auth-hero { display: none; }
.auth-hero .k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.auth-hero ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 9px; }
.auth-hero li { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.auth-hero li::before { content: '✓'; color: var(--accent); font-weight: 800; flex: none; }
.check { margin: 2px 0 12px; }
/* 表格内联输入框（后台改价格 / 配额这类），沿用 .field input 的观感但可以塞进单元格。 */
.inp { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 9px; outline: none; font: inherit; }
.inp:focus { border-color: var(--accent); }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { flex: 1; padding: 9px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.tabs button.active { background: var(--panel2); color: var(--accent2); border-color: rgba(240,185,11,.4); }
/* 管理后台的功能页签：后台东西多，先按「运营 / 配置」分组再找，比在一排里从头扫快。
   组名放左边，两组竖着排。 */
.admin-nav { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.admin-nav-grp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-nav-t { flex: none; font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.tabs.admin-tabs { flex-wrap: wrap; margin-bottom: 0; }
.tabs.admin-tabs button { flex: 0 1 auto; min-width: 92px; padding: 9px 14px; font-size: 14px; }

/* 创建跟单里的「复制范围」三选一。
   不能复用 .tabs：通用页签是 flex:1 等分，三个 6 字标签在手机上各分到 ~100px，
   加上 nowrap 就顶出按钮、糊成一团（用户反馈的「手机端显示异常」就是这个）。
   这里桌面端等分三列，手机端整行竖排（见下面的媒体查询），并排永远排得下。 */
.copy-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.copy-seg button { padding: 10px 8px; border-radius: 9px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font: inherit; cursor: pointer; text-align: center; }
.copy-seg button.active { background: var(--panel2); color: var(--accent2); border-color: rgba(240,185,11,.4); }
/* 整块页头（跟单广场 / 跟单任务）：左边标题 + 右边主按钮。手机上按钮通栏居中。 */
.page-head { margin-bottom: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head-main { flex: 1; min-width: 220px; }

/* 概览里的统计卡同时也是页签入口，给个能点的提示。 */
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: rgba(240,185,11,.4); }
/* 总览持仓行可以点进对应跟单的复制明细。 */
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(240,185,11,.05); }
.notify-item { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; font-size: 13px; }
.notify-item .t { font-weight: 600; }
.notify-item .b { color: var(--muted); }
/* API Key / 回调地址这类长串没有空格可断：不强制断行的话，它的最小宽度会顶穿整个
   卡片，手机上整页被撑宽、看起来「显示不全」。anywhere 只在真的放不下时才断。 */
.notify-item .b, .key-line { overflow-wrap: anywhere; word-break: break-word; }
.notify-item .time { float: right; color: #56617a; font-size: 11px; }
/* 推送渠道的配置教程：折叠块复用首页 FAQ 的样式，这里只压一下间距和字号。 */
.notify-guide { margin: 0 0 16px; }
.notify-guide .a { margin-top: 12px; }
.notify-guide .steps { gap: 10px; }
.notify-guide .steps li { font-size: 13.5px; padding-left: 38px; }
.notify-guide .steps li::before { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.notify-guide .tips { margin-top: 10px; }
.trader-card .top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: nowrap; }
.trader-card .name { font-weight: 700; }
.trader-card .hidden { color: var(--blue); font-size: 12px; }
.metric { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.metric div { text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 7px 2px; }
.metric .k { font-size: 11px; color: var(--muted); display: block; }
.metric .v2 { font-weight: 700; font-size: 14px; }

/* ---------- 跟单广场：一屏尽量多放人 ---------- */
/* 光把卡片框拉成一样高还不够：卡里每一块也得占固定位置。
   只要有一张卡在某处多换了一行（名称长、标签多、简介长、在仓币种多），
   它下面所有内容就整体往下错位几十像素，整行看着就是「乱」。
   所以下面每一块都写死高度 / 行数：多的截断，少的留白。 */
.plaza-grid { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; align-items: stretch; }
.trader-card { padding: 15px 16px; display: flex; flex-direction: column; position: relative; }
.trader-card .top { align-items: flex-start; flex-wrap: nowrap; }
/* 名称 + 带单员ID 恒定两行：ID 是一串 19 位数字，整行很宽，
   一旦让它按内容换行（flex-wrap），有没有等级徽章的卡就会错开一行 —— 这是「乱」的根源。 */
.tr-id { gap: 9px; min-width: 0; flex: 1 1 auto; flex-wrap: nowrap; }
.tr-nm { min-width: 0; flex: 1 1 auto; }
.tr-nm .name, .tr-nm .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 等级徽章钉在卡片右上角（脱离文档流）：它本来跟名称/ID 抢同一行宽度，
   19 位 ID 被挤掉一半、名称也得断行。钉出去之后 ID 才有整行可用。 */
.trader-card .top > .chip { position: absolute; top: 15px; right: 16px; }
.tr-nm .name { padding-right: 52px; font-size: 15px; }
/* 标签区固定两行：少的留白，多的收在第二行，行数恒定才不会顶走下面的数字墙。 */
.tr-tags { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-start;
  gap: 6px; margin-top: 10px; height: 48px; overflow: hidden; }
/* 数字墙：6 个指标排成 3 × 2，用 1px 的缝当分隔线，比每格单独描边省地方。 */
.tr-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 12px;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); }
.tr-metrics div { background: var(--panel); padding: 7px 3px; text-align: center; }
.tr-metrics .k { display: block; font-size: 10.5px; color: var(--muted); }
.tr-metrics .v2 { font-weight: 700; font-size: 13px; }
/* 当前持仓这一块：标题行（带「查看详情」）+ 币种 + 数据来源。
   来源那行一定要留着 —— 用户得知道这数字是交易所给的真实持仓，还是成交记录反推的。 */
.tr-pos { margin-top: 12px; }
.tr-pos-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--muted); }
.tr-pos-more { background: none; border: none; padding: 0; font-size: 12px; color: var(--accent2);
  cursor: pointer; font-family: inherit; }
/* 手机上文字链太细按不准，给点上下留白（桌面端不动）。 */
.tr-pos-more:hover { text-decoration: underline; }
.tr-syms { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: 7px; height: 24px;
  overflow: hidden; font-size: 11.5px; color: var(--muted); }
.tr-syms > * { flex: none; }
.tr-none { opacity: .55; }
.tr-src { margin-top: 7px; font-size: 11px; color: var(--muted); opacity: .85;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 详情弹窗里的来源说明块 */
.srcbox { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.srcbox b { display: block; color: var(--text); font-size: 12.5px; margin-bottom: 3px; }
.tr-sym { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 7px; font-size: 11px; color: var(--text); }
/* 卡片脚：简介 + 按钮。margin-top:auto 把它顶到卡片最下面，
   配合上边的分隔线，一行里的卡片高低一样、按钮也落在同一条线上。
   简介固定两行高度（没写简介也留白）—— 否则那条分隔线会上下浮动。 */
.tr-foot { margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); }
.tr-desc { margin: 0 0 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 39px; }
/* 后台「介绍」预览块：只读、不可编辑 —— 内容由服务端按真实战绩生成。 */
.auto-intro { border: 1px solid var(--line); border-radius: 9px; background: var(--bg2);
  padding: 9px 11px; line-height: 1.6; font-size: 13px; min-height: 38px; word-break: break-word; }
.tr-act { margin-top: 0; justify-content: center; }
/* 卡片上的主按钮：整行通栏 + 居中文字，一眼就是「点这里」。
   以前是个 sm 小按钮挤在左下角，用户得先找一会儿。 */
.tr-follow { width: 100%; padding: 11px 20px; font-size: 15px; font-weight: 700; border-radius: 11px; }
.tr-follow.is-locked { color: var(--muted); background: var(--panel2); }
.tr-follow.is-locked:hover { color: var(--text); }
.toast { position: fixed; right: 18px; bottom: 18px; background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 10px; font-size: 14px; z-index: 200; box-shadow: var(--shadow); animation: pop .2s; }
.toast.err { border-left-color: var(--red); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

.card .flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #151109; font-weight: 700; font-size: 12px; padding: 3px 14px; border-radius: 999px; white-space: nowrap; }
.card.hot { border-color: rgba(240,185,11,.55); box-shadow: var(--shadow); position: relative; overflow: visible; }
.card .price { font-size: 34px; font-weight: 800; margin: 8px 0 2px; }
.card .price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.grid.cols-3 > .card.hot { z-index: 1; }

/* ---------- 首页：Cookie 采集插件下载 + 安装教程 ---------- */
.plugin-band { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: 20px; padding: 36px 30px; }
.plugin-band .sec-head { margin-bottom: 30px; }
.howto { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: start; }
.steps { counter-reset: step; list-style: none; display: grid; gap: 16px; }
.steps li { position: relative; padding-left: 46px; color: var(--muted); font-size: 14px; }
.steps li b { display: block; color: var(--text); font-size: 15px; margin-bottom: 3px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 1px;
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: rgba(240,185,11,.12); border: 1px solid rgba(240,185,11,.35); color: var(--accent2); }
.howto .dl { display: grid; gap: 16px; }
.howto .dl .card { padding: 20px; }
.howto .dl .card:hover { transform: none; }
.howto code, .kbd { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
  font-size: 12.5px; color: var(--accent2); font-family: ui-monospace, Menlo, Consolas, monospace; }
.tips { list-style: none; display: grid; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.tips li { padding-left: 16px; position: relative; }
.tips li::before { content: '•'; position: absolute; left: 3px; color: var(--accent); }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .side .brand { display: none; }
  .side .item { white-space: nowrap; }
  .grid.cols-3, .grid.cols-2, .side-by, .grid3 { grid-template-columns: 1fr; }
  .howto { grid-template-columns: 1fr; }
  .plugin-band { padding: 26px 20px; }
  .metric { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
   「保存到桌面」引导弹层（首页 + 控制台共用，逻辑在 mobile.js）
   ===================================================================== */
.mob-sheet-bg { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end;
  background: rgba(4,6,10,.72); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .22s, visibility .22s; }
.mob-sheet-bg.show { opacity: 1; pointer-events: auto; visibility: visible; }
.mob-sheet { width: 100%; max-width: 560px; margin: 0 auto; background: var(--bg2);
  border: 1px solid var(--line); border-bottom: none; border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto;
  transform: translateY(14px); transition: transform .22s; }
.mob-sheet-bg.show .mob-sheet { transform: none; }
.mob-grab { width: 42px; height: 4px; border-radius: 999px; background: var(--line); margin: 0 auto 14px; }
.mob-sheet h3 { font-size: 18px; margin-bottom: 8px; }
.mob-lead { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.mob-steps { counter-reset: mstep; list-style: none; display: grid; gap: 12px; margin-bottom: 18px; }
.mob-steps li { position: relative; padding-left: 34px; font-size: 13.5px; color: var(--muted); }
.mob-steps li b { color: var(--accent2); font-weight: 600; }
.mob-steps li::before { counter-increment: mstep; content: counter(mstep); position: absolute; left: 0; top: 0;
  width: 23px; height: 23px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: rgba(240,185,11,.12); border: 1px solid rgba(240,185,11,.35); color: var(--accent2); }
.mob-actions { display: grid; gap: 9px; }
.mob-foot { color: #66718a; font-size: 12px; text-align: center; margin-top: 12px; }

/* =====================================================================
   移动端底部导航（控制台专用，标记在 app.html 里）
   ===================================================================== */
.mobnav { display: none; }
/* 未登录时不渲染底部标签栏和「更多」抽屉：它们不在 #dash 里，得靠 hidden 属性挡住。
   用 !important 压过下面移动端媒体查询里的 display: grid。 */
.mobnav[hidden], .mob-sheet-bg[hidden] { display: none !important; }
.mobile-only { display: none; }
.mob-more-list { display: grid; gap: 6px; }
.mob-more-group { font-size: 11px; color: #56617a; letter-spacing: .6px; margin: 12px 0 2px; }
.mob-more-item { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  font-size: 14.5px; color: var(--text); cursor: pointer; }
.mob-more-item:active { background: var(--panel2); }
.mob-more-item.active { border-color: rgba(240,185,11,.45); color: var(--accent2); font-weight: 600; }
.mob-more-lead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mob-more-item .nav-ic { width: 18px; height: 18px; flex: none; opacity: .9; }

/* =====================================================================
   移动端深度适配：底部标签栏 + 表格卡片化 + 触控尺寸 + 安全区
   ===================================================================== */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
  /* 触控设备：去掉点击高亮，防止误触缩放 */
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
  input, select, textarea { font-size: 16px !important; }  /* <16px 时 iOS 会自动放大页面 */

  /* 侧边栏整条收起来，改用底部标签栏；「更多」里能进全部页面 */
  .side { display: none; }
  .dash { grid-template-columns: 1fr; }
  .main { padding: 12px 12px calc(88px + env(safe-area-inset-bottom)); }
  .mobile-only { display: initial; }

  /* 底部导航固定 5 格：总览 / 广场 / 任务 / 订阅 / 更多。
     任务放正中间、圈更大更亮（跟单是这产品的主线动作），两边四个是常规入口。 */
  .mobnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; display: grid;
    grid-template-columns: repeat(5, 1fr); gap: 2px;
    padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(16,21,31,.86), rgba(9,12,18,.97));
    backdrop-filter: blur(18px) saturate(140%);
    border-top: 1px solid rgba(255,255,255,.07);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -14px 34px rgba(0,0,0,.45); }
  /* 顶边一道很淡的金线，把导航栏和内容分开，又不抢眼。 */
  .mobnav::before { content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240,185,11,.45), transparent); }
  /* 每一项就是一个圆形按钮，名字写在圈里。 */
  .mobnav-item { position: relative; border: 0; background: transparent;
    min-height: 60px; display: grid; place-items: center; padding: 0; }
  .mobnav-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    font-size: 13px; font-weight: 600; letter-spacing: .5px; color: var(--muted);
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.075), rgba(255,255,255,.025));
    border: 1px solid rgba(255,255,255,.08);
    transition: transform .18s cubic-bezier(.2,.8,.3,1), background .18s, color .18s, box-shadow .18s; }
  .mobnav-item:active .mobnav-ic { transform: scale(.93); }
  .mobnav-item.active .mobnav-ic { color: #16202f; font-weight: 800; border-color: transparent;
    background: linear-gradient(140deg, var(--accent2), #f0871a);
    box-shadow: 0 8px 20px rgba(240,185,11,.34), 0 0 0 4px rgba(240,185,11,.10);
    transform: translateY(-2px); }
  /* 中间的「任务」：常态就是金色实心圆，浮起来一点，一眼就能找到。
     选中时加一圈光环 + 再抬一点，仍然是这一栏里最显眼的那个。 */
  .mobnav-center .mobnav-ic { width: 56px; height: 56px; margin-top: -12px;
    font-size: 14px; font-weight: 800; color: #16202f; border-color: transparent;
    background: linear-gradient(140deg, var(--accent2), #f0871a);
    box-shadow: 0 10px 24px rgba(240,185,11,.34), 0 0 0 4px rgba(240,185,11,.10); }
  .mobnav-center.active .mobnav-ic { transform: translateY(-14px);
    box-shadow: 0 12px 28px rgba(240,185,11,.46), 0 0 0 6px rgba(240,185,11,.18); }
  .mobnav-center:active .mobnav-ic { transform: translateY(-10px) scale(.95); }
  /* 中间那颗被抬起来了，角标跟着往上挪，否则会压在圆上。 */
  .mobnav-center .badge { top: -6px; margin-left: 12px; }
  /* 选中项在圈下方点一个小圆点，扫一眼就知道在哪一页。 */
  .mobnav-item.active::after { content: ''; position: absolute; bottom: 1px; left: 50%;
    width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 8px rgba(240,185,11,.8); }
  /* 手机上公告条更矮更窄，别把首屏内容挤下去。 */
  .annbar { margin: 0 0 12px; padding: 7px 9px; gap: 8px; font-size: 12px; }
  .annbar .ann-tag { padding: 1px 6px; }
  .annbar .ann-run { padding-right: 20px; }
  /* 任务数角标：只在有运行中任务时出现在圈右上角，空的时候完全不占位。 */
  .mobnav-item .badge { position: absolute; top: 1px; left: 50%; margin-left: 9px;
    min-width: 12px; height: 17px; padding: 0 4px; border-radius: 999px;
    background: var(--red); color: #fff; font-size: 10px; font-weight: 800; line-height: 17px;
    align-items: center; justify-content: center; border: 2px solid var(--bg); }
  .mobnav-item .badge:empty { display: none; }

  /* 顶栏：吸顶 + 收紧，标题和账户区并排 */
  .topbar { position: sticky; top: 0; z-index: 60; margin: -12px -12px 12px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    background: rgba(11,14,20,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); gap: 8px; }
  .topbar h2 { font-size: 17px; }
  .acct { padding: 3px 10px 3px 3px; }
  .acct-meta .small { display: none; }   /* 手机上只留昵称，ID 进账户信息里看 */
  .acct-menu { top: calc(100% + 6px); }

  /* 表格 → 卡片：表头藏起来，每行一张卡，单元格左边是字段名右边是值。
     字段名由 app.js 从 <thead> 自动抄到每个 <td data-label>，不用手写一遍。 */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2);
    padding: 8px 12px; margin-bottom: 10px; }
  .table tr:hover td { background: transparent; }
  .table td { border: none; padding: 6px 0; display: flex; align-items: center;
    justify-content: space-between; gap: 12px; text-align: right; font-size: 13.5px; }
  .table td + td { border-top: 1px solid rgba(38,50,74,.55); }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px;
    flex: none; text-align: left; font-weight: 400; }
  .table td:not([data-label])::before { content: none; }
  .table td[colspan] { display: block; text-align: center; padding: 14px 0; }
  .table td[colspan]::before { content: none; }
  .table td[colspan] + td { border-top: none; }
  /* 卡片化之后卡片本身就是容器，别再叠一层横向滚动 */
  .table-wrap { overflow: visible; }

  /* 弹窗：底部抽屉式，手机上更容易够到按钮 */
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; border-bottom: none;
    max-height: 92vh; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
  .modal-actions { bottom: calc(-20px - env(safe-area-inset-bottom));
    margin: 18px -18px calc(-20px - env(safe-area-inset-bottom));
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-radius: 0;
    justify-content: center; }
  /* 公告弹窗在手机上也是居中的大框：正文长，贴底抽屉读起来太憋屈。 */
  .modal-bg.ann-bg { align-items: center; padding: 14px; }
  .modal-bg.ann-bg .modal { width: 100%; max-width: 100%; border-radius: 18px;
    border-bottom: 1px solid var(--line); max-height: 84vh; padding: 22px 18px; }
  /* 手机端按钮居中（电脑端保持原来的靠右）。 */
  .plan-cta { flex-direction: column; text-align: center; }
  .plan-cta .plan-cta-text { min-width: 0; }

  /* 登录页是整屏唯一的入口，不该是「贴在底部的半截抽屉」——
     上面留一大片黑会让第一次进来的人以为没加载完。改成竖直居中的完整卡片，
     再用三行卖点把高度撑起来。 */
  #authScreen { align-items: center; padding: 16px; }
  #authScreen .modal { border-radius: 18px; border-bottom: 1px solid var(--line);
    padding: 22px 18px; max-height: 94vh; margin: 0 auto; }
  #authScreen .auth-hero { display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
  #authScreen .tabs button { font-size: 14px; }

  /* 触控尺寸：按钮至少 42px 高，别让用户戳不中 */
  .btn { min-height: 42px; padding: 10px 16px; }
  .btn.sm { min-height: 38px; padding: 8px 12px; }
  .tabs button { min-height: 42px; }
  /* 手机端标签只放两三个字，别折成两三行 —— 折了看着就像排版坏了 */
  .tabs button { white-space: nowrap; }
  /* 后台 6 个页签在小屏上排成两列，别挤成一条看不清的细缝。 */
  .tabs.admin-tabs button { min-width: 0; flex: 1 1 30%; padding: 8px 10px; font-size: 13px; }

  /* 「复制范围」三选一：三个 6 字标签等分会挤成一团，手机端改成整行竖排的选项，
     右边用圆圈标出选中的那个 —— 既是更大的触控面，也一眼看得出选的是哪一项。 */
  .copy-seg { grid-template-columns: 1fr; gap: 6px; }
  .copy-seg button { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 46px; padding: 11px 13px; text-align: left; }
  .copy-seg button::after { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%;
    border: 1.5px solid var(--line); }
  .copy-seg button.active::after { border-color: var(--accent);
    background: radial-gradient(circle, var(--accent) 0 5px, transparent 6px); }

  /* 页头：手机上标题和按钮别挤在一条、也别让按钮孤零零挂在左边 —— 按钮通栏居中。 */
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head-main { min-width: 0; }
  .page-head > .btn { width: 100%; }
  .side .item { min-height: 46px; }

  /* 栅格一律单列，指标卡两列 */
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px; }
  .stat .v { font-size: 20px; }
  .grid2, .grid3, .grid.cols-2, .grid.cols-3, .side-by { grid-template-columns: 1fr; }
  .metric { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 14px; border-radius: 12px; }

  /* 总览：资产大字收一号；小指标两列，运行任务独占一行。 */
  .ov-assets { padding: 15px 16px; }
  .ov-assets-num { font-size: 27px; }
  .ov-curve { height: 68px; }
  .ov-mini { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ov-mini-card:nth-child(3) { grid-column: span 2; }
  /* 持仓卡片自己管内外边距，别被上面的 .panel 覆盖回 14px。 */
  .ov-pospanel { padding: 0; }
  .ov-pos-head, .pos-row, .ov-pos-foot { padding-left: 14px; padding-right: 14px; }

  /* 广场：手机上单列，卡片别那么高（简介只留 2 行，6 个指标 2 列）。 */
  .plaza-grid { grid-template-columns: 1fr; gap: 12px; }
  .trader-card { padding: 14px; }
  .trader-card .top > .chip { top: 14px; right: 14px; }
  .tr-metrics { grid-template-columns: repeat(2, 1fr); }
  /* 手机端「查看详情」是文字链，太细按不准 —— 撑到 30px 的触控高度。 */
  .tr-pos-more { padding: 5px 0; margin: -5px 0; }
  /* 长表单分节卡片收紧一点，手机上少占横向空间。 */
  .fgroup { padding: 12px 12px 2px; }

  .row-flex { gap: 8px; }

  /* 表单里并排的两个按钮改成整行，避免挤出屏幕 */
  .row-flex > .btn { flex: 1 1 auto; }

  /* 账户信息底部原来一行塞三个按钮：改密码、退出、关闭挤在一起，主次也不分。
     手机上改成「改密码」独占一行（它是这一屏的主操作），退出 / 关闭平分下一行。 */
  .acc-foot { flex-wrap: wrap; gap: 10px; }
  .acc-foot #accSavePwd { flex: 1 1 100%; }
  .acc-foot .acc-foot-spacer { display: none; }
  .acc-foot #accLogout, .acc-foot [data-close] { flex: 1 1 0; min-width: 0; }

  /* 提示条贴在底部导航上方 */
  .toast { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); font-size: 13.5px; }

  /* 抢位历史：手机上一条也就两三行，字号和按钮收一点，五条不至于刷满屏 */
  .grab-mini { gap: 6px; padding: 6px 0; }
  .grab-mini .small { font-size: 11.5px; }
  .grab-mini .btn { min-height: 34px; padding: 4px 10px; font-size: 12.5px; }
  .grab-hist-foot .btn { min-height: 34px; padding: 4px 10px; font-size: 12.5px; }

  /* 首页 */
  .nav .wrap { height: 56px; padding: 0 14px; gap: 12px; }
  .nav .links { display: none; }
  .brand { font-size: 18px; }
  .hero { padding: 46px 0 34px; }
  .hero p.sub { font-size: 15px; }
  .hero .cta { flex-direction: column; }
  .hero .cta .btn { width: 100%; }
  /* 手机端：把控制台的样子直接摆出来（矢量图，任何分辨率都清晰）。 */
  .hero-visual { display: block; position: relative; margin: 26px auto 4px; width: 100%; max-width: 262px; }
  .hero-visual::before { content: ''; position: absolute; inset: -10% -24% -4%; border-radius: 50%; z-index: 0;
    background: radial-gradient(closest-side, rgba(240,185,11,.26), rgba(47,124,246,.12) 62%, rgba(47,124,246,0)); }
  .hero-visual img { position: relative; z-index: 1; display: block; width: 100%; height: auto;
    filter: drop-shadow(0 24px 46px rgba(0,0,0,.6)); }
  section { padding: 42px 0; }
  .sec-head { margin-bottom: 26px; }
  .plugin-band { padding: 22px 16px; border-radius: 16px; }
  .steps li { padding-left: 40px; }
  .footer { padding: 30px 0 40px; }
  .footer .cols { gap: 24px; flex-direction: column; }
  .wrap { padding: 0 14px; }
}

/* 账户信息弹窗底部（电脑端）：改密码靠左，退出 / 关闭靠右，中间用占位撑开。 */
.acc-foot-spacer { flex: 1; }

/* 手机端仓位卡片（跟单任务 → 仓位 → 当前持仓 / 整体仓位记录）。
   表格在手机上会被折成一列没有字段名的数字，所以这几屏改用卡片：
   一张卡 = 一个仓位，第一行币种 + 方向 + 盈亏，第二行数量 / 开仓价 / 现价，
   第三行占用和开仓时间（次要信息压成灰色小字）。 */
.tp-cards { display: grid; gap: 10px; }
/* 复制明细的摘要行：写「几个仓位 / 累计多少」。没有刷新按钮，
   弹窗开着就每 5 秒自己拉一次，所以也不需要再挂一个时间戳。 */
.tp-metarow { display: flex; align-items: baseline; gap: 8px; }
.tp-metarow #tpMeta { min-width: 0; }
.tp-card { padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.tp-card-top { display: flex; align-items: center; gap: 8px; }
.tp-card-top + .tp-card-line { margin-top: 7px; }
.tp-card-line { font-size: 13px; color: var(--text); }
.tp-card-line.muted { color: var(--muted); font-size: 12px; margin-top: 3px; }
/* 带单员持仓卡里「字段 —— 数值」那一列：字段名固定宽度、数值右对齐，
   跟币安 App 的仓位卡一个排法，扫一眼就能跟手机上那几行对上。 */
.pos-kv { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; font-size: 13px; }
.pos-kv > span { flex: none; color: var(--muted); min-width: 92px; }
.pos-kv > b { margin-left: auto; text-align: right; font-weight: 600; word-break: break-all; }

/* 已经保存到桌面（standalone）时再收一点边距，全屏利用率更高 */
html.cs-standalone body { overscroll-behavior: none; }

/* ---------- 在线客服 ---------- */
/* 电脑端：右下角一个常驻圆钮，点开在它上方展开对话面板。
   底部留 24px 而不是贴着边，是为了不压住页面右下角最后一个「保存」之类的按钮。 */
.cs-fab { position: fixed; right: 22px; bottom: 24px; z-index: 130; width: 54px; height: 54px;
  border-radius: 50%; border: 1px solid rgba(240,185,11,.34); background: linear-gradient(135deg, var(--accent), #f7931a);
  color: #151109; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(0,0,0,.45);
  transition: transform .16s ease, box-shadow .16s ease; }
.cs-fab[hidden] { display: none !important; }
.cs-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.cs-fab svg { width: 26px; height: 26px; }
.cs-fab-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.cs-fab-badge[hidden] { display: none !important; }

.cs-panel { position: fixed; right: 22px; bottom: 90px; z-index: 131; width: 350px; max-width: calc(100vw - 44px);
  height: 460px; max-height: calc(100vh - 140px); display: flex; flex-direction: column;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.cs-panel[hidden] { display: none !important; }
.cs-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(240,185,11,.08), transparent); }
.cs-head-main { display: flex; flex-direction: column; min-width: 0; }
.cs-head-main b { font-size: 15px; }
.cs-head-main span { font-size: 12px; }
.cs-x { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; padding: 4px 6px; border-radius: 8px; }
.cs-x:hover { color: var(--text); background: rgba(255,255,255,.06); }
.cs-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  overscroll-behavior: contain; }
.cs-msg { max-width: 84%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; }
/* mine = 当前这一侧自己发的（金字靠右），peer = 对方发的（灰底靠左）。
   用户端和后台共用这两个类，所以不按 sender 命名 —— 两边的「我」不是同一个人。 */
.cs-msg.mine { align-self: flex-end; background: rgba(240,185,11,.16); border: 1px solid rgba(240,185,11,.32); color: var(--text); border-bottom-right-radius: 4px; }
.cs-msg.peer { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cs-msg-time { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.cs-empty { margin: auto; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.9; }
.cs-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg); }
.cs-form textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 13.5px; }
.cs-form textarea:focus { outline: none; border-color: var(--accent); }

/* 手机端：面板改成从底部升起的整屏卡片，盖住底部导航（z-index 320 > .mobnav 的 120），
   这样输入框不会被底栏挡住，键盘弹起时也不会只露出一半。 */
html.cs-mobile .cs-panel { left: 0; right: 0; bottom: 0; top: 0; width: 100%; max-width: 100%;
  height: auto; max-height: 100%; border-radius: 0; border: 0; }
html.cs-mobile .cs-head { padding-top: max(14px, env(safe-area-inset-top)); }
html.cs-mobile .cs-form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
html.cs-mobile .cs-panel { z-index: 320; }

/* 管理后台「在线客服」：左边会话列表，右边对话。手机端上下摞起来。 */
.cs-admin { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.cs-threads { display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow-y: auto; }
.cs-thread { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg2); cursor: pointer; }
.cs-thread:hover { border-color: var(--accent); }
.cs-thread.active { border-color: var(--accent); background: rgba(240,185,11,.1); }
.cs-thread-main { min-width: 0; flex: 1; }
.cs-thread-main b { display: block; font-size: 13.5px; }
.cs-thread-main span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-thread .tag { flex: none; }
/* 行尾的「彻底删除」：平时低调，指上去才变红 —— 列表里一眼能扫过，但不会误点。 */
.cs-thread-x { flex: none; border: 0; background: transparent; color: var(--muted); font-size: 13px; line-height: 1;
  padding: 4px 6px; border-radius: 8px; }
.cs-thread-x:hover { color: var(--red); background: rgba(255,80,80,.12); }
.cs-chat { display: flex; flex-direction: column; min-height: 420px; }
/* 没选中用户时不用留一整屏高的空框，居中那句提示照样看得见。 */
.cs-chat.idle { min-height: 240px; }
.cs-chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); max-height: 52vh; }
.cs-chat-foot { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.cs-chat-foot textarea { flex: 1; min-height: 46px; max-height: 120px; resize: none; padding: 11px 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 13.5px; }
.cs-chat-foot textarea:focus { outline: none; border-color: var(--accent); }
@media (max-width: 760px) {
  .cs-admin { grid-template-columns: 1fr; }
  .cs-threads { max-height: none; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .cs-thread { min-width: 220px; }
  .cs-chat-body { max-height: 46vh; }
  /* 没选中用户时不摆一个空对话框：手机屏就这么点大，收起来只留会话列表。 */
  .cs-chat.idle { display: none; }
}
/* 只藏「保存到桌面」那个引导弹层 —— 它和「更多」抽屉共用 .mob-sheet-bg 样式，
   早先按类名藏会把「更多」一起藏掉，导致桌面图标打开后底部「更多」永远点不开。 */
html.cs-standalone .mob-homescreen-sheet { display: none; }
html.cs-standalone .topbar { padding-top: 12px; }
