/* @tokens:start —— 由 tools/scripts/gen-tokens.mjs 生成，勿手改 */
/* 由 tools/scripts/gen-tokens.mjs 从 packages/tokens 生成，请勿手改 */
:root {
  --pink: #ff6b81;
  --pink-light: #ff8fa3;
  --pink-soft: #ff9db0;
  --purple: #6c5ce7;
  --purple-dark: #5a4bd1;
  --purple-light: #8b7cf0;
  --bg: #0f0e17;
  --bg-deep: #14141c;
  --bg-card: #1a1928;
  --bg-elevated: #242338;
  --text: #f5f5f7;
  --text-bright: #e8e8f0;
  --text-soft: #c8c8d8;
  --text-softer: #d8d8e2;
  --text-muted: #a0a0b0;
  --text-dim: #9a9ab0;
  --text-faint: #707080;
  --success-soft: #5ad07a;
  --success-bright: #7bed9f;
  --warning: #ffd479;
  --danger-soft: #ff8a8a;
  --bg-sunken: #1c1c28;
  --bg-raised: #2a2940;
  --bg-card-alt: #1a1925;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --gradient: linear-gradient(135deg, #ff6b81 0%, #6c5ce7 100%);
  --shadow: 0 8px 32px rgba(108, 92, 231, 0.25);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
/* @tokens:end */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--pink-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--pink);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 107, 129, 0.15);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1.33rem;
  color: var(--text);
  font-weight: 700;
  font-size: 2.05rem;
}

.logo:hover {
  color: var(--text);
}

[data-logo] {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.logo-icon {
  width: 85px;
  height: 85px;
  flex-shrink: 0;
  display: block;
  overflow: visible;
}

.logo-ring {
  transition: stroke-width 0.35s ease, opacity 0.35s;
}

.logo-wen {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: 32px 31px;
}

.logo-q-tail {
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: 32px 51px;
}

.logo:hover .logo-ring {
  stroke-width: 2.8;
}

.logo:hover .logo-wen {
  transform: scale(1.04);
}

.logo:hover .logo-q-tail {
  transform: translate(0.5px, 0.5px);
}

.logo-wen-dot {
  transition: transform 0.45s ease;
  transform-origin: 37px 19.5px;
}

.logo:hover .logo-wen-dot {
  transform: translate(0.5px, -1px);
}

.footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
  max-width: 1200px;
  margin: 0 auto 0.75rem;
  padding: 0 0.25rem;
}

.footer-line > span {
  flex: 0 1 auto;
  text-align: left;
}

.footer-icp {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}

.footer-icp:hover {
  color: var(--pink-light);
}

/*
 * logo 文案：两行必须上下对齐（左对齐、竖排）。
 * 原来只给子元素写了 display:block，靠"块级自动换行"来实现换行 —— 在不同宽度/父级 flex 上下文里
 * 容易表现不一致（业务方反馈"要上下并排对齐"）。这里显式声明为竖排 flex，
 * 不再依赖隐式行为。**不动任何字号**（主标题沿用原样式，副标题仍是 .logo-text span 的 1.24rem）。
 */
.logo-text {
  display: flex;
  flex-direction: column;
  /*
   * 业务方要求：两行上下排列，且**短的那行（Q问）居中在长的那行（问出爱情真谛）上方**。
   * 即两行的水平中线对齐（不是左对齐）。
   * 之前是 flex-start（左对齐），所以短行贴在左边 —— 与要求不符，已改为中心对齐。
   */
  align-items: center;
  text-align: center;
  justify-content: center;
  line-height: 1.15;
}

/*
 * 「Q问」两字之间留一个字宽。
 *
 * 关键：负 margin 必须加在**标题这一个元素自己身上**，用来抵消 letter-spacing 在末字之后
 * 多补的那一份间距 —— 这样在 align-items:center 之下，两字才是相对副标题真正居中。
 * v1 曾把它加在外层 .logo-text 上，结果是标题与副标题整块被推偏 1em（业务方一眼看出没居中）。
 */
.logo-title {
  /*
   * 业务方最终确认的间距：Q 与 问 **各从两边向中间缩进半个字符**，两字之间**一个字符之隔**。
   * 即 letter-spacing: 1em；末字之后多出的那 1em 用 margin-right 抵消，
   * 这样在 align-items:center 之下才是相对副标题真正居中。
   * 这里**不设 color / font-size** —— 标题沿用页头原本的颜色与字号。
   */
  letter-spacing: 1em;
  margin-right: -1em;
}

/* 副标题：小字号、灰色，保持不受标题字间距影响 */
.logo-sub {
  display: block;
  font-size: 1.24rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/*
 * 已删除旧规则 `.logo-text span { color: var(--text-muted); font-size: 1.24rem }`。
 * 它原本只面向副标题，但标题改成 `<span class="logo-title">` 后**同被命中** ——
 * 表现为"Q问 颜色变了、字号也变小了"（2026-09-18 业务方反馈）。
 * 现在改为按 class 精确指定：.logo-title（继承原样式）/ .logo-sub（副标题样式）。
 */

.nav-main {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

/* ── 统一导航样式：所有栏目**同宽、同形、同一种控件** ─────────────────────
 * 2026-10-11 业务方反馈：「Q问 / 转盘配对 / 避坑大全 / 配对报告 / 我的缘值 / 我的账户
 * 在页面里的宽度都不一致」。根因三处，全在这里修掉：
 *   ① 宽度随文字长度变化（「Q问」两字 vs 「转盘配对」四字）→ 用 min-width 统一；
 *   ② 账户入口自己加了 1px 边框，比其余项各多 2px → 所有项都留**透明边框位**，
 *      账户入口只把边框**染色**，几何完全不变；
 *   ③ 静态时无底色、只有 hover/active 才有，视觉上像"两种控件" → 统一底色，
 *      当前页与账户入口**只改配色，绝不改几何**。
 * 结果：宽度天然一致，且不随字体/文案长度变化。
 */
.nav-main a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 固定宽度：**不依赖文字长度、不依赖 em 换算**，六项一律同宽。
     2026-10-11：先用 min-width: 5.8em（em 相对自身 font-size），业务方反馈"还是不一致"，
     改为 rem 固定宽度 —— 无论字体设置、浏览器缩放、文案长短，宽度都完全一致。 */
  /* 宽度三重锁定 + flex 基准锁定：不伸缩、不被内容撑开、不被容器压缩。
     即 flex 布局里 `flex: 0 0 6.2rem` = 不放大、不缩小、基准固定 6.2rem，
     这是 CSS 层面能做到的最强保证（比只写 width/min-width 更硬）。 */
  /* 三重锁定 + flex 基准锁定 + `!important`。
     `!important` 是刻意的：这条规则只在"六项等宽"这一件事上生效，不影响任何其它样式，
     而此前已有多轮"改了但界面没变"的情况（外部样式表与浏览器缓存打架）。
     加上 !important 后，即使浏览器手里是旧的 JS（内联样式没施加），宽度也照样一致。 */
  flex: 0 0 6.2rem !important;
  width: 6.2rem !important;
  min-width: 6.2rem !important;
  max-width: 6.2rem !important;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--text);
  background: rgba(108, 92, 231, 0.2);
  border-color: rgba(108, 92, 231, 0.45);
}

/* 账户入口（出）与功能导航（进）视觉分离：
   功能导航回答"去哪"，账户入口回答"我是谁 / 登录登出"。
   混在一起会让人以为「微信用户」是第六个功能栏目（2026-09-16 业务方反馈）。 */
.nav-main a.nav-account {
  margin-left: 0.45rem;
  border-color: rgba(108, 92, 231, 0.45);   /* 只染色，不改几何（尺寸与其它栏目一致） */
  color: var(--text);
  font-weight: 600;
}
.nav-main a.nav-account:hover,
.nav-main a.nav-account.active {
  border-color: var(--purple);
  background: rgba(108, 92, 231, 0.28);
}

/* 账户页顶部的登录状态条：明确写出「登没登、会员开没开」。
   起因（2026-09-16 业务方反馈）：登录状态靠面板显隐暗示，用户看不出自己到底登没登上、
   刚扫码有没有成功，也说不出"退出登录在哪"。 */
.account-status {
  max-width: 720px;
  margin: 0 auto 1.25rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(108, 92, 231, 0.35);
  background: rgba(108, 92, 231, 0.12);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}
.account-status.is-guest {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}
.account-status.is-member {
  border-color: rgba(7, 193, 96, 0.5);
  background: rgba(7, 193, 96, 0.14);
}
.account-status.is-warn {
  border-color: rgba(255, 176, 32, 0.55);
  background: rgba(255, 176, 32, 0.14);
}

/* 诊断信息块（微信回调用它显示失败的完整上下文，方便用户直接复制发客服） */
.code-block {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin: 0.6rem 0;
  color: #d8d8e2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 微信扫码登录弹窗：把官方二维码内嵌进来，避免跳到整页二维码 */
.wx-login-box {
  max-width: 360px;
  text-align: center;
}
.wx-login-frame {
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  margin: 0.6rem 0;
  overflow: hidden;
}
.wx-login-frame iframe {
  border: 0;
}

/* 缘值充值：金额快捷档 + 渠道切换 + 收款码 */
.topup-presets,
.topup-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.topup-presets .btn,
.topup-channels .btn {
  flex: 0 1 auto;
  min-width: 4.5rem;
}
.topup-channels .btn.active {
  border-color: var(--pink, #ff6b81);
  color: var(--pink-light, #ff9db0);
}
.topup-qr {
  background: #fff;
  border-radius: 12px;
  padding: 0.5rem;
  margin: 0.6rem 0;
  max-width: 260px;
}
.topup-qr img {
  width: 100%;
  height: auto;
  display: block;
}

/* 找回密码：验证码输入框 + 获取验证码按钮同一行 */
.code-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.code-row input {
  flex: 1 1 auto;
  min-width: 0;
}
.code-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 注销账号：破坏性操作区，与普通账户卡片在视觉上拉开距离 */
.account-panel.danger-zone {
  border-color: rgba(255, 92, 92, 0.45);
  background: rgba(255, 92, 92, 0.06);
}
.account-panel.danger-zone h3 {
  color: #ff7b7b;
}
.btn.btn-danger {
  border-color: rgba(255, 92, 92, 0.7) !important;
  color: #ff8080 !important;
}
.btn.btn-danger:hover,
.btn.btn-danger:focus-visible {
  background: rgba(255, 92, 92, 0.18) !important;
  color: #fff !important;
}

.user-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-elevated);
  border-radius: 999px;
}

.stat-badge strong {
  color: var(--pink);
}

/* Hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-head {
  width: 100%;
}

.hero-columns {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  align-items: stretch;
  /* 与右侧双卡同高；左栏含输入区，不宜再压到 95px */
  min-height: 240px;
}

@media (max-width: 900px) {
  .hero-columns {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

.hero-tagline {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 1.05rem;
}

/* Chat panel：上半消息、下半输入（输入区顶边在整框 50% 处） */
.chat-panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(108, 92, 231, 0.3);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr 1fr;
  min-height: 0;
  height: 100%;
  align-self: stretch;
}

.chat-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}

.msg {
  max-width: 90%;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  font-size: 0.82rem;
  white-space: pre-wrap;
}

.msg-user {
  align-self: flex-end;
  background: var(--gradient);
  color: #fff;
}

.msg-ai {
  align-self: flex-start;
  background: var(--bg-elevated);
  border-left: 3px solid var(--purple);
}

.msg-welcome {
  color: var(--text-muted);
  text-align: center;
  align-self: center;
  max-width: 100%;
  background: transparent;
  border: none;
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.35rem 0.5rem;
}

.chat-input-area {
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-rows: auto 1fr;
}

.chat-input-main {
  flex-shrink: 0;
  padding: 0.45rem 0.45rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-input-notes {
  min-height: 0;
  overflow-y: auto;
  padding: 0.25rem 0.45rem 0.45rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.hero-columns .pioneer-note,
.hero-columns .privacy-note {
  font-size: 0.68rem;
  line-height: 1.3;
  margin: 0;
}

.hero-columns .quota-note {
  font-size: 0.7rem;
  line-height: 1.35;
  margin: 0;
}

.chat-input-main textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.5rem;
  border: 1px solid rgba(108, 92, 231, 0.4);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  resize: none;
}

.chat-input-main textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.2);
}

.chat-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hero-columns .btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn {
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 129, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}

.btn-secondary:hover {
  background: rgba(108, 92, 231, 0.15);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.voice-active {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px rgba(255, 107, 129, 0.35);
}

.privacy-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Sidebar hot list */
.sidebar-panel {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0.5rem;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero-columns {
    min-height: 0;
  }

  .sidebar-panel {
    min-height: 0;
    max-height: none;
    grid-template-rows: auto auto;
  }

  .chat-panel {
    max-height: none;
  }

  .hero-columns .pioneer-note,
  .hero-columns .privacy-note {
    display: block;
  }
}

.hot-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.5rem;
  border: 1px solid rgba(255, 107, 129, 0.2);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.hot-card h3 {
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 107, 129, 0.15);
  color: var(--pink-light);
  flex-shrink: 0;
}

.hot-list {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.hot-list li {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.15rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-radius: 8px;
}

.hot-list li:hover {
  color: var(--pink);
  background: rgba(108, 92, 231, 0.08);
}

.hot-list li:last-child {
  border-bottom: none;
}

.hot-text {
  display: block;
  line-height: 1.25;
}

.hot-meta {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

/* Features */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(108, 92, 231, 0.2);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

a.feature-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.feature-card-link:hover,
a.feature-card-link:focus-visible {
  color: inherit;
  transform: translateY(-4px);
  border-color: var(--pink);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.22);
  outline: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--pink);
}

.feature-card h4 {
  color: var(--pink-light);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Success wall */
.success-wall {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.story-card {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--purple);
}

.story-card-clickable {
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.story-card-clickable:hover,
.story-card-clickable:focus-visible {
  border-left-color: var(--pink);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.2);
  outline: none;
}

.story-card-hint {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: var(--pink-light);
  opacity: 0.85;
}

.story-card .tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 107, 129, 0.2);
  border-radius: 4px;
  color: var(--pink);
  margin-bottom: 0.5rem;
}

.story-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Pitfalls page */
.page-hero {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.page-hero h1 {
  font-size: 2rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.filters {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(108, 92, 231, 0.4);
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.85rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

.pitfall-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  columns: 1;
  column-gap: 1.25rem;
}

@media (min-width: 600px) {
  .pitfall-grid {
    columns: 2;
  }
}

@media (min-width: 900px) {
  .pitfall-grid {
    columns: 3;
  }
}

.pitfall-card {
  break-inside: avoid;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 107, 129, 0.15);
  transition: border-color 0.2s;
}

.pitfall-card:hover {
  border-color: var(--purple);
}

.pitfall-card .category {
  font-size: 0.7rem;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pitfall-card h3 {
  font-size: 1.05rem;
  margin: 0.5rem 0;
}

.pitfall-card .lesson {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pitfall-card .steps {
  background: var(--bg-elevated);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.pitfall-card .steps strong {
  color: var(--pink);
}

.pitfall-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cost-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 107, 129, 0.15);
  color: var(--pink);
}

.btn-save-card {
  margin-top: 0.5rem;
  width: 100%;
  font-size: 0.8rem;
  padding: 0.5rem;
}

/* Profile page */
.profile-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(108, 92, 231, 0.3);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
  margin: 1.5rem 0;
}

.profile-stat {
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: 12px;
}

.profile-stat .value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.fate-card-preview {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--gradient);
  border-radius: var(--radius);
  color: #fff;
  text-align: center;
}

.fate-card-preview h4 {
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a {
  margin: 0 0.5rem;
}

/* Loading */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--purple);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-elevated);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--purple);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 200;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.filters-cat {
  margin-top: -0.5rem;
}

.submit-lesson-bar {
  text-align: center;
  padding: 0 1.5rem 1rem;
}

.search-input {
  width: min(100%, 320px);
  padding: 0.55rem 1rem;
  border: 1px solid rgba(108, 92, 231, 0.45);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--pink);
}

.media-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.media-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(108, 92, 231, 0.4);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

.media-btn:hover {
  border-color: var(--pink);
  color: var(--pink-light);
}

.quiz-box {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: 8px;
  font-size: 0.85rem;
}

.quiz-box strong {
  color: var(--purple);
}

.quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.quiz-opt {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(255, 107, 129, 0.3);
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
}

.quiz-opt:hover {
  background: rgba(108, 92, 231, 0.15);
}

.quiz-done {
  font-size: 0.8rem;
  color: var(--pink);
  margin: 0.5rem 0;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.card-actions .btn {
  flex: 1;
  min-width: 8rem;
  font-size: 0.8rem;
}

.empty-hint {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  column-span: all;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(108, 92, 231, 0.4);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
}

.modal-box h3 {
  margin-bottom: 0.5rem;
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.modal-box label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.modal-box input,
.modal-box textarea,
.text-input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem;
  border: 1px solid rgba(108, 92, 231, 0.4);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.quota-note {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--pink-light);
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.pioneer-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.pioneer-note a {
  color: var(--pink-light);
}

.fate-match-box {
  background: var(--bg-elevated);
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.fate-type-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pink-light);
  margin-bottom: 0.35rem;
}

.fate-pits-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.fate-match-box ul {
  margin-left: 1.2rem;
  color: var(--text-muted);
}

.unlock-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.unlock-item {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.unlock-item.unlocked {
  border-color: var(--purple);
}

.unlock-need {
  font-size: 0.7rem;
  color: var(--purple);
}

.unlock-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.7rem;
  color: var(--pink);
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.q-yuan-panel {
  margin-top: 1rem;
}

.q-yuan-panel .text-input {
  width: 100%;
}

.msg-pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
  font-size: 0.95rem;
}

.msg-actions {
  margin-top: 0.65rem;
}

.msg-actions .btn-adopt {
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
}

.topics-wrap {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.topic-card {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(108, 92, 231, 0.25);
}

.topic-card.locked {
  opacity: 0.65;
}

.topic-card h4 {
  color: var(--pink-light);
  margin-bottom: 0.5rem;
}

.topic-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.topic-meta {
  font-size: 0.75rem;
  color: var(--purple);
  display: block;
  margin-bottom: 0.75rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem 0;
}

.plan-card {
  padding: 0.75rem 0.5rem;
  border: 2px solid rgba(108, 92, 231, 0.35);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.plan-card strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 0.25rem;
  color: var(--pink-light);
}

.plan-card.plan-selected {
  border-color: var(--purple);
  background: rgba(108, 92, 231, 0.15);
}

.plan-price-hint {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.bank-dl {
  font-size: 0.82rem;
  margin: 0.75rem 0;
}

.bank-dl dt {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.bank-dl dd {
  margin: 0.2rem 0 0;
  word-break: break-all;
}

.bank-dl code {
  font-size: 0.8rem;
}

.btn-copy {
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  border-radius: 6px;
  border: 1px solid rgba(108, 92, 231, 0.5);
  background: transparent;
  color: var(--pink-light);
  cursor: pointer;
}

.client-id-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.subscribe-modal-box {
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.pay-section {
  margin: 0.75rem 0 0.5rem;
}

.pay-section-title {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  color: var(--pink-light);
}

.pay-section-hint {
  margin-bottom: 0.65rem;
}

.pay-online-section {
  margin: 0.75rem 0 0.25rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 129, 0.35);
  background: rgba(255, 107, 129, 0.08);
}

.btn-wechat-online {
  width: 100%;
}

.pay-online-hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
}

.pay-qr-viewer-order {
  font-size: 0.75rem;
  word-break: break-all;
}

.pay-qr-viewer-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--pink-light);
  margin: 0.35rem 0 0;
}

.pay-qr-viewer-status.is-paid {
  color: #7bed9f;
}

.pay-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.pay-qr-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 2px solid rgba(108, 92, 231, 0.25);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s, transform 0.15s;
}

.pay-qr-card:hover,
.pay-qr-card:focus-visible {
  border-color: var(--purple);
  transform: translateY(-2px);
  outline: none;
}

.pay-qr-card img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
}

/* 聚合码的原始比例（531×785 ≈ 0.676）比 3/4 更细长，用 cover 会裁掉底部约 10%。
   收款码被裁可能直接扫不出来，所以这一类改用 contain 完整显示、白底留边。 */
.pay-qr-card.fit-contain img {
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.pay-qr-label {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  padding: 0.4rem 0.25rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  line-height: 1.3;
}

.pay-bank-details {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.5rem;
}

.pay-bank-summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--pink-light);
  margin-bottom: 0.5rem;
  user-select: none;
}

.pay-bank-summary::-webkit-details-marker {
  color: var(--purple);
}

/*
 * 收款码查看器必须**盖在普通弹窗之上**。
 * 原来这里是 120，而 `.modal` 是 300 —— 于是从「办理会员」弹窗里点「微信在线支付」后，
 * 二维码被会员弹窗整个盖住，用户永远看不到（2026-09-18 业务方反馈"码藏在界面后面"）。
 * 350 的取值：高于 .modal(300)，低于 .toast(400)，保证提示仍在最上层。
 */
.pay-qr-viewer {
  z-index: 350;
}

.pay-qr-viewer-box {
  max-width: 360px;
  text-align: center;
  /* 内容（订单信息 + 二维码 + 提示 + 按钮）在小屏上会超出视口，允许自身滚动 */
  max-height: 92vh;
  overflow-y: auto;
}

.pay-qr-viewer-amount {
  font-size: 1rem;
  margin: 0.35rem 0;
}

.pay-qr-viewer-amount strong {
  color: var(--pink-light);
  font-size: 1.25rem;
}

.pay-qr-viewer-img-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 0.5rem;
  margin: 0.75rem 0;
}

.pay-qr-viewer-img-wrap img {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.pay-qr-viewer-tip {
  text-align: left;
  line-height: 1.55;
  font-size: 0.82rem;
  /* 提示是按 ①②③ 分行的文本，需要保留换行 */
  white-space: pre-line;
}

.pay-qr-viewer-actions {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  /* 收款码弹窗在小屏上会高于视口，关闭按钮被挤到屏幕外，业务方会以为"没有关闭按钮"。
     让操作行吸附在弹窗底部，滚到哪都能看到关闭 / 我已付款（2026-09-16 反馈）。 */
  position: sticky;
  bottom: 0;
  background: rgba(22, 22, 32, 0.96);
  padding: 0.6rem 0 0.2rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.pay-qr-viewer-actions .btn {
  flex: 1 1 auto;
  min-width: 7rem;
}

.payment-legal {
  margin: 0.5rem 0 0.75rem;
  line-height: 1.5;
  font-size: 0.78rem;
}

.modal-box-wide {
  max-width: 520px;
}

.media-body-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.media-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.video-placeholder {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.video-frame {
  background: var(--gradient);
  color: #fff;
  padding: 2rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.feature-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--pink-light);
}

#question-input {
  scroll-margin-top: 6rem;
}

.global-loading {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(15, 14, 23, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
}

.global-loading.show {
  display: flex;
}

.global-loading-box {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--purple);
  text-align: center;
}

.loading-text {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid rgba(108, 92, 231, 0.4);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font-size: 1.1rem;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 107, 129, 0.15);
    gap: 0.25rem;
  }

  .nav-main.open {
    display: flex;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .user-stats {
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
    order: 3;
  }

  .stat-badge {
    font-size: 0.75rem;
  }
}

/* Footer support links */
.footer-support {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.footer-note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--pink-light);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-link-btn:hover {
  color: var(--purple-light);
}

.label-required {
  color: var(--pink);
  font-size: 0.85em;
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}

.contact-modal-box textarea,
.contact-modal-box input[type="email"] {
  width: 100%;
  margin-top: 0.35rem;
}

.contact-upload-label {
  display: block;
  margin-top: 0.75rem;
}

.contact-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.contact-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(108, 92, 231, 0.35);
}

.contact-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
}

.contact-mail-hint {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Help page */
.help-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.help-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.help-breadcrumb a {
  color: var(--pink-light);
}

.help-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.5rem;
}

.help-lead {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 52rem;
}

.help-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

.help-toc {
  position: sticky;
  top: 5rem;
  background: var(--bg-card);
  border: 1px solid rgba(108, 92, 231, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.help-toc h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.help-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-toc li {
  margin-bottom: 0.35rem;
}

.help-toc a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.help-toc a:hover,
.help-toc a.active {
  color: var(--pink-light);
}

.help-toc-foot {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}

.help-section {
  scroll-margin-top: 5rem;
  margin-bottom: 2.5rem;
}

.help-section h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 107, 129, 0.2);
}

.help-card {
  background: var(--bg-card);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.help-card h3 {
  font-size: 1rem;
  margin: 1.1rem 0 0.5rem;
  color: var(--pink-light);
}

.help-card h3:first-child {
  margin-top: 0;
}

.help-card ol,
.help-card ul {
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.help-card li + li {
  margin-top: 0.35rem;
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.help-table th,
.help-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.help-table th {
  color: var(--pink-light);
  font-weight: 600;
}

.help-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-toc {
    position: static;
  }
}

/* Legal / privacy / download pages */
.legal-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.download-main {
  max-width: 960px;
}

.legal-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.35rem;
}

.legal-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.legal-lead {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.legal-section {
  scroll-margin-top: 5rem;
  margin-bottom: 1.75rem;
}

.legal-section h2 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.65rem;
  color: var(--pink-light);
}

.legal-section h3 {
  font-size: 1rem;
  margin: 1rem 0 0.45rem;
}

.legal-section p,
.legal-section li {
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-section ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.legal-section li + li {
  margin-top: 0.35rem;
}

.legal-table {
  margin: 0.75rem 0 1rem;
}

.legal-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.download-section {
  margin-bottom: 2.25rem;
}

.download-section-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 107, 129, 0.2);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.download-grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.download-card {
  background: var(--bg-card);
  border: 1px solid rgba(108, 92, 231, 0.22);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.download-card-active {
  border-color: rgba(255, 107, 129, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 107, 129, 0.12);
}

.download-card h3 {
  font-size: 1rem;
  margin: 0.25rem 0 0;
}

.download-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.download-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: rgba(108, 92, 231, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.download-icon-wechat {
  background: rgba(7, 193, 96, 0.18);
  color: #07c160;
  font-weight: 700;
  font-size: 1.1rem;
}

.download-icon-alipay {
  background: rgba(22, 119, 255, 0.18);
  color: #1677ff;
  font-weight: 700;
  font-size: 1.1rem;
}

.download-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
  opacity: 0.85;
}

.download-qr-placeholder {
  margin-top: 0.5rem;
  width: 120px;
  height: 120px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

.download-qr-placeholder img {
  border-radius: 6px;
}

.download-tips {
  background: var(--bg-card);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

.download-tips h2 {
  font-size: 1rem;
  margin: 0 0 0.65rem;
}

.download-tips ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.download-btn-disabled {
  opacity: 0.65;
  pointer-events: none;
}

@media (max-width: 640px) {
  .download-grid,
  .download-grid-4 {
    grid-template-columns: 1fr;
  }
}

/*
 * 举报原因弹层（js/report-reason.js）。
 * z-index 360：在收款码查看器(350)之上、toast(400)之下——
 * 举报有可能从转盘结果页（本身就能拉起收款码）发起，不能互相盖住。
 */
.report-reason-overlay {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
}

.report-reason-box {
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid rgba(108, 92, 231, 0.4);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-sizing: border-box;
}

.report-reason-box h3 {
  margin: 0 0 1rem;
  color: var(--pink-light);
  font-size: 1.1rem;
}

.report-reason-box label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0.35rem;
}

.report-reason-box select,
.report-reason-box textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0f0e17;
  border: 1px solid rgba(108, 92, 231, 0.4);
  border-radius: 8px;
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.report-reason-box textarea {
  min-height: 96px;
  resize: vertical;
}

.report-reason-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0.75rem 0 0;
}

.report-reason-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.report-reason-actions .btn {
  flex: 1;
}


/* ============================================================================
 * 2026-10-11：让「所有页面的头部几何完全一致」——业务方要求"以首页为准"。
 *
 * 起因：六个栏目宽度虽已锁死，但不同页面 header 右侧内容不同
 *      （Q币/智慧/直线的**数字位数**不同，如 25 与 0），
 *      而 .nav-main 与 .stat-badge 原本都可被压缩 ⇒ 各页导航被挤到的位置/宽度不一致。
 * 做法：① 导航容器整体不参与伸缩；② 统计徽标固定宽度。
 *      二者都不改变文字，只固定几何，因此所有页面看起来完全一样。
 * ========================================================================== */
.nav-main {
  flex: 0 0 auto !important;
  white-space: nowrap;
}

.user-stats .stat-badge {
  box-sizing: border-box;
  min-width: 5.4rem;
  justify-content: center;
  text-align: center;
}

/* ============================================================================
 * AI 生成内容显式标识（《人工智能生成合成内容标识办法》）
 * 与后端零宽字符溯源水印（隐式标识）互为补充：前者用于告知用户，后者用于事后溯源，
 * 两者用途不同，不可互相替代。
 * ========================================================================== */
.msg-ai-label {
  font-size: 0.72rem;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.85;
  margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}

.ai-generated-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.9rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(108, 92, 231, 0.35);
  border-radius: 10px;
  background: rgba(108, 92, 231, 0.1);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ai-generated-tag {
  flex: none;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--purple, #6c5ce7);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}