/* =========================================================
   脑力操练所 — 设计系统 (main.css)
   编辑风 / 科学感 · 暖纸底 · 墨色 · 珊瑚强调色
   保留所有 JS 依赖的 ID/class；离线 · 无 CDN · 无 emoji
   ========================================================= */

:root {
  /* 调色板：暖纸 + 墨色 + 珊瑚强调 */
  --paper: #FBF8F1;
  --paper-2: #F4EFE4;
  --surface: #FFFFFF;
  --surface-2: #F3EEE3;
  --surface-3: #EAE3D4;

  --ink: #15161F;
  --ink-1: #2A2C39;
  --ink-2: #3A3D4D;
  --muted: #6E6A5C; /* [P1-2026-07-27] M2 WCAG AA: #8A8678→#6E6A5C,与下方单点 :root 合并 */
  --faint: #8C8678; /* 同上 */

  --text-soft: #6B6E7B;
  --text-faint: #9aa3b8;
  --good: #1F9D7A;

  --coral: #FF5A36;
  --coral-strong: #E8431F;
  --coral-soft: #FFE7DF;
  --sage: #1F9D7A;
  --sage-soft: #DEF2EB;
  --gold: #E0922B;
  --gold-soft: #FBEBD2;

  --line: rgba(21, 22, 31, 0.10);
  --line-strong: rgba(21, 22, 31, 0.16);

  --ring: rgba(255, 90, 54, 0.32);
  --shadow-sm: 0 1px 2px rgba(21, 22, 31, 0.05), 0 2px 8px rgba(21, 22, 31, 0.05);
  --shadow-md: 0 8px 24px rgba(21, 22, 31, 0.09), 0 2px 8px rgba(21, 22, 31, 0.05);
  --shadow-lg: 0 24px 60px rgba(21, 22, 31, 0.18);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --space-1: 6px;
  --space-2: 12px;
  --space-3: 18px;
  --space-4: 26px;
  --space-5: 40px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --maxw: 1080px;
  --trans: 170ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 520px at 100% -8%, rgba(255, 90, 54, 0.07), transparent 60%),
    radial-gradient(900px 480px at -8% 4%, rgba(31, 157, 122, 0.06), transparent 55%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-3); }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 248, 241, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 62px; max-width: var(--maxw); margin: 0 auto; padding: 10px var(--space-3);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; flex-shrink: 0; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.nav-links {
  display: flex; gap: 4px; margin-left: auto; align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink-2); font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 10px;
  transition: var(--trans);
  white-space: nowrap; flex-shrink: 0;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }

.user-badge {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface-2); padding: 5px 12px 5px 6px; border-radius: 999px;
  transition: var(--trans); border: 1px solid var(--line);
}
.user-badge:hover { background: var(--surface-3); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 13px; flex: none;
}
.user-badge .uname { font-size: 13px; font-weight: 700; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 通用组件 ---------- */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  background: var(--coral); color: #fff; font-weight: 750; font-size: 15px;
  padding: 12px 20px; border-radius: 13px; transition: var(--trans);
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--coral-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--ink-2); }
.btn.ghost { background: transparent; color: var(--coral); box-shadow: none; }
.btn.ghost:hover { background: var(--coral-soft); }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 26px; font-size: 16px; border-radius: 15px; }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: 11px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.card {
  background: var(--surface); border-radius: var(--radius); padding: var(--space-4);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: var(--trans);
}
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: var(--coral-soft); color: var(--coral-strong);
}
.tag.good { background: var(--sage-soft); color: var(--sage); }
.tag.warn { background: var(--gold-soft); color: var(--gold); }
.tag.bad { background: var(--coral-soft); color: var(--coral-strong); } /* [P2-2026-07-27] #FBE0E2 → --coral-soft */
.tag.sm { font-size: 11px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.tag.alt { background: var(--sage-soft); color: var(--sage); }

/* ---------- 首页 Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-5);
  align-items: stretch; margin-top: var(--space-5);
}
.hero-main { display: flex; flex-direction: column; gap: var(--space-3); }
.eyebrow { color: var(--coral-strong); font-weight: 800; letter-spacing: 0.4px; font-size: 13px; text-transform: uppercase; }
.hero h1 { font-size: clamp(30px, 5.4vw, 46px); margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 850; }
.hero p.lead { color: var(--ink-2); margin: 0; font-size: 16px; max-width: 48ch; }
.hero-cta { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-1); }

.brain-age-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--space-4);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; box-shadow: var(--shadow-md);
}
.brain-age-card::before {
  content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -70px;
  border-radius: 50%; border: 2px dashed var(--line-strong); opacity: 0.7; pointer-events: none;
}
.brain-age-card::after {
  content: ""; position: absolute; width: 130px; height: 130px; right: -30px; top: -30px;
  border-radius: 50%; border: 2px dashed var(--coral-soft); pointer-events: none;
}
.brain-age-card .label { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0.3px; }
.brain-age-num {
  font-size: clamp(56px, 12vw, 86px); font-weight: 850; line-height: 1; letter-spacing: -0.03em;
  color: var(--ink); position: relative;
}
.brain-age-num::after { content: " 岁"; font-size: 0.34em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.brain-age-num.muted { color: var(--faint); }
.brain-age-num.muted::after { content: ""; }
.brain-age-num.partial { color: var(--coral-strong); }
.brain-age-num.partial::after { content: " 岁?"; color: var(--faint); }
.brain-age-sub { font-size: 13px; color: var(--ink-2); }
.ba-disclaimer { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.ba-trend { margin: 2px 0 -2px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ba-trend:empty { display: none; }
.ba-trend-svg { display: block; }
.ba-trend-cap { font-size: 12px; color: var(--ink-2); font-weight: 700; }

.ba-progress {
  margin: 10px auto 2px; padding: 10px 14px; border-radius: 12px;
  background: var(--coral-soft); color: var(--coral-strong); font-weight: 750; font-size: 14px;
  display: flex; flex-direction: column; gap: 4px; max-width: 420px;
}
.ba-progress.full { background: linear-gradient(135deg, var(--coral-soft), var(--sage-soft)); }
.ba-progress .ba-hint { font-weight: 600; font-size: 12px; color: var(--ink-2); }

/* 脑年龄明细：把 43 岁拆成"RT 300ms(+11.2) / Stroop 80ms(+7.5) / 广度 3(+12)"
   —— 解决"我玩这么多还是这个数"的疑惑：玩家一眼看到是哪几项拉高的。 */
.ba-detail {
  margin: 6px auto 8px; padding: 8px 12px; border-radius: 10px;
  background: var(--surface-2, #f7f6f1); color: var(--ink-2);
  font-size: 12px; max-width: 420px; line-height: 1.55;
  display: flex; flex-direction: column; gap: 3px;
}
.ba-detail-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.ba-detail-row.muted { opacity: 0.55; }
.ba-detail-label { font-weight: 600; color: var(--ink-1); min-width: 90px; }
.ba-detail-val { font-variant-numeric: tabular-nums; color: var(--ink-2); flex: 1; text-align: right; font-weight: 600; }
.ba-detail-contrib { font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; font-weight: 750; }
.ba-detail-contrib.up { color: var(--coral-strong, #E0455A); }
.ba-detail-contrib.down { color: var(--sage-strong, #1f9d5b); }
.ba-detail-foot { font-size: 11px; color: var(--text-faint, #9aa3b8); border-top: 1px dashed var(--border, #e3e0d3); padding-top: 4px; margin-top: 2px; line-height: 1.55; }
.ba-detail-foot-line { display: block; }
.ba-detail-foot-line.muted { opacity: 0.7; font-size: 10.5px; }

.streak-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
  background: var(--gold-soft); color: var(--gold); font-weight: 800;
  padding: 7px 14px; border-radius: 999px; font-size: 14px;
}

/* ---------- 游戏卡片网格 ---------- */
.section-title { display: flex; align-items: baseline; gap: 10px; margin: var(--space-5) 0 var(--space-3); }
.section-title h2 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
.section-title .hint { color: var(--muted); font-size: 13px; }

.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.game-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; padding: var(--space-3); }
.game-card .gc-top { display: flex; align-items: center; gap: 12px; }
.gc-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 20px; font-weight: 800; color: #fff; flex: none; box-shadow: var(--shadow-sm);
}
.gc-icon.c1 { background: linear-gradient(135deg, #2A2C3A, #15161F); }
.gc-icon.c2 { background: linear-gradient(135deg, #FF5A36, #E8431F); }
.gc-icon.c3 { background: linear-gradient(135deg, #1F9D7A, #14795C); }
.gc-icon.c4 { background: linear-gradient(135deg, #E0922B, #C9771A); }
.gc-icon.c5 { background: linear-gradient(135deg, #6C5CE7, #4834C4); }
.gc-icon.c6 { background: linear-gradient(135deg, #E36A6A, #C84B4B); } /* [P1-2026-07-27] 蓝色→暖珊瑚,与品牌色板一致 */
.gc-icon.c7 { background: linear-gradient(135deg, #E8436B, #B82E4E); }
.gc-icon.c8 { background: linear-gradient(135deg, #0FA3A3, #0B7C7C); }
.game-card h3 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.game-card .gc-desc { color: var(--ink-2); font-size: 13px; margin: 0; }
.game-card .gc-metric { font-size: 12px; color: var(--muted); margin-top: auto; }
.game-card .gc-go { align-self: flex-start; margin-top: 6px; }

/* ---------- 个人概览 + 印章 ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-4); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid var(--line); }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat .v { font-size: 22px; font-weight: 850; margin-top: 2px; letter-spacing: -0.02em; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); }

.xp-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.xp-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), var(--gold)); border-radius: 999px; transition: width 400ms ease; }

.best-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.best-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--surface-3); }
.best-row:last-child { border-bottom: none; }
.best-row .bk { color: var(--ink-2); }
.best-row .bv { font-weight: 800; }

.stamp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.stamp-cell {
  aspect-ratio: 1 / 1; border-radius: 9px; display: grid; place-items: center;
  font-size: 12px; background: var(--surface-2); color: var(--faint); position: relative;
  border: 1px solid transparent;
}
.stamp-cell.done { background: var(--sage-soft); color: var(--sage); border-color: rgba(31,157,122,0.4); font-weight: 800; }
.stamp-cell.today { box-shadow: 0 0 0 2px var(--coral) inset; }
.stamp-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.stamp-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 游戏页 ---------- */
.game-head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) 0; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 700; padding: 8px 12px; border-radius: 10px; transition: var(--trans); border: 1px solid transparent; }
.back-link:hover { background: var(--surface-2); color: var(--ink); }
.game-title { font-size: 20px; font-weight: 850; letter-spacing: -0.01em; }
.game-page { padding-bottom: var(--space-5); }
#game-root { min-height: 340px; }
#result-area { margin-top: var(--space-3); }

.stage {
  background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
  min-height: 340px; justify-content: center; text-align: center;
}
.stage.flash-good { box-shadow: 0 0 0 3px var(--sage) inset, var(--shadow-sm); }
.stage.flash-bad { box-shadow: 0 0 0 3px var(--coral) inset, var(--shadow-sm); }

.big-num { font-size: clamp(48px, 16vw, 96px); font-weight: 850; line-height: 1; letter-spacing: -0.03em; }
.wait-hint { color: var(--ink-2); }
.tap-zone {
  width: 100%; min-height: 240px; border-radius: var(--radius); display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2); font-size: 18px; font-weight: 800;
  cursor: pointer; user-select: none; transition: background 80ms; border: 1px solid var(--line);
}
.tap-zone.go { background: var(--sage); color: #fff; border-color: transparent; }
.tap-zone.nogo { background: var(--coral); color: #fff; border-color: transparent; }
.tap-zone.ready { background: var(--surface-3); }

.progress-row { width: 100%; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.progress-track { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-track > span { display: block; height: 100%; background: var(--coral); border-radius: 999px; transition: width 200ms; }

/* Stroop 颜色按钮 */
.color-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 440px; }
.color-btn {
  border: 2px solid var(--surface-3); background: var(--surface); border-radius: 14px;
  padding: 14px 6px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: var(--trans); font-weight: 800; color: var(--ink); position: relative;
}
.color-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--ink-2); }
.color-btn:active { transform: translateY(0); }
.color-btn .glyph { font-size: 24px; line-height: 1; }
.color-btn .cname { font-size: 13px; }
.color-btn .keycap {
  position: absolute; top: 4px; right: 6px; font-size: 10px; font-weight: 800; line-height: 1;
  color: var(--ink-2); /* [P1-2026-07-27] --ink-3 未定义,改 --ink-2 */
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 1px 4px;
}
.color-word { font-size: clamp(40px, 12vw, 64px); font-weight: 850; letter-spacing: 4px; }

/* 数字广度 */
.span-display { font-size: clamp(40px, 12vw, 64px); font-weight: 850; letter-spacing: 12px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; width: 100%; margin: 0 auto; }
.keypad button {
  height: 54px; font-size: 22px; font-weight: 800; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); cursor: pointer; transition: var(--trans); color: var(--ink);
}
.keypad button:hover { background: var(--surface-2); }
.keypad button:active { background: var(--coral-soft); }
.span-input {
  font-size: 28px; font-weight: 850; letter-spacing: 8px; text-align: center; width: 100%;
  border: none; border-bottom: 2px solid var(--surface-3); background: transparent; padding: 8px; color: var(--ink);
}
.span-input:focus { outline: none; border-color: var(--coral); }

/* 速算 */
.problem { font-size: clamp(40px, 13vw, 68px); font-weight: 850; letter-spacing: 2px; }

/* Corsi 空间记忆 */
/* Corsi 方块敲击（空间工作记忆）
   注意：必须显式 width + 像素列宽。否则在 flex 列容器 + align-items:center 中，
   内容（aspect-ratio:1 + 无宽度）的循环依赖会让 grid 坍缩到 ~5px/格，玩家看不见格子。
   与 N-back 同一修复模式。 */
.corsi-grid { display: grid; grid-template-columns: repeat(3, 80px); gap: 14px; width: 268px; margin: 12px auto; justify-content: center; }
.corsi-block {
  width: 80px; height: 80px; aspect-ratio: 1; border: 2px solid var(--line-strong); border-radius: 14px;
  background: var(--surface-2); font-size: 18px; font-weight: 800; color: transparent; cursor: pointer;
  transition: transform .08s, background .12s, color .12s, border-color .12s;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
  display: grid; place-items: center; position: relative;
}
.corsi-block .cnum {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 22px; font-weight: 900; color: #fff;
  pointer-events: none;
}
.corsi-block:hover { background: var(--surface-3); }
.corsi-block.lit { background: linear-gradient(135deg, var(--coral), var(--gold)); color: #fff; transform: scale(1.06); box-shadow: 0 6px 16px rgba(255,90,54,.35); border-color: transparent; }
.corsi-block.flash-good { background: var(--sage); color: #fff; }
.corsi-block.flash-bad { background: var(--coral); color: #fff; }
.timer-pill { background: var(--surface-2); padding: 6px 14px; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; border: 1px solid var(--line); }
.mode-tabs { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.mode-tabs button { border: none; background: transparent; padding: 8px 16px; border-radius: 9px; cursor: pointer; font-weight: 700; color: var(--ink-2); transition: var(--trans); }
.mode-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Trail Making 连线 */
.trail-wrap { display: flex; flex-direction: column; align-items: center; }
.trail-stage {
  position: relative; background: var(--surface-2); border-radius: var(--radius);
  margin: 0 auto; box-shadow: inset 0 0 0 1px var(--line);
}
.trail-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.trail-node {
  position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 2px solid var(--coral); background: var(--surface); color: var(--ink);
  border-radius: 50%; font-size: 15px; font-weight: 850; cursor: pointer;
  display: grid; place-items: center; transition: transform .08s, background .12s, color .12s;
  box-shadow: var(--shadow-sm);
}
.trail-node:hover { transform: scale(1.08); }
.trail-node.done { background: linear-gradient(135deg, var(--coral), var(--gold)); color: #fff; border-color: transparent; }
.trail-node.flash-bad { background: var(--coral); color: #fff; border-color: transparent; }

/* 心智旋转 */
.rot-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; width: 100%; max-width: 420px; }
.rot-opt {
  border: 2px solid var(--surface-3); background: var(--surface); border-radius: 16px;
  padding: 16px; cursor: pointer; transition: var(--trans);
}
.rot-opt:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--ink-2); }
.rot-opt:active { transform: translateY(0); }
.rot-opt.flash-good { background: var(--sage-soft); border-color: var(--sage); }
.rot-opt.flash-bad { background: var(--coral-soft); border-color: var(--coral); }
.rot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 120px; max-width: 120px; margin: 0 auto; }
.rot-cell { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.rot-cell.on { background: linear-gradient(135deg, var(--coral), var(--gold)); border-color: transparent; }
/* 参考图本体：4 候选中位置 0 的修饰样式——视觉上与候选同框但 disabled+不响应 hover/click，
   防止玩家误以为是答案（"谜底就在谜面上"的反例：参考图本体出现在候选池里只是干扰，不是答案）。 */
.rot-opt.rot-ref {
  cursor: default; opacity: 0.9;
  border-style: dashed; border-color: var(--ink-2);
  background: var(--surface-2);
  box-shadow: none; transform: none;
}
.rot-opt.rot-ref:hover { transform: none; box-shadow: none; border-color: var(--ink-2); }
.rot-opt.rot-ref:active { transform: none; }
/* 参考图标签：贴在参考图卡顶部，让"哪张是参考图"在视觉上 100% 明确（用户反馈"图1没标识"）。 */
.rot-label {
  display: block; width: 100%;
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-align: center; padding: 4px 8px; margin-bottom: 8px;
  border-radius: 999px; background: var(--ink-2); color: #fff;
  text-transform: uppercase;
}

/* N-back */
/* 注意：必须显式 width + 像素列宽。否则在 flex 列容器 + align-items:center 中，
   内容（aspect-ratio:1 + 无宽度）的循环依赖会让 grid 坍缩到 ~5px/格，玩家看不见格子。 */
.nback-grid { display: grid; grid-template-columns: repeat(3, 80px); gap: 14px; width: 268px; margin: 0 auto; justify-content: center; }
.nback-cell {
  width: 80px; height: 80px; aspect-ratio: 1; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--line-strong);
  transition: background .12s, transform .08s, border-color .12s;
}
.nback-cell.on { background: linear-gradient(135deg, var(--coral), var(--gold)); border-color: transparent; transform: scale(1.04); }
/* N-back 暂停态：当前亮格变灰半透明，提示"已暂停" */
.nback-cell.on.paused { background: var(--ink-2); /* [P1-2026-07-27] --ink-3 未定义,改 --ink-2 */ opacity: 0.45; transform: none; }

/* 结算 */
.result-title { font-size: 22px; font-weight: 850; letter-spacing: -0.01em; }
.metric-wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 6px 0; }
.metric-box {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 18px; min-width: 110px; border: 1px solid var(--line);
}
.metric-box .mk { font-size: 12px; color: var(--muted); font-weight: 700; }
.metric-box .mv { font-size: 24px; font-weight: 850; margin-top: 2px; letter-spacing: -0.02em; }
.xp-gain { color: var(--sage); font-weight: 850; }
.disclaimer { font-size: 11px; color: var(--muted); margin-top: var(--space-2); max-width: 60ch; line-height: 1.4; }

/* ---------- 弹窗 / Onboarding ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(21, 22, 31, 0.46);
  display: grid; place-items: center; padding: var(--space-3);
  opacity: 0; pointer-events: none; transition: opacity 200ms ease;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-4);
  width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  transform: translateY(8px) scale(0.98); transition: transform 220ms ease;
  /* 内容过长时 modal 内部可滚动，避免被屏高截断（与 .share-modal 同模式） */
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
}
.overlay.show .modal { transform: translateY(0) scale(1); }
.modal h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.01em; }
.modal p { color: var(--ink-2); margin: 0 0 var(--space-3); font-size: 14px; }

/* 分享卡弹窗：宽度放宽到 580，画布按容器等比缩放，模态整体可滚动避免被屏高截断 */
.share-modal { max-width: 580px; max-height: 92vh; overflow-y: auto; }
.share-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.share-head .share-sub { font-size: 12px; color: var(--muted); font-weight: 600; flex: 1; }
.share-head .share-x {
  appearance: none; border: none; background: var(--surface-2); color: var(--ink-2);
  width: 32px; height: 32px; border-radius: 10px; font-size: 20px; font-weight: 700;
  cursor: pointer; line-height: 1; transition: var(--trans);
}
.share-head .share-x:hover { background: var(--surface-3); color: var(--ink); }
#share-canvas-wrap { width: 100%; }

.field { margin-bottom: var(--space-3); }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.field input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  font-size: 15px; background: var(--surface-2); color: var(--ink);
}
.field input[type="text"]:focus { outline: none; border-color: var(--coral); background: #fff; }
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatch {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: var(--trans);
}
.color-swatch.sel { border-color: var(--ink); transform: scale(1.1); }

#daily-overlay .modal { max-width: 560px; }
#daily-root { width: 100%; }

/* ---------- 排行榜 ---------- */
.lb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-top: 4px; }
.lb-title { font-size: clamp(24px, 4vw, 32px); margin: 0; letter-spacing: -0.02em; font-weight: 850; }
.lb-sub { color: var(--ink-2); margin: 4px 0 0; font-size: 14px; max-width: 46ch; }
.lb-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.lb-select {
  appearance: none; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--ink);
  padding: 10px 38px 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%238A8678' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat right 14px center;
  cursor: pointer;
}
.lb-note { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--coral); padding: 12px 14px; border-radius: 12px; margin: 14px 0 0; }
.lb-summary { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.lb-summary-empty { color: var(--ink-2); font-weight: 600; }
.lb-empty-hint { display: block; margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.lb-rank-big { font-size: 40px; font-weight: 850; letter-spacing: -0.03em; color: var(--coral-strong); line-height: 1; }
.lb-rank-of { font-size: 18px; color: var(--faint); font-weight: 700; }
.lb-rank-meta { font-size: 14px; color: var(--ink-2); }
.lb-rank-you { font-size: 13px; color: var(--muted); font-weight: 700; }
.lb-list { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow: auto; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.lb-row:last-child { border-bottom: none; }
.lb-row.top .lb-pos { background: var(--ink); color: var(--paper); }
.lb-row.you { background: var(--coral-soft); border-radius: 10px; font-weight: 800; }
.lb-pos { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-weight: 800; font-size: 13px; flex: none; }
.lb-name { flex: 1; font-weight: 600; }
.lb-val { font-weight: 850; font-variant-numeric: tabular-nums; }

/* ---------- 动画 ---------- */
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 300ms ease both; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.pulse { animation: pulse 1.2s ease-in-out infinite; }

/* ---------- L2 明细区(8 款全展示) ---------- */
.l2-overview { margin-top: var(--space-4); }
.l2-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.l2-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color 200ms ease, transform 200ms ease;
  text-decoration: none; color: inherit;
}
.l2-row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.l2-row:active { transform: translateY(0); }
.l2-row:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.l2-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-weight: 800; font-size: 14px; color: #fff; flex-shrink: 0; }
.l2-icon.c1 { background: var(--coral); }
.l2-icon.c2 { background: #12B3A6; }
.l2-icon.c3 { background: #C28B7B; } /* [P0-2026-07-27] 替换靛蓝 #5B6FF5,选暖色尘玫瑰与 c1 珊瑚/c2 青/c4 紫区分 */
.l2-icon.c4 { background: #7C5CFC; }
.l2-icon.c5 { background: #1f9d5b; }
.l2-icon.c6 { background: #E08A1E; }
.l2-icon.c7 { background: #E0455A; }
.l2-icon.c8 { background: #2E3A59; }
.l2-body { flex: 1; min-width: 0; }
.l2-name { font-weight: 750; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.l2-best { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.l2-best .muted { color: var(--muted); }
.l2-tags { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.l2-tag-core { background: var(--coral-soft); color: var(--coral-strong); }
.l2-tag-train { background: var(--surface-2); color: var(--ink-2); }
.l2-today { font-size: 10.5px; color: var(--sage-strong, #1f9d5b); font-weight: 750; margin-left: 4px; }

/* ---------- Mastermind 密码破译 ---------- */
.mastermind-root { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 0; }
.mm-title { font-size: 15px; color: var(--ink-2); text-align: center; }
.mm-board { display: flex; flex-direction: column; gap: 4px; width: 280px; max-width: 100%; }
.mm-h-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); }
.mm-h-num { font-size: 12px; color: var(--muted); font-weight: 700; min-width: 18px; }
.mm-h-pegs { display: flex; gap: 5px; flex: 1; justify-content: center; }
.mm-h-fb { display: flex; align-items: center; gap: 4px; min-width: 72px; }
.mm-mini { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ink); vertical-align: middle; margin: 0 1px; }
.mm-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.mm-dot.black { background: var(--ink); border: 2px solid var(--ink); }
.mm-dot.white { background: #fff; border: 2px solid var(--ink); }
.mm-dot.empty { background: transparent; border: 2px dashed var(--ink-2); }
.mm-legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin: 8px auto 16px; font-size: 13px; color: var(--muted); }
.mm-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.mm-current { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.mm-row { display: flex; gap: 5px; }
.mm-peg { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink-2); }
.mm-peg.empty { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.mm-fb { display: flex; gap: 3px; min-width: 38px; }
.mm-go { padding: 6px 12px; font-size: 13px; }
.mm-palette { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.mm-swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); cursor: pointer; transition: transform 150ms ease; }
.mm-swatch:hover { transform: scale(1.08); }
.mm-status { font-size: 13px; color: var(--ink-2); font-weight: 700; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: all 240ms ease; z-index: 200;
}
.toast.top { top: 80px; }
.toast.top.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bottom { bottom: 26px; transform: translateX(-50%) translateY(20px); }
.toast.bottom.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 引导高亮:今日训练按钮呼吸动画,引导用户视线 */
.hero-cta-pulse {
  animation: heroPulse 1.1s ease-in-out 3;
  box-shadow: 0 0 0 0 rgba(232, 67, 31, 0.55);
}
@keyframes heroPulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 67, 31, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(232, 67, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 67, 31, 0); }
}

/* ---------- 首页 · 参考群体入口 ---------- */
.lb-entry { margin-top: var(--space-4); }
.lb-entry-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.lb-entry-title { margin: 6px 0 4px; font-size: 20px; }
.lb-entry-sub { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; line-height: 1.55; }
@media (max-width: 520px) {
  .lb-entry-inner { flex-direction: column; align-items: flex-start; }
  .lb-entry .btn { width: 100%; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 中等视窗（~860-1080px）：导航链接可能挤爆，nav-links 横向滚动避免挤压变形 */
@media (max-width: 1080px) {
  .nav-inner { flex-wrap: nowrap; }
  .nav-links {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 2px 0; max-width: 100%;
  }
  .nav-links::-webkit-scrollbar { display: none; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  /* 手机端单列布局：brand + 导航上下堆叠；导航可横向滚动 */
  .nav-inner { flex-wrap: wrap; padding: 8px var(--space-3); }
  .nav-links { width: 100%; margin-left: 0; margin-top: 4px; }
}
@media (max-width: 520px) {
  .game-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .color-grid { grid-template-columns: repeat(4, 1fr); }
  .rot-row { grid-template-columns: 1fr; }
}

/* ===== SEO 说明区块（静态可爬取 + 透明化口径） ===== */
.seo-explain {
  margin: 26px 0 4px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.seo-explain h2 { font-size: 18px; margin: 0 0 10px; }
.seo-explain p { margin: 0 0 10px; color: var(--muted); line-height: 1.75; font-size: 14px; }
.seo-explain p:last-child { margin-bottom: 0; }
.seo-explain .seo-note { font-size: 12.5px; opacity: .85; }

.ability-map {
  margin: 30px 0;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius); /* [P1-2026-07-27] 18px→var(--radius) 统一 */
}
.ability-map h2 { font-size: 20px; margin: 0 0 10px; }
.ability-map p { color: var(--muted); line-height: 1.8; font-size: 14px; margin: 0 0 12px; }
.ability-map .am-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}
.ability-map .am-list a {
  display: block; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 13.5px;
}
.ability-map .am-list a:hover { border-color: var(--coral); color: var(--coral-strong); }

/* ===== Flip 配对联想记忆 ===== */
.flip-root { max-width: 560px; margin: 0 auto; text-align: center; }
.flip-title { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.flip-title strong { color: var(--coral-strong); }
.flip-study { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.flip-pair { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.flip-sym { font-size: 28px; }
.flip-arrow { color: var(--muted); font-size: 16px; }
.flip-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.flip-name { font-size: 13px; color: var(--muted); }
.flip-status { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 18px; }
.flip-q { margin: 8px 0 16px; }
.flip-q-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.flip-q-sym { font-size: 44px; }
.flip-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 12px; max-width: 360px; margin: 0 auto; }
.flip-opt { width: 54px; height: 54px; border-radius: 14px; border: 2px solid rgba(0,0,0,.12); cursor: pointer; transition: transform .08s; }
.flip-opt:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ===== Barista（面孔工作记忆）===== */
.barista-root { max-width: 720px; margin: 0 auto; text-align: center; padding: 0 8px; }
.barista-title { font-size: 16px; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }
.barista-title strong { color: var(--coral-strong); font-size: 18px; }
.barista-study { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.barista-cust { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; min-height: 132px; }
.barista-face { font-size: 64px; line-height: 1; }
.barista-dot { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.barista-name { font-size: 14px; color: var(--muted); font-weight: 500; }
.barista-status { margin-top: 14px; font-size: 15px; color: var(--muted); min-height: 22px; }
.barista-status strong { color: var(--coral-strong); font-size: 17px; }
.barista-q { margin: 12px 0 22px; }
.barista-q-label { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.barista-q-face { font-size: 80px; line-height: 1; }
.barista-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 420px; margin: 0 auto; }
.barista-opt { width: 100%; height: 84px; border-radius: 16px; border: 2px solid rgba(0,0,0,.12); cursor: pointer; transition: transform .08s, box-shadow .12s; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.barista-opt:hover { transform: translateY(-2px); box-shadow: var(--shadow-md), inset 0 0 0 2px rgba(255,255,255,.5); }
.barista-opt:active { transform: scale(.96); }
@media (max-width: 520px) { .barista-study { grid-template-columns: repeat(2, 1fr); } .barista-q-face { font-size: 64px; } .barista-opt { height: 72px; } }

/* ===== 视觉搜索（找靶）===== */ /* [P1-2026-07-27] 原 vs-grid/vs-tile 零 CSS,375px 被压成细条 */
.vs-grid { display: grid; gap: 6px; width: 100%; max-width: 320px; margin: 0 auto; aspect-ratio: 1; }
.vs-tile { aspect-ratio: 1; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: clamp(20px, 5vw, 28px); line-height: 1; cursor: pointer; display: grid; place-items: center; transition: transform .08s, background .12s, border-color .12s; -webkit-tap-highlight-color: transparent; }
.vs-tile:hover { border-color: var(--line-strong); }
.vs-tile:active { transform: scale(.94); }
.vs-tile.target { /* 不在视觉上提前透露,仅以 data-target 标记 */ }
.vs-tile.hit { background: var(--sage-soft); border-color: var(--sage); color: var(--sage); }
.vs-tile.miss { background: var(--coral-soft); border-color: var(--coral); color: var(--coral-strong); }
.vs-tile.reveal { background: var(--gold-soft); border-color: var(--gold); }

/* ===== Dolly（规划/汉诺塔）===== */
.dolly-root { max-width: 560px; margin: 0 auto; text-align: center; }
.dolly-status { font-size: 14px; color: var(--muted); margin-bottom: 18px; min-height: 20px; }
.dolly-towers { display: flex; justify-content: center; align-items: flex-end; gap: 28px; height: 220px; padding: 0 8px 8px; }
.dolly-tower { position: relative; width: 120px; height: 200px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; cursor: pointer; border-radius: 8px; transition: background .12s; }
.dolly-tower::before { content: ''; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 180px; background: linear-gradient(180deg, var(--ink-2), var(--ink)); border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; }
.dolly-tower::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 8px; background: linear-gradient(180deg, var(--ink-1), var(--ink)); border-radius: 4px; box-shadow: 0 2px 0 rgba(0,0,0,.1); pointer-events: none; }
.dolly-tower.dolly-sel { background: rgba(255, 90, 54, .10); }
.dolly-disk { width: 80%; height: 24px; margin-top: 4px; border-radius: 6px; background: linear-gradient(180deg, var(--coral), var(--coral-strong)); border: 1px solid rgba(0,0,0,.12); }

/* ===== Bubl（数字找和）===== */
.bubl-root { max-width: 560px; margin: 0 auto; text-align: center; }
.bubl-status { font-size: 14px; color: var(--muted); margin-bottom: 18px; min-height: 20px; }
.bubl-board { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 480px; margin: 0 auto; }
.bubl-bubble { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(0,0,0,.12); background: var(--surface-2); font-size: 22px; font-weight: 600; color: var(--ink); cursor: pointer; transition: transform .08s, box-shadow .12s; }
.bubl-bubble:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bubl-bubble:active { transform: scale(.94); }
.bubl-bubble.sel { border-color: var(--coral); box-shadow: 0 0 0 3px var(--ring); transform: translateY(-2px); } /* [P0-2026-07-27] 替换靛蓝 #5B6FF5 */

/* ===== Pattern Matrix（图形矩阵推理）===== */
.pm-root { max-width: 560px; margin: 0 auto; text-align: center; }
.pm-status { font-size: 13px; color: var(--muted); margin: 6px 0 16px; min-height: 18px; }
.pm-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 250px; margin: 0 auto 18px; }
.pm-cell { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.pm-cell-empty { border-style: dashed; }
.pm-cell-empty.pm-reveal { border-style: solid; }
.pm-q { font-size: 40px; color: var(--muted); }
.pm-tile { width: 56px; height: 56px; border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.pm-shape-circle { border-radius: 50%; }
.pm-shape-square { border-radius: 8px; }
.pm-shape-triangle { border-radius: 0; clip-path: polygon(50% 2%, 98% 98%, 2% 98%); }
.pm-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 320px; margin: 0 auto; }
.pm-opt { height: 72px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 2px solid rgba(0,0,0,.12); border-radius: 14px; cursor: pointer; transition: transform .08s, box-shadow .08s; padding: 0; }
.pm-opt:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pm-opt:disabled { cursor: default; }
.pm-opt.pm-correct { border-color: var(--coral-strong); box-shadow: 0 0 0 2px var(--coral-soft); }
.pm-opt.pm-wrong { border-color: #e5484d; opacity: .7; }
.pm-next { margin-top: 18px; }

/* ===== 认知科普 / 文章页 (SEO 内容层) ===== */
.article { max-width: 760px; margin: 0 auto; padding: 26px 20px 44px; }
.article-nav { margin-bottom: 16px; }
.article-nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
.article-nav a:hover { color: var(--coral-strong); }
.article-header { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 20px; }
.article-header .a-kicker { color: var(--coral-strong); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.article-header h1 { font-size: 26px; line-height: 1.32; margin: 8px 0 10px; }
.article-header .a-meta { color: var(--muted); font-size: 12.5px; }
.article-body { line-height: 1.85; font-size: 15.5px; color: var(--ink-2); }
.article-body h2 { font-size: 20px; margin: 28px 0 10px; color: var(--ink); }
.article-body h3 { font-size: 16.5px; margin: 20px 0 8px; color: var(--ink); }
.article-body p { margin: 0 0 14px; }
.article-body ul, .article-body ol { margin: 0 0 14px; padding-left: 22px; }
.article-body li { margin: 6px 0; }
.article-body strong { color: var(--ink); }
.article-body .callout { background: var(--surface-2); border-left: 3px solid var(--coral); padding: 12px 14px; border-radius: 0 10px 10px 0; margin: 16px 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.article-related { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.article-related h2 { font-size: 18px; margin: 0 0 12px; }
.article-related .ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.article-related a { display: block; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.article-related a:hover { border-color: var(--coral); }
.article-related .ar-t { font-size: 14px; font-weight: 600; }
.article-related .ar-d { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.article-disclaimer { margin-top: 28px; padding: 14px; background: var(--surface-2); border-radius: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
/* 科普 hub */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 22px 0; }
.topic-card { display: block; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: transform .1s, box-shadow .1s; }
.topic-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--coral); }
.topic-card .tc-k { color: var(--coral-strong); font-size: 12.5px; letter-spacing: .03em; }
.topic-card h3 { font-size: 18px; margin: 6px 0 8px; }
.topic-card p { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 0; }

/* ===== 单游戏结算页(2026-07-25 P0:14 款 .html 统一) ===== */
.result-card { max-width: 520px; margin: 32px auto; padding: 28px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); /* [P1-2026-07-27] 18px→var(--radius) 统一 */ box-shadow: var(--shadow-md); text-align: center; display: flex; flex-direction: column; gap: var(--space-2); align-items: center; }
.result-head { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 14px; }
.result-eyebrow { font-size: 12px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.badge.new-best { display: inline-block; padding: 4px 10px; background: linear-gradient(135deg, #f5b850, #e88a3a); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; box-shadow: 0 2px 6px rgba(232,138,58,.3); }
.result-primary { font-size: 28px; font-weight: 700; color: var(--ink); margin: 8px 0 18px; line-height: 1.3; word-break: break-word; }
.result-rows { background: var(--surface-2); border-radius: 12px; padding: 10px 0; margin: 14px 0 22px; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px; font-size: 14px; }
.result-row + .result-row { border-top: 1px dashed rgba(0,0,0,.08); }
.rr-label { color: var(--muted); }
.rr-val { font-weight: 600; color: var(--ink); }
.result-actions { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; }
.result-actions .btn { width: 100%; justify-content: center; min-width: 0; white-space: nowrap; }
@media (min-width: 480px) { .result-actions { grid-template-columns: 1fr 1fr; gap: 12px 10px; } }

/* 难度进阶条（结算页）：把"难度随表现爬阶"显式呈现，制造复玩动机 */
.result-prog { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; margin: 4px 0 14px; display: flex; flex-direction: column; gap: 3px; }
.rp-cur { font-size: 13px; font-weight: 700; color: var(--coral); letter-spacing: .02em; }
.rp-note { font-size: 13px; color: var(--muted); }

/* 游戏内难度阶位徽章 + 计时器（统一视觉） */
.lvl-badge { display: inline-block; padding: 2px 9px; background: var(--coral-soft); color: var(--coral-strong); font-size: 12px; font-weight: 700; border-radius: 999px; margin-right: 4px; }
.bubl-timer, .flip-timer, .barista-timer, .pm-timer { font-size: 13px; font-weight: 600; color: var(--text-faint); margin: 4px 0 2px; min-height: 18px; }
.bubl-timer::before, .flip-timer::before, .barista-timer::before, .pm-timer::before { content: ''; }

/* ===== 评测修复(2026-07-26) ===== */
/* H2:移动端导航——此前 .hide-sm 类被引用却未定义,14 个游戏链接在 375px 横滚。桌面显示、移动隐藏。 */
.hide-sm { display: none; }
@media (min-width: 761px) { .hide-sm { display: inline-flex; } }

/* ============== 多维能力雷达 + 测试报告 ============== */
.radar-section { text-align: center; }
.radar-wrap { display: flex; justify-content: center; margin: 8px 0 4px; }
.radar-svg { max-width: 100%; height: auto; }
.radar-empty { padding: 48px 0; font-size: 14px; }
.radar-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.rl-item { display: inline-flex; align-items: center; gap: 6px; }
.rl-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rl-item.rl-off { color: var(--faint); }

/* 报告弹窗 */
.report-modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(21, 22, 31, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 18px; overflow-y: auto;
}
.report-modal[hidden] { display: none; }
.report-card {
  position: relative; width: 100%; max-width: 560px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 26px 24px; text-align: left;
}
.report-close {
  position: absolute; top: 12px; right: 14px;
  border: none; background: var(--surface-2); color: var(--ink-2);
  width: 30px; height: 30px; border-radius: 50%; font-size: 15px; cursor: pointer;
}
.report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.report-head h2 { margin: 2px 0 0; font-size: 20px; }
.report-ba { text-align: center; flex-shrink: 0; }
.rb-num { font-size: 40px; font-weight: 800; line-height: 1; color: var(--coral); }
.rb-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.report-radar { display: flex; justify-content: center; margin: 6px 0 14px; }
.report-rows { display: flex; flex-direction: column; gap: 9px; }
.rp-row { display: grid; grid-template-columns: 84px 1fr 70px; align-items: center; gap: 10px; font-size: 13.5px; }
.rp-name { color: var(--ink-2); font-weight: 600; }
.rp-bar { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.rp-bar i { display: block; height: 100%; border-radius: 6px; }
.rp-bar i.t-strong { background: var(--sage); }
.rp-bar i.t-mid { background: var(--gold); }
.rp-bar i.t-low { background: var(--coral); }
.rp-bar.off { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--faint); }
.rp-score { text-align: right; color: var(--ink-2); font-weight: 700; }
.rp-score small { font-weight: 600; color: var(--muted); font-size: 11px; }
.report-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 12px 14px; background: var(--surface-2);
  border-radius: var(--radius-sm); font-size: 14px;
}
.report-disclaimer { margin-top: 14px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* 数据管理卡样式已移除：导出/导入 UI 不再出现在产品页（数据收集不再依赖产品页）。 */

