/* ==================================================================
   彩虹糖果小乐园 —— 样式
   kid_fun.css

   面向 2-6 岁幼儿园。三条硬规则（来自需求）：
     1. 大 —— 所有可点击元素 ≥ 56px（比需求的 44px 更宽裕）
     2. 慢 —— 动画时长偏长、缓动柔和，不用「啪」地一下闪过去
     3. 亮 —— 粉/蓝/黄/绿/紫 彩虹糖果色，高饱和高亮度

   类名前缀约定：
     .kf-*   本模块全部样式

   复用 .kid-card / .kid-btn / .kid-empty（来自 kid.css），
   保证与「睡前故事」视觉同一体系 —— 同一分组下不该像两个 App。
   ================================================================== */

/* ---------- 糖果色变量 ---------- */
.kf-scope {
  --kf-pink:   #ff6fa5;
  --kf-blue:   #4aa8ff;
  --kf-yellow: #ffc93c;
  --kf-green:  #4fd18b;
  --kf-purple: #a97bff;
  --kf-orange: #ff9f43;

  --kf-pink-bg:   #ffe8f1;
  --kf-blue-bg:   #e5f2ff;
  --kf-yellow-bg: #fff6dd;
  --kf-green-bg:  #e3fbef;
  --kf-purple-bg: #f1e9ff;

  --kf-ink:  #3d3550;
  --kf-sub:  #8b83a0;
  --kf-radius: 22px;
  --kf-tap: 56px;          /* 最小点击尺寸 */
}

/* 整页背景：淡淡彩虹渐变，但极浅，不干扰内容 */
.kf-scope {
  background: linear-gradient(160deg,
    #fff5fa 0%, #f2f8ff 25%, #fffdf0 50%, #f1fdf6 75%, #f8f4ff 100%);
  border-radius: var(--kf-radius);
  padding: 4px 2px 28px;
}

/* ---------- 通用：大圆角糖果卡片 ---------- */
.kf-card {
  background: #fff;
  border-radius: var(--kf-radius);
  padding: 18px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .05), 0 10px 28px rgba(120, 100, 160, .10);
  border: 3px solid #fff;
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1),
              box-shadow .28s ease;
}
.kf-card:active { transform: scale(.985); }
.kf-card.is-pink   { border-color: var(--kf-pink); }
.kf-card.is-blue   { border-color: var(--kf-blue); }
.kf-card.is-yellow { border-color: var(--kf-yellow); }
.kf-card.is-green  { border-color: var(--kf-green); }
.kf-card.is-purple { border-color: var(--kf-purple); }

/* ---------- 通用：≥56px 大按钮 ---------- */
.kf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: var(--kf-tap); min-width: var(--kf-tap);
  padding: 12px 22px;
  border: none; border-radius: 999px; cursor: pointer;
  font-size: 19px; font-weight: 800; letter-spacing: .5px;
  color: #fff; background: var(--kf-blue);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .13);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1),
              box-shadow .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.kf-btn:hover { filter: brightness(1.06); }
.kf-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .13); }
.kf-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.kf-btn.pink   { background: var(--kf-pink); }
.kf-btn.blue   { background: var(--kf-blue); }
.kf-btn.yellow { background: var(--kf-yellow); color: #6b5300; }
.kf-btn.green  { background: var(--kf-green); }
.kf-btn.purple { background: var(--kf-purple); }
.kf-btn.orange { background: var(--kf-orange); }
.kf-btn.ghost  {
  background: #fff; color: var(--kf-ink);
  border: 3px solid #efe9f7; box-shadow: 0 4px 0 rgba(0, 0, 0, .06);
}
.kf-btn-lg { min-height: 68px; font-size: 23px; padding: 16px 32px; }

/* ---------- 顶部头图 ---------- */
.kf-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px; margin-bottom: 18px;
  border-radius: var(--kf-radius); color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
  position: relative; overflow: hidden;
}
.kf-hero::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, .17);
}
.kf-hero h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.kf-hero p  { margin: 0; font-size: 14px; opacity: .95; }
.kf-hero-ic { font-size: 46px; line-height: 1; flex: none; }
.kf-hero.pink   { background: linear-gradient(135deg, #ff8bb8, #ff6fa5); }
.kf-hero.blue   { background: linear-gradient(135deg, #6fbaff, #4aa8ff); }
.kf-hero.yellow { background: linear-gradient(135deg, #ffd968, #ffc93c); color: #7a5c00; }
.kf-hero.green  { background: linear-gradient(135deg, #6fe0a5, #4fd18b); }
.kf-hero.purple { background: linear-gradient(135deg, #bd96ff, #a97bff); }
.kf-hero.orange { background: linear-gradient(135deg, #ffb56b, #ff9f43); }

/* ---------- 星星条（右上角常驻） ---------- */
.kf-starbar {
  position: sticky; top: 8px; z-index: 20;
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; margin-bottom: 10px; pointer-events: none;
}
.kf-starpill {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 3px solid var(--kf-yellow);
  border-radius: 999px; padding: 6px 16px 6px 10px;
  font-size: 19px; font-weight: 800; color: #7a5c00;
  box-shadow: 0 4px 0 rgba(255, 201, 60, .35), 0 8px 20px rgba(255, 201, 60, .22);
}
.kf-star-ic { font-size: 24px; }
.kf-starpill.pump { animation: kf-pump .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes kf-pump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

/* ---------- 字母卡片网格 ---------- */
.kf-grid-abc {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.kf-abc {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 8px 12px; cursor: pointer;
  border-radius: 20px; border: none;
  background: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .07);
  transition: transform .26s cubic-bezier(.34, 1.56, .64, 1), box-shadow .26s;
  min-height: 108px;
}
.kf-abc:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .07); }
.kf-abc .L { font-size: 40px; font-weight: 900; line-height: 1; }
.kf-abc .w { font-size: 14px; font-weight: 700; color: var(--kf-ink); }
.kf-abc .c { font-size: 12px; color: var(--kf-sub); }
.kf-abc .e { font-size: 22px; line-height: 1; }
/* 字母卡按 A-Z 循环用五种糖果色底 */
.kf-abc.c0 { background: var(--kf-pink-bg);   color: var(--kf-pink); }
.kf-abc.c1 { background: var(--kf-blue-bg);   color: var(--kf-blue); }
.kf-abc.c2 { background: var(--kf-yellow-bg); color: #c99200; }
.kf-abc.c3 { background: var(--kf-green-bg);  color: var(--kf-green); }
.kf-abc.c4 { background: var(--kf-purple-bg); color: var(--kf-purple); }
.kf-abc .w, .kf-abc .c { color: var(--kf-ink); }
.kf-abc.speaking { animation: kf-pump .5s cubic-bezier(.34, 1.56, .64, 1); }

/* ---------- 配对游戏 ---------- */
.kf-pair-wrap { display: flex; gap: 18px; flex-wrap: wrap; }
.kf-pair-col { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; }
.kf-pair-item {
  min-height: var(--kf-tap);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px; border-radius: 18px; cursor: pointer;
  font-size: 30px; font-weight: 900;
  background: #fff; border: 4px solid #efe9f7;
  transition: all .24s cubic-bezier(.34, 1.56, .64, 1);
  -webkit-tap-highlight-color: transparent;
}
.kf-pair-item:active { transform: scale(.97); }
.kf-pair-item.sel   { border-color: var(--kf-blue); background: var(--kf-blue-bg); transform: scale(1.04); }
.kf-pair-item.done  { border-color: var(--kf-green); background: var(--kf-green-bg); opacity: .55; cursor: default; }
.kf-pair-item.wrong { animation: kf-shake .45s; border-color: var(--kf-pink); }
@keyframes kf-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* ---------- 数字泡泡 ---------- */
.kf-grid-num {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}
.kf-bubble {
  aspect-ratio: 1 / 1; border: none; cursor: pointer;
  border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .09), inset 0 -8px 16px rgba(255, 255, 255, .5);
  transition: transform .26s cubic-bezier(.34, 1.56, .64, 1);
  -webkit-tap-highlight-color: transparent;
}
.kf-bubble:active { transform: scale(.93); }
.kf-bubble .n { font-size: 34px; font-weight: 900; line-height: 1; }
.kf-bubble .e { font-size: 17px; line-height: 1; }
.kf-bubble.c0 { background: radial-gradient(circle at 30% 25%, #ffd0e3, var(--kf-pink)); color: #fff; }
.kf-bubble.c1 { background: radial-gradient(circle at 30% 25%, #cfe8ff, var(--kf-blue)); color: #fff; }
.kf-bubble.c2 { background: radial-gradient(circle at 30% 25%, #ffeeb8, var(--kf-yellow)); color: #7a5c00; }
.kf-bubble.c3 { background: radial-gradient(circle at 30% 25%, #c9f6dd, var(--kf-green)); color: #fff; }
.kf-bubble.c4 { background: radial-gradient(circle at 30% 25%, #e2d3ff, var(--kf-purple)); color: #fff; }
/* 答对：泡泡「爆炸」成星星 */
.kf-bubble.pop { animation: kf-pop .55s cubic-bezier(.34, 1.56, .64, 1) forwards; }
@keyframes kf-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.28); }
  100% { transform: scale(0); opacity: 0; }
}

/* ---------- 大选项按钮（所有选择题统一） ---------- */
.kf-opts { display: grid; gap: 14px; }
.kf-opts.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .kf-opts.cols-3 { grid-template-columns: 1fr; } }
.kf-opt {
  min-height: 76px; border: 4px solid #efe9f7; border-radius: 22px;
  background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 18px; font-size: 22px; font-weight: 800; color: var(--kf-ink);
  transition: all .24s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .06);
  -webkit-tap-highlight-color: transparent;
}
.kf-opt:hover { border-color: var(--kf-blue); }
.kf-opt:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.kf-opt.ok  { border-color: var(--kf-green); background: var(--kf-green-bg); color: #1c7a4a; }
.kf-opt.no  { border-color: var(--kf-pink);  background: var(--kf-pink-bg);  color: #b0325e; animation: kf-shake .45s; }
.kf-opt.hint { animation: kf-bounce .7s infinite; }
@keyframes kf-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.kf-opt .oe { font-size: 32px; line-height: 1; }

/* 题干 */
.kf-q {
  font-size: 26px; font-weight: 900; color: var(--kf-ink);
  text-align: center; margin: 6px 0 20px; line-height: 1.5;
}
.kf-seq {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; margin: 8px 0 22px;
}
.kf-seq span {
  font-size: 42px; line-height: 1;
  background: #fff; border-radius: 18px; padding: 10px 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .06);
}
.kf-seq .qm { color: var(--kf-pink); font-weight: 900; }

/* ---------- 逐句高亮正文（古诗 / 国学 / 故事共用） ---------- */
.kf-lines { display: grid; gap: 10px; margin: 8px 0 18px; }
.kf-line {
  min-height: var(--kf-tap); border-radius: 18px;
  padding: 14px 20px; cursor: pointer;
  font-size: 26px; font-weight: 700; color: var(--kf-ink);
  background: #fff; border: 3px solid #f1ecf8;
  line-height: 1.55;
  transition: all .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.kf-line:hover { border-color: var(--kf-blue); }
.kf-line.on {
  background: var(--kf-yellow-bg); border-color: var(--kf-yellow);
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(255, 201, 60, .3);
}
.kf-line.done { opacity: .62; }
.kf-py {
  display: block; font-size: 15px; color: var(--kf-sub);
  font-weight: 600; margin-top: 4px; letter-spacing: .3px;
}

/* ---------- 花园 / 回声墙：收集感 ---------- */
.kf-garden {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
}
.kf-flower {
  aspect-ratio: 1 / 1; border: none; cursor: pointer;
  border-radius: 20px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font-size: 28px; background: #f2f0f7; color: #b9b3c9;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
  -webkit-tap-highlight-color: transparent;
}
.kf-flower.bloom {
  background: linear-gradient(150deg, #fff0f7, #e9f6ff);
  color: var(--kf-pink);
  box-shadow: 0 5px 0 rgba(255, 111, 165, .2), 0 0 0 3px #fff inset;
}
.kf-flower.bloom:hover { transform: translateY(-4px) rotate(-6deg); }
.kf-flower .fn { font-size: 9.5px; font-weight: 700; color: var(--kf-sub); }

/* 回声墙：砖块网格 */
.kf-brickwall { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.kf-brick {
  min-height: 72px; border: none; cursor: pointer; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 6px; font-size: 20px;
  background: #eae6f2; color: #a49db5;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
  -webkit-tap-highlight-color: transparent;
}
.kf-brick.lit {
  color: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .1), 0 0 18px rgba(255, 201, 60, .45);
}
.kf-brick .bt { font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center; }
.kf-brick.lit.c0 { background: linear-gradient(140deg, #ff8bb8, var(--kf-pink)); }
.kf-brick.lit.c1 { background: linear-gradient(140deg, #6fbaff, var(--kf-blue)); }
.kf-brick.lit.c2 { background: linear-gradient(140deg, #ffd968, var(--kf-yellow)); color: #7a5c00; }
.kf-brick.lit.c3 { background: linear-gradient(140deg, #6fe0a5, var(--kf-green)); }
.kf-brick.lit.c4 { background: linear-gradient(140deg, #bd96ff, var(--kf-purple)); }

/* ---------- 成语小火车 ---------- */
.kf-train { display: flex; align-items: flex-end; gap: 6px; padding: 14px 4px; overflow-x: auto; }
.kf-car {
  flex: none; width: 74px; min-height: 74px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; background: #eeeaf5; color: #b3adc4;
  font-size: 12px; font-weight: 700; text-align: center; line-height: 1.15; padding: 6px;
  transition: all .4s cubic-bezier(.34, 1.56, .64, 1);
}
.kf-car.lit { color: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .1); animation: kf-carIn .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes kf-carIn {
  0% { transform: translateX(-14px) scale(.85); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
.kf-car .ce { font-size: 26px; line-height: 1; }
.kf-car.lit.pink   { background: linear-gradient(140deg, #ff8bb8, var(--kf-pink)); }
.kf-car.lit.blue   { background: linear-gradient(140deg, #6fbaff, var(--kf-blue)); }
.kf-car.lit.yellow { background: linear-gradient(140deg, #ffd968, var(--kf-yellow)); color: #7a5c00; }
.kf-loco { font-size: 44px; flex: none; transform: scaleX(-1); }
.kf-train.depart .kf-loco { animation: kf-locoGo 1.1s ease-in-out; }
@keyframes kf-locoGo {
  0% { transform: scaleX(-1) translateX(0); }
  100% { transform: scaleX(-1) translateX(24px); }
}

/* ---------- 盲盒 / 故事页 ---------- */
.kf-box {
  width: 190px; height: 190px; margin: 10px auto 22px; cursor: pointer;
  border-radius: 34px; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; font-size: 74px;
  background: linear-gradient(150deg, #ffe6d0, #ffd0e3);
  box-shadow: 0 10px 0 rgba(0, 0, 0, .08), 0 18px 40px rgba(255, 111, 165, .25);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
  -webkit-tap-highlight-color: transparent;
}
.kf-box:hover { transform: translateY(-6px) rotate(-3deg); }
.kf-box.shake { animation: kf-shake .5s .1s; }
.kf-story-pg {
  min-height: 150px; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 27px; font-weight: 800; line-height: 1.65;
  color: var(--kf-ink); padding: 22px 18px;
  background: #fff; border-radius: var(--kf-radius);
  border: 4px solid var(--kf-purple-bg);
}
.kf-pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px;
}
.kf-dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.kf-dot { width: 11px; height: 11px; border-radius: 50%; background: #ddd6e8; }
.kf-dot.on { background: var(--kf-purple); transform: scale(1.35); }

/* 月光模式：进入晚安盲盒时给整页加 .moon，界面变暗变柔 */
.kf-scope.moon {
  background: linear-gradient(165deg, #2b2545 0%, #3a3159 50%, #2e2a4d 100%);
}
.kf-scope.moon .kf-card,
.kf-scope.moon .kf-story-pg { background: #3d3760; border-color: #4d4675; color: #efeaff; }
.kf-scope.moon .kf-q,
.kf-scope.moon .kf-line { color: #efeaff; }
.kf-scope.moon .kf-line { background: #3d3760; border-color: #4d4675; }
.kf-scope.moon .kf-hero { filter: brightness(.82) saturate(1.1); }

/* ---------- 徽章墙 ---------- */
.kf-badges { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.kf-badge {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 16px 10px; border-radius: 20px; text-align: center;
  background: #f3f1f8; color: #b0a9c2;
  border: 4px solid transparent;
  transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
}
.kf-badge .bi { font-size: 40px; line-height: 1; filter: grayscale(1); opacity: .5; }
.kf-badge .bn { font-size: 13px; font-weight: 800; }
.kf-badge .bd { font-size: 10.5px; line-height: 1.3; opacity: .8; }
.kf-badge.got {
  background: linear-gradient(150deg, #fff7e0, #ffeef7);
  color: #7a5c00; border-color: var(--kf-yellow);
  box-shadow: 0 6px 0 rgba(255, 201, 60, .3), 0 12px 28px rgba(255, 201, 60, .22);
}
.kf-badge.got .bi { filter: none; opacity: 1; animation: kf-pump .6s; }

/* ---------- 关卡地图 ---------- */
.kf-map { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.kf-mapnode {
  border: none; cursor: pointer; border-radius: 24px; padding: 20px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .07);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
  -webkit-tap-highlight-color: transparent;
}
.kf-mapnode:hover { transform: translateY(-5px); }
.kf-mapnode .mi { font-size: 44px; line-height: 1; }
.kf-mapnode .mn { font-size: 17px; font-weight: 800; color: var(--kf-ink); }
.kf-mapnode .ms { font-size: 12px; color: var(--kf-sub); }
.kf-mapnode.cleared { box-shadow: 0 6px 0 rgba(255, 201, 60, .4), 0 0 0 4px var(--kf-yellow) inset; }
.kf-mapnode.locked { opacity: .5; }

/* ---------- 星星飞出动效 ---------- */
.kf-flystar {
  position: fixed; z-index: 9999; font-size: 40px; pointer-events: none;
  animation: kf-fly 1.05s cubic-bezier(.4, 0, .9, .4) forwards;
}
@keyframes kf-fly {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.5); opacity: 0; }
}

/* ---------- 通用小件 ---------- */
.kf-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kf-row.center { justify-content: center; }
.kf-tip {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 17px; border-radius: 16px; font-size: 14px;
  background: var(--kf-blue-bg); color: #2c5f8f; margin-bottom: 14px;
}
.kf-tip.ok  { background: var(--kf-green-bg); color: #1c7a4a; }
.kf-tip.warn{ background: var(--kf-yellow-bg); color: #866a00; }
.kf-progress {
  height: 16px; border-radius: 999px; background: #ece8f3; overflow: hidden;
  margin: 10px 0 16px;
}
.kf-progress > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--kf-pink), var(--kf-yellow), var(--kf-green));
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.kf-sec-title {
  font-size: 17px; font-weight: 800; color: var(--kf-ink);
  margin: 20px 0 12px; display: flex; align-items: center; gap: 8px;
}
.kf-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 52px 20px;
  color: var(--kf-sub); font-size: 15px;
}
.kf-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 5px solid #eee6f5; border-top-color: var(--kf-pink);
  animation: kf-spin .85s linear infinite;
}
@keyframes kf-spin { to { transform: rotate(360deg); } }
.kf-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 54px 20px; color: var(--kf-sub); font-size: 15px;
}
.kf-empty .ic { font-size: 54px; }

/* ---------- 侧边栏：可折叠二级分组「彩虹糖果小乐园」 ----------
   8 个功能默认收起，避免侧边栏被撑长。
   样式尽量与主系统 .nav-group-label 对齐，只补「小一号 + 箭头 + 缩进」。 */
.nav-group-label.is-sub {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
  font-size: 12.5px; opacity: .92;
}
.nav-group-label.is-sub .nav-fold-arrow {
  font-size: 11px; transition: transform .25s ease; opacity: .7;
}
.nav-group-label.is-sub.folded .nav-fold-arrow { transform: rotate(-90deg); }
.nav-sub {
  /* ★ 2026-10-07 修复「彩虹糖果小乐园点了没反应」：
     父容器 nav.nav 是 display:flex; flex-direction:column（style.css:137），
     本元素作为 flex 子项默认 flex-shrink:1，侧边栏空间不足时被压成 0 高。
     此时 max-height:420px 只是「上限」救不了它，展开/折叠两种状态高度
     都是 0，8 个子项永远不可见 —— 表现为点击无反应。
     flex:0 0 auto 让它按内容自然占高（实测 304px），折叠逻辑不受影响。 */
  flex: 0 0 auto;
  overflow: hidden;
  max-height: 420px;
  transition: max-height .32s cubic-bezier(.4, 0, .2, 1), opacity .25s ease;
  opacity: 1;
}
.nav-sub.folded { max-height: 0; opacity: 0; }
/* 二级项左侧缩进一点，视觉上从属于分组标题 */
.nav-sub .nav-item { padding-left: 26px; font-size: 13.5px; }

/* 说完了「大慢亮」，再补一句无障碍：
   孩子可能开着「减少动态效果」，此时把所有装饰性动画关掉。 */
@media (prefers-reduced-motion: reduce) {
  .kf-scope *, .kf-scope *::before, .kf-scope *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ==================================================================
   2026-10-07 合并改造新增样式
   - 晚安盲盒：📅 本月故事日历（.kf-tabs / .kf-mbar / .kf-sgrid）
   - 经典回声墙：📚 本月经典篇目（.kf-ggrid）
   设计原则同前：大、慢、亮、有反馈。
   ================================================================== */

/* ---------- 页签（盲盒/本月、今日/本月） ---------- */
.kf-tabs {
  display: flex; gap: 8px; margin: 4px 0 16px;
  background: rgba(255,255,255,.14);
  border-radius: 999px; padding: 5px;
}
.kf-tab {
  flex: 1; min-height: 46px; border: 0; cursor: pointer;
  border-radius: 999px; font-size: 16px; font-weight: 800;
  color: var(--kf-ink); background: transparent;
  font-family: inherit; transition: background .18s, color .18s, transform .12s;
}
.kf-tab:active { transform: scale(.97); }
.kf-tab.on {
  background: #fff; color: var(--kf-purple);
  box-shadow: 0 4px 14px rgba(120,90,200,.22);
}

/* ---------- 月份条（12 个月小按钮，可横滑） ---------- */
.kf-mbar {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.kf-mbtn2 {
  flex: 0 0 auto; min-width: 52px; min-height: 40px;
  border: 2px solid transparent; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.6); color: var(--kf-ink);
  font-size: 14px; font-weight: 800; font-family: inherit;
  transition: transform .12s, background .18s, border-color .18s;
}
.kf-mbtn2:active { transform: scale(.94); }
.kf-mbtn2.on {
  background: var(--kf-purple); color: #fff;
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 4px 12px rgba(120,90,200,.3);
}

/* ---------- 故事日历格子 ---------- */
.kf-sgrid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.kf-scell {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  min-height: 92px; padding: 10px 6px; cursor: pointer;
  border: 2px solid transparent; border-radius: 18px;
  font-family: inherit; text-align: center;
  transition: transform .12s, box-shadow .18s, background .18s;
}
.kf-scell:active { transform: scale(.95); }
.kf-scell .sd {
  font-size: 20px; font-weight: 900; line-height: 1;
}
.kf-scell .sn {
  font-size: 12px; font-weight: 700; opacity: .85; line-height: 1.25;
  max-width: 100%; overflow: hidden;
}
.kf-scell .sm { font-size: 15px; }

/* 未听：糖果白，带彩色描边 */
.kf-scell.new {
  background: #fff; color: var(--kf-ink);
  border-color: rgba(169,123,255,.35);
  box-shadow: 0 4px 12px rgba(120,90,200,.12);
}
/* 已听：实心糖果紫 —— 一眼看出「这个听过了」 */
.kf-scell.heard {
  background: linear-gradient(160deg, #b892ff, #8f5cf0);
  color: #fff; border-color: rgba(255,255,255,.55);
  box-shadow: 0 4px 14px rgba(120,70,200,.35);
}
.kf-scell.heard .sn { opacity: .95; }
/* 准备中：灰底、不可点 */
.kf-scell.lock {
  background: rgba(255,255,255,.42); color: #a49bbd;
  border-color: transparent; cursor: not-allowed; opacity: .8;
}

/* ---------- 国学本月篇目格子 ---------- */
.kf-ggrid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.kf-gcell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; min-height: 62px; padding: 10px 12px; cursor: pointer;
  border: 2px solid transparent; border-radius: 16px;
  font-family: inherit; font-size: 15px; font-weight: 800;
  transition: transform .12s, box-shadow .18s;
}
.kf-gcell:active { transform: scale(.95); }
.kf-gcell .gt { text-align: left; line-height: 1.25; }
.kf-gcell.new {
  background: #fff; color: var(--kf-ink);
  border-color: rgba(255,201,60,.5);
  box-shadow: 0 4px 12px rgba(200,160,40,.14);
}
.kf-gcell.heard {
  background: linear-gradient(160deg, #ffd75e, #f0a92c);
  color: #6b4a00; border-color: rgba(255,255,255,.6);
  box-shadow: 0 4px 14px rgba(210,150,20,.32);
}

/* ---------- 图例（比原来大一点，低龄看得清） ---------- */
.kf-legend2 {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 16px; font-size: 14px; color: #cfc6e8;
}
.kf-legend2 .lg {
  display: inline-block; width: 16px; height: 16px;
  border-radius: 5px; margin-right: 6px; vertical-align: -3px;
}
.kf-legend2 .lg.heard { background: linear-gradient(160deg,#b892ff,#8f5cf0); }
.kf-legend2 .lg.new   { background: #fff; border: 2px solid rgba(169,123,255,.5); }
.kf-legend2 .lg.lock  { background: rgba(255,255,255,.45); }

/* 回声墙（黄底）里的图例配色要区分开 */
.kf-scope .kf-gcell.heard + .kf-legend2 .lg.heard { background: #f0a92c; }

@media (max-width: 560px) {
  .kf-sgrid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
  .kf-scell { min-height: 84px; }
  .kf-ggrid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* ==================================================================
   2026-10-07 成语小火车 ＋ 接龙闯关 新增样式
   ★ 关卡卡片自带「已通关」配色（橙色实心）—— 就是需求里的
     「做过的用不同颜色标识」。
   ================================================================== */

/* ---------- 闯关数据条 ---------- */
.kf-idt-stat {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin: 4px 0 14px;
}
.kf-idt-stat .cell {
  background: rgba(255,255,255,.14); border-radius: 16px;
  padding: 12px 8px; text-align: center;
}
.kf-idt-stat .cell b {
  display: block; font-size: 22px; font-weight: 900; color: #fff;
}
.kf-idt-stat .cell span { font-size: 12px; color: #d9d0f0; }

/* ---------- 关卡列表 ---------- */
.kf-lvlist { display: flex; flex-direction: column; gap: 12px; }
.kf-lvcard {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 18px; cursor: pointer;
  border: 2px solid transparent; border-radius: 20px;
  font-family: inherit; text-align: left;
  background: #fff; color: var(--kf-ink);
  box-shadow: 0 4px 14px rgba(120,90,200,.14);
  transition: transform .12s, box-shadow .18s;
}
.kf-lvcard:active { transform: scale(.98); }
/* ★ 已通关：橙色实心 —— 一眼区分「做过了」 */
.kf-lvcard.cleared {
  background: linear-gradient(160deg, #ffb457, #f5851f);
  color: #fff; border-color: rgba(255,255,255,.55);
  box-shadow: 0 6px 18px rgba(230,130,20,.35);
}
.kf-lvcard .lv-no {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
  background: #fff2df; color: #e07b10;
}
.kf-lvcard.cleared .lv-no { background: rgba(255,255,255,.9); color: #e07b10; }
.kf-lvcard .lv-main { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.kf-lvcard .lv-name { font-size: 17px; font-weight: 900; }
.kf-lvcard .lv-meta { font-style: normal; font-size: 12.5px; opacity: .8; }
.kf-lvcard .lv-go { flex: 0 0 auto; font-size: 15px; font-weight: 800; opacity: .9; }

@media (max-width: 560px) {
  .kf-lvcard { padding: 13px 14px; gap: 10px; }
  .kf-lvcard .lv-no { width: 40px; height: 40px; font-size: 18px; }
  .kf-lvcard .lv-name { font-size: 15.5px; }
}
