/* ============================================================
   郭果果英语兔游戏园 · 样式
   风格：玩具般俏皮 · 糖果色 · 贴纸感 · 强奖励反馈
   ============================================================ */

:root {
  --bg: #FFF6E9;
  --card: #FFFFFF;
  --ink: #4A3B2A;
  --ink-soft: #98876F;
  --line: rgba(74, 59, 42, .1);
  --coral: #FF7B54;  --coral-deep: #E05A32;  --coral-tint: #FFEDE5;
  --sun: #FFC93C;    --sun-deep: #D89E00;    --sun-tint: #FFF4D6;
  --mint: #4ECDC4;   --mint-deep: #2B9E96;   --mint-tint: #E3F8F6;
  --sky: #5FB8F6;    --sky-deep: #2E86C8;    --sky-tint: #E7F4FE;
  --grape: #A78BFA;  --grape-deep: #7A5BD8;  --grape-tint: #F1EBFE;
  --pink: #FF6B9D;   --pink-deep: #D63E72;   --pink-tint: #FFE9F1;
  --ok: #58C267;     --ok-tint: #E8F8EC;
  --bad: #F26D6D;    --bad-tint: #FDEBEB;
  --radius: 22px;
  --ease: cubic-bezier(.25, 1, .5, 1);
  --en-font: 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: 'Microsoft YaHei', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg) url('assets/map-bg.png') center top / cover no-repeat fixed;
}

/* 柔和蒙版，保证内容可读 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 238, .84);
  z-index: -1;
}

/* 烟花画布 */
#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

#app {
  max-width: 1020px;
  margin: 0 auto;
  padding: 22px 20px 40px;
}

/* ---------------- 通用 ---------------- */

.hidden { display: none !important; }

.btn {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  background: var(--sun);
  border: 2px solid rgba(74, 59, 42, .12);
  border-radius: 18px;
  padding: 12px 30px;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--sun-deep);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--sun-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sun-deep); }

.btn-ghost {
  background: var(--card);
  box-shadow: 0 5px 0 rgba(74, 59, 42, .15);
}
.btn-ghost:hover { box-shadow: 0 7px 0 rgba(74, 59, 42, .15); }
.btn-ghost:active { box-shadow: 0 1px 0 rgba(74, 59, 42, .15); }

.btn-small { font-size: 15px; padding: 8px 18px; border-radius: 14px; }

.en-text { font-family: var(--en-font); }

/* 键帽 */
.kbd {
  display: inline-block;
  min-width: 30px;
  padding: 3px 8px;
  font-family: var(--en-font);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 8px;
  margin: 0 2px;
}

/* 键盘提示条 */
.keys-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  margin-top: 18px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .7);
  border: 2px dashed var(--line);
  border-radius: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}
.keys-bar .kbd { font-size: 12px; min-width: 26px; padding: 2px 7px; }

/* 屏幕切换 */
.screen { display: none; }
.screen.active { display: block; animation: fade-up .4s var(--ease); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

@keyframes pop {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255, 123, 84, .5); }
  70%  { box-shadow: 0 0 0 16px rgba(255, 123, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 123, 84, 0); }
}

@keyframes card-pulse {
  0%   { box-shadow: 0 8px 0 rgba(74,59,42,.08), 0 0 0 0 rgba(255, 123, 84, .55); }
  70%  { box-shadow: 0 8px 0 rgba(74,59,42,.08), 0 0 0 18px rgba(255, 123, 84, 0); }
  100% { box-shadow: 0 8px 0 rgba(74,59,42,.08), 0 0 0 0 rgba(255, 123, 84, 0); }
}

.shake { animation: shake .45s var(--ease); }

/* ---------------- 地图主页 ---------------- */

.map-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.mascot-avatar {
  width: 84px;
  height: 84px;
  object-fit: contain;
  animation: bob 2.6s ease-in-out infinite;
  filter: drop-shadow(0 6px 8px rgba(74, 59, 42, .18));
}

.map-title h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
}

.map-title p { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }

.map-pills {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(74, 59, 42, .08);
}

.pill .icon { font-size: 18px; }

.icon-btn {
  width: 44px;
  height: 44px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(74, 59, 42, .08);
  transition: transform .15s var(--ease);
}
.icon-btn:hover { transform: translateY(-2px); }
.icon-btn:active { transform: translateY(2px); }

.map-progress {
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

#map-hint {
  text-align: center;
  background: var(--sun-tint);
  border: 2px dashed var(--sun);
  color: var(--ink);
  border-radius: 16px;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
}

.world-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.world-card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(74, 59, 42, .08);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.world-card:hover { transform: translateY(-5px); box-shadow: 0 12px 0 rgba(74, 59, 42, .1); }
.world-card.pulse { animation: card-pulse 1.8s var(--ease) infinite; }

.world-banner {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center 62%;
  display: block;
}

.world-body { padding: 16px 18px 18px; }

.world-title { font-size: 20px; font-weight: 800; }

.world-sub { font-size: 13px; color: var(--ink-soft); margin: 4px 0 10px; }

.world-stars { font-size: 14px; min-height: 20px; letter-spacing: 1px; }

.world-go {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--coral-deep);
}
.world-card.locked .world-go { color: var(--ink-soft); }

.world-card.locked { cursor: default; }
.world-card.locked:hover { transform: none; box-shadow: 0 8px 0 rgba(74, 59, 42, .08); }
.world-card.locked .world-banner { filter: grayscale(.75); }

.lock-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 248, 238, .78);
  font-size: 34px;
}
.lock-cover span { font-size: 14px; font-weight: 700; color: var(--ink-soft); background: var(--card); padding: 4px 12px; border-radius: 999px; }

.map-footer {
  margin-top: 34px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 2;
}
#parent-link {
  cursor: pointer;
  text-decoration: underline dotted;
  font-weight: 700;
}

/* ---------------- 世界页 ---------------- */

.world-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.world-hero {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 0 rgba(74, 59, 42, .08);
  margin-bottom: 30px;
}
.world-hero img { width: 100%; height: 250px; object-fit: cover; object-position: center 22%; display: block; }
.world-hero-text { padding: 16px 20px; }
.world-hero-text h2 { font-size: 24px; font-weight: 800; }
.world-hero-text p { color: var(--ink-soft); margin-top: 4px; font-size: 15px; }

.level-path {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 0 100px;
}

.node-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
}

.level-node {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  box-shadow: 0 6px 0 rgba(74, 59, 42, .12);
  transition: transform .18s var(--ease);
}
.level-node:hover { transform: translateY(-4px) scale(1.04); }
.level-node:active { transform: translateY(2px); }

.level-node .node-icon { font-size: 36px; line-height: 1; }

.level-node.t-listen { background: var(--sky-tint);  border-color: var(--sky); }
.level-node.t-spell  { background: var(--coral-tint); border-color: var(--coral); }
.level-node.t-match  { background: var(--sun-tint);  border-color: var(--sun); }
.level-node.t-boss   { background: var(--grape-tint); border-color: var(--grape); }

.level-node.locked { filter: grayscale(.9); opacity: .55; cursor: not-allowed; }
.level-node.locked:hover { transform: none; }

.node-lock { position: absolute; top: -8px; right: -6px; font-size: 22px; }

.node-stars { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); font-size: 13px; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }

.level-node.current { animation: pulse-ring 1.6s var(--ease) infinite; }

.node-name { margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }

.mascot-here {
  position: absolute;
  top: 138px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  object-fit: contain;
  animation: bob 2.2s ease-in-out infinite;
  filter: drop-shadow(0 5px 6px rgba(74, 59, 42, .2));
  pointer-events: none;
  z-index: 2;
}

.path-dash {
  flex: 0 1 70px;
  border-top: 5px dotted rgba(74, 59, 42, .22);
  margin-top: 48px;
}

/* ---------------- 关卡页 ---------------- */

.game-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.progress-track {
  flex: 1;
  height: 16px;
  background: rgba(74, 59, 42, .1);
  border-radius: 999px;
  overflow: hidden;
}
#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--coral), var(--sun));
  border-radius: 999px;
  transition: width .4s var(--ease);
}

#q-count { font-weight: 800; font-size: 16px; min-width: 52px; text-align: center; }

.game-card-wrap {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 10px 0 rgba(74, 59, 42, .08);
  padding: 30px 28px 24px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.q-tip { text-align: center; font-size: 17px; font-weight: 700; color: var(--ink-soft); margin-bottom: 20px; }

/* 听音辨词 */
.listen-box { flex: 1; display: flex; flex-direction: column; }

.speaker-big {
  width: 104px;
  height: 104px;
  margin: 0 auto 26px;
  border-radius: 50%;
  border: 3px solid var(--sun);
  background: var(--sun-tint);
  font-size: 48px;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--sun-deep);
  transition: transform .15s var(--ease);
}
.speaker-big:hover { transform: scale(1.06); }
.speaker-big:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sun-deep); }
.speaker-big.playing { animation: pop .3s var(--ease); }

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.opt {
  position: relative;
  font-family: inherit;
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 20px;
  padding: 22px 12px;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(74, 59, 42, .1);
  transition: transform .15s var(--ease), border-color .15s, background .15s;
}
.opt:hover { transform: translateY(-3px); }
.opt:active { transform: translateY(2px); }

.opt-key {
  position: absolute;
  top: 8px;
  left: 8px;
}

.opt-emoji { font-size: 56px; line-height: 1; display: block; }
.opt-zh { font-size: 22px; font-weight: 700; display: block; }

.opt.right { background: var(--ok-tint); border-color: var(--ok); animation: pop .35s var(--ease); }
.opt.wrong { background: var(--bad-tint); border-color: var(--bad); }
.opt.hint-correct { border-color: var(--ok); outline: 4px solid rgba(88, 194, 103, .45); outline-offset: 3px; }
.opt.dim { opacity: .55; }

/* 单词侦探 */
.spell-box { flex: 1; display: flex; flex-direction: column; align-items: center; }

.spell-prompt {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.spell-emoji { font-size: 52px; }
.spell-zh { font-size: 26px; font-weight: 800; }

.speaker-sm {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--sky);
  background: var(--sky-tint);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(46, 134, 200, .5);
}
.speaker-sm:active { transform: translateY(2px); box-shadow: none; }

.slots { display: flex; gap: 8px; margin-bottom: 26px; }

.slot {
  width: 48px;
  height: 58px;
  border: 3px dashed rgba(74, 59, 42, .25);
  border-radius: 12px;
  background: rgba(255, 255, 255, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--en-font);
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.slot.filled { border-style: solid; border-color: var(--ink); background: var(--card); cursor: pointer; }
.slot.reveal { border-color: var(--mint-deep); color: var(--mint-deep); }
.slots.win .slot { border-color: var(--ok); background: var(--ok-tint); animation: pop .3s var(--ease); }
.slots.fail .slot { border-color: var(--bad); background: var(--bad-tint); }

.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 480px; }

.tile {
  width: 52px;
  height: 58px;
  font-family: var(--en-font);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(74, 59, 42, .14);
  transition: transform .12s var(--ease), opacity .2s;
}
.tile:hover { transform: translateY(-3px); }
.tile:active { transform: translateY(2px); }
.tile.used { opacity: .22; pointer-events: none; box-shadow: none; }
.tile.kb-flash { animation: pop .25s var(--ease); }

.spell-actions { display: flex; gap: 12px; margin-top: 26px; }

/* 记忆翻牌 */
.match-box { flex: 1; display: flex; flex-direction: column; }

.match-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: auto;
}

.mcard {
  aspect-ratio: 5 / 4;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  perspective: 600px;
}

.mcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .4s var(--ease);
}
.mcard.open .mcard-inner { transform: rotateY(180deg); }

.mcard-front, .mcard-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mcard-front {
  background: linear-gradient(135deg, var(--coral-tint), var(--sun-tint));
  border: 3px solid rgba(74, 59, 42, .12);
  font-size: 34px;
  box-shadow: 0 4px 0 rgba(74, 59, 42, .1);
}

.mcard-back {
  transform: rotateY(180deg);
  background: var(--card);
  border: 3px solid var(--mint);
  padding: 6px;
  text-align: center;
  word-break: break-word;
}
.mcard-back.en { font-family: var(--en-font); font-size: 21px; font-weight: 700; }
.mcard-back.zh { font-size: 18px; font-weight: 700; }

.mcard.gone { cursor: default; }
.mcard.gone .mcard-back { border-color: var(--ok); background: var(--ok-tint); }
.mcard.gone { opacity: .6; }

.mcard.cursor { outline: 4px solid var(--coral); outline-offset: 3px; }

/* 关卡开场遮罩 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 246, 233, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.intro-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 12px 0 rgba(74, 59, 42, .1);
  padding: 40px 56px;
  text-align: center;
  animation: pop .4s var(--ease);
}
.intro-icon { font-size: 60px; }
.intro-card h2 { font-size: 28px; margin: 10px 0 6px; }
.intro-card p { color: var(--ink-soft); margin-bottom: 24px; }

/* 首次进入 · 欢迎剧情 */
.welcome-card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 14px 0 rgba(74, 59, 42, .1);
  padding: 30px 50px 36px;
  text-align: center;
  max-width: 460px;
  animation: pop .45s var(--ease);
}

.welcome-duo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  margin-bottom: 16px;
}

/* 人物展示底（图片本身为统一米色底，这里只做柔和过渡） */
.duo-stage {
  display: inline-flex;
  align-items: flex-end;
  padding: 16px 20px 12px;
  border-radius: 40% 40% 28px 28px / 30% 30% 28px 28px;
  background: #FFF7E4;
  border: 2px solid rgba(255, 201, 60, .4);
  box-shadow: 0 8px 0 rgba(255, 201, 60, .2);
}

.welcome-duo img {
  width: 152px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(74, 59, 42, .14));
}
.welcome-duo .bunny-side {
  width: 92px;
  animation: bob 2.2s ease-in-out infinite;
  margin-bottom: 10px;
}

.welcome-card h2 { font-size: 27px; line-height: 1.35; margin: 8px 0 12px; }
.welcome-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.85; margin-bottom: 24px; }

/* ---------------- 绘本入口按钮 ---------------- */

.book-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-family: inherit;
  background: linear-gradient(100deg, var(--sun-tint), var(--coral-tint));
  border: 2px dashed var(--sun-deep);
  border-radius: 16px;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(216, 158, 0, .22);
  transition: transform .15s var(--ease);
}
.book-entry:hover { transform: translateY(-2px); }
.book-entry:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(216, 158, 0, .22); }
.book-entry.pulse { animation: card-pulse 1.9s var(--ease) infinite; }

.book-entry-icon { font-size: 24px; }
.book-entry-tag { font-size: 16px; font-weight: 800; color: var(--coral-deep); }
.book-entry-hint { font-size: 13px; color: var(--ink-soft); }

/* ---------------- 故事绘本阅读器 ---------------- */

.book-reader-card { max-width: 620px; }

.book-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.book-badge {
  font-size: 14px;
  font-weight: 800;
  color: var(--coral-deep);
  background: var(--coral-tint);
  padding: 4px 14px;
  border-radius: 999px;
}
.book-pager { font-size: 14px; font-weight: 700; color: var(--ink-soft); }

.book-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 18px;
  background: #FFF7E4;
  display: block;
  margin-bottom: 16px;
}

.book-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  text-align: center;
}

.book-lines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.book-lines li {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--sun-tint);
  border-left: 5px solid var(--sun);
  border-radius: 10px;
  padding: 10px 16px;
  animation: fade-up .45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 110ms);
}

.book-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.page-turn { animation: pop .35s var(--ease); }

/* ---------------- 小白兔成长卡（故事主线） ---------------- */

.pet-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(100deg, #FFF9EC 0%, #EAF7F5 100%);
  border: 2px solid rgba(78, 205, 196, .35);
  border-radius: 24px;
  padding: 14px 20px;
  margin-bottom: 18px;
  box-shadow: 0 6px 0 rgba(78, 205, 196, .15);
  position: relative;
  overflow: hidden;
}

.pet-img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  flex-shrink: 0;
  animation: bob 2.8s ease-in-out infinite;
  filter: drop-shadow(0 5px 8px rgba(74, 59, 42, .18));
}

.pet-info { flex: 1; min-width: 0; }

.pet-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pet-name { font-size: 19px; font-weight: 800; }
.pet-skill {
  font-size: 12px;
  font-weight: 700;
  color: var(--mint-deep);
  background: rgba(78, 205, 196, .18);
  padding: 2px 10px;
  border-radius: 999px;
}

.pet-dots { display: flex; gap: 7px; margin: 9px 0 8px; }
.pet-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(74, 59, 42, .13);
  transition: transform .3s var(--ease);
}
.pet-dot.on { background: var(--mint); box-shadow: 0 0 0 3px rgba(78, 205, 196, .22); }

.pet-bar {
  height: 12px;
  background: rgba(74, 59, 42, .1);
  border-radius: 999px;
  overflow: hidden;
}
.pet-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--sky));
  transition: width .6s var(--ease);
}
.pet-next { font-size: 13px; color: var(--ink-soft); margin-top: 7px; }
.pet-next b { color: var(--coral-deep); font-size: 15px; }

.pet-album-btn {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--mint-deep);
  background: var(--card);
  border: 2px solid rgba(78, 205, 196, .5);
  border-radius: 14px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(78, 205, 196, .28);
  transition: transform .15s var(--ease);
}
.pet-album-btn:hover { transform: translateY(-2px); }
.pet-album-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(78, 205, 196, .28); }

/* ---------------- 小白兔成长仪式 ---------------- */

.grow-card {
  background: var(--card);
  border: 3px solid var(--mint);
  border-radius: 30px;
  box-shadow: 0 16px 0 rgba(78, 205, 196, .28);
  padding: 26px 42px 30px;
  text-align: center;
  max-width: 500px;
  animation: pop .5s var(--ease);
}

.grow-title { font-size: 25px; font-weight: 800; margin-bottom: 18px; color: var(--mint-deep); }

.grow-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.grow-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.grow-side img { width: 116px; height: 116px; object-fit: contain; }
.grow-side:not(.grow-side-after) img { opacity: .5; filter: grayscale(.55); }
.grow-side-after img {
  width: 142px; height: 142px;
  animation: bob 2s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(78, 205, 196, .35));
}
.grow-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.grow-side-after .grow-label { color: var(--mint-deep); font-size: 15px; }

.grow-arrow { font-size: 30px; color: var(--mint); font-weight: 700; }

.grow-skill {
  display: inline-block;
  font-size: 15px;
  font-weight: 800;
  color: var(--coral-deep);
  background: var(--coral-tint);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.grow-story {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 14px;
  text-align: left;
}

.grow-speech {
  font-size: 15px;
  line-height: 1.8;
  color: var(--mint-deep);
  background: rgba(78, 205, 196, .13);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 20px;
  text-align: left;
}

/* ---------------- 成长相册 ---------------- */

.album-list { display: flex; flex-direction: column; gap: 14px; }

.album-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--sun-tint);
  border: 2px solid rgba(255, 201, 60, .4);
}
.album-row.locked { background: #F5F3EE; border-color: var(--line); }

.album-row img {
  width: 74px; height: 74px;
  object-fit: contain;
  flex-shrink: 0;
}
.album-row.locked img { filter: grayscale(1); opacity: .35; }

.album-info { flex: 1; min-width: 0; }
.album-name { font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.album-got {
  font-size: 11px; font-weight: 700; color: var(--ok);
  background: var(--ok-tint); padding: 1px 8px; border-radius: 999px;
}
.album-need {
  font-size: 11px; font-weight: 700; color: var(--ink-soft);
  background: rgba(74, 59, 42, .08); padding: 1px 8px; border-radius: 999px;
}
.album-skill { font-size: 13px; font-weight: 700; color: var(--coral-deep); margin-bottom: 4px; }
.album-story { font-size: 13px; line-height: 1.7; color: var(--ink-soft); }

/* ---------------- 结算页 ---------------- */

.result-card {
  max-width: 540px;
  margin: 30px auto;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 12px 0 rgba(74, 59, 42, .1);
  padding: 38px 34px 30px;
  text-align: center;
}

.result-title { font-size: 32px; font-weight: 800; margin-bottom: 18px; }

.result-stars { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.rstar { font-size: 64px; opacity: 0; }
.rstar.pop-in { animation: pop .5s var(--ease) forwards; }
.rstar.empty { filter: grayscale(1); opacity: .25; }

.result-mascot {
  width: 130px;
  object-fit: contain;
  animation: bob 2s ease-in-out infinite;
  filter: drop-shadow(0 8px 10px rgba(74, 59, 42, .2));
  margin: 4px 0 8px;
}

.result-coins {
  font-size: 24px;
  font-weight: 800;
  color: var(--coral-deep);
  margin-bottom: 6px;
}

.result-msg { color: var(--ink-soft); font-size: 15px; margin-bottom: 22px; }

.unlock-banner {
  background: var(--grape-tint);
  border: 2px dashed var(--grape);
  color: var(--grape-deep);
  font-weight: 800;
  font-size: 17px;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 18px;
  animation: pop .45s var(--ease);
}

.result-btns { display: flex; justify-content: center; gap: 14px; }

/* ---------------- 家长面板 ---------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(74, 59, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-card {
  background: var(--card);
  border-radius: 26px;
  max-width: 660px;
  width: 100%;
  max-height: 86vh;
  overflow: auto;
  padding: 28px 30px;
  box-shadow: 0 16px 40px rgba(42, 30, 15, .3);
}

.modal-card h2 { font-size: 22px; margin-bottom: 4px; }
.modal-sub { color: var(--ink-soft); font-size: 13px; margin-bottom: 18px; }

.parent-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.parent-stat {
  background: var(--sun-tint);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
}

.parent-section h3 { font-size: 15px; margin: 16px 0 8px; }

.parent-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.parent-table th, .parent-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.parent-table th { color: var(--ink-soft); font-weight: 700; font-size: 12px; }
.parent-table .en-text { font-weight: 700; }

.parent-empty { color: var(--ink-soft); font-size: 14px; padding: 8px 0; }

.parent-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.danger-btn {
  background: var(--bad-tint);
  color: var(--bad);
  border: 2px solid var(--bad);
  box-shadow: 0 5px 0 rgba(210, 60, 60, .35);
}
.danger-btn:active { box-shadow: 0 1px 0 rgba(210, 60, 60, .35); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 720px) {
  .map-header { flex-wrap: wrap; }
  .map-pills { margin-left: 0; width: 100%; }
  .options-grid { grid-template-columns: 1fr 1fr; }
  .match-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .level-path { flex-wrap: wrap; gap: 18px; }
  .path-dash { display: none; }
  .slot { width: 40px; height: 50px; font-size: 24px; }
  .tile { width: 44px; height: 50px; font-size: 22px; }
  .world-cards { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .kid-stats { flex-wrap: wrap; }
}

/* ---------------- 减少动效 ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   册地图（第一层：6 张册卡片）
   ============================================================ */

.book-card {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 24px;
  padding: 20px 22px;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(74, 59, 42, .08);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  overflow: hidden;
}
.book-card:hover { transform: translateY(-5px); box-shadow: 0 12px 0 rgba(74, 59, 42, .1); }
.book-card.pulse { animation: card-pulse 1.8s var(--ease) infinite; }
.book-card.locked { cursor: default; }
.book-card.locked:hover { transform: none; box-shadow: 0 8px 0 rgba(74, 59, 42, .08); }
.book-card.locked .book-emoji { filter: grayscale(1); opacity: .4; }

.book-emoji {
  width: 76px; height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border-radius: 22px;
  background: var(--sun-tint);
}
.book-card.t-mint  .book-emoji { background: var(--mint-tint); }
.book-card.t-sky   .book-emoji { background: var(--sky-tint); }
.book-card.t-coral .book-emoji { background: var(--coral-tint); }
.book-card.t-sun   .book-emoji { background: var(--sun-tint); }
.book-card.t-grape .book-emoji { background: var(--grape-tint); }
.book-card.t-pink  .book-emoji { background: var(--pink-tint); }

.book-body { flex: 1; min-width: 0; }
.book-title { font-size: 21px; font-weight: 800; }
.book-sub { font-size: 13px; color: var(--ink-soft); margin: 4px 0 10px; }

.book-bar {
  height: 10px;
  background: rgba(74, 59, 42, .1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.book-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--sky));
  transition: width .6s var(--ease);
}

.book-meta { font-size: 13px; color: var(--ink-soft); }
.book-need { color: var(--coral-deep); font-weight: 700; }

.book-go {
  margin-top: 9px;
  font-size: 15px;
  font-weight: 700;
  color: var(--coral-deep);
}
.book-card.locked .book-go { color: var(--ink-soft); }

/* ============================================================
   册内世界列表（第二层）
   ============================================================ */

.top-hint { color: var(--ink-soft); font-size: 14px; }

.bookmap-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 24px;
  padding: 20px 24px;
  margin-bottom: 24px;
  background: var(--sun-tint);
  border: 2px solid rgba(74, 59, 42, .1);
  box-shadow: 0 8px 0 rgba(74, 59, 42, .07);
}
.bookmap-hero.t-mint  { background: var(--mint-tint); }
.bookmap-hero.t-sky   { background: var(--sky-tint); }
.bookmap-hero.t-coral { background: var(--coral-tint); }
.bookmap-hero.t-sun   { background: var(--sun-tint); }
.bookmap-hero.t-grape { background: var(--grape-tint); }
.bookmap-hero.t-pink  { background: var(--pink-tint); }
.bookmap-emoji { font-size: 46px; }
.bookmap-hero h2 { font-size: 24px; font-weight: 800; }
.bookmap-hero p { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }

.world-list { display: flex; flex-direction: column; gap: 18px; }

.world-row {
  position: relative;
  display: flex;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 7px 0 rgba(74, 59, 42, .08);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.world-row:hover { transform: translateY(-4px); box-shadow: 0 11px 0 rgba(74, 59, 42, .1); }
.world-row.locked { cursor: default; }
.world-row.locked:hover { transform: none; box-shadow: 0 7px 0 rgba(74, 59, 42, .08); }
.world-row.locked .world-banner { filter: grayscale(.8); }

.world-row .world-banner {
  width: 190px;
  height: auto;
  min-height: 150px;
  object-fit: cover;
  object-position: center 55%;
  flex-shrink: 0;
}
.world-row .world-body { padding: 14px 20px; flex: 1; }

.world-stars-num { font-size: 12px; color: var(--ink-soft); margin-left: 6px; }
.world-need {
  font-size: 13px;
  font-weight: 700;
  color: var(--coral-deep);
  margin-top: 6px;
}

/* 世界页底部提示 */
.world-tip {
  text-align: center;
  background: var(--sun-tint);
  border: 2px dashed var(--sun);
  border-radius: 16px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 22px;
}
.world-tip b { color: var(--coral-deep); font-size: 18px; }

/* ============================================================
   孩子版学习小报告
   ============================================================ */

.kid-report-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  font-family: inherit;
  text-align: left;
  background: linear-gradient(100deg, var(--grape-tint), var(--sky-tint));
  border: 2px dashed var(--grape);
  border-radius: 20px;
  padding: 14px 20px;
  margin-bottom: 20px;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(122, 91, 216, .16);
  transition: transform .15s var(--ease);
}
.kid-report-entry:hover { transform: translateY(-2px); }
.kid-report-entry:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(122, 91, 216, .16); }
.kre-icon { font-size: 30px; }
.kre-main { font-size: 18px; font-weight: 800; color: var(--grape-deep); }
.kre-hint { font-size: 13px; color: var(--ink-soft); margin-left: auto; }

.kid-card { max-width: 640px; }
.kid-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.kid-date { font-size: 13px; color: var(--ink-soft); }

.kid-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(100deg, #FFF9EC, #EAF7F5);
  border: 2px solid rgba(78, 205, 196, .35);
  border-radius: 20px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.kid-hero img { width: 72px; height: 72px; object-fit: contain; animation: bob 2.8s ease-in-out infinite; }
.kid-pet-name { font-size: 18px; font-weight: 800; }
.kid-cheer { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin-top: 4px; }

.kid-stats { display: flex; gap: 12px; margin-bottom: 20px; }
.kid-stat {
  flex: 1;
  text-align: center;
  background: var(--sun-tint);
  border-radius: 16px;
  padding: 14px 8px;
}
.kid-stat b { display: block; font-size: 26px; color: var(--coral-deep); }
.kid-stat span { font-size: 12px; color: var(--ink-soft); }

.kid-section { margin-bottom: 20px; }
.kid-section h3 { font-size: 16px; margin-bottom: 10px; }

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 110px;
  padding: 10px 12px;
  background: var(--sky-tint);
  border-radius: 16px;
}
.trend-col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.trend-bar { width: 100%; border-radius: 6px 6px 0 0; transition: height .5s var(--ease); }
.trend-bar.h { background: linear-gradient(180deg, var(--mint), var(--mint-deep)); }
.trend-bar.m { background: linear-gradient(180deg, var(--sun), var(--sun-deep)); }
.trend-bar.l { background: linear-gradient(180deg, var(--coral), var(--coral-deep)); }
.trend-hint { font-size: 12px; color: var(--ink-soft); margin-top: 8px; text-align: center; }

.kid-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kid-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--en-font);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  background: var(--coral-tint);
  border: 2px solid rgba(255, 123, 84, .4);
  border-radius: 999px;
  padding: 6px 16px;
}
.kid-chip i {
  font-family: 'Microsoft YaHei', sans-serif;
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
}
.kid-empty { font-size: 14px; color: var(--ink-soft); padding: 8px 0; }

.kid-challenge { text-align: center; margin-bottom: 6px; }
.kid-challenge-hint { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }

/* ============================================================
   家长版学情报告
   ============================================================ */

.rate {
  display: inline-block;
  min-width: 46px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  border-radius: 999px;
  padding: 2px 10px;
}
.rate-ok, .lv-ok     { background: var(--ok-tint); color: var(--ok); }
.rate-fair, .lv-fair { background: var(--sun-tint); color: var(--sun-deep); }
.rate-weak, .lv-weak { background: var(--coral-tint); color: var(--coral-deep); }
.lv-bad              { background: var(--bad-tint); color: var(--bad); }

.mini-need { font-size: 11px; font-weight: 700; color: var(--coral-deep); }

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.type-card {
  text-align: center;
  background: var(--coral-tint);
  border: 2px solid rgba(255, 123, 84, .3);
  border-radius: 16px;
  padding: 12px 8px;
}
.type-card.zero { background: #F5F3EE; border-color: var(--line); opacity: .6; }
.type-icon { font-size: 22px; }
.type-num { font-size: 24px; font-weight: 800; color: var(--coral-deep); }
.type-card.zero .type-num { color: var(--ink-soft); }
.type-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.type-hint { font-size: 11px; line-height: 1.5; color: var(--ink-soft); }

.parent-book-block { margin-bottom: 18px; }
.parent-book-name {
  font-size: 15px;
  font-weight: 800;
  margin: 14px 0 6px;
  padding-left: 8px;
  border-left: 4px solid var(--mint);
}

/* ============================================================
   结算页：本关薄弱词提示
   ============================================================ */

.result-sub { font-size: 13px; color: var(--ink-soft); }
.result-weak {
  background: var(--sun-tint);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 18px;
  text-align: left;
}
.rw-title { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.rw-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--en-font);
  font-size: 16px;
  font-weight: 700;
  background: var(--card);
  border: 2px solid rgba(216, 158, 0, .35);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0 6px 6px 0;
}
.rw-chip i {
  font-family: 'Microsoft YaHei', sans-serif;
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ============================================================
   每日金币小游戏「单词补字母」+ 小白兔小商店
   ============================================================ */

/* ---- 首页并排两卡 ---- */
.daily-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  margin: 0 0 20px;
}
@media (max-width: 720px) { .daily-row { grid-template-columns: 1fr; } }

.coin-entry, .shop-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 3px solid transparent;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-family: inherit;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  position: relative;
  overflow: hidden;
}
.coin-entry {
  background: linear-gradient(135deg, #FFF4D6 0%, #FFE7B8 100%);
  border-color: rgba(216, 158, 0, .45);
  box-shadow: 0 6px 0 rgba(216, 158, 0, .28);
}
.shop-entry {
  background: linear-gradient(135deg, #FFE9F1 0%, #FFD9E7 100%);
  border-color: rgba(214, 62, 114, .35);
  box-shadow: 0 6px 0 rgba(214, 62, 114, .22);
}
.coin-entry:hover, .shop-entry:hover { transform: translateY(-3px); }
.coin-entry:active, .shop-entry:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.coin-entry.done { background: linear-gradient(135deg, #F3F1EC, #E9E5DC); border-color: var(--line); box-shadow: 0 6px 0 rgba(0,0,0,.08); }
.coin-entry.pulse-soft { animation: cePulse 2.6s ease-in-out infinite; }
@keyframes cePulse {
  0%, 100% { box-shadow: 0 6px 0 rgba(216, 158, 0, .28); }
  50% { box-shadow: 0 6px 0 rgba(216, 158, 0, .28), 0 0 0 8px rgba(255, 201, 60, .18); }
}
.ce-icon, .se-icon { font-size: 34px; line-height: 1; flex: 0 0 auto; }
.ce-main, .se-main { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.ce-title, .se-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.ce-sub, .se-sub { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; }
.ce-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.ce-rounds { font-size: 12px; font-weight: 700; color: var(--sun-deep); background: rgba(255,255,255,.7); border-radius: 999px; padding: 2px 9px; }
.ce-go { font-size: 13px; font-weight: 800; color: var(--sun-deep); }
.se-purse { font-size: 15px; font-weight: 800; color: var(--pink-deep); background: rgba(255,255,255,.75); border-radius: 999px; padding: 4px 12px; flex: 0 0 auto; }

/* ---- 金币飘字 ---- */
.float-coin {
  position: fixed;
  transform: translate(-50%, -50%);
  font-family: var(--en-font);
  font-size: 24px;
  font-weight: 800;
  color: var(--sun-deep);
  text-shadow: 0 2px 0 #fff, 0 0 12px rgba(255, 201, 60, .9);
  pointer-events: none;
  z-index: 1200;
  animation: floatUp 1.05s var(--ease) forwards;
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); }
  25% { opacity: 1; transform: translate(-50%, -70%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -180%) scale(1); }
}

/* ---- 小游戏页面 ---- */
.cg-head { max-width: 760px; margin: 8px auto 14px; }
.cg-progress { font-size: 14px; font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cg-progress b { color: var(--ink); font-size: 17px; }
.cg-coin-now { font-weight: 800; color: var(--sun-deep); background: var(--sun-tint); border-radius: 999px; padding: 2px 10px; }
.cg-left { font-size: 12px; color: var(--ink-soft); }
.cg-bar { height: 12px; background: rgba(74,59,42,.09); border-radius: 999px; overflow: hidden; }
.cg-bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--sun), var(--coral)); transition: width .35s var(--ease); }

.cg-body { max-width: 760px; margin: 0 auto; }
.cg-card {
  background: var(--card);
  border: 4px solid rgba(255, 201, 60, .5);
  border-radius: 28px;
  padding: 26px 24px 22px;
  box-shadow: 0 12px 0 rgba(216, 158, 0, .16);
  text-align: center;
}
.cg-prompt { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.cg-emoji { font-size: 44px; line-height: 1; }
.cg-zh { font-size: 22px; font-weight: 800; }
.cg-hint-line { font-size: 13px; color: var(--ink-soft); margin-bottom: 20px; }
.cg-hint-line b { color: var(--coral-deep); font-size: 15px; }

.cg-slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  padding: 16px 8px;
  border-radius: 20px;
  background: var(--sun-tint);
}
.cg-slots.cg-win { animation: cgWin .5s var(--ease); background: #E8F8EC; }
.cg-slots.cg-lose { animation: cgShake .45s; background: var(--bad-tint); }
@keyframes cgWin { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes cgShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }

.cg-letter {
  font-family: var(--en-font);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  width: 46px;
  text-align: center;
  color: var(--ink);
}
.cg-letter.fixed { opacity: .35; }
.cg-letter.hole {
  border-bottom: 4px solid var(--coral);
  border-radius: 4px;
  min-height: 46px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--coral-deep);
}
.cg-letter.hole.active { border-bottom-color: var(--sun-deep); animation: holeBlink 1.1s ease-in-out infinite; }
.cg-letter.hole.filled { color: var(--mint-deep); border-bottom-color: var(--mint); }
.cg-letter.shake { animation: cgShake .4s; }
@keyframes holeBlink { 0%,100% { border-bottom-color: var(--sun-deep); } 50% { border-bottom-color: rgba(216,158,0,.25); } }

.cg-input-tip { font-size: 13px; color: var(--ink-soft); margin: 14px 0 4px; }
.cg-input-tip.warn { color: var(--coral-deep); font-weight: 700; }
.cg-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

/* ---- 小游戏结算 ---- */
#cg-result { text-align: center; }
.cgr-emoji { font-size: 64px; line-height: 1; margin-bottom: 6px; }
.cgr-title { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.cgr-coins { font-size: 19px; font-weight: 800; color: var(--sun-deep); margin-bottom: 6px; }
.cgr-coins b { font-size: 26px; }
.cgr-detail { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.cgr-pet { display: flex; align-items: center; gap: 12px; background: var(--sun-tint); border-radius: 18px; padding: 12px 16px; margin-bottom: 14px; text-align: left; }
.cgr-pet img { width: 62px; height: 62px; object-fit: contain; flex: 0 0 auto; }
.cgr-say { font-size: 13.5px; line-height: 1.55; }
.cgr-note { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.cgr-note b { color: var(--coral-deep); }
.cgr-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-primary-soft { background: var(--pink-tint); color: var(--pink-deep); border-color: rgba(214,62,114,.35); }

/* ---- 小商店 ---- */
.shop-card { max-width: 720px; }
.shop-head {
  display: flex; align-items: center; gap: 14px;
  background: var(--pink-tint);
  border-radius: 20px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.shop-pet { width: 72px; height: 72px; object-fit: contain; flex: 0 0 auto; }
.shop-head-info { flex: 1 1 auto; }
.shop-pet-name { font-size: 17px; font-weight: 800; }
.shop-pet-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.shop-purse { font-size: 20px; font-weight: 800; color: var(--sun-deep); background: var(--card); border-radius: 999px; padding: 6px 16px; flex: 0 0 auto; }
.shop-purse b { font-size: 24px; }
.shop-note { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; line-height: 1.7; }
.shop-owned-chip { display: inline-block; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; margin: 0 6px 6px 0; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.shop-section { margin-bottom: 20px; }
.shop-section h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.shop-sec-hint { font-size: 12px; font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.shop-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 2.5px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px;
  transition: transform .16s var(--ease);
}
.shop-item:hover { transform: translateY(-2px); }
.shop-item.cant { opacity: .55; }
.si-emoji { font-size: 30px; flex: 0 0 auto; }
.si-body { flex: 1 1 auto; min-width: 0; }
.si-name { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.si-own { font-size: 11px; font-weight: 700; color: var(--mint-deep); background: var(--mint-tint); border-radius: 999px; padding: 1px 7px; }
.si-price { font-size: 13px; font-weight: 800; color: var(--sun-deep); margin-top: 2px; }
.si-buy { flex: 0 0 auto; }

/* ---- 兔子说话 ---- */
#pet-speak { display: flex; align-items: center; justify-content: center; }
#pet-speak.hidden { display: none; }
.ps-card {
  background: var(--card);
  border-radius: 28px;
  padding: 26px 28px 22px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 16px 46px rgba(74,59,42,.28);
  animation: popIn .32s var(--ease);
}
@keyframes popIn { 0% { transform: scale(.86); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.ps-pet { width: 108px; height: 108px; object-fit: contain; }
.ps-bubble {
  background: var(--sun-tint);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.6;
  margin: 10px 0 12px;
  position: relative;
}
.ps-bubble::before {
  content: ''; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  border: 9px solid transparent; border-bottom-color: var(--sun-tint); border-top: 0;
}
.ps-item { font-size: 15px; font-weight: 800; color: var(--coral-deep); margin-bottom: 16px; }

/* ---- 休息 / 到限弹窗 ---- */
.rest-card { text-align: center; max-width: 440px; }
.rest-pet { width: 112px; height: 112px; object-fit: contain; margin-bottom: 8px; }
.rest-card h2 { font-size: 21px; margin-bottom: 12px; }
.rest-card p { font-size: 14px; line-height: 1.75; color: var(--ink); margin-bottom: 20px; }
.rest-card p b { color: var(--coral-deep); font-size: 16px; }
.rest-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.limit-tip { font-size: 12px; color: var(--ink-soft); margin-top: 10px; }

/* ---- 家长：防沉迷设置 ---- */
.parent-sub-hint { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 12px; }
.limit-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.limit-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 10px 14px;
}
.lr-name { font-size: 14px; font-weight: 700; flex: 1 1 190px; }
.lr-ctrl { display: flex; align-items: center; gap: 6px; }
.lr-btn {
  width: 30px; height: 30px; border-radius: 10px;
  border: 2px solid var(--line); background: var(--card);
  font-size: 16px; font-weight: 800; color: var(--ink);
  cursor: pointer; font-family: inherit; line-height: 1;
}
.lr-btn:hover { background: var(--sun-tint); border-color: rgba(216,158,0,.4); }
.lr-input {
  width: 68px; text-align: center;
  font-family: inherit; font-size: 15px; font-weight: 800;
  border: 2px solid var(--line); border-radius: 10px;
  padding: 5px 6px; color: var(--ink); background: #FFFDF8;
}
.lr-unit { font-size: 12.5px; color: var(--ink-soft); }
.lr-now { font-size: 12px; color: var(--ink-soft); flex: 0 0 100%; padding-left: 2px; }
.limit-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.limit-note { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.limit-note b { color: var(--coral-deep); }


/* ---- 层级修正：兔子说话 / 休息提醒 / 到限提示 必须在商店等弹窗之上 ---- */
#pet-speak, #rest-overlay, #limit-overlay { z-index: 400; }
#pet-speak { background: rgba(74, 59, 42, .5); }
#pet-speak.hidden { display: none; }

/* 买完东西后商店还开着，兔子说话在最上层 */
.shop-item .si-buy:disabled { cursor: not-allowed; }



/* ============================================================
   云同步 · 状态条 / 绑定弹窗 / 家长面板同步区
   ============================================================ */

/* ---- 首页状态条 ---- */
.sync-bar {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin: 0 0 16px; padding: 13px 18px;
  border: 2px dashed rgba(95, 184, 246, .55);
  border-radius: 18px; background: var(--sky-tint);
  font-family: inherit; text-align: left; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.sync-bar:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(46, 134, 200, .16); }
.sync-bar.warn { border-color: rgba(242, 109, 109, .5); background: var(--bad-tint); }
.sync-bar.hidden { display: none; }
.sb-icon { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.sb-main { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.sb-title { font-size: 14.5px; font-weight: 800; color: var(--sky-deep); }
.sync-bar.warn .sb-title { color: var(--bad); }
.sb-sub { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.sb-go {
  flex: 0 0 auto; font-size: 13px; font-weight: 800; color: #fff;
  background: var(--sky); padding: 7px 15px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(46, 134, 200, .35);
}
.sync-bar.warn .sb-go { background: var(--bad); box-shadow: 0 3px 0 rgba(200, 60, 60, .3); }

/* ---- 绑定弹窗 ---- */
.sync-card { max-width: 560px; }
.sync-choice { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 14px; }
.sync-opt {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 15px 18px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--card);
  font-family: inherit; cursor: pointer;
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.sync-opt:hover { transform: translateY(-2px); border-color: rgba(78, 205, 196, .6); background: var(--mint-tint); }
.so-icon { font-size: 20px; }
.so-name { font-size: 15px; font-weight: 800; color: var(--ink); }
.so-hint { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }

.sync-tip {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.75;
  background: var(--sun-tint); border-radius: 12px; padding: 10px 13px; margin-top: 10px;
}
.sync-tip strong { color: var(--coral-deep); }
.sync-loading { text-align: center; padding: 26px; color: var(--ink-soft); font-size: 14px; }
.sync-err { color: var(--bad); font-size: 13.5px; margin: 8px 0 12px; line-height: 1.7; }
.sync-ok { color: var(--ok); font-size: 14px; font-weight: 800; margin: 4px 0 14px; }

/* 口令展示 */
.key-row {
  display: flex; flex-direction: column; gap: 5px;
  padding: 14px 17px; border-radius: 15px; margin-bottom: 11px;
  border: 2px solid var(--line);
}
.key-row.key-kid { background: var(--mint-tint); border-color: rgba(78, 205, 196, .45); }
.key-row.key-parent { background: var(--grape-tint); border-color: rgba(167, 139, 250, .45); }
.kr-label { font-size: 13px; font-weight: 800; color: var(--ink); }
.kr-val {
  font-family: var(--en-font); font-size: 27px; font-weight: 800;
  letter-spacing: .18em; color: var(--coral-deep); user-select: all;
}
.key-row.key-parent .kr-val { color: var(--grape-deep); }
.kr-hint { font-size: 12px; color: var(--ink-soft); }

.sync-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }
.sync-form { margin: 6px 0 10px; }
.sf-label { display: block; font-size: 13.5px; font-weight: 800; margin-bottom: 8px; }
.sf-input {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 2px solid var(--line); background: #FFFDF8;
  font-family: var(--en-font); font-size: 26px; font-weight: 800;
  letter-spacing: .28em; text-align: center; color: var(--ink);
  text-transform: uppercase;
}
.sf-input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-tint); }
.sf-hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
.sf-hint.sf-ok { color: var(--ok); font-weight: 800; }
.sf-hint.sf-bad { color: var(--bad); font-weight: 800; }

/* ---- 家长面板同步区 ---- */
.sync-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; margin-bottom: 12px;
}
.ss-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.ss-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-tint); }
.ss-dot.bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-tint); }
.ss-text { font-weight: 700; }
.ss-device { color: var(--ink-soft); font-size: 12.5px; margin-left: auto; }
.sync-table { margin-bottom: 12px; }
.sync-table th { white-space: nowrap; }
.sync-table td.st-hint { font-size: 12px; color: var(--ink-soft); }
.sync-table td.st-hint .btn { margin-right: 6px; }
.sync-msg { font-size: 13px; font-weight: 700; color: var(--mint-deep); min-height: 20px; margin-top: 8px; }


/* ---- 家长入口密码门 ---- */
.gate-card { max-width: 420px; text-align: center; }
.gate-card h2 { margin-bottom: 6px; }
.gate-input {
  width: 100%; padding: 15px 18px; border-radius: 14px;
  border: 2px solid var(--line); background: #FFFDF8;
  font-family: var(--en-font); font-size: 21px; font-weight: 800;
  letter-spacing: .16em; text-align: center; color: var(--ink);
  margin-top: 6px;
}
.gate-input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-tint); }
.gate-input.shake { animation: cgShake .4s; }
.gate-hint { font-size: 12.5px; color: var(--ink-soft); margin: 12px 0 18px; line-height: 1.6; }
.gate-hint.gate-bad { color: var(--bad); font-weight: 800; }
.gate-hint.gate-ok { color: var(--ok); font-weight: 800; }
.gate-card .parent-actions { justify-content: center; }

/* ---- 小屏（平板 / 手机）适配 ---- */
@media (max-width: 640px) {
  .daily-row { flex-direction: column; }
  .sync-bar { flex-wrap: wrap; }
  .sb-go { width: 100%; text-align: center; }
  .kr-val { font-size: 23px; }
  .sf-input { font-size: 23px; }
  .sync-table th { font-size: 12px; }
}
