:root {
  --bg: #f4f5fb;
  --card: #ffffff;
  --primary: #4f46e5;
  --primary-d: #4338ca;
  --primary-l: #eef0fe;
  --accent: #f59e0b;
  --text: #1f2430;
  --muted: #8a90a2;
  --line: #eceef4;
  --ok: #16a34a;
  --bad: #ef4444;
  --shadow: 0 6px 20px rgba(31, 36, 48, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: #dfe2ee;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.08);
}

/* 顶部栏 */
#topbar {
  background: linear-gradient(135deg, var(--primary), #7c6cf6);
  color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 14px;
}
.topbar-inner { display: flex; align-items: baseline; gap: 10px; }
#topbar-title { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
#topbar-sub { font-size: 12px; opacity: 0.85; }

/* 顶部返回箭头（仅在非主 Tab 页显示，由 app_n.js 的 setBack 控制） */
.topbar-back {
  flex: none; align-self: center; margin-right: 4px;
  width: 30px; height: 30px; padding: 0 2px 1px 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: #fff;
  font-size: 20px; font-weight: 700; line-height: 1;
  cursor: pointer; transition: transform .08s, background .2s;
}
.topbar-back:active { transform: scale(0.92); background: rgba(255,255,255,0.34); }

/* 主视图 */
#view { flex: 1; padding: 16px 16px 18px; overflow-y: auto; }
#view::-webkit-scrollbar { width: 0; }

/* 底部导航 */
#tabbar {
  display: flex;
  flex: none;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab {
  flex: 1; text-align: center; text-decoration: none; color: var(--muted);
  padding: 8px 0 6px; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tab .tab-ico { font-size: 20px; line-height: 1; filter: grayscale(0.4); }
.tab.active { color: var(--primary); }
.tab.active .tab-ico { filter: none; }

/* 通用卡片 */
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 700;
  background: var(--primary); color: #fff; cursor: pointer; transition: transform .08s, opacity .2s;
  width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn.ghost { background: var(--primary-l); color: var(--primary); }
.btn.gold { background: linear-gradient(135deg, #f59e0b, #f97316); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.sm { padding: 8px 14px; font-size: 13px; width: auto; }

.section-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 18px 4px 10px; }

/* 首页打卡条 */
.checkin {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border-radius: var(--radius); padding: 18px 16px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow);
}
.checkin .ci-left .ci-days { font-size: 30px; font-weight: 800; line-height: 1; }
.checkin .ci-left .ci-label { font-size: 12px; opacity: 0.9; margin-top: 4px; }
.checkin .ci-btn { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.5); color:#fff; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 700; }
/* 七日登录入口（复用 checkin 外观） */
.login-entry { background: linear-gradient(135deg, #f59e0b, #ef7d3a); }

/* 每日训练卡片 */
.daily-card {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow);
  cursor: pointer;
}
.daily-card .dc-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-l); display:flex; align-items:center; justify-content:center; font-size: 22px; }
.daily-card .dc-body { flex: 1; }
.daily-card .dc-body .dc-name { font-weight: 700; font-size: 15px; }
.daily-card .dc-body .dc-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.daily-card .dc-state { font-size: 13px; font-weight: 700; }
.daily-card.done .dc-state { color: var(--ok); }
.daily-card.todo .dc-state { color: var(--primary); }
.daily-card.locked { opacity: .65; }

/* 自由练习网格 */
.practice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.practice-item { background: var(--card); border-radius: var(--radius); padding: 14px 10px; box-shadow: var(--shadow); cursor: pointer; }
.practice-item .pi-ico { font-size: 24px; }
.practice-item .pi-name { font-weight: 700; font-size: 13px; margin-top: 6px; }
.practice-item .pi-desc { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.practice-item .pi-lock { color: var(--accent); font-size: 11px; margin-top: 6px; font-weight: 700; }

/* Banner 广告 */
.banner-ad {
  flex: none;
  background: #fff7e6; border-top: 1px solid #ffe2a8; display: flex; align-items: center;
  gap: 8px; padding: 8px 12px; font-size: 12px;
}
.banner-ad .banner-tag { background: #ffb020; color:#fff; border-radius: 4px; padding: 1px 5px; font-size: 10px; }
.banner-ad .banner-text { flex: 1; color: #92640b; }
.banner-ad .banner-btn { background: var(--accent); color:#fff; border:none; border-radius: 14px; padding: 5px 12px; font-size: 12px; font-weight: 700; }

/* 通用弹窗遮罩 */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.overlay.hidden, .hidden { display: none !important; }
.sheet {
  background: #fff; border-radius: 18px; padding: 20px; width: 100%; max-width: 360px;
  text-align: center; box-shadow: var(--shadow); animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sheet h3 { margin: 0 0 8px; font-size: 17px; }
.sheet p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.sheet .sheet-actions { display: flex; gap: 10px; }
.sheet .sheet-actions .btn { margin: 0; }

/* 成就海报（canvas 生成的图片，长按保存） */
.poster-box { display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 92vh; }
.poster-img {
  max-width: 66vw; max-height: 62vh; border-radius: 16px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .45); animation: pop .2s ease;
}
.poster-tip { color: rgba(255, 255, 255, .9); font-size: 12px; }
.poster-box .btn { max-width: 66vw; }

/* 模拟广告 */
.ad-modal { background:#111; color:#fff; border-radius: 16px; width:100%; max-width: 340px; padding: 0; overflow: hidden; }
.ad-modal .ad-head { display:flex; justify-content: space-between; padding: 8px 12px; font-size: 12px; color:#bbb; }
.ad-modal .ad-screen { height: 200px; display:flex; align-items:center; justify-content:center; background: repeating-linear-gradient(45deg,#1f2937,#1f2937 12px,#111827 12px,#111827 24px); color:#9ca3af; font-size: 14px; }
.ad-modal .ad-foot { padding: 12px; }
.ad-modal .ad-count { font-size: 12px; color:#fbbf24; margin-bottom: 8px; }
.ad-modal .ad-close { background:#374151; color:#fff; border:none; border-radius: 10px; padding: 10px; width:100%; font-weight:700; }

/* ===== 游戏区通用 ===== */
.game-wrap { display: flex; flex-direction: column; min-height: 100%; }
.game-head { display:flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.game-head .gh-title { font-weight: 800; font-size: 17px; }
.game-head .gh-stat { font-size: 22px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.game-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.big-btn {
  background: var(--primary); color:#fff; border:none; border-radius: 16px;
  padding: 18px 28px; font-size: 18px; font-weight: 800; cursor: pointer; width: 100%;
}
.big-btn:active { transform: scale(.98); }

/* 舒尔特网格（24 种训练类型：形状 × 内容 × 顺序 × 动静） */
.schulte-stage {
  position: relative;
  width: 100%; max-width: 340px; margin: 0 auto; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
/* 圆形载体：同心圆环（一层套一层），格子沿环均匀分布 */
/* 环层铺满整个舞台，必须让事件穿透，否则外层会挡住内层格子导致只有最外环可点 */
.ring-layer { position: absolute; inset: 0; pointer-events: none; }
.ring-cell {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); border-radius: 50%; background: #fff;
  cursor: pointer; user-select: none; transition: background .1s;
  pointer-events: auto;   /* 仅格子本身接收点击 */
}
.ring-cell-inner {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--text); line-height: 1;
}
.ring-cell.cell-hanzi .ring-cell-inner { font-weight: 700; }
.ring-cell.done { background: #e8eaf2; color: var(--muted); }
.ring-cell.done .ring-cell-inner { color: var(--muted); }
.ring-cell.err { background: #fee2e2; }
/* 旋转类型：各环独立旋转（内快外慢、相邻反向），环内文字反向自转保持正立 */
.ring-layer.spin { animation: ring-cw var(--rd, 40s) linear infinite; }
.ring-layer.spin.rev { animation-name: ring-ccw; }
.ring-layer.spin .ring-cell-inner { animation: ring-ccw var(--rd, 40s) linear infinite; }
.ring-layer.spin.rev .ring-cell-inner { animation-name: ring-cw; }
@keyframes ring-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes ring-ccw {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* 开局倒计时：3 → 2 → 1 → 开始（结束后开始计时） */
.schulte-countdown {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .82);
  font-size: 64px; font-weight: 900; color: var(--primary);
  border-radius: 14px; user-select: none;
}
.schulte-countdown.pop { animation: cd-pop 1s ease-out; }
@keyframes cd-pop {
  0% { transform: scale(.4); opacity: 0; }
  28% { transform: scale(1.18); opacity: 1; }
  62% { transform: scale(.98); opacity: 1; }
  100% { transform: scale(1); opacity: .92; }
}
.schulte-grid { display: grid; gap: 8px; width: 100%; max-width: 340px; margin: 0 auto; }
/* 旋转类型：仅网格层匀速旋转，舞台静止，避免容器尺寸/裁剪随角度重算导致中心点跳变
   宽度取 68%，使正方形网格旋转时对角线（≈96%）始终落在舞台内，不会被裁切 */
.schulte-grid.motion-rotate {
  width: 68%; max-width: 231px;
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
  animation: schulte-spin 60s linear infinite;
}
/* 蜂窝阵列的总高小于宽度（行距仅为行高的 3/4），旋转时可用更大宽度；
   取 75%（255px）时最坏对角约 334px，仍在 340px 舞台内 */
.schulte-grid.shape-honeycomb.motion-rotate { width: 75%; max-width: 255px; }
@keyframes schulte-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.schulte-cell {
  aspect-ratio: 1 / 1; background: #fff; border: 2px solid var(--line); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800;
  color: var(--text); cursor: pointer; user-select: none; transition: background .1s;
}
/* 载体形状 */
.schulte-grid.shape-square .schulte-cell { border-radius: 10px; }
.schulte-grid.shape-circle .schulte-cell { border-radius: 50%; }
/* 蜂窝：正六边形密铺。格子由 JS 绝对定位（行距为高的 3/4、奇数行右移半格），
   六边形各边相互贴合；clip-path 内缩 2% 仅留极细缝隙以便区分。
   width:100% 保证容器占满舞台，避免绝对定位的格子被舞台 overflow:hidden 截断。 */
.schulte-grid.shape-honeycomb { display: block; position: relative; width: 100%; }
.schulte-cell.hc-cell {
  position: absolute; aspect-ratio: auto;
  border: 0; border-radius: 0; background: #eef1f8;
  /* left/top 给的是格子中心坐标，需回退半格使其以该点为中心 */
  transform: translate(-50%, -50%);
  clip-path: polygon(50% 2%, 98% 26%, 98% 74%, 50% 98%, 2% 74%, 2% 26%);
}
/* 56 格（七言律诗）：六边形间隙由 2% 收到 1%，把空间让给单字 */
.schulte-cell.hc-cell.tight { clip-path: polygon(50% 1%, 99% 26%, 99% 74%, 50% 99%, 1% 74%, 1% 26%); }
.schulte-cell.hc-cell.done { background: #dfe3ee; }
.schulte-cell.cell-hanzi { font-size: 19px; font-weight: 700; }
.schulte-cell.err { background: #fee2e2; }
.schulte-cell.ok { background: var(--primary-l); color: var(--primary); }
.schulte-cell.done { background: #e8eaf2; color: var(--muted); }
.schulte-grid.shape-honeycomb .schulte-cell.done { background: #dfe3ee; }
/* 汉字类型开局：全诗预览（红字标出起点字与顺序方向） */
.poem-preview {
  position: absolute; inset: 0; z-index: 8;
  background: rgba(255, 255, 255, .97); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 8px; text-align: center;
}
.pp-title { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.pp-body { line-height: 1.8; }
.pp-line { font-size: 20px; font-weight: 700; letter-spacing: 1px; color: var(--text); }
.pp-punc { color: var(--muted); }
.pp-start { color: #e11d48; font-weight: 900; }
.pp-order { margin-top: 10px; font-size: 12px; font-weight: 800; color: #e11d48; }
.pp-go {
  margin-top: 12px; font-size: 13px; font-weight: 800; color: var(--primary);
  border: 1px solid var(--primary); border-radius: 999px; padding: 6px 18px; cursor: pointer;
}
/* 56 字（七言律诗）需 8 行，整体压扁以免溢出舞台 */
.poem-preview.dense .pp-body { line-height: 1.5; }
.poem-preview.dense .pp-line { font-size: 14px; letter-spacing: 0; }

/* 下一个目标提示 */
.schulte-hint {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 10px; font-size: 13px; color: var(--muted);
  min-height: 28px; /* 锁定高度：提示文案变化时不引起下方棋盘位移 */
}
.schulte-hint .sh-target { font-size: 16px; color: var(--text); font-weight: 800; }
.schulte-hint .sh-target b { color: var(--primary); }

/* 舒尔特 24 种训练类型图标（说明页 4 列 / 排行榜图标行）
 * ⚠️ 必须用 minmax(0,1fr)：1fr 的最小尺寸是 min-content，而 .tp-meta 的长文本
 *    （如「4×4 · 16 格 · ★★★☆☆」）不可换行，会把列撑到 ~134px ⇒ 4 列共 566px，
 *    远超 #view 可用宽度（360 屏只有 296px），页面就能左右滑动了。 */
.tp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tp-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px 6px; border: 1px solid var(--line); border-radius: 12px;
  background: #fafbfe; cursor: pointer; transition: transform .08s, border-color .15s;
  min-width: 0; overflow: hidden;
}
.tp-item:active { transform: scale(.95); border-color: var(--primary); }
/* 未解锁（上一级未达 3 星）
 * ⚠️ 灰化/淡化必须下在「内容元素」上，**不能**作用于 .tp-item 整卡：
 *    子元素无法撤销祖先的 filter ⇒ 整卡 grayscale(1) 会把新加的小锁徽章 .tp-lock
 *    一起压成灰点（实测「锁看不见」，这正是本轮重做这一处的原因）。
 * ⇒ 卡片整体只轻微降不透明度，灰化下放到 .tp-ico 的各子元素（排除 .tp-lock）+ .tp-name。 */
.tp-item.locked { opacity: .85; }
.tp-item.locked .tp-ico > *:not(.tp-lock) { filter: grayscale(1); opacity: .5; }
.tp-item.locked .tp-name { filter: grayscale(1); opacity: .6; }
/* 锁因文案保持橙色高亮（原实现被整卡 grayscale 顺带压灰了，这里不再参与灰化） */
.tp-item.locked .tp-meta { color: var(--accent); font-weight: 700; }
/* 未解锁关卡的小锁徽章（.tp-lock，由 app_n.js 的 lockBadge() 挂在 .tp-ico 内）
 * 角位 = 图标区**左下角**：普通模块 / 神经元的右上被 .lv-emoji 占、舒尔特右上被 .tp-order 占、
 *   右下被 .tp-motion 占 ⇒ 左下是三家族唯一的共同空闲角（改了会被既有角标盖住，有断言守着）。
 * 尺寸 18px 圆形橙底 + 内联白锁；left/bottom 只外扩 2px，避免被卡片 overflow:hidden 裁掉。 */
.tp-lock {
  position: absolute; left: -2px; bottom: -2px; z-index: 2;
  width: 18px; height: 18px; padding: 3px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border-radius: 50%;
  font-style: normal; box-shadow: 0 1px 3px rgba(15, 23, 42, .35);
}
.tp-lock svg { display: block; width: 100%; height: 100%; }
.tp-ico {
  position: relative; width: 54px; height: 54px; padding: 5px;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 3px; background: #eef1f8; border-radius: 10px;
}
.tp-ico i { background: #fff; border: 1.5px solid #c3cbe0; }
.tp-ico.shape-square i { border-radius: 2px; }
.tp-ico.shape-circle i { border-radius: 50%; }
.tp-ico.shape-honeycomb i {
  border: 0; background: #dde3f0;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0% 50%);
}
/* 中央内容字：数字=1，汉字=诗 */
.tp-ico .tp-c {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--primary);
  text-shadow: 0 0 4px #eef1f8, 0 0 4px #eef1f8, 0 0 4px #eef1f8;
}
.tp-ico .tp-order, .tp-ico .tp-motion {
  position: absolute; font-size: 11px; font-style: normal; line-height: 1;
}
.tp-ico .tp-order { top: -3px; right: -3px; }
.tp-ico .tp-motion { bottom: -3px; right: -3px; color: var(--accent); font-weight: 800; }
/* 名称与 meta 允许折行（列宽仅 ~74px，单行会截掉大半信息）。
 * 用 -webkit-line-clamp 限制最多 2 行：既保留信息，又不让卡片高度失控。
 * ⚠️ 第 9 期修：这里原先是 `word-break: break-all`，它允许**任意两个字符之间**断行 ⇒
 * 把标签里的数字从中间劈开：`顺序4位·0.7` / `2s`（截图取证时肉眼发现）。
 * 数字被劈开后读者会把「0.7」当成 0.72s，是实打实的误读来源。
 * 改成 `normal + overflow-wrap: break-word`：只在 CJK 边界/空格断行，
 * 拉丁数字串（`0.54s` / `4×4`）整体不可断；只有当**单个词本身宽过卡片**时才兜底强制断。 */
.tp-name {
  font-size: 10px; font-weight: 700; line-height: 1.2; text-align: center;
  width: 100%; min-width: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; word-break: normal; overflow-wrap: break-word;
}
.tp-meta {
  font-size: 9px; color: var(--muted); line-height: 1.2; text-align: center;
  width: 100%; min-width: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; word-break: normal; overflow-wrap: break-word;
}
/* 普通模块关卡卡片：与舒尔特类型图标同构（图标区显示关卡序号 + 模块 emoji 角标）
 * 列数按关卡数自适应：1 关整行 / 2 关两列 / 3 关及以上三列 */
.tp-grid.lv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tp-grid.lv-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.tp-grid.lv-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* 第 4 期：12/24 关的模块（颜色冲突 / 多目标追踪）用 4 列，3 列会拉出 8 行太长 */
.tp-grid.lv-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tp-ico.lv-ico { display: flex; align-items: center; justify-content: center; padding: 0; }
.tp-ico .lv-no { font-size: 24px; font-weight: 800; color: var(--primary); line-height: 1; }
/* 神经元题型卡：序号改到图标左上角，给较长的题型名留出整行宽度（如「图形顺序记忆」） */
.tp-ico.n-ico .lv-no {
  position: absolute; top: -6px; left: -6px; min-width: 17px; height: 17px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; color: #fff; background: var(--primary); border-radius: 9px;
}
.tp-ico .lv-emoji {
  position: absolute; top: -6px; right: -6px; font-size: 15px; font-style: normal; line-height: 1;
}
/* 排行榜中的类型图标行 */
.tp-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; width: 100%; }
.tp-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; border: 2px solid transparent; border-radius: 10px; cursor: pointer;
}
.tp-chip.active { border-color: var(--primary); background: var(--primary-l); }
.tp-chip-no { font-size: 10px; font-weight: 700; color: var(--muted); }
.tp-chip.active .tp-chip-no { color: var(--primary); }
/* 24 项类型选择器：更紧凑 */
.diff-pick.pick-types { padding: 18px 12px; max-width: 400px; }
.diff-pick.pick-types .dp-btn { padding: 10px 12px; gap: 3px; }
.diff-pick.pick-types .dp-sub { font-size: 11px; }

/* Stroop（颜色冲突，第 4 期重写：计时器 / 换题闪烁 / 选项点击反馈） */

/* 题干上方的实时计时条：左=本局总用时，右=本题剩余 */
.stroop-bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 320px; margin-bottom: 6px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;   /* 数字等宽，秒数跳动时宽度不抖 */
}
.stroop-bar .sb-left { color: var(--accent); }
.sb-track { width: 100%; max-width: 320px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.sb-fill { display: block; height: 100%; width: 100%; background: #22c55e; transition: width .1s linear, background .2s; }
.sb-fill.warn { background: #eab308; }
.sb-fill.danger { background: #ef4444; }

.stroop-word {
  font-size: 64px; font-weight: 900; user-select: none;
  /* 换题闪烁用 transform 而非改颜色：不干扰「字体颜色=答案」这一核心视觉 */
  transform-origin: center;
}
/* 换题闪烁：前后两题若「字义+字色」相同，靠这一下动画给出「确实刷新了」的反馈 */
.stroop-word.flash { animation: stroopFlash .22s ease-out; }
@keyframes stroopFlash {
  0%   { transform: scale(.82); opacity: .25; filter: blur(1px); }
  60%  { transform: scale(1.06); opacity: 1; filter: none; }
  100% { transform: scale(1); opacity: 1; }
}
/* 超时判负：整字闪红一次 */
.stroop-word.timeout { animation: stroopTimeout .42s ease-out; }
@keyframes stroopTimeout {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px) scale(1.04); }
  60% { transform: translateX(7px) scale(1.04); }
}

/* 答题反馈文字（✓ 正确 / ✗ 应选「黄」/ ⏰ 超时判负） */
.stroop-fb { min-height: 20px; margin: 6px 0 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.stroop-fb.ok { color: #16a34a; }
.stroop-fb.err { color: #ef4444; }

.color-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 320px; }
.color-opt {
  height: 72px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer;
  font-size: 24px; font-weight: 800; color: var(--text); background: #fff;
  transition: transform .1s, background .15s, border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
/* 点击反馈三态：picked（按下）→ ok（对）/ err（错）
   目的：让玩家明确「这一下确实点到了按钮」，而不是靠下一题是否变化去猜 */
.color-opt.picked { transform: scale(.94); }
.color-opt.ok { background: #dcfce7; border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.color-opt.err { background: #fee2e2; border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .18); }
.color-opt:active { transform: scale(.94); }

/* 反应测速 */
.react-pad {
  width: 100%; max-width: 320px; height: 240px; border-radius: 18px; background: #9ca3af;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 800;
  cursor: pointer; user-select: none; text-align: center; padding: 16px;
}
.react-pad.go { background: #22c55e; }
.react-pad.early { background: #ef4444; }

/* 石头剪刀布 */
.rps-show { font-size: 80px; }
.rps-cond { font-size: 17px; font-weight: 800; color: var(--primary); background: var(--primary-l); padding: 10px 16px; border-radius: 12px; text-align: center; }
.rps-opts { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; width: 100%; max-width: 320px; }
.rps-opt { height: 84px; border-radius: 16px; background:#fff; border: 2px solid var(--line); font-size: 34px; cursor: pointer; }

/* 速算 */
/* 第 13 期 C 批：**双题轨**（当前题 + 下一题预览同屏）——
 * 旧实现"答完才看到下一题"，每题都要重新起一次读题停顿；预览把这段空白消掉。
 * ⚠️ `.arith-q` 必须**预留两行高度**（min-height: 92px = 40px×1.15×2）：两步题
 *   `26 − 14 × 12 = ?` 在 40px 下会折成两行，而一步题只有一行 —— 不预留的话
 *   每答一题输入框与键盘都要上下跳一整行（实测键盘 top 差 46px），这本身就是"节奏不顺"。 */
.arith-qs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; }
.arith-q { font-size: 40px; font-weight: 800; line-height: 1.15; text-align: center;
  display: flex; align-items: center; justify-content: center; min-height: 92px; padding: 0 4px; }
/* 下一题：小字 + 灰、留 24px 固定高度（最后一题只加 .is-hidden，占位不塌 ⇒ 题面区高度恒定） */
.arith-qnext { display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 24px; font-size: 19px; font-weight: 700; color: #94a3b8; text-align: center; }
.arith-qnext.is-hidden { visibility: hidden; }
/* ⚠️ 第 17 期：预览的"下一题"可能是 25 字符的三步题（L13-24）⇒ 窄屏下它折成两行，
 *   预览区高度在 25px / 50px 之间跳 = **每换一题键盘上下跳 25px**（正是上面注释要防的"节奏不顺"）。
 *   实测（`mp_verify/_p17c_layout.cjs`，三个题面池 × 八个视口对照）：
 *     430 / 390 / 375 / 360 / 340px ⇒ 预览高度恒定 [25]；320px ⇒ [25,50] 会跳。
 *     ⚠️ 而 360px 下最长行宽 317.3px / 容器 320px ⇒ 余量只剩 2.7px，
 *        靠"这个字体刚好没折"不可靠（换一款安卓 WebView 字体就可能折）。
 *   ⇒ 380px 及以下把预留抬到两行（实测两行 = 50px），390+ 保持紧凑。
 *   ⚠️ 别改成全局 50px：390/430 下会白占 25px 垂直空间（键盘区本来就不宽裕）。 */
@media (max-width: 380px) { .arith-qnext { min-height: 50px; } }
.arith-nx-lbl { font-size: 11px; font-weight: 800; color: #94a3b8; background: #eef1f7; border-radius: 6px; padding: 1px 6px; }
.arith-input { width: 120px; text-align: center; font-size: 26px; font-weight: 800; padding: 10px; border: 2px solid var(--primary); border-radius: 12px; }
/* 第 13 期：键盘补 `.` `/`（小数与分数）⇒ 4 列 12 键 + C + OK；OK 跨 3 列填满末行（C 独占 1 列）。
 * 第 18 期：极速速算的 OK 键**已移除**（输入位数与答案一致即自动判定，见 games.js 的 key()）
 *   ⇒ 由 C 跨 4 列补满末行。仍是 4 行（3 行数字 + 1 行 C），键盘高度与
 *   "题面 → 键盘"的距离**零变化**（末行行高由同一个按钮 padding 决定）。
 * ⚠️ `.ok-btn` 既不能删也不能改：数字广度记忆用的是同一个 `.arith-pad`
 *   （3×4 满格 + OK 跨 3 列），动共用类会连带改掉那个模块的键盘布局。 */
.arith-pad { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; width: 100%; max-width: 300px; }
.arith-pad button { padding: 14px 0; font-size: 18px; font-weight: 700; border: 1px solid var(--line); background:#fff; border-radius: 10px; }
.arith-pad .ok-btn { background: var(--primary); color:#fff; grid-column: span 3; }
.arith-pad .clr-btn { background: var(--primary); color:#fff; grid-column: span 4; }

/* 数字记忆 */
.digit-flash { font-size: 72px; font-weight: 900; letter-spacing: 4px; color: var(--primary); }
.digit-hint { font-size: 14px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.digit-input { width: 140px; text-align: center; font-size: 24px; font-weight: 800; padding: 10px; border: 2px solid var(--primary); border-radius: 12px; letter-spacing: 3px; }
/* 数字广度记忆：判定后的逐位对照（第 13 期）——
 * ⚠️ .digit-flash 本身是 72px 大字 + 4px 字距，用作对照容器时必须显式重置，
 *   否则每一位数字都会被撑成巨型方块（元素在、但呈现不对，第 9 期铁律 20）。 */
.digit-flash.digit-diff { display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 15px; letter-spacing: 0; }
.dd-row { display: flex; align-items: center; gap: 6px; }
.dd-lbl { font-size: 13px; font-weight: 800; color: #64748b; min-width: 34px; text-align: right; }
.dd-cell { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 34px; padding: 0 6px; border-radius: 8px; font-size: 19px; font-weight: 900; background: #eef1f7; color: #0f172a; }
.dd-cell.ok { background: #dcfce7; color: #166534; }
.dd-cell.bad { background: #fee2e2; color: #b91c1c; }
.dd-note { font-size: 14px; font-weight: 900; }
.dd-note.ok { color: #166534; }
.dd-note.bad { color: #b91c1c; }

/* 结算页 */
.result-score { text-align: center; margin: 6px 0 14px; }
.result-score .rs-num { font-size: 64px; font-weight: 900; color: var(--primary); line-height: 1; }
.result-score .rs-star { font-size: 22px; }
.stat-row { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.stat-row:last-child { border-bottom: none; }
/* ⚠️ 键名必须 flex:0 0 auto + nowrap：明细值一长（如追踪的「近失 / 评分」行是一整条公式），
   键名会被挤到 min-content = 1 个汉字宽 ⇒ 竖排成「近\n失」。第 8 期加了长值行才暴露。
   值侧给 min-width:0 才会在可用宽度内换行（否则撑破卡片）。 */
.stat-row .sr-k { color: var(--muted); flex: 0 0 auto; white-space: nowrap; padding-right: 10px; }
.stat-row .sr-v { font-weight: 700; flex: 0 1 auto; min-width: 0; }
.result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
/* 结算页「下一关」主行动按钮：突出金色，与其他次要操作区分 */
.result-actions .next-btn {
  background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff;
  font-weight: 800; box-shadow: 0 6px 16px rgba(245, 158, 11, .35);
}
.result-actions .next-btn:disabled {
  background: #fff; color: var(--muted); border: 1px dashed var(--line);
  box-shadow: none; font-weight: 700; font-size: 12px; line-height: 1.4;
  padding: 10px 12px; white-space: normal;
}


/* 登顶提示已改为弹出面板（U.sheet），无需内嵌卡片样式 */

/* 历史/趋势 */
.trend-box { width: 100%; overflow-x: auto; }
.trend-box svg { display: block; width: 100%; height: 180px; }
.filter-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--muted); cursor: pointer; }
.chip.active { background: var(--primary); color:#fff; border-color: var(--primary); }
.record-item { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.record-item .ri-score { font-weight: 800; color: var(--primary); font-size: 16px; min-width: 34px; text-align: right; }
.record-item .ri-main { flex: 1; }
.record-item .ri-name { font-weight: 700; }
.record-item .ri-time { color: var(--muted); font-size: 11px; margin-top: 2px; }

/* 会员 */
.vip-hero { background: linear-gradient(135deg,#f59e0b,#f97316); color:#fff; border-radius: var(--radius); padding: 22px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.vip-hero .vh-title { font-size: 22px; font-weight: 900; }
.vip-hero .vh-sub { font-size: 13px; opacity: .95; margin-top: 6px; }
.plan-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.plan { background:#fff; border: 2px solid var(--line); border-radius: 14px; padding: 14px 8px; text-align: center; cursor: pointer; }
.plan.active { border-color: var(--accent); background: #fffbeb; }
.plan .pl-name { font-size: 13px; font-weight: 700; }
.plan .pl-price { font-size: 20px; font-weight: 900; color: var(--accent); margin-top: 6px; }
.plan .pl-unit { font-size: 11px; color: var(--muted); }
.benefit { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14px; }
.benefit .bf-ico { color: var(--ok); font-weight: 900; }

/* 设置 */
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.switch { width: 46px; height: 26px; border-radius: 13px; background: #d1d5db; position: relative; cursor: pointer; transition: background .2s; }
.switch.on { background: var(--ok); }
.switch::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; transition: left .2s; }
.switch.on::after { left: 23px; }

.disclaimer-bar { font-size: 11px; color: var(--muted); text-align: center; padding: 10px 4px; line-height: 1.5; }
.disclaimer-toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(31,36,48,.92); color:#fff; font-size: 12px; padding: 8px 14px; border-radius: 20px; z-index: 60; max-width: 90%;
}

.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }
.toast { position: fixed; left:50%; top: 40%; transform: translate(-50%,-50%); background: rgba(31,36,48,.92); color:#fff; padding: 10px 18px; border-radius: 12px; z-index: 80; font-size: 14px; }

/* 七日登录弹框列表 */
.lr-head { font-size: 13px; color: var(--muted); margin-bottom: 12px; text-align: center; }
.lr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lr-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--border); text-align: center;
}
.lr-cell .lr-ico { font-size: 28px; line-height: 1; }
.lr-cell .lr-cap { font-size: 12px; font-weight: 700; color: var(--text); }
.lr-cell .lr-foot { font-size: 11px; color: var(--muted); }
.lr-cell.done { opacity: .55; }
.lr-cell.done .lr-foot { color: #22c55e; }
.lr-cell.today { border-color: #7c5cff; box-shadow: 0 0 0 2px rgba(124,92,255,.2); background: #f5f3ff; }
.lr-cell.today .lr-foot { color: #7c5cff; font-weight: 700; }
/* 第七天整行显示 */
.lr-cell.seventh { grid-column: 1 / -1; flex-direction: row; gap: 12px; justify-content: center; padding: 14px; }
.lr-cell.seventh .lr-ico { font-size: 34px; }
.lr-cell.seventh .lr-cap { font-size: 14px; }

/* 游戏内难度选择 */
.diff-pick { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 12px; padding: 28px 16px; max-width: 360px; margin: 0 auto; }
.dp-title { font-size: 19px; font-weight: 800; color: var(--text); text-align: center; margin-bottom: 2px; }
.dp-tip { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 6px; line-height: 1.5; }
.dp-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 14px; border: 2px solid var(--border); border-radius: 14px;
  background: var(--card); color: var(--text); cursor: pointer;
  box-shadow: var(--shadow); transition: transform .08s, border-color .15s, background .15s;
}
.dp-btn:active { transform: scale(.98); }
.dp-btn .dp-label { font-size: 17px; font-weight: 800; }
.dp-btn .dp-sub { font-size: 12px; color: var(--muted); }
.dp-btn.locked { opacity: .7; border-style: dashed; }
.dp-btn:not(.locked) .dp-sub { color: var(--muted); }

/* 速算错误反馈 */
.arith-input.err { border-color: #ef4444 !important; background: #fef2f2; color: #ef4444; }
.arith-q.err { color: #ef4444 !important; }

/* 通用游戏提示条 */
.track-tip { text-align: center; font-size: 14px; font-weight: 700; color: var(--text); margin: 10px 0; min-height: 20px; }
.track-sub { margin-top: 10px; }

/* 多目标追踪 */
.track-canvas { width: 100%; background: #f1f5f9; border-radius: 14px; touch-action: none; }

/* 短时位置记忆 */
/* ⚠️ 这两条必须带 `width: 100%`（第 9 期截图取证时发现的历史缺陷）：
 *   `.game-area` 是 `display:flex; align-items:center` ⇒ 子元素按**内容宽度**收缩（fit-content）。
 *   而 .mem-cell / .sud-cell 没有内在宽度（aspect-ratio + 无文本），
 *   `grid-template-columns: repeat(n,1fr)` 的 1fr 只能按"自己算出来的宽度"分配
 *   ⇒ 网格整体塌成「只剩 gap」的宽度：实测 .mem-board = **24px**（4 列 × 8px 间距），
 *   16 个格子全是 0 宽 ⇒ **短时位置记忆的网格肉眼完全看不见**；
 *   .sudoku-board 只靠非空格子里的数字撑到 31px（设计上限是 320px）⇒ 数独盘小一圈。
 *   加 width:100% 后 max-width 才能按设计生效。 */
.mem-board { display: grid; gap: 8px; width: 100%; max-width: 360px; margin: 0 auto; }
/* ⚠️ 第 13 期（zx 2026-09-28）：原来 `.dim` 用 #f1f5f9，与所在底色几乎同色（实测亮度差仅 3.6）⇒
 *   **答题阶段整个盘面肉眼消失**（玩家以为"没格子可点"）。现在两档都是明确可见的浅灰：
 *     记忆阶段 #bec9da（深一档）→ 作答阶段 #c8d3e2（浅一档，但仍清晰）
 *   并统一加 1px 内描边，把可点区域勾出来。断言口径是**量亮度差**，不是断言 CSS 写法。 */
.mem-cell { aspect-ratio: 1; border-radius: 10px; background: #bec9da; cursor: pointer; transition: background .15s; box-shadow: inset 0 0 0 1px rgba(15,23,42,.12); }
.mem-cell.lit { background: #7c5cff !important; }
.mem-cell.dim { background: #c8d3e2; box-shadow: inset 0 0 0 1px rgba(15,23,42,.12); }
.mem-cell.picked { background: #7c5cff; box-shadow: 0 0 0 2px rgba(124,92,255,.3); }

/* 图形序列推理 */
.seq-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.seq-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
/* 第 13 期：展示段由「无 class 的裸 canvas」改成显式 .seq-cell（白底描边卡片）。
   ⚠️ canvas 有内在尺寸（width/height 属性既决定位图分辨率、也决定默认显示尺寸）⇒ 这里显式写
   56px 是**为了缩到一行放得下**：4 格 + 箭头必须在 320px 窄屏上同排（.seq-row 是 wrap 的，
   一旦放不下箭头就掉到第二行）。位图仍是 64×64（U.SEQ_CW），验收按这个尺寸取像素指纹。 */
.seq-cell { flex: 0 0 auto; width: 56px; height: 56px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.seq-arrow { font-weight: 800; color: var(--muted); font-size: 18px; }
.seq-cands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 320px; }
/* 第 9 期：L17 起候选数由 4 升到 5（`kinds` / 干扰项更多）⇒ 必须换列数，
   否则第 5 个候选会顶到第二行、把下面的按钮挤下去（是"选项溢出"而不是报错，肉眼在长屏上不一定看出来）。 */
.seq-cands.seq-cands5 { grid-template-columns: repeat(5, 1fr); }
.seq-cand { width: 100%; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.seq-cand:active { transform: scale(.96); }
/* 第 15 期：图形序列推理的**单题倒计时**（左「×N 叠加」徽章 + 右秒数 + 下方进度条）。
   需求原文「题目中没有单题的倒计时显示」—— 旧实现只有 `T(fn, PERQ)` 的静默超时，
   界面只写一个静态的「每题限时 3.2s」，玩家对"还剩多久"零信息、只能被动挨判超时。
   `tabular-nums` 是必需的：比例字体下 9.0s → 8.9s 的字形宽度不同，每 100ms 会把数字左右推一下。 */
.seq-clock { width: 100%; max-width: 320px; margin: 0 auto 4px; }
.seq-clock-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.seq-clock-mix {
  font-size: 12px; font-weight: 800; color: var(--primary);
  background: var(--primary-l); padding: 2px 8px; border-radius: 9px; white-space: nowrap;
}
.seq-clock-t {
  font-size: 15px; font-weight: 800; color: var(--primary);
  font-variant-numeric: tabular-nums; letter-spacing: .5px;
}
.seq-clock-track { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.seq-clock-b { display: block; height: 100%; width: 100%; border-radius: 2px; background: var(--primary); transition: width .1s linear; }
.seq-clock.urgent .seq-clock-t { color: var(--bad); }
.seq-clock.urgent .seq-clock-b { background: var(--bad); }

/* 迷你数独 */
/* 迷你数独 —— width:100% 的理由同 .mem-board（见上方注释）：没有它，盘面会按非空格子里的
   数字撑出 31px 宽的一小坨，而不是设计里的 320px。 */
.sudoku-board { display: grid; gap: 6px; width: 100%; max-width: 320px; margin: 0 auto; }
/* 第 13 期：空格底色由纯白提到 #eef1f7 —— 一片 3×3~6×6 的纯白格在浅色卡片上没有边界，
   而 .fixed（题目给定）原来的 #f1f5f9 与纯白几乎同色 ⇒ 玩家分不清「哪些格子是题目给的」。 */
.sud-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #eef1f7; border: 1px solid var(--line); border-radius: 8px; font-size: 22px; font-weight: 800; cursor: pointer; }
.sud-cell.fixed { background: #cfd8e8; color: #334155; cursor: default; }
.sud-cell.filled { color: #7c5cff; background: #f5f3ff; }
.sud-cell.wrong { color: #ef4444; background: #fef2f2; }
/* 选中态 = **描红**（inset 阴影不占布局，不会把网格推歪）。刻意放在 .filled/.wrong 之后：
   选中一个填错的格子时红框仍然可见（旧实现靠弹窗遮罩，盘面被盖住、连"选了哪格"都看不出来）。 */
.sud-cell.sel { background: #fff5f5; box-shadow: inset 0 0 0 3px #ef4444; }
/* 数字键**常驻盘面下方**（取代原来的弹窗选框，盘面不再被遮罩盖住）：列数由引擎按 N+1 内联设置（1..N + 清除）。
   ⚠️ 注释里刻意不复述被取代的那个旧类名 —— 否则将来「该类名已清除」的源码断言会被自己的注释撞红（第 13 期铁律）。 */
.sud-pad { display: grid; gap: 8px; width: 100%; max-width: 320px; margin: 0 auto; }
.sud-num { padding: 14px 0; font-size: 18px; font-weight: 800; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.sud-num:active { transform: scale(.96); }
/* ⚠️「清除」是 2 个汉字：6×6 档盘面 320px 分 7 列 ⇒ 每格不到 40px，18px 字号会折行顶高整行 */
.sud-clr { font-size: 12px; color: var(--muted); white-space: nowrap; }
/* 第 15 期：迷你数独**正向计时**（读秒）。`tabular-nums` 是必需的 —— 比例字体下
   "0:07" → "0:08" 的字形宽度不同，每秒都会把居中的盘面左右推一下（肉眼像在抖）。 */
.sud-clock {
  text-align: center; font-size: 17px; font-weight: 800; color: var(--primary);
  font-variant-numeric: tabular-nums; letter-spacing: .5px; margin-bottom: 8px;
}

/* 体力条 */
.energy-bar { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.energy-bar .eb-main { display: flex; align-items: center; gap: 8px; }
.eb-ico { font-size: 18px; }
.eb-val { font-weight: 800; font-size: 15px; min-width: 64px; }
.eb-bar { flex: 1; height: 8px; background: #eceef4; border-radius: 6px; overflow: hidden; }
.eb-bar i { display: block; height: 100%; background: linear-gradient(90deg,#4f46e5,#818cf8); }
.eb-actions { display: flex; gap: 10px; margin-top: 12px; }
.eb-ico-btn {
  position: relative; flex: 1; padding: 14px 2px; border-radius: 14px; font-size: 30px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .08s;
}
.eb-ico-btn:active { transform: scale(.96); }
.eb-ico-btn .eb-lbl { font-size: 12px; color: var(--text); font-weight: 700; line-height: 1.2; text-align: center; }
.eb-ico-btn .eb-badge {
  position: absolute; top: -5px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px;
  background: #ef4444; color: #fff; border-radius: 10px; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}


/* 背包 */
.bag-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.bag-k { font-weight: 800; font-size: 14px; }
.bag-tip { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bag-use { border: 1px solid var(--accent); background: #fff; color: var(--accent); border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.bag-use:disabled { color: var(--muted); border-color: var(--line); cursor: not-allowed; }

/* 奖励弹窗 */
.reward-list { text-align: center; font-size: 16px; font-weight: 800; color: var(--primary); padding: 8px 0; line-height: 1.8; }

/* 排行榜 */
.rank-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 12px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border-bottom: none; }
.rk-rank { width: 34px; text-align: center; font-size: 18px; font-weight: 900; color: var(--muted); }
.rk-name { flex: 1; font-weight: 700; }
.rk-score { font-weight: 800; color: var(--primary); white-space: nowrap; }
/* 同分时的次级指标：耗时 */
.rk-time { font-weight: 700; font-size: 12px; color: var(--muted); margin-left: 2px; }

/* 会员方案补充 */
.plan .pl-extra { font-size: 11px; color: var(--accent); margin-top: 4px; font-weight: 700; }

/* =========================================================
 * 首页模块网格
 * ======================================================= */
.mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mod-item { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mod-item:active { transform: scale(.98); }
.mi-ico { font-size: 28px; }
.mi-name { font-weight: 800; font-size: 15px; }
.mi-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }
.mi-meta { font-size: 11px; color: var(--primary); font-weight: 700; margin-top: 2px; }

/* 五大类内页「规划中」区块：虚线 chip + 灰字，明确表示尚未实现 */
.plan-card { margin-top: 12px; }
.pc-badge {
  display: inline-block; font-size: 10px; font-weight: 700; color: var(--muted);
  background: #eef0f6; border-radius: 8px; padding: 2px 7px; vertical-align: middle;
  margin-left: 4px;
}
.pc-tip { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 9px; padding: 5px 9px;
  min-width: 0; max-width: 100%;
}
.pc-dot {
  width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%;
  background: var(--cat, var(--muted)); opacity: .55;
}

/* =========================================================
 * 神经元训练 · 关卡页（11 题型网格 + 简单/困难/双关 档位切换）
 * 网格复用舒尔特 .tp-grid / .tp-item / .tp-ico.lv-ico，此处只补档位与规则折叠
 * ======================================================= */
.seg-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.seg-btn {
  padding: 9px 4px; border: 2px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
  transition: transform .08s, border-color .15s, background .15s;
}
.seg-btn:active { transform: scale(.97); }
.seg-btn.active { border-color: var(--primary); background: var(--primary-l); color: var(--primary); }
/* 题型规则一览（原生 details 折叠） */
.rule-fold {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-top: 10px;
}
.rule-fold > summary { font-size: 13px; font-weight: 800; color: var(--primary); cursor: pointer; }
.rule-ol { margin: 8px 0 0; padding-left: 18px; }
.rule-ol li { font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
.rule-ol .ro-ability {
  font-size: 10px; color: var(--accent); background: #fff7e6;
  padding: 1px 6px; border-radius: 8px; margin-left: 6px; white-space: nowrap;
}
.rule-ol .ro-rule { color: var(--muted); margin-top: 2px; }

/* 舒尔特说明页图标（隐藏 9 宫格底色，仅显示 emoji） */
.tp-ico.simple i { display: none; }

/* =========================================================
 * 首页五大类入口（双列大卡片）
 * 每张卡片用 --cat 传主题色，避免四份重复样式
 * ======================================================= */
.cat-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin-bottom: 6px;
  /* 第14期：卡片数 4→5 后变成「3 行」（最后一行的第 5 张独占），
     此时**只靠 min-height:196px 已经兜不住等高**——某一张的 desc 折 2 行
     或 chip 多排一行（如「空间想象」在 173px 卡宽下 chip 排 4 行）就会把所在行撑到 205.4px，
     而同行另一张被拉伸、其余行仍是 196 ⇒ 出现 「196,196,205,205,196」。
     注意这**只在 375/390 这类中段宽度暴露**（320/360 全都折 2 行反而全 205；414+ 全 1 行全 196）
     ⇒ 单视口量尺寸会得出"本就等高"的假结论（铁律 15）。
     grid-auto-rows:1fr 让三行都按最高那张对齐 ⇒ 与内容文案解耦，不再随 desc/chip 行数漂移。
     实测 320/360/375/390/414/420/480/768 八个宽度全部等高且无裁切（_p14_cardseq.cjs）。 */
  grid-auto-rows: 1fr;
}
/* #view 有 16px 左右内边距，窄屏(360)下双列会偏挤 ⇒ 让网格吸收左右各 4px */
@media (max-width: 380px) {
  .cat-grid { margin-left: -4px; margin-right: -4px; }
}
.cat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 13px 13px; cursor: pointer; position: relative; overflow: hidden;
  border-left: 4px solid var(--cat); transition: transform .08s;
  /* 双列必须能收缩：默认 min-width:auto 会被最长 chip 撑破 */
  min-width: 0; min-height: 196px;
  display: flex; flex-direction: column;
}
.cat-card:active { transform: scale(.985); }
.cc-top { display: flex; align-items: center; gap: 8px; }
.cc-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  background: color-mix(in srgb, var(--cat) 14%, #fff);
}
.cc-head { flex: 1; min-width: 0; }
.cc-name { font-size: 16px; font-weight: 900; color: var(--text); white-space: nowrap; }
/* 副标题必须单行省略：窄卡片里「3 项训练 · 3 项规划」会被折成两行、末字换行很难看 */
.cc-sub {
  font-size: 9.5px; color: var(--muted); margin-top: 2px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cc-arrow { font-size: 17px; font-weight: 700; color: var(--cat); flex: none; }
.cc-desc { font-size: 10.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.cc-chip {
  font-size: 10px; color: var(--cat); font-weight: 700; line-height: 1.25;
  padding: 4px 6px; border-radius: 7px;
  background: color-mix(in srgb, var(--cat) 10%, #fff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  /* flex 项默认可收缩但下限是内容宽 ⇒ 长名（如「逆向石头剪刀布」）会顶破卡片，
     必须给 min-width:0 + max-width:100% 才能让 ellipsis 生效 */
  min-width: 0; max-width: 100%; flex: 0 1 auto;
}
/* 规划中的能力：虚线描边、灰字，明确区分「已实现 / 未实现」 */
.cc-plan-label {
  font-size: 10px; color: var(--muted); font-weight: 700;
  margin-top: auto; padding-top: 9px; letter-spacing: .5px;
}
.cc-plan-label::after {
  content: ""; display: inline-block; width: 26px; height: 1px;
  background: var(--line); vertical-align: middle; margin-left: 6px;
}
.cc-chips-plan { margin-top: 6px; }
.cc-chip-plan {
  color: var(--muted); font-weight: 600; background: transparent;
  border: 1px dashed var(--line); padding: 3px 6px;
}
/* 首页分段标题：自由练习 / 专项挑战 */
.sec-title { display: flex; align-items: baseline; margin: 18px 2px 10px; }
.sec-title:first-of-type { margin-top: 14px; }
.st-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.st-name {
  font-size: 15px; font-weight: 900; color: var(--text); letter-spacing: .3px;
  position: relative; padding-left: 10px;
}
/* 段名前的竖条，与卡片左边框呼应 */
.st-name::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 13px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent, #8b5cf6));
}
.st-sub { font-size: 11px; color: var(--muted); min-width: 0; }

/* 首页「+N」chip：表示还有更多可进类别页看 */
.cc-chip-more {
  color: var(--muted); font-weight: 800;
  background: var(--line); padding: 4px 7px; flex: 0 0 auto;
}

/* 专项挑战大卡片：整行横排，视觉权重高于五大方向 */
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sp-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 15px 14px; cursor: pointer; position: relative; overflow: hidden;
  border-left: 4px solid var(--cat); transition: transform .08s;
  min-width: 0;
}
.sp-card:active { transform: scale(.985); }
/* 右侧淡色光晕，强化「综合大入口」的分量感
   注意：定位到 padding box 之外（right:-30px）会让 .sp-card 的 scrollWidth 虚高 30px，
   虽然被 overflow:hidden 裁掉不影响观感，但会污染「横向无溢出」类断言。
   改为留在盒内并靠 border-radius + 内阴影营造光晕，scrollWidth 与 clientWidth 一致。 */
.sp-card::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 96px;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(to left, color-mix(in srgb, var(--cat) 12%, transparent), transparent);
  pointer-events: none;
}
.sp-ico {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 25px;
  background: color-mix(in srgb, var(--cat) 14%, #fff);
}
.sp-main { flex: 1; min-width: 0; }
.sp-name {
  font-size: 16px; font-weight: 900; color: var(--text);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.sp-stars { font-size: 11px; color: var(--accent); letter-spacing: -1px; }
.sp-desc {
  font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.45;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.sp-meta { font-size: 11px; color: var(--cat); font-weight: 700; margin-top: 5px; }
.sp-go {
  font-size: 12px; font-weight: 800; color: var(--cat); white-space: nowrap;
  flex: 0 0 auto; position: relative; z-index: 1;
}

/* 五大类页面：顶部 hero + 模块行列表 */
.cat-hero {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 4px solid var(--cat); padding: 16px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 14px;
}
.cat-hero .ch-ico {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: color-mix(in srgb, var(--cat) 14%, #fff);
}
.cat-hero .ch-main { flex: 1; min-width: 0; }
.cat-hero .ch-name { font-size: 18px; font-weight: 900; }
.cat-hero .ch-desc { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.cat-hero .ch-meta { font-size: 11px; color: var(--cat); font-weight: 700; margin-top: 6px; }

.mod-list { display: flex; flex-direction: column; gap: 10px; }
.mod-row {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: transform .08s;
}
.mod-row:active { transform: scale(.985); }
.mod-row .mr-ico {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: color-mix(in srgb, var(--cat) 12%, #fff);
}
.mod-row .mr-main { flex: 1; min-width: 0; }
.mod-row .mr-name { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mod-row .mr-stars { font-size: 11px; color: var(--accent); letter-spacing: -1px; }
.mod-row .mr-desc { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.mod-row .mr-meta { font-size: 11px; color: var(--cat); font-weight: 700; margin-top: 5px; }
.mod-row .mr-go { font-size: 12px; font-weight: 800; color: var(--cat); white-space: nowrap; }

/* 关卡卡片上的「n 题 · 30s · 未挑战」分隔 */
.tp-meta .lv-sep { opacity: .45; }

/* 闯关进度条（线性化：星级递进模块的主干进度） */
.lad-prog {
  background: #fafbfe; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px;
}
.lad-prog .lp-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted); font-weight: 700;
}
.lad-prog .lp-top b { color: var(--primary); font-size: 12px; }
.lad-prog .lp-bar {
  height: 8px; background: #eceef4; border-radius: 6px; overflow: hidden; margin: 8px 0 6px;
}
.lad-prog .lp-bar i {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #4f46e5, #818cf8); transition: width .3s;
}
.lad-prog .lp-foot { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* =========================================================
 * 逻辑思维训练（题库抽题）
 * ======================================================= */
.lb-timer {
  text-align: center; font-size: 15px; font-weight: 800; color: var(--primary);
  letter-spacing: .5px;
}
.lb-timer.lb-warn { color: var(--bad); animation: lb-blink .6s infinite; }
@keyframes lb-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.lb-stage { align-items: stretch; gap: 12px; }
.lb-cat {
  align-self: center; font-size: 11px; font-weight: 800; color: var(--primary);
  background: var(--primary-l); padding: 4px 10px; border-radius: 10px;
}
.lb-q {
  font-size: 17px; font-weight: 800; line-height: 1.6; text-align: center;
  padding: 4px 8px; word-break: break-word;
}
.lb-opts { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; }
.lb-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 14px 14px; font-size: 15px; font-weight: 700; text-align: left;
  background: #fff; color: var(--text); border: 2px solid var(--line);
  border-radius: 14px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .08s, border-color .15s, background .15s;
}
.lb-opt:active { transform: scale(.985); }
.lb-opt:disabled { cursor: default; }
.lb-opt b {
  flex: 0 0 24px; height: 24px; line-height: 24px; text-align: center;
  border-radius: 8px; background: var(--primary-l); color: var(--primary); font-size: 13px;
}
.lb-opt span { flex: 1; text-align: left; }
.lb-opt.right { border-color: var(--ok); background: #f0fdf4; }
.lb-opt.right b { background: var(--ok); color: #fff; }
.lb-opt.wrongpick { border-color: var(--bad); background: #fef2f2; }
.lb-opt.wrongpick b { background: var(--bad); color: #fff; }
.lb-why {
  font-size: 12px; color: var(--muted); line-height: 1.6; text-align: left;
  background: #fafbfe; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px;
}
/* 题库骨架阶段的「建设中」提示条 */
.lb-soon {
  font-size: 12px; color: #92400e; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 12px; line-height: 1.55;
}




/* =========================================================
 * 神经元训练 · 游戏舞台（games-neuron.js 的布局类）
 * ======================================================= */
.n-head { font-size: 14px; font-weight: 700; color: var(--text); text-align: center; line-height: 1.4; }
.n-prog { font-size: 13px; color: var(--muted); text-align: center; min-height: 18px; }
.n-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 220px; width: 100%; }
.n-fb { min-height: 22px; text-align: center; font-weight: 700; color: var(--text); }
.n-fb.ok { color: var(--ok); }
.n-fb.err { color: var(--bad); }
.n-actions { display: flex; gap: 10px; margin-top: 4px; width: 100%; max-width: 340px; }
.n-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; }
.n-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* 通用按钮（覆盖 .btn 的实心主色，改为中性卡片，便于做选项瓦片） */
.n-btn { background: #fff; color: var(--text); border: 2px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.n-btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.n-btn.err { background: var(--bad); color: #fff; border-color: var(--bad); }
.n-btn:disabled { opacity: .4; cursor: not-allowed; }

.n-big { font-size: 56px; font-weight: 900; color: var(--primary); user-select: none; }
.n-big.n-stroop { font-size: 60px; font-weight: 900; }

.n-btns { display: flex; gap: 12px; width: 100%; max-width: 320px; }
.n-btns .n-btn { flex: 1; padding: 16px; font-size: 18px; font-weight: 800; }

.n-grid { display: grid; gap: 10px; width: 100%; max-width: 340px; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); }
.n-grid-3 { grid-template-columns: repeat(3, 1fr); }
.n-grid-4 { grid-template-columns: repeat(4, 1fr); }
.n-grid-5 { grid-template-columns: repeat(5, 1fr); }
.n-grid-6 { grid-template-columns: repeat(6, 1fr); }
.n-grid-7 { grid-template-columns: repeat(7, 1fr); }

.n-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; border-radius: 12px; background: #eef1f8; cursor: pointer; }
.n-cell.lit { background: var(--primary); color: #fff; }
.n-cell.done { opacity: .4; }
.n-shape { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 28px; border-radius: 14px; background: #eef1f8; cursor: pointer; }
.n-shape.done { opacity: .4; }
.n-num { height: 56px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; border-radius: 12px; background: #eef1f8; cursor: pointer; }
.n-faceopt { height: 56px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; border-radius: 12px; background: #eef1f8; cursor: pointer; }
.n-opt { aspect-ratio: 1; background: #fff; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; padding: 6px; }
.n-opt svg, .n-seqitem svg { width: 100%; height: 100%; }
.n-color { height: 70px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; font-size: 22px; font-weight: 800; }

.n-table { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin-bottom: 6px; }
.n-trow { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 22px; font-weight: 800; }
.n-tsym { width: 36px; text-align: center; }
.n-teq { color: var(--muted); }
.n-tnum { color: var(--primary); margin-left: auto; }

.n-dot { width: 46px; height: 46px; border-radius: 50%; background: #cbd2e6; margin: 0 auto; }
.n-dot.on { background: var(--primary); box-shadow: 0 0 18px rgba(79, 70, 229, .6); }

.n-seq { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.n-seqitem { width: 54px; height: 54px; border: 2px solid var(--line); border-radius: 12px; padding: 4px; }
.n-seqitem.q { border-style: dashed; border-color: var(--accent); display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 900; }
.nsvg { width: 100%; height: 100%; }

.n-cube { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 160px; margin: 0 auto; }
.n-cface { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; border: 2px solid var(--text); background: #fff; }
/* ⚠️ `padding: 0` 必须显式写回：全局有个**占位提示**规则 `.empty { padding: 40px 0 }`（见下方
   "列表为空"样式），它会被 `.n-cface.empty` 继承到 —— 在 border-box 下 padding 不可压缩，
   40+40=80px 直接把空格**撑成 80px 高**（实测 computed height 80px），
   于是十字展开图的行高被空格抻开、每个面的位置全错位。
   `.n-net-c.empty` 同理（会让展开图纵向格距 43px、横向只有 3px，看着像散架的方块）。
   ⇒ 凡是有固定尺寸、又要用 `.empty` 表示"这一格不存在"的格子，都必须把 padding 显式归零。 */
.n-cface.empty { border: none; background: transparent; padding: 0; }

.n-svgwrap { display: flex; justify-content: center; }
.nedge { background: #fff; border-radius: 8px; }

/* ---- 第 2 期新增题型 ---- */
/* 符号编码：符号串 / 数字串选项 */
.n-code { font-size: 40px; font-weight: 900; letter-spacing: 10px; text-indent: 10px; color: var(--primary); }
/* 数字串选项必须单行显示（如 "5-0-1"），否则会折成两行很难读 */
.n-codeopt { font-size: 17px; letter-spacing: 0; white-space: nowrap; padding: 0 2px; }
.n-grid-4 .n-codeopt { font-size: 16px; }
.n-grid-5 .n-codeopt { font-size: 14px; }
/* 视觉搜索 / 找异类：格子里的图形比 n-opt 默认更紧凑 */
.n-vcell { padding: 3px; }
.n-vcell svg { width: 100%; height: 100%; }
/* 数字序列：数字格子比图形格子宽，用固定宽高撑开 */
.n-nseq .n-seqitem { width: 58px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 800; }

/* =======================================================
 * 第 3 期 12 个新题型的专属元素
 * 铁律：网格列一律 minmax(0,1fr) 或 repeat(n,1fr)+min-width:0，
 *       窄列长文本用 -webkit-line-clamp 限行，防止横向溢出。
 * ======================================================= */
/* 视觉警觉（原「视听警觉」）：第 4 期改为实心小球版
 * 小球默认 opacity:0，靠 .vig-stage.on 亮起 —— 用容器状态而非逐个球改样式，
 * 保证「同时出现 N 个球」是原子的，也方便自动化断言 .vig-stage.on 与球数。 */
.vig-stage {
  display: flex; align-items: center; justify-content: center; gap: 26px;
  width: 100%; max-width: 340px; min-height: 132px;
}
.vig-ball {
  width: 84px; height: 84px; border-radius: 50%; flex: 0 0 auto;
  opacity: 0; box-shadow: 0 6px 16px rgba(15, 23, 42, .18);
}
.vig-stage.on .vig-ball { opacity: 1; animation: vigPop .16s ease-out; }
@keyframes vigPop { from { transform: scale(.7); } to { transform: scale(1); } }

/* 持续注意：第 4 期修 bug 后新增的「目标形状」常驻样例
 * 第 6 期：样例尺寸 40px → 64px。原尺寸只有刺激格（约 77px）的一半，
 * 而干扰形状里含「与样例只差 1 条边」的近邻（审计：76/76 题都有），
 * 小尺寸下根本判不准「是不是同一个形状」—— 玩家数错还以为引擎判错。 */
.n-sample {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; max-width: 340px; margin-bottom: 10px;
  padding: 8px 12px; background: #eef4ff; border: 1px dashed var(--primary);
  border-radius: 12px;
}
.n-sample-tag { font-size: 12px; font-weight: 700; color: var(--primary); }
.n-sample-svg { width: 88px; height: 88px; display: block; flex: 0 0 auto; }
.n-sample-svg svg { width: 100%; height: 100%; }

/* 第 6 期：题干常驻行（放在刺激之前，不再借用 .n-fb —— 原来问题出现在选项下方） */
.n-req {
  width: 100%; max-width: 340px; text-align: center;
  font-size: 13px; line-height: 1.5; color: var(--text);
}
.n-req b { color: var(--primary); }

/* 第 6 期：纯刺激格（不参与作答）—— 去掉 .n-opt 自带的 pointer 光标，
 * 原实现这些格子看起来可点、点了却没有任何反应。 */
.n-ro { cursor: default; }

/* 第 6 期：持续注意的选项区，用虚线分隔开，避免选项看起来像第 N 行刺激格 */
.n-pick {
  width: 100%; max-width: 340px; margin-top: 4px; padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.n-pick-tag { font-size: 12px; font-weight: 700; color: var(--muted); }
/* 「N 次」必须单行：.btn 基础样式带内边距，会把 4 个选项的格子压得放不下而折行 */
.n-pickbtn { width: 100%; padding: 0 2px; white-space: nowrap; font-size: 19px; }

/* 注意分配：彩字数字格 */
.n-divcell { min-width: 0; }
/* 第 6 期：注意分配格子数上限由 6 → 16，两位数要放得下 */
.n-grid-3 .n-divcell, .n-grid-4 .n-divcell { font-size: 20px; }
.n-divcell.ok { box-shadow: inset 0 0 0 3px var(--ok); }

/* 面孔记忆 / 心理旋转 / 目标脸 */
.n-face { font-size: 34px; display: flex; align-items: center; justify-content: center; }
.n-big.n-face { font-size: 84px; }
.n-rotrow { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 340px; }
.n-rotbox {
  flex: 1 1 0; min-width: 0; aspect-ratio: 1; max-width: 130px;
  background: #fff; border: 2px solid var(--line); border-radius: 14px;
  padding: 6px; display: flex; align-items: center; justify-content: center;
}
.n-rotbox svg { width: 100%; height: 100%; }
.n-rotop { font-size: 20px; font-weight: 900; color: var(--muted); flex: 0 0 auto; }

/* 词语配对：记忆阶段的配对清单 + 翻牌格 */
.n-pairs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; width: 100%; max-width: 340px;
}
.n-pair {
  font-size: 13px; font-weight: 700; color: var(--text);
  background: #f4f6fb; border-radius: 10px; padding: 9px 10px;
  text-align: center; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.n-card {
  height: 52px; background: #eef1f8; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--muted); cursor: pointer;
  min-width: 0; padding: 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.n-card.open { background: #fff; border: 2px solid var(--primary); color: var(--text); }

/* 情景回忆：情景文本块 */
.n-story {
  width: 100%; max-width: 340px; font-size: 13px; line-height: 1.7;
  color: var(--text); background: #f7f8fc; border-radius: 12px;
  padding: 12px 13px; text-align: left;
}
/* 等量天平：每组关系画一个天平（横梁 + 中央支点 + 两端挂盘），组下方写文字等式
 * ⚠️ 盘里的物体是**真实个数的节点**（`.nb-ico`）—— 验收脚本数个数就能重建方程；
 *   别改成"用文字写数量"（那样脚本只能解析文本，判据会弱一档）。
 * ⚠️ 旧的"一行文字版"（`.n-story.n-balance`）已随第 13 期 D 批 ⑨ 重设计移除 ——
 *   当时题面只有 `⚖️ 1 个 🔵 和 3 个 🟡 一样重。` 一行，看不出天平结构。 */
.nb-item {
  width: 100%; max-width: 300px; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}
.nb-line { display: flex; flex-direction: column; align-items: center; width: 100%; }
.nb-armwrap { position: relative; width: 100%; height: 13px; }
.nb-beam {
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: #b9c8d8; border-radius: 2px;
}
.nb-pivot {
  position: absolute; left: 50%; top: 3px; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 9px solid #a9bad0;
}
/* ⚠️ `.nb-pans` 必须显式 `width: 100%`：父级 `.nb-line` 是 `align-items: center`
 *   ⇒ 子项按内容宽度收缩（不拉伸），盘的 flex 就分不到空间 ⇒ 实测左盘缩到 **18px**、
 *   物体堆成一条。这类"元素在、但呈现不对"对普通断言完全免疫，只能量宽度才看得出来。 */
.nb-pans { display: flex; justify-content: space-between; width: 100%; gap: 10px; padding: 0 4px; }
.nb-pan { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.nb-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; }
.nb-ico { font-size: 13px; line-height: 1.3; }
.nb-plate {
  width: 100%; height: 7px; border: 2px solid #cfe0f0; border-top: 0;
  border-radius: 0 0 9px 9px; background: #f4f8fd;
}
.nb-eq { font-size: 12px; font-weight: 700; color: var(--muted); }
.nb-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
.nb-ask .nb-ico { font-size: 15px; }

/* 折纸打孔：孔位点阵（列数由行内样式给出） */
/* 折纸打孔：4 个选修卡必须真的 2×2（⚠️ `mkGrid(2)` 生成的 `.n-grid-2` 在 CSS 里
   **没有规则**，会落到 `.n-grid` 的 auto-fit ⇒ 4 张卡被排成 ~60px 的一行、
   n=10 时格子只剩 5px。所以折纸用自己的两列容器类。）
   max-width 也从 108px 提到 150px：n=10 时格子从 9px 提到 13px，32 个孔才看得清。 */
.n-foldgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.n-holes { display: grid; gap: 2px; width: 100%; max-width: 150px; }
.n-hole {
  aspect-ratio: 1; border-radius: 3px; background: #eef1f8;
  border: 1px solid #e2e6ef;
}
.n-hole.on { background: var(--primary); border-color: var(--primary); }

/* 选择反应：颜色块 + 按键行 */
.n-colorpad {
  width: 132px; height: 132px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 30px; font-weight: 900; user-select: none;
}
.n-keyrow { flex-wrap: wrap; max-width: 340px; }
.n-keyrow .n-btn { flex: 1 1 40%; padding: 13px 6px; font-size: 14px; min-width: 0; }

/* （第 13 期已删除「手指交替」题型，其 .n-handrow / .n-hand / .n-handhint 样式一并移除） */

/* 通用：多选项按钮（episode 等文字选项）必须能折行且不溢出 */
.n-optbtn {
  min-width: 0; padding: 12px 6px; font-size: 13px; font-weight: 700;
  line-height: 1.35; word-break: break-word; white-space: normal;
}

/* =========================================================
 * 第 14 期：空间想象 8 个题型
 * ======================================================= */
/* ⚠️ `.n-grid-2` 原来**没有规则**（`mkGrid(2)` 的产物会落到 `.n-grid` 的 auto-fit，
   4 个选项被挤成一行 ~60px）。空间想象的选项基本是 4 个中文字词，这里正式补上两列。 */
.n-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* 文字选项按钮（形状名 / 方向名 / 数字）—— 要能折行、不溢出 */
.n-choice {
  min-height: 48px; height: auto; padding: 10px 6px;
  font-size: 17px; font-weight: 800; line-height: 1.3;
  border-radius: 12px; background: #eef1f8; cursor: pointer;
  word-break: break-word; white-space: normal; min-width: 0;
}

/* --- 正方体折叠：展开图（列数由行内给出，格子固定 40px） --- */
.n-netwrap { display: flex; align-items: center; justify-content: center; min-height: 172px; }
.n-net { display: grid; gap: 3px; transform-origin: center center; }
.n-net-c {
  width: 40px; height: 40px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--text); border-radius: 5px;
  background: #fff; font-size: 19px; font-weight: 800; color: var(--text);
}
.n-net-c.empty { border: none; background: transparent; padding: 0; }   /* padding:0 的原因见 .n-cface.empty 上方注释 */
/* 三组对面：每行一问 */
.n-pairrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 8px; border-radius: 10px; border: 2px solid transparent;
  justify-content: center; width: 100%; max-width: 360px;
}
.n-pairrow.ok { border-color: var(--ok); background: rgba(34,197,94,.08); }
.n-pairrow.err { border-color: var(--bad); background: rgba(239,68,68,.08); }
.n-pairq { font-size: 14px; font-weight: 800; color: var(--text); }
.n-pairrow .n-faceopt { flex: 0 0 46px; height: 40px; font-size: 17px; }
.n-faceopt.sel { outline: 3px solid var(--primary); }

/* --- 斜投影堆叠图（三视图 / 补全 / 染色共用） --- */
.n-stack { position: relative; margin: 0 auto; }
.n-blk {
  position: absolute; box-sizing: border-box;
  background: #dbeafe; border: 1px solid #60a5fa; border-radius: 3px;
}
/* 缺口幽灵块：虚线、透明底 —— 让玩家看得见缺口位置（补全题）。
   ⚠️ 挖洞位置只能取**看得见**的表面格（引擎侧 stackVis/readable 把关），否则幽灵块会被前排方块盖住。 */
.n-blk.ghost { background: transparent; border: 1px dashed #94a3b8; }
/* --- 俯视图「数字标注」（多层关：层数直接给出，避免"看不见的格子"导致无解） --- */
.n-numwrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.n-numhead { font-size: 12px; color: #64748b; }
.n-numgrid { display: grid; gap: 3px; }
.n-num-c {
  width: 30px; height: 30px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px; background: #dbeafe; border: 1px solid #60a5fa;
  color: #1e40af; font-size: 14px; font-weight: 700;
}
.n-num-c.zero { background: #eef1f8; border-color: #e2e6ef; color: #c3cad6; font-weight: 400; }
/* --- 俯视图（0/1 网格） --- */
.n-flat { display: grid; gap: 2px; }
.n-flat-c { width: 14px; height: 14px; border-radius: 3px; background: #eef1f8; border: 1px solid #e2e6ef; }
.n-flat-c.on { background: var(--primary); border-color: var(--primary); }
.n-rotgrid .n-flat-c { width: 22px; height: 22px; border-radius: 4px; }
/* --- 主/左视图（高度柱状图，底对齐） --- */
.n-bars { display: flex; align-items: flex-end; gap: 3px; }
.n-bar-col { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.n-bar-c { width: 12px; height: 12px; border-radius: 2px; background: var(--primary); }
/* --- 候选图一行（俯视图 / 视图 / 补全组） --- */
.n-viewrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.n-viewopt {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px; border: 2px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer; box-shadow: var(--shadow);
}
.n-viewopt.plain { padding: 6px; }
.n-viewtag { font-size: 12px; color: var(--muted); }
/* --- 双视图（最少/最多块） --- */
.n-twoview { display: flex; gap: 26px; align-items: flex-end; justify-content: center; }
.n-vblock { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.n-vlabel { font-size: 13px; font-weight: 700; color: var(--muted); }
/* --- 方位线索 / 提示 --- */
.n-clues {
  width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; border-radius: 12px; background: #f4f8fd; border: 1px solid var(--line);
}
.n-clue { font-size: 14px; line-height: 1.6; color: var(--text); }
.n-movehint {
  font-size: 14px; font-weight: 800; color: var(--primary);
  text-align: center; line-height: 1.5; max-width: 340px;
}
/* --- 立体名标签 --- */
.n-bodytag { font-size: 20px; font-weight: 900; color: var(--text); }
/* --- 2D 旋转：原图块 --- */
.n-rotpair { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* =========================================================
 * 第 17 期：数学游戏 6 款
 * （24 点 / 摩天楼推理 / 数字拆分 / 余数密码 / 序列密码 / 最小步数）
 *
 * 三类交互：
 *   ① 选项式（题面 + 选项 + 解析）—— 24 点 / 余数密码 / 序列密码 / 最小步数
 *   ② 点选凑和（数字池）—— 数字拆分
 *   ③ 网格填数 —— 摩天楼（复用迷你数独的盘面类，只补四边提示与对齐尺寸）
 * ⚠️ 这里的类名统一用 mq- / sp- / sky- 前缀，**刻意避开**项目里已有的「图形选项」类
 *   （那个类带 aspect-ratio:1 用来摆 SVG；长文本算式套上去会被压成小方块 ——
 *   而这类问题元素在、文本也对，断言全绿，只有量行盒/看截图才发现）。
 * ======================================================= */

/* --- ① 选项式：题面 / 选项 / 确认 / 解析 --- */
.mq-q {
  width: 100%; max-width: 360px; text-align: center;
  font-size: 15px; font-weight: 600; line-height: 1.75; color: var(--text);
  word-break: break-word;
}
.mq-optwrap {
  width: 100%; max-width: 360px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
/* 24 点的选项是整条算式（`(3+8÷3)×…`），两列会折成三行 ⇒ 长选项一律单列、左对齐 */
.mq-optwrap.mq-opt-longwrap { grid-template-columns: 1fr; gap: 8px; }
.mq-opt {
  min-height: 52px; padding: 12px 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 17px; font-weight: 800; line-height: 1.35;
  color: var(--text); background: #eef1f8;
  border: 2px solid var(--line); border-radius: 12px;
  cursor: pointer; white-space: normal; word-break: break-word;
  font-variant-numeric: tabular-nums;
}
.mq-opt:active { transform: scale(.985); }
.mq-opt-long {
  justify-content: flex-start; text-align: left;
  padding-left: 14px; font-size: 16px; font-weight: 700;
}
.mq-opt.sel { border-color: var(--primary); background: #e7edff; }
.mq-opt.ok { border-color: var(--ok); background: #e8f8ef; color: var(--ok); }
.mq-opt.bad { border-color: var(--bad); background: #fdeced; color: var(--bad); }
.mq-go {
  width: 100%; max-width: 360px; height: auto;
  padding: 13px 0; font-size: 16px; font-weight: 800; border-radius: 12px;
}
/* 解析单独成块（答错/超时才出现）：不塞进反馈行 —— 反馈行是单行文本，解析常有多句 */
.mq-why {
  width: 100%; max-width: 360px; margin-top: 10px; padding: 10px 12px;
  text-align: left; font-size: 13.5px; line-height: 1.75; color: var(--text);
  background: #f4f8fd; border: 1px solid var(--line); border-radius: 10px;
}

/* --- ①b 24 点（第 18 期第五轮：**表达式拼装式**）---
 * 结构（自上而下）：表达式行 / 数字键 ×4 / 运算符键 ×4 / 括号键 ×2 / 提示行 / 撤销·重来·确认。
 * 键的视觉刻意与「数字拆分」的 .sp-chip 对齐（同一批新增引擎，风格要像一个产品）。
 * ⚠️ 数字键区用 flex-wrap：分数（如 -12/13）比整数宽，
 *   万一挤到换行也不会横向溢出容器（横向溢出在窄屏上是致命的，纵向留白只是不好看）。 */
.p24-deck {
  width: 100%; max-width: 360px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
}
.p24-card {
  min-width: 58px; height: 58px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 26px; font-weight: 800; line-height: 1;
  color: var(--text); background: #eef1f8;
  border: 2px solid var(--line); border-radius: 12px;
  cursor: pointer; font-variant-numeric: tabular-nums;
}
/* 分数牌顶到 5~6 个字符（-12/13）⇒ 缩一号字，免得它比别的牌宽一整圈 */
.p24-card.long { font-size: 20px; }
.p24-card.sel { background: #e7edff; border-color: var(--primary); color: var(--primary); }
.p24-card.hit { background: #e8f8ef; border-color: var(--ok); color: var(--ok); }
/* 提示行固定高度：它同时承担"上一步算式 + 下一步该点哪"，内容长短变化不能让键盘上下跳 */
.p24-hint {
  min-height: 20px; width: 100%; max-width: 360px;
  font-size: 13.5px; font-weight: 700; color: #64748b; text-align: center;
}
.p24-ops { display: flex; gap: 10px; justify-content: center; width: 100%; max-width: 300px; }
.p24-op {
  flex: 1 1 0; height: 50px;
  font-family: inherit; font-size: 24px; font-weight: 800;
  color: var(--text); background: #fff;
  border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
}
.p24-op.sel { background: #e7edff; border-color: var(--primary); color: var(--primary); }
.p24-act { display: flex; gap: 10px; justify-content: center; width: 100%; max-width: 300px; }
.p24-actbtn { flex: 1 1 0; padding: 10px 0; font-size: 14px; }
.p24-actbtn:disabled { opacity: .4; }

/* --- ①c 第 18 期第五轮：表达式拼装式新增的三块 ---
 * 表达式行：把玩家拼出的 token **全程显示**出来（这正是本轮要修的"看不见自己搭的式子"）。
 * ⚠️ 它是唯一会变高的元素 ⇒ 给 min-height + 允许 flex-wrap，
 *   否则拼长式子时整个键盘会往下跳（键盘跳动比"留白多一点"难受得多）。 */
.p24-expr {
  width: 100%; max-width: 360px; min-height: 46px; padding: 6px 10px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px;
  background: #f7f9fd; border: 2px dashed var(--line); border-radius: 12px;
  font-size: 22px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* 空态：放一句引导，字号要小，别让"空框"看着像一道题 */
.p24-expr.empty {
  font-size: 13px; font-weight: 700; color: #94a3b8; line-height: 1.5; text-align: center;
}
.p24-tk { padding: 0 2px; }
.p24-tk.num { color: var(--primary); }
/* 数字键「已用掉」：置灰 + 划掉 —— "每个数恰好用一次"的可见表达 */
.p24-card.used {
  background: #f1f3f7; color: #b6bdca; border-color: #e3e7ef; text-decoration: line-through;
}
/* 运算符**恒显 4 个**；本关没开放的那个置灰（旧版是让它整颗消失 ⇒ 玩家找不到又没有解释） */
.p24-op.off { background: #f6f7fa; color: #c3c9d4; border-color: #eceff5; }
/* 括号区：两颗键，做得比运算符"轻"一点，视觉上与运算符区分开 */
.p24-paren { display: flex; gap: 10px; justify-content: center; width: 100%; max-width: 300px; }
.p24-parenbtn {
  flex: 1 1 0; height: 44px;
  font-family: inherit; font-size: 22px; font-weight: 800;
  color: var(--text); background: #fff;
  border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
}
.p24-parenbtn:disabled { opacity: .35; }
/* 确认键：三个动作里唯一的"主操作"，给主色，让"我答完了"一眼就能找到 */
.p24-act .p24-ok { color: #fff; background: var(--primary); border-color: var(--primary); }
.p24-act .p24-ok:disabled { opacity: .4; }

/* --- ② 数字拆分：数字池 --- */
.sp-pool {
  width: 100%; max-width: 340px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.sp-chip {
  min-width: 46px; height: 46px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 19px; font-weight: 800;
  color: var(--text); background: #eef1f8;
  border: 2px solid var(--line); border-radius: 12px;
  cursor: pointer; font-variant-numeric: tabular-nums;
}
.sp-chip.on { background: #e7edff; border-color: var(--primary); color: var(--primary); }
.sp-chip.ok { background: #e8f8ef; border-color: var(--ok); color: var(--ok); }
.sp-chip.bad { background: #fdeced; border-color: var(--bad); color: var(--bad); }
.sp-line, .sp-sum {
  width: 100%; max-width: 340px;
  text-align: center; font-size: 14px; line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.sp-line { font-weight: 700; color: var(--text); }
.sp-sum { font-weight: 800; color: var(--muted); }
/* 和刚好等于目标时给绿 —— 这是玩家唯一能"自己确认对错"的即时反馈 */
.sp-sum.hit { color: var(--ok); }

/* --- ③ 摩天楼：四边提示 + 盘面 ---
 * --sky-clue / --sky-board / --sky-gap 三个尺寸由引擎按视口算好后写到行内样式上
 * （见 games-neuron.js ENGINES.tower）—— 这里是**兜底默认值**，保证即使引擎没写也不塌。
 * ⚠️ 三者必须同源：提示格宽 × n + 间距 × (n-1) 恰好等于盘宽，四边提示才对得齐列。 */
.sky-grid {
  --sky-gap: 4px; --sky-clue: 30px; --sky-board: 280px;
  display: grid; gap: var(--sky-gap);
  align-items: center; justify-items: center;
  width: 100%; margin: 0 auto;
}
/* 提示行/列用 grid-auto-flow 而不是写死列数：n 从 3 到 6 都自适应，无需在读配置的地方再改 CSS */
.sky-line { display: grid; grid-auto-flow: column; grid-auto-columns: var(--sky-clue); gap: var(--sky-gap); }
.sky-col { display: grid; grid-auto-flow: row; grid-auto-rows: var(--sky-clue); gap: var(--sky-gap); }
.sky-clue {
  width: var(--sky-clue); height: var(--sky-clue);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--primary);
  background: #dbeafe; border-radius: 6px; font-variant-numeric: tabular-nums;
}
.sky-none { background: transparent; }
.sky-corner { width: var(--sky-clue); height: var(--sky-clue); }
.sky-board { max-width: none; gap: var(--sky-gap); }
.sky-board .sud-cell { font-size: calc(var(--sky-clue) * 0.5); }
.sky-info {
  text-align: center; font-size: 13px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

