/* ═══════════════════════════════════════════
   game.css — 学生端游戏样式
   ═══════════════════════════════════════════ */

.container {
  max-width: 900px; height: 100vh;
  margin: 0 auto;
  padding: 10px clamp(12px, 2vw, 24px) 10px;
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
}

/* ── Header ── */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 6px;
  flex-wrap: wrap; gap: 6px; flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
/* pp132：🔥天数 / ⭐积分 挪到标题旁（原来占着工具条最左两个位置，把商店挤出屏幕） */
.header-badges { display: inline-flex; align-items: center; gap: 6px; }
.header-left h1 {
  font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.user-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--card-bg); border-radius: 20px; padding: 4px 12px 4px 4px;
  border: 1px solid rgba(255,255,255,0.08);
}
.user-avatar { font-size: 1.3rem; }
.user-name { font-size: 0.8rem; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streak-badge {
  background: linear-gradient(135deg, #ff6b35, #ff8c00);
  border-radius: 16px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; gap: 3px;
}
.points-badge {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  color: #4a3600; border-radius: 16px; padding: 3px 10px; font-size: 0.72rem; font-weight: 800;
  display: flex; align-items: center; gap: 3px;
}
/* pp143：⭐ 徽章从 <span> 改成 <button>（点开积分明细）。
   按钮自带边框/字体/行高，不重置的话会比原来的徽章高出一圈、颜色跑成默认灰字。 */
.points-badge.points-log-open {
  border: 0; font-family: inherit; line-height: 1.25;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: filter 0.15s ease, transform 0.12s ease;
}
.points-badge.points-log-open:hover { filter: brightness(1.06); }
.points-badge.points-log-open:active { transform: scale(0.96); }
.points-badge.points-log-open:focus-visible { outline: 2px solid #ffb700; outline-offset: 2px; }

/* ── 顶部一行：数据卡撑满 + 开始邂逅靠右 ──
   原来是「数据卡一行 / 学科一行 / 开始按钮一行」三行叠着，光这三行就吃掉 ~150px，
   小屏上乐园被压得只剩一小块（学生反馈玩起来难受）。现在数据卡与按钮同排、
   学科并进「我的动物们」标题行，乐园多出近一屏 1/4 的高度。 */
.top-row {
  display: flex; align-items: stretch; gap: 8px;
  margin-bottom: 6px; flex-shrink: 0;
}
.top-row .stats-bar { flex: 1 1 auto; min-width: 0; margin-bottom: 0; flex-wrap: nowrap; gap: 6px; }
.top-row .stat-card { padding: 5px 8px; min-width: 0; }
.top-row .stat-num { font-size: 1.05rem; line-height: 1.25; }
.top-row .stat-label { font-size: 0.62rem; margin-top: 1px; white-space: nowrap; }
.top-row .action-area { flex: 0 0 auto; display: flex; align-items: center; margin: 0; }
.top-row .action-area > .btn {
  height: 100%; white-space: nowrap; padding: 0 16px; font-size: 0.86rem;
  display: flex; align-items: center; justify-content: center;
}
/* 只读查看：按钮 + 说明挤在一行会太长，让说明自己换行 */
.top-row .action-area.view-only { gap: 8px; }
.top-row .action-area.view-only .view-only-tip { font-size: 0.72rem; white-space: nowrap; }

/* ── Stats ── */
.stats-bar { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; flex-shrink: 0; }
.stat-card {
  flex: 1; min-width: 72px;
  background: var(--card-bg); border-radius: 10px; padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.06); text-align: center;
}
.stat-num { font-size: 1.2rem; font-weight: 700; }
.stat-label { font-size: 0.65rem; color: var(--text-dim); margin-top: 2px; }
.stat-card.s1 .stat-num { color: var(--accent); }
.stat-card.s2 .stat-num { color: var(--accent2); }
.stat-card.s3 .stat-num { color: var(--accent3); }
.stat-card.s4 .stat-num { color: #b388ff; }

/* ── 学科选择（学科隔离：只显示老师已启用的学科） ── */
.subject-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  flex-wrap: wrap; flex-shrink: 0;
}
/* 并进「我的动物们」标题行时（inline）：贴紧标题、不再占一整行 */
.subject-bar.inline {
  margin-bottom: 0; gap: 5px; flex-wrap: nowrap; flex-shrink: 0;
}
.subject-bar.inline .sb-label { display: none; }   /* 标题行里「选择学科：」太啰嗦，靠 chip 自解释 */
.subject-bar.inline .subject-chip { padding: 3px 10px; font-size: 0.75rem; border-radius: 12px; }
.title-subject-slot { display: inline-flex; align-items: center; min-width: 0; flex-shrink: 0; }
.subject-bar .sb-label { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; }
.subject-chip {
  padding: 5px 16px; border-radius: 16px; cursor: pointer;
  background: var(--card-bg); border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem; font-weight: 600; color: var(--text);
  transition: all 0.15s; font-family: inherit;
}
.subject-chip:hover { border-color: var(--accent2); }
.subject-chip.active {
  background: linear-gradient(135deg, var(--accent2), #44a08d);
  color: #0f1a1a; border-color: transparent; font-weight: 800;
}
.subject-chip .cnt { font-size: 0.62rem; opacity: 0.75; margin-left: 3px; }
.sb-hint { font-size: 0.75rem; color: var(--accent3); }

/* ── Action ── */
.action-area { text-align: center; margin-bottom: 6px; flex-shrink: 0; }

/* ── Playground ── */
.section-title {
  font-size: 0.85rem; font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  flex-wrap: wrap; row-gap: 4px;
}
/* 长提示允许被压缩省略：这一行还要塞学科 chip、筛选、四个按钮，不能让提示霸位 */
.section-title .txt-dim { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 宠物筛选（种类 / 等级）── */
.pet-filter {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  margin-left: 2px;
}
/* 自绘下拉在标题行里要更矮更小（默认 .pp-sel-btn 是表单尺寸，会把这行顶高） */
body .pet-filter .pp-sel-btn {
  padding: 3px 8px; font-size: 0.74rem; line-height: 1.35;
  border-width: 1px; border-radius: 9px;
  /* ⚠ 学生端是**浅色**主题（--card-bg=#fff、--text=#3B3557），
     这里原来是照深色底写的 rgba(255,255,255,0.06)，在浅底上等于没边框、看不清 */
  background: #F1EDFF; color: var(--text);
  border-color: var(--kid-line, rgba(120,110,170,0.22));
  gap: 3px;
}
/* 默认 .pp-sel-label 是 flex:1 1 auto，会把箭头一路顶到最右边、跟文字离很远 */
body .pet-filter .pp-sel-label { flex: 0 1 auto; }
/* 「全部种类 / 全部等级」是空值，组件默认按占位色渲染 → 浅底上几乎看不清 */
body .pet-filter .pp-sel-btn.is-placeholder .pp-sel-label { color: var(--text); opacity: 1; }
body .pet-filter .pp-sel-btn .pp-sel-caret { font-size: 0.6rem; color: var(--text-dim); }
body .pet-filter .pf-count { font-size: 0.7rem; color: var(--accent2); font-weight: 700; white-space: nowrap; }
body .pet-filter .pf-count.is-none { color: var(--accent3); }
body .pet-filter .pf-clear {
  font-family: inherit; font-size: 0.72rem; font-weight: 700; cursor: pointer;
  padding: 3px 8px; border-radius: 9px; white-space: nowrap;
  background: #F1EDFF; color: var(--text-dim);
  border: 1px solid var(--kid-line, rgba(120,110,170,0.22));
}
body .pet-filter .pf-clear:hover { color: var(--text); border-color: var(--accent2); }
/* 被筛掉的精灵：彻底不显示（仍在 animState 里，关掉筛选原位回来） */
body .pet-sprite.filtered-out { display: none !important; }
body .playground > .pf-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--text-dim); font-size: 0.85rem; text-align: center; padding: 20px;
  z-index: 2; pointer-events: none;
}
body .playground > .pf-empty .pf-empty-emoji { font-size: 2.2rem; opacity: 0.75; }
body .playground > .pf-empty .pf-empty-tip { font-size: 0.72rem; opacity: 0.85; }
.playground-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.playground {
  position: relative; width: 100%; flex: 1; min-height: 200px;
  background: rgba(0,0,0,0.25); border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06); overflow: hidden; margin-bottom: 0;
}
.playground::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 70%, rgba(78,205,196,0.03) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(255,215,0,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.playground.has-bg::before { display: none; }
/* pp104：小动物图片的**基准边长**（--pet-scale 是学生调的比例，两者相乘 = 实际尺寸）。
   放成变量是为了让 anim.js 也能读到同一个数字算占位宽高/边界，不用两边各写一份 84。 */
.playground { --pet-base: 84px; }
.pet-sprite {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center;
  cursor: pointer; user-select: none; z-index: 1; transition: none;
  /* 位置由 JS 写 transform: translate3d(...)（合成层移动，不触发布局）
     —— 以前用 left/top，每只每帧都要重排+重绘，几十只就卡 */
  /* ⚠ 性能关键：must 提前声明 will-change，否则每次改 transform 仍会走
     「重绘 → 重新合成」路径。60 只活动状态实测 36.7ms/帧，加上这一条直接
     16.7ms（稳定 60fps）；去掉 emoji 的 drop-shadow、把等级文字改纯色都
     毫无增益，说明瓶颈在是否被提升为独立合成层，不在绘制内容。 */
  will-change: transform;
  backface-visibility: hidden;
}
.pet-sprite:hover { z-index: 10; filter: brightness(1.2) drop-shadow(0 0 8px rgba(255,215,0,0.4)); }
/* 点一下的弹跳做在图片上：如果做在 .pet-sprite 上，keyframes 的 transform 会覆盖
   掉用于定位的 translate3d，精灵会瞬间跳到左上角 */
.pet-sprite.selected { z-index: 10; }
.pet-sprite.selected .sprite-emoji { animation: petPop 0.4s ease-out; }
@keyframes petPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
/* pp104：图片边长由 `--pet-scale` 控制（学生可以在乐园里拖滑块调大小，见 anim.js setPetScale）。
   基准仍是 84px / 3.6rem，scale=1 时与改动前完全一致。
   ⚠ 名字与等级也跟着缩，但留了 `max()` 下限 —— 缩到 55% 时名字还剩 0.78rem，
     否则几十只挤在一起时文字先糊成一片，比图片小更难受。 */
.pet-sprite .sprite-emoji {
  width: calc(84px * var(--pet-scale, 1));
  height: calc(84px * var(--pet-scale, 1));
  display: flex; align-items: center; justify-content: center;
  font-size: calc(3.6rem * var(--pet-scale, 1));
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
  line-height: 1;
}
/* ⚠ 这里的选择器统一带 `body` 前缀，是为了压过页面最后加载的共用主题 `../kid-app.css`
   （它有一条同权重的 `.pet-sprite .sprite-name { color: var(--kid-ink) }`（#3B3557，深紫黑），
    同权重 + 后加载会把金色盖掉 → 名字看着就是「黑的」）。
   body 前缀把权重从 (0,2,0) 提到 (0,2,1)，与加载顺序无关。 */
/* 等级写在头顶：**静态金色高亮**（pp59 起去掉金→紫流光）。
   以前是渐变文字裁剪 + 2.8s 无限循环动画，每只精灵每帧都要重绘一次 ——
   动物一多主线程就被拖垮（>20 只时帧率 60→20），还得靠 `.many` 降级救场。
   现在直接给纯金色 + 和名字同款的下投影，一个字节的动画都不跑，几十只也不掉帧。 */
body .pet-sprite .sprite-level {
  font-size: max(0.72rem, calc(1rem * var(--pet-scale, 1)));
  font-weight: 900; letter-spacing: 0.5px;
  line-height: 1.25; margin-bottom: 0; white-space: nowrap;
  color: #ffd338;
  text-shadow: 0 2px 5px rgba(30,14,0,0.6), 0 1px 2px rgba(30,14,0,0.35);
}
/* 名字在脚下：金色高亮。同样不描边，只用柔和下投影。 */
body .pet-sprite .sprite-name {
  font-size: max(0.78rem, calc(1.06rem * var(--pet-scale, 1)));
  font-weight: 900;
  color: #ffd338;
  line-height: 1.3; margin-top: 1px; white-space: nowrap;
  max-width: 152px; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 5px rgba(30,14,0,0.6), 0 1px 2px rgba(30,14,0,0.35);
}
@media (prefers-reduced-motion: reduce) {
  body .pet-sprite .sprite-level { letter-spacing: 0.5px; }
}
.sprite-img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ── 四向行走帧动画（pp60）─────────────────────────────────────────
   .walk-clip 只负责裁剪（内层整条 sheet 宽 800%，不裁就会糊到旁边同学脸上），
   .walk-layer 只做 translateX 位移 → 全程走合成层，不触发布局/重绘。
   ⚠ 向左走不另做一套图：给 .walk-clip 加 scaleX(-1) 镜像即可。
     镜像必须放在**父层**，放在 .walk-layer 上会被 keyframes 里的 transform 覆盖掉。 */
.pet-sprite .sprite-emoji { position: relative; }
.walk-clip { position: absolute; inset: 0; overflow: hidden; display: none; }
.pet-sprite.walking .walk-clip { display: block; }
/* 走路时藏掉静态图：用 visibility 而不是 display —— display 变化会让 flex 重算布局，
   几十只同屏时每只每趟都要重排一次，白扔性能。 */
.pet-sprite.walking > .sprite-emoji > .sprite-img { visibility: hidden; }
.pet-sprite.face-l .walk-clip { transform: scaleX(-1); }
.walk-layer {
  position: absolute; left: 0; top: 0; height: 100%;
  background-repeat: no-repeat; background-size: 100% 100%;
  will-change: transform;
  animation-name: ppWalk; animation-duration: 0.67s;
  animation-timing-function: steps(8); animation-iteration-count: infinite;
  animation-play-state: paused;      /* 站着就停帧（pp51 同一套思路） */
}
.pet-sprite.walking .walk-layer { animation-play-state: running; }
@keyframes ppWalk {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }   /* = 8 格 × steps(8) → 正好走完一格都不多 */
}
/* 动物形象小图（pp59 起用内置美术替换 emoji）：乐园精灵走 .sprite-img，
   下面这组用于「邂逅 / 合成 / 改名」这些单独摆一只大图的位置。
   尺寸按原来的 emoji 字号折算，视觉大小与旧版一致。 */
body .pet-icon { display: block; object-fit: contain; image-rendering: auto; }
body .encounter-emoji .pet-icon { width: 78px; height: 78px; }
body .encounter-card.has-img .encounter-emoji .pet-icon { width: 46px; height: 46px; }
body .merge-petrow {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 8px;
}
body .merge-petrow .pet-icon { width: 62px; height: 62px; }
body .merge-petrow .merge-plus { font-size: 1.3rem; font-weight: 800; color: var(--text-dim); }
/* pp88：名字选项不再带动物图标（body .name-opt-pet 已随图标一起去掉） */
.empty-state {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--text-dim);
}
.empty-state .empty-emoji { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; }
.txt-dim { color: var(--text-dim); }

/* ── Encounter / Merge 弹层 ── */
.encounter-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 14px;
  animation: fadeIn 0.25s;
  /* pp86：兜底——万一某个卡片还是比视口高，至少整个遮罩能滚，
     不至于像以前那样「内容在屏幕外、手指划不动」把人卡死在这里。 */
  overflow-y: auto;
  overscroll-behavior: contain;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.encounter-card {
  background: var(--card-bg); border-radius: 20px; padding: 22px 24px;
  max-width: 440px; width: 94%; text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.3s;
  margin: auto;   /* pp86：超高时从顶部开始排，别把顶部裁到屏幕外 */
  /* ── 单页布局（2026-10-18）──
     卡片固定一屏高，纵向三段：头部(动物/标题) / 题目区(可滚) / 底部(命名行，常驻)。
     带配图的题最容易把命名行挤出可视区，这样改后命名行永远看得见、不用滚。 */
  display: flex; flex-direction: column;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);   /* pp86：手机地址栏/键盘弹起时用「当前视口」 */
}
.encounter-head { flex: 0 0 auto; }
.encounter-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.encounter-foot {
  flex: 0 0 auto; padding-top: 9px; margin-top: 6px;
  border-top: 1px dashed var(--kid-line, rgba(120,110,170,0.2));
}
.encounter-hint { font-size: 0.78rem; color: var(--text-dim); }
.encounter-name-tip { font-size: 0.76rem; color: var(--text-dim); margin: 8px 0 6px; }
/* 有配图时把「动物表情 + 标题」压扁，给题目和命名行腾地方 */
.encounter-card.has-img .encounter-emoji { font-size: 2.1rem; margin-bottom: 2px; animation: none; }
.encounter-card.has-img .encounter-title { margin: 5px 0 0; font-size: 0.96rem; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.encounter-emoji { font-size: 4.2rem; margin-bottom: 6px; animation: bounce 0.6s alternate infinite; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }
.encounter-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.encounter-level {
  display: inline-block; background: rgba(255,215,0,0.12); color: var(--accent);
  border-radius: 12px; padding: 3px 12px; font-size: 0.75rem; font-weight: 700;
}
.encounter-subject {
  display: inline-block; background: rgba(78,205,196,0.12); color: var(--accent2);
  border-radius: 12px; padding: 3px 12px; font-size: 0.75rem; font-weight: 700;
}
.encounter-title { font-size: 1.05rem; font-weight: 700; margin: 10px 0 2px; }
.encounter-question { font-size: 1.25rem; font-weight: 700; margin: 14px 0 4px; line-height: 1.6; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.options-grid.cols1 { grid-template-columns: 1fr; }
.option-btn {
  padding: 13px 10px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03); color: var(--text);
  font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
  word-break: break-word; font-family: inherit;
}
.option-btn:hover { border-color: var(--accent2); background: rgba(78,205,196,0.08); }
.option-btn.correct { border-color: var(--green); background: rgba(46,204,113,0.15); color: var(--green); }
.option-btn.wrong { border-color: var(--red); background: rgba(231,76,60,0.15); color: var(--red); }
.option-btn:disabled { pointer-events: none; }
/* ── 两步作答（pp82）：点选项＝选中（可改），点「就选它」才提交 ──
   选中态要够显眼又不能盖住 hover；角落 ✓ 徽标让「我到底选了哪个」一眼可见 */
.option-btn { position: relative; }
.option-btn.picked {
  border-color: var(--accent2);
  background: rgba(78,205,196,0.16);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.22);
}
.option-btn.picked::after {
  /* ⚠ 徽标必须画在按钮**内部**：用负偏移会撑出横向溢出 →
     可滚动的 .encounter-body 底部会冒出一条横向滚动条（pp82 踩过） */
  content: '✓'; position: absolute; top: 5px; right: 5px;
  width: 20px; height: 20px; border-radius: 50%; line-height: 20px; text-align: center;
  background: var(--accent2); color: #06302c;
  font-size: 0.74rem; font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.qc-row { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; flex-wrap: wrap; }
.qc-row .qc-go { min-width: 132px; }
.qc-row .qc-go:disabled { opacity: 0.45; cursor: not-allowed; }
.qc-hint { font-size: 0.76rem; color: var(--text-dim); }
.qc-hint.on { color: var(--accent2); font-weight: 700; }
/* ── 图片选项（pp68）：选项本身就是图（天气符号 / 气流图 / 风旗 / 容器…）
   一行一个竖排：图比文字占地方，三张并排会缩到看不清；点整行即选中 ── */
.options-grid.pics { grid-template-columns: 1fr; gap: 8px; }
/* ── 四图比较（pp126）：题库写 picCols:2 的题排成 2×2 ──
   起因：第 6 题「四幅显微图像选叶肉细胞」，单列时四张 175px 的图比一屏还高，
   学生得上下滑才比得出来，比较题最怕这个。2×2 后两行只占 ~330px，四幅一眼看全。
   图压到 150px：源图本来就只有 58~79px，再大会更糊；150 已是它的 2 倍，够看结构。
   min-height 归零：图片按钮本来就被图撑开了，留着 64px 只会撑高。 */
.options-grid.pics.pics2 { grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.options-grid.pics.pics2 .option-btn.option-pic { padding: 6px; min-height: 0; }
.options-grid.pics.pics2 .option-img { max-height: 150px; }
/* 字母选项（图上标 A/B/C 的图选择题）：三个字母排成一行，跟原卷一样 */
.options-grid.letters { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.options-grid.letters .option-btn { padding: 12px 6px; font-size: 1.1rem; letter-spacing: 0.02em; }
.option-btn.option-pic {
  padding: 8px 10px; display: flex; align-items: center; justify-content: center;
  min-height: 64px;
}
.option-btn.option-pic .option-img {
  /* 132 → 175：气流示意图里有「上升/下沉气流」小字，矮了看不清；卡片本来就能滚动 */
  display: block; max-width: 100%; max-height: 175px; width: auto; height: auto;
  /* 扫描图是白底，圆角 + 白底免得跟深色卡片背景之间出硬边 */
  border-radius: 8px; background: #fff; padding: 2px;
}
/* 反馈条 / 错题本 / 教师端表格里的「正确答案缩略图」 */
.ans-thumb {
  display: inline-block; vertical-align: middle; max-height: 64px; max-width: 200px;
  border-radius: 6px; background: #fff; border: 1px solid rgba(0,0,0,0.1); padding: 1px;
}
.wb-a .ans-thumb { max-height: 52px; }
.cust-input {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 8px 12px; color: var(--text); font-size: 0.9rem;
  width: 140px; text-align: center; outline: none; font-family: inherit;
}
.cust-input:focus { border-color: var(--accent2); }

/* 命名行：输入框 + 🎲 随机按钮 */
.name-row { display: flex; gap: 8px; align-items: center; justify-content: center; }
.name-row .cust-input { width: 150px; }
.name-dice { flex: 0 0 auto; white-space: nowrap; }

/* ── pp138：答题卡底部常驻区（选项 + 「就选它」+ 压缩命名行）──
   起因（10-31 用户原话「选项和确认按钮还是没有固定一直可见」）：动作行原来跟题干一起
   在可滚的 .encounter-body 里，320×568 长题干实测「✅ 就选它」top=574 > 可视底 568 →
   按钮整个在屏幕外，孩子以为点了没反应。
   现在：文本选项（≤4 个）+ 动作行 + 命名行全部钉进 .encounter-foot（flex:0 0 auto，永不滚动）。
   图片选项/超过 4 个选项仍留在可滚区（图太大，硬钉会把题干挤没）。 */
body .encounter-foot > .options-grid { margin: 0 0 8px; gap: 8px; }
body .encounter-foot > .options-grid .option-btn { padding: 10px 8px; font-size: 0.95rem; }
body .encounter-foot > .qc-row { margin: 0; }
body .encounter-foot > .q-body { margin: 0; }
/* 命名行压缩：原来「一整句引导 + 输入框 + 🎲 随机」在 foot 里占 111px，
   现在压成一行「🐾 名字 [输入框] 🎲」≈ 34px，省下的高度全给题目。
   名字的引导语（"给它起个名字（也可以点 🎲 随机取一个）"）本身不承载信息，整句删掉。 */
.name-row.compact { gap: 6px; margin-top: 7px; flex-wrap: nowrap; }
.name-row-lbl { flex: 0 0 auto; font-size: 0.76rem; color: var(--text-dim); font-weight: 700; white-space: nowrap; }
.name-row.compact .cust-input { flex: 1 1 auto; min-width: 0; width: auto; padding: 6px 10px; }
.name-row.compact .name-dice { padding: 6px 10px; font-size: 0.86rem; }

/* ── 答题主体（选择 / 填空 / 简答 通用） ── */
.q-body { margin: 12px 0 4px; }
.qa-input {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.12); border-radius: 12px;
  padding: 11px 14px; color: var(--text); font-size: 0.95rem;
  outline: none; font-family: inherit; resize: vertical; line-height: 1.6;
  transition: border-color 0.15s, background 0.15s;
}
.qa-input::placeholder { color: rgba(255,255,255,0.3); }
.qa-input:focus { border-color: var(--accent2); background: rgba(78,205,196,0.06); }
.qa-input:disabled { opacity: 0.9; cursor: default; }
.qa-input.is-correct { border-color: var(--green); background: rgba(46,204,113,0.12); }
.qa-input.is-wrong { border-color: var(--red); background: rgba(231,76,60,0.12); }
.qa-submit { margin: 0 auto; }

/* 答题反馈条：答错展示正确答案（等确认）/ 答对轻提示 */
.q-feedback { margin-top: 12px; border-radius: 12px; padding: 10px 14px; text-align: left; animation: slideUp 0.25s; }
.q-feedback.qf-bad { background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.4); }
.qf-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 8px; color: var(--red); }
.qf-answer {
  font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.5;
  background: rgba(255,255,255,0.06); border-radius: 8px; padding: 9px 12px;
  margin-bottom: 10px; word-break: break-word;
}
.qf-btn { width: 100%; }
.q-feedback.qf-ok { text-align: center; background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.4); }
.q-feedback.qf-ok .qf-title { color: var(--green); margin-bottom: 0; }
/* 答对时标题下面还有解析 → 补回间距（:last-child 时保持 0） */
.q-feedback.qf-ok .qf-title:not(:last-child) { margin-bottom: 6px; }
/* 解析条（答对答错都显示）：浅米底 + 深棕金字，弹窗白底/深底都可读 */
.qf-explain {
  display: flex; gap: 6px; align-items: flex-start;
  margin: 8px 0 10px; padding: 8px 10px; border-radius: 8px;
  background: #FFF8E1; border: 1px solid #F0DFA8; border-left: 3px solid #E0B84C;
  text-align: left; font-size: 0.78rem; line-height: 1.7; color: #6B4E00;
  word-break: break-word;
}
.qf-explain-tag { flex: none; font-weight: 800; color: #8A6D1F; white-space: nowrap; }
.qf-explain-txt { flex: 1 1 auto; }

/* 合成答题提示条 */
.merge-quiz-tip {
  background: rgba(78,205,196,0.1); border: 1px solid rgba(78,205,196,0.35);
  color: var(--accent2); border-radius: 12px; padding: 7px 12px;
  font-size: 0.78rem; font-weight: 700; margin-bottom: 10px;
  animation: mergeTipPulse 1.6s ease-in-out infinite;
}
@keyframes mergeTipPulse {
  0%, 100% { border-color: rgba(78,205,196,0.35); }
  50% { border-color: rgba(78,205,196,0.75); }
}

/* 合成答题结果行 */
.merge-quiz-result {
  border-radius: 12px; padding: 9px 14px; font-size: 0.85rem; font-weight: 700;
  margin-bottom: 10px; line-height: 1.7; word-break: break-word;
  animation: slideUp 0.25s;
}
.merge-quiz-result.ok { background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.4); color: var(--green); }
.merge-quiz-result.bad { background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.4); color: var(--red); }

/* 合成防作弊提示（答题阶段：不能中途取消） */
.merge-lock-tip { margin-top: 12px; font-size: 0.72rem; color: var(--text-dim); }

/* 合成命名选择卡（pp89 布局）：
     第一行 = 名字1 | 名字2 | 随机   （三个按钮挤一行）
     第二行 = 自己取名输入框 | ✨ 确认合成
   pp88：原来每个按钮带 26px 动物图标 + 各自 min-width: 86px，320px 宽屏上放不下三个 →
   第三个按钮被挤到第二行、再下面才是名字输入框，整个命名区占三行。
   现在：不带图标 + flex:1 1 0 + min-width:0 → 三个等分一行。 */
.name-opts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.name-opt {
  display: inline-flex; align-items: center; gap: 5px; justify-content: center;
  padding: 10px 8px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03); color: var(--text);
  font-size: 0.92rem; font-weight: 700; cursor: pointer; transition: all 0.15s;
  font-family: inherit;
  /* 等分一行：basis 0 让三个按钮按内容自然分，min-width:0 才能真的压缩 */
  flex: 1 1 0; min-width: 0; max-width: 100%;
  /* 名字长了不换行、不撑破 —— 超出打点（完整名字在选中后仍然可用） */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.name-opt > span { overflow: hidden; text-overflow: ellipsis; }
/* pp89：「随机」按钮不参与等分，按内容拿宽度（点过之后它会显示抽到的名字，
   长短会变，固定宽度更稳），剩下的宽度给两个名字按钮分 */
.name-opt-rand { flex: 0 0 auto; }
.name-opt:hover { border-color: var(--accent2); background: rgba(78,205,196,0.08); }
.name-opt.selected {
  border-color: var(--accent2); background: rgba(78,205,196,0.16);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.15);
}
/* ✏️ 自己取名字：看起来和选项同款，但是可输入的（pp89：和「确认合成」同一行，左输入右按钮） */
.name-opt-input {
  flex: 1 1 auto; min-width: 0; text-align: center; cursor: text;
  font-size: 16px;   /* ≥16px 避免 iOS 聚焦时自动放大页面 */
  letter-spacing: 0.02em;
}
/* 第二行：输入框占满剩余宽度，「确认合成」按内容贴右边 */
.merge-name-line { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.merge-name-line .merge-go { flex: 0 0 auto; white-space: nowrap; padding-left: 14px; padding-right: 14px; }
/* pp138：命名 chips 与「✨ 确认合成」并排一行（原来 chips 一行、输入框+按钮一行 = 两行 ~90px）。
   chips 一行等分剩余宽度，按钮按内容贴右边，确认按钮因此永远紧贴成功率下方、不用滚。 */
.merge-name-line .name-opts { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; gap: 6px; }
/* ⚠ pp138：四个 chip 必须**等分**。原来「🎲 随机 / ✏️ 自己取」继承了 .name-opt-rand 的
   flex:0 0 auto（按内容拿宽度，pp89 为三个按钮设计的），四个挤一行时它俩吃掉 136px，
   两个名字各只剩 17px —— 名字被 ellipsis 吞成一个空白小药丸，孩子看不出选的是谁。 */
.merge-name-line .name-opts .name-opt { flex: 1 1 0; min-width: 0; }
.name-opts.compact .name-opt { padding: 5px 4px; font-size: 0.74rem; border-radius: 11px; }
/* pp138：chips 与「✨ 确认合成」**分两行**（chips 占一行，按钮占一行）。
   一行放不下是算过的：卡片内容宽 315px（390 屏），按钮 110 + 四个 chip 内容宽合计 180 + 间距，
   怎么都差 1~10px，硬塞的结果就是「自…」「随…」全被截断。
   分两行后 chips 每个 ≈74px（390）/ ≈51px（320），四个标签都完整可读；
   按钮变成整行宽，反而更好点。多花的 ~40px 高度由可滚的题目区让出来。 */
.merge-name-line { flex-wrap: wrap; row-gap: 6px; }
.merge-name-line .name-opts { flex: 1 1 100%; }
.merge-name-line .merge-go { flex: 1 1 100%; margin-top: 0; }
.name-opt-input::placeholder { color: var(--text-dim); font-weight: 700; font-size: 0.92rem; }
.name-opt-input:focus { outline: none; border-color: var(--accent2); background: rgba(78,205,196,0.08); }
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.name-opts.shake { animation: shakeX 0.4s; }
.train-card {
  background: var(--card-bg); border-radius: 20px; padding: 22px 22px;
  max-width: 420px; width: 92%; text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.3s;
  /* 与 .encounter-card 同样的单页三段式布局 */
  display: flex; flex-direction: column;
  max-height: calc(100vh - 28px);
  /* pp86：手机地址栏收起/展开、自取名输入框唤起键盘时 100vh 是「最大视口」不是「当前视口」，
     用 dvh 才跟得上；不支持 dvh 的老浏览器仍用上面那行 vh。
     另外 margin:auto 让卡片在空间不足时从顶部开始排（flex 居中 + 内容超高会把顶部裁到屏幕外）。 */
  max-height: calc(100dvh - 28px);
  margin: auto;
}
/* pp86 关键修复：解析（explain）挂在 .train-head 里，原来 head 是 flex:0 0 auto
   —— 既不收缩也不滚动，解析一长就吃满卡片高度，把可滚动的 .train-body 压成 0、
   把 .train-foot（取名区 + 「确认合成」按钮）顶到屏幕外，手机小屏 + 长解析时
   孩子点不到按钮 → 只能退出 → 存档留下 pendingMerge 卡在 confirm（线上已 4 例）。
   现在 head 与 body 都能收缩 + 各自内部滚动，foot 永远完整可见。 */
.train-head {
  flex: 0 1 auto; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.train-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.train-foot {
  flex: 0 0 auto; padding-top: 9px; margin-top: 6px;
  border-top: 1px dashed var(--kid-line, rgba(120,110,170,0.2));
}

/* ── pp117：合成答题的「选项 + 就选它」搬到常驻区（.train-answer）──
   原来它在 .train-body 里跟题干一起滚，矮屏上必须滑动才看得到确认按钮。
   这里把 .q-body / .options-grid / .qc-row 自带的外边距收掉，省下的高度全给题干。 */
.train-answer { padding-top: 7px; }
/* 答完题会在这块里追加「答错了/答对啦 + 解析 + 继续」：解析一长就会把卡片顶出屏幕
   （foot 不参与 flex 收缩）。给它一个上限 + 自己滚，配合 fitFeedback() 给解析限高，
   「👌 我记住了，继续」永远在视野里。 */
.train-answer { max-height: 58vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body .train-answer .q-body { margin: 0; }
body .train-answer .options-grid { margin: 2px 0 8px; }
body .train-answer .qc-row { margin: 0 0 2px; }
body .train-answer .merge-lock-tip { margin-top: 8px; }
.train-card.has-img .merge-quiz-tip { margin-bottom: 6px; }
/* pp87：头部两行（原来写内联样式，矮屏改字号要 !important，改成类名） */
.merge-line-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.merge-line-lv { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 10px; }
/* 成功率：pp87 从可伸缩的 body 移进常驻 foot（矮屏上 body 会被压到 20 多 px，
   原来「成功率 100%」会被裁掉半截） */
.merge-prob { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
/* pp135：答题阶段的成功率预览「现在 84% → 答对 94%」。
   放在 card 行与题干之间（不在可滚动的 .train-body 里），矮屏也一直看得见。 */
.merge-prob-preview {
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap;
  gap: 6px; margin: 2px 0 9px; font-size: 0.92rem; font-weight: 700;
}
.merge-prob-preview .cur { color: var(--text-dim); }
.merge-prob-preview .arrow,
.merge-prob-preview .suffix { color: var(--text-dim); font-weight: 400; }
.merge-prob-preview .best { color: var(--green); }
/* pp89：确认按钮不再是独立居中的一行（.merge-confirm 已删），挪进 .merge-name-line 贴输入框右侧 */
.merge-foot-hint { margin-top: 10px; font-size: 0.7rem; color: var(--text-dim); }
/* pp54：目标是满级时补一行金色提示 */
.merge-foot-hint.merge-cap-hint {
  margin-top: 4px; color: var(--accent3, #d68910); font-weight: 700;
}
/* ── pp87：矮屏压缩（手机 320×568 / 360×640 的实际可视高常只有 480~560）──
   省下来的高度全给「解析」：动物图 62→42、标题压一行、命名按钮两列、字号各降一档。 */
@media (max-height: 700px) {
  body .train-card { padding: 14px; }
  body .merge-petrow { margin-bottom: 4px; }
  body .merge-petrow .pet-icon { width: 42px; height: 42px; }
  body .merge-petrow .merge-plus { font-size: 1rem; }
  .merge-line-name { font-size: 0.8rem; margin-bottom: 2px; }
  .merge-line-lv { font-size: 0.72rem; margin-bottom: 6px; }
  .merge-prob { font-size: 1rem; margin-bottom: 4px; }
  .merge-prob-preview { font-size: 0.84rem; margin: 0 0 6px; gap: 4px; }
  .merge-quiz-result { padding: 7px 10px; font-size: 0.8rem; line-height: 1.5; margin-bottom: 6px; }
  body .train-foot { padding-top: 6px; margin-top: 4px; }
  .train-card-merge .name-opts { gap: 6px; }
  /* pp88：三个名字按钮仍要挤一行（flex 由 .name-opt 基类给），这里只压内边距和字号 */
  .train-card-merge .name-opt { padding: 7px 6px; font-size: 0.8rem; }
  /* pp89：输入框那行也压一压，让「✨ 确认合成」别把输入框挤没 */
  .merge-name-line { gap: 6px; margin-top: 6px; }
  .merge-name-line .merge-go { padding: 7px 10px; font-size: 0.8rem; }
  .merge-name-line .name-opt-input { font-size: 15px; }
  .merge-name-line .name-opt-input::placeholder { font-size: 0.76rem; }
  .merge-foot-hint { margin-top: 6px; font-size: 0.66rem; }
  .merge-lock-tip { margin-top: 6px; font-size: 0.68rem; }
  /* pp117：合成答题的选项常驻在 foot，矮屏上再压一档，别把题干挤没 */
  body .train-answer { padding-top: 5px; }
  body .train-answer .options-grid { gap: 7px; margin: 2px 0 6px; }
  body .train-answer .option-btn { padding: 9px 8px; font-size: 0.92rem; border-radius: 12px; }
  body .train-answer .qc-row { gap: 8px; }
  body .train-answer .qc-row .qc-go { min-width: 110px; padding: 8px 10px; font-size: 0.85rem; }
  body .train-answer .merge-lock-tip { margin-top: 5px; }
  /* pp138：矮屏上常驻区再压一档 —— 选项更矮、命名行更紧，保证「就选它」不被顶出去 */
  body .encounter-foot { padding-top: 7px; margin-top: 4px; }
  body .encounter-foot > .options-grid { gap: 6px; margin: 0 0 6px; }
  body .encounter-foot > .options-grid .option-btn { padding: 8px 7px; font-size: 0.88rem; border-radius: 12px; }
  .name-row.compact { margin-top: 5px; gap: 5px; }
  .name-row-lbl { font-size: 0.7rem; }
  .name-row.compact .cust-input { padding: 5px 8px; font-size: 0.85rem; }
  .name-row.compact .name-dice { padding: 5px 8px; font-size: 0.78rem; }
  .merge-name-line .name-opts { gap: 4px; }
  .name-opts.compact .name-opt { padding: 5px 4px; font-size: 0.72rem; border-radius: 10px; }
  .merge-name-line .merge-go { padding: 6px 9px; font-size: 0.76rem; }
}

/* ── 欢迎页 ── */
.setup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
/* 矮屏兜底（pp97）：弹窗比屏幕高时能滚。
   ⚠ 不能只加 overflow-y:auto —— flex 的 align-items:center 遇到溢出会把卡片顶到负坐标，
     上面那截滚不到，底部按钮也点不着（320×568 换头像弹窗实测 top=-9 / bottom=577）。
   ⚠ 必须同时写 overflow-x:hidden（pp95 踩过：只写 y 会让 x 变成 auto，冒出横向滚动条）。 */
body .setup-overlay {
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start;          /* 交给子元素的 auto 外边距做居中：有空间仍居中，没空间就贴顶可滚 */
}
body .setup-overlay > * { margin-top: auto; margin-bottom: auto; }
.setup-card {
  background: var(--card-bg); border-radius: 20px; padding: 34px 26px;
  max-width: 400px; width: 94%; text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.setup-card h2 { font-size: 1.35rem; margin-bottom: 6px; }
.setup-card .setup-emoji { font-size: 3.6rem; margin-bottom: 10px; }
.avatar-picker { display: flex; gap: 6px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.avatar-option {
  font-size: 1.9rem; padding: 5px; border-radius: 14px; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s;
}
.avatar-option:hover { background: rgba(255,255,255,0.08); }
.avatar-option.selected { border-color: var(--accent); background: rgba(255,215,0,0.1); }

/* ── 照片头像（pp83）──
   头像值有两种：表情（文字）或自己上传的照片地址。
   照片统一渲染成圆形、尺寸跟着 1em 走（顶栏 1.3rem、留言条更小），各处不用单独写死。 */
.av-img {
  width: 1em; height: 1em; border-radius: 50%; object-fit: cover;
  vertical-align: -0.15em; display: inline-block; background: #fff;
}
.user-avatar .av-img { width: 1.5em; height: 1.5em; vertical-align: middle; }
.user-avatar.has-img { background: none; padding: 0; }
.nr-av .av-img, .ni-avatar .av-img, .nw-av .av-img { width: 1.2em; height: 1.2em; }
.user-badge.av-editable { cursor: pointer; }
.user-badge.av-editable:hover .user-avatar { transform: scale(1.08); }

/* ── 换头像弹窗（pp83）── */
.avdlg-mask { z-index: 320; }
.avdlg-card {
  background: var(--card-bg); border-radius: 20px; padding: 22px 22px 16px;
  max-width: 430px; width: 94%; text-align: center;
  border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.avdlg-title { font-size: 1.1rem; margin-bottom: 6px; }
.avdlg-tip { font-size: 0.78rem; color: var(--text-dim); line-height: 1.55; margin-bottom: 12px; }
.avdlg-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.avdlg-preview {
  width: 84px; height: 84px; flex: 0 0 auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 2px dashed rgba(255,255,255,0.18);
  font-size: 2.6rem; line-height: 1; overflow: hidden;
}
.avdlg-preview.is-img { border-style: solid; border-color: var(--accent2); }
.avdlg-preview.is-img .avdlg-pv { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avdlg-actions { margin-top: 12px; }
.avdlg-hint { min-height: 18px; margin-top: 8px; font-size: 0.75rem; color: var(--accent2); }
.avdlg-foot { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

/* ── 拖拽状态 ── */
.pet-sprite.dragging { opacity: 0.35; }
.pet-sprite.ghost {
  opacity: 0.85; transform: scale(1.1);
  filter: brightness(1.3) drop-shadow(0 4px 12px rgba(255,215,0,0.5));
}
.pet-sprite.drop-target {
  animation: targetPulse 0.6s ease-in-out infinite;
  border-radius: 16px;
  box-shadow: 0 0 0 3px rgba(46,204,113,0.6), 0 0 20px rgba(46,204,113,0.3);
}
@keyframes targetPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(46,204,113,0.6), 0 0 20px rgba(46,204,113,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(46,204,113,0.3), 0 0 30px rgba(46,204,113,0.5); }
}
/* 拖拽落点：不同种/不同级 = 可交换位置 */
.pet-sprite.drop-any {
  border-radius: 16px;
  box-shadow: 0 0 0 2px rgba(255,215,0,0.5), 0 0 14px rgba(255,215,0,0.2);
}
/* 拖拽中的操作提示条 */
.playground.drop-hint::after {
  content: '放到空地 → 固定摆位 ｜ 放到同种同级 → 合成升级';
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px;
  z-index: 6; pointer-events: none; white-space: nowrap;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-dim); border-radius: 999px;
  font-size: 0.72rem; padding: 5px 13px;
  animation: fadeIn 0.2s;
}
/* 布局开关按钮（乐园标题右侧） */
.section-title .bg-pick-open { margin-left: auto; flex-shrink: 0; }
.section-title .layout-toggle { margin-left: 6px; flex-shrink: 0; }

/* ── 学生自选活动区背景 ── */
.bg-pick-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 14px;
  animation: fadeIn 0.2s;
}
/* 矮屏兜底（pp97）：.bg-pick-mask 这一族（换背景 / 密保 / 错题本）与 .setup-overlay 同病同治。
   ⚠ 必须排除 .notes-mask —— 它按 pp95 的规则要「贴顶」，这里给子元素加 auto 边距会把它又拉回居中。 */
body .bg-pick-mask:not(.notes-mask) {
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start;
}
body .bg-pick-mask:not(.notes-mask) > * { margin-top: auto; margin-bottom: auto; }
.bg-pick-card {
  background: var(--card-bg); border-radius: 20px; padding: 20px 18px 16px;
  max-width: 420px; width: 94%; text-align: center;
  border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.28s;
}
.bg-pick-head { font-size: 1.05rem; font-weight: 800; margin-bottom: 12px; }
.bg-pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bg-pick-thumb {
  position: relative; padding: 0; background: none; cursor: pointer;
  border: 2px solid transparent; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16 / 10; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.bg-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-pick-thumb span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 3px;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.62));
}
.bg-pick-thumb:hover { transform: translateY(-2px); }
.bg-pick-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,179,0,0.35); }
.bg-pick-tip { font-size: 0.7rem; color: var(--text-dim); margin: 10px 0 12px; }
.bg-pick-foot { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bg-pick-follow.active { border-color: var(--accent); }

/* ── 找回密码设置弹窗（复用 bg-pick 弹窗外壳） ── */
.secq-card { text-align: left; max-width: 400px; }
.secq-card .bg-pick-head { text-align: center; }
.secq-tip { font-size: 0.74rem; color: var(--text-dim); line-height: 1.6; margin: 0 0 14px; }
.secq-form .pp-form-row { margin-bottom: 12px; }
.secq-form .pp-form-row label { display: block; font-size: 0.76rem; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; }
.secq-error { color: var(--red); font-size: 0.78rem; min-height: 18px; text-align: center; margin: 2px 0 8px; word-break: break-all; }
.secq-card .bg-pick-foot { margin-top: 4px; }
/* pp109：强制设置模式（学生第一次登录必须设完才能玩）
   —— 遮罩更实一点（挡住后面的乐园，别让人以为点旁边能继续），
   卡片描边换成提醒色，标题带一点「必须做」的分量（但不吓人）。 */
.secq-mask.secq-force { background: rgba(32, 24, 8, 0.82); }
.secq-card.secq-card-force { border: 3px solid var(--accent); box-shadow: 0 18px 44px rgba(0,0,0,.4); }
.secq-card-force .bg-pick-head { font-size: 1.02rem; }
.secq-card-force .secq-tip { color: #6B4E00; background: #FFF8E1; border-radius: 10px; padding: 8px 10px; }
.secq-card-force .bg-pick-foot .btn { min-width: 140px; }
.section-title .secq-open { flex-shrink: 0; }
/* pp107：改密码按钮与「找回」同类，同样不允许被压扁（挤压时文字会断成两行） */
.section-title .pwd-open { flex-shrink: 0; }
/* 未设置找回问题时的提醒态（第 1 项）：橙色 + 右上角红点。
   注意既要盖住 ../kid-app.css 的 .btn-secondary（2px 边框），也要盖住 .btn 的 0 边框，
   所以选择器带 body 与 .btn 两段，权重 (0,3,1)。 */
body .section-title .btn.secq-warn {
  position: relative;
  background: #FFF1E4; color: #C2410C; border-color: #F0945A;
}
body .section-title .btn.secq-warn:hover { background: #FFE6D2; }
body .section-title .btn.secq-warn::after {
  content: ''; position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #F04438; box-shadow: 0 0 0 2px #fff;
}
.merge-fx { pointer-events: none; }

/* ── 排行榜 ── */
.pp-board-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.pp-board-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.03); border-radius: 12px; padding: 9px 14px;
  border: 1px solid transparent;
}
.pp-board-row .rank { width: 30px; text-align: center; font-weight: 800; font-size: 0.9rem; color: var(--text-dim); flex-shrink: 0; }
.pp-board-row .name { flex: 1; font-weight: 600; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-board-row .stat { font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.pp-board-row .stat.points { color: var(--accent); }
.pp-board-row .stat.collect { color: var(--accent2); font-weight: 600; margin-left: 8px; }
.pp-board-row.me { border-color: rgba(255,215,0,0.5); background: rgba(255,215,0,0.08); }
.pp-board-me {
  margin-top: 12px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.35);
  font-size: 0.85rem; font-weight: 700; text-align: center; color: var(--accent);
}
.pp-board-sub { font-size: 0.75rem; color: var(--text-dim); text-align: center; margin-bottom: 12px; }
/* pp143：👀 图例（学生周一提的「怎么点进那个有两颗眼睛的」）。
   榜单是浅色卡片，所以用深一点的灰字 + 淡底，不用深底卡片那套颜色。 */
.pp-board-legend {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px;
  margin: 0 0 8px; padding: 5px 10px; border-radius: 10px;
  background: rgba(120, 110, 170, 0.09); border: 1px dashed rgba(120, 110, 170, 0.32);
  font-size: 0.74rem; line-height: 1.5; color: #5A5178; text-align: center;
}
.pp-board-legend b { font-weight: 800; color: #3B3557; }
.pp-board-legend .pp-board-legend-dim { color: #8A82A6; font-size: 0.7rem; }

/* ── 排行榜：本周 / 累计 切换 + 本周奖品条（body 前缀防被 kid-app.css 盖掉） ── */
body .pp-board-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
body .pp-board-tab {
  padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04); color: var(--text-dim);
  font-size: 0.82rem; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
body .pp-board-tab:hover { background: rgba(255,255,255,0.09); }
body .pp-board-tab.active { background: rgba(255,215,0,0.16); border-color: rgba(255,215,0,0.55); color: #ffd338; }
/* 学生端弹窗是浅色卡片（kid-app.css 把 .pp-modal-card 盖成白底）→ 奖品文字必须用深棕金，
   原来那套 #ffe082 / #ffd338 浅金在白底上几乎看不见（pp55 修） */
body .pp-board-prizes {
  margin: 0 auto 12px; max-width: 94%;
  display: flex; flex-direction: column; gap: 6px;
}
body .pp-prize-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 12px;
  background: linear-gradient(90deg, #FFF8E1, #FFF3D6);
  border: 1px dashed #F0CF8A;
}
body .pp-prize-rank { flex: 0 0 auto; font-size: 1.02rem; }
body .pp-prize-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body .pp-prize-tag {
  font-size: 0.7rem; font-weight: 800; color: #8A6D1F; white-space: nowrap;
  background: #FFF1C9; border: 1px solid #F0DCA8; border-radius: 999px; padding: 1px 9px;
}
body .pp-prize-text { font-size: 0.88rem; font-weight: 800; color: #6B4E00; overflow-wrap: anywhere; }
body .pp-prize-img {
  width: 42px; height: 42px; flex: 0 0 auto; object-fit: cover;
  border-radius: 9px; border: 1px solid #F0CF8A; background: #fff; cursor: zoom-in;
}
body .pp-prize-mark { font-size: 0.8rem; }
body .pp-board-row.champ { background: rgba(255,215,0,0.14); border-color: rgba(255,215,0,0.55); }

/* 范围页签（🏫 我的班级 / 🎓 年级）与「本周有奖品」提示 —— 弹窗是白底，一律深色字 */
body .pp-board-tab.pp-board-scope { font-size: 0.8rem; }
body .pp-board-tab[disabled] { opacity: .45; cursor: not-allowed; }
body .pp-prize-hint {
  margin: 0 auto 12px; max-width: 94%; text-align: center;
  font-size: 0.76rem; font-weight: 700; color: #8A6D1F;
  background: #FFF8E1; border: 1px dashed #F0CF8A; border-radius: 10px; padding: 6px 10px;
}
body .pp-row-cls {
  font-size: 0.66rem; font-weight: 700; color: #8A7A5A;
  background: #F6F3EC; border-radius: 999px; padding: 0 6px; margin-left: 2px; white-space: nowrap;
}
body .pp-board-more { text-align: center; font-size: 0.72rem; color: var(--text-dim); padding: 8px 0 2px; }

/* ── 题干配图（教师可为题目上传图片；点图可放大） ── */
.q-stem { display: block; }
.q-img-wrap { display: flex; justify-content: center; margin: 10px 0 2px; }
.q-img {
  max-width: 100%; max-height: 26vh; min-width: 170px; height: auto;
  min-width: min(170px, 100%);   /* 支持 min() 时优先，窄容器下不横向溢出 */
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14); background: #fff;
  cursor: zoom-in; object-fit: contain;
}
.q-img-zoom {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.82);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.q-img-big { max-width: 92vw; max-height: 88vh; border-radius: 10px; background: #fff; }

/* ── 教师试玩：抽查班级下拉 ── */
.t-class-select {
  padding: 3px 10px; border-radius: 10px; font-family: inherit; font-size: 0.78rem;
  font-weight: 700; cursor: pointer; color: var(--text);
  background: var(--card-bg); border: 1px solid rgba(255,215,0,0.45);
}
.t-class-select:disabled { opacity: 0.6; cursor: default; }
.t-class-label { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; }

@media (max-width: 1000px) {
  /* 学科 chip 上的「答对 N 题」在窄屏让位：这一行还要同时装两个筛选下拉和四个按钮，
     计数一显示就可能把最后一个按钮挤到第二行（pp53 实测 900px 溢出）。
     完整数字仍在 chip 的 title 和顶部数据卡里，功能没有丢。 */
  .section-title .subject-chip .cnt { display: none; }
}

@media (max-width: 1100px) and (min-width: 861px) {
  /* pp53：这一带宽原来没有收紧规则，一旦学科 chip 上带了「答对 N 题」计数、
     筛选又激活（多出「显示 X/Y」和 ✖），标题行就会把最后一个按钮挤到第二行。
     这里统一压一点内边距，仍保持默认字号（不像 ≤860px 那样缩字）。
     实测 900×760 + 计数 + 筛选激活：溢出 78px → 收紧后留出余量。 */
  .section-title { gap: 5px; }
  .section-title .btn-small { padding: 4px 10px; font-size: 0.75rem; }
  .section-title .layout-toggle { margin-left: 3px; }
  .subject-bar.inline .subject-chip { padding: 2px 8px; font-size: 0.73rem; }
  .pet-filter { gap: 4px; margin-left: 0; }
  body .pet-filter .pp-sel-btn { padding: 3px 7px; font-size: 0.72rem; }
  body .pet-filter .pf-count { font-size: 0.66rem; }
  body .pet-filter .pf-clear { padding: 2px 6px; font-size: 0.7rem; }
}

@media (max-width: 860px) and (min-width: 621px) {
  /* 中屏（平板竖屏 768 左右）：标题行要同时装下 学科 chip + 两个筛选下拉 + 四个按钮，
     控件按默认尺寸会溢出到第二行。这里统一收紧间距与内边距，保住单行。 */
  .section-title { gap: 4px; }
  .section-title .btn-small { padding: 3px 8px; font-size: 0.72rem; border-radius: 12px; }
  .subject-bar.inline .subject-chip { padding: 2px 8px; font-size: 0.72rem; }
  .pet-filter { gap: 4px; margin-left: 0; }
  body .pet-filter .pp-sel-btn { padding: 2px 6px; font-size: 0.7rem; }
}

@media (max-width: 620px) {
  /* 窄屏：数据卡与「开始邂逅」硬挤在一行会把卡片压到看不清（数字和标签互相压）。
     改成两行——数据卡整行、按钮整行，总高度仍比原来的三行矮。 */
  .top-row { flex-wrap: wrap; gap: 6px; }
  .top-row .stats-bar { flex: 1 1 100%; gap: 5px; }
  .top-row .action-area { flex: 1 1 100%; }
  .top-row .action-area > .btn { width: 100%; padding: 7px 12px; }
  .top-row .stat-card { padding: 4px 6px; }
  .top-row .stat-num { font-size: 1rem; }
  .top-row .stat-label { font-size: 0.58rem; }
  /* 标题行：学科 chip + 筛选各自换行，别和标题挤成竖排 */
  .section-title { row-gap: 5px; }
  .title-subject-slot { flex: 0 0 auto; }
  .pet-filter { flex-wrap: wrap; }
}

@media (max-width: 500px) {
  .q-img { max-height: 22vh; }
  .encounter-card, .train-card { padding: 16px 16px; border-radius: 18px; }
  .encounter-card.has-img .encounter-emoji { font-size: 1.8rem; }
}

@media (max-width: 500px) {
  .playground { min-height: 180px; }
  .encounter-emoji { font-size: 3.2rem; }
  .encounter-question { font-size: 1.05rem; }
  /* pp104：窄屏基准降到 60px（原来写死 60/2.6rem，会把 --pet-scale 直接压掉 → 滑块在手机上没反应） */
  .playground { --pet-base: 60px; }
  .pet-sprite .sprite-emoji {
    width: calc(60px * var(--pet-scale, 1));
    height: calc(60px * var(--pet-scale, 1));
    font-size: calc(2.6rem * var(--pet-scale, 1));
  }
  body .pet-sprite .sprite-level { font-size: max(0.72rem, calc(0.86rem * var(--pet-scale, 1))); }
  body .pet-sprite .sprite-name { font-size: max(0.78rem, calc(0.9rem * var(--pet-scale, 1))); max-width: 106px; }
  /* 标题行按钮变多，窄屏上让长提示独占一行，避免把标题挤成竖排 */
  .section-title { flex-wrap: wrap; row-gap: 6px; }
  .section-title .txt-dim { flex: 1 0 100%; order: 9; font-size: 0.72rem; line-height: 1.35; }
  .options-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══ 教师「查看学生乐园」只读模式（pp34） ═══
   横幅 + 禁用按钮都加 body 前缀提权，避免被 ../kid-app.css 的同权重选择器盖掉 */
body .view-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 12px; margin-bottom: 8px; flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(78,205,196,0.16), rgba(120,110,170,0.14));
  border: 1px solid rgba(78,205,196,0.45);
  font-size: 0.78rem;
}
body .view-bar .view-tag {
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.03em;
  padding: 2px 9px; border-radius: 9px;
  background: var(--accent2); color: #0f2b28; white-space: nowrap;
}
body .view-bar .view-who { font-weight: 800; font-size: 0.86rem; color: var(--text); }
body .view-bar .view-meta { color: var(--text-dim); }
body .view-bar .grow { flex: 1; }

body .action-area.view-only {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
body .action-area.view-only .btn-primary {
  background: linear-gradient(135deg, #7f8fa6, #5f6f87);
  color: #fff; opacity: 1;
}
body .action-area.view-only .view-only-tip { font-size: 0.75rem; color: var(--text-dim); }

/* ── 活动区背景层（pp40）──
   用真实 <img> 而不是 #playground 的 background-image：object-fit:cover 由图片自身
   宽高比决定，跟「元素何时被量到尺寸」无关，彻底避免 background-size:cover 在
   flex:1 盒子上按 0 高/小盒子算图层、只画出顶部一条的问题。
   加 body 前缀提权：kid-app.css 在本文件之后加载，且它对 .playground 有同权重覆盖。 */
body .playground > .pg-bg {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block; z-index: 0; pointer-events: none; user-select: none;
  -webkit-user-drag: none;
}
body .playground.has-bg { background: #EAF7FF; }

/* 查看模式的「🐾 活动中 / 🌿 停下来」开关（只影响教师看到的画面，不写学生存档） */
body .section-title .view-move-toggle { margin-left: auto; flex-shrink: 0; }

/* ── 错题本（学生端 / 教师只读查看）
   ⚠ ../kid-app.css 是最终覆盖层，新样式一律加 body 前缀把权重提到 (0,2,1) 以上 ── */
body .wb-card { max-width: 470px; text-align: left; }
body .wb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
body .wb-title { font-size: 1.08rem; font-weight: 800; }
body .wb-head .btn { flex: 0 0 auto; }
body .wb-summary { font-size: 0.74rem; color: var(--text-dim); margin-bottom: 10px; }
body .wb-body {
  max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 12px; padding-right: 4px;
}
body .wb-day-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 0.8rem; font-weight: 800; color: var(--accent2); margin-bottom: 6px;
}
body .wb-day-count { font-size: 0.68rem; font-weight: 600; color: var(--text-dim); }
body .wb-item {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 10px 12px;
}
body .wb-q { font-size: 0.86rem; font-weight: 700; line-height: 1.65; }
body .wb-img-wrap { margin-top: 8px; }
body .wb-img {
  max-width: 100%; max-height: 130px; border-radius: 10px; cursor: zoom-in;
  background: #fff; display: block; border: 1px solid rgba(255,255,255,0.14);
}
body .wb-a { margin-top: 7px; font-size: 0.8rem; font-weight: 700; color: var(--green); line-height: 1.55; word-break: break-all; }
/* 错题本里的解析：米底棕字，和答题反馈里的解析条同一套视觉 */
body .wb-explain {
  margin-top: 6px; padding: 7px 9px; border-radius: 8px;
  background: #FFF8E1; border: 1px solid #F0DFA8; border-left: 3px solid #E0B84C;
  font-size: 0.75rem; line-height: 1.7; color: #6B4E00; word-break: break-word;
}
body .wb-meta { margin-top: 5px; font-size: 0.7rem; color: var(--text-dim); line-height: 1.6; }
body .wb-n { margin-left: 8px; color: var(--red); font-weight: 700; }
/* 出题加权标记（第 5 项）：错得越多倍数越大，答对一次降一档 */
body .wb-boost {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 9px;
  background: #FFF3E6; color: #C2410C; border: 1px solid #F8C99B;
  font-size: 0.66rem; font-weight: 700; white-space: nowrap;
}
body .wb-act { margin-top: 8px; text-align: right; }
body .wb-tip { margin-top: 10px; font-size: 0.68rem; color: var(--text-dim); text-align: center; line-height: 1.6; }
body .wb-empty { text-align: center; padding: 26px 10px; }
body .wb-empty-emoji { font-size: 2.6rem; margin-bottom: 8px; }
body .wb-empty-tip { margin-top: 8px; font-size: 0.7rem; color: var(--text-dim); line-height: 1.7; }

/* ═══ 合成演出（pp63）：靠近 → 闪光 → 成功金光 / 失败乌云 → 点确认才消失 ═══
   层级 520：要盖住合成弹窗（200~300）。merge 结果已不再发 toast，所以不会被 toast 打断。
   全部用 body 前缀：../kid-app.css 是最后加载的覆盖层，不加前缀会被它盖掉。 */
body .mfx {
  position: fixed; inset: 0; z-index: 520;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
body .mfx.mfx-in { opacity: 1; }
body .mfx.mfx-out { opacity: 0; transition: opacity 0.28s ease; }

/* 遮罩：中间稍透、四周压暗，把注意力收到中心。
   ⚠ 中心别低于 0.7：乐园底色是白的，0.55 时揭晓文字和乌云都糊成灰雾（实拍对比过）。 */
body .mfx-dim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 46%, rgba(8,10,16,0.74) 0%, rgba(4,5,9,0.94) 80%);
}

body .mfx-stage {
  position: relative; width: min(92vw, 520px); height: min(64vh, 380px);
  display: flex; align-items: center; justify-content: center;
}

/* ── 两只小动物：从两侧靠近 ── */
body .mfx-pet {
  position: absolute; width: clamp(80px, 21vw, 124px); height: auto;
  opacity: 0; will-change: transform, opacity;
  transition: transform 0.58s cubic-bezier(0.2, 0.9, 0.25, 1), opacity 0.34s ease;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
}
body .mfx-emoji { font-size: clamp(48px, 13vw, 74px); line-height: 1; text-align: center; }
body .mfx-a { transform: translate3d(-150%, 0, 0) scale(0.9); }
body .mfx-b { transform: translate3d(150%, 0, 0) scale(0.9); }
body .mfx.mfx-in .mfx-pet { opacity: 1; }
body .mfx.mfx-in .mfx-a { transform: translate3d(-58%, 0, 0) scale(1); }
body .mfx.mfx-in .mfx-b { transform: translate3d(58%, 0, 0) scale(1); }
/* 靠拢：越贴越近，最后被闪光吞掉 */
body .mfx.mfx-close .mfx-a { transform: translate3d(-14%, 0, 0) scale(0.98); }
body .mfx.mfx-close .mfx-b { transform: translate3d(14%, 0, 0) scale(0.98); }
body .mfx.mfx-flash .mfx-pet { opacity: 0; transition: opacity 0.18s ease, transform 0.32s ease; }
body .mfx.mfx-flash .mfx-a { transform: translate3d(-4%, 0, 0) scale(0.86); }
body .mfx.mfx-flash .mfx-b { transform: translate3d(4%, 0, 0) scale(0.86); }

/* ── 闪光：中心炸开 + 全屏白纱一闪 ── */
body .mfx-burst {
  position: absolute; width: 40px; height: 40px; border-radius: 50%;
  opacity: 0; will-change: transform, opacity;
  background: radial-gradient(circle, #fff 0%, #fff8d8 40%, rgba(255,236,150,0.8) 60%, rgba(255,236,150,0) 72%);
}
body .mfx.mfx-flash .mfx-burst { animation: mfxBurst 0.56s ease-out forwards; }
@keyframes mfxBurst {
  0%   { opacity: 0; transform: scale(0.2); }
  20%  { opacity: 1; transform: scale(3); }
  55%  { opacity: 0.92; transform: scale(9); }
  100% { opacity: 0; transform: scale(17); }
}
body .mfx.mfx-flash::after {
  content: ""; position: absolute; inset: 0; background: #fff;
  pointer-events: none; animation: mfxVeil 0.44s ease-out both;
}
@keyframes mfxVeil { 0% { opacity: 0; } 26% { opacity: 0.82; } 100% { opacity: 0; } }

/* ── 结果容器 ── */
body .mfx-win, body .mfx-lose {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center;
}
body .mfx.mfx-win-on .mfx-win { display: flex; }
body .mfx.mfx-lose-on .mfx-lose { display: flex; }

/* ── 成功：金色背景光 + 旋转光芒 + 高一级形态 ── */
body .mfx-glow {
  position: absolute; width: min(84vw, 340px); height: min(84vw, 340px); border-radius: 50%;
  will-change: transform, opacity; animation: mfxGlow 1.9s ease-in-out infinite;
  background: radial-gradient(circle,
    rgba(255,226,130,0.95) 0%, rgba(255,196,64,0.55) 38%, rgba(255,180,40,0) 70%);
}
@keyframes mfxGlow {
  0%, 100% { transform: scale(0.92); opacity: 0.78; }
  50%      { transform: scale(1.07); opacity: 1; }
}
body .mfx-rays {
  position: absolute; width: min(96vw, 460px); height: min(96vw, 460px); border-radius: 50%;
  opacity: 0.85; will-change: transform; animation: mfxSpin 11s linear infinite;
  background: repeating-conic-gradient(from 0deg,
    rgba(255,214,110,0.5) 0deg 5deg, rgba(255,214,110,0) 5deg 17deg);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.95) 18%, rgba(0,0,0,0) 68%);
  mask-image: radial-gradient(circle, rgba(0,0,0,0.95) 18%, rgba(0,0,0,0) 68%);
}
@keyframes mfxSpin { to { transform: rotate(360deg); } }
body .mfx-result {
  position: relative; width: clamp(120px, 34vw, 200px); opacity: 1;
  animation: mfxPop 0.62s cubic-bezier(0.2, 1.5, 0.35, 1) both;
  filter: drop-shadow(0 0 22px rgba(255,214,90,0.9)) drop-shadow(0 14px 26px rgba(0,0,0,0.5));
}
@keyframes mfxPop {
  from { transform: scale(0.2) rotate(-8deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ── 失败：黑色乌云压下来（上移 38px，给下面的文字让位） ── */
body .mfx-cloud { position: absolute; inset: 0; transform: translateY(-38px); }
body .mfx-blob {
  position: absolute; left: 50%; top: 50%;
  /* 不用正圆：正圆叠起来能看见一段段圆弧，像一堆气球；不规则圆角才像云 */
  border-radius: 58% 42% 62% 38% / 52% 58% 42% 48%;
  /* 云的读感靠「顶部受光 + 底下压暗」：只有纯深色渐变时会糊成一块暗斑，看不出是云 */
  filter: blur(4px); opacity: 0; will-change: opacity;
  background:
    radial-gradient(ellipse at 44% 13%, rgba(176,190,210,0.78) 0%, rgba(104,118,138,0.28) 24%, rgba(0,0,0,0) 50%),
    radial-gradient(circle at 45% 44%, #3d4959 0%, #222a37 54%, #0a0e15 100%);
  box-shadow: inset 0 12px 24px -12px rgba(210,224,242,0.55), 0 20px 44px rgba(0,0,0,0.55);
  /* ⚠ 云不做位移动画：7 团 blur 层每帧平移＝每帧重栅格化模糊层，低端安卓必掉帧；
     云的"飘"肉眼几乎看不出，动感交给闪电就够。这里只做 opacity 淡入。 */
  animation: mfxCloudIn 0.8s ease-out forwards;
}
body .mfx-blob.b1 { width: 214px; height: 148px; margin: -104px 0 0 -80px; animation-delay: 0s; }
body .mfx-blob.b2 { width: 172px; height: 124px; margin: -96px 0 0 70px; animation-delay: 0.08s; border-radius: 44% 56% 40% 60% / 60% 44% 56% 40%; }
body .mfx-blob.b3 { width: 150px; height: 108px; margin: -136px 0 0 -24px; animation-delay: 0.14s; border-radius: 62% 38% 55% 45% / 44% 60% 40% 56%; }
body .mfx-blob.b4 { width: 240px; height: 138px; margin: -64px 0 0 -112px; animation-delay: 0.2s; }
body .mfx-blob.b5 { width: 138px; height: 102px; margin: -40px 0 0 40px; animation-delay: 0.26s; border-radius: 40% 60% 45% 55% / 58% 42% 58% 42%; }
body .mfx-blob.b6 { width: 178px; height: 118px; margin: -118px 0 0 96px; animation-delay: 0.32s; border-radius: 52% 48% 58% 42% / 48% 58% 42% 52%; }
body .mfx-blob.b7 { width: 164px; height: 112px; margin: -52px 0 0 -152px; animation-delay: 0.38s; border-radius: 46% 54% 44% 56% / 56% 44% 56% 44%; }
@keyframes mfxCloudIn { from { opacity: 0; } to { opacity: 1; } }

/* ── 闪电：主雷 + 全屏泛光。劈两下、留残余余光，面板不关就一直有压场感 ── */
body .mfx-bolt {
  /* 挪到右侧避开文案：压在中间时那条白光会把「两只都消失了」冲得看不清（实拍对比过） */
  position: absolute; left: 50%; top: 50%;
  width: 66px; height: 172px; margin: -104px 0 0 108px;
  opacity: 0; will-change: opacity;
  filter: drop-shadow(0 0 6px rgba(190,228,255,0.9)) drop-shadow(0 0 18px rgba(96,176,255,0.7));
}
body .mfx-bolt svg { display: block; width: 100%; height: 100%; }
body .mfx.mfx-lose-on .mfx-bolt { animation: mfxBoltStrike 6s ease-out 0.25s infinite both; }
/* 前 26% 连劈两下，之后留 0.26 的余光 */
@keyframes mfxBoltStrike {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  8%   { opacity: 0.12; }
  11%  { opacity: 1; }
  20%  { opacity: 0; }
  57%  { opacity: 0; }
  60%  { opacity: 1; }
  65%  { opacity: 0.18; }
  68%  { opacity: 0.95; }
  78%  { opacity: 0.24; }
  100% { opacity: 0.26; }
}
/* 泛光：跟着闪电闪两下，把整块乌云"打亮"一瞬 */
body .mfx-strike {
  position: absolute; inset: -20%; opacity: 0; pointer-events: none; will-change: opacity;
  background: radial-gradient(circle at 56% 34%, rgba(206,235,255,0.9) 0%, rgba(120,180,255,0.35) 34%, rgba(80,140,255,0) 66%);
}
body .mfx.mfx-lose-on .mfx-strike { animation: mfxStrikeFlash 6s ease-out 0.25s infinite both; }
@keyframes mfxStrikeFlash {
  0%, 2%   { opacity: 0; }
  4%       { opacity: 0.62; }
  7%       { opacity: 0.05; }
  10%      { opacity: 0.5; }
  18%      { opacity: 0; }
  58%      { opacity: 0; }
  61%      { opacity: 0.45; }
  70%      { opacity: 0; }
  100%     { opacity: 0; }
}

/* ── 文案 ── */
body .mfx-title {
  position: relative; margin-top: 16px; font-weight: 800; letter-spacing: 0.04em;
  font-size: clamp(1.05rem, 4.4vw, 1.5rem); color: #FFD338;
  text-shadow: 0 2px 12px rgba(0,0,0,0.75), 0 0 18px rgba(255,196,64,0.55);
}
body .mfx-title-bad { color: #B9C2D0; text-shadow: 0 2px 12px rgba(0,0,0,0.85); }
body .mfx-sub {
  position: relative; margin-top: 7px; font-size: 0.88rem; color: #FFF3D0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
body .mfx-lose .mfx-sub { color: #A9B6C8; }
/* 失败态底下常有闪电白光扫过 → 文案描边要更硬，否则被冲得看不清 */
body .mfx-lose .mfx-title { text-shadow: 0 2px 10px rgba(0,0,0,0.95), 0 0 24px rgba(0,0,0,0.9); }
body .mfx-lose .mfx-sub { text-shadow: 0 2px 10px rgba(0,0,0,0.95), 0 0 20px rgba(0,0,0,0.85); }
/* pp103：失败归因（本次成功率 / 答对会是多少）—— 比正文再暗一档，别抢「两只都消失了」的注意力 */
body .mfx-why {
  position: relative; margin-top: 5px;
  font-size: clamp(0.7rem, 2.9vw, 0.8rem); line-height: 1.55; color: #8E9AAC;
  text-shadow: 0 2px 10px rgba(0,0,0,0.95), 0 0 18px rgba(0,0,0,0.85);
}

/* ── 确认按钮：只有它能关掉演出 ── */
body .mfx-ok {
  position: absolute; bottom: max(26px, 7vh); left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0; pointer-events: none;
  padding: 10px 30px; border-radius: 22px; font-weight: 800; font-size: 0.95rem;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
body .mfx.mfx-ready .mfx-ok {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}

/* ═══ 留言条（pp70）：学生 → 本年级的同学与老师 ═══
   弹窗外壳复用 .bg-pick-mask / .bg-pick-card，这里只补内部。

   ⚠⚠ 配色按**最终的浅色皮肤**来：kid-app.css 是最后加载的覆盖层，它把
      --card-bg 改成 #FFF、--text 改成 #3B3557，所以弹窗卡片其实是白底深字。
      早期用 rgba(255,255,255,.05) 做的「深色半透明面」在白卡上完全看不见（截图验证过），
      这里一律改用浅色面 #F7F5FF + kid-line 描边。新样式仍加 body 前缀提权重。 */

/* 标题栏按钮：有新留言 → 橙金 + 右上红点（与「🔑 找回」的未设置提醒同一套视觉） */
body .btn.notes-open.notes-unread {
  position: relative; background: #FFF1E4; color: #C2410C; border-color: #F0945A;
}
body .btn.notes-open.notes-unread:hover { background: #FFE6D2; }
body .btn.notes-open.notes-unread::after {
  content: ''; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px;
  border-radius: 50%; background: #F04438; box-shadow: 0 0 0 2px #fff;
}

body .notes-card { max-width: 480px; width: 95%; text-align: left; padding: 16px 14px 14px; }
/* pp95：留言板的内容高度会变 —— 点「💬 回复」就地长出一个输入框。
   遮罩是 flex 垂直居中 → 卡片一变高就整体上移，学生看到的就是「窗口漂移」。
   留言板单独改成贴顶：卡片只往下长，位置一格都不动。
   ⚠ 只对 .notes-board 生效，「先选类型」那一屏保持居中（它不会变高）。
   ⚠ 贴顶后矮屏可能超出视口 → 遮罩允许**竖向**滚动兜底（否则底部按钮点不到）。
   ⚠ 必须写死 `overflow-x: hidden`：只写 overflow-y 的话 x 会被连带算成 auto，
     窄屏那点本来就有的横向溢出（320 宽下 4 个页签挤不下）就会冒出横向滚动条。 */
body .notes-mask { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
body .notes-mask:has(.notes-board) { align-items: flex-start; padding-top: max(12px, 4vh); }

/* ① 先选类型：💬 日常留言 / 🎁 奖品留言 */
body .notes-lead { font-size: 0.82rem; color: #6B6386; margin: 0 0 10px; text-align: center; }
body .notes-kinds { display: grid; gap: 10px; margin-bottom: 4px; }
body .notes-kind {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; border-radius: 16px; cursor: pointer; font-family: inherit;
  background: #F7F5FF; border: 2px solid rgba(120,110,170,.22);
  color: #3B3557; text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
body .notes-kind:hover { background: #FFFDF5; border-color: #FFC53D; transform: translateY(-1px); }
body .notes-kind .nk-emoji { font-size: 1.7rem; line-height: 1; flex: 0 0 auto; }
body .notes-kind .nk-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
body .notes-kind .nk-text b { font-size: 0.94rem; font-weight: 800; }
body .notes-kind .nk-sub { font-size: 0.73rem; color: #8E86A6; line-height: 1.45; }
body .notes-kind .nk-go { color: #A79EBE; font-size: 1.15rem; font-weight: 800; flex: 0 0 auto; }
body .notes-peek {
  display: block; width: 100%; margin: 8px 0 2px; padding: 6px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 0.78rem; font-weight: 800; color: #2FA98C;
}
body .notes-peek:hover { text-decoration: underline; }
body .notes-tip { font-size: 0.7rem; color: #8E86A6; text-align: center; line-height: 1.6; margin-top: 8px; }

/* ② 留言板 */
body .notes-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
body .notes-title { flex: 1; font-size: 1.02rem; font-weight: 800; color: #3B3557; }body .notes-head .btn { flex: 0 0 auto; }
body .notes-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
body .notes-tab {
  flex: 1; padding: 7px 4px; border-radius: 13px; cursor: pointer; font-family: inherit;
  font-size: 0.78rem; font-weight: 700; color: #6B6386;
  background: #F7F5FF; border: 2px solid rgba(120,110,170,.16);
}
body .notes-tab:hover { border-color: #FFD98A; }
body .notes-tab.active {
  background: linear-gradient(135deg, #FFC53D, #FF9500);
  color: #3B3557; border-color: transparent; font-weight: 800;
}
/* 类型页签（pp72）：带计数 + 各自的类型色，跟列表里的类型标签同一套配色
   ⚠ 照旧按**浅色皮肤**写：kid-app.css 最后加载，弹窗卡是 #FFF 底深字 */
body .notes-tab { display: flex; align-items: center; justify-content: center; gap: 4px; }
body .notes-tab .nt-e { font-size: 0.82rem; line-height: 1; }
body .notes-tab .nt-n {
  min-width: 15px; padding: 0 4px; border-radius: 8px; line-height: 15px;
  background: rgba(120,110,170,.14); color: #6B6386; font-size: 0.6rem; font-weight: 800;
}
body .notes-tab.t-daily { border-color: rgba(78,205,196,.42); }
body .notes-tab.t-prize { border-color: rgba(240,148,90,.42); }
body .notes-tab.t-daily:hover { border-color: #4ECDC4; }
body .notes-tab.t-prize:hover { border-color: #F0945A; }
body .notes-tab.active .nt-n { background: rgba(255,255,255,.62); color: #3B3557; }
body .notes-tab.t-daily.active { background: linear-gradient(135deg, #6FE0CE, #2FB49D); color: #fff; }
body .notes-tab.t-prize.active { background: linear-gradient(135deg, #FFC53D, #FF9500); color: #3B3557; }

/* pp96：窄屏（≤380px）4 个页签一行放不下 —— 320 宽时每个只有 68px，
   「🎁 奖品」会被裁掉一截且点不到（页签总宽 291 而容器只有 233）。
   改成 2×2 两行：每个 ~113px，emoji + 文字 + 计数都放得下；多花 ~34px 高，
   568 高的矮屏实测卡片底边 505 → 539，仍在视口内。
   同时把标题压小并禁止折行，避免「三年级留言条」被挤成两行、和右边两个按钮抢位。
   实测（320 宽）：标题 110 + 「换类型」85 + 「✕」41 + 两个间隙 16 = 252，而可用只有 233
   → ✕ 被顶出卡片 5px（卡片内部横向溢出、出现横条）。把这行的按钮收紧就刚好够。 */
@media (max-width: 380px) {
  body .notes-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  body .notes-tab { flex: none; }
  body .notes-title { font-size: 0.9rem; white-space: nowrap; }
  body .notes-head .btn { padding: 5px 7px; font-size: 0.72rem; }
}
body .notes-list {
  max-height: 42vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 8px; padding-right: 3px;
}
body .notes-item {
  background: #F7F5FF; border: 1px solid rgba(120,110,170,.16);
  border-radius: 13px; padding: 9px 11px;
}
body .notes-item.me { background: #FFF7DF; border-color: #FFD98A; }
/* 类型色条（pp72）：「全部」页签下两种留言混排，靠左边这道色条扫开
   ⚠ 必须写在 .me 之后并用 border-left-color 单独覆盖，否则自己那条的金边会把它盖掉 */
body .notes-item.k-daily { border-left: 4px solid #4ECDC4; }
body .notes-item.k-prize { border-left: 4px solid #FFB020; }
body .notes-item.me.k-daily { border-left-color: #4ECDC4; }
body .notes-item.me.k-prize { border-left-color: #FFB020; }
body .ni-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
body .ni-avatar { font-size: 0.95rem; line-height: 1; }
body .ni-name { font-weight: 800; font-size: 0.82rem; color: #3B3557; }
body .ni-cls { color: #8E86A6; font-size: 0.7rem; }
body .ni-kind { padding: 1px 7px; border-radius: 9px; font-size: 0.66rem; font-weight: 700; white-space: nowrap; }
body .ni-kind.k-daily { background: #EAFBF9; color: #2FA98C; border: 1px solid rgba(78,205,196,.45); }
body .ni-kind.k-prize { background: #FFF3D6; color: #C67C00; border: 1px solid #F5D08A; }
body .ni-time { margin-left: auto; color: #A79EBE; font-size: 0.68rem; white-space: nowrap; }
body .ni-text { margin-top: 6px; font-size: 0.87rem; line-height: 1.65; color: #3B3557; white-space: pre-wrap; word-break: break-word; }

/* 写字区 */
body .notes-write { margin-top: 10px; }
body .notes-input {
  width: 100%; resize: none; font-family: inherit; font-size: 0.88rem; line-height: 1.6;
  padding: 9px 11px; border-radius: 13px; color: #3B3557; background: #fff;
  border: 2px solid rgba(120,110,170,.22);
}
body .notes-input:focus { outline: none; border-color: #FF9E2C; }
body .notes-input::placeholder { color: #A79EBE; }
body .notes-write-foot { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
body .notes-count { font-size: 0.7rem; color: #A79EBE; }
body .notes-count.full { color: #C67C00; font-weight: 700; }
body .notes-send { margin-left: auto; }
body .notes-write-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body .nw-lead { font-size: 0.78rem; color: #6B6386; }
body .notes-picks { display: flex; gap: 8px; flex: 1; min-width: 190px; }
body .notes-pick {
  flex: 1; padding: 9px 6px; border-radius: 13px; cursor: pointer; font-family: inherit;
  font-size: 0.8rem; font-weight: 800; color: #3B3557;
  background: #F7F5FF; border: 2px solid rgba(120,110,170,.2);
}
body .notes-pick:hover { border-color: #FFC53D; background: #FFFDF5; }

/* 今天已留言 */
body .notes-done {
  margin-top: 10px; padding: 10px 12px; border-radius: 13px;
  background: #E7F9EE; border: 1px solid rgba(88,214,141,.55);
}
body .nd-line { font-size: 0.82rem; font-weight: 800; color: #2E9E63; }
body .nd-mine { margin-top: 7px; display: flex; gap: 6px; align-items: flex-start; }
body .nd-tag {
  flex: 0 0 auto; font-size: 0.66rem; font-weight: 700; padding: 1px 7px; border-radius: 9px;
  background: #fff; color: #6B6386; border: 1px solid rgba(120,110,170,.2); white-space: nowrap;
}
body .nd-text { font-size: 0.84rem; line-height: 1.6; color: #3B3557; white-space: pre-wrap; word-break: break-word; }

body .notes-empty { text-align: center; padding: 22px 8px; font-size: 0.82rem; color: #8E86A6; line-height: 1.7; }
body .ne-emoji { font-size: 2rem; margin-bottom: 6px; }
body .notes-more { text-align: center; font-size: 0.7rem; color: #A79EBE; padding: 6px 0 2px; }

/* ── 留言审核（pp73）──
   ⚠ 学生端也是浅色卡片：警告一律「深字 + 浅底」，白底上写浅金等于没写。 */
/* 警告条：被打回 / 累计次数 / 已被禁言 */
body .notes-warn {
  margin-bottom: 9px; padding: 9px 11px; border-radius: 13px;
  background: #FFF4E5; border: 1px solid #F5C27A;
}
body .notes-warn .nwb-title { font-size: 0.82rem; font-weight: 800; color: #A85B00; }
body .notes-warn .nwb-body { margin-top: 4px; font-size: 0.76rem; line-height: 1.6; color: #6B4E00; }
body .notes-warn .nwb-foot { margin-top: 5px; font-size: 0.72rem; font-weight: 800; color: #A85B00; }
body .notes-warn.nwb-ban { background: #FFECEC; border-color: #F0A6A6; }
body .notes-warn.nwb-ban .nwb-title { color: #C0392B; }
body .notes-warn.nwb-ban .nwb-body,
body .notes-warn.nwb-ban .nwb-foot { color: #8E3B33; }

/* 自己那条的状态标签（别人的没通过根本不显示，所以只有「我」有） */
body .ni-st {
  padding: 1px 7px; border-radius: 9px; font-size: 0.64rem; font-weight: 800;
  white-space: nowrap; border: 1px solid transparent;
}
body .ni-st.s-pending { background: #F0EEFA; color: #6B6386; border-color: rgba(120,110,170,.28); }
body .ni-st.s-ok { background: #E7F9EE; color: #2E9E63; border-color: rgba(88,214,141,.55); }
body .ni-st.s-rejected { background: #FFECEC; color: #C0392B; border-color: #F0A6A6; }

/* 待审＝虚线圈（还在排队）；未通过＝红边红底 + 老师评语 */
body .notes-item.st-pending { border-style: dashed; }
body .notes-item.st-rejected { border-color: #F3C2C2; background: #FFF8F8; }
body .ni-why {
  margin-top: 6px; padding: 5px 8px; border-radius: 9px;
  background: #FFF0F0; color: #A83A2E; font-size: 0.75rem; line-height: 1.55;
}

/* 被禁言时写字区替换成说明 */
body .notes-done.notes-banned { background: #FFEFEF; border-color: #F0A6A6; }
body .notes-banned .nd-line { color: #C0392B; }
body .nd-hint { margin-top: 5px; font-size: 0.74rem; line-height: 1.55; color: #8E3B33; }

/* ══ 留言回复（pp77）══════════════════════════════════════════════════
   ⚠ 仍是浅色皮肤：kid-app.css 最后加载，弹窗卡是 #FFF 底深字；
     这里和 pp73 一样按「浅底 + 深字」写，别用 rgba(255,255,255,.05) 那种深色面。 */

/* 页签：多了「我的」一个，四个挤在一行 → 收一点内边距和字号，并禁止折行
   （「我的」两个字 + 计数 + 红点挤不下会竖着断成两行，四个页签高度就不一样了） */
body .notes-tab { position: relative; white-space: nowrap; }
body .notes-tabs .notes-tab { padding: 7px 2px; font-size: 0.72rem; gap: 3px; }
body .notes-tabs .notes-tab .nt-n { min-width: 14px; padding: 0 3px; }
body .notes-tab.t-mine { border-color: rgba(255,158,44,.42); }
body .notes-tab.t-mine:hover { border-color: #FF9E2C; }
body .notes-tab.t-mine.active { background: linear-gradient(135deg, #FFD98A, #FFA733); color: #3B3557; }
/* 「我的」页签上的新回复红点（数字）：挂在右上角，不占文字的位置 */
body .notes-tab .nt-dot {
  position: absolute; top: -5px; right: -4px;
  min-width: 15px; height: 15px; line-height: 15px; padding: 0 4px;
  border-radius: 8px; background: #F04438; color: #fff;
  font-size: 0.6rem; font-weight: 800; text-align: center;
  box-shadow: 0 0 0 1.5px #fff;
}

/* 有别人回我的新回复 → 整条金边发光（和标题栏红点同一套提醒） */
body .notes-item.has-new {
  border-color: #FF9E2C; background: #FFF8EA;
  box-shadow: 0 0 0 2px rgba(255,158,44,.22);
}
body .notes-item.by-teacher.k-daily,
body .notes-item.by-teacher.k-prize { border-left-color: #7C6CF0; }
body .ni-role,
body .nr-role {
  padding: 1px 7px; border-radius: 9px; font-size: 0.64rem; font-weight: 800;
  background: #EFEBFF; color: #5B45C9; border: 1px solid rgba(124,108,240,.42);
  white-space: nowrap;
}

/* 回复列表 */
body .ni-reps {
  margin-top: 8px; padding: 7px 8px 2px; border-radius: 11px;
  background: #FFFDF7; border: 1px dashed rgba(120,110,170,.28);
}
body .ni-reps-head {
  font-size: 0.68rem; font-weight: 800; color: #8E86A6; margin-bottom: 5px;
}
body .nr-item {
  padding: 5px 0 7px; border-top: 1px solid rgba(120,110,170,.13);
}
body .nr-item:first-of-type { border-top: none; }
body .nr-item.nr-new { background: rgba(255,197,61,.10); border-radius: 9px; padding-left: 6px; padding-right: 6px; }
body .nr-head { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
body .nr-av { font-size: 0.84rem; line-height: 1; }
body .nr-nm { font-size: 0.75rem; font-weight: 800; color: #3B3557; }
body .nr-tm { margin-left: auto; font-size: 0.64rem; color: #A79EBE; white-space: nowrap; }
body .nr-tx {
  margin-top: 3px; font-size: 0.82rem; line-height: 1.6; color: #3B3557;
  white-space: pre-wrap; word-break: break-word;
}
body .nr-why {
  margin-top: 4px; padding: 4px 7px; border-radius: 8px;
  background: #FFF0F0; color: #A83A2E; font-size: 0.72rem; line-height: 1.5;
}
/* pp111 指定回复：这条回复在接谁的话（「↩ 回 @小明」） */
body .nr-to {
  display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 8px;
  font-size: 0.66rem; font-weight: 800; color: #2F7FB8;
  background: #EAF4FF; border: 1px solid rgba(47,127,184,.26);
}
/* 每条回复下面的「↩ 回 小明」：比整条留言的「💬 回复」更轻，不抢注意力 */
body .nr-acts { margin-top: 3px; display: flex; }
body .nr-back {
  padding: 1px 8px; border-radius: 9px; cursor: pointer; font-family: inherit;
  font-size: 0.66rem; font-weight: 800; color: #2FA98C;
  background: #F0FBF9; border: 1px solid rgba(78,205,196,.42);
}
body .nr-back:hover { background: #D9F6F2; border-color: #4ECDC4; }
/* 回复框顶部那句「↩ 正在回 @小明 这一句」 */
body .nr-to-head { margin-bottom: 5px; font-size: 0.7rem; font-weight: 800; color: #2F7FB8; }
body .nr-st {
  padding: 1px 6px; border-radius: 8px; font-size: 0.6rem; font-weight: 800; white-space: nowrap;
  border: 1px solid transparent;
}
body .nr-st.s-pending { background: #F0EEFA; color: #6B6386; border-color: rgba(120,110,170,.28); }
body .nr-st.s-rejected { background: #FFECEC; color: #C0392B; border-color: #F0A6A6; }
body .nr-new-tag {
  padding: 0 5px; border-radius: 7px; font-size: 0.58rem; font-weight: 800;
  background: #F04438; color: #fff;
}
/* 老师回复：浅紫底，跟同学的回复一眼分开 */
body .nr-item.nr-teacher {
  background: #F6F4FF; border-radius: 9px; padding-left: 6px; padding-right: 6px;
  border-top-color: rgba(124,108,240,.18);
}

/* 「💬 回复」按钮：小、轻，不抢留言本身的注意力 */
body .ni-foot { margin-top: 7px; display: flex; }
body .ni-reply-btn {
  padding: 3px 10px; border-radius: 10px; cursor: pointer; font-family: inherit;
  font-size: 0.72rem; font-weight: 800; color: #2FA98C;
  background: #EAFBF9; border: 1px solid rgba(78,205,196,.5);
}
body .ni-reply-btn:hover { background: #D9F6F2; border-color: #4ECDC4; }

/* 就地回复框 */
body .nr-write { margin-top: 7px; padding: 7px 8px; border-radius: 11px; background: #F7F5FF; }
body .nr-input {
  width: 100%; resize: none; font-family: inherit; font-size: 0.84rem; line-height: 1.55;
  padding: 7px 9px; border-radius: 11px; color: #3B3557; background: #fff;
  border: 2px solid rgba(120,110,170,.22);
}
body .nr-input:focus { outline: none; border-color: #FF9E2C; }
body .nr-input::placeholder { color: #A79EBE; }
body .nr-write .notes-write-foot { margin-top: 6px; }
body .nr-write .nr-cancel { margin-left: auto; }

/* ── pp85：留言附图 + 学生端「上周获奖同学」照片墙 ─────────────────────
   ⚠ 学生端留言卡与排行榜弹窗都是**浅色**（kid-app.css 最后加载）→ 一律深字浅底，
     别用 --text-dim（浅色板上等于看不见）。 */

/* 留言里的附图（别人/自己已通过的留言） */
body .ni-img {
  display: block; margin-top: 7px;
  max-width: 100%; max-height: 30vh; width: auto; height: auto;
  border-radius: 11px; border: 1px solid rgba(120,110,170,.2);
  background: #fff; object-fit: contain; cursor: zoom-in;
}
/* 自己那条（还没通过，显示在「今天已留言」里） */
body .nd-mine-img {
  margin-top: 5px; max-width: 100%; max-height: 22vh;
  border-radius: 10px; border: 1px solid rgba(88,214,141,.45);
  background: #fff; object-fit: contain; cursor: zoom-in;
}

/* 写字区里的「📷 配图」 */
body .nd-attach { display: inline-flex; align-items: center; gap: 6px; }
body .notes-attach-btn {
  padding: 3px 10px; border-radius: 10px; cursor: pointer; font-family: inherit;
  font-size: 0.72rem; font-weight: 800; color: #6B6386;
  background: #F7F5FF; border: 1px solid rgba(120,110,170,.28);
}
body .notes-attach-btn:hover { background: #FFFDF5; border-color: #FFC53D; color: #3B3557; }
body .notes-attach-btn:disabled { opacity: .6; cursor: default; }
body .nd-attach-thumb { display: inline-flex; }
body .nd-attach-img {
  width: 34px; height: 34px; object-fit: cover; border-radius: 8px;
  border: 1px solid rgba(120,110,170,.24); background: #fff; cursor: zoom-in;
}
body .nd-attach-del {
  width: 20px; height: 20px; line-height: 1; padding: 0; border-radius: 50%;
  cursor: pointer; font-family: inherit; font-size: 0.66rem; font-weight: 800;
  color: #C0392B; background: #FFECEC; border: 1px solid #F0A6A6;
}
body .nd-attach-del:hover { background: #FFDADA; }

/* 看大图遮罩（学生端轻量版） */
.ns-zoom {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.82);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.ns-zoom .ns-zoom-img {
  max-width: 92vw; max-height: 86vh; border-radius: 10px; background: #fff; object-fit: contain;
}
.ns-zoom .ns-zoom-x {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font-family: inherit; font-size: 1rem; font-weight: 800;
  color: #fff; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.4);
}

/* 排行榜：奖品列表 +（右侧）上周获奖同学照片墙 */
body .pp-board-prizewrap {
  margin: 0 auto 12px; max-width: 94%;
  display: flex; align-items: stretch; gap: 9px;
}
body .pp-board-prizewrap > .pp-board-prizes { flex: 1 1 auto; min-width: 0; margin: 0; max-width: none; }
body .pp-board-prizewrap.has-honor > .pp-board-prizes { flex: 1 1 52%; }
body .pp-honor-wall {
  flex: 0 1 44%; min-width: 0;
  display: flex; flex-direction: column; gap: 6px;
  padding: 7px 10px 9px; border-radius: 12px;
  background: linear-gradient(180deg, #FFF9E8, #FFF3D6);
  border: 1px dashed #F0CF8A;
}
body .pp-honor-title {
  font-size: 0.74rem; font-weight: 800; color: #8A6D1F;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; white-space: normal;
}
/* pp92：标明这份名单算的是哪一周（跨周后老师忘了更新，学生也看得出是旧名单） */
body .pp-honor-wk { flex: 0 0 100%; font-size: 0.6rem; font-weight: 700; color: #A08250; }
body .pp-honor-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 7px;
}
body .pp-honor-card { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
body .pp-honor-img {
  width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover;
  border-radius: 9px; border: 1px solid #F0CF8A; background: #fff; cursor: zoom-in;
}
body .pp-honor-noimg {
  width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; border-radius: 9px; border: 1px dashed #E3CE9C; background: #fff;
}
body .pp-honor-info { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
body .pp-honor-name {
  font-size: 0.68rem; font-weight: 800; color: #6B4E00; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body .pp-honor-rank { font-size: 0.62rem; font-weight: 700; color: #8A6D1F; }
body .pp-honor-note {
  font-size: 0.6rem; color: #8A7A5A; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* pp105：获奖卡片上的奖品图（快照）—— 当时那份奖品的图，不跟本周配置走 */
body .pp-honor-prize {
  width: 100%; max-width: 44px; aspect-ratio: 1 / 1; height: auto; object-fit: cover;
  display: block; margin-top: 1px; border-radius: 7px;
  border: 1px solid #F0CF8A; background: #fff; cursor: zoom-in;
}
@media (max-width: 560px) {
  body .pp-board-prizewrap { flex-direction: column; }
  body .pp-board-prizewrap.has-honor > .pp-board-prizes { flex: 1 1 auto; }
  body .pp-honor-wall { flex: 0 0 auto; }
  body .pp-honor-list { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
}

/* ── 换头像弹窗：窄屏收紧（pp97）──
   320×568 上原尺寸的卡片有 605px 高，「保存」得滚一下才看得见。这里把预览和表情格子压小，
   多数小屏能一屏放下；真放不下的还有 .setup-overlay 的滚动兜底（见 573 行那段）。 */
@media (max-width: 380px) {
  body .avdlg-card { padding: 16px 14px 12px; }
  body .avdlg-title { font-size: 1rem; margin-bottom: 4px; }
  body .avdlg-tip { font-size: 0.73rem; line-height: 1.45; margin-bottom: 8px; }
  body .avdlg-top { gap: 8px; }
  body .avdlg-preview { width: 60px; height: 60px; font-size: 2rem; }
  body .avatar-picker { gap: 4px; margin: 8px 0; }
  body .avatar-option { font-size: 1.45rem; padding: 3px; }
  body .avdlg-hint { margin-top: 6px; }
  body .avdlg-foot { margin-top: 8px; }
}

/* ── 欢迎页（首次进入）：窄屏收紧（pp97）──
   它是所有卡片里最高的一个：320×568 上 600px，一开始「🐣 开始冒险！」在屏幕外，
   小朋友未必知道要往上滑。这里把欢迎语和表情格子压小，尽量一屏放下（放不下仍有滚动兜底）。 */
@media (max-width: 380px) {
  body .setup-card { padding: 18px 14px; }
  body .setup-card .setup-emoji { font-size: 2.2rem; margin-bottom: 2px; }
  body .setup-card h2 { font-size: 1.1rem; margin-bottom: 4px; }
  body .setup-card > p { font-size: 0.78rem !important; line-height: 1.5; margin-bottom: 8px !important; }
  body .setup-card > button.btn-primary { margin-top: 10px !important; }
}

/* ── 命名行在窄屏不再横向溢出（pp100）──
   320 宽下 `.name-row` 是 150px 输入框 + 8px + 「🎲 随机」77px = 235 > 内容宽 223，
   scrollWidth 229 > clientWidth 223 → 按钮挤进卡片右侧 padding（实测右边缘 270 / 内容 264）。
   给输入框 flex 收缩权限（min-width:0 是 flex 子项真能缩的前提）就够，宽屏仍按 150px 起排。 */
body .name-row { flex-wrap: nowrap; }
body .name-row .cust-input { flex: 1 1 150px; min-width: 0; width: auto; }

/* ═══════════════════════════════════════════════════════════════════
   pp104 小动物大小：右下角圆钮 + 调节面板
   为什么放下面不放标题行：标题行已经有 学科chip + 宠物筛选 + 🎨背景 + 🔑找回
   + ✨散开 + 🌿站好，320 宽下早就是贴着边排的，再塞一个必然折行。
   圆钮贴右下角、半透明，压在精灵之上（精灵 hover 是 z-index 10）。
   颜色一律用实值：乐园是深色活动区背景，「浅色主题变量」在这里会看瞎。
   ═══════════════════════════════════════════════════════════════════ */
body .pet-size-open {
  position: absolute; right: 8px; bottom: 8px; z-index: 20;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; line-height: 1; cursor: pointer;
  background: rgba(26, 20, 42, 0.72); color: #FFF8E1;
  border: 2px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
body .pet-size-open:hover { background: rgba(26, 20, 42, 0.9); transform: scale(1.08); }
body .pet-size-open:active { transform: scale(0.96); }

/* ── pp138：⚡ 一键合成（乐园右下角，叠在 🔍 上方）──
   与 .pet-size-open 同款深底圆钮（乐园是深色活动区，浅色主题变量在这里会看瞎），
   位置 right:8 / bottom:52 = 8 + 36 + 8，正好压在 🔍 头顶、不挡左下角的时长胶囊。 */
body .merge-quick-open {
  position: absolute; right: 8px; bottom: 52px; z-index: 20;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; line-height: 1; cursor: pointer;
  background: rgba(255, 197, 61, 0.92); color: #3A2A00;
  border: 2px solid rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
body .merge-quick-open:hover { background: #FFD869; transform: scale(1.08); }
body .merge-quick-open:active { transform: scale(0.96); }

/* ── pp139：乐园分页器（一页最多 30 只）──
   为什么是底部居中：标题行已经挤了学科 chip + 筛选 + 🎨🔑✨🌿（pp96 量过 320 宽必折行），
   右下角是 🔍 大小 / ⚡ 一键合成本来就占着，左下角是防沉迷时长胶囊 —— 只剩底部中间这块空地。
   深底浅字同 .pet-size-open（乐园本身是深色活动区，用浅色主题变量会看瞎）。 */
body .pet-pager {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  z-index: 21;              /* 比精灵(10)高、比弹窗低；压在动物上面才点得到 */
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 4px; border-radius: 999px;
  background: rgba(26, 20, 42, 0.72); color: #FFF8E1;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  font-size: 0.76rem; font-weight: 800; line-height: 1;
  user-select: none; -webkit-user-select: none;
}
body .pet-pager[hidden] { display: none; }
body .pet-pager .pp-pg-btn {
  width: 24px; height: 24px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
  color: #FFF8E1; font-family: inherit; font-size: 1rem; line-height: 1;
  transition: background 0.15s ease, opacity 0.15s ease;
}
body .pet-pager .pp-pg-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
body .pet-pager .pp-pg-btn:disabled { opacity: 0.32; cursor: default; }
body .pet-pager .pp-pg-label {
  min-width: 34px; text-align: center; letter-spacing: 0.4px; cursor: default;
}

/* ── pp140：🔤 字号（乐园右下角，叠在 ⚡ 上方）──
   位置 right:8 / bottom:96 = 8 + 36(🔍) + 8 + 36(⚡) + 8，一列三颗不打架。
   起因：孩子玩到一半发现字小，原来得先退出登录才能调。 */
body .font-quick-open {
  position: absolute; right: 8px; bottom: 96px; z-index: 20;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.98rem; line-height: 1; cursor: pointer;
  background: rgba(42, 36, 64, 0.86); color: #FFF8E1;
  border: 2px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
body .font-quick-open:hover { background: rgba(42, 36, 64, 0.98); transform: scale(1.08); }
body .font-quick-open:active { transform: scale(0.96); }

/* 字号弹层：复用 .pet-size-pop 的深底卡片骨架，只补里面的四档 chip。
   ⚠ .fs-opt 在 app.css 里用的是 var(--text)（浅色主题下是深字），
     直接搬到深底卡片上会变成「黑字黑底」→ 这里必须显式改浅色。 */
body .font-pop .fpop-opts { margin-top: 2px; }
body .font-pop .fs-opt {
  color: #FFF8E1; border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06); font-size: 0.78rem;
}
body .font-pop .fs-opt:hover { border-color: #FFC53D; }
body .font-pop .fs-opt.active {
  border-color: #FFC53D; background: rgba(255, 197, 61, 0.18);
  box-shadow: 0 0 0 3px rgba(255, 197, 61, 0.14); color: #FFE9A8;
}
body .font-pop .fpop-preview {
  margin-top: 9px; color: #FFF8E1;
  background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16);
}
/* 只剩「好了」→ 靠右，别让它孤零零占着左边。
   ⚠ 这里必须写成 `.pet-size-pop.font-pop`：`.psp-foot` 的原始规则在文件更下面，
     同权重会被它盖回 justify-content: space-between。 */
body .pet-size-pop.font-pop .psp-foot { justify-content: flex-end; }

/* ── pp143：📒 积分明细（顶栏 ⭐ 徽章点开）──
   复用 .pet-size-pop 的深底卡片骨架（乐园是深色活动区，浅色主题变量在这里会看瞎），
   只补「两块数字 + 按天分组的流水」。列表自己滚，卡片不会随记账条数长到屏幕外。
   颜色：加分用金色（跟 ⭐ 同一个色系），扣分才用淡红 —— 这不是股票，
   别拿「红涨绿跌」那套套在小学生的积分账上。 */
body .ptlog-pop { padding-bottom: 10px; }
body .ptlog-sum { display: flex; gap: 8px; margin-bottom: 8px; }
body .ptlog-sum-i {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px;
  padding: 6px 9px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
}
body .ptlog-sum-v { font-size: 0.92rem; font-weight: 800; color: #FFE9A8; }
body .ptlog-sum-k { font-size: 0.66rem; color: rgba(255, 248, 225, 0.62); }
body .ptlog-list {
  max-height: min(42vh, 266px); overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; padding-right: 2px;
}
/* 日期小标题吸顶：滚到一半也能知道这行是"昨天"还是"今天"。
   ⚠ 底色必须写死同卡片色（#2A2440），否则半透明会透出下滚的行、糊成一团。 */
body .ptlog-day {
  position: sticky; top: 0; z-index: 1;
  padding: 5px 2px 3px; font-size: 0.68rem; font-weight: 800;
  color: rgba(255, 248, 225, 0.55); letter-spacing: 0.5px;
  background: #2A2440;
}
body .ptlog-row {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body .ptlog-row:last-child { border-bottom: 0; }
body .ptlog-ico { flex: 0 0 auto; font-size: 0.86rem; line-height: 1; }
body .ptlog-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 5px; }
body .ptlog-name { font-size: 0.78rem; font-weight: 700; color: #FFF8E1; white-space: nowrap; }
body .ptlog-note {
  font-size: 0.68rem; color: rgba(255, 248, 225, 0.5);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body .ptlog-time { flex: 0 0 auto; font-size: 0.66rem; color: rgba(255, 248, 225, 0.42); }
body .ptlog-d {
  flex: 0 0 auto; min-width: 44px; text-align: right;
  font-size: 0.82rem; font-weight: 800; color: #FFD869;
}
body .ptlog-row.minus .ptlog-d { color: #FF9E9E; }
body .ptlog-empty { text-align: center; padding: 8px 4px 6px; }
body .ptlog-empty-e { font-size: 1.7rem; line-height: 1.2; margin-bottom: 3px; }
body .ptlog-empty p { font-size: 0.82rem; font-weight: 700; margin: 2px 0; color: #FFF8E1; }
body .ptlog-empty .ptlog-empty-t { font-size: 0.72rem !important; font-weight: 400 !important; color: rgba(255, 248, 225, 0.58); }
body .ptlog-tip { line-height: 1.55; }
/* 只剩一个「好了」→ 靠右（同 .font-pop 的处理；.psp-foot 默认是 space-between，会把它甩到左边）。
   ⚠ 必须带 .ptlog-pop 提权重，否则被更下面的 .psp-foot 原规则盖回去。 */
body .pet-size-pop.ptlog-pop .psp-foot { justify-content: flex-end; }

/* 一键合成弹窗：沿用 .encounter-overlay 的遮罩与 .encounter-card 的卡片骨架，
   列表自己滚（动物种类多时会有十几行）。 */
body .qm-card { max-width: 420px; text-align: left; padding: 16px 16px 12px; }
body .qm-head { display: flex; align-items: center; justify-content: space-between; }
body .qm-title { font-size: 1.05rem; font-weight: 800; }
body .qm-x {
  width: 28px; height: 28px; border-radius: 50%; line-height: 1;
  background: transparent; border: 1px solid rgba(255,255,255,0.16);
  color: var(--text-dim); font-size: 0.9rem; cursor: pointer; font-family: inherit;
}
body .qm-x:hover { color: var(--text); border-color: var(--accent2); }
body .qm-tip { font-size: 0.76rem; color: var(--text-dim); margin: 4px 0 10px; line-height: 1.5; }
body .qm-list {
  display: flex; flex-direction: column; gap: 7px;
  max-height: min(52vh, 380px); overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* 滚动条会压在圆角按钮上，留一点内边距 */
  padding: 1px 2px;
}
body .qm-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.1);
  color: var(--text); font-family: inherit; text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
body .qm-row:hover { border-color: var(--accent2); background: rgba(78,205,196,0.1); }
body .qm-row:active { transform: scale(0.99); }
body .qm-pet { flex: 0 0 auto; display: flex; align-items: center; font-size: 1.4rem; line-height: 1; }
body .qm-pet .pet-icon, body .qm-pet img { width: 34px; height: 34px; }
body .qm-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body .qm-name { font-size: 0.92rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .qm-sub { font-size: 0.72rem; color: var(--text-dim); }
body .qm-go { flex: 0 0 auto; font-size: 0.78rem; font-weight: 800; color: var(--accent2); white-space: nowrap; }
body .qm-foot { display: flex; justify-content: flex-end; padding-top: 10px; }
body .qm-empty { text-align: center; padding: 12px 6px 4px; }
body .qm-empty-emoji { font-size: 2rem; margin-bottom: 4px; }
body .qm-empty p { font-size: 0.86rem; font-weight: 700; margin: 2px 0; }
body .qm-empty-tip { font-size: 0.76rem !important; font-weight: 400 !important; color: var(--text-dim); line-height: 1.5; }

body .pet-size-pop {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  width: min(92vw, 330px); z-index: 1200;
  background: #2A2440; border: 2px solid #6B5FA8; border-radius: 14px;
  padding: 12px 14px 12px; color: #FFF8E1;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  animation: pspIn 0.16s ease-out both;
}
body .pet-size-pop.out { animation: pspOut 0.16s ease-in both; }
@keyframes pspIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pspOut { from { opacity: 1; } to { opacity: 0; transform: translate(-50%, 6px); } }

body .pet-size-pop .psp-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
body .pet-size-pop .psp-title { font-weight: 800; font-size: 0.95rem; color: #FFE9A8; }
body .pet-size-pop .psp-x {
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, 0.1); color: #FFF8E1;
  border: 1px solid rgba(255, 255, 255, 0.22); font-size: 0.8rem; line-height: 1;
}
body .pet-size-pop .psp-row { display: flex; align-items: center; gap: 10px; }
body .pet-size-pop .psp-range { flex: 1 1 auto; min-width: 0; accent-color: #FFC53D; height: 28px; }
body .pet-size-pop .psp-val {
  flex: 0 0 auto; min-width: 46px; text-align: right;
  font-weight: 800; font-size: 0.9rem; color: #FFD338;
}
body .pet-size-pop .psp-tip {
  margin-top: 8px; font-size: 0.74rem; line-height: 1.55; color: #C6BFD8;
}
body .pet-size-pop .psp-foot {
  margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   pp116 · 私信（学生 ⇄ 老师，一对一）
   弹窗外壳复用 .bg-pick-mask / .bg-pick-card；这里只补内部。
   ⚠ ../kid-app.css 最后加载 → 面板里浅色白底浅字，所以文字一律写死深色实值，
     不要用 --text-dim / --text 这类可能在浅色主题下变白的变量。
   ═══════════════════════════════════════════════════════════════════ */
body .pm-card {
  max-width: 520px; width: 95%; text-align: left; padding: 14px 14px 12px;
  display: flex; flex-direction: column; max-height: min(78vh, 660px);
}
body .pm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
body .pm-title { flex: 1; font-size: 0.95rem; font-weight: 800; color: #3B3557; }
body .pm-list {
  flex: 1; min-height: 110px; overflow-y: auto; overflow-x: hidden;
  padding: 4px 2px; display: flex; flex-direction: column; gap: 8px;
  -webkit-overflow-scrolling: touch;
}
body .pm-empty { padding: 24px 12px; text-align: center; color: #6B6480; font-size: 0.82rem; line-height: 1.7; }
body .pm-row { display: flex; gap: 6px; align-items: flex-start; }
body .pm-row.me { flex-direction: row-reverse; }
body .pm-av { flex: none; width: 26px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
body .pm-bubble {
  max-width: 78%; background: #F2EEF9; border-radius: 14px; padding: 7px 10px;
  border: 1px solid rgba(120,110,170,0.18);
}
body .pm-row.me .pm-bubble { background: #EAF4FF; border-color: rgba(47,127,184,0.22); }
body .pm-meta { font-size: 0.66rem; font-weight: 700; color: #7B7391; margin-bottom: 2px; }
body .pm-text { font-size: 0.82rem; line-height: 1.55; color: #3B3557; white-space: pre-wrap; word-break: break-word; }
body .pm-write { margin-top: 8px; border-top: 1px dashed rgba(120,110,170,0.24); padding-top: 8px; }
body .pm-input {
  width: 100%; box-sizing: border-box; resize: none; border-radius: 12px;
  border: 1px solid rgba(120,110,170,0.3); padding: 8px 10px;
  font-family: inherit; font-size: 0.82rem; line-height: 1.5; color: #3B3557; background: #fff;
}
body .pm-input:focus { outline: none; border-color: #7FB6E8; box-shadow: 0 0 0 3px rgba(127,182,232,0.18); }
body .pm-write-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
body .pm-count { flex: 1; font-size: 0.7rem; color: #7B7391; }

/* 学生顶栏「✉️ 私信」有未读 → 橙金高亮（与留言条未读同一套视觉） */
body .btn.pm-open.pm-unread {
  position: relative; background: #FFF1E4; color: #C2410C; border-color: #F0945A;
}
body .btn.pm-open.pm-unread:hover { background: #FFE6D2; }
body .btn.pm-open.pm-unread::after {
  content: ''; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px;
  border-radius: 50%; background: #F04438; box-shadow: 0 0 0 2px #fff;
}

/* 排行榜「👀 去看 TA 的乐园」（学生之间只读参观） */
body .pp-board-eye {
  flex: none; margin-left: 6px; padding: 1px 7px; border-radius: 9px; cursor: pointer;
  font-family: inherit; font-size: 0.74rem; line-height: 1.5;
  background: #fff; color: #3B3557; border: 1px solid rgba(120,110,170,0.3);
}
body .pp-board-eye:hover { background: #F0F6FF; border-color: #7FB6E8; }

/* ═══════════════════════════════════════════════════════════════════
   pp116 · 防沉迷锁屏（每天累计 25 分钟用完之后）
   ⚠ z-index 必须压过所有弹层（合成卡片 / 安装药丸 / kid-dialog），
     否则孩子还能点穿到后面的按钮继续玩。
   ═══════════════════════════════════════════════════════════════════ */
.tl-mask {
  position: fixed; inset: 0; z-index: 2147483000;
  background: rgba(28, 24, 48, 0.93);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.tl-card {
  background: #FFF9EC; color: #4A3B12; border-radius: 22px; padding: 26px 22px 20px;
  max-width: 420px; width: 94%; text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,0.5); animation: slideUp 0.28s;
}
.tl-emoji { font-size: 2.6rem; line-height: 1.1; }
.tl-title { font-size: 1.15rem; font-weight: 800; margin: 8px 0 8px; color: #6B4E00; }
.tl-body { font-size: 0.86rem; line-height: 1.75; color: #6B4E00; }
.tl-body b { color: #B45309; }
.tl-foot { margin-top: 16px; display: flex; justify-content: center; }

/* ── pp117 开放时段挡板：不在 7:00-22:00 时登录 → 停在「还没开门」这一屏 ──
   z-index 与 .tl-mask 同档：它取代整个乐园，绝不能有按钮从后面点穿。
   不叫「锁」也不写"违规"：这不是惩罚，只是还没到开门时间，别把孩子吓着。 */
body .tl-closed {
  position: fixed; inset: 0; z-index: 2147483000;
  background: linear-gradient(160deg, #2A2440 0%, #1C1830 100%);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}

/* ── 角落常驻时长浮窗（pp117）──
   学生随时能看到「今天还能玩多久」，不用等到只剩 5 分钟才被吓一跳。
   ⚠ pointer-events:none 是硬要求：学生要拖宠物、点按钮，
     浮窗绝不能抢事件 —— 看不见的遮挡比不显示更糟。
   ⚠ z-index 必须低于 .tl-mask(2147483000)，触顶时由遮罩接管。
   ⚠ pp132：**不能待在右下角** —— 右下角是乐园的「🔍 小动物大小」圆钮
     （.pet-size-open，absolute right 8 / bottom 8），胶囊正好压在它身上，学生点不到。
     也不能去左下角贴地：那里有「点我安装到手机上」药丸（left 10 / bottom 10 / 高约 24）。
     所以放在**左边、抬到药丸上方**（bottom 54）—— 那块区域没有任何按钮，
     宠物路过也没关系（pointer-events:none，不接事件）。 */
body .tl-chip {
  position: fixed; left: 12px; bottom: 54px; z-index: 900;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(42, 36, 64, 0.82);
  color: #FFF8E1;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.2px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
  pointer-events: none; user-select: none; -webkit-user-select: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
/* 剩 5 分钟：转暖色提醒（不刺眼，不打断答题） */
body .tl-chip.warn {
  background: rgba(255, 179, 71, 0.94);
  color: #4A3200;
  border-color: rgba(255, 255, 255, 0.55);
}
/* 剩 1 分钟：红起来 + 轻微呼吸，最后一分钟才该有存在感 */
body .tl-chip.danger {
  background: rgba(214, 60, 48, 0.95);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.45);
  animation: tlChipPulse 1.2s ease-in-out infinite;
}
@keyframes tlChipPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
/* pp138：答题 / 合成弹窗打开时把胶囊藏起来。
   胶囊是 z-index:900 的常驻浮窗，比弹窗（300 上下）高，而答题卡底部正好是
   「🐾 名字 [输入框] 🎲」这一行 —— 320×568 实测胶囊整整盖掉左半个输入框，
   孩子看不到自己起的名字。pointer-events:none 所以不算「点不到」，但看不见一样糟。
   用 :has 只在有弹窗时隐藏，老浏览器不支持就当这条不存在（维持原样，不会更差）。 */
body:has(.encounter-overlay) .tl-chip,
body:has(.tl-mask) .tl-chip { opacity: 0; transition: opacity 0.15s ease; }
/* 窄屏（手机）稍微收一点，别压到宠物身上 */
@media (max-width: 420px) {
  body .tl-chip { font-size: 0.72rem; padding: 4px 9px; bottom: 50px; left: 10px; }
}

/* ═══════════════════════════════════════════════════════════════════
   pp119 · 道具卡商店（🛒 商店）+ 合成弹窗里的「用道具卡」一行
   弹窗外壳复用 .bg-pick-mask / .bg-pick-card；这里只补内部。
   ⚠ ../kid-app.css 最后加载 → 白底浅字，文字一律写死深色实值
     （不要用 --text / --text-dim，浅色主题下会变成看不见的浅灰）。
   ═══════════════════════════════════════════════════════════════════ */
body .shop-card {
  max-width: 470px; width: 95%; text-align: left; padding: 14px 14px 12px;
  display: flex; flex-direction: column; max-height: min(84vh, 720px);
}
body .shop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
body .shop-title { flex: 1; font-size: 0.95rem; font-weight: 800; color: #3B3557; }
body .shop-pts {
  flex: none; font-size: 0.8rem; font-weight: 800; color: #6B4E00;
  background: #FFF8E1; border: 1px solid #F0C36D; border-radius: 10px; padding: 2px 9px;
}
body .shop-tip { font-size: 0.7rem; color: #6B6480; line-height: 1.6; margin-bottom: 8px; }
body .shop-tip b { color: #2E7D32; }
body .shop-list { display: flex; flex-direction: column; gap: 8px; }
body .shop-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 9px;
  background: #F7F5FF; border: 1px solid rgba(120,110,170,0.18); border-radius: 13px;
}
body .shop-item.done { opacity: 0.7; }
body .shop-emoji { flex: none; width: 30px; text-align: center; font-size: 1.3rem; line-height: 1.2; }
body .shop-main { flex: 1; min-width: 0; }
body .shop-name { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
body .shop-nm { font-size: 0.84rem; font-weight: 800; color: #3B3557; }
body .shop-lv {
  flex: none; font-size: 0.62rem; font-weight: 700; color: #4A5C8A;
  background: #EAF0FF; border-radius: 7px; padding: 0 5px; line-height: 1.6;
}
body .shop-desc { font-size: 0.72rem; line-height: 1.5; color: #6B6480; }
body .shop-item .btn { flex: none; white-space: nowrap; }
body .shop-bag-head { margin: 10px 0 5px; font-size: 0.76rem; font-weight: 800; color: #3B3557; }
body .shop-bag { display: flex; flex-wrap: wrap; gap: 5px; }
body .shop-chip {
  font-size: 0.7rem; color: #3B3557; background: #fff;
  border: 1px solid rgba(120,110,170,0.28); border-radius: 9px; padding: 2px 7px;
}
body .shop-buff { margin-top: 8px; font-size: 0.74rem; font-weight: 700; color: #2E7D32; }
body .shop-foot {
  margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(120,110,170,0.24);
  font-size: 0.68rem; color: #7B7391; line-height: 1.6;
}

/* 合成弹窗里的卡行：放在 train-head 之后（不在可滚动的 body、也不在装着选项的 foot）
   ⚠ 必须**单行横滑**：学生攒的卡一多（6 张很常见），换行会吃掉 3 行高度，
     320×568 上直接把题干和选项挤出屏幕（pp119 首版实测截图就是这样）。
     所以 nowrap + overflow-x:auto，高度永远只有一行；「已用」状态才允许换行。 */
body .merge-card-row {
  display: flex; align-items: center; gap: 5px;
  margin: 2px 0 6px; padding: 0 2px 2px;
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
body .merge-card-row::-webkit-scrollbar { height: 3px; }
body .merge-card-row::-webkit-scrollbar-track { background: transparent; }
body .merge-card-row::-webkit-scrollbar-thumb { background: rgba(120,110,170,0.22); border-radius: 2px; }
body .merge-card-row.used {
  flex-wrap: wrap; overflow: visible;
  font-size: 0.72rem; font-weight: 700; color: #6B4E00;
}
body .merge-card-tip { flex: 0 0 auto; font-size: 0.7rem; color: #7B7391; }
body .merge-card-btn {
  flex: 0 0 auto;
  font-family: inherit; font-size: 0.7rem; line-height: 1.4; cursor: pointer;
  padding: 3px 8px; border-radius: 9px; color: #3B3557; background: #fff;
  border: 1px solid rgba(120,110,170,0.32);
}
body .merge-card-btn:hover { background: #F0F6FF; border-color: #7FB6E8; }
body .merge-card-note { margin-top: 3px; font-size: 0.72rem; font-weight: 700; color: #6B4E00; }

/* pp121 · 开始邂逅旁边的「🛒 商店」（第二个入口，顶栏那个仍保留）
   金色描边把它和主行动（开始邂逅）区分开：一个是「玩」，一个是「花积分」。
   ⚠ 窄屏媒体查询里有 `.top-row .action-area > .btn { width:100% }`，
     这里必须用更高权重把它按回「按内容宽度」，否则两个键各占 50% 把「开始邂逅」挤瘦。 */
body .top-row .action-area > .btn.action-shop {
  flex: 0 0 auto; width: auto; white-space: nowrap;
  padding: 0 12px; font-size: 0.8rem;
  background: #FFF8E1; color: #6B4E00; border: 1px solid #F0C36D;
}
body .top-row .action-area > .btn.action-shop:hover { background: #FFEFC2; }
body .top-row .action-area > .btn.action-shop:disabled { opacity: 0.5; }
@media (max-width: 520px) {
  body .top-row .action-area > .btn.action-shop { padding: 0 9px; font-size: 0.74rem; }
}

/* ═══ pp122 · 学生端顶部工具条整理 ══════════════════════════════════
   390 宽实测：顶栏 7 个按钮（排行榜/留言条/私信/商店/错题本/头像/退出）摊成三行，
   下面「我的动物们」一行再摊两行，光工具就吃掉 5 行 ≈ 半屏。
   做法不动任何元素（元素在 DOM 里、可点、文字还在，老测试照旧找得到）：
     · 顶栏那一团在窄屏变**单行可横滑**，不再叠行；
     · 「背景 / 找回 / 改密码」是账号设置，用 order 排到「散开 / 站好」后面并靠右，
       一眼就能分清「玩乐园的按钮」和「改设置的按钮」两组。 */
.header-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* pp132：工具条包裹层 —— 挂「右边还有更多 ›」的箭头。
   箭头必须**脱离滚动带**（绝对定位在包裹层上），否则会跟着内容一起滚走。 */
.header-scroll { display: flex; min-width: 0; position: relative; }
.header-more { display: none; }
.section-title .title-settings {
  order: 9; margin-left: auto; display: inline-flex; align-items: center;
  gap: 4px; flex-wrap: nowrap; flex-shrink: 0;
}
.section-title .title-settings .btn { padding-left: 9px; padding-right: 9px; }
@media (max-width: 640px) {
  .header { gap: 4px; }
  .header-scroll { flex: 1 1 100%; overflow: hidden; }
  .header-right {
    flex: 1 1 auto; min-width: 0; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: 2px; margin-bottom: 2px;
  }
  .header-right::-webkit-scrollbar { display: none; }
  .header-right > * { flex: 0 0 auto; }
  .header-right .btn-small { padding: 5px 10px; font-size: 0.76rem; }
  /* 右边缘渐隐 + ›：真的还能滑才显示，滑到底由 .at-end 收起来。
     ⚠ 必须是**按钮**：不会滑的孩子可以直接点它翻一屏（js 里绑了 scrollBy）。
     ⚠ 配色跟顶栏同基调（浅底深字）—— 这里不是乐园深色活动区，用深色块会像贴了块膏药。 */
  .header-scroll.has-overflow .header-more {
    display: flex; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; align-items: center; justify-content: center;
    padding: 0 0 3px; border: 0; cursor: pointer; z-index: 3;
    font-size: 1.15rem; font-weight: 900; line-height: 1; color: #3B3557;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.86) 40%, rgba(255, 255, 255, 1) 100%);
    animation: hdrMoreIn 0.25s ease;
  }
  .header-scroll.has-overflow.at-end .header-more { display: none; }
  /* 头一次进来抖一下：位置提示比文字直接（只抖一次，见 js 里的 HINT_KEY） */
  .header-scroll.nudge .header-right { animation: hdrNudge 0.75s ease-in-out 0.25s 2; }
  /* 设置组整体换行时靠右，别贴着左边缘看起来像漏排 */
  .section-title .title-settings { flex: 0 0 auto; }
}
@keyframes hdrMoreIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes hdrNudge {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(-16px); }
}

/* ═══════════════════════════════════════════
   pp131 学生端「给同学传悄悄话」（pmx.js）
   外壳复用 .bg-pick-mask / .bg-pick-card（学生端浅色：--card-bg #fff / --text #3B3557）
   ⚠ 别用 var(--text-dim) 之类只在教师端定义过的变量，这里写实值。
   ═══════════════════════════════════════════ */
.pmx-card { text-align: left; max-height: 84vh; overflow-y: auto; }
.pmx-card .notes-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.pmx-tip {
  font-size: .74rem; line-height: 1.6; color: #6B6486;
  background: #FFF7E6; border: 1px solid #FFE0A3; border-radius: 10px;
  padding: 8px 10px; margin-bottom: 12px;
}
.pmx-write { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pmx-to { width: 100%; }
.pmx-input {
  width: 100%; box-sizing: border-box; resize: vertical;
  border: 1px solid #E2DAF5; border-radius: 12px; padding: 10px 12px;
  font-family: inherit; font-size: .88rem; color: #3B3557; background: #fff;
}
.pmx-input:focus { outline: none; border-color: #7C6CF0; }
.pmx-write-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pmx-count { font-size: .72rem; color: #A79EBE; }

.pmx-sec { font-size: .8rem; font-weight: 800; color: #3B3557; margin: 12px 0 8px; }
.pmx-list { display: flex; flex-direction: column; gap: 8px; }
.pmx-item { border-radius: 12px; padding: 9px 11px; background: #FBF8FF; border: 1px solid #EFEAFB; }
.pmx-item.is-new { background: #FFF9EC; border-color: #FFE0A3; }
.pmx-item.st-wait { border-style: dashed; }
.pmx-item.st-no { background: #FFF3F3; border-color: #FFD6D6; }
.pmx-item-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .74rem; color: #6B6486; margin-bottom: 3px;
}
.pmx-item-meta b { color: #3B3557; font-size: .8rem; }
.pmx-st { font-size: .7rem; font-weight: 700; }
.pmx-when { margin-left: auto; font-size: .68rem; color: #A79EBE; }
.pmx-item-tx { font-size: .84rem; line-height: 1.55; color: #3B3557; word-break: break-word; }
.pmx-why { margin-top: 5px; font-size: .74rem; color: #D14343; }
.pmx-close2 { width: 100%; margin-top: 14px; }
