/* =========================================================================
   ICFChat 门户站点 · 共享设计系统 brand.css
   源自 icfchat-codex-brand-system.html（Codex Desktop 工作台视觉语言）
   令牌 + 组件 + 门户扩展 + 响应式
   ========================================================================= */

/* ---------- 设计 Token（源自品牌系统，原 hex） ---------- */
:root {
  color-scheme: dark;
  --bg: #111111;
  --sidebar: #2b2c2d;
  --surface: #1f1f1f;
  --surface-soft: #242424;
  --raised: #303030;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --text: #eeeeee;
  --muted: #b7b7b7;
  --soft: #7d7d7d;
  --blue: #9dccff;
  --green: #38d982;
  --red: #ff6868;
  --yellow: #febc2e;

  --radius-xs: 6px;
  --radius-sm: 11px;
  --radius-md: 17px;
  --radius-lg: 23px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  --dur-1: 80ms;
  --dur-2: 120ms;
  --dur-3: 180ms;
  --dur-4: 240ms;
  --dur-5: 400ms;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --content: 1120px;
  --content-narrow: 960px;

  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { border: 0; font: inherit; color: inherit; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid rgba(157, 204, 255, 0.65); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(157, 204, 255, 0.22); }

/* ---------- 图标 ---------- */
.svg-icon {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex: none;
}

/* ---------- 排版工具 ---------- */
.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.accent { color: var(--blue); font-weight: 680; }
.center { text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.04em;
  color: var(--soft);
  text-transform: uppercase;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; font-weight: 760; }
h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.06; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
h3 { font-size: 18px; line-height: 1.3; }
p { margin: 0; }

.lead {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
  max-width: 62ch;
}

.container { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 var(--space-6); }
.container.narrow { max-width: var(--content-narrow); }

.section { padding: var(--space-8) 0; }
.section.tight { padding: var(--space-7) 0; }
.section-head { max-width: 60ch; margin-bottom: var(--space-6); }
.section-head h2 { margin-top: var(--space-3); }

/* =========================================================================
   顶部导航条 topnav（门户适配：工作台用侧栏，门户公开/内页用顶导）
   ========================================================================= */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: 64px;
  padding: 0 var(--space-6);
  background: rgba(17, 17, 17, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-right: auto;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  object-fit: cover;
}
.brand strong { display: block; font-size: 16px; line-height: 1.1; color: var(--text); }
.brand span { color: var(--soft); font-size: 11px; font-weight: 650; }

.topnav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.topnav-links a {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.topnav-links a:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.topnav-links a.active { color: var(--text); }

.topnav-cta { display: flex; align-items: center; gap: 8px; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  align-items: center; justify-content: center;
}
.menu-toggle:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* =========================================================================
   按钮（无边框，源自品牌系统）
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  border-radius: var(--radius-md);
  background: var(--raised);
  color: var(--text);
  padding: 0 18px;
  font-weight: 700;
  font-size: 14px;
  transition: background var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { background: #3a3a3a; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active { transform: none; }
}

/* 加载 spinner（用于按钮内“确认中”等瞬时态；reduced-motion 下自动静止） */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.22);
  border-top-color: #1a1a1a;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.primary { background: var(--text); color: #1a1a1a; }
.btn.primary:hover { background: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.btn.danger { background: rgba(255, 104, 104, 0.14); color: var(--red); }
.btn.danger:hover { background: rgba(255, 104, 104, 0.22); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn.lg { min-height: 48px; padding: 0 24px; font-size: 15px; }
.btn.block { width: 100%; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  color: var(--muted);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.icon-btn:hover { background: var(--surface-soft); color: var(--text); }

/* =========================================================================
   卡片 / 表格 / chip / 输入 / 表单（源自品牌系统，保持一致）
   ========================================================================= */
.card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 20px;
}
.card h3 { margin-bottom: 8px; }
.card p, .card li { color: var(--muted); font-size: 14px; line-height: 1.6; }
.card ul { margin: 0; padding-left: 1.1em; }
.card.tight { padding: 16px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* chip 状态标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
}
.chip.ok { color: var(--green); background: rgba(56, 217, 130, 0.12); }
.chip.warn { color: var(--yellow); background: rgba(254, 188, 46, 0.12); }
.chip.bad { color: var(--red); background: rgba(255, 104, 104, 0.12); }
.chip.info { color: var(--blue); background: rgba(157, 204, 255, 0.12); }

/* 数据表 */
.ui-table {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.ui-tr {
  display: grid;
  align-items: center;
  min-height: 46px;
  border-top: 1px solid var(--border);
  padding: 0 14px;
  gap: 12px;
  color: var(--muted);
  font-size: 13.5px;
}
.ui-tr:first-child { border-top: 0; background: var(--surface-soft); color: var(--text); font-weight: 760; }
.ui-tr > * { min-width: 0; }
.ui-tr .num { font-variant-numeric: tabular-nums; }
.ui-tr .right { justify-self: end; text-align: right; }
.ui-tr .center { justify-self: center; text-align: center; }

/* 输入与选择 */
.ui-input, .ui-select, input.field, select.field {
  display: flex;
  align-items: center;
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 14px;
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color var(--dur-2) var(--ease-out);
}
.ui-input::placeholder, input.field::placeholder { color: var(--soft); }
.ui-input:focus, input.field:focus, select.field:focus {
  border-color: rgba(157, 204, 255, 0.6);
}
.ui-select {
  gap: 8px;
  border: 0;
  background: var(--raised);
  width: auto;
  min-width: 128px;
  min-height: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.ui-select:hover { background-color: #3a3a3a; }
.ui-select:focus-visible {
  outline: 2px solid rgba(157, 204, 255, 0.58);
  outline-offset: 2px;
}
input.ui-select[type="date"] {
  min-width: 150px;
  color-scheme: dark;
}
input.ui-select[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1) opacity(0.72);
}

/* 自定义下拉（替代原生 select：菜单深色品牌化） */
.dd { position: relative; display: inline-block; min-width: 132px; }
.dd .ui-select { width: 100%; }
.dd-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 80;
  min-width: max(100%, 156px); white-space: nowrap;
  background: #202020; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; box-shadow: 0 14px 34px rgba(0,0,0,0.5);
  padding: 6px; display: none;
}
.dd.open .dd-menu { display: block; }
.dd-item {
  display: grid; width: 100%; grid-template-columns: 18px 1fr; align-items: center; text-align: left;
  gap: 6px;
  background: transparent; border: 0; color: var(--muted);
  padding: 8px 12px; border-radius: var(--radius-sm);
  font: inherit; font-size: 13.5px; cursor: pointer;
}
.dd-item::before { content: ""; }
.dd-item[aria-selected="true"]::before { content: "✓"; color: var(--text); }
.dd-item:hover, .dd-item[aria-selected="true"] { background: var(--surface-soft); color: var(--text); }

/* 分销商链接专属内容（仅 is-referred 时显示） */
.reseller-only { display: none; }
body.is-referred .reseller-only { display: inline-flex; }
.role-reseller { display: none; }
body.is-reseller .role-reseller { display: revert; }

.field-wrap { position: relative; }
.field-wrap .toggle-eye {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  color: var(--soft);
}

/* 表单字段 */
.field { display: grid; gap: 7px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 700; }
.field .help { color: var(--soft); font-size: 12px; }
.field.error .ui-input,
.field.error input.field { border-color: rgba(255, 104, 104, 0.65); }
.field.error .help { color: var(--red); }
.field.ok .help { color: var(--green); }

/* 提示条 alert */
.alert-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.alert-line.success { background: rgba(56, 217, 130, 0.1); color: var(--text); }
.alert-line.warning { background: rgba(254, 188, 46, 0.1); color: var(--text); }
.alert-line.danger { background: rgba(255, 104, 104, 0.1); color: var(--text); }
.alert-line .svg-icon { flex: none; }

/* 指标卡 metric */
.metric {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px;
}
.metric .label { color: var(--soft); font-size: 12.5px; font-weight: 680; }
.metric .value {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.metric .sub { margin-top: 6px; display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 12px; }

/* 骨架屏 */
.skeleton {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface-soft), var(--raised), var(--surface-soft));
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

[hidden] { display: none !important; }

/* 空状态 */
.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  padding: 28px;
}
.empty-state .t { font-size: 16px; font-weight: 720; }
.empty-state .d { color: var(--muted); font-size: 13px; margin: 6px 0 14px; }

/* 认证窄面板 */
.auth-panel {
  max-width: 420px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(31, 31, 31, 0.55);
  padding: 28px;
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.code-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-box {
  display: grid; place-items: center;
  height: 50px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 20px; font-weight: 760;
}

/* =========================================================================
   门户扩展组件
   ========================================================================= */

/* 通用工具栏（列表页：标题 + 筛选 + 操作） */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.toolbar .t { font-size: 20px; font-weight: 760; }
.toolbar .d { color: var(--soft); font-size: 13px; margin-top: 2px; }
.filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 面包屑 / 页内导航 */
.crumb { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 13px; }
.crumb a:hover { color: var(--text); }
.crumb .sep { opacity: 0.5; }

/* 页脚 */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-7) 0;
  color: var(--soft);
  font-size: 13px;
}
.footer .row { display: flex; flex-wrap: wrap; gap: var(--space-7); justify-content: space-between; }
.footer h4 { color: var(--muted); font-size: 13px; margin-bottom: 12px; font-weight: 760; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: var(--text); }
.footer .legal { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--border); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
/* 中国网站合规备案区（ICP/公安/算法备案 + 举报） */
.footer-compliance { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 12.5px; }
.footer-compliance .fc-line { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.footer-compliance .fc-line a { color: var(--soft); }
.footer-compliance .fc-line a:hover { color: var(--text); }

/* =========================================================================
   账户内页骨架（顶部导航 + 左侧子导航 + 内容）
   ========================================================================= */
.acct {
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: var(--space-6);
  padding: var(--space-6) var(--space-6) var(--space-8);
}
.acct-side {
  position: sticky;
  top: 80px;
  align-self: start;
  display: grid;
  gap: 2px;
}
.acct-side .grp-label {
  color: var(--soft);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 12px 6px;
}
.acct-side a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-radius: var(--radius-md);
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.acct-side a:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.acct-side a.active { background: rgba(255,255,255,0.08); color: var(--text); }
.acct-side a .svg-icon { width: 17px; height: 17px; opacity: 0.85; }
.acct-main { min-width: 0; }

/* 移动端侧导航触发（账户页） */
.acct-side-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 0 14px;
  color: var(--text);
  font-weight: 680;
  margin-bottom: var(--space-4);
}

/* =========================================================================
   门户专用组件
   ========================================================================= */

/* Toast 通知 */
.toast {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 100;
  max-width: 320px;
  border-radius: var(--radius-md);
  background: var(--raised);
  color: var(--text);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---------- 落地 Hero ---------- */
.hero {
  padding: var(--space-8) 0 var(--space-7);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: min(88vh, 740px);
  display: flex;
  align-items: center;
}
.hero > .container { width: 100%; }
.hero::before {
  content: ""; position: absolute; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 45% at 75% 12%, rgba(157,204,255,0.22), transparent 70%),
    radial-gradient(46% 42% at 18% 60%, rgba(157,204,255,0.13), transparent 72%);
  animation: hero-glow 14s var(--ease-in-out) infinite alternate;
}
@keyframes hero-glow {
  0%   { transform: translate(-7%, -5%) scale(1); opacity: 0.8; }
  100% { transform: translate(8%, 6%) scale(1.2); opacity: 1; }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 62%);
  mask-image: linear-gradient(180deg, #000, transparent 62%);
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  color: var(--soft); display: inline-flex; gap: 6px; align-items: center;
  font-size: 12px; font-weight: 660; letter-spacing: .04em; text-transform: uppercase;
  opacity: 0.75; animation: od-cue 1.8s var(--ease-in-out) infinite;
}
.scroll-cue .svg-icon { width: 14px; height: 14px; }
@keyframes od-cue { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }

/* 滚动逐词使命揭示 */
.manifesto-section { padding: var(--space-8) 0; }
.manifesto {
  font-size: clamp(28px, 3.8vw, 48px); font-weight: 720; line-height: 1.28;
  letter-spacing: -0.02em; max-width: 22ch; margin: 0; color: var(--text);
}
.manifesto .w { color: var(--soft); transition: color 0.4s var(--ease-out); }
.manifesto .w.on { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .manifesto .w { color: var(--text); transition: none; }
  .scroll-cue { animation: none; }
  .hero::before { animation: none; }
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin-inline: auto;
  gap: var(--space-7);
  align-items: center;
  text-align: center;
}
.hero h1 {
  margin-top: var(--space-4);
  font-size: clamp(38px, 5.6vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.hero .lead { margin-top: var(--space-4); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: var(--space-6); }
.hero-stats { display: flex; gap: var(--space-6); margin-top: var(--space-6); flex-wrap: wrap; justify-content: center; }
.hero-stats .s .n { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.hero-stats .s .l { color: var(--soft); font-size: 12.5px; font-weight: 650; }

/* hero 右侧产品截图框 */
.hero-shot {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop), 0 30px 80px -24px rgba(157,204,255,0.22);
  overflow: hidden;
}
.hero-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 35% center; }
.hero-shot { aspect-ratio: 4 / 3; }
.wb-chip-row { display: flex; gap: 6px; margin-bottom: var(--space-3); }
.wb-dot { width: 11px; height: 11px; border-radius: 999px; background: var(--raised); }
.wb-side {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--sidebar), #262728);
  padding: 12px 10px;
  display: grid; gap: 4px;
}
.wb-row {
  display: flex; align-items: center; gap: 8px;
  min-height: 30px; border-radius: var(--radius-sm);
  padding: 0 8px; color: var(--muted); font-size: 12px; font-weight: 650;
}
.wb-row.active { background: rgba(255,255,255,0.08); color: var(--text); }
.wb-grid { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px; }
.wb-pane { display: grid; gap: 10px; align-content: start; }
.wb-bubble {
  justify-self: end; max-width: 75%;
  background: var(--surface-soft); border-radius: var(--radius-md);
  padding: 8px 12px; font-size: 13px; font-weight: 620;
}
.wb-reply {
  color: var(--muted); font-size: 13px; line-height: 1.5;
}
.wb-reply strong { color: var(--text); font-weight: 720; }

/* ---------- 功能栅格（首页） ---------- */
.feature { display: grid; gap: 8px; }
.feature .ico {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--blue);
  margin-bottom: 4px;
}
.feature .ico .svg-icon { width: 20px; height: 20px; }
.feature h3 { font-size: 16px; }
.feature p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* ---------- 步骤带 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--space-4); counter-reset: step; }
.step { position: relative; padding-top: 6px; }
.step .n {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--raised); color: var(--text);
  font-size: 13px; font-weight: 780; margin-bottom: 10px;
}
.step h3 { font-size: 15px; }
.step p { color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 4px; }

/* ---------- 余额大数卡 ---------- */
.balance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-5);
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: var(--space-6);
}
.balance-hero .big {
  font-size: clamp(40px, 6vw, 58px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* 老虎机滚动数字：每位数字一条竖直轨道，加载时滚到目标位 */
.slot { display: inline-flex; align-items: baseline; }
.slot-reel {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  vertical-align: top;
  line-height: 1;
}
.slot-strip {
  display: block;
  line-height: 1;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.slot-strip .slot-d { display: block; height: 1em; line-height: 1; }
.slot-sep { display: inline-block; line-height: 1; }
.balance-hero .unit { color: var(--soft); font-size: 15px; font-weight: 680; margin-left: 6px; }
.balance-hero .actions { display: flex; flex-direction: column; gap: 10px; }

/* 迷你趋势条 */
.minibars { display: flex; align-items: flex-end; gap: 5px; height: 56px; margin-top: 14px; }
.minibars .b {
  flex: 1; border-radius: 4px 4px 0 0;
  background: var(--raised);
  min-height: 4px;
}
.minibars .b.peak { background: var(--blue); }

/* ---------- 用量柱状图 ---------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  padding: var(--space-3) 0 0;
}
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.chart .bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #3a3a3a, var(--raised));
  min-height: 4px;
  transition: filter var(--dur-2) var(--ease-out);
}
.chart .bar:hover { filter: brightness(1.25); }
.chart .bar.has-value { background: linear-gradient(180deg, rgba(157,204,255,0.72), rgba(157,204,255,0.22)); }
.chart .bar.hi { background: linear-gradient(180deg, var(--blue), rgba(157,204,255,0.45)); }
/* 悬停数值气泡 */
.chart .bar[data-tip] { position: relative; cursor: help; }
.chart .bar[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text);
  color: var(--bg);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 20;
}
.chart .bar[data-tip]:hover::after,
.chart .bar[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.chart .x { color: var(--soft); font-size: 11px; font-weight: 650; }

/* 环形进度（用量占比）—— SVG 描边 + 圆头端点，进入视口时从 0 扫到目标 */
.donut {
  width: 96px; height: 96px;
  display: grid; place-items: center;
  position: relative;
}
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .track { fill: none; stroke: var(--raised); stroke-width: 3.5; }
.donut .bar {
  fill: none; stroke: var(--blue); stroke-width: 3.5; stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.donut .pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.donut.is-anim .bar { animation: donut-draw 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes donut-draw { from { stroke-dashoffset: 100; } }
@media (prefers-reduced-motion: reduce) {
  .donut .bar { animation: none; transition: none; }
}

/* ---------- 套餐对比表 ---------- */
.plan-table { border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; }
.plan-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
}
.plan-row.head { background: var(--surface-soft); color: var(--text); font-weight: 760; }
.plan-cell { min-width: 0; padding: 14px 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.plan-cell.feat { color: var(--text); font-weight: 650; }
.plan-row.head .plan-cell { border-top: 0; color: var(--text); }
/* 数据行 hover 高亮（不含表头）：转化区与全站表格的查看反馈 */
.plan-row:not(.head) { transition: background var(--dur-1) var(--ease-out); }
.plan-row:not(.head):hover { background: var(--surface-soft); }
.plan-cell .price { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.plan-cell .per { color: var(--soft); font-size: 12px; }

/* ---------- 套餐卡片（模块化：auto-fit 网格，任意数量自动排列） ---------- */
.plan-cards {
  display: grid;
  /* 增减套餐都能自适应重排：每张卡最小 252px，剩余空间均分 */
  grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.plan-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 22px;
  transition: border-color var(--dur-3) var(--ease-out), background var(--dur-3) var(--ease-out);
}
.plan-card:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.plan-card .tag {
  position: absolute; top: 14px; right: 14px;
}
.plan-card .name { font-size: 17px; font-weight: 760; }
.plan-card .price {
  display: flex; align-items: baseline; gap: 4px;
  margin-top: 6px;
  font-size: 36px; font-weight: 800; line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.plan-card .price .cur { font-size: 18px; font-weight: 700; color: var(--muted); }
.plan-card .price .per { font-size: 13px; font-weight: 600; color: var(--soft); margin-left: 4px; }
.plan-card .divider { height: 1px; background: var(--border); margin: 2px 0; }
.plan-card .credit { display: flex; align-items: baseline; gap: 8px; }
.plan-card .credit .n { font-size: 24px; font-weight: 780; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.plan-card .credit .l { color: var(--soft); font-size: 12.5px; font-weight: 650; }
.plan-card .split { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.plan-card .split .b { color: var(--soft); font-size: 11.5px; line-height: 1.3; }
.plan-card .split .b strong { display: block; color: var(--text); font-size: 14px; font-weight: 720; font-variant-numeric: tabular-nums; margin-top: 2px; }
.plan-card .split .b.bonus strong { color: var(--green); }
.plan-card .cta { margin-top: auto; }

/* featured：克制高亮（淡蓝描边 + 微蓝调底），不做喧闹营销卡 */
.plan-card.featured {
  border-color: rgba(157, 204, 255, 0.5);
  background: linear-gradient(180deg, rgba(157, 204, 255, 0.06), var(--surface) 60%);
}
.plan-card.featured:hover { background: linear-gradient(180deg, rgba(157, 204, 255, 0.09), var(--surface-soft) 60%); }

/* ---------- 下载平台选择器 ---------- */
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.platform {
  display: grid; gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px;
  text-align: left;
  transition: border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}
.platform:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.platform.active { border-color: rgba(157,204,255,0.55); background: var(--surface-soft); }
.platform .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); background: #161616; color: var(--text); }
.platform .pname { font-size: 16px; font-weight: 760; }
.platform .v { color: var(--soft); font-size: 12.5px; }

/* ---------- 邀请链接行 ---------- */
.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px 14px;
}
.link-url {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-family: var(--font-mono); font-size: 13px;
}

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: var(--space-5); }
.pager button {
  min-width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface); color: var(--muted);
  font-size: 13px; font-weight: 680;
}
.pager button:hover { background: var(--surface-soft); color: var(--text); }
.pager button.active { background: var(--text); color: #1a1a1a; }
.pager button[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- 支付弹窗 / 二维码 / 渠道 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-3) var(--ease-out);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-card {
  width: 100%; max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transform: translateY(12px) scale(0.98);
  transition: transform var(--dur-3) var(--ease-out);
}
.modal-backdrop.open .modal-card { transform: translateY(0) scale(1); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head .t { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 760; }
.modal-body { padding: 20px; display: grid; gap: 16px; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-soft);
}

/* 套餐详情行 */
.pay-rows { display: grid; gap: 9px; }
.pay-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; }
.pay-row .k { color: var(--soft); }
.pay-row .v { color: var(--text); font-weight: 650; }
.pay-row.total { padding-top: 10px; border-top: 1px solid var(--border); }
.pay-row.total .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pay-row.total .v .cur { font-size: 14px; color: var(--muted); margin-right: 2px; }

/* 二维码（白底，本地 SVG 渲染，无外部请求） */
.qr-wrap {
  display: grid; place-items: center; gap: 10px;
  padding: 18px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: #ffffff;
}
.qr-img { width: 184px; height: 184px; color: #111111; }
.qr-caption { color: #555; font-size: 12.5px; }
.qr-countdown { color: var(--soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.qr-expired { color: var(--red); font-size: 12.5px; font-weight: 680; }

/* 支付渠道 */
.pay-channels { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-channel {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); font-size: 13px; font-weight: 650; color: var(--muted);
}
.pay-channel.active { border-color: rgba(7, 193, 96, 0.55); background: rgba(7, 193, 96, 0.1); color: var(--text); }
.pay-channel.disabled { opacity: 0.4; cursor: not-allowed; }
.wechat-mark { width: 16px; height: 16px; border-radius: 4px; background: #07c160; flex: none; display: grid; place-items: center; color: #fff; }
.wechat-mark svg { width: 11px; height: 11px; }

/* =========================================================================
   动效系统 — 克制工作台人格
   全部置于 prefers-reduced-motion: no-preference 内：减少动效时完全不应用，
   内容默认可见；reveal 初始隐藏仅在有 .js（app.js 注入）时生效，无 JS 不藏。
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  /* Hero 分阶入场（纯 CSS，无需 JS） */
  [data-hero] > * { animation: od-hero-in 0.6s var(--ease-out) both; }
  [data-hero] > *:nth-child(2) { animation-delay: 0.09s; }
  [data-hero] > *:nth-child(3) { animation-delay: 0.18s; }
  [data-hero] > *:nth-child(4) { animation-delay: 0.27s; }
  [data-hero] > *:nth-child(5) { animation-delay: 0.36s; }
  .hero-grid > .hero-shot { animation: od-hero-in 0.7s var(--ease-out) 0.2s both; }
  @keyframes od-hero-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }

  /* 滚动揭示：.js 由 app.js 注入，确保脚本缺失时内容不被隐藏 */
  .js [data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* 工作台“正在生成”状态脉冲（品牌允许的循环类型：状态脉冲，非纯动效信号） */
  .wb-typing { display: inline-flex; gap: 4px; align-items: center; }
  .wb-typing i { width: 5px; height: 5px; border-radius: 999px; background: var(--soft); animation: od-dot 1.2s var(--ease-in-out) infinite; }
  .wb-typing i:nth-child(2) { animation-delay: 0.15s; }
  .wb-typing i:nth-child(3) { animation-delay: 0.3s; }
  @keyframes od-dot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-2px); }
  }

  /* 每日柱状图：滚动到视口时从底部生长（stagger，仅 transform；hover filter 保留） */
  .js [data-reveal] .chart .bar { transform-origin: bottom; transform: scaleY(0); transition: transform 0.55s var(--ease-out), filter var(--dur-2) var(--ease-out); }
  .js [data-reveal].is-in .chart .bar { transform: scaleY(1); }
  .js [data-reveal].is-in .chart .bar-wrap:nth-child(1) .bar { transition-delay: 0.05s; }
  .js [data-reveal].is-in .chart .bar-wrap:nth-child(2) .bar { transition-delay: 0.11s; }
  .js [data-reveal].is-in .chart .bar-wrap:nth-child(3) .bar { transition-delay: 0.17s; }
  .js [data-reveal].is-in .chart .bar-wrap:nth-child(4) .bar { transition-delay: 0.23s; }
  .js [data-reveal].is-in .chart .bar-wrap:nth-child(5) .bar { transition-delay: 0.29s; }
  .js [data-reveal].is-in .chart .bar-wrap:nth-child(6) .bar { transition-delay: 0.35s; }
  .js [data-reveal].is-in .chart .bar-wrap:nth-child(7) .bar { transition-delay: 0.41s; }
}

/* =========================================================================
   响应式
   ========================================================================= */
@media (max-width: 1050px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acct { grid-template-columns: 1fr; }
  .acct-side {
    position: static;
    display: none;
    grid-template-columns: 1fr;
  }
  .acct-side.open { display: grid; }
  .acct-side-toggle { display: flex; }
}
@media (max-width: 760px) {
  .topnav { padding-inline: var(--space-4); }
  .topnav-inner { gap: var(--space-4); }
  .topnav-links { display: none; }
  .topnav-links.open {
    display: grid;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(17,17,17,0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 2px;
  }
  .topnav-links.open a { padding: 12px; }
  .menu-toggle { display: inline-grid; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-grid, .balance-hero, .wb-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .platforms { grid-template-columns: 1fr; }
  /* !important 盖过各页 .plan-table.orders/.reseller-table 的高特异性列模板，保证窄屏单列 */
  .plan-row { grid-template-columns: 1fr !important; }
  .plan-row.head { display: none; }
  .plan-cell { border-top: 1px solid var(--border); }
  .plan-cell[data-h]::before { content: attr(data-h) "："; color: var(--soft); font-size: 11px; display: block; margin-bottom: 2px; }
  [data-od-id="pricing-preview"] .plan-table {
    display: grid;
    gap: 12px;
    border: 0;
    overflow: visible;
  }
  [data-od-id="pricing-preview"] .plan-row:not(.head) {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px 16px;
    padding: 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
  }
  [data-od-id="pricing-preview"] .plan-row:not(.head) .plan-cell {
    grid-column: 1;
    padding: 0;
    border-top: 0;
  }
  [data-od-id="pricing-preview"] .plan-cell[data-h="积分包"]::before,
  [data-od-id="pricing-preview"] .plan-cell[data-h="操作"]::before { display: none; }
  [data-od-id="pricing-preview"] .plan-row:not(.head) .plan-cell[data-h="操作"] {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    justify-self: end;
  }
  .plan-row .plan-cell:first-child { border-top: 0; }
  .link-row { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-4); }
  .acct { padding: var(--space-4); }
  .section { padding: var(--space-7) 0; }
  .ui-tr { grid-template-columns: 1fr !important; padding: 12px 14px; gap: 4px; }
  .ui-tr > * { justify-self: start !important; text-align: left !important; }
  .ui-tr > [data-h] {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .ui-tr > [data-h]::before {
    content: attr(data-h) "：";
    flex: 0 0 auto;
    color: var(--soft);
    font-size: 11px;
  }
  .ui-tr:first-child { display: none; }
}
@media (max-width: 360px) {
  .topnav .brand span { display: none; }
}
@media (max-width: 420px) {
  .code-inputs { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
