/* ============================================================
   Tri-Sites Shared Components
   通用组件：按钮 / 卡片 / 玩家卡 / Footer
   ============================================================ */

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--brand-700, var(--brand-d));  /* v3: 白字安全值(≥4.5:1), 不再用 --brand */
  color: #fff;
}
.btn-primary:hover { background: var(--brand-800, var(--brand-d)); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost {
  background: var(--brand-l);
  color: var(--brand-text);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--brand-100, var(--brand-l)); }
.btn-outline {
  background: var(--card);
  color: var(--t);
  border: 1px solid var(--line-h);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand-text); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  transition: all 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--brand);
}

/* 游戏卡片（首页） */
.game-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}
.game-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--brand);
}
.game-card .gc-icon { font-size: 32px; }
.game-card h3 { font-size: 16px; font-weight: 700; }
.game-card .gc-desc { font-size: 13px; color: var(--m); flex: 1; }
.game-card .gc-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-l);
  color: var(--brand-text);
  align-self: flex-start;
}

/* ---------- 玩家卡片（对战页） ---------- */
.player-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r);
  min-width: 110px;
  transition: all 0.2s;
}
.player-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-l);
}
.player-card .pc-avatar { font-size: 28px; line-height: 1; }
.player-card .pc-symbol { font-size: 20px; font-weight: 800; }
.player-card .pc-name { font-size: 12px; color: var(--m); }
.player-card .pc-timer {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--t);
}
.player-card .pc-timer.warn { color: var(--warn); }
.player-card .pc-timer.danger {
  color: var(--bad);
  animation: pc-pulse 1s infinite;
}
@keyframes pc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- Footer（品牌矩阵） ---------- */
.sites-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 28px 0 40px;
  text-align: center;
}
.sites-footer .sf-title {
  font-size: 13px;
  color: var(--m);
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sites-footer .sf-matrix {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.sites-footer .sf-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
}
.sites-footer .sf-item:hover { background: var(--brand-l); }
.sites-footer .sf-item .sf-emoji { font-size: 18px; }
.sites-footer .sf-links { margin: 12px 0; }
.sites-footer .sf-links a {
  color: var(--m);
  font-size: 13px;
  margin: 0 8px;
  transition: color 0.15s;
}
.sites-footer .sf-links a:hover { color: var(--brand-text); }
.sites-footer .sf-copy {
  color: var(--m);
  font-size: 12px;
  margin-top: 12px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 44px 0 30px;
  text-align: center;
}
.hero .hero-emoji {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p {
  color: var(--m);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 8px;
}
.hero .hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ---------- Section header ---------- */
section { padding: 36px 0 8px; }
.sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.sec-head .sec-no {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-l);
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}
.sec-head h2 { font-size: 24px; }

/* 主内容区宽度容器 */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ========== P1.5 Homepage Unify ========== */
/* ============================================================
   Homepage Unify — 三站首页视觉统一补丁 (P1.5)
   只覆盖差异点，不改动 HTML
   加载顺序：tokens → sidebar → components → 本文件
   ============================================================ */

/* ---------- Hero 统一：标题居中 + badge + 可选 tags ---------- */

/* MathDuel: .hero.reveal 原本可能有复杂布局 — 重置 */
.hero.reveal { text-align: center; padding: 56px 20px 40px; }
.hero.reveal .hero-tagline-text { font-size: clamp(28px, 5vw, 40px); line-height: 1.2; font-weight: 800; }
.hero.reveal h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.2; margin: 0 0 12px; font-weight: 800; }
.hero.reveal .hero-subtitle { color: var(--m); font-size: 16px; max-width: 560px; margin: 0 auto 16px; }
.hero.reveal .hero-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
html[data-site="math"] .hero.reveal .hero-tag,
html[data-site="math"] .hero.reveal span.hero-tag,
.hero.reveal .hero-tag,
.hero.reveal span.hero-tag {
  font-size: 13px !important; font-weight: 600 !important;
  padding: 6px 14px !important; border-radius: 999px !important;
  background: var(--brand-l) !important; color: var(--brand-text) !important;
  border: 1px solid var(--line) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* MemoryDuel / BoardDuel hero badge 统一 */
.hero .badge {
  display: inline-block;
  font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 999px;
  background: var(--brand-l); color: var(--brand-text);
  margin-bottom: 14px;
}

/* BoardDuel hero em 强调色 */
.hero h1 em { font-style: normal; color: var(--brand); font-weight: 800; }

/* Hero 底部 CTA 按钮 */
.hero .hero-ctas { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ---------- 卡片统一：hover 上浮 + 品牌色边框 ---------- */

/* MathDuel: .game-card.dark 原本是深色 */
.game-card.dark {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: inherit;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.game-card.dark:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.game-card.dark .game-cover {
  width: 100%; height: 120px; object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.game-card.dark .game-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.game-card.dark .game-title { font-size: 16px; font-weight: 700; color: var(--t); }
.game-card.dark .game-meta { font-size: 12px; color: var(--m); }
.game-card.dark .game-play-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700; color: var(--brand);
  margin-top: 4px;
}

/* BoardDuel: .cards 网格 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.cards .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex; flex-direction: column; gap: 6px;
}
.cards .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.cards .card .icon { font-size: 28px; line-height: 1; }
.cards .card h3 { font-size: 15px; font-weight: 700; margin: 0; }
.cards .card p { font-size: 13px; color: var(--m); margin: 0; flex: 1; }
.cards .card .tag.new {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 1px 8px; border-radius: 999px;
  background: var(--brand-700, var(--brand)); color: #fff;  /* v3: 白字安全值 */
  vertical-align: middle; margin-left: 6px;
}

/* ---------- Section header 统一 ---------- */
section { padding: 40px 0 8px; }
.sec-head, .section-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.sec-head h2, .section-head h2 { font-size: 22px; font-weight: 800; }
.sec-head .no, .sec-head .sec-no {
  font-size: 13px; font-weight: 700;
  color: var(--brand); background: var(--brand-l);
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
}

/* ---------- wrap 容器 ---------- */
.wrap, .container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- features 区块（BoardDuel） ---------- */
.features {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin: 20px 0;
}
.features .feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; text-align: center; transition: all 0.2s;
}
.features .feature:hover { border-color: var(--brand); transform: translateY(-2px); }
.features .feature .icon { font-size: 28px; margin-bottom: 6px; display: block; }
.features .feature span:last-child { font-size: 13px; color: var(--m); font-weight: 600; }

/* ---------- MemoryDuel lobby mode buttons ---------- */
.mode-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.mode-btn {
  padding: 10px 20px; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.mode-btn:hover { border-color: var(--brand); }
.mode-btn.on {
  background: var(--brand-700, var(--brand)); color: #fff; border-color: var(--brand-700, var(--brand));  /* v3: 白字安全值 */
}

/* ---------- Reveal 动画（MathDuel 已有 reveal 类） ---------- */
.reveal { opacity: 1 !important; transform: none !important; }

/* ---------- 小屏适配 ---------- */
@media (max-width: 600px) {
  .hero { padding: 36px 0 24px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cards .card { padding: 14px; }
  .cards .card h3 { font-size: 14px; }
  .features { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ============================================================
   Homepage Bottom Sections — 从 MathDuel 同步到三站
   Leaderboard (战绩) + Value Section (为什么选择) + Footer (政策)
   变量适配：MathDuel inline → 共享 tokens.css
   ============================================================ */

/* ---------- Section 通用 header ---------- */
.section-header {
  margin: 0 auto 20px;
  text-align: center;
}
.section-header.mt-0 { margin-top: 0; }
.section-title {
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0;
}
.section-title .accent { color: var(--brand); }
.section-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--m);
  margin: 8px 0 0;
  line-height: 1.6;
}

/* ---------- Leaderboard / My Stats ---------- */
.leaderboard-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}
.lb-row {
  display: grid;
  grid-template-columns: 44px 44px 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}
.lb-row:last-child { border-bottom: none; }
.lb-row-head {
  background: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--m);
}
.lb-rank {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--m);
  text-align: center;
}
.lb-rank.rank-1 { color: #F59E0B; }
.lb-rank.rank-2 { color: #94A3B8; }
.lb-rank.rank-3 { color: #D97706; }
.lb-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--brand-l);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-text);
}
.lb-name { font-weight: 700; font-size: 0.95rem; }
.lb-score {
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lb-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--m);
  font-size: 0.9rem;
}
.lb-action {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.lb-action:hover { color: var(--brand-d); }

/* ---------- Value Section ---------- */
.value-section { padding: 36px 0 20px; }
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.value-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 1.25rem;
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.value-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.value-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--brand-700, var(--brand));  /* v3: 白字安全值 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.75rem;
}
.value-card h4 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.value-card p { font-size: 13px; color: var(--m); margin: 0; line-height: 1.55; }

/* ---------- 新版 Footer（三列布局） ---------- */
.site-footer {
  margin-top: 48px;
  padding: 36px 20px 24px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t);
  margin: 0 0 0.25rem;
}
.footer-col a {
  color: var(--m);
  font-size: 0.88rem;
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  text-align: center;
  color: var(--m);
  font-size: 0.78rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .lb-row { grid-template-columns: 36px 36px 1fr auto auto; font-size: 13px; padding: 0.6rem 0.75rem; }
  .lb-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 0.9rem; }
}

/* ============================================================
   Game Page Shared UI — 从 MathDuel 同步
   g-tutorial-btn + bottom-nav
   ============================================================ */

/* ---------- 玩法按钮（每个游戏页右上角） ---------- */
.g-tutorial-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--t);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.g-tutorial-btn:hover {
  border-color: var(--brand);
  color: var(--brand-text);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* ---------- 移动端底部导航（papergames 风格） ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 55;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  max-width: 560px;
  margin: 0 auto;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  color: var(--m);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: color 0.15s;
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--brand);
}
.bn-ico { font-size: 18px; line-height: 1; }
.bn-label { font-size: 10px; font-weight: 600; }

@media (max-width: 768px) {
  .bottom-nav { display: block; }
  .g-tutorial-btn { top: 12px; right: 12px; padding: 6px 12px; font-size: 12px; }
}
@media (min-width: 769px) {
  .g-tutorial-btn { display: none; }
}
/* ============================================================
   P14: BoardDuel 账号卡片 + 排行榜排版修复
   account-card / account-row / stats-card / leaderboard
   ============================================================ */

/* 账号卡片容器 */
.account-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  box-shadow: var(--shadow-sm);
}
.account-card .btn.ghost {
  grid-column: 1 / -1;
  margin-top: 12px;
  justify-self: start;
}

/* 账号行 — icon label value 对齐 */
.account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.account-row:last-of-type { border-bottom: none; }
.account-row .icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.account-row .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--m);
  flex-shrink: 0;
  width: 72px;
}
.account-row .value {
  font-size: 14px;
  font-weight: 700;
  color: var(--t);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-row .value.highlight { color: var(--brand); }

@media (max-width: 600px) {
  .account-card { grid-template-columns: 1fr; padding: 16px; }
  .account-row .label { width: 78px; }
}

/* 排行榜 Top 5 卡片 */
.stats-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.stats-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--t);
}
.stats-card #leaderboard { display: flex; flex-direction: column; gap: 8px; }
.stats-card #leaderboard > div {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.stats-card #leaderboard > div > span:first-child {
  width: 28px;
  font-weight: 800;
  color: var(--brand);
  flex-shrink: 0;
}

/* 战绩排行榜 — 让它占满 wrap 宽度，去掉原 max-width */
.leaderboard-section {
  max-width: none !important;
  width: auto;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
.leaderboard-section .lb-row {
  max-width: none !important;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.leaderboard-section .lb-row:last-of-type { border-bottom: none; }
.leaderboard-section .lb-row-head {
  background: var(--brand-l);
  border-radius: var(--r) var(--r) 0 0;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  border: 1px solid var(--line);
}
@media (max-width: 600px) {
  .leaderboard-section .lb-row-head { border-radius: var(--r); }
}
/* ============================================================
   P16: game-footer（游戏页内嵌玩法说明，三站共享）
   ============================================================ */
.game-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  color: var(--m);
  font-size: 14px;
  border-top: 1px solid var(--line);
  margin-top: 32px;
}
.game-footer h3 {
  color: var(--t);
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-footer h3:first-child { margin-top: 0; }
.game-footer p, .game-footer li { line-height: 1.75; color: var(--m); }
.game-footer ul { padding-left: 20px; margin: 6px 0; }
.game-footer li { margin: 4px 0; }
.game-footer .rule-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-l);
  color: var(--brand-text);
  margin-right: 6px;
}
/* ── P1 SEO: game-footer sections ── */
.game-footer .gf-block {
  margin-bottom: 1.75rem;
}
.game-footer .gf-block:last-child { margin-bottom: 0; }

.game-footer h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--text, #0f172a);
  letter-spacing: -0.01em;
}
.game-footer h2:first-child { margin-top: 0; }

.game-footer h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0.85rem 0 0.35rem;
  color: var(--text, #0f172a);
}

.game-footer p {
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0 0 0.6rem;
  color: var(--text, #0f172a);
  opacity: 0.88;
}

.game-footer ul, .game-footer ol {
  margin: 0.3rem 0 0.6rem;
  padding-left: 1.3rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text, #0f172a);
  opacity: 0.88;
}
.game-footer li { margin-bottom: 0.2rem; }

.game-footer .gf-faq details {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  margin-bottom: 0.4rem;
  padding: 0.5rem 0.8rem;
  background: var(--surface, #fff);
  cursor: pointer;
}
.game-footer .gf-faq summary {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.game-footer .gf-faq summary::-webkit-details-marker { display: none; }
.game-footer .gf-faq summary::before {
  content: '▶';
  font-size: 0.6rem;
  color: var(--primary, #0D9488);
  transition: transform 0.2s;
}
.game-footer .gf-faq details[open] summary::before {
  transform: rotate(90deg);
}
.game-footer .gf-faq details p {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border, #e2e8f0);
  opacity: 0.85;
  font-size: 0.85rem;
}

.game-footer .gf-related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.game-footer .gf-related a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary, #0D9488);
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.15s;
}
.game-footer .gf-related a:hover {
  background: var(--brand-700, var(--brand));  /* v3: 原 var(--primary,#0D9488) 是跨品牌 teal fallback bug */
  color: #fff;
  border-color: var(--primary, #0D9488);
}
.game-footer .rule-tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary, #0D9488);
  background: var(--primary-light, #CCFBF1);
  border-radius: 4px;
  margin-right: 0.3rem;
  letter-spacing: 0.03em;
}
[data-theme="dark"] .game-footer .gf-faq details,
[data-theme="dark"] .game-footer .gf-related a,
[data-theme="dark"] .game-footer .rule-tag {
  background: rgba(255,255,255,0.05);
}
[data-theme="dark"] .game-footer .rule-tag {
  color: var(--primary, #0D9488);
  background: rgba(13,148,136,0.15);
}

/* ============================================================
   Home Unified v2 — 三站首页完整统一
   参考 papergames.io 设计语言
   ============================================================ */

/* ---------- 容器 ---------- */
.wrap, .container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 页面主布局（sidebar + main） ---------- */
.layout {
  display: flex;
  min-height: 100vh;
}
.layout-main {
  flex: 1;
  min-width: 0;
}

/* ---------- Hero Section ---------- */
.home-hero {
  position: relative;
  background: var(--hero-g);
  color: #fff;
  padding: 64px 20px 80px;
  text-align: center;
  overflow: hidden;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1), transparent 50%);
  pointer-events: none;
}
.home-hero > * { position: relative; z-index: 1; }
.home-hero .hero-emoji { font-size: 48px; margin-bottom: 12px; display: block; }
.home-hero .hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.home-hero h1 {
  font-size: clamp(30px, 5.5vw, 46px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.home-hero h1 em {
  font-style: normal;
  color: #fef3c7;
  font-weight: 800;
}
.home-hero .hero-sub {
  font-size: clamp(15px, 2.5vw, 17px);
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}
.home-hero .hero-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.home-hero .hero-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  transition: all 0.2s;
}
.home-hero .hero-tag:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}
.home-hero .hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}
.home-hero .btn {
  font-size: 15px;
  padding: 12px 28px;
  border-radius: var(--r-sm);
  font-weight: 700;
}
.home-hero .btn-primary {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.home-hero .btn-primary:hover {
  background: var(--brand-l);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.home-hero .btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.home-hero .btn-ghost:hover {
  background: rgba(255,255,255,0.25);
}

/* ---------- Stats Bar ---------- */
.home-stats {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}
.home-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}
.home-stats .stat-item {
  text-align: center;
  padding: 12px;
}
.home-stats .stat-val {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--brand);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.home-stats .stat-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--m);
  margin-top: 4px;
}
@media (max-width: 560px) {
  .home-stats .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* ---------- Section 交替背景 ---------- */
.home-section { padding: 56px 0; }
.home-section.bg-alt { background: var(--bg-alt); }
.home-section.bg-soft { background: var(--bg-soft); }

/* ---------- Section 标题 ---------- */
.sec-header {
  text-align: center;
  margin-bottom: 32px;
}
.sec-header .sec-title {
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  color: var(--t-h);
  letter-spacing: -0.01em;
  margin: 0;
}
.sec-header .sec-title .accent { color: var(--brand); }
.sec-header .sec-sub {
  font-size: 15px;
  font-weight: 500;
  color: var(--m);
  margin: 8px 0 0;
  line-height: 1.6;
}

/* ---------- Featured (精选大卡) ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.featured-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--t);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.featured-card .fc-icon {
  width: 56px; height: 56px;
  border-radius: var(--r);
  background: var(--hero-g);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.featured-card .fc-title {
  font-size: 18px; font-weight: 800; color: var(--t-h); margin: 0;
}
.featured-card .fc-desc {
  font-size: 14px; font-weight: 500; color: var(--m); line-height: 1.6; margin: 0;
  flex: 1;
}
.featured-card .fc-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
  background: var(--brand-700, var(--brand)); color: #fff;  /* v3: 白字安全值 */
  letter-spacing: 0.05em;
}

/* ---------- Game Cards (封面卡网格) ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.game-card-cover {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--t);
  display: flex;
  flex-direction: column;
  transition: all 0.25s;
  position: relative;
}
.game-card-cover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.game-card-cover .gc-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--brand-l);
}
.game-card-cover .gc-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.game-card-cover .gc-title {
  font-size: 15px; font-weight: 800; color: var(--t-h); margin: 0;
}
.game-card-cover .gc-meta {
  font-size: 12px; font-weight: 500; color: var(--m);
}
.game-card-cover .gc-play {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 700; color: var(--brand);
  margin-top: 6px;
  transition: all 0.15s;
}
.game-card-cover:hover .gc-play { color: var(--brand-d); }
.game-card-cover .gc-new {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
  background: var(--warning-strong, var(--warn)); color: #fff;  /* v3: warning 白字安全值 */
  letter-spacing: 0.05em;
}
.game-card-cover .gc-online {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: var(--success-strong, var(--good)); color: #fff;  /* v3: 原硬编码 rgba(16,185,129,.92) */
}
.game-card-cover .gc-online .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  animation: pulse-dot 1.6s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  70% { box-shadow: 0 0 0 5px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ---------- Features Row (快速入口) ---------- */
.features-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.feature-chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 16px;
  text-align: center;
  transition: all 0.2s;
}
.feature-chip:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature-chip .fc-ico { font-size: 28px; display: block; margin-bottom: 6px; }
.feature-chip .fc-txt { font-size: 13px; font-weight: 600; color: var(--t); }

/* ---------- Value Section ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.value-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: all 0.25s;
}
.value-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.value-card .vc-ico {
  width: 48px; height: 48px;
  border-radius: var(--r-sm);
  background: var(--hero-g);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  margin-bottom: 12px;
}
.value-card h4 {
  font-size: 15px; font-weight: 800; color: var(--t-h); margin: 0 0 4px;
}
.value-card p {
  font-size: 13px; font-weight: 500; color: var(--m); line-height: 1.6; margin: 0;
}

/* ---------- Footer 品牌矩阵 ---------- */
.sites-footer {
  margin-top: 0;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 40px 0 32px;
}
.sites-footer .sf-title {
  font-size: 13px; font-weight: 700; color: var(--m);
  margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.sites-footer .sf-matrix {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sites-footer .sf-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 700; font-size: 14px;
  text-decoration: none;
  color: var(--t);
  transition: all 0.2s;
}
.sites-footer .sf-item:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.sites-footer .sf-emoji { font-size: 18px; }
.sites-footer .sf-links {
  text-align: center; margin: 16px 0 10px;
}
.sites-footer .sf-links a {
  color: var(--m); font-size: 13px;
  margin: 0 10px;
  text-decoration: none;
  transition: color 0.15s;
}
.sites-footer .sf-links a:hover { color: var(--brand); }
.sites-footer .sf-copy {
  text-align: center; color: var(--text-muted); font-size: 12px;
  margin-top: 12px;
}

/* ---------- 侧边栏品牌色适配 ---------- */
.sidebar-brand { color: var(--brand); }

/* ---------- 滚动动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 移动端调整 (完整 v1 — BoardDuel + MemoryDuel) ---------- */

/* 通用移动端基准 */
html, body { overflow-x: hidden; }
* { -webkit-tap-highlight-color: transparent; }

/* 双列容器 (BoardDuel 账号+排行榜) — 桌面双列, 手机堆叠 */
.home-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* MemoryDuel 对战栏 (玩家 VS 玩家) — 桌面并排, 手机堆叠 */
.duel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* MemoryDuel 答题选项 — 桌面双列, 手机单列 */
.quiz-card .opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* MemoryDuel 类别网格 — 缩小卡片 */
.lobby-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

/* MemoryDuel 联机房间码输入区 */
.online-code-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.online-code-row input {
  width: 200px;
  max-width: 100%;
}

/* BoardDuel Hero CTA — 按钮自适应宽度 */
.home-hero .hero-ctas .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Footer 品牌矩阵 — 防止溢出 */
.sites-footer .sf-matrix .sf-item {
  white-space: nowrap;
  max-width: 100%;
}

/* ========== 手机断点 (max-width: 640px) ========== */
@media (max-width: 640px) {
  /* --- Hero --- */
  .home-hero { padding: 40px 16px 64px; }
  .home-hero .hero-emoji { font-size: 40px; }
  .home-hero h1 { font-size: 26px; letter-spacing: -0.02em; }
  .home-hero .hero-sub { font-size: 14px; line-height: 1.55; }
  .home-hero .hero-tags { gap: 6px; margin-top: 16px; }
  .home-hero .hero-tag { font-size: 12px; padding: 5px 12px; }
  .home-hero .hero-ctas { gap: 8px; margin-top: 20px; }
  .home-hero .hero-ctas .btn {
    flex: 1 1 auto;
    font-size: 14px;
    padding: 11px 18px;
    min-width: 0;
  }

  /* --- Stats Bar --- */
  .home-stats { padding: 28px 0; margin-top: -32px; }
  .home-stats .stats-grid { gap: 12px; }
  .home-stats .stat-item { padding: 8px; }
  .home-stats .stat-val { font-size: 24px; }
  .home-stats .stat-lbl { font-size: 12px; }

  /* --- Section --- */
  .home-section { padding: 36px 0; }
  .wrap, .container { padding: 0 16px; }

  /* --- Section Header --- */
  .sec-header { margin-bottom: 24px; }
  .sec-header .sec-title { font-size: 20px; }
  .sec-header .sec-sub { font-size: 14px; }

  /* --- Featured Grid --- */
  .featured-grid { grid-template-columns: 1fr; gap: 12px; }
  .featured-card { padding: 18px; }
  .featured-card .fc-icon { width: 48px; height: 48px; font-size: 20px; }
  .featured-card .fc-title { font-size: 16px; }
  .featured-card .fc-desc { font-size: 13px; }

  /* --- Games Grid (BoardDuel) --- */
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card-cover .gc-body { padding: 8px 10px 10px; }
  .game-card-cover .gc-title { font-size: 13px; }
  .game-card-cover .gc-meta { font-size: 11px; }
  .game-card-cover .gc-play { font-size: 12px; }

  /* --- Account + Leaderboard (BoardDuel) — 关键修复: 手机堆叠 --- */
  .home-2col { grid-template-columns: 1fr; gap: 16px; }
  .account-card { padding: 16px; }
  .account-card .account-row { padding: 10px 0; }
  .account-card .account-row .label { width: 64px; font-size: 12px; }
  .account-card .account-row .value { font-size: 13px; }
  .account-card .account-row .icon { width: 24px; font-size: 16px; }
  .stats-card { padding: 16px; }
  .stats-card h3 { font-size: 14px; margin-bottom: 10px; }

  /* --- Value Grid --- */
  .value-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 1rem; }
  .value-card { padding: 18px; }
  .value-card .vc-ico { width: 40px; height: 40px; font-size: 18px; margin-bottom: 10px; }
  .value-card h4 { font-size: 14px; }
  .value-card p { font-size: 12px; line-height: 1.5; }

  /* --- Features Grid --- */
  .features { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* --- Footer --- */
  .sites-footer { padding: 28px 0 24px; }
  .sites-footer .sf-title { font-size: 12px; }
  .sites-footer .sf-matrix { gap: 8px; margin-bottom: 16px; }
  .sites-footer .sf-item { padding: 8px 12px; font-size: 12px; gap: 6px; }
  .sites-footer .sf-item .sf-emoji { font-size: 16px; }
  .sites-footer .sf-links { margin: 12px 0 8px; }
  .sites-footer .sf-links a { font-size: 12px; margin: 0 6px; }
  .sites-footer .sf-copy { font-size: 11px; }

  /* --- BoardDuel section head 内联标题 --- */
  .home-section > .wrap > .sec-head h2 { font-size: 18px; }
}

/* ========== 手机窄屏 (max-width: 380px) ========== */
@media (max-width: 380px) {
  .home-hero h1 { font-size: 24px; }
  .home-hero .btn { font-size: 13px; padding: 10px 14px; }
  .games-grid { gap: 8px; }
  .featured-card { padding: 14px; }
  .account-row .label { width: 56px; font-size: 11px; }
}

/* ========== MemoryDuel 对战区手机适配 ========== */
@media (max-width: 640px) {
  /* Duel bar — 玩家堆叠 */
  .duel-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px !important; }
  .duel-bar .player { justify-content: center; }
  .duel-bar .player.opp { flex-direction: row !important; text-align: left; }
  .duel-bar .vs {
    margin: 4px 0;
    font-size: 12px;
    letter-spacing: 0.3em;
  }

  /* Quiz card — 更紧凑 */
  .quiz-card { padding: 16px !important; }
  .quiz-card .q-text { font-size: clamp(16px, 4.5vw, 20px); margin-bottom: 14px; }
  .quiz-card .opts { gap: 8px; }

  /* 答题选项按钮更紧凑 */
  .quiz-card .opts button {
    padding: 12px 14px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }

  /* Lobby 类别网格 — 更紧凑 */
  #catGrid { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
  #catGrid > div { padding: 10px 6px !important; border-radius: 12px !important; }
  #catGrid > div > div:first-child { font-size: 22px !important; }
  #catGrid > div > div:nth-child(2) { font-size: 12px !important; }
  #catGrid > div > div:last-child { font-size: 11px !important; }

  /* MemoryDuel 模式切换 */
  .mode-row { gap: 6px; }
  .mode-btn { padding: 8px 14px; font-size: 13px; }

  /* Start 按钮更宽 */
  #btnStart { font-size: 15px !important; padding: 12px 24px !important; width: 100%; max-width: 320px; }

  /* Ready / End 面板 */
  #readyPanel, #endPanel { padding: 20px 16px !important; }
  #readyPanel h2, #endPanel h2 { font-size: 20px; }
  #endPanel .big-score { font-size: 36px !important; }
  #endPanel button { font-size: 14px; padding: 10px 20px; }

  /* Online 房间码输入 */
  #onlinePanel .mode-row { gap: 6px; }
  #onlinePanel .mode-btn { padding: 7px 12px; font-size: 12px; }
  .online-code-row input { width: 160px; font-size: 16px; padding: 8px 10px; }
  .online-code-row .btn { padding: 8px 14px; font-size: 13px; }
}

/* ============================================================
   B2 · 状态组件 (DUEL-DS §3.7)
   原则: 数据区块必须有 loading / empty / error 三态, 禁止 alert()
   ============================================================ */

/* ---------- Skeleton 骨架屏 ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft, #f1f3f5);
  border-radius: var(--r-sm);
  color: transparent;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: sk-shimmer 1.6s infinite;
}
@keyframes sk-shimmer { 100% { transform: translateX(100%); } }
.skeleton--text { height: 14px; margin: 4px 0; }
.skeleton--text-sm { height: 10px; margin: 3px 0; }
.skeleton--card { height: 120px; border-radius: var(--r); }
.skeleton--board { height: 220px; border-radius: var(--r); }
html[data-theme="dark"] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
}

/* ---------- Empty 空态 ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3, 12px);
  padding: var(--s-8, 32px) var(--s-4, 16px);
  text-align: center;
  color: var(--m, #6b7280);
}
.empty .empty-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: var(--bg-soft, #f1f3f5);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.empty .empty-title { font-size: 15px; font-weight: 700; color: var(--t, #293645); }
.empty .empty-desc { font-size: 13px; max-width: 320px; }
.empty .empty-action { margin-top: var(--s-2, 8px); }

/* ---------- ErrorState 错误态 ---------- */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3, 12px);
  padding: var(--s-8, 32px) var(--s-4, 16px);
  text-align: center;
}
.error-state .error-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: var(--danger-l, #fef2f2);
  color: var(--danger, #dc2626);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.error-state .error-title { font-size: 15px; font-weight: 700; color: var(--t, #293645); }
.error-state .error-desc { font-size: 13px; color: var(--m, #6b7280); max-width: 340px; }
.error-state .error-action { margin-top: var(--s-2, 8px); }
