/* ============================================================
   单词小镇冒险 · 洪恩卡通贴纸风设计系统
   奶油底色 + 圆点纹理 + 厚描边硬投影贴纸感 + 大按钮 + 按压反馈
   平板优先：触控目标 ≥ 44px、禁双击缩放
   ============================================================ */

:root {
  --bg: #fdf6ec;
  --ink: #4e342e;
  --line: #4e342e;
  --purple: #7c4dff;
  --purple-d: #651fff;
  --blue: #29b6f6;
  --blue-d: #0288d1;
  --green: #66bb6a;
  --green-d: #43a047;
  --orange: #ff9800;
  --orange-d: #f57c00;
  --red: #ff5252;
  --shadow: 0 5px 0 rgba(78, 52, 46, .18);
  --en-font: 'Comic Sans MS', 'Comic Neue', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%; margin: 0; padding: 0;
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', sans-serif;
  color: var(--ink);
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
}
body {
  background: var(--bg);
  background-image: radial-gradient(rgba(124, 77, 255, .07) 2.6px, transparent 2.6px);
  background-size: 26px 26px;
}
.en { font-family: var(--en-font); letter-spacing: .02em; }
#app { position: fixed; inset: 0; overflow: hidden; }
#fx-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 950; }
#modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 1000; }
#modal-root > * { pointer-events: auto; }

/* ---------- 屏幕与转场 ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(rgba(124, 77, 255, .07) 2.6px, transparent 2.6px);
  background-size: 26px 26px;
  animation: fadeIn .25s;
}
.screen.slide-in-left { animation: slideL .3s cubic-bezier(.2, .8, .3, 1); }
.screen.slide-in-right { animation: slideR .3s cubic-bezier(.2, .8, .3, 1); }
.screen.leaving { transition: transform .3s ease, opacity .3s ease; transform: translateX(-14%); opacity: 0; }
@keyframes slideL { from { transform: translateX(60px); opacity: 0; } }
@keyframes slideR { from { transform: translateX(-60px); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 8px;
}
.topbar .title {
  flex: 1; text-align: center;
  font-size: 25px; font-weight: 900; color: var(--purple-d);
  text-shadow: 0 2px 0 #fff, 0 4px 0 rgba(124, 77, 255, .18);
  letter-spacing: 2px;
}
.icon-btn {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 16px; border: 3px solid #fff;
  background: linear-gradient(145deg, #fff, #ffe9c9);
  color: var(--orange-d);
  box-shadow: var(--shadow), inset 0 -3px 0 rgba(0, 0, 0, .05);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .12s;
}
.icon-btn svg { width: 30px; height: 30px; }
.icon-btn:active { transform: translateY(4px) scale(.95); box-shadow: 0 1px 0 rgba(78, 52, 46, .18); }

.home-badges { display: flex; gap: 10px; }
.star-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; min-height: 44px;
  border-radius: 999px;
  background: #fff; border: 3px solid var(--orange);
  font-weight: 900; font-size: 18px; color: var(--orange-d);
  box-shadow: var(--shadow);
}
.star-badge svg { width: 24px; height: 24px; }
.fish-badge { border-color: var(--blue-d); color: var(--blue-d); }
.star-badge.bounce { animation: bounce .5s; }
@keyframes bounce { 30% { transform: scale(1.2) rotate(-4deg); } 60% { transform: scale(.95); } }

/* ---------- 屏幕主体 ---------- */
.screen-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 20px 110px;
  touch-action: pan-y;
}

/* ---------- 首页 ---------- */
.home-hero { text-align: center; padding: 12px 0 4px; }
.logo { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.logo-block {
  width: 52px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px; border: 3px solid #fff;
  color: #fff; font-size: 30px; font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
  box-shadow: 0 5px 0 rgba(78, 52, 46, .16), inset 0 -5px 0 rgba(0, 0, 0, .08);
  transform: rotate(-2deg);
  animation: bob 2.6s ease-in-out infinite;
}
.logo-block:nth-child(even) { transform: rotate(2deg); animation-delay: .4s; }
@keyframes bob { 50% { translate: 0 -5px; } }
.sub { margin-top: 12px; font-size: 15px; color: #8d6e63; font-weight: 700; }

.home-sec-title {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 12px; font-size: 20px; font-weight: 900; color: var(--purple-d);
}
.home-sec-title svg { width: 26px; height: 26px; color: var(--orange); }

/* ---------- 贪吃猫养成 ---------- */
.cat-zone {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(150deg, #ffffff, #fff3e0);
  border: 3px solid #ffd180; border-radius: 26px;
  padding: 14px; margin-top: 12px;
  box-shadow: var(--shadow);
}
.cat-wrap { flex: 0 0 260px; height: 250px; display: flex; justify-content: center; }
.cat-info { flex: 1; min-width: 0; }
.cat-stage-name { font-size: 26px; font-weight: 900; color: var(--orange-d); text-shadow: 0 2px 0 #fff; }
.cat-fish-tip { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 900; color: var(--blue-d); margin: 8px 0; }
.cat-fish-tip svg { width: 28px; height: 22px; }
.cat-hint { font-size: 14px; color: #8d6e63; font-weight: 700; }
.cat-next {
  display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 900;
  background: #e1f5fe; color: var(--blue-d); padding: 6px 12px; border-radius: 999px;
}

/* —— CSS 画的卡通贪吃猫 —— */
.cat-box { position: relative; width: 240px; height: 250px; cursor: pointer; }
.cat-box.pounce { animation: pounce .5s; }
@keyframes pounce { 30% { transform: scale(1.12) rotate(-3deg); } 60% { transform: scale(.94); } }
.cat-figure { position: absolute; inset: 0; transform-origin: 50% 90%; }
.cat-s1 .cat-figure { transform: scale(.72); }
.cat-s2 .cat-figure { transform: scale(.9); }
.cat-s3 .cat-figure { transform: scale(1); }
.cat-s3 .cat-head, .cat-s3 .cat-body { filter: drop-shadow(0 0 10px rgba(255, 193, 7, .55)); }
.cat-head {
  position: absolute; top: 42px; left: 50%; margin-left: -75px;
  width: 150px; height: 128px;
  background: linear-gradient(160deg, #ffcc80, #ff9800);
  border: 4px solid #6d4c41; border-radius: 50% 50% 46% 46%;
  z-index: 2;
}
.cat-ear {
  position: absolute; top: -22px; width: 52px; height: 52px;
  background: linear-gradient(160deg, #ffcc80, #ff9800);
  border: 4px solid #6d4c41; border-radius: 14px 50% 50% 50%;
  transform: rotate(45deg); z-index: 1;
}
.cat-ear::after { content: ''; position: absolute; inset: 8px; background: #ff8a9b; border-radius: inherit; opacity: .85; }
.cat-ear.l { left: 2px; transform: rotate(45deg); }
.cat-ear.r { right: 2px; transform: rotate(45deg); }
.cat-eye {
  position: absolute; top: 46px; width: 30px; height: 36px;
  background: #fff; border: 3px solid #4e342e; border-radius: 50%;
  animation: blink 4.5s infinite;
}
.cat-eye::after { content: ''; position: absolute; left: 9px; top: 12px; width: 13px; height: 15px; background: #4e342e; border-radius: 50%; }
.cat-eye::before { content: ''; position: absolute; left: 15px; top: 5px; width: 5px; height: 5px; background: #fff; border-radius: 50%; z-index: 1; }
.cat-eye.l { left: 34px; } .cat-eye.r { right: 34px; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.cat-nose {
  position: absolute; top: 78px; left: 50%; margin-left: -8px;
  width: 16px; height: 11px; background: #ff8a9b; border: 3px solid #6d4c41;
  border-radius: 40% 40% 50% 50%;
}
.cat-mouth {
  position: absolute; top: 88px; left: 50%; margin-left: -20px;
  width: 40px; height: 18px;
}
.cat-mouth::before, .cat-mouth::after {
  content: ''; position: absolute; top: 0;
  width: 20px; height: 16px; border: 3px solid #6d4c41; border-top: none;
  border-radius: 0 0 45% 45%;
}
.cat-mouth::before { left: 0; } .cat-mouth::after { left: 20px; }
.cat-cheek {
  position: absolute; top: 72px; width: 26px; height: 16px;
  background: #ff8a9b; opacity: .5; border-radius: 50%;
}
.cat-cheek.l { left: 6px; } .cat-cheek.r { right: 6px; }
.cat-wh {
  position: absolute; width: 34px; height: 3px; background: #6d4c41;
  border-radius: 3px;
}
.cat-wh.w1 { top: 76px; left: -28px; transform: rotate(6deg); }
.cat-wh.w2 { top: 86px; left: -30px; transform: rotate(-6deg); }
.cat-wh.w3 { top: 96px; left: -26px; transform: rotate(-16deg); }
.cat-wh.w4 { top: 76px; right: -28px; transform: rotate(-6deg); }
.cat-wh.w5 { top: 86px; right: -30px; transform: rotate(6deg); }
.cat-wh.w6 { top: 96px; right: -26px; transform: rotate(16deg); }
.cat-body {
  position: absolute; top: 158px; left: 50%; margin-left: -72px;
  width: 144px; height: 86px;
  background: linear-gradient(160deg, #ffcc80, #ff9800);
  border: 4px solid #6d4c41; border-radius: 46% 46% 60% 60%;
  z-index: 1;
}
.cat-belly {
  position: absolute; left: 50%; margin-left: -34px; bottom: 6px;
  width: 68px; height: 56px; background: #fff3e0;
  border-radius: 50%;
}
.cat-paw {
  position: absolute; bottom: -12px; width: 40px; height: 28px;
  background: #ffb74d; border: 3px solid #6d4c41; border-radius: 50%;
  z-index: 3;
}
.cat-paw.l { left: 6px; } .cat-paw.r { right: 6px; }
.cat-tail {
  position: absolute; right: 8px; bottom: 34px;
  width: 62px; height: 44px;
  border: 12px solid #ff9800; border-color: transparent #6d4c41 #6d4c41 transparent;
  border-radius: 0 100% 60% 0;
  background: transparent; z-index: 0;
}
/* 装扮 */
.cat-acc { position: absolute; z-index: 4; pointer-events: none; }
.cat-acc svg { display: block; }
.cat-acc-bow { width: 52px; top: 26px; right: 2px; transform: rotate(14deg); }
.cat-acc-hat { width: 60px; top: -18px; left: 50%; margin-left: -30px; }
.cat-acc-crown { width: 64px; top: -24px; left: 50%; margin-left: -32px; transform: rotate(-6deg); animation: bob 2.4s infinite; }

/* ---------- 区域地图 ---------- */
.area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.area-card {
  position: relative;
  border: 3px solid #fff; border-radius: 24px;
  background: linear-gradient(150deg, #ffffff, #f3f9ff);
  padding: 18px 12px 14px; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  box-shadow: var(--shadow);
  color: var(--ink); cursor: pointer;
  transition: transform .12s;
}
.area-card:active { transform: translateY(4px) scale(.97); box-shadow: 0 1px 0 rgba(78, 52, 46, .18); }
.aicon {
  width: 58px; height: 58px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
}
.aicon svg { width: 34px; height: 34px; }
.aname { font-size: 21px; font-weight: 900; line-height: 1.25; white-space: nowrap; }
.adesc { font-size: 13px; color: #8d6e63; font-weight: 700; white-space: nowrap; }
/* 锁定态：文字排布与解锁态一致，仅整体半透明灰化 */
.area-card.locked { filter: saturate(.3) grayscale(.35); opacity: .85; }
.area-card.locked .aicon, .area-card.locked .aname, .area-card.locked .adesc { opacity: .6; }
/* 锁提示：右上角小尺寸角标，不遮挡标题/副标题 */
.alock {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff;
  border: 2px solid rgba(141, 110, 99, .32);
  color: #8d6e63; font-weight: 900; font-size: 12px; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(78, 52, 46, .12);
  pointer-events: none;
}
.alock svg { width: 14px; height: 14px; }

/* ---------- 每日任务 ---------- */
.task-panel {
  background: #fff; border: 3px solid #b39ddb; border-radius: 22px;
  padding: 10px 16px; box-shadow: var(--shadow);
}
.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; font-size: 17px; font-weight: 700;
}
.task-item + .task-item { border-top: 2px dashed #ede3ff; }
.task-check {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #cfd8dc; background: #fafafa;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex: 0 0 34px;
}
.task-check svg { width: 20px; height: 20px; }
.task-item.done .task-check { background: var(--green-d); border-color: var(--green-d); }
.task-item.done .task-name { color: var(--green-d); }
.task-ic svg { width: 24px; height: 24px; color: var(--orange); }
.task-name { flex: 1; }
.task-prog { font-weight: 900; color: var(--orange-d); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; gap: 10px; padding: 10px 18px calc(14px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 3px solid #ffe0b2;
  box-shadow: 0 -4px 0 rgba(124, 77, 255, .08);
}
.tab {
  flex: 1; height: 62px;
  border-radius: 20px; border: 3px solid transparent;
  background: #faf3ea; color: #a1887f;
  font-size: 16px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: transform .12s;
}
.tab svg { width: 26px; height: 26px; }
.tab.active { background: linear-gradient(145deg, #ede3ff, #e1d2ff); color: var(--purple-d); border-color: #fff; box-shadow: var(--shadow); }
.tab:active { transform: translateY(3px); }

/* ---------- 游戏中心 ---------- */
.filter-bar {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 6px 2px 14px;
  touch-action: pan-x; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto; min-height: 44px; padding: 8px 18px;
  border-radius: 999px; border: 3px solid #fff;
  background: #fff; color: #8d6e63;
  font-size: 16px; font-weight: 900; cursor: pointer;
  box-shadow: 0 3px 0 rgba(78, 52, 46, .12);
}
.fchip.on { background: linear-gradient(145deg, #7c4dff, #651fff); color: #fff; border-color: #fff; }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.game-card {
  border: 3px solid #fff; border-radius: 26px;
  background: linear-gradient(150deg, #ffffff, #f6f3ff);
  padding: 20px 12px 18px; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow); color: var(--ink);
  cursor: pointer; transition: transform .12s;
}
.game-card:active { transform: translateY(4px) scale(.97); box-shadow: 0 1px 0 rgba(78, 52, 46, .18); }
.gicon { width: 66px; height: 66px; border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.gicon svg { width: 38px; height: 38px; }
.gname { font-size: 20px; font-weight: 900; }
.gdesc { font-size: 13px; color: #8d6e63; font-weight: 700; }

/* ---------- 游戏舞台 ---------- */
.learn-stage { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.stage-top { padding: 6px 18px 0; }
.stage-title { text-align: center; font-size: 16px; font-weight: 900; color: #8d6e63; }
.stage-dots { display: flex; justify-content: center; gap: 8px; padding: 8px 0 4px; }
.stage-dots i { width: 12px; height: 12px; border-radius: 50%; background: #efe5d8; border: 2px solid #d7ccc8; }
.stage-dots i.on { background: var(--orange); border-color: var(--orange-d); transform: scale(1.15); }
.stage-body {
  flex: 1; display: flex; flex-direction: column; overflow-y: auto;
  padding: 10px 20px 26px;
  touch-action: pan-y;
}

/* ---------- 结果面板 ---------- */
.result-panel {
  margin: auto 0;
  background: #fff; border: 4px solid #ffd180; border-radius: 30px;
  padding: 26px 22px; text-align: center;
  box-shadow: var(--shadow);
  animation: popIn .45s cubic-bezier(.3, 1.4, .5, 1);
}
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }
.result-panel h2 { margin: 0 0 6px; font-size: 27px; color: var(--purple-d); }
.rdesc { font-size: 16px; font-weight: 700; color: #8d6e63; margin-bottom: 14px; }
.rstars { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.rstars svg { width: 46px; height: 46px; animation: starIn .6s backwards; }
.rstars svg:nth-child(1) { animation-delay: .1s; } .rstars svg:nth-child(2) { animation-delay: .2s; }
.rstars svg:nth-child(3) { animation-delay: .3s; } .rstars svg:nth-child(4) { animation-delay: .4s; }
.rstars svg:nth-child(5) { animation-delay: .5s; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); } }
.btn-row { display: flex; gap: 12px; justify-content: center; }
.btn {
  min-height: 56px; padding: 10px 22px;
  border-radius: 18px; border: 3px solid #fff;
  font-size: 19px; font-weight: 900; color: #fff; cursor: pointer;
  box-shadow: var(--shadow), inset 0 -4px 0 rgba(0, 0, 0, .12);
  transition: transform .12s;
}
.btn:active { transform: translateY(4px) scale(.96); box-shadow: 0 1px 0 rgba(78, 52, 46, .18); }
.btn svg { width: 24px; height: 24px; }
.btn.blue { background: linear-gradient(145deg, #4fc3f7, #29b6f6); }
.btn.green { background: linear-gradient(145deg, #81c784, #66bb6a); }

/* ---------- 连击徽章（并入 topbar 的紧凑样式，不遮挡游戏内容） ---------- */
.combo-badge {
  display: none; align-items: center; gap: 4px; flex: 0 0 auto;
  background: linear-gradient(145deg, #ff7043, #f4511e);
  color: #fff; font-size: 14px; font-weight: 900; white-space: nowrap;
  padding: 5px 12px; border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(244, 81, 30, .35);
  pointer-events: none;
  animation: comboPop .35s;
}
.combo-badge.show { display: inline-flex; }
.combo-badge svg { width: 16px; height: 16px; }
@keyframes comboPop { 40% { transform: scale(1.18) rotate(-3deg); } }

/* ---------- 通用：喇叭 / 时间条 / 抖动 ---------- */
.speaker-btn {
  width: 66px; height: 66px; flex: 0 0 66px;
  border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(145deg, #ffd54f, #ffb300);
  color: #fff; cursor: pointer;
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s;
}
.speaker-btn svg { width: 34px; height: 34px; }
.speaker-btn:active { transform: translateY(3px) scale(.95); }
.pz-spk {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(145deg, #ffd54f, #ffb300);
  color: #fff; cursor: pointer;
  box-shadow: 0 3px 0 rgba(78, 52, 46, .18);
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; margin-left: 8px;
}
.pz-spk svg { width: 24px; height: 24px; }
.timebar {
  height: 16px; border-radius: 999px; overflow: hidden;
  background: #efe5d8; border: 2px solid #d7ccc8;
  margin: 8px 0 12px;
}
.timebar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #66bb6a, #43a047); transition: width .5s linear; }
.timebar.low i { background: linear-gradient(90deg, #ff7043, #f4511e); animation: pulse .6s infinite alternate; }
@keyframes pulse { to { filter: brightness(1.25); } }
.shake { animation: shake .4s; }
@keyframes shake {
  20% { transform: translateX(-7px) rotate(-3deg); }
  40% { transform: translateX(7px) rotate(3deg); }
  60% { transform: translateX(-5px) rotate(-2deg); }
  80% { transform: translateX(5px) rotate(2deg); }
}

/* ============================================================
   1. 字母泡泡
   ============================================================ */
.bubble-body { padding: 0 !important; overflow: hidden; }
.bubble-field { position: relative; flex: 1; overflow: hidden; margin: 6px 14px; border-radius: 22px; background: linear-gradient(180deg, #d6f0ff, #f3e5f5); border: 3px solid #b3e5fc; }
.bubble {
  position: absolute; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .85);
  color: #fff; font-weight: 900;
  box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .12), 0 4px 10px rgba(78, 52, 46, .18);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bubble::after { content: ''; position: absolute; top: 10%; left: 16%; width: 26%; height: 18%; background: rgba(255, 255, 255, .55); border-radius: 50%; transform: rotate(-28deg); }
.bubble.pop { animation: bubblePop .45s forwards; pointer-events: none; }
@keyframes bubblePop { 50% { transform: scale(1.45); opacity: .9; } 100% { transform: scale(0); opacity: 0; } }
.bubble-hud {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 22px 16px;
}
.bubble-prompt { font-size: 20px; font-weight: 900; color: var(--ink); display: flex; align-items: center; }
.bubble-prompt .en { color: var(--purple-d); font-size: 30px; margin: 0 4px; text-shadow: 0 2px 0 #fff; }
.bubble-score { font-size: 17px; font-weight: 900; color: #8d6e63; background: #fff; border: 2px solid #ffe0b2; border-radius: 999px; padding: 6px 14px; }

/* ============================================================
   2. 拼读小火车
   ============================================================ */
.tr-hint { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 0 2px; }
.tr-emoji { font-size: 52px; filter: drop-shadow(0 3px 0 rgba(78, 52, 46, .15)); }
.tr-zh { font-size: 25px; font-weight: 900; color: var(--green-d); text-shadow: 0 2px 0 #fff; }
.tr-train {
  position: relative; margin: 16px auto 6px; left: 0;
  display: flex; align-items: flex-end; justify-content: center; gap: 8px;
  width: max-content; max-width: 100%;
  transition: transform 1s cubic-bezier(.4, 0, .6, 1);
}
.tr-train.depart { transform: translateX(140vw); }
.tr-engine { position: relative; width: 84px; height: 74px; flex: 0 0 84px; }
.tr-engine .cab {
  position: absolute; left: 6px; bottom: 12px; width: 72px; height: 44px;
  background: linear-gradient(145deg, #ef5350, #d32f2f);
  border: 4px solid #6d4c41; border-radius: 12px 16px 6px 6px;
}
.tr-engine .cab::after { content: ''; position: absolute; left: 10px; top: 8px; width: 24px; height: 16px; background: #b3e5fc; border: 3px solid #6d4c41; border-radius: 6px; }
.tr-engine .chimney {
  position: absolute; left: 14px; top: -4px; width: 18px; height: 18px;
  background: #6d4c41; border-radius: 5px;
}
.tr-engine .wheel1, .tr-engine .wheel2 {
  position: absolute; bottom: 0; width: 26px; height: 26px;
  background: #78909c; border: 4px solid #37474f; border-radius: 50%;
}
.tr-engine .wheel1 { left: 6px; } .tr-engine .wheel2 { right: 6px; }
.tr-slots { display: flex; gap: 8px; align-items: flex-end; }
.tr-slot {
  position: relative; width: 58px; height: 62px;
  background: linear-gradient(160deg, #c8e6c9, #a5d6a7);
  border: 4px solid #2e7d32; border-radius: 10px 10px 14px 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.tr-slot .tr-slot-idx { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 900; color: #2e7d32; background: #fff; border-radius: 999px; padding: 1px 7px; border: 2px solid #a5d6a7; }
.tr-slot::after, .tr-slot::before {
  content: ''; position: absolute; bottom: -8px;
  width: 15px; height: 15px; background: #37474f; border-radius: 50%;
}
.tr-slot::before { left: 6px; } .tr-slot::after { right: 6px; }
.tr-slot.filled { background: linear-gradient(160deg, #ffcc80, #ffa726); border-color: #e65100; animation: popIn .3s; }
.tr-cars { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 18px 4px 8px; }
.tr-car {
  width: 66px; height: 66px;
  background: linear-gradient(145deg, #fff, #ffe0b2);
  border: 3px solid #ffb300; border-radius: 16px;
  font-size: 32px; font-weight: 900; color: var(--ink);
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s;
}
.tr-car:active { transform: translateY(4px) scale(.95); box-shadow: 0 1px 0 rgba(78, 52, 46, .18); }
.tr-car.used { opacity: .25; pointer-events: none; transform: scale(.85); }

/* ============================================================
   3. 消消乐
   ============================================================ */
.mhud { display: flex; justify-content: space-between; gap: 10px; padding: 2px 4px 8px; }
.mscore, .mtime {
  font-size: 18px; font-weight: 900;
  background: #fff; border: 3px solid #d1c4e9; border-radius: 999px;
  padding: 8px 16px; color: var(--purple-d);
}
.mtime { color: var(--orange-d); border-color: #ffe0b2; }
.match-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 4px 2px;
}
.mcard {
  min-height: 96px;
  border-radius: 18px; border: 3px solid #fff;
  background: linear-gradient(150deg, #ffffff, #fff8e1);
  box-shadow: var(--shadow); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
  touch-action: manipulation;
}
.mcard:active { transform: translateY(3px) scale(.96); }
.mcard.sel { transform: translateY(-4px) scale(1.05); border-color: #7c4dff; box-shadow: 0 8px 0 rgba(124, 77, 255, .18); }
.mcard.gone { animation: mGone .4s forwards; pointer-events: none; }
@keyframes mGone { 60% { transform: scale(1.2) rotate(6deg); opacity: 1; } 100% { transform: scale(0); opacity: 0; } }
.mc-face { display: block; text-align: center; }
.mc-emoji { font-size: 44px; }
.mc-word { font-size: 21px; font-weight: 900; color: var(--purple-d); word-break: break-all; padding: 2px; }

/* ============================================================
   4. 捉小偷
   ============================================================ */
.thief-row { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 4px; }
.thief-hint { font-size: 15px; font-weight: 700; color: #8d6e63; }
.thief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 12px; }
.thief-card {
  min-height: 190px;
  border-radius: 24px; border: 4px solid #fff;
  background: linear-gradient(150deg, #ffffff, #e3f2fd);
  box-shadow: var(--shadow); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s;
  color: var(--ink);
}
.thief-card:active { transform: translateY(4px) scale(.96); }
.tc-emoji { font-size: 72px; line-height: 1.1; filter: drop-shadow(0 3px 0 rgba(78, 52, 46, .12)); }
.tc-zh { font-size: 18px; font-weight: 900; color: #8d6e63; }
.thief-card.caught { animation: caught .9s forwards; border-color: #66bb6a; }
@keyframes caught {
  25% { transform: rotate(-6deg) scale(1.08); }
  50% { transform: rotate(6deg) scale(1.12); }
  75% { transform: rotate(-4deg) scale(1.05); }
}
.thief-card.caught::after {
  content: '落网！'; position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  background: var(--green-d); color: #fff; font-size: 17px; font-weight: 900;
  padding: 4px 14px; border-radius: 999px; border: 2px solid #fff;
  box-shadow: var(--shadow); z-index: 2;
}
.thief-card.caught .tc-zh { color: var(--green-d); }
.thief-card.wrongcard { animation: shake .4s; border-color: var(--red); background: linear-gradient(150deg, #fff, #ffebee); }

/* ============================================================
   5. 单词贪吃蛇
   ============================================================ */
.sk-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 8px; }
.sk-word { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sk-emoji { font-size: 38px; }
.sk-zh { font-size: 24px; font-weight: 900; color: var(--purple-d); text-shadow: 0 2px 0 #fff; }
.sk-letters { display: flex; gap: 4px; }
.sk-letters b {
  width: 34px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 3px solid #ffe0b2; border-radius: 10px;
  font-size: 22px; color: #bcaaa4; font-weight: 900;
}
.sk-letters b.cur { border-color: #ff9800; color: var(--orange-d); background: #fff8e1; animation: pulse .8s infinite alternate; }
.sk-letters b.got { border-color: #66bb6a; color: var(--green-d); background: #f1f8e9; }
.sk-time { font-size: 17px; font-weight: 900; color: var(--orange-d); background: #fff; border: 2px solid #ffe0b2; border-radius: 999px; padding: 6px 12px; }
.sk-field {
  position: relative; flex: 1; min-height: 420px;
  border-radius: 24px; overflow: hidden;
  border: 3px solid #c5e1a5;
  background: linear-gradient(180deg, #dcedc8, #c5e1a5);
}
.sk-field::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(139, 195, 74, .16) 0 2px, transparent 2px 64px);
}
.sk-chip {
  position: absolute; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff, #ffe082 65%);
  border: 3px solid #ffb300;
  font-size: 27px; font-weight: 900; color: var(--ink);
  box-shadow: 0 4px 0 rgba(78, 52, 46, .2);
  cursor: pointer; z-index: 5;
  animation: bob 2.2s ease-in-out infinite;
}
.sk-chip:nth-child(2n) { animation-delay: .5s; }
.sk-chip:active { transform: scale(.9); }
.sk-cat { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; z-index: 6; }
.sk-head {
  position: absolute; inset: 6px;
  background: linear-gradient(160deg, #ffcc80, #ff9800);
  border: 3px solid #6d4c41; border-radius: 50%;
}
.sk-ear {
  position: absolute; top: -7px; width: 22px; height: 22px;
  background: #ff9800; border: 3px solid #6d4c41; border-radius: 6px 50% 50% 50%;
  transform: rotate(45deg);
}
.sk-ear.l { left: 4px; } .sk-ear.r { right: 4px; }
.sk-eye {
  position: absolute; top: 20px; width: 11px; height: 13px;
  background: #4e342e; border-radius: 50%;
}
.sk-eye.l { left: 15px; } .sk-eye.r { right: 15px; }
.sk-nose {
  position: absolute; top: 32px; left: 50%; margin-left: -4px;
  width: 8px; height: 6px; background: #ff8a9b; border-radius: 50%;
}
.sk-seg {
  position: absolute; width: 34px; height: 30px; margin: -15px 0 0 -17px;
  background: linear-gradient(160deg, #ffcc80, #ffa726);
  border: 3px solid #6d4c41; border-radius: 40% 40% 50% 50%;
  z-index: 5;
}

/* ============================================================
   6. 僵尸单词战
   ============================================================ */
.pz-field {
  flex: 1; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #dcedc8, #aed581);
  border-top: 3px solid #9ccc65; border-bottom: 3px solid #9ccc65;
  display: flex; flex-direction: column;
}
.pz-field.hit { animation: hitFlash .3s; }
@keyframes hitFlash { 50% { filter: brightness(1.2) saturate(1.4) hue-rotate(-18deg); } }
.pz-lanes { flex: 1; display: flex; flex-direction: column; }
.pz-lane { position: relative; flex: 1; border-bottom: 3px dashed rgba(124, 179, 66, .5); }
.pz-lane.alt { background: rgba(255, 255, 255, .12); }
.pz-lane:last-child { border-bottom: none; }
.pz-base { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 86px; height: 74px; z-index: 3; }
.pz-shooter {
  position: relative; width: 66px; height: 60px; margin: 10px;
  background: radial-gradient(circle at 35% 30%, #aed581, #558b2f);
  border: 3px solid #33691e; border-radius: 46% 46% 42% 42%;
}
.pz-shooter::after {
  content: ''; position: absolute; left: 50%; top: 12px; margin-left: -9px;
  width: 18px; height: 14px; background: #33691e; border-radius: 40%;
}
.pz-shooter::before {
  content: ''; position: absolute; right: -6px; top: 4px;
  width: 20px; height: 10px; background: #7cb342; border: 3px solid #33691e; border-radius: 999px;
}
.pz-zombie { position: absolute; right: 6px; top: 50%; margin-top: -54px; width: 96px; height: 108px; z-index: 4; cursor: pointer; touch-action: manipulation; }
.pz-plate {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%) rotate(-3deg);
  min-width: 92px; max-width: 150px; padding: 7px 12px; text-align: center;
  background: #fff; border: 3px solid #f57c00; border-radius: 12px;
  font-size: 20px; font-weight: 900; color: var(--ink);
  box-shadow: 0 4px 0 rgba(78, 52, 46, .18);
  word-break: break-all;
}
.pz-z {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 62px; height: 70px;
  background: radial-gradient(circle at 40% 30%, #c0ca33, #7b8725);
  border: 3px solid #494f0a; border-radius: 40% 40% 30% 30%;
}
.pz-z::before, .pz-z::after {
  content: ''; position: absolute; top: 24px; width: 18px; height: 12px;
  background: #fff; border: 3px solid #494f0a; border-radius: 50%;
}
.pz-z::before { left: 9px; } .pz-z::after { right: 9px; }
.pz-zombie.dead .pz-z, .pz-zombie.dead .pz-plate { animation: zDead .5s forwards; }
@keyframes zDead { to { transform: translate(-50%, 30px) rotate(70deg) scale(.4); opacity: 0; } }
.pz-zombie.dead .pz-plate { animation-name: zDeadPlate; }
@keyframes zDeadPlate { to { transform: translateX(-50%) rotate(70deg) scale(.3); opacity: 0; } }
.pz-zombie.leaked { transition: opacity .4s; opacity: 0; }
.pz-pea {
  position: absolute; top: 50%; margin-top: -10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c5e1a5, #558b2f);
  border: 3px solid #33691e; z-index: 5;
}
.pz-hud {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: rgba(255, 255, 255, .82);
  border-top: 3px solid #ffd180;
}
.pz-hearts { display: flex; gap: 3px; }
.pz-hearts svg, .pz-kills svg { width: 30px; height: 30px; }
.pz-kills { display: flex; align-items: center; gap: 6px; font-size: 19px; font-weight: 900; color: var(--green-d); }
.pz-kills svg { color: #7b8725; }
.pz-prompt {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(145deg, #fff, #fff8e1);
  border-top: 3px solid #ffd180;
  padding: 12px 18px; min-height: 88px;
}
.pz-txt { flex: 1; }
.pz-pt { font-size: 14px; font-weight: 700; color: #8d6e63; }
.pz-big { display: flex; align-items: center; gap: 10px; font-size: 27px; font-weight: 900; color: var(--orange-d); text-shadow: 0 2px 0 #fff; }
.pz-emoji { font-size: 40px; }

/* ---------- 弹窗 / Toast ---------- */
.modal-mask {
  position: absolute; inset: 0; background: rgba(78, 52, 46, .38);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .15s; z-index: 1000; padding: 24px;
}
.modal {
  background: #fff; border: 4px solid #ffd180; border-radius: 28px;
  padding: 24px; max-width: 520px; width: 100%;
  box-shadow: var(--shadow);
  animation: popIn .35s cubic-bezier(.3, 1.4, .5, 1);
  max-height: 80vh; overflow-y: auto;
}
.toast {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%);
  background: rgba(78, 52, 46, .88); color: #fff;
  font-size: 17px; font-weight: 700;
  padding: 12px 26px; border-radius: 999px;
  z-index: 1100; pointer-events: none;
  animation: toastIn .2s;
}
@keyframes toastIn { from { transform: translate(-50%, 16px); opacity: 0; } }

/* ---------- 平板适配 ---------- */
@media (max-width: 560px) {
  .logo-block { width: 44px; height: 50px; font-size: 25px; }
  .cat-wrap { flex-basis: 210px; height: 210px; }
  .thief-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .tc-emoji { font-size: 52px; }
  .tr-slot { width: 46px; height: 52px; font-size: 25px; }
  .tr-car { width: 56px; height: 56px; font-size: 27px; }
  .mcard { min-height: 78px; }
  .mc-emoji { font-size: 36px; }
  .mc-word { font-size: 17px; }
  .pz-zombie { width: 84px; }
  .pz-plate { font-size: 17px; min-width: 80px; }
}
@media (min-width: 1000px) {
  .screen-body { max-width: 900px; margin: 0 auto; width: 100%; }
  .stage-body { max-width: 900px; margin: 0 auto; width: 100%; }
}
