/* Nunito 本地字体：可变字体单文件覆盖 700/800/900 三个字重（Google Fonts 对三档下发的也是同一个文件） */
@font-face{
  font-family:'Nunito';
  font-style:normal;
  font-weight:700;
  font-display:swap;
  src:url('/static/fonts/Nunito.woff2') format('woff2');
}
@font-face{
  font-family:'Nunito';
  font-style:normal;
  font-weight:800;
  font-display:swap;
  src:url('/static/fonts/Nunito.woff2') format('woff2');
}
@font-face{
  font-family:'Nunito';
  font-style:normal;
  font-weight:900;
  font-display:swap;
  src:url('/static/fonts/Nunito.woff2') format('woff2');
}

/* 字体就绪前隐藏界面：字体切换(后备字体→Nunito)发生在显示之前，避免布局抖动 */
body.fonts-pending .start-card{display:none}
body.fonts-pending .game-container{visibility:hidden}

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

body {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #fef9c3 0%, #fde9e0 25%, #fce7f3 50%, #e0f2fe 75%, #d1fae5 100%);
  background-size: 500% 500%;
  animation: bgShift 20s ease infinite;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: safe center;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  padding: 12px 0;
}
@keyframes bgShift {
  0%,100%{background-position:0% 50%}
  50%{background-position:100% 50%}
}

/* ── 背景装饰 ── */
.bg-decorations { position:fixed; inset:0; pointer-events:none; z-index:0; }
.bg-float {
  position:absolute; opacity:0.28;
  animation: floatAround 18s ease-in-out infinite;
}
.bg-float:nth-child(1){top:4%;left:4%;animation-delay:0s;font-size:55px}
.bg-float:nth-child(2){top:12%;right:6%;animation-delay:-4s;font-size:42px}
.bg-float:nth-child(3){bottom:18%;left:2%;animation-delay:-8s;font-size:50px}
.bg-float:nth-child(4){bottom:8%;right:4%;animation-delay:-12s;font-size:62px}
.bg-float:nth-child(5){top:50%;left:3%;animation-delay:-6s;font-size:36px}
.bg-float:nth-child(6){top:38%;right:2%;animation-delay:-14s;font-size:44px}
@keyframes floatAround {
  0%,100%{transform:translateY(0) rotate(0deg) scale(1)}
  25%{transform:translateY(-30px) rotate(8deg) scale(1.1)}
  50%{transform:translateY(15px) rotate(-5deg) scale(0.9)}
  75%{transform:translateY(-20px) rotate(3deg) scale(1.05)}
}

/* 金色环境光点 */
.sparkle-particle {
  position: fixed; pointer-events: none; z-index: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px 2px #fbbf24;
  animation: sparkleFloat 3s ease-out forwards;
}
@keyframes sparkleFloat {
  0%{opacity:1;transform:translate(0,0) scale(1)}
  100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(0)}
}

/* ── 首次启动遮罩 ── */
.start-overlay{
  position:fixed;inset:0;z-index:200;
  background:rgba(0,0,0,0.5);
  display:flex;justify-content:center;align-items:center;
}
.start-overlay.hidden{display:none}

.start-card{
  background:white;border-radius:48px;padding:56px 40px;
  text-align:center;max-width:420px;width:90%;
  box-shadow:0 24px 80px rgba(0,0,0,0.2);
  animation:popIn 0.5s ease-out;
}
.start-emoji{font-size:100px;margin-bottom:16px}
.start-card h2{font-size:36px;color:#1e3a5f;margin:8px 0}
.start-card p{font-size:20px;color:#64748b;margin:8px 0 20px}

/* 备案号纸签（2026-12-02）：绝对定位贴在开场遮罩底部居中，不参与卡片的居中排版；
   点在链接上 e.target 不是遮罩本身，不会触发「点遮罩开始」。 */
.beian{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);max-width:calc(100% - 24px);
  display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:2px 10px;
  padding:7px 18px;border-radius:999px;background:#FFFDF6;border:1.5px solid #DCC79C;
  box-shadow:0 3px 0 rgba(138,124,98,.28);
  font:13px/1.5 "Microsoft YaHei","PingFang SC",sans-serif;white-space:nowrap}
.beian a{display:inline-flex;align-items:center;gap:6px;color:#6F6450;text-decoration:none}
.beian a:hover{color:#2A3B52;text-decoration:underline;text-underline-offset:3px}
.beian img{width:18px;height:18px}
.beian i{width:4px;height:4px;border-radius:50%;background:#DCC79C}

/* ── 游戏容器 ── */
.game-container {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px);
  border-radius: clamp(24px,4vw,48px);
  padding: clamp(10px,2vw,24px) clamp(12px,3vw,44px) clamp(8px,1.5vw,20px);
  /* 第 90 轮①：卡片宽不再是写死的 820，而是 2.93 × 图边长（今日 820 / 280 反算）。
     --scaffold 不是第二枚旋钮，它只是 --imgsz 的**带下限影子**：hands.js 在量「除手型条以外的净高」
     那一刻会把 --imgsz 临时归零，那一瞬间这一族的字号与格子若跟着归零就量不准了，所以下限 280
     （= 今日值，第 90 轮②把它从「顶」降为「底」）在这里兜一道。谁都不许给 --scaffold 单独赋值。 */
  --scaffold: max(280px, var(--imgsz, 280px));
  max-width: calc(var(--scaffold) * 2.93); width: min(95%, calc(var(--scaffold) * 2.93));
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 0 0 4px rgba(255,255,255,0.6);
  transition: box-shadow 0.5s, border 0.5s;
  border: 3px solid transparent;
  outline: none;
}
/* 第 90 轮①配套：hands.js 量「除图与条以外的净高」那几十毫秒里挂上它。
   输入格与听一听键都带补间，而本轮起这些尺寸从旋钮派生——补间不按住，量到的是半途值，
   净高虚高一截，图就被自己的量具压小（盘外现量同一档飘出 731 / 783 两枚卡片高）。 */
.game-container.measuring, .game-container.measuring *{transition:none !important}
/* 同一个窗口里再按住折行：净高要按「这一句占一行」来量。
   不这么做，题面一长（词面折成两行）量到的净高就多一行，图当场少 70px，她换一道短题图又长回来——
   卡片随题面呼吸，四岁的人会被这一下晃到；而且家长③那条「图 ≥360」会随抽到哪道题而随机红。
   真放不下的那一档仍由 hands.js 的收口阶梯收图（硬前提是零溢出，不是零收口）。 */
.game-container.measuring .text-display{white-space:nowrap}
/* 答对时彩虹边框 */
.game-container.celebrate-glow {
  border-color: rgba(251,191,36,0.5);
  box-shadow: 0 0 40px rgba(251,191,36,0.3), 0 0 80px rgba(236,72,153,0.2), 0 0 120px rgba(99,102,241,0.15), 0 20px 60px rgba(0,0,0,0.08);
  animation: rainbowGlow 0.8s ease-out;
}
@keyframes rainbowGlow {
  0%{box-shadow:0 0 0 rgba(251,191,36,0),0 0 0 rgba(236,72,153,0),0 0 0 rgba(99,102,241,0)}
  50%{box-shadow:0 0 60px rgba(251,191,36,0.5),0 0 100px rgba(236,72,153,0.4),0 0 140px rgba(99,102,241,0.3)}
  100%{box-shadow:0 0 30px rgba(251,191,36,0.2),0 0 50px rgba(236,72,153,0.1),0 0 70px rgba(99,102,241,0.08)}
}

  /* ── 图片区 ── */
/* --imgsz 是图片边长。默认 280；展开指法键盘时由 body.hands-on 按视口高度调小，
   这样卡片总高不增（家长反复要求：不许溢出、不许遮挡）。 */
/* ── 第 127 轮乙（家长 2026-11-20：每次重开或刷新，有效区域先是他熟悉的那个较小样子，
   过一下"一下子"撑到正常大小）──
   病根：定尺寸的 fitLayer 挂在 window 的 load 上，load 要等十几张配图到齐才响，这一脚天然
   迟到一秒上下；在它赶到之前画出来的就是下面这些兜底值拼出的"较小样子"。
   补法：hands.js 量完把终值按视口分档记进 localStorage("ning.imgsz")，templates/index.html
   里那段既有的内联脚本在首绘前把"上一次量到的数"写成 --imgsz-seed。这一行只给种子留一个
   挂点：种子在，首帧吃种子；种子没有（第一次访问/存储被禁/值越界），逐字回落成今天的 280px。
   首帧到定住的守卫在 test_layout.t_r127_first_frame_flash_caged（冷热水各一遍，热水 ≤8px）。 */
:root{ --imgsz: var(--imgsz-seed, 280px); }
/* RR3（家长 2026-11-11 第二次纠偏）：上一版为了"键不压图"把整块图往下顶，图小了 7%——他说孩子还小，
   图不许小。看图就明白了：配图左右两边本来就空着一百多像素。于是这两只回看键不占顶部那条 lane，
   改成住在配图卡片这一格里，靠 justify-self 一边一只、垂直居中，像翻书页的左右箭头。
   --peeksize / --peekinset 是这一把尺的两个数（键径与离卡片边的距离），窄屏跟着视口自己缩。
   代价换了方向：不吃纵向（图不缩），吃横向（左右各让出一条放键）——压叠面积由用例庚甲当场量，
   必须恰好 0，且键与图之间至少留 12px 空气。 */
.image-card {
  display: grid;
  place-items: center;
  height: calc(var(--imgsz, 280px) + 8px);
  padding: 4px 0;
}
/* 一只贴左、一只贴右；垂直居中由 place-items 给（同格叠放那条规矩见下一行）。
   外观跟着右上角那套走：圆形、白底、细环——但这对是主角，给它更实的白底、靛蓝描边箭头与软阴影，
   回看态中整对点亮成实心（她在"看"的时候，这对就是此刻唯一该按的东西）。
   禁用色不用：这套家法第 44 轮立过——她读颜色不读字，能点的东西一律不许看起来像不能点。 */
.peek-side{
  --peeksize:clamp(30px,6.5vw,52px); --peekinset:clamp(4px,1.5vw,20px);   /* 手机最窄一档留气 ≥12px（用例庚甲的量法） */
  width:var(--peeksize); height:var(--peeksize); padding:0;
  border-radius:50%; border:2px solid #c7d2fe; background:#fff; color:#6366f1;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 3px 10px rgba(99,102,241,.16), inset 0 -2px 0 rgba(99,102,241,.07);
  cursor:pointer; z-index:3; align-self:center;
  transition:transform .12s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.peek-side:hover{transform:scale(1.08);box-shadow:0 6px 16px rgba(99,102,241,.26)}
.peek-side:active{transform:scale(.93)}
/* 图标只画一份（向左那枚），向右靠 CSS 转——两枚长得不一样才会骗人 */
.peek-ico{width:58%;height:58%;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.peek-ico[data-dir="fwd"]{transform:rotate(180deg)}
.game-container.peeking .peek-side{background:#6366f1;border-color:#6366f1;color:#fff;
  box-shadow:0 4px 14px rgba(99,102,241,.34)}
#peekBtn{justify-self:start; margin-left:var(--peekinset)}
#peekFwdBtn{justify-self:end; margin-right:var(--peekinset)}
/* emoji 和 AI 图叠放在同一格：切换时交叉淡入淡出，卡片高度恒定，不抖动 */
.image-card > * { grid-area: 1 / 1; }
.image-fallback {
  font-size: calc(var(--imgsz, 280px) * 0.5); line-height: 1;
  cursor: default;
  transition: opacity 0.3s, transform 0.3s;
  display: inline-block;
  user-select: none;
}
/* 中文翻译标签：给家长看，放右上角工具区下方，不碰图片 */
.zh-label {
  position: absolute;
  top: 58px;
  right: 20px;
  font-size: 15px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255,255,255,0.75);
  border-radius: 999px;
  padding: 2px 12px;
  user-select: none;
  letter-spacing: 1px;
  z-index: 2;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .zh-label{font-size:13px;top:50px;right:12px;padding:1px 10px}
}
.word-image {
  /* 第 289 轮（乙）：外框锁正方形——1599 张配图全部 1:1，盒形由宽一枚数推出，
     不再等 png 的内在尺寸，也不给第二条链留写高的份（全仓 style.css 此前 aspect-ratio 0 处）。
     宽只吃 --imgsz：首绘前它 = 种子/内联解析值（第 289 轮甲），settle 时同数的只缩放框内的图
     （object-fit:contain），邻居不动。对账牙 t_r289_first_paint_budget_single_source 钉这条。 */
  width: var(--imgsz, 280px); height: auto; aspect-ratio: 1;
  object-fit: contain;
  border-radius: 28px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.12));
  transition: opacity 0.3s, transform 0.3s;
  display: inline-block;
  background: rgba(255,255,255,0.3);
}
/* 加载占位：与图片同尺寸，图到达前后显示区域大小恒定 */
.image-fallback.loading{
  font-size:0;
  /* 第 289 轮（乙）：占位盒与真图同一条盒式（单源：宽一枚数 + aspect-ratio 推方），
     图到达前后盒子逐帧同形——「外框预留」在两态都立得住。 */
  width:var(--imgsz, 280px);height:auto;aspect-ratio:1;
  border-radius:28px;
  background:linear-gradient(135deg,#fef3c7,#fbcfe8);
  animation:cardPulse 1.2s ease-in-out infinite;
}
@keyframes cardPulse{0%,100%{opacity:.55}50%{opacity:.95}}
.word-image.loading-img {
  opacity: 0.5;
  animation: pulseLoad 1s ease-in-out infinite;
}
@keyframes pulseLoad {
  0%,100%{opacity:0.4}
  50%{opacity:0.8}
}
.word-image.happy-dance {
  animation: happyDance 0.6s ease-out;
}
.word-image.gentle-nudge {
  animation: gentleNudge 0.5s ease-out;
}
/* ── 第 105 轮：配图 idle 呼吸（解码层给的那点生命感，不是奖赏层）──
   只在她还没动手那一刻起伏，第一个键按下去由 JS 摘掉类，图立刻回到静止。
   四件上界写死在这里，静态层从本文件现读反算，抄进测试就算假牙：
     幅度 scale 1.00 → 1.02、位移 ≤2px、无旋转；周期 3.6s（≥3s）；easing 沿用本文件现成的 ease-in-out 家族。
   哪些词会呼吸不住在这儿：判据现读 words.js 的 emoji 字段，唯一一处写在 images.js。
   本条规则里一个单词词面都不许多写——CSS 一旦抄词表，改表就得改码（家长点名的「qq 头像」同族病）。 */
.word-image.idle-breath {
  animation: idleBreath 3.6s ease-in-out infinite;
}
@keyframes idleBreath {
  0%,100%{transform:scale(1) translateY(0)}
  50%{transform:scale(1.02) translateY(-2px)}
}
@keyframes bounce {
  0%,100%{transform:translateY(0)}
  30%{transform:translateY(-22px)}
  50%{transform:translateY(0)}
  70%{transform:translateY(-10px)}
}
/* 答对：开心跳舞 */
.emoji-display.happy-dance {
  animation: happyDance 0.6s ease-out;
}
/* 打字中：按对一个字母 — emoji 弹跳 */
.emoji-bounce {
  animation: emojiBounce 0.35s ease-out;
}
@keyframes emojiBounce {
  0%{transform:scale(1)}
  40%{transform:scale(1.3) translateY(-12px)}
  70%{transform:scale(0.95) translateY(2px)}
  100%{transform:scale(1) translateY(0)}
}
/* 打字中：按错 — emoji 温柔摇头 */
.emoji-wiggle {
  animation: emojiWiggle 0.4s ease-out;
}
@keyframes emojiWiggle {
  0%,100%{transform:translateX(0) rotate(0)}
  20%{transform:translateX(-8px) rotate(-6deg)}
  60%{transform:translateX(8px) rotate(6deg)}
}
/* 空闲眨眼呼吸 */
.emoji-idle {
  animation: emojiIdle 2s ease-in-out infinite;
}
@keyframes emojiIdle {
  0%,100%{transform:scale(1);opacity:0.9}
  50%{transform:scale(1.06);opacity:1}
}
/* 空闲超时：当前字母框超级脉冲 */
.input-box.urgent {
  border-color:#f59e0b !important;
  animation: urgentPulse 0.6s ease-in-out infinite !important;
}
@keyframes urgentPulse {
  0%,100%{box-shadow:0 0 12px rgba(245,158,11,0.5);transform:scale(1)}
  50%{box-shadow:0 0 32px rgba(245,158,11,0.9),0 0 48px rgba(251,191,36,0.6);transform:scale(1.18)}
}
@keyframes happyDance {
  0%{transform:scale(1) rotate(0)}
  20%{transform:scale(1.35) rotate(-15deg)}
  40%{transform:scale(1.3) rotate(12deg)}
  60%{transform:scale(1.25) rotate(-8deg)}
  80%{transform:scale(1.15) rotate(4deg)}
  100%{transform:scale(1) rotate(0)}
}
/* 答错：温柔摇头 */
.emoji-display.gentle-nudge {
  animation: gentleNudge 0.5s ease-out;
}
@keyframes gentleNudge {
  0%{transform:translateX(0)}
  20%{transform:translateX(-12px) rotate(-5deg)}
  40%{transform:translateX(10px) rotate(4deg)}
  60%{transform:translateX(-6px) rotate(-2deg)}
  100%{transform:translateX(0) rotate(0)}
}

/* ── 喇叭按钮 ── */
.speak-btn {
  display:block;margin:0 auto 4px;
  /* 第 90 轮①：听一听键 0.2286× 见方（64/280）、键内符号 0.114×（32/280） */
  width:calc(var(--scaffold) * 0.2286); height:calc(var(--scaffold) * 0.2286); border-radius:50%;
  border:3px solid #e2e8f0; background:white;
  font-size:calc(var(--scaffold) * 0.114); cursor:pointer; transition:all 0.2s;
  box-shadow:0 4px 16px rgba(0,0,0,0.08); line-height:1;
}
.speak-btn:hover{border-color:#6366f1;background:#eef2ff;transform:scale(1.1)}
.speak-btn:active{transform:scale(0.92)}
.speak-btn.speaking{border-color:#f59e0b;background:#fef3c7;animation:speakPulse 0.6s ease-in-out infinite}
@keyframes speakPulse {
  0%,100%{box-shadow:0 0 0 0 rgba(245,158,11,0.4)}
  50%{box-shadow:0 0 0 16px rgba(245,158,11,0)}
}


/* 宽屏（≥1000）里那一行放得下时三者同排；放不下时让【键】换到第二行，而不是把她的收集槽挤成两行。
   1707×794 登录态实测：不写这条时收集槽 17 格被压成 14+3 两行（条高 42→75，看着像网格塌了）；
   写这条后槽保住一整行、六枚键自己落第二行。**第 87 轮诱饵贰实测**：真正出力的是上面这句 flex-wrap
   （行放不下先换行，换了行就不必再压缩谁）；曾配过一条 min-width:max-content 兜底，摘掉它判据不红——
   说明那是死重，已删，别再当关键。 */



/* ── 工具按钮：第 89 轮整族真删（不留死码）──
   家长 2026-11-17 原话：「这些图标我感觉都没有用了，默认使用现在的这些功能就可以了，都删除」。
   随模板退场的六枚（📂⬇🔄🖐🔤🔊）一起删除的，是这一族的全部样式：.bar-tools、.import-btn 及其
   :hover/:active/.active，以及那把尺 --toolsize（三条媒体查询里跟着删三行）。
   静音与手型两项能力改走网址参数（?muted=1 / ?hands=0），不占界面一个像素——见 templates/index.html
   与 static/js/state.js 里那两道只读门。要恢复这排键：先由家长拍一次口径，再整族连同接线一起加回，
   不要在这里捡碎片（第 87 轮那两次「搬了家但门没配套」的返工账就写在 git log 里）。 */

/* ── 文本展示区 ── */
.text-display {
  /* 第 90 轮①：字面 0.186×（今日 52/280）、字距 0.029×（8/280）。字母也在「整体大一些」里——
     家长第三次点名同一件事时说得明白：「不管是字母还是输入区域还是whatever」。 */
  margin:8px 0 6px; font-size:calc(var(--scaffold) * 0.186); font-weight:900;
  letter-spacing:calc(var(--scaffold) * 0.029); color:#1e3a5f;
  text-shadow:2px 2px 0 rgba(0,0,0,0.05);
}
.text-display .letter{
  display:inline-flex; flex-direction:column; align-items:center; position:relative;
  /* 第 18 轮（家长："每个单词都带颜色太花了"）：词面与手型同一条规矩——
     默认全部中性，只有下一个要打的字母（.current）带指法色。归属信息没丢：
     data-f 一直在 DOM 上，V23 照旧逐字母核对。 */
  color:#1e3a5f; transition:color 0.2s,transform 0.2s;
}
.text-display .letter.space-char{width:24px}
.text-display .letter.done{color:#10b981;transform:scale(1.12)}


/* 当前要打的这个：保持自己的指色（换成琥珀色就把指法信息藏了），靠放大和脉冲取胜 */
.text-display .letter.current{
  color:var(--fc);
  animation: letterPulse 0.8s ease-in-out infinite;
}
.text-display .letter.current{transform:scale(1.1)}
@keyframes letterPulse {
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:0.55;transform:scale(1.08)}
}

/* ── 发音辅助行：音节 + 音标 ── */
.pronounce-display {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  min-height: 22px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.pronounce-display .syl-part {
  color: #8b5cf6;
}
.pronounce-display .syl-seg {
  display: inline-block;
  transition: all 0.2s;
  border-radius: 6px;
  padding: 0 3px;
  margin: 0 1px;
}
.pronounce-display .syl-seg.active {
  color: #f59e0b;
  background: rgba(245,158,11,0.18);
  transform: scale(1.15);
  animation: sylPulse 0.5s ease-in-out infinite;
}
@keyframes sylPulse {
  0%,100%{transform:scale(1.15)}
  50%{transform:scale(1.25)}
}
.pronounce-display .syl-dot {
  color: #c4b5fd;
  margin: 0 1px;
}
.pronounce-display .syl-stress {
  font-size: 1.5em;
  font-weight: 800;
  color: #6d28d9;
  border-bottom: 2px solid #6d28d9;
  padding-bottom: 0;
}
.pronounce-display .syl-stress2 {
  font-size: 1.15em;
  font-weight: 700;
  color: #a78bfa;
}
.pronounce-display .syl-weak {
  font-size: 0.82em;
  font-weight: 600;
  color: #c4b5fd;
}
.pronounce-display .ipa-part {
  color: #94a3b8;
  font-weight: 600;
  font-family: 'Nunito','Segoe UI','Lucida Sans Unicode',sans-serif;
  white-space: nowrap;
}
/* 单词小写形式：颜色跟主单词一致，突出它是“这个词本身” */
.pronounce-display .lc-part {
  color: #1e3a5f;
  font-weight: 800;
  font-size: 1.2em;
  letter-spacing: 0.5px;
}
/* 小写与后面音节/音标之间的分隔符 */
.pronounce-display .lc-sep {
  color: #cbd5e1;
  font-weight: 400;
  font-size: 0.85em;
}


/* ── 局内回看带（PP1，第 64 轮）──
  整张题面切回去看的那一条：图、词、中文一起切，输入框藏起来（家长 2026-11-11 定形）。
   藏用 visibility 不用 display——卡片高度一点不动，退出时她打了一半的字母还在原处。
   词面挂 .peek 变灰且当前格不点亮：这两条合起来就是"这条不用打"，不写一个字。 */
.game-container.peeking .input-boxes{visibility:hidden}
.text-display.peek{opacity:.62}

/* ── 输入区 ── */
.input-area{margin:10px 0 2px}
/* 输入框不换行：长词自动缩小框宽保持单行，避免换行导致卡片高度跳动 */
.input-boxes{display:flex;justify-content:center;gap:7px;flex-wrap:nowrap}
.input-box{
  /* 第 90 轮①：输入格 0.221×0.257×（今日 62×72 / 280）、格内字号 0.143×（40/280）。
     长词放不下整行时仍由 flex 自己缩（min-width:24px 那条不动）。 */
  width:calc(var(--scaffold) * 0.221);height:calc(var(--scaffold) * 0.257);
  flex:0 1 auto;min-width:24px;
  border:4px dashed #cbd5e1;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  font-size:calc(var(--scaffold) * 0.143);font-weight:900;color:#334155;
  background:#f8fafc;transition:all 0.12s;
  position:relative;
}
/* 空格框 */
/* 词与词之间的空隙：句子不需要孩子打空格，所以这里不是格子，只是一段留白 */
.word-gap{width:calc(var(--scaffold) * 0.093);flex:0 0 auto}   /* 第 90 轮①：词间空 0.093×（今日 26/280） */
/* 第 182 轮（换代第 79 轮那套"看得见空格"的外观）：空格格的三态——待按、被吃、亮错——
   一律压回词间分隔本来的样子：不加宽、不辉光、不画 ␣、不描边、不 wiggle。
   理由不在审美，在她那双眼：会发光脉动的留白＝「该按这里」，照提示按键就把字母打进留白，
   判错 → 重试 → 叠字（云错题账 hisbbig bag / THEBBASIN）。空格仍由前一个字母自动补、
   她仍从不按空格，所以这一格根本没有「该按」这回事。
   waiting / wrong / wrong-char 三枚类名照旧挂（79 轮「提示、指针、账三者同源」那两条判据
   判的是类与指针同不同源，取消的只是外观），本行以下不再有任何一态有独立外观。 */
.word-gap.waiting,.word-gap.wrong,.word-gap.wrong-char{width:calc(var(--scaffold) * 0.093)}
/* 当前待打的框：发光吸引点击 */
.input-box.waiting{
  border-color:#6366f1;
  box-shadow:0 0 14px rgba(99,102,241,0.4);
  animation: waitGlow 1.2s ease-in-out infinite;
}
.input-box.waiting::after{
  content:"👆";
  position:absolute;
  left:50%;
  bottom:-30px;
  transform:translateX(-50%);
  font-size:18px;
  line-height:1;
  pointer-events:none;
  z-index:2;
  animation:fingerBounce 1s ease-in-out infinite;
}
@keyframes fingerBounce{
  0%,100%{transform:translate(-50%,0)}
  50%{transform:translate(-50%,-4px)}
}
@keyframes waitGlow {
  0%,100%{box-shadow:0 0 8px rgba(99,102,241,0.3)}
  50%{box-shadow:0 0 22px rgba(99,102,241,0.6)}
}
.input-box.filled{border-style:solid;animation:popIn 0.2s ease-out}
.input-box.filled.correct-char{border-color:#10b981;background:#ecfdf5;color:#10b981}
.input-box.filled.wrong-char{border-color:#fbbf24;background:#fefce8;color:#d97706;animation:wiggle 0.3s ease}
.input-box.wrong{border-color:#fde68a;background:#fffbeb;animation:wiggle 0.4s ease}
/* 答对一个小火花 */
.key-sparkle{
  position:absolute;pointer-events:none;
  font-size:16px;animation:keySpark 0.5s ease-out forwards;
}
@keyframes keySpark{
  0%{opacity:1;transform:translate(0,0) scale(0.5)}
  100%{opacity:0;transform:translate(var(--sx),var(--sy)) scale(1.5)}
}
@keyframes popIn{
  0%{transform:scale(0.5)}
  60%{transform:scale(1.25)}
  100%{transform:scale(1)}
}
@keyframes shake{
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-8px)}
  40%{transform:translateX(8px)}
  60%{transform:translateX(-5px)}
  80%{transform:translateX(3px)}
}
@keyframes wiggle{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-4px) rotate(-2deg)}
  75%{transform:translateX(4px) rotate(2deg)}
}

/* ── 提示 ── */
.hint{color:#94a3b8;font-size:16px;margin-top:4px;font-weight:700;min-height:22px}

/* ── 状态栏 ── */
/* 底行允许换行（第 87 轮为六枚工具键立的规矩，第 89 轮那六枚已整族退场，这条留着）：
   这一行现在只有 ★ 星数与她那排收集槽，槽里 17 格在窄屏本来就要折行——留着 wrap，
   顶破左右边的事就轮不到（第 27 轮那族「左右双边切」的病）。删它之前先量过再说。 */
/* 第 90 轮①：底行字 0.064×（今日 18/280）——这一行只管数量不管尺寸，尺寸跟着旋钮走。 */
.status-bar{display:flex;justify-content:center;gap:18px;row-gap:8px;margin-top:16px;font-size:calc(var(--scaffold) * 0.064);font-weight:800;flex-wrap:wrap}
.status-item{display:flex;align-items:center;gap:5px;background:white;padding:6px 16px;border-radius:32px;box-shadow:0 2px 8px rgba(0,0,0,0.05)}
.status-item .icon{font-size:22px}
.status-item .count{color:#334155}

/* ── 庆祝 & 结算 ── */
.confetti-container{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100}
.confetti-piece{position:absolute;font-size:40px;animation:confettiFall 1.8s ease-out forwards}
@keyframes confettiFall{
  0%{transform:translateY(-100px) rotate(0deg);opacity:1}
  100%{transform:translateY(105vh) rotate(720deg);opacity:0}
}

/* 🎆 抖音风格全屏闪白。EE1（第 49 轮）：峰值不透明度 1 → 0.5。
   原来的中心 rgba(255,255,255,.9) × opacity 1 在 210ms 处整屏刷白，
   正盖住"最后一格绿了"那一下确认（家长读作"没亮就弹框"）。
   家法：全屏白闪的有效中心不透明度（渐变首色标 α × 元素 opacity）峰值必须 <0.5——
   软提示不许做成硬门禁外观的姊妹条：庆祝不许盖住她刚刚挣来的那格绿。
   末题另有静止拍（state.js 的 CELE_HOLD），中间词的节奏不变。 */
.flash-overlay{
  position:fixed;inset:0;z-index:90;pointer-events:none;
  background:radial-gradient(circle,rgba(255,255,255,0.9) 0%,rgba(255,215,0,0.6) 40%,transparent 70%);
  animation:flashBoom 0.7s ease-out forwards;
  will-change:transform,opacity;
}
@keyframes flashBoom{
  0%{opacity:0;transform:scale(0.3)}
  30%{opacity:0.5;transform:scale(1)}
  100%{opacity:0;transform:scale(1.5)}
}

/* 🎆 中心炸裂圆环 — GPU加速版，用 scale 代替 width/height */
.burst-ring{
  position:fixed;z-index:95;pointer-events:none;
  top:50%;left:50%;width:200px;height:200px;margin-left:-100px;margin-top:-100px;
  border-radius:50%;
  border:6px solid rgba(251,191,36,0.8);
  animation:burstExpand 2.0s ease-out forwards;
  will-change:transform,opacity;
}
.burst-ring:nth-child(2){animation-delay:0.12s;border-color:rgba(236,72,153,0.7)}
.burst-ring:nth-child(3){animation-delay:0.24s;border-color:rgba(99,102,241,0.6)}
@keyframes burstExpand{
  0%{opacity:1;transform:scale(0.1)}
  100%{opacity:0;transform:scale(4)}
}

/* 🎆 中心大字 Praise */
.center-praise{
  position:fixed;z-index:110;pointer-events:none;
  top:50%;left:50%;
  font-size:64px;font-weight:900;
  animation:praisePop 2.6s ease-out forwards;
  text-shadow:0 0 30px rgba(251,191,36,0.8),0 0 60px rgba(236,72,153,0.5);
  white-space:nowrap;
  will-change:transform,opacity;
}
@keyframes praisePop{
  0%{opacity:0;transform:translate(-50%,-50%) scale(0.2) rotate(-15deg)}
  18%{opacity:1;transform:translate(-50%,-50%) scale(1.3) rotate(5deg)}
  30%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0deg)}
  70%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0deg)}
  100%{opacity:0;transform:translate(-50%,-50%) scale(0.8) translateY(-40px)}
}

/* 🎆 屏幕震动 */
.screen-shake{
  animation:screenShake 0.5s ease-out;
}
@keyframes screenShake{
  0%,100%{transform:translate(0)}
  10%{transform:translate(-6px,3px)}
  20%{transform:translate(5px,-4px)}
  30%{transform:translate(-4px,-2px)}
  40%{transform:translate(3px,5px)}
  50%{transform:translate(-2px,-3px)}
  60%{transform:translate(4px,2px)}
  70%{transform:translate(-3px,-1px)}
  80%{transform:translate(2px,1px)}
  90%{transform:translate(-1px,0)}
}

/* 🎆 粒子爆发（从中心向四周飞） */
.burst-particle{
  position:fixed;z-index:105;pointer-events:none;
  font-size:36px;
  animation:particleBurst 2.0s ease-out forwards;
  will-change:transform,opacity;
}
@keyframes particleBurst{
  0%{opacity:1;transform:translate(0,0) scale(0.3)}
  100%{opacity:0;transform:translate(var(--bx),var(--by)) scale(1.2)}
}
.finish-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.4);z-index:50;justify-content:center;align-items:center}
.finish-overlay.show{display:flex}
.finish-card{
  background:white;border-radius:40px;padding:40px 32px;
  text-align:center;max-width:460px;width:90%;
  box-shadow:0 24px 80px rgba(0,0,0,0.2);
  max-height:94vh;max-height:92dvh;  /* dvh 跟随手机/笔记本实际可视高度 */
  display:flex;flex-direction:column;overflow:hidden;  /* 卡片本身不滚动 */
}
.finish-body{
  flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;  /* 只有中间内容滚动，按钮永远露在外面 */
  -webkit-overflow-scrolling:touch;
}
.finish-body::-webkit-scrollbar{width:0}  /* 隐藏滚动条，界面更干净 */
.finish-card .trophy{font-size:80px}
.finish-card h2{font-size:34px;margin:10px 0;color:#1e3a5f}
.finish-card .score{font-size:22px;color:#64748b;margin:5px 0}
.finish-card .mistake-list{text-align:left;font-size:16px;color:#ef4444;margin:14px 0;max-height:160px;overflow-y:auto}
.finish-card .mistake-list li{margin:5px 0}
.finish-card .stats{font-size:15px;color:#94a3b8;margin:8px 0}
.btn{
  display:inline-block;margin:10px 6px 0;padding:14px 34px;
  font-size:22px;font-weight:800;border:none;border-radius:32px;
  cursor:pointer;transition:transform 0.15s,box-shadow 0.15s;
  font-family:inherit;
}
.btn-primary{
  background:linear-gradient(135deg,#6366f1,#8b5cf6);color:white;
  box-shadow:0 6px 20px rgba(99,102,241,0.4);
}
.btn-secondary{
  background:#f1f5f9;color:#475569;
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
}
.btn:hover{transform:scale(1.05)}
.btn:active{transform:scale(0.96)}
.btn-row{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:12px}

/* ── 星星动画 ── */
.status-item.star-item { background: linear-gradient(135deg,#fef3c7,#fef9c3); }
.status-item.star-item .count { color: #f59e0b; }
.status-item.progress-item { gap: 3px; flex-wrap: wrap; justify-content: center; }
.animal-slot {
  font-size: 22px;
  transition: transform 0.3s, opacity 0.3s;
  display: inline-block;
}
.animal-slot.earned {
  transform: scale(1.1);
  animation: animalPop 0.4s ease-out;
}
.animal-slot.pending {
  opacity: 0.3;
  filter: grayscale(0.8);
}
@keyframes animalPop {
  0%{transform:scale(0.3) rotate(-10deg)}
  60%{transform:scale(1.4) rotate(5deg)}
  100%{transform:scale(1.1) rotate(0)}
}
/* TTS 加载旋转 */
.speak-btn.loading{
  border-color:#cbd5e1;
  animation:spin 0.8s linear infinite;
  pointer-events:none;
  font-size:16px;
}
@keyframes spin{
  0%{transform:rotate(0deg)}
  100%{transform:rotate(360deg)}
}
.star-pop {
  position: fixed; pointer-events: none; z-index: 150;
  font-size: 50px;
  animation: starUp 1s ease-out forwards;
}
@keyframes starUp {
  0%{opacity:1;transform:translateY(0) scale(0.5)}
  40%{opacity:1;transform:translateY(-60px) scale(1.4)}
  100%{opacity:0;transform:translateY(-120px) scale(0.8)}
}
/* 集满5星的大星星 */
.big-star-pop {
  position: fixed; pointer-events: none; z-index: 160;
  font-size: 80px;
  animation: bigStarUp 1.5s ease-out forwards;
}
@keyframes bigStarUp {
  0%{opacity:1;transform:translateY(0) scale(0.2) rotate(0)}
  50%{opacity:1;transform:translateY(-80px) scale(1.5) rotate(180deg)}
  100%{opacity:0;transform:translateY(-180px) scale(0.5) rotate(360deg)}
}

/* 听读遮罩 */
.listen-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0; transition: opacity 0.3s;
}
.listen-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.listen-badge {
  background: rgba(255,255,255,0.9);
  border-radius: 24px;
  padding: 10px 24px;
  font-size: 22px;
  font-weight: 800;
  color: #6366f1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  animation: bounce 1s ease-in-out infinite;
}

/* ── 响应式 ── */
@media (min-width:1200px){
  /* 第 90 轮①：这条 max-width:900px 是本轮挖出来的**第四枚硬帽**——前三枚（CSS 的 820、
     hands.js 的 IMG_SIDE=280、栏宽帽子 COLW_PIN=195）写在工单上，这条藏在「响应式」那一节里，
     1707×794 那档实际把卡片按在 900（= 视口 52.7%），家长看见的「有效区域不大」有一半是它。
     删成算式：卡片宽 = 2.93 × 图边长，由 .game-container 那一处统一给（旋钮仍只有一枚）。 */
  .image-fallback{font-size:160px}
}
/* 小平板 */
@media (max-width:820px){
  .game-container{max-width:95vw}
  .image-fallback{font-size:clamp(80px,14vw,140px)}
  .text-display{font-size:clamp(36px,6vw,52px);letter-spacing:clamp(4px,0.8vw,8px)}
  .input-box{width:clamp(40px,7vw,62px);height:clamp(48px,8vw,72px);font-size:clamp(26px,4vw,40px);border-radius:clamp(10px,1.5vw,16px)}
  .word-gap{width:clamp(14px,2.6vw,26px)}
  .status-bar{gap:8px;font-size:clamp(14px,2.4vw,19px)}
  .status-item{padding:clamp(4px,0.8vw,10px) clamp(8px,1.5vw,18px)}
  .status-item .icon{font-size:clamp(20px,3vw,26px)}
  /* 窄屏：右上角那六只管理键变小、位置变紧（两只回看键另有 --peeksize 跟着视口走） */
  .speak-btn{width:clamp(48px,8vw,64px);height:clamp(48px,8vw,64px);font-size:clamp(24px,4vw,32px)}
  .pronounce-display{font-size:clamp(16px,2.5vw,22px)}
  .hint{font-size:clamp(16px,2.2vw,20px)}
}
/* 手机竖屏 */
@media (max-width:480px){
  body{padding:4px 0}
  .game-container{padding:12px 8px 10px;border-radius:24px}
  .image-fallback{font-size:80px}
  .text-display{font-size:32px;letter-spacing:4px}
  .input-box{width:34px;height:44px;font-size:24px;border-radius:10px;border-width:3px;min-width:20px}
  .word-gap{width:16px}
  .input-boxes{gap:4px}
  .status-bar{gap:5px;font-size:13px}
  .status-item{padding:4px 8px}
  .status-item .icon{font-size:18px}
  .speak-btn{width:48px;height:48px;font-size:24px}
  .pronounce-display{font-size:15px}
  .hint{font-size:15px}
  .bg-float{display:none}
  .finish-card{padding:28px 16px}
  .finish-card h2{font-size:24px}
  .btn{font-size:18px;padding:10px 24px}
}
/* 矮屏幕（笔记本小窗口等）：结算弹窗压缩，按钮不用滚动就能看到 */
@media (max-height:820px){
  .finish-card{padding:24px 20px;border-radius:32px}
  .finish-card .trophy{font-size:52px}
  .finish-card h2{font-size:24px;margin:6px 0}
  .finish-card .score{font-size:17px;margin:4px 0}
  .finish-card .stats{font-size:13px}
  .finish-card .mistake-list{max-height:96px;font-size:14px}
  .finish-card .btn{font-size:18px;padding:10px 22px}
}
/* 手机横屏（矮） */
@media (max-height:500px) and (orientation:landscape){
  body{align-items:flex-start;padding-top:4px}
  .game-container{padding:8px 24px 10px;border-radius:24px}
  /* 这里以前是把图片框写死成 158px —— 一个写死的盒子会盖掉 --imgsz 这个唯一的旋钮，
     展开手型层时 JS 怎么算都缩不动它，实测 480 / 460 高的窗口就顶破屏幕。改成只给旋钮取值。 */
  /* 第 81 轮：原来写死 150px。横排（镜像两栏，见 data-hands-mirror）由 hands.js 现量给数，
     这里只兜底，且带上下限——图是正文，兜底兜成头像就是本轮要治的病。 */
  /* 第 90 轮②：280 从上限降为下限，上限换成设计上限 460（与 hands.js 的 IMG_DESIGN_MAX 同一枚数）。
     这三处 body 级兜底只在 hands.js 那枚 inline 旋钮还没写上来的一瞬占位，真按窗口分配的是 fitLayer；
     写在这里只为「兜底也不许把图兜成头像」。 */
  /* 第 127 轮乙：外面这层 var(--imgsz-seed, 原式) 是首帧种子的挂点，种子没有时逐字等于原式。 */
  body{--imgsz:var(--imgsz-seed, clamp(280px, calc(100vh - 250px), 460px))}
  .text-display{font-size:28px;margin:4px 0}
  .pronounce-display{font-size:14px;margin:0}
  .input-box{width:30px;height:38px;font-size:22px;border-radius:8px;border-width:3px}
  .input-boxes{gap:3px}
  .speak-btn{width:36px;height:36px;font-size:18px}
  .status-bar{margin-top:8px;gap:4px;font-size:12px}
  .status-item{padding:3px 6px}
  .status-item .icon{font-size:14px}
  .hint{font-size:13px;min-height:18px}
  .bg-float{display:none}
}
/* 窄屏超长词缩小字号（仅在实际溢出时由 JS 加类），保持单行不跳动 */
.text-display.long-word{font-size:clamp(22px,3.5vw,32px);letter-spacing:2px}

/* ── 里程碑证书（结算面板，只展示新解锁的）── */
.cert-card{display:flex;align-items:center;gap:14px;margin:14px auto 0;max-width:420px;
  background:linear-gradient(135deg,#fffbeb,#fef3c7);
  border:3px solid #f59e0b;border-radius:20px;padding:14px 20px;
  box-shadow:0 6px 18px rgba(245,158,11,.25);
  animation:certPop .5s cubic-bezier(.34,1.56,.64,1) both;}
.cert-card+.cert-card{margin-top:10px}
.cert-medal{font-size:44px;flex-shrink:0}
.cert-body{display:flex;flex-direction:column;gap:2px}
.cert-title{font-size:24px;font-weight:800;color:#92400e}
.cert-date{font-size:16px;color:#b45309;font-weight:700}
.cert-tip{font-size:14px;color:#d97706;font-weight:600}
@keyframes certPop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}


/* ══ 指法手型（static/js/hands.js 注入）══
   家长说孩子已经认键很熟，键盘条撤掉，两只手接管这一条：居中、放大、独占整行。
   约束没变：只在这一层展开时占位，占的高度由图片按视口高度让出来，卡片总高不许涨。 */
/* 展开手型层时，图片是这一页唯一该伸缩的东西。
   以前用一档一档的 @media 收图片，实测每档交界处都会漏：580 高、560 高、440 高的窗口
   正好掉在两档之间，卡片就顶破屏幕。这里改成一条连续算式 —— 视口减掉"其余各行占的净高度"
   （458px 是量出来的），剩下的全给图片，上下再各封一道边界。窗口多高都不会踩到缝里。 */
/* 展开态的 --imgsz / --hsz 由 hands.js 量出来直接写到 #gameContainer 上；
   这里只兜个底：JS 还没跑起来时先按保守值占位，别一上来就把卡片顶破。
   第 81 轮：这个兜底以前是写死的 150px——正好是家长说的「qq 头像」那一档。改成带下限的
   clamp：旋钮仍只有一枚（--imgsz），但下限 200 写死在算式里，谁都不许再把它兜成头像。 */
/* 第 127 轮乙：var(--imgsz-seed, 原式)——种子没有时逐字等于原式。 */
body.hands-on{ --imgsz:var(--imgsz-seed, clamp(280px, calc(100vh - 458px), 460px)); --hsz:190px; }

/* 矮到 520 以下，连手型图也放不下：只留"该用哪根手指"那一行标注。
   指法信息一个字没少，但那一条不再占 70px 高度。 */
@media (max-height: 620px){ body.hands-on .text-display{font-size:40px;letter-spacing:5px}
  body.hands-on .pronounce-display{font-size:15px; margin-bottom:3px} }
@media (max-height: 520px){ body.hands-on .text-display{font-size:34px;letter-spacing:3px} }
@media (max-height: 470px){ body.hands-on .text-display{font-size:28px;letter-spacing:2px}
  body.hands-on .status-bar{margin-top:4px} body.hands-on .input-area{margin:4px 0 0} }


.hands-dock{
  display:none; margin:4px auto 0;
  pointer-events:none;            /* 提示板，不是控件：不抢焦点、不挡点击 */
  user-select:none;
}
.hands-dock.show{display:flex; justify-content:center}
/* ── 第 85 轮·镜像两栏（家长 2026-11-16：「现在奇奇怪怪的，也不对称——把手放在图里面，
   两个方向键往上调，两只手分别放到方向键下面，这样就对称了」）──
   第 84 轮那套「条搬到页面侧缘」整块撤销：横排态一律回到卡片内，卡片之外一个像素不许占。
   结构 = 三轨：左栏 / 配图 / 右栏（.hands-dock 覆盖卡片整格，中间那一轨整个空出来给图）。
   每栏自上而下三件：方向键 → 该侧那半只手（同一张 sprite 用 viewBox 各裁一半）→ 该侧指名。
   上一版让一张整 sprite 横跨两栏，截图当场露馅：.word-image 量出来 280、画面却被两只手埋了——
   量具说绿而眼睛看见的是小图，那就还是 81 轮那个病，故改回家长说的裁半（第 48 轮教训：量具说谎
   比红字更难查）。两栏等宽由 --colw 一枚定义保证，用例仍当场量（差 ≤1px）+ 两键同线。 */
#gameContainer[data-hands-mirror] .hands-dock{
  grid-area:1 / 1; justify-self:stretch; align-self:stretch; width:100%; height:100%; margin:0;
  z-index:3; display:grid; pointer-events:none}
#gameContainer[data-hands-mirror] .hpanel{display:contents}
#gameContainer[data-hands-mirror] .hands-grid{
  display:grid; grid-template-columns:var(--colw,180px) var(--imgsz,280px) var(--colw,180px);
  column-gap:var(--colgap,24px);      /* 第 86 轮②：栏与图之间必须留气（下限 16，hands.js 现给 24）*/
  justify-content:center; align-items:start; height:100%}
/* 栏顶让出工具条那一排（--coltop 由 hands.js 现量，两栏同一个值——家长②要的是同构同线）：
   原来 align-items:center 会把两栏垂直居中，右栏因此整枚压在 .corner-tools 底下，
   她看得见 → 按不到（第 85 轮 QA 退回）。改成从「工具条以下」起排，尺寸由 JS 按同一条式子算。 */
#gameContainer[data-hands-mirror] .hands-col{display:flex; flex-direction:column;
  align-items:center; gap:2px; min-width:0; margin-top:var(--coltop,0px)}
/* 显式落轨：中间那一轨是给配图的，两栏必须各自占第 1 与第 3 轨——交给自动排布会把右栏
   推进中间那一轨（实测右栏宽被顶成 280、两键差 112 px），"对称"就成了假话。 */
#gameContainer[data-hands-mirror] .hands-col[data-side="L"]{grid-column:1}
#gameContainer[data-hands-mirror] .hands-col[data-side="R"]{grid-column:3}
#gameContainer[data-hands-mirror] .hands-col .hkey{display:flex; justify-content:center; min-height:0}
#gameContainer[data-hands-mirror] .hands-col .fhands-slot{display:flex; justify-content:center;
  align-items:center; min-height:0}
/* --clip 由 hands.js 按同一枚 pad 算出：viewBox 那 12% 内余量是 V23 认手别要用的、不能缩，
   于是漏进来的邻手拇指尖只在画面上裁掉（QA 第 85 轮③放大实见那一小条深色三角）。 */
#gameContainer[data-hands-mirror] .hands-col .fhands{width:100%; height:auto; max-height:100%;
  clip-path:var(--clip,none)}
#gameContainer[data-hands-mirror] .hands-col .hlab{font-size:15px; font-weight:600; line-height:1.2;
  white-space:nowrap}
#gameContainer[data-hands-mirror] .hcap-stack{display:none}     /* 那一枚单指名列只服务竖排 */
/* 栏顶这两枚键：镜像态挂在自己栏的正中，PP1⑤ 那套"贴卡片边"的水平位置让给中间那一轨的图 */
#gameContainer[data-hands-mirror] .peek-side{justify-self:center; margin:0; pointer-events:auto}
/* 家长③：不亮的那只手不许消失——压成灰、指名照旧挂在栏底（灰化只在这儿，不写进 JS） */
/* 第 183 轮：同一套「还在，但没轮到你」的浓度收成一枚旋钮，两处共用（紧凑态那一半与
   非紧凑态那个不亮的姿态组）；值照 85 轮家长认过的 .62 原样搬，本单不发明第二个数。 */
:root{--hands-idle-op:.62}
.fhands g[data-on="1"].idle{filter:grayscale(1); opacity:var(--hands-idle-op,.62)}
/* 被点名那只的"一次轻脉冲"复用既有那一族（下面 .fhands g[data-pose][data-on="1"] 的 handIn），
   本轮不新增动效族。 */
/* 竖排（含收起指法）：第二栏不出现，第一栏回到"一横条全景 + 一行标注"的第 81 轮形状 */
#gameContainer:not([data-hands-mirror]) .hands-col[data-side="R"]{display:none}
#gameContainer:not([data-hands-mirror]) .hands-grid{display:block}
#gameContainer:not([data-hands-mirror]) .hands-col .hkey{display:none}
/* 竖排指法名只有那一行 .hcap-stack；栏底指名是镜像态专属，这里出现就是多占一行——
   coach 在 940×700 当场把整页顶破报给我了（第 85 轮实测）。 */
#gameContainer:not([data-hands-mirror]) .hands-col .hlab{display:none}
/* 第 183 轮 乙（家长 11-23 拍「两只手常在、闲置那半变淡」）：挤不动时不再抹掉另一半。
   家长③那句「不亮的那只手不许消失，压成灰、指名照旧挂在栏底」本来就是这一族的口径，
   此前只有紧凑态破例——她看见的是「右手」三个字配一个空位，于是每回都要重新猜一次手在哪。
   栏轨宽 --colw 由 hands.js 按几何算（两栏平分图外空气），与本条无关 ⇒ 画出来不花宽度。 */
#gameContainer[data-hands-compact][data-hands-mirror] .hands-col.idle .fhands-slot{
  opacity:var(--hands-idle-op,.62); filter:grayscale(1)}
/* 窄到半只手不足 120px：家长⑤允许的那条退路（hands.js 现量后写 data-hands-half 与该档实测 px，
   用例必须在备注里点名是哪一档）。183 不动这一档——家长⑤明写的是「只画当下这一只」，
   真要连这一档也常在，得连 120 那枚地板一起重谈；牙 t_hands_both_halves_always_painted 的丁腿钉住这里。 */
#gameContainer[data-hands-half][data-hands-mirror] .hands-col.idle .fhands-slot{display:none}
/* 地皮册（第 81 轮立的那本；展开与收起两态共用，否则收起那一档顶破 46px）。
   第 90 轮①：这本册子原本记的四笔是**尺寸**账（听一听键 64→48、字面 52→36、输入格 62×72→28×32、
   读音行 →13），目的是给 280 那张图腾出纵向。三笔尺寸账本轮整族删除——它们就是家长第三次点名时
   看见的那件事：镜像两栏一开，页面上最大的一行字反倒被压回 36px、输入格瘦成 28×32（比一个手机
   图标还小）。「整体大一些」要的不是把图再放大一点，是这一族尺寸别再各自偷偷缩。
   尺寸统一从 --imgsz 派生（一处算、处处跟），这本册子从此只记**空气**：空气可以给，尺寸不让。
   读音行那一笔（.pronounce-display 13px）留着：它不在本轮那九件里、也不在达标线上，
   而它是矮屏上唯一还在替整页腾地方的那一笔——留着它，1366×640 这一档才不必把图缩回 280 以下。
   ── 第 127 轮甲（家长 2026-11-20：刷新后有效区域先小后撑，「一下子」那一跳的其中一条腿）──
   这本册子从前只挂在 [data-hands-band] 属性上，而属性要等 hands.js 的 fitLayer 打上——fitLayer
   挂在 window 的 load，load 要等全页配图到齐，首屏因此晚一秒上下「没收空气」。hands.js:204 那行
   注释自己写着「该记号只由视口形状决定、与测量结果无关」：既然是，就不该等 JS，媒体查询等价生效。
   谓词逐字翻自 hands.js 的 band 一行：横屏 且 高 ≤ SIDE_SHORT 且 宽 ≥ SIDE_WIDE。
   两枚常量的唯一真相在 static/js/hands.js（SIDE_SHORT = 900、SIDE_WIDE = 1000），下面这两个数
   是它的逐字镜像、不是第三份抄本——对账牙见 test_layout.t_r127_band_mirror_and_seed_contract，
   两边数值不一致当场红。data-hands-band 属性照旧由 hands.js 写（用例的「态」一栏仍读它），
   只是这一族的样式从此不再依赖它。 */
@media (orientation: landscape) and (max-height: 900px) and (min-width: 1000px) {
#gameContainer{padding-bottom:8px;padding-top:4px;padding-left:20px;padding-right:20px}
#gameContainer .image-card{padding:2px 0}
#gameContainer .input-area{margin:2px 0 0}
#gameContainer .status-bar{margin-top:4px}
/* 第 90 轮①补：镜像那一档的纵向从**空气**里出，不再从尺寸里出。
   字面 62px 的行高按默认（≈1.4）要吃掉 87，收成 1.06 只省 21px 行内空气、一个像素的字号都没动；
   读音行同理收成 1.1。这两笔换回来的纵向正好还给图。 */
#gameContainer .text-display{margin:2px 0;line-height:1.06}
#gameContainer .pronounce-display{line-height:1.1;font-size:13px;margin:0}
}
/* ── 第 310 轮（甲）：跨 900 的过渡带镜像块（家长 2026-11-25「一下子变大」第二病灶）──────
   上面那块空气册的谓词是「高 ≤ 900」，900 以上一整段（现量 910~1045 平台）卡片缩回 726，
   900±15px 内 726↔1199 来回蹦（cliff310 改前全扫：两列最大相邻差 464）。派单禁搬 SIDE_SHORT
   那枚悬崖（±20 不批），正解是给悬崖铺过渡：(900, 900+R_TRANS_H] 这一带仍走 band 身份
   ——本块就是上面空气册的逐字镜像，唯一差别是左右 padding 从 20px 沿**全带**线性爬回 44px
   （901 起坡、斜率 1/7.5≈0.133/px、出口恰到位；出口＝SIDE_SHORT+R_TRANS_H＝1080——313 打回
   改的就是这一处：带尾 60px 陡坡在窄带上会把相邻步顶破 40，且出口压在家长最常用那档之外，
   :5000 进程缓存旧代模板时种子与活页当场分家，见 handback-310 §7）。与 JS 预算 fade
   （hands.js estTransBlend）同带同宽。
   谓词多夹一条 min-height:901px：R127 甲那条正则（landscape) and (max-height)…and (min-width)
   逐字形状因此不落在本块上，两条契约各认各家；SIDE_SHORT/SIDE_WIDE/R_TRANS_H 三枚常量的
   唯一真相仍在 hands.js，本查询三枚数是镜像——对账牙 t_r310_no_cliff_across_side_short
   （与 R127 甲同族：数值不镜像当场红）。本块不认 data-hands-band、不吃 --imgsz-seed。 */
@media (orientation: landscape) and (min-height: 901px) and (max-height: 1080px) and (min-width: 1000px) {
#gameContainer{padding-bottom:8px;padding-top:4px;padding-left:calc(20px + (100vh - 901px) / 7.5);padding-right:calc(20px + (100vh - 901px) / 7.5)}
#gameContainer .image-card{padding:2px 0}
#gameContainer .input-area{margin:2px 0 0}
#gameContainer .status-bar{margin-top:4px}
#gameContainer .text-display{margin:2px 0;line-height:1.06}
#gameContainer .pronounce-display{line-height:1.1;font-size:13px;margin:0}
}
/* 手型的宽高比第 85 轮起只在 hands.js 一处说（--har = 这一份当下画的是整张还是半张）：
   这里原有两条 aspect-ratio:calc(var(--har)/2)（半只手退路、紧凑单手版各一条），删掉——
   旧版 JS 只写全景比例、由 CSS 补那一半，本轮 JS 自己按裁法算，两条链叠在一起就是二次折半
   （0.627 的瘦长框：手被压小还白吃纵向空间）。比例两处各说一半，是本轮最该堵的口径洞。 */
/* 矮到连两只手都放不下：只留标注那一行字（指法信息一个字没少） */
#gameContainer[data-hands-small] .fhands{display:none}
.hpanel{text-align:center}
/* 高不再硬编比例：--har 由 hands.js 从资产（hands-data.js）带进来，换图不用改这里。
   手型是上游矢量 sprite（MIT，见 static/img/VKEYBOARDHAND-LICENSE.txt）：裁出来时
   把它自带的 <style> 剥掉了，颜色一律在这份 CSS 里说了算，权重靠 .fhands 前缀压住。 */
.fhands{width:var(--hsz,200px); height:auto; aspect-ratio:var(--har,1.73);
        display:block; margin:0 auto; transition:transform .18s ease}
/* 显示哪一组由 hands.js 写 data-on 决定；这里只负责"没点名的真藏起来" */
.fhands g[data-pose], .fhands g[data-neutral]{display:none}
.fhands g[data-on="1"]{display:inline}
.fhands .st1{fill:#e9eef5}                                   /* 手掌 */
/* 第 14.5 轮（家长："两只手颜色明显没统一"）：撤掉"干活那只手稍提亮"——
   掌、闲置指、静止手全部同一支 #e9eef5；两只手怎么区分？谁头上亮着手指谁就是。 */
.fhands .st2{fill:none; stroke:#8ea0b4; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round}
.fhands .st3{opacity:.7}                                     /* 指甲 */
.fhands .st4{fill:#e9eef5}                                   /* 闲置手指与手掌同色（第 14 轮：不用灰色，整只手就一个底色） */
.fhands .st5{fill:none; stroke:var(--ac,#475569); stroke-width:4; stroke-linecap:round}
/* 该出手那根：描边转成它自己的指法色 + 往里填一层同色。只给它上色，
   其余九根一概不加描边不加高光 —— 上一版给每根都描了淡边，家长一句"丑"：细线把手盖住了 */
/* 第 11 轮填到 .62、描边加到 6：手型改伸直分指后，家长要的是一眼看清"亮的是哪根"，
   半透明在这反而发灰。用例只卡 fo > 0.25（V23），这里留足余量。 */
.fhands g[data-on="1"] .st5{fill:var(--ac,#475569); fill-opacity:.62; stroke-width:6; stroke-linejoin:round}
/* （这里原来是"干活的手稍提亮"的两条规则，第 14.5 轮撤除——一只手一种色，
   两只手同一种色，颜色只留给亮指。） */
/* 姿态之间换的是"亮哪根"，图形本身不连续，插值不了 —— 用一次淡入把缝补上 */
.fhands g[data-pose][data-on="1"]{animation:handIn .2s ease both}
@keyframes handIn{from{opacity:.3}to{opacity:1}}
.hcap{font-size:clamp(12px, calc(var(--hsz,170px)*0.068), 17px); font-weight:900;
        letter-spacing:2px; line-height:1.25}
/* 键帽撤了，按键回话搬到手上：按对=整对手上顶一下，按错=抖一下 */
.hpanel.ok .fhands{transform:translateY(-5px)}
.hpanel.no .fhands{animation:fhShake .34s ease}
@keyframes fhShake{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-4px) rotate(-1.5deg)}
  75%{transform:translateX(4px) rotate(1.5deg)}
}
@media (prefers-reduced-motion: reduce){
  .hpanel.ok .fhands{transform:none}
  .hpanel.no .fhands{animation:none}
  .fhands g[data-pose][data-on="1"]{animation:none}
  /* 第 105 轮④：配图那一族的三枚一起关。这台设备要的是少动，我们却还在她眼前抖——
     新增的 idle 呼吸是无限循环，落在块外就是「越省电的设备越晃」，正着违背那条偏好；
     happy-dance / gentle-nudge 以前是漏在块外的既有缺口（第 104 轮只读准备现读），本轮一并补。 */
  .word-image.idle-breath{animation:none}
  .word-image.happy-dance{animation:none}
  .word-image.gentle-nudge{animation:none}
}

/* ── 打字页的视口高度自适应 ──
   原来只有结算卡片做了这一层，页面本体没有：1366x640 这种笔记本（浏览器工具栏吃掉一截后
   常见的高度）实测卡片本体就顶破屏幕 67px。先收图片保住整页，再谈别的。
   注：body.hands-on 的选择权级更高，键盘展开时以下面的分档为准。 */
@media (max-height: 700px){
  /* 第 81 轮：这里原来是写死的 172px / 138px 两枚数——正是家长说的「qq 头像」那一族。
     现在只留一条带下限的算式（下限 200 由本轮立死），真按窗口分配的是 hands.js 的 fitLayer，
     这里只是它没跑起来之前的兜底，兜底也不许跌破下限。 */
  /* 第 127 轮乙：var(--imgsz-seed, 原式)——种子没有时逐字等于原式。 */
  body{ --imgsz:var(--imgsz-seed, clamp(280px, calc(100vh - 470px), 460px)) }
  /* 第 90 轮③：这一行原来把字面写死成 44px（字距 6）——矮一档就把「字母」悄悄压回 44，
     正是家长那句「不管是字母还是输入区域」要治的病，也是量表量出 36/44 那一族读数的来源。
     尺寸归给旋钮（.text-display 那一处统一派生），这里只留空气那一笔。 */
  .text-display{margin:4px 0 2px}
  .input-area{margin:6px 0 0}
}
@media (max-height: 620px){
  .text-display{font-size:38px;letter-spacing:4px}
  .pronounce-display{font-size:15px}
}

/* 温柔收场外观家法（第 44 轮 Y1②）：软提示不许做成硬门禁外观。
   旧版这里是一坨灰蓝渐变——按钮其实可点，但四岁孩子读界面靠颜色不读文案，灰=「不许点」。
   她愿意当天多练正是最想被奖励的行为，外观上不许惩罚它。
   .mellow 类保留为测试与间距钩子：本块只许出现非配色属性（margin/padding/letter-spacing 一类），
   禁 background / gradient / filter / saturate / opacity / box-shadow / color——
   test_static.t_mellow_soft_prompt_not_hard_gate 盯着这个块。 */
.btn.mellow{letter-spacing:.02em}
