/* ============================================================
 * CalcElf v5.6.5  UI 强化（加载动画 / 动画面板 / 圆润字体 / 间距）
 * 在 components.css、ui-type-scale.css 之后最后加载。
 * ============================================================ */
:root{
  /* ★★★ 第 2 步：字体家族收敛（14 种写法 → 2 套）
     原来这里是【第二套】字体栈 ✗ 与 themes.css 的 --font-display / --font-body
     打架：同一个页面里标题可能来自 3 套不同字体栈 ✓
     ⇒ 现在只做【别名】✗ 不再自成一套 ✓ 于是本文件里 19 处
       font-family:var(--calf-round-font) / 6 处 var(--calf-body-font)
       【一处都不用改】✗ 全站自动收敛到两个令牌 ✓
     ★ 被删掉的字体名（"Baloo 2" · "M PLUS Rounded 1c" · "ZCOOL KuaiLe" ·
       "Yuanti SC" · "YouYuan" · "Nunito"）本机【全都没有安装】✗ 也从未自托管 ✓
       ⇒ 实测（canvas 宽度对比法 + CSS.getPlatformFontsForNode）确认：删掉零损失 ✓
     ★ 兜底栈写在 design-tokens.css 里 ✗ 即使本页没引 themes.css 也不会退化成系统默认 ✓ */
  --calf-round-font:var(--ce-font-display);
  --calf-body-font:var(--ce-font-body);
}

/* ---------- 自绘 SVG 图标 ---------- */
.ic{width:1.05em;height:1.05em;vertical-align:-.16em;flex:0 0 auto;display:inline-block}
.card .head h2{display:flex;align-items:center;gap:9px}
.ticon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:10px;
  background:linear-gradient(135deg,rgba(37,99,235,.12),rgba(124,58,237,.12));color:var(--primary,#2563eb);font-size:18px}
.ticon .ic{width:19px;height:19px}
#solveBtn .ic{width:1.15em;height:1.15em;vertical-align:-.2em;margin-right:4px}

/* ---------- Start solving 加大 15% ---------- */
#solveBtn{font-size:18.4px!important;font-weight:var(--ce-fw-head)!important;min-height:52px;border-radius:16px!important;
  font-family:var(--calf-round-font)!important;letter-spacing:.2px}
@media (max-width:640px){#solveBtn{font-size:16px!important;min-height:48px}}

/* ---------- “正在分析”与 Start solving 拉开间距、整体下移 ---------- */
section.card.loading#loading{margin-top:20px}
/* ★★ 用户要求：“Analyzing 那行字往下移一点，让它跟上面 Start solving 的中间间隔是现在的 3 倍”✓
   ── 只乘【这一行字自己的】margin-top ✗✗ 不乘上一条 #loading 的 margin-top(20) ✗
      也不乘 .loading 的 padding-top(28) ✓ 那两条是【整张卡 / 小精灵插画】的位置 ✗
      一起乘会把插画也推下去 ✗ 用户说的是“这行字”不是“整张卡” ✓
   ── 原值来源：20px 就是下面这一条给的 ✓（实测 computed = 20px ✓
      它盖掉 components.css 的 14px ✓ 那条是永不到达的死值 ✓）
      ⇒ 20px × 3 = 60px ✓ 绝对值确定 ✓ 不依赖任何行盒余量 ✓
   ── 不套间距 token：--ce-s-1..4 = 8/14/22/32 ✓ 最近的 32px 只有 1.6 倍 ✗ 不是 3 倍 ✓
   ── ★ 字体【故意不写】✗：本想改用 var(--calf-round-font) 让 'Fredoka' 排第一位 ✓
      但实测两者解析成【同一串】（--calf-round-font → --ce-font-display → --font-display ✓
      与 --display 逐项相同 ✓）⇒ 改了等于没改 ✗ 见 components.css 里的实测结论 ✓ */
#loadingText{margin-top:60px;font-size:17px}

/* ---------- 状态行（「Done」/ 报错）—— 往下移、白底跟着拉、换圆体 ---------- */
/* ★★ 用户要求（附截图 ✗ 红框标了目标位置）：
     「把这个 start solving 下面那个 Done 放到红框这个位置，
       同时红框这个底色白色也在往下拉，保持与这个字体的边缘有一点的空隙，
       然后这个字可以用更加 Q 一点的字体」
   ── 原状：#status 在【全部 CSS 里一条规则都没有】✗（实测 grep 整个 *.css 只有
      .ce-status-pill —— 那是积分卡的胶囊，不是这个 ✗）
      ⇒ 纯继承正文 ⇒ 紧贴按钮上方、字体是正文体 ✓
   ── 所以三件都要补：
      ① 往下移 ⇒ margin-top ✓（原为 0 ⇒ 紧贴）
      ② 白底跟着往下拉 ⇒ #status 是 .card 的【最后一个子元素】✓
         给它加 margin-top 会把卡撑高 ✓ 白底自然跟着往下 ✓
         （★ 不需要改 .card 的 padding ✗ 那会波及全部卡片 ✓）
      ③ 与字边缘留空隙 ⇒ .card 自带 padding:18px ✓ 对 :not(:empty) 再加到 30px ✓
         让空隙比"贴着"明显一点 ✓
   ── ★ 空状态【不能】也加 margin-top ✗：.status 是常驻 div ✗
      没有消息时它高度为 0 而 margin 照样生效 ⇒ 会凭空多出 26px 空白 ✓
      ⇒ 用 :empty / :not(:empty) 分开 ✓
   ── 字体：--calf-round-font → --ce-font-display → ui-rounded,'Fredoka',… ✓
      与 #solveBtn 那条同源 ✓ 也就是这个按钮已经在用的"Q 一点"的字 ✓
   ── ★ 本条写在 v565.css ✓ 它排在 components.css 之后 ⇒ 无需 !important ✓ */
#status{font-family:var(--calf-round-font)}
#status:empty{margin-top:0}
#status:not(:empty){margin-top:26px;font-size:15px}
section.card:has(> #status:not(:empty)){padding-bottom:30px}
.lddots{margin-top:2px}

/* ---------- 思考中：头顶三个鲜艳问号“转动” ---------- */
.thinker{width:140px;margin-top:2px}
.thinker-img{width:78px;height:78px;margin-top:10px}
.qrow{gap:30px;height:30px;margin-bottom:6px}
.qm{font-size:28px;line-height:1;opacity:0;animation:qmSpin 1.15s linear infinite}
.q1{color:#ff5d5d;animation-delay:0s}
.q2{color:#3b82f6;animation-delay:.18s}
.q3{color:#f59e0b;animation-delay:.36s}
@keyframes qmSpin{
  0%{opacity:0;transform:translateY(8px) scale(.5) rotate(0deg)}
  25%{opacity:1;transform:translateY(-2px) scale(1.15) rotate(120deg)}
  55%{opacity:1;transform:translateY(-9px) scale(1) rotate(220deg)}
  80%{opacity:.9;transform:translateY(-14px) scale(.92) rotate(320deg)}
  100%{opacity:0;transform:translateY(-18px) scale(.7) rotate(360deg)}
}
/* 三条骨架条：长短明显、上下呼吸、带颜色流动 */
.think-bars{width:min(280px,72%);gap:10px;margin-top:2px}
.tb{height:11px;border-radius:999px;background:linear-gradient(90deg,#c7d7ff,#9db9fb,#c7d7ff);
  background-size:200% 100%;animation:tbFlow 1.15s ease-in-out infinite}
.b1{width:64%}.b2{width:90%;animation-delay:.22s}.b3{width:46%;animation-delay:.44s}
@keyframes tbFlow{
  0%{transform:scaleX(.32);opacity:.5;background-position:0 0}
  50%{transform:scaleX(1);opacity:1;background-position:100% 0}
  100%{transform:scaleX(.32);opacity:.5;background-position:0 0}
}

/* ---------- 主内容区圆润字体 + 字号 ---------- */
#question,.question,.solution,.step,.chat .msg,#practiceArea,.grade-card,
#chatInput,textarea,input[type=text],input[type=email],input[type=password]{
  font-family:var(--calf-body-font)!important}
.solution b,.solution .num,.grade-head,.grade-answer{font-family:var(--calf-round-font)!important}
.solution{font-size:16px;line-height:1.85}
.step .num{font-size:16px}
#question,.question{font-size:16.5px;line-height:1.8}
.card .head h2{font-family:var(--calf-round-font)!important;font-weight:var(--ce-fw-head)}

/* Ask CalcElf 对话框拉长、字体圆润加大 */
.chat{height:340px}
.chat .msg{font-size:15.5px;line-height:1.75;border-radius:16px}
#chatInput{min-height:52px;font-size:15.5px;border-radius:14px}
#chat .actions{margin-top:14px;gap:10px}/* ★ 死规则 ✗【不要靠本条】✓：.actions 是 #chat 的【兄弟】✗ 不是后代（index.html:296 是 `</div><div class="actions" style="margin-top:8px">`）⇒ 本条【从不命中】✗ 这里的 margin-top:14px / gap:10px 【从未生效过】✓ 而 .actions 也没有 display:flex ⇒ gap 本来就无处可用 ✓ 输入框与 Send 之间的空隙改由【下一行】#sendChat{margin-top:var(--ce-s-1)} 提供（8px ✗ 与输入框【上方】邻居的 8px 逐值一致 ⇒ 上下对称）✓ ★ 本条【保留不删】✗：它无害 ✓ 且删了要动行号（UI-SPEC 记着 :16-17 / :29-31）✗ 只在此注明为什么不用它 ✓ */
#sendChat{min-height:48px;padding:0 26px;font-family:var(--calf-round-font)!important;font-weight:700;font-size:16px;border-radius:14px;margin-top:var(--ce-s-1)}

/* Send / 练习等级 与上方元素留白，比例更舒展 */
#practiceDesc{margin:10px 0 18px}
#practiceArea{margin-top:14px}
.card #practice1,.card #practice2,.card #practice3{margin:6px 6px 4px 0;min-height:46px;font-family:var(--calf-round-font)!important;font-weight:700;font-size:15px;border-radius:999px}
#practiceArea .btn#gradeBtn{min-height:48px;font-family:var(--calf-round-font)!important;font-weight:700;font-size:16px;border-radius:14px}
#practiceArea textarea{font-size:16px}

/* ---------- Visual animation 面板：展开为等高大框 ---------- */
#animCard .anim{min-height:0;width:100%}
#animBox.anim-busy{min-height:500px;display:flex;align-items:center;justify-content:center}
.anim-loading{width:100%;min-height:500px;border-radius:18px;
  background:linear-gradient(180deg,#f3f7ff,#eef4ff);
  border:1.5px dashed #bcd0ff;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:14px;padding:30px 20px;text-align:center}
.anim-ring-wrap{position:relative;width:96px;height:96px}
.anim-ring{position:absolute;inset:0;border-radius:50%;
  background:conic-gradient(#3b82f6 0 70%,#c7d7ff 70% 100%);
  -webkit-mask:radial-gradient(circle,transparent 56%,#000 58%);mask:radial-gradient(circle,transparent 56%,#000 58%);
  animation:ringSpin 1.1s linear infinite}
.ring-star{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#f59e0b;animation:ringPulse 1.6s ease-in-out infinite}
.ring-star .ic{width:34px;height:34px}
.ic-lock{width:.95em;height:.95em;vertical-align:-.12em}
.thinker-img,.anim-mascot{border-radius:20px;background:#fff;padding:3px;box-shadow:0 6px 18px rgba(37,99,235,.12)}
@keyframes ringSpin{to{transform:rotate(360deg)}}
@keyframes ringPulse{0%,100%{transform:scale(.82)}50%{transform:scale(1.22)}}
.anim-mascot{width:84px;height:84px;object-fit:contain;animation:thinkerBob 1.6s ease-in-out infinite}
.anim-msg{font-family:var(--calf-round-font);font-weight:var(--ce-fw-head);font-size:19px;color:#1e3a8a;line-height:1.4}
.anim-sub{font-family:var(--calf-body-font);color:#5b76b8;font-size:14.5px;max-width:380px;line-height:1.6}
.anim-dots{display:flex;gap:12px;margin-top:4px;height:16px;align-items:center}
.anim-dots i{width:12px;height:12px;border-radius:50%;background:#7aa0f7;animation:dotChase 1.15s linear infinite}
.anim-dots i:nth-child(2){animation-delay:.18s}
.anim-dots i:nth-child(3){animation-delay:.36s}
@keyframes dotChase{
 0%{transform:translateX(-24px) scale(.85);background:#60a5fa}
 33%{transform:translateX(0) scale(1);background:#a78bfa}
 66%{transform:translateX(12px) scale(1.05);background:#fbbf24}
 100%{transform:translateX(26px) scale(.85);background:#60a5fa}
}
/* 精灵施法场景 */
.anim-stage{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}
.awz{position:relative;width:204px;height:168px;margin:0 auto}
.awz-swirl{position:absolute;inset:0;width:100%;height:100%;animation:awzSpin 7s linear infinite}
.awz-cloud{position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:150px;filter:drop-shadow(0 8px 10px rgba(37,99,235,.12))}
.awz-mascot{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);width:92px;height:92px;object-fit:contain;border-radius:24px;background:#fff;padding:4px;box-shadow:0 10px 24px rgba(37,99,235,.18);animation:awzBob 2.6s ease-in-out infinite}
.awz-wand{position:absolute;right:2px;top:2px;width:66px;height:76px;transform-origin:32% 88%;animation:awzCast 1.7s ease-in-out infinite;filter:drop-shadow(0 5px 7px rgba(245,158,11,.4)}
.awz-g{transform-box:fill-box;transform-origin:center;animation:awzFloat 2.8s ease-in-out infinite}
.awz-g.g2{animation-delay:.5s}.awz-g.g3{animation-delay:1s}.awz-g.g4{animation-delay:1.5s}
@keyframes awzSpin{to{transform:rotate(360deg)}}
@keyframes awzBob{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-7px)}}
@keyframes awzCast{0%,100%{transform:rotate(-16deg)}50%{transform:rotate(14deg)}}
@keyframes awzFloat{0%,100%{transform:translateY(0);opacity:.75}50%{transform:translateY(-9px);opacity:1}}
@keyframes dotHop{0%,100%{transform:translateY(0);opacity:.55}50%{transform:translateY(-9px);opacity:1}}
.anim-retry{margin-top:6px}
iframe.calfAnimFrame{width:100%;border:0;border-radius:18px;background:#fff;display:block;min-height:620px;box-shadow:0 10px 30px rgba(37,99,235,.10)}
@media(max-width:640px){iframe.calfAnimFrame{min-height:420px}#animBox.anim-busy{min-height:420px}.anim-loading{min-height:420px}}
/* v5.10 练习第一关引导手指 */
.lvl-finger{animation:calfFingerPulse 1.2s ease-in-out infinite}
@keyframes calfFingerPulse{0%,100%{transform:translateY(0)}50%{transform:translateY(4px)}}
#animFs{font-family:var(--calf-round-font)!important;font-weight:700;display:inline-flex;align-items:center;gap:5px}
#animFs .ic{width:1em;height:1em}

/* ---------- 练习判题结果：圆润大字 + SVG 图标 ---------- */
.grade-card{border-radius:20px;padding:18px 18px 16px;font-family:var(--calf-body-font);font-size:16.5px;line-height:1.85}
.grade-head{font-size:20px;gap:9px}
.grade-head .ic{width:26px;height:26px}
.grade-card.ok .grade-head .ic{color:#16a34a}
.grade-card.bad .grade-head .ic{color:#f59e0b}
.grade-answer{display:flex;align-items:flex-start;gap:9px;font-size:16.5px;border-radius:14px;padding:12px 14px;line-height:1.7}
.grade-answer .ic{width:20px;height:20px;margin-top:3px;color:#2563eb}
.grade-steps-title{display:flex;align-items:center;gap:8px;font-family:var(--calf-round-font);font-weight:var(--ce-fw-head);margin:10px 0 4px;color:#1e3a8a}
.grade-steps-title .ic{width:20px;height:20px}
.grade-steps{padding-left:4px;list-style:none;margin:0}
.grade-steps li{position:relative;padding-left:30px;margin:8px 0;min-height:22px}
.grade-steps li::before{content:attr(data-n);position:absolute;left:0;top:1px;width:22px;height:22px;border-radius:50%;
  background:linear-gradient(135deg,#3b82f6,#7c3aed);color:#fff;font-family:var(--calf-round-font);font-weight:var(--ce-fw-head);
  font-size:13px;display:flex;align-items:center;justify-content:center}
.grade-stars{display:inline-flex;gap:4px;margin-left:6px}
.grade-stars .ic{width:26px;height:26px;color:#f59e0b;filter:drop-shadow(0 2px 3px rgba(245,158,11,.35));animation:starPop .45s ease backwards}
.grade-stars .ic:nth-child(2){animation-delay:.12s}.grade-stars .ic:nth-child(3){animation-delay:.24s}
@keyframes starPop{0%{transform:scale(0) rotate(-30deg);opacity:0}70%{transform:scale(1.25) rotate(8deg)}100%{transform:scale(1) rotate(0);opacity:1}}

/* 解题方法标题里的灯泡/推荐星图标 */
.solution .sol-head{display:flex;gap:9px;align-items:center}
.solution .sol-head .ic{width:21px;height:21px;color:#2563eb}
.sol-rec .ic{color:#f59e0b}

/* 邮箱确认弹窗 */
#verifyModal .modalbox{max-width:430px;text-align:center}
#verifyModal .vm-mail{width:64px;height:64px;color:#2563eb;margin:4px auto 6px}
#verifyModal .vm-mail .ic{width:64px;height:64px}
#verifyModal p{font-family:var(--calf-body-font);font-size:16px;line-height:1.7;color:#374151}
