/* ============================================================
 * 海底小纵队·学习乐园 —— 样式
 * 海洋主题 · 大按钮 · 儿童友好 · 竖屏优先
 * ============================================================ */

:root {
  --ocean-1: #0A2C4E;
  --ocean-2: #12588C;
  --ocean-3: #2E8FBF;
  --ocean-4: #7EC8E3;
  --ink: #23384D;
  --ink-soft: #5A6E82;
  --card: #FFFFFF;
  --yellow: #F4C542;
  --orange: #F08A24;
  --red: #D9534F;
  --green: #43A047;
  --blue: #3D8BD4;
  --purple: #8E5AC8;
  --shadow: 0 8px 0 rgba(10, 44, 78, 0.18);
  --radius: 26px;
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Heiti SC", "WenQuanYi Micro Hei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--ocean-1) 0%, var(--ocean-2) 40%, var(--ocean-3) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* ---------- 背景装饰 ---------- */
.bg {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,0.85), rgba(255,255,255,0.12) 55%, rgba(255,255,255,0.05));
  animation: bubbleRise linear infinite;
  opacity: 0;
}
@keyframes bubbleRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: 0.75; }
  88% { opacity: 0.5; }
  100% { transform: translateY(-108vh) translateX(26px); opacity: 0; }
}
.seaweed {
  position: absolute;
  bottom: 0;
  width: 90px;
  opacity: 0.22;
}
.seaweed.left { left: -12px; }
.seaweed.right { right: -12px; transform: scaleX(-1); }

/* ---------- 布局 ---------- */
#app {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 14px 16px 40px;
  min-height: 100vh;
}

.screen { display: none; animation: screenIn 0.38s ease; }
.screen.active { display: block; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 通用元素 ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 22px;
  padding: 14px 30px;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(180deg, #F0A63C 0%, var(--orange) 100%);
  box-shadow: 0 6px 0 #C96A12, 0 10px 18px rgba(10,44,78,0.25);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  text-align: center;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #C96A12, 0 4px 8px rgba(10,44,78,0.25); }
.btn.green { background: linear-gradient(180deg, #5CB860 0%, var(--green) 100%); box-shadow: 0 6px 0 #2F7A32, 0 10px 18px rgba(10,44,78,0.25); }
.btn.green:active { box-shadow: 0 2px 0 #2F7A32, 0 4px 8px rgba(10,44,78,0.25); }
.btn.blue { background: linear-gradient(180deg, #5FA4E4 0%, var(--blue) 100%); box-shadow: 0 6px 0 #2A66A8, 0 10px 18px rgba(10,44,78,0.25); }
.btn.blue:active { box-shadow: 0 2px 0 #2A66A8, 0 4px 8px rgba(10,44,78,0.25); }
.btn.ghost {
  background: rgba(255,255,255,0.92);
  color: var(--ocean-2);
  box-shadow: 0 5px 0 rgba(10,44,78,0.22), 0 8px 14px rgba(10,44,78,0.2);
}
.btn.ghost:active { box-shadow: 0 2px 0 rgba(10,44,78,0.22); }
.btn.small { font-size: 17px; padding: 10px 20px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.94);
  color: var(--ocean-2);
  box-shadow: 0 4px 0 rgba(10,44,78,0.22), 0 8px 14px rgba(10,44,78,0.18);
  cursor: pointer;
  transition: transform 0.08s ease;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(10,44,78,0.22); }
.icon-btn .mini-svg { width: 26px; height: 26px; }
.mini-svg { display: inline-block; vertical-align: middle; width: 22px; height: 22px; }
.btn .mini-svg { width: 20px; height: 20px; }

/* ---------- 角色 & 对话气泡 ---------- */
.char-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.15s ease;
  text-align: center;
}
.char-wrap .char-name {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  background: rgba(10, 44, 78, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 2px 12px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.char-wrap:active { transform: scale(0.94); }
.char-wrap .char-svg {
  display: block;
  filter: drop-shadow(0 8px 14px rgba(6, 30, 52, 0.35));
}
.char-wrap.floaty .char-svg { animation: charFloat 3.2s ease-in-out infinite; }
@keyframes charFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.char-svg .eye {
  animation: charBlink 4.6s infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes charBlink {
  0%, 90%, 100% { transform: scaleY(1); }
  93% { transform: scaleY(0.08); }
  96% { transform: scaleY(1); }
}
.char-wrap.speaking::after {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 4px solid rgba(244, 197, 66, 0.9);
  animation: speakPulse 1s ease-out infinite;
}
@keyframes speakPulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.18); opacity: 0; }
}
.char-wrap.speaking { animation: speakBounce 0.6s ease infinite; }
@keyframes speakBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.speech {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 16px 20px;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(6, 30, 52, 0.3);
  animation: pop 0.35s ease;
}
.speech::before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 4px;
}
.speech.tail-left::before { left: -8px; top: 38px; }
.speech.tail-top::before { left: 44px; top: -8px; }
.speech .hint {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.speech .hint .mini-svg { width: 16px; height: 16px; }

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

/* ---------- 标题 ---------- */
.title-block { text-align: center; padding: 6px 0 4px; }
.game-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 3px 0 rgba(10,44,78,0.5), 0 8px 20px rgba(6,30,52,0.5);
  line-height: 1.25;
}
.game-title .accent { color: var(--yellow); }
.game-subtitle {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #CDE8F7;
  letter-spacing: 1px;
}

/* ---------- 首页 ---------- */
.home-hero { display: flex; align-items: flex-start; margin-top: 16px; }
.home-hero .char-wrap { width: 148px; flex: 0 0 148px; }
.home-hero .char-wrap .char-svg { width: 148px; height: 148px; }
.home-hero .speech { flex: 1; margin-left: 14px; margin-top: 18px; }

.subject-row {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
}
.subject-card {
  flex: 1;
  margin: 0 5px;
  border: none;
  border-radius: var(--radius);
  padding: 14px 6px 16px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  background: #fff;
  box-shadow: 0 9px 0 rgba(10, 44, 78, 0.22), 0 14px 22px rgba(6, 30, 52, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.subject-card:active { transform: translateY(6px); box-shadow: 0 3px 0 rgba(10,44,78,0.22); }
.subject-card .char-svg { width: 84px; height: 84px; }
.subject-card .subj-name {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
}
.subject-card .subj-desc {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.subject-card.zh .subj-name { color: var(--red); }
.subject-card.math .subj-name { color: var(--blue); }
.subject-card.en .subj-name { color: var(--green); }
.subject-card .subj-icon { width: 34px; height: 34px; margin: 0 auto 2px; }

.home-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}
.home-bottom .btn { margin: 0 7px; }
.home-bottom .icon-btn { margin: 0 7px; }

.home-note {
  margin-top: 26px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.62);
  font-weight: 600;
}

/* ---------- 科目页 ---------- */
.top-bar { display: flex; align-items: center; margin-bottom: 10px; }
.top-bar .title-chip {
  flex: 1;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 0 rgba(10,44,78,0.45);
  letter-spacing: 2px;
}
.top-bar .right-slot { width: 52px; }

.subject-hero { display: flex; align-items: flex-start; margin-top: 8px; }
.subject-hero .char-wrap { width: 130px; flex: 0 0 130px; }
.subject-hero .char-wrap .char-svg { width: 130px; height: 130px; }
.subject-hero .speech { flex: 1; margin-left: 12px; margin-top: 12px; font-size: 18px; }

.mode-grid { margin-top: 20px; }
.mode-card {
  display: flex;
  align-items: center;
  width: 100%;
  border: none;
  border-radius: 22px;
  background: #fff;
  padding: 14px 18px;
  margin-bottom: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 7px 0 rgba(10, 44, 78, 0.2), 0 12px 20px rgba(6, 30, 52, 0.26);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.mode-card:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(10,44,78,0.2); }
.mode-card .mode-icon { width: 64px; height: 64px; flex: 0 0 64px; }
.mode-card .mode-info { flex: 1; margin-left: 14px; }
.mode-card .mode-title { font-size: 23px; font-weight: 900; color: var(--ink); }
.mode-card .mode-sub { font-size: 14px; font-weight: 700; color: var(--ink-soft); margin-top: 3px; }
.mode-card .mode-go {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--yellow);
  color: #7A5A00;
  display: flex; align-items: center; justify-content: center;
}
.mode-card .mode-go .mini-svg { width: 22px; height: 22px; }
.mode-card .mode-stars {
  flex: 0 0 auto;
  font-size: 20px;
  margin-right: 6px;
  min-width: 40px;
  text-align: right;
}

/* ---------- 游戏页 ---------- */
.game-top { display: flex; align-items: center; margin-bottom: 8px; }
.shells {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
}
.shells .mini-svg { width: 26px; height: 26px; margin: 0 2px; color: var(--yellow); }
.shells .empty .mini-svg, .shells .mini-svg.empty { color: rgba(255,255,255,0.45); }

.game-stage { position: relative; }
.game-char-bar { display: flex; align-items: flex-start; margin-top: 4px; }
.game-char-bar .char-wrap { width: 96px; flex: 0 0 96px; }
.game-char-bar .char-wrap .char-svg { width: 96px; height: 96px; }
.game-char-bar .speech { flex: 1; margin-left: 10px; margin-top: 4px; font-size: 18px; padding: 12px 16px; }

.q-panel {
  margin-top: 16px;
  background: rgba(255,255,255,0.14);
  border: 3px solid rgba(255,255,255,0.38);
  border-radius: var(--radius);
  padding: 18px 14px 20px;
  backdrop-filter: none;
}
.q-prompt {
  text-align: center;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 2px 0 rgba(10,44,78,0.35);
  min-height: 28px;
}
.q-prompt .big { font-size: 34px; color: var(--yellow); letter-spacing: 2px; }

.options { display: flex; flex-wrap: wrap; justify-content: center; }
.opt {
  border: none;
  font-family: inherit;
  cursor: pointer;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 7px 0 rgba(10, 44, 78, 0.22), 0 10px 18px rgba(6, 30, 52, 0.28);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
}
.opt:active { transform: translateY(4px) scale(0.98); box-shadow: 0 2px 0 rgba(10,44,78,0.22); }
.opt.dim { opacity: 0.4; pointer-events: none; }
.opt.correct {
  background: #DFF5E1;
  box-shadow: 0 0 0 5px var(--green), 0 7px 0 rgba(10, 44, 78, 0.22);
  animation: optPop 0.5s ease;
}
@keyframes optPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  70% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.opt.wrong {
  background: #FDE7E7;
  box-shadow: 0 0 0 5px var(--red), 0 7px 0 rgba(10, 44, 78, 0.22);
  animation: optShake 0.5s ease;
}
@keyframes optShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}
.opt.reveal {
  animation: optPulse 0.9s ease infinite;
  box-shadow: 0 0 0 5px var(--yellow), 0 7px 0 rgba(10, 44, 78, 0.22);
}
@keyframes optPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
/* 汉字选项 */
.opts-chars .opt { width: 128px; height: 128px; margin: 8px; }
.opts-chars .opt .zi {
  font-size: 68px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.opts-chars .opt .py { font-size: 17px; color: var(--ink-soft); font-weight: 700; margin-top: 6px; display: none; }
.opts-chars .opt.show-py .py { display: block; }
/* 词语选项 */
.opts-words .opt { padding: 16px 22px; margin: 8px; }
.opts-words .opt .word { font-size: 38px; font-weight: 800; color: var(--ink); letter-spacing: 4px; }
/* 英语图标选项 */
.opts-icons .opt { width: 150px; height: 168px; margin: 8px; }
.opts-icons .opt .char-svg { width: 96px; height: 96px; }
.opts-icons .opt .label {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: 0.5px;
}
/* 英语单词选项 */
.opts-enwords .opt { width: 150px; height: 110px; margin: 8px; }
.opts-enwords .opt .word {
  font-size: 30px;
  font-weight: 900;
  color: var(--ink);
  font-family: "Comic Sans MS", "Segoe UI", Arial, sans-serif;
  letter-spacing: 1px;
}
/* 数字/普通选项 */
.opts-nums .opt { width: 128px; height: 118px; margin: 8px; }
.opts-nums .opt .num { font-size: 54px; font-weight: 900; color: var(--ink); font-family: Arial, sans-serif; }
.opts-nums .opt .num.small { font-size: 40px; letter-spacing: 1px; }
/* 颜色选项 */
.opts-colors .opt { width: 118px; height: 118px; margin: 8px; border-radius: 50%; padding: 0; }
.opts-colors .opt .swatch { width: 100%; height: 100%; border-radius: 50%; }

/* 百板题面 */
.b100-grid { display: flex; flex-direction: column; align-items: center; margin-bottom: 8px; }
.b100-row { display: flex; }
.b100-cell {
  width: 68px; height: 68px;
  margin: 4px;
  background: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--ink);
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 0 rgba(10,44,78,0.18);
}
.b100-cell.blank {
  background: rgba(255,255,255,0.28);
  border: 3px dashed rgba(255,255,255,0.75);
  color: transparent;
  position: relative;
  box-shadow: none;
}
.b100-cell.blank::after {
  content: "?";
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  font-size: 38px;
}
.b100-cell.ghost { opacity: 0.28; }

/* 贝壳加法题面 */
.add-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
  min-height: 64px;
}
.add-visual .grp { display: flex; flex-wrap: wrap; justify-content: center; max-width: 300px; margin: 4px 0; }
.add-visual .grp .mini-svg, .add-visual .grp svg { width: 34px; height: 34px; margin: 2px; }
.add-visual .plus {
  font-size: 34px;
  font-weight: 900;
  color: var(--yellow);
  margin: 0 12px;
  text-shadow: 0 2px 0 rgba(10,44,78,0.35);
}
.add-visual .count-chip, .count-chip {
  display: inline-block;
  min-width: 34px;
  height: 34px;
  line-height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--ocean-2);
  font-weight: 900;
  font-size: 19px;
  text-align: center;
  margin: 2px;
}
.add-visual .count-chip.hot, .count-chip.hot { background: var(--yellow); color: #7A5A00; animation: optPop 0.5s; }

/* 位值题面 */
.pv-board {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.pv-col { text-align: center; margin: 0 7px; }
.pv-col .pv-box {
  width: 84px;
  min-height: 70px;
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
}
.pv-col .pv-label {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 0 rgba(10,44,78,0.4);
}
.pv-col .bead {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid #D9A315;
  margin: 2px;
}
.pv-col .bead.flat { width: 30px; height: 30px; border-radius: 8px; }
.pv-col .bead.cube { width: 34px; height: 34px; border-radius: 10px; background: #F6E7D3; border-color: #C9A87B; position: relative; }
.pv-col .bead.cube::after {
  content: "";
  position: absolute; left: 3px; top: 3px; right: 3px; bottom: 3px;
  border-radius: 6px; border: 2px dashed #C9A87B; opacity: 0.7;
}
.pv-col .bead.rod {
  width: 14px; height: 40px; border-radius: 7px;
  background: linear-gradient(180deg, #F6D67C, #E8B93B);
  border: 2px solid #C99418;
}
.pv-num { text-align: center; font-size: 54px; font-weight: 900; color: #fff; letter-spacing: 4px; font-family: Arial, sans-serif; text-shadow: 0 3px 0 rgba(10,44,78,0.45); margin: 4px 0 10px; }

/* 满十进一 */
.carry-stage { text-align: center; }
.carry-tray {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 300px;
  min-height: 66px;
  background: rgba(255,255,255,0.92);
  border-radius: 18px;
  padding: 8px;
  vertical-align: top;
}
.carry-tray .mini-svg, .carry-tray svg { width: 38px; height: 38px; margin: 2px; }
.carry-tray.big-min { min-height: 200px; align-content: flex-start; }
.carry-tray .bundle { width: 44px; height: 56px; margin: 4px; border-radius: 8px; background: linear-gradient(180deg,#F6D67C,#E8B93B); border: 3px solid #C99418; position: relative; }
.carry-tray .bundle::before {
  content: ""; position: absolute; left: -5px; right: -5px; top: 22px; height: 8px;
  background: #C45E2B; border-radius: 4px;
}
.carry-eq { margin: 12px 0; font-size: 30px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 rgba(10,44,78,0.4); }
.carry-btns { margin-top: 8px; }
.carry-btns .btn { margin: 6px; }

/* 反馈飘字 */
.float-plus {
  position: fixed;
  font-size: 44px;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: 0 3px 0 rgba(10,44,78,0.4);
  pointer-events: none;
  z-index: 60;
  animation: floatPlus 1s ease forwards;
}
@keyframes floatPlus {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  25% { opacity: 1; transform: translateY(-18px) scale(1.15); }
  100% { opacity: 0; transform: translateY(-70px) scale(1); }
}

/* ---------- 完成庆祝 ---------- */
.overlay {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(6, 26, 46, 0.72);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay.active { display: flex; }
.celebrate-card {
  background: #fff;
  border-radius: 30px;
  padding: 26px 22px;
  width: 100%;
  max-width: 430px;
  text-align: center;
  animation: pop 0.4s ease;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  position: relative;
}
.celebrate-card .crown { font-size: 44px; line-height: 1; }
.celebrate-card h2 {
  font-size: 30px;
  font-weight: 900;
  color: var(--ocean-2);
  margin: 8px 0 4px;
  letter-spacing: 1px;
}
.celebrate-card .sub { font-size: 17px; font-weight: 700; color: var(--ink-soft); }
.polaroid {
  display: inline-block;
  background: #fff;
  padding: 10px 10px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(6,30,52,0.3);
  transform: rotate(-3deg);
  margin: 16px 8px 8px;
  border: 1px solid #E8EDF2;
}
.polaroid .ph {
  width: 130px; height: 130px;
  border-radius: 8px;
  background: linear-gradient(180deg, #E8F4FB, #CBE7F7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 74px;
}
.polaroid .cap {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  font-family: inherit;
}
.celebrate-card .btn { margin: 8px 6px 0; }
.flash {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 90;
}
.flash.on { animation: flashAnim 0.5s ease; }
@keyframes flashAnim {
  0% { opacity: 0; }
  25% { opacity: 0.95; }
  100% { opacity: 0; }
}
.confetti {
  position: fixed;
  width: 12px; height: 12px;
  top: -20px;
  z-index: 85;
  pointer-events: none;
  animation: confFall linear forwards;
}
@keyframes confFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(560deg); opacity: 0.85; }
}

/* ---------- 相册 ---------- */
.album-grid { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.album-item {
  width: 30%;
  max-width: 150px;
  margin: 8px 1.5%;
  background: #fff;
  border-radius: 12px;
  padding: 8px 8px 10px;
  text-align: center;
  box-shadow: 0 6px 0 rgba(10,44,78,0.2), 0 10px 18px rgba(6,30,52,0.24);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.album-item:active { transform: scale(0.95); }
.album-item .ph {
  height: 92px;
  display: block;
  position: relative;
  border-radius: 8px;
  background: linear-gradient(180deg, #E8F4FB, #CBE7F7);
}
.album-item .ph .em {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
}
.album-item.locked .ph { background: #D7E1EA; }
.album-item.locked .em { opacity: 0.25; filter: grayscale(1); }
.album-item .cap { display: block; margin-top: 6px; font-size: 14px; font-weight: 800; color: var(--ink); }
.album-item .cap.dim { color: #A8B6C4; }
.album-progress { text-align: center; color: #fff; font-weight: 800; font-size: 17px; margin-top: 6px; text-shadow: 0 2px 0 rgba(10,44,78,0.4); }

/* ---------- 家长页 ---------- */
.parent-card {
  background: #fff;
  border-radius: 22px;
  padding: 20px;
  margin-top: 14px;
  box-shadow: 0 8px 0 rgba(10,44,78,0.2), 0 12px 20px rgba(6,30,52,0.24);
}
.parent-card h3 { font-size: 20px; font-weight: 900; color: var(--ocean-2); margin-bottom: 10px; }
.parent-card p, .parent-card li { font-size: 15px; line-height: 1.75; color: var(--ink); font-weight: 600; }
.parent-card ul { padding-left: 20px; }
.kv { display: flex; margin: 6px 0; font-size: 15px; font-weight: 700; }
.kv .k { color: var(--ink-soft); flex: 0 0 110px; }
.kv .v { color: var(--ink); flex: 1; }

/* ---------- 句子卡 ---------- */
.sent-card {
  background: #fff;
  border-radius: 24px;
  padding: 30px 20px;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 8px 0 rgba(10,44,78,0.2);
}
.sent-card .sent-text {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 5px;
  line-height: 1.6;
  color: var(--ink);
}
.sent-card .sent-text .hl { color: var(--orange); }
.sent-card .sent-en {
  font-size: 34px;
  font-weight: 900;
  font-family: "Comic Sans MS", "Segoe UI", Arial, sans-serif;
  color: var(--ocean-2);
  line-height: 1.5;
  letter-spacing: 1px;
}
.sent-card .sent-zh { margin-top: 10px; font-size: 19px; font-weight: 700; color: var(--ink-soft); }
.sent-nav { display: flex; justify-content: center; align-items: center; margin-top: 16px; }
.sent-nav .btn { margin: 0 8px; }
.sent-dots { display: flex; justify-content: center; margin-top: 12px; }
.sent-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.35); margin: 0 4px; }
.sent-dots .dot.on { background: var(--yellow); }

/* 英语闪卡网格 */
.word-grid { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.word-tile {
  width: 30%;
  max-width: 170px;
  margin: 6px 1.5%;
  border: none;
  border-radius: 18px;
  background: #fff;
  padding: 10px 4px 12px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 6px 0 rgba(10,44,78,0.2), 0 9px 16px rgba(6,30,52,0.22);
  transition: transform 0.1s ease;
  position: relative;
}
.word-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(10,44,78,0.2); }
.word-tile .char-svg { width: 74px; height: 74px; }
.word-tile .w { display: block; font-size: 17px; font-weight: 900; color: var(--ink); font-family: "Comic Sans MS", "Segoe UI", Arial, sans-serif; margin-top: 2px; }
.word-tile .z { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.word-tile.done::after {
  content: "";
  position: absolute;
  right: 8px; top: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px #fff;
}
.word-tile.done { background: #EAF7EB; }

/* 主题选择条 */
.theme-row { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.theme-chip {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  margin: 5px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  background: rgba(255,255,255,0.9);
  color: var(--ocean-2);
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(10,44,78,0.2);
}
.theme-chip.on { background: var(--yellow); color: #7A5A00; }
.theme-chip:active { transform: translateY(2px); }

/* ---------- 小屏适配 ---------- */
@media (max-width: 420px) {
  #app { padding: 10px 10px 30px; }
  .game-title { font-size: 32px; }
  .home-hero .char-wrap { width: 112px; flex: 0 0 112px; }
  .home-hero .char-wrap .char-svg { width: 112px; height: 112px; }
  .home-hero .speech { font-size: 17px; padding: 12px 14px; }
  .subject-card .subj-name { font-size: 22px; letter-spacing: 1px; }
  .subject-card .char-svg { width: 68px; height: 68px; }
  .subject-card .subj-desc { display: none; }
  .opts-chars .opt { width: 104px; height: 104px; margin: 6px; }
  .opts-chars .opt .zi { font-size: 56px; }
  .opts-icons .opt { width: 118px; height: 140px; margin: 6px; }
  .opts-icons .opt .char-svg { width: 76px; height: 76px; }
  .opts-nums .opt { width: 104px; height: 98px; margin: 6px; }
  .opts-nums .opt .num { font-size: 42px; }
  .b100-cell { width: 52px; height: 52px; font-size: 24px; margin: 3px; }
  .sent-card .sent-text { font-size: 32px; letter-spacing: 3px; }
  .sent-card .sent-en { font-size: 26px; }
  .vocab { }
}

@media (max-width: 430px) {
  .home-bottom .btn { font-size: 15px; padding: 9px 12px; margin: 0 4px; }
}
/* ---------- 植物鱼彩蛋 ---------- */
.vegi-strip { display: flex; justify-content: center; align-items: flex-end; margin-top: 20px; }
.vegi-chip {
  background: rgba(255,255,255,0.16);
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 18px;
  padding: 6px 8px 4px;
  margin: 0 4px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease;
}
.vegi-chip:active { transform: scale(0.93); }
.vegi-chip .char-svg { width: 52px; height: 52px; display: block; }
.vegi-chip .vn { display: block; font-size: 12px; font-weight: 800; color: #FFFFFF; margin-top: 2px; }
.vegi-chip.hop { animation: vegiHop 0.5s ease; }
@keyframes vegiHop {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-14px) rotate(-4deg); }
  70% { transform: translateY(0) rotate(2deg); }
}
.vegi-tip { text-align: center; font-size: 13px; color: rgba(255,255,255,0.78); font-weight: 700; margin-top: 8px; }
.vegi-pop {
  position: fixed;
  right: 12px;
  bottom: 14px;
  z-index: 72;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transform: translateY(60px) scale(0.6);
  pointer-events: none;
}
.vegi-pop.show { animation: vegiIn 0.45s ease forwards; pointer-events: auto; cursor: pointer; }
@keyframes vegiIn {
  0% { opacity: 0; transform: translateY(60px) scale(0.6); }
  60% { opacity: 1; transform: translateY(-8px) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.vegi-pop.hide { animation: vegiOut 0.45s ease forwards; }
@keyframes vegiOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(40px) scale(0.7); }
}
.vegi-pop .vegi-svg { width: 86px; height: 86px; animation: vegiWiggle 0.7s ease infinite; }
.vegi-pop .vegi-svg .char-svg { width: 86px; height: 86px; filter: drop-shadow(0 6px 12px rgba(6,30,52,0.35)); }
@keyframes vegiWiggle { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.vegi-pop .vegi-bubble {
  background: #FFFFFF;
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(6,30,52,0.35);
  margin: 0 8px 44px 0;
  font-size: 18px;
}
.vegi-pop .vegi-bubble .hint2 { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 700; margin-top: 2px; }
.celebrate-vegi { position: absolute; right: 12px; top: 12px; width: 64px; height: 64px; animation: vegiDance 0.9s ease infinite; }
.celebrate-vegi .char-svg { width: 64px; height: 64px; }
@keyframes vegiDance {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-6px); }
}
/* ---------- 访问口令锁 ---------- */
#lockScreen {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  z-index: 100;
  background: linear-gradient(180deg, #0A2C4E 0%, #12588C 45%, #2E8FBF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
#lockScreen.bye { animation: lockBye 0.26s ease forwards; }
@keyframes lockBye { to { opacity: 0; transform: scale(1.04); } }
#lockScreen.shake .lock-card { animation: optShake 0.5s ease; }
.lock-card {
  width: 100%;
  max-width: 380px;
  background: #FFFFFF;
  border-radius: 30px;
  padding: 24px 22px 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.lock-char { width: 118px; height: 118px; margin: 0 auto; }
.lock-char .char-svg { width: 118px; height: 118px; }
.lock-card h2 {
  font-size: 23px;
  font-weight: 900;
  color: var(--ocean-2);
  margin: 8px 0 8px;
  letter-spacing: 1px;
}
.lock-tip { font-size: 15px; font-weight: 700; color: var(--ink-soft); line-height: 1.6; margin-bottom: 16px; }
#lockInput {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  padding: 13px 16px;
  border-radius: 16px;
  border: 3px solid #C7D8E6;
  outline: none;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 14px;
}
#lockInput:focus { border-color: var(--ocean-3); }
#lockErr { min-height: 22px; font-size: 14px; font-weight: 700; color: var(--red); margin-top: 10px; }
.lock-remember { display: inline-block; font-size: 13px; color: var(--ink-soft); font-weight: 700; margin-top: 4px; }
.lock-remember input { vertical-align: -2px; margin-right: 4px; }
.lock-note { font-size: 12px; color: #98A8B8; font-weight: 600; margin-top: 6px; }
/* ---------- 每日一学 ---------- */
.daily-card {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #FFF6DF, #FFE9B8);
  border-radius: 24px;
  padding: 13px 16px;
  margin-top: 18px;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(10, 44, 78, 0.22), 0 12px 20px rgba(6, 30, 52, 0.28);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.daily-card:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(10, 44, 78, 0.22); }
.daily-card.done { background: linear-gradient(135deg, #E7F8E9, #C9EFCD); }
.daily-left { font-size: 34px; margin-right: 12px; }
.daily-mid { flex: 1; text-align: left; }
.daily-title { display: block; font-size: 22px; font-weight: 900; color: #7A5A00; letter-spacing: 1px; }
.daily-card.done .daily-title { color: #2F7A32; }
.daily-sub { display: block; font-size: 13px; font-weight: 700; color: #9A7B2F; margin-top: 3px; }
.daily-card.done .daily-sub { color: #4E8A52; }
.daily-right {
  font-size: 20px;
  font-weight: 900;
  color: #FFFFFF;
  background: linear-gradient(180deg, #F0A63C, #F08A24);
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 0 4px 0 #C96A12;
  letter-spacing: 1px;
}
.daily-card.done .daily-right { background: linear-gradient(180deg, #5CB860, #43A047); box-shadow: 0 4px 0 #2F7A32; }

/* 每日进度小牌 */
.prog-chip {
  font-size: 17px;
  font-weight: 900;
  color: #FFFFFF;
  background: rgba(10, 44, 78, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 5px 16px;
  white-space: nowrap;
}

/* 分站转场卡 */
.trans-card { text-align: center; padding: 18px 10px 20px; }
.trans-row { font-size: 44px; margin-bottom: 12px; }
.trans-emoji { display: inline-block; margin: 0 8px; }
.trans-arrow { display: inline-block; color: #7FE0A0; font-size: 34px; vertical-align: middle; margin: 0 4px; }
.trans-text { font-size: 19px; font-weight: 800; color: #FFFFFF; margin-bottom: 16px; text-shadow: 0 2px 0 rgba(10,44,78,0.4); }

/* 过度学习提醒 */
.warn-char { width: 104px; height: 104px; margin: 0 auto; }
.warn-char .char-svg { width: 104px; height: 104px; }
/* 英语单词释义牌 */
#meaning-toast {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 86px;
  z-index: 76;
  text-align: center;
  pointer-events: none;
}
.meaning-toast {
  display: inline-block;
  background: rgba(10, 44, 78, 0.9);
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 10px 24px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  font-weight: 900;
  white-space: nowrap;
}
.meaning-toast .mt-en {
  font-family: "Comic Sans MS", "Segoe UI", Arial, sans-serif;
  font-size: 26px;
  color: var(--yellow);
  letter-spacing: 1px;
}
.meaning-toast .mt-eq { font-size: 20px; color: #9FC9E8; margin: 0 8px; }
.meaning-toast .mt-zh { font-size: 26px; color: #FFFFFF; }
.meaning-toast.show { animation: toastIn 0.32s ease; }
.meaning-toast.hide { opacity: 0; transition: opacity 0.6s ease; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* 跟读提示 */
#echo-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 152px;
  z-index: 77;
  text-align: center;
  pointer-events: none;
}
.echo-cta {
  display: inline-block;
  background: linear-gradient(135deg, #FFF3C9, #FFE07A);
  border: 3px solid #FFFFFF;
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  font-weight: 900;
  white-space: nowrap;
  animation: echoIn 0.32s ease;
}
.echo-cta .mic {
  font-size: 26px;
  display: inline-block;
  margin-right: 6px;
  animation: micPulse 0.9s ease infinite;
}
@keyframes micPulse {
  0%, 100% { transform: scale(1) rotate(-6deg); }
  50% { transform: scale(1.25) rotate(6deg); }
}
.echo-cta .etext { font-size: 22px; color: #7A5A00; letter-spacing: 1px; }
.echo-cta .esub { font-size: 13px; color: #9A7B2F; margin-left: 8px; }
@keyframes echoIn {
  from { opacity: 0; transform: translateY(14px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hidden { display: none !important; }
