/* ============================================================
   Games8th — Games8th Ember（暖色深色设计系统）
   依据 docs/design-token-board.md；任何改动先更新 token 文档。
   间距刻度：8/12/16/24/32/48/64/96；单强调色 warm sand #E8A87C。
   ============================================================ */

:root {
  /* 色板 */
  --bg: #faf8f4;
  --bg-raised: #fffdfa;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-2: rgba(255, 255, 255, 0.88);
  --text-primary: #221f1b;
  --text-secondary: #57534b;
  --text-muted: #8a837a;
  --accent: #c8793d;
  --accent-hover: #b76a30;
  --accent-active: #d18a4f;
  --accent-soft: rgba(200, 121, 61, 0.12);
  --accent-border: rgba(200, 121, 61, 0.35);
  --ok: #3f8f5f;
  --warn: #b5862f;
  --danger: #c25757;
  --info: #4a7fa8;
  --border: rgba(31, 27, 20, 0.08);
  --border-strong: rgba(31, 27, 20, 0.14);

  /* 字体（系统栈 + 中文字体回退） */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas,
    "Noto Sans Mono CJK SC", monospace;
  --font-display: "Noto Serif CJK SC", "Songti SC", Georgia, "Times New Roman", serif;

  /* 圆角 / 阴影 / 动效 */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-1: 0 18px 48px rgba(60, 45, 28, 0.12);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --motion: 0.25s var(--ease);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.muted { color: var(--text-muted); }
.small { font-size: 12.5px; line-height: 1.7; }
.center { text-align: center; }
.h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.25; font-weight: 700; }
.h3 { font-size: 1.35rem; line-height: 1.3; font-weight: 650; }
.h4 { font-size: 1.05rem; line-height: 1.45; font-weight: 600; }
.section-title { margin: 0 0 24px; }

code, pre, .key-text {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 1px 8px;
  word-break: break-all;
}

pre {
  padding: 16px;
  overflow-x: auto;
  line-height: 1.6;
  margin: 8px 0;
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- 焦点可见性 ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 248, 244, 0.82);
  /* audit: allow-anti-pattern — 用户明确要求磨砂导航 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.4px;
  color: var(--text-primary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
/* Logo 右侧淡分隔点 */
.logo::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}
.logo:hover { text-decoration: none; opacity: 0.92; }
.logo-img {
  height: 30px;
  width: auto;
  vertical-align: middle;
}

.nav-links { display: flex; gap: 8px; flex: 1; }
.nav-link {
  position: relative;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: calc(100% - 24px);
  height: 1.5px;
  background: var(--accent);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform var(--motion);
}
.nav-link:hover { color: var(--text-primary); text-decoration: none; }
.nav-link:hover::after,
.nav-link.active::after { transform: translateX(-50%) scaleX(1); }
.nav-link.active { color: var(--text-primary); }

.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-user { display: inline-flex; align-items: center; gap: 8px; }
.nav-user .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(63, 143, 95, 0.35);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text-primary);
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

/* 移动端全屏抽屉 */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(250, 248, 244, 0.98);
  /* audit: allow-anti-pattern — 用户明确要求磨砂抽屉 */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding: 64px 24px 32px;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity var(--motion), transform var(--motion);
}
.nav-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-drawer .nav-link {
  font-size: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: block;
}
.nav-drawer .nav-link::after { display: none; }
.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}
.drawer-close {
  position: absolute;
  top: 16px;
  right: 24px;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-inner { padding: 0 16px; gap: 14px; }
  .nav-links, .nav-right .nav-link, .nav-right .nav-user { display: none; }
  .nav-right .btn { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
}

/* ---------- 布局 ---------- */
.container {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

@media (max-width: 820px) {
  .container { padding: 32px 16px 64px; }
}

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  background: #f1ede7;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand strong { font-size: 15px; color: var(--text-primary); font-weight: 700; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { white-space: nowrap; }
@media (max-width: 820px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-copy { align-self: flex-start; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  /* audit: allow-anti-pattern — 用户明确要求卡片半透明磨砂效果 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--motion), box-shadow var(--motion),
    background var(--motion), border-color var(--motion);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-1);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.page-head { margin-bottom: 32px; }
.page-head h1, .page-head h2 { margin-bottom: 8px; }
.page-head .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: var(--text-primary);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  font-family: inherit;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--accent);
  border: none;
  color: #16161f; /* 深炭文字，暖底上保证对比度 */
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 32px rgba(200, 121, 61, 0.28);
}
.btn-primary:active { background: var(--accent-active); }

.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent-border); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-danger { background: rgba(194, 87, 87, 0.12); border-color: rgba(194, 87, 87, 0.35); color: var(--danger); }
.btn-warn { background: rgba(181, 134, 47, 0.12); border-color: rgba(181, 134, 47, 0.35); color: var(--warn); }
.btn-ok { background: rgba(63, 143, 95, 0.12); border-color: rgba(63, 143, 95, 0.35); color: var(--ok); }

.inline-form { display: inline-flex; }

/* ---------- 表单 ---------- */
.form label {
  display: block;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.form input, .form select, .form textarea {
  width: 100%;
  margin-top: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--motion), box-shadow var(--motion);
}

.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form textarea { resize: vertical; min-height: 110px; }

.checkbox {
  display: flex !important;
  align-items: center;
  gap: 12px;
  color: var(--text-primary) !important;
  margin-bottom: 24px;
}
.checkbox input { width: auto; margin: 0; }

.row { display: flex; gap: 12px; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 8px; }
.row.between { justify-content: space-between; align-items: flex-start; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 16px; }

.tips { margin-top: 24px; line-height: 2; }

/* ---------- 提示条 ---------- */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid;
}
.alert svg { flex-shrink: 0; }
.alert.ok { background: rgba(63, 143, 95, 0.1); border-color: rgba(63, 143, 95, 0.3); color: var(--ok); }
.alert.error { background: rgba(194, 87, 87, 0.1); border-color: rgba(194, 87, 87, 0.3); color: var(--danger); }
.alert.info { background: rgba(74, 127, 168, 0.1); border-color: rgba(74, 127, 168, 0.3); color: var(--info); }

/* ---------- 徽章 / 头像 ---------- */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  background: transparent;
  color: var(--text-muted);
  vertical-align: middle;
  border: 1px solid var(--border-strong);
}
.badge-admin { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.badge-owner { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.badge-co-owner { background: rgba(181, 134, 47, 0.12); border-color: transparent; color: var(--warn); }
.badge-mod { background: rgba(74, 127, 168, 0.12); border-color: transparent; color: var(--info); }
.badge-user { color: var(--text-muted); border-color: var(--border-strong); }
.badge-ok { background: rgba(63, 143, 95, 0.12); border-color: transparent; color: var(--ok); }
.badge-warn { background: rgba(181, 134, 47, 0.12); border-color: transparent; color: var(--warn); }
.badge-danger { background: rgba(194, 87, 87, 0.12); border-color: transparent; color: var(--danger); }
.badge-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.avatar {
  border-radius: 50%;
  background: linear-gradient(135deg,
    hsl(var(--h), 32%, 84%), hsl(calc(var(--h) + 40), 34%, 76%));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3d352c;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}

.user-mini { display: flex; align-items: center; gap: 12px; }
.username { color: var(--text-primary); font-weight: 600; }
.username:hover { color: var(--accent); text-decoration: none; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap {
  max-width: 460px;
  margin: 48px auto 0;
}
.auth-card h1 { margin-bottom: 8px; }
.auth-card p { margin-bottom: 32px; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  text-align: left;
  padding: 64px 48px 64px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 560px 320px at 50% -60px, rgba(200, 121, 61, 0.12), transparent 70%),
    var(--bg-raised);
  margin-bottom: 64px;
}
/* 网格线背景 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 27, 20, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 27, 20, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  /* audit: allow-anti-pattern — 遮罩用纯黑 alpha 通道是标准做法，非滥用纯黑 */
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
/* 噪点纹理 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
.hero-copy { min-width: 0; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 24px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 46ch;
  margin-bottom: 16px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 13px;
}
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* 新用户注册赠送横幅（仅未登录可见） */
.gift-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, var(--accent-soft), rgba(255, 253, 250, 0.55) 60%, transparent),
    var(--surface);
}
.gift-banner svg { flex-shrink: 0; color: var(--accent); }
.gift-banner b { display: block; font-size: 14px; line-height: 1.45; }
.gift-banner span { display: block; font-size: 12.5px; color: var(--text-secondary); margin-top: 4px; }
.gift-banner .gift-link { margin-left: auto; flex-shrink: 0; }
.gift-banner .gift-link:hover { text-decoration: none; }

@media (max-width: 560px) {
  .gift-banner { flex-wrap: wrap; }
  .gift-banner .gift-link { margin-left: 32px; }
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Loader 真实截图 */
.loader-shot {
  width: 100%;
  max-width: 520px;
  justify-self: end;
  display: block;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

/* ---------- 特性列表（左对齐，非等权卡片） ---------- */
.feature-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 64px;
}
.feature {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  align-items: start;
  padding: 24px 8px;
  margin-bottom: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  /* audit: allow-anti-pattern — 显式移除磨砂，特性列表保持平铺透明 */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none !important;
  box-shadow: none !important;
}
.feature-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}
.feature h3 { margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-secondary); margin: 0; max-width: 62ch; }
.feature:first-child { border-top: 1px solid var(--border); }

/* 真实数据条 */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding: 24px 8px;
  margin-bottom: 64px;
}
.stats-strip b { font-family: var(--font-display); font-size: 1.7rem; color: var(--text-primary); display: block; }
.stats-strip span { color: var(--text-muted); font-size: 13px; }

.flow-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 64px;
}
.flow-line .flow-item { color: var(--text-primary); font-weight: 500; }
.flow-line svg { color: var(--accent); }

@media (max-width: 820px) {
  .hero { padding: 48px 16px 48px; text-align: left; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .loader-shot { justify-self: start; max-width: 100%; }
  .hero-actions .btn { width: auto; }
  .stats-strip { gap: 24px; margin-bottom: 64px; }
}

/* ---------- 区块间距 ---------- */
.home-section { margin-bottom: 64px; }
.home-section--flow .flow-line { margin-bottom: 0; }

/* section 标题（nixware 式：居中标题 + 短标线，section-head 保留左对齐变体） */
.section-header {
  text-align: center;
  margin-bottom: 32px;
}
.section-header .h3 { margin-bottom: 8px; }
.section-header p { margin: 0 auto; max-width: 52ch; }
.section-header::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 16px auto 0;
  border-radius: 99px;
  background: var(--accent);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}
.section-head .h3 { margin-bottom: 0; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
}
.section-link svg { transition: transform var(--motion); }
.section-link:hover svg { transform: translateX(4px); }

/* ---------- 产品列表 ---------- */
.product-list { display: flex; flex-direction: column; gap: 16px; }
.product-row {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  /* audit: allow-anti-pattern — 用户明确要求磨砂卡片 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion);
}
.product-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-1);
  border-color: var(--accent-border);
}
.product-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
}
.product-row h3 { margin-bottom: 4px; }
.product-row .muted { font-size: 13px; }
.product-row .product-meta { margin-left: auto; text-align: right; white-space: nowrap; }
.product-version {
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.product-row .product-meta .btn { margin-top: 12px; }

@media (max-width: 820px) {
  .product-row { flex-wrap: wrap; }
  .product-row .product-meta { margin-left: 0; width: 100%; text-align: left; }
}

/* ---------- 列表（最近讨论等） ---------- */
.recent-list { padding: 8px 24px; }
.recent-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { color: var(--accent); text-decoration: none; }
.recent-item span:last-child { white-space: nowrap; }

/* ---------- CTA ---------- */
.cta-strip {
  margin-top: 0;
  padding: 48px 32px;
  text-align: center;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 420px 200px at 50% -40px, rgba(200, 121, 61, 0.14), transparent 70%),
    var(--bg-raised);
  border: 1px solid var(--border);
}
.cta-strip h3 { margin-bottom: 12px; font-size: 1.5rem; }
.cta-strip p { color: var(--text-secondary); margin-bottom: 32px; }

/* ---------- 下载环境确认弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(31, 27, 20, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* audit: allow-anti-pattern — 模态遮罩毛玻璃，聚焦当前操作 */
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal-box {
  width: 100%;
  max-width: 460px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 24px 64px rgba(60, 45, 28, 0.25);
  text-align: left;
}
.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.modal-text { color: var(--text-secondary); font-size: 14px; line-height: 1.8; }
.modal-text code {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.modal-actions .btn { width: 100%; }
.modal-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}
.modal-hint button {
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  padding: 4px 8px;
  font-family: inherit;
}
.modal-hint button:hover { text-decoration: underline; }

/* ---------- 论坛 ---------- */
.cat-list { display: flex; flex-direction: column; gap: 16px; }
.cat-row {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--text-primary);
  /* audit: allow-anti-pattern — 用户明确要求磨砂卡片 */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion);
}
.cat-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-1);
  border-color: var(--accent-border);
  text-decoration: none;
}
.cat-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
}
.cat-main { flex: 1; min-width: 0; }
.cat-stats { display: flex; gap: 24px; text-align: center; }
.cat-stats div { display: flex; flex-direction: column; }
.cat-last { max-width: 220px; text-align: right; display: flex; flex-direction: column; font-size: 12.5px; }

@media (max-width: 820px) {
  .cat-stats, .cat-last { display: none; }
}

.thread-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.thread-row {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  color: var(--text-primary);
  transition: transform var(--motion), box-shadow var(--motion), border-color var(--motion);
}
.thread-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-1);
  border-color: var(--accent-border);
  text-decoration: none;
}
.thread-main { flex: 1; min-width: 0; }
.thread-title { font-weight: 600; margin-bottom: 4px; }
.thread-title .badge { margin-right: 8px; }
.thread-stats { display: flex; flex-direction: column; text-align: center; width: 48px; }
.thread-last { width: 160px; text-align: right; font-size: 12px; }

@media (max-width: 820px) {
  .thread-stats, .thread-last { display: none; }
}

.post-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.post { display: flex; gap: 24px; padding: 28px; }
.post-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 120px;
  flex-shrink: 0;
  text-align: center;
}
.post-main { flex: 1; min-width: 0; }
.post-meta { margin-bottom: 12px; }
.post-body { overflow-wrap: break-word; }
.post-body p { margin: 0 0 10px; }

@media (max-width: 820px) {
  .post { flex-direction: column; gap: 16px; }
  .post-side { width: 100%; flex-direction: row; justify-content: flex-start; }
}

.mod-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 24px;
  background: rgba(181, 134, 47, 0.1);
  border: 1px solid rgba(181, 134, 47, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ---------- 账户 ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 32px; }
.profile-stats {
  display: flex;
  gap: 32px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.profile-stats div { display: flex; flex-direction: column; }
.profile-stats b { font-size: 1.35rem; font-weight: 650; }

.lic-card { padding: 24px; }
.lic-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.lic-key { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.lic-key code { font-size: 15px; letter-spacing: 1px; }
.lic-hwids { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.hwid-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

/* ---------- 关于页 ---------- */
.about-section { max-width: 720px; margin: 0 auto; }
.about-section .card { margin-bottom: 24px; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- 移动端通用 ---------- */
@media (max-width: 820px) {
  .btn { width: 100%; }
  .inline-form { width: 100%; }
  .inline-form .btn { width: auto; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 64px 16px 56px; margin-bottom: 64px; }
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 1.05rem; }
  .home-section { margin-bottom: 64px; }
  .flow-line { margin-bottom: 64px; }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
