/* ===== 小橘猫 · 岛屿学习乐园 ===== */

:root {
  --primary: #A78BFA;
  --primary-dark: #8B5CF6;
  --bg: #F8F6FF;
  --bg-soft: #F5F0FF;
  --card: #FFFFFF;
  --text: #2D2A3E;
  --text-muted: #8E8A9C;
  --text-light: #FFFFFF;
  --success: #4ADE80;
  --danger: #FF6B6B;
  --warning: #FDCB6E;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 6px 20px rgba(139, 124, 255, 0.12);
  --shadow-lg: 0 12px 30px rgba(139, 124, 255, 0.18);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

#app {
  width: 100%; height: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

/* 顶部栏 */
.app-header {
  height: 56px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  z-index: 10;
  flex-shrink: 0;
}
.header-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
}
.header-right { display: flex; align-items: center; gap: 8px; }
.header-sun {
  background: linear-gradient(135deg, #FEF3C7, #FFEDD5);
  color: #D97706;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
}
.cloud-status {
  font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 12px;
  background: #E5E7EB; color: #6B7280;
  white-space: nowrap;
}
.cloud-status.ok { background: #DCFCE7; color: #15803D; }
.cloud-status.sync { background: #FEF3C7; color: #B45309; }
.cloud-status.err { background: #FEE2E2; color: #B91C1C; }
.cloud-status.off { background: #F3F4F6; color: #9CA3AF; }

/* 主内容区 */
.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: 90px;
  -webkit-overflow-scrolling: touch;
}
.app-main::-webkit-scrollbar { display: none; }

.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* 首页顶部 */
.home-hero {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.home-greeting h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}
.home-greeting p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.home-progress {
  width: 90px; height: 90px;
  position: relative;
  flex-shrink: 0;
}
.progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #EDE9FE; stroke-width: 10; }
.ring-fill {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.6s ease;
}
.ring-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}
.ring-text small { font-size: 12px; }

/* 通用区块 */
.section {
  margin-bottom: 18px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 16px;
  font-weight: 800;
}
.section-tip {
  font-size: 12px;
  color: var(--text-muted);
}

/* 每日任务卡片 */
.daily-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.daily-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.daily-card:active { transform: scale(0.98); }
.daily-card.done {
  opacity: 0.75;
  border-color: var(--success);
  background: #F0FDF4;
}
.daily-check {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid #DDD8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}
.daily-card.done .daily-check { background: var(--success); border-color: var(--success); }
.daily-icon { font-size: 32px; margin-bottom: 8px; }
.daily-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}
.daily-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}
.daily-sun {
  font-size: 12px;
  color: #D97706;
  font-weight: 700;
}

/* 学习岛屿 */
.islands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.island-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s ease;
  border-top: 4px solid var(--c);
}
.island-card:active { transform: scale(0.97); }
.island-icon { font-size: 42px; margin-bottom: 8px; }
.island-name {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.island-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* 岛屿详情 */
.island-hero {
  border-radius: var(--radius);
  padding: 28px 20px;
  color: #fff;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.island-hero-icon { font-size: 56px; margin-bottom: 8px; }
.island-hero h2 { margin: 0 0 6px; font-size: 22px; }
.island-hero p { margin: 0; opacity: 0.9; font-size: 13px; }
.grade-req {
  margin-top: 12px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
  backdrop-filter: blur(2px);
}

.card-list { display: flex; flex-direction: column; gap: 12px; }
.feature-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s ease;
}
.feature-card:active { transform: scale(0.98); }
.feature-card.done { background: #F0FDF4; }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.feature-title { font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.feature-desc { font-size: 12px; color: var(--text-muted); }

.back-btn {
  background: var(--card);
  border: none;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* 学习页 */
.study-list { display: flex; flex-direction: column; gap: 12px; }
.study-row {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.study-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.study-info { flex: 1; }
.study-name { font-size: 16px; font-weight: 800; }
.study-desc { font-size: 12px; color: var(--text-muted); }
.arrow { font-size: 20px; color: var(--text-muted); }

/* 打卡页 */
.check-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.check-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.check-item input { width: 20px; height: 20px; accent-color: var(--primary); }
.check-item.done { background: #F0FDF4; }
.check-icon { font-size: 24px; }
.check-text { flex: 1; font-size: 15px; }
.check-sun { font-size: 13px; color: #D97706; font-weight: 700; }
.check-history { background: var(--card); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow); }
.check-hist-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #F0EDFF;
  font-size: 14px;
}
.check-hist-row:last-child { border-bottom: none; }
.check-hist-sun { color: #D97706; font-weight: 700; }

/* 奖励页 */
.reward-balance-card {
  background: linear-gradient(135deg, #FEF3C7, #FFEDD5);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.reward-balance-label { font-size: 14px; color: #92400E; margin-bottom: 6px; }
.reward-balance-num { font-size: 42px; font-weight: 800; color: #D97706; }
.reward-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.reward-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.reward-card.disabled { opacity: 0.5; pointer-events: none; }
.reward-icon { font-size: 36px; margin-bottom: 8px; }
.reward-name { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.reward-cost { font-size: 13px; color: #D97706; font-weight: 700; }

/* 已兑换记录 */
.reward-owned-list { display: flex; flex-direction: column; gap: 8px; }
.reward-owned-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.reward-owned-name { font-size: 14px; font-weight: 700; color: var(--text); }
.reward-owned-meta { font-size: 12px; color: var(--text-muted); }

/* 家长模式备份码 */
.backup-area {
  width: 100%;
  min-height: 84px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border, #E5E7EB);
  font-size: 12px;
  font-family: monospace;
  resize: vertical;
  box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
}

/* 我的页 */
.me-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.me-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.me-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.me-grade { font-size: 13px; color: var(--text-muted); }

.settings-list { display: flex; flex-direction: column; gap: 10px; }
.setting-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  font-size: 14px;
  cursor: pointer;
}
.setting-item input, .setting-item select {
  border: 1px solid #E5E1FA;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  width: 140px;
  outline: none;
}
.setting-item.danger { color: var(--danger); }
.color-pick { display: flex; gap: 8px; }
.color-pick span { font-size: 24px; cursor: pointer; opacity: 0.5; transition: 0.2s; }
.color-pick span.active { opacity: 1; transform: scale(1.15); }

/* 通用按钮 */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(139, 124, 255, 0.3);
  transition: all 0.2s ease;
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: #fff;
  color: var(--primary-dark);
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:active { transform: scale(0.98); }
.btn-sm {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.btn-sm:disabled { background: #ccc; }

/* 底部导航 */
.app-tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  background: var(--card);
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab-item {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-item.active { color: var(--primary-dark); }
.tab-icon { font-size: 22px; }
.tab-label { font-size: 11px; font-weight: 600; }

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}
.modal.show { display: flex; }
.modal-box {
  background: var(--card);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #F0EDFF;
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-body {
  padding: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-body label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 6px;
}
.modal-body input, .modal-body select {
  width: 100%;
  border: 1px solid #E5E1FA;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  outline: none;
}

/* 练习弹窗 */
.practice-box { max-height: 90vh; }
.practice-progress { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.practice-q { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 24px; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option-btn {
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.option-btn:active { background: var(--primary); color: #fff; }
.practice-result { text-align: center; padding: 20px 0; }
.result-emoji { font-size: 56px; margin-bottom: 8px; }
.result-text { font-size: 18px; font-weight: 800; }
.result-sun { font-size: 28px; color: #D97706; font-weight: 800; margin: 8px 0; }
.result-tip { color: var(--text-muted); font-size: 13px; }


/* 列表类 */
.lesson-list, .video-list, .custom-list { display: flex; flex-direction: column; gap: 10px; }
.lesson-item, .video-item, .custom-item {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
}
.lesson-unit { font-size: 12px; color: var(--primary-dark); font-weight: 700; margin-bottom: 4px; }
.lesson-title { font-size: 15px; font-weight: 800; }
.lesson-author { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.video-item { display: flex; align-items: flex-start; gap: 12px; position: relative; }
.video-thumb {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}
.video-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.video-title { font-size: 15px; font-weight: 800; line-height: 1.3; }
.video-desc { font-size: 12px; color: var(--text-muted); line-height: 1.3; }
.video-fallback {
  display: inline-block;
  width: auto;
  font-size: 12px;
  color: var(--primary-dark);
  text-decoration: underline;
  cursor: pointer;
  margin-top: 2px;
}
.video-fallback:active { opacity: .6; }

/* 弹窗内视频播放器 */
.modal-video-player {
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.modal-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #1a1a2e;
  color: #fff;
  font-size: 14px;
}
.modal-player-bar button {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.modal-video-player iframe {
  width: 100%;
  height: 220px;
  display: block;
  border: none;
}
.modal-player-fallback {
  padding: 8px 12px;
  background: #1a1a2e;
  text-align: center;
}
.modal-player-fallback button { font-size: 12px; padding: 5px 12px; }

/* 背诵 */
.recite-box { text-align: center; }
.recite-box p { font-size: 16px; line-height: 1.6; }
.recite-tip { color: var(--text-muted); font-size: 13px !important; margin: 12px 0 20px; }

/* 古诗练习 / 拼音打卡 */
.poem-list, .pinyin-list { display: flex; flex-direction: column; gap: 12px; }
.poem-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}
.poem-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.poem-head b { font-size: 15px; }
.poem-author { font-size: 12px; color: var(--text-muted); }
.poem-content {
  font-size: 14px; line-height: 1.8; color: var(--text);
  white-space: pre-wrap; margin-bottom: 10px;
}
.pinyin-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}
.pinyin-item.done { background: #E8F8EE; border-color: #9FE0B6; }
.pinyin-py { font-size: 17px; font-weight: 800; min-width: 56px; }
.pinyin-zh { font-size: 13px; color: var(--text-muted); flex: 1; }
.pinyin-item .btn-primary, .pinyin-item .btn-secondary { white-space: nowrap; }

/* 单词卡片 */
.word-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.word-item {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.word-front { font-size: 20px; font-weight: 800; color: var(--primary-dark); }
.word-back { font-size: 16px; color: var(--text); display: none; }
.word-item.flipped .word-front { display: none; }
.word-item.flipped .word-back { display: block; }

/* 错题 */
.mistake-card {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.mistake-card.mastered { background: #F0FDF4; }
.mistake-title { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.mistake-answer { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.mistake-review { font-size: 12px; color: var(--primary-dark); margin-bottom: 10px; }

/* 通关 */
.pass-info {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.8;
}
.pass-prog {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #E84393;
  background: #FFE3F1;
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 6px;
}

/* Toast */
.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(45, 42, 62, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { color: var(--text-muted); text-align: center; padding: 20px; font-size: 14px; }

/* 小橘猫（养猫成长） */
.cat-card {
  background: linear-gradient(135deg, #FFF7E6, #FFE9C7);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: center;
}
.cat-stage { position: relative; flex-shrink: 0; width: 84px; text-align: center; }
.cat-emoji { font-size: 54px; transition: transform .3s ease; transform-origin: bottom center; }
.cat-card.happy .cat-emoji { animation: catBounce 1.2s ease infinite; }
.cat-card.hungry .cat-emoji { transform: scale(0.82) !important; filter: grayscale(0.25); }
@keyframes catBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.cat-bubble {
  background: #fff;
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 11px;
  margin-top: 4px;
  color: var(--text);
  box-shadow: var(--shadow);
  line-height: 1.4;
}
.cat-info { flex: 1; min-width: 0; }
.cat-row { display: flex; justify-content: space-between; align-items: center; }
.cat-name { font-size: 15px; font-weight: 800; }
.cat-lv { font-size: 12px; color: #D97706; font-weight: 700; background: #FFF3D6; padding: 2px 8px; border-radius: 10px; }
.cat-hunger-bar { height: 10px; background: #FFE0B2; border-radius: 6px; overflow: hidden; margin: 8px 0 6px; }
.cat-hunger-fill { height: 100%; background: linear-gradient(90deg, #FB923C, #FBBF24); border-radius: 6px; transition: width .5s ease; }
.cat-row2 { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); }
.cat-bowl { font-size: 16px; }
.cat-pet {
  margin-top: 10px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.cat-pet:active { transform: scale(0.97); }

/* 欢迎弹窗 */
.welcome-modal { align-items: center; }
.welcome-box {
  background: linear-gradient(160deg, #FFF7E6, #FFE0EC);
  width: 86%;
  max-width: 360px;
  border-radius: 28px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn .3s ease;
}
@keyframes popIn { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.welcome-cat { font-size: 72px; animation: catBounce 1.4s ease infinite; }
.welcome-box h2 { margin: 10px 0 8px; font-size: 22px; color: var(--primary-dark); }
.welcome-box p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 0 0 20px; }

/* 安装到主屏幕 引导 */
.install-tip {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.install-tip b { color: var(--primary-dark); }
.install-step {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  border: 1px solid #EDE9FE;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.install-step b { color: var(--primary-dark); display: block; margin-bottom: 4px; }

/* 响应式：平板 / 电脑（稳定打开，居中成 App 形态） */
@media (min-width: 600px) {
  body {
    background: linear-gradient(160deg, #EFE7FF 0%, #FFF3E0 100%);
  }
  #app {
    max-width: 880px;
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(139,124,255,0.18);
    border-radius: 0 0 22px 22px;
    min-height: 100vh;
  }
  .daily-grid, .islands-grid, .reward-grid { grid-template-columns: repeat(3, 1fr); }
  .app-header { border-radius: 0; }
}
@media (min-width: 1024px) {
  .daily-grid, .islands-grid, .reward-grid { grid-template-columns: repeat(4, 1fr); }
  .home-hero { padding: 22px 28px; }
}

/* ===== 小橘猫（可爱 SVG + 趣味互动） ===== */
.kitty-svg {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: bottom center;
}
.cat-card .kitty-svg { animation: catBob 2.6s ease-in-out infinite; }
.cat-card.happy .kitty-svg { animation: catBob 1.4s ease-in-out infinite; }
.cat-card.hungry .kitty-svg { transform: scale(0.82); filter: grayscale(0.25); animation: none; }
@keyframes catBob { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }

/* 首页猫卡（成长条 + 快捷动作） */
.cat-grow-bar { height: 8px; background: #FFE6C2; border-radius: 6px; overflow: hidden; margin: 8px 0 4px; }
.cat-grow-fill { height: 100%; background: linear-gradient(90deg, #A78BFA, #8B5CF6); border-radius: 6px; transition: width .5s ease; }
.cat-actions { display: flex; gap: 8px; margin-top: 12px; }
.cat-act {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 9px 4px;
  background: #FFF3D6;
  color: #92400E;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: transform .15s ease;
  white-space: nowrap;
}
.cat-act:active { transform: scale(0.95); }
.cat-act.primary { background: linear-gradient(135deg, #FB923C, #FBBF24); color: #fff; }

/* 猫咪小屋弹窗 */
.cat-house-modal { z-index: 95; }
.cat-house-box { max-height: 86vh; }
.ch-cat { text-align: center; margin: 4px 0 6px; }
.ch-cat .kitty-svg { width: 150px; margin: 0 auto; animation: catBob 2.6s ease-in-out infinite; }
.ch-name { text-align: center; font-size: 18px; font-weight: 800; }
.ch-lv { font-size: 12px; color: #D97706; background: #FFF3D6; padding: 2px 9px; border-radius: 10px; margin-left: 6px; }
.ch-mood { text-align: center; color: var(--text-muted); font-size: 13px; margin: 6px 0 14px; }
.ch-stats { display: flex; gap: 10px; margin-bottom: 12px; }
.ch-stat { flex: 1; background: var(--bg-soft); border-radius: 14px; padding: 12px 6px; text-align: center; }
.ch-stat-num { font-size: 22px; font-weight: 800; color: var(--primary-dark); }
.ch-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ch-grow-bar { height: 12px; background: #EDE9FE; border-radius: 8px; overflow: hidden; }
.ch-grow-fill { height: 100%; background: linear-gradient(90deg, #A78BFA, #8B5CF6); border-radius: 8px; transition: width .5s ease; }
.ch-grow-text { font-size: 12px; color: var(--text-muted); text-align: center; margin: 6px 0 16px; }
.ch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ch-btn {
  border: none;
  border-radius: 14px;
  padding: 14px;
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease;
}
.ch-btn:active { transform: scale(0.97); }
.ch-btn.primary { background: linear-gradient(135deg, #FB923C, #FBBF24); color: #fff; }
.ch-btn.wide { grid-column: 1 / -1; }
.cat-heart {
  position: absolute;
  left: 50%; top: 30%;
  transform: translateX(-50%);
  font-size: 34px;
  animation: heartFloat 0.9s ease forwards;
  pointer-events: none;
}
@keyframes heartFloat { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -40px) scale(1.2); } }

/* 玩球小游戏 */
.ball-game { text-align: center; padding: 10px 0 4px; }
.ball-stage { height: 170px; position: relative; background: linear-gradient(180deg, #E0F2FF, #FFF7E6); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.ball {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  font-size: 44px;
  cursor: pointer;
  transition: transform .22s ease;
  user-select: none;
}
.ball-cat { position: absolute; left: 14px; bottom: 10px; width: 52px; }
.ball-cat .kitty-svg { width: 100%; height: auto; }
.ball-tip { font-size: 14px; color: var(--text-muted); }

/* 猫咪捉迷藏 */
.hide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.hide-box {
  background: linear-gradient(135deg, #A78BFA, #DDA0DD);
  border-radius: 18px;
  height: 110px;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
  box-shadow: 0 4px 12px rgba(139,124,255,0.18);
}
.hide-box:active { transform: scale(0.92); filter: brightness(1.05); }

/* 做家务 / 乐园列表 */
.ch-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; text-align: center; }
.hw-list, .pg-list { display: flex; flex-direction: column; gap: 10px; }
.hw-item, .pg-item {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform .15s ease;
}
.hw-item:active, .pg-item:active { transform: scale(0.98); }
.hw-icon, .pg-icon { font-size: 26px; width: 42px; text-align: center; }
.hw-name { flex: 1; font-size: 15px; font-weight: 700; }
.hw-food { color: #D97706; font-weight: 700; font-size: 13px; }
.pg-info { flex: 1; }
.pg-name { font-size: 15px; font-weight: 800; }
.pg-desc { font-size: 12px; color: var(--text-muted); }

/* 成长记录 */
.cat-log { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.log-item {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  font-size: 13px;
}
.log-date { color: var(--primary-dark); font-weight: 700; white-space: nowrap; }
.log-text { color: var(--text); }

/* 音乐学唱 */
.song-head { text-align: center; margin-bottom: 14px; }
.song-title { font-size: 20px; font-weight: 800; color: var(--primary-dark); margin-bottom: 6px; }
.song-teach { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.song-btns { display: flex; gap: 10px; justify-content: center; }
.song-btns button { flex: 1; }
.song-stage {
  background: linear-gradient(135deg, #FFF7E6, #EDE9FE);
  border-radius: 18px;
  padding: 22px 14px;
  text-align: center;
  margin-bottom: 14px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.song-progress { font-size: 13px; color: var(--text-muted); }
.song-line { font-size: 26px; font-weight: 800; color: var(--primary-dark); line-height: 1.4; }
.song-controls { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.sc-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, background .2s;
}
.sc-btn:active { transform: scale(0.96); }
.sc-btn.primary { background: var(--primary); color: #fff; }
.song-all-toggle { text-align: center; margin-bottom: 8px; }
.btn-link {
  background: transparent;
  border: none;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.song-all {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.all-line { font-size: 15px; color: var(--text); padding: 6px 10px; border-radius: 10px; }
.all-line.on { background: #EDE9FE; color: var(--primary-dark); font-weight: 700; }

/* 猫咪接球 */
.catch-game { text-align: center; }
.catch-tip { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.catch-score { font-size: 16px; font-weight: 800; color: var(--primary-dark); margin-bottom: 10px; }
.catch-stage {
  height: 200px;
  position: relative;
  background: linear-gradient(180deg, #E0F2FF, #FFF7E6);
  border-radius: 18px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.catch-cat {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 58px;
  transform: translateX(-50%);
  transition: left .06s linear;
  pointer-events: none;
}
.catch-cat .kitty-svg { width: 100%; height: auto; }
.catch-ball {
  position: absolute;
  top: 0; left: 0;
  font-size: 30px;
  line-height: 34px;
  width: 34px; height: 34px;
  text-align: center;
  will-change: transform;
  pointer-events: none;
}

/* ===== 离线提示条（顶部灰色） ===== */
.offline-bar {
  display: none;
  background: #E5E7EB;
  color: #4B5563;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 60;
}
.offline-bar.show { display: block; }

/* 安装引导条（顶部紫色条，提示装成 App） */
.install-bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: linear-gradient(135deg, #A78BFA, #7C3AED); color: #fff; font-size: 13px; }
.install-bar[hidden] { display: none; }
.install-ico { font-size: 18px; flex-shrink: 0; }
.install-text { flex: 1; line-height: 1.35; min-width: 0; }
.install-go { flex-shrink: 0; background: #fff; color: #7C3AED; border: none; border-radius: 15px; padding: 6px 14px; font-weight: 800; font-size: 13px; }
.install-later { flex-shrink: 0; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.65); border-radius: 15px; padding: 6px 12px; font-size: 12px; }
.install-bar button:active { opacity: .7; }

/* ===== 首页连续天数徽标 ===== */
.home-streak {
  display: inline-block;
  margin-top: 8px;
  background: rgba(255,255,255,0.85);
  color: #EF6C2E;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}
.app-header .header-title + .home-streak { margin-left: 8px; }

/* ===== 今日复盘输入 ===== */
.review-area {
  width: 100%;
  min-height: 84px;
  border: 1.5px solid #E6DEFB;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
}
.review-area:focus { outline: none; border-color: var(--primary); }

/* ===== 已完成任务按日期折叠 ===== */
.date-group {
  border: 1.5px solid #EFE9FB;
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}
.date-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  background: #F7F3FF;
  font-weight: 700;
  color: var(--text);
}
.date-arrow { color: var(--primary); width: 14px; }
.date-label { flex: 1; }
.date-count { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.date-group-body { padding: 6px 14px 10px; }

/* ===== 学习页分组标题 / 自定义单元 ===== */
.study-sub {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 16px 4px 8px;
}

/* ===== 家长模式：练习单元出题器 ===== */
.cp-q-editor {
  background: #FBF8FF;
  border: 1.5px dashed #E0D4FB;
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
}
.cp-q-editor input, .cp-q-editor select {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  border: 1.5px solid #E6DEFB;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
}
.cp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cp-opts input { margin-bottom: 0; }
.cp-q-editor .setting-item { margin: 4px 0 0; }

/* ========== 打卡图标墙（汪汪队风格） ========== */
.checkin-wall {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: linear-gradient(135deg, #FFF7E6, #FFF0F6);
  border: 1px solid #FFE3B0;
  border-radius: 16px;
  padding: 12px 10px;
}
.checkin-paw { text-align: center; }
.paw-badge {
  width: 38px; height: 38px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: #EDE7F6;
  color: #B9AEDB;
  border: 2px dashed #D9CFEE;
  transition: transform .25s ease, background .25s ease;
}
.checkin-paw.lit .paw-badge {
  background: var(--paw, #5B8DEF);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  animation: pawPop .4s ease;
}
.checkin-paw.today .paw-badge { outline: 3px solid #FFD93D; outline-offset: 2px; }
@keyframes pawPop { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.paw-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ========== 英语点读单词 ========== */
.en-word-list { max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.en-word {
  background: #fff;
  border: 1px solid #EDE9FE;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.en-word-head { display: flex; align-items: center; gap: 8px; }
.en-word-en { font-size: 18px; font-weight: 800; color: var(--primary-dark); }
.en-word-zh { font-size: 14px; color: var(--text-muted); }
.en-word-sent { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-left: 2px; }
.en-sent-en { font-size: 14px; color: #444; }
.en-sent-zh { font-size: 12.5px; color: #9A93B5; }
.en-spk {
  border: none;
  background: linear-gradient(135deg, #A78BFA, #8B5CF6);
  color: #fff;
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 15px;
  cursor: pointer;
  flex: none;
  box-shadow: 0 3px 8px rgba(139,92,246,.3);
  transition: transform .15s ease;
}
.en-spk:active { transform: scale(.9); }
.en-spk.small { width: 28px; height: 28px; font-size: 13px; background: linear-gradient(135deg,#FFB454,#F59E0B); box-shadow: 0 3px 8px rgba(245,158,11,.3); }
.follow-box { text-align: center; padding: 6px 0; }
.follow-target { font-size: 18px; margin: 6px 0 14px; line-height: 1.6; }
.follow-target b { color: var(--primary-dark); }
.follow-zh { font-size: 14px; color: var(--text-muted); }
.follow-status {
  margin: 10px 0;
  padding: 12px;
  border-radius: 12px;
  background: #F3F0FF;
  font-size: 14px;
  line-height: 1.7;
  min-height: 22px;
}
.follow-status.ok { background: #E6F9EC; color: #1B8A4B; font-weight: 700; }
.follow-status.bad { background: #FFF0F0; color: #D6324A; }
.follow-said { display: block; font-size: 12.5px; color: #9A93B5; margin-top: 4px; }
.follow-syl { display: block; font-size: 13px; color: var(--primary-dark); margin-top: 4px; }
.syl-hint { font-size: 13.5px; color: var(--text-muted); margin: 4px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.syl-list { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.syl-chip {
  border: none; cursor: pointer; padding: 5px 12px; border-radius: 999px;
  background: linear-gradient(135deg,#FFE3C2,#FFD0A6); color: #B5640E; font-weight: 700;
  font-size: 13px; box-shadow: 0 2px 6px rgba(245,158,11,.25);
}
.syl-chip:active { transform: scale(.94); }
.syl-tip { font-size: 12px; color: var(--text-muted); }
.follow-norec { margin-top: 12px; font-size: 13px; color: var(--text-muted); line-height: 1.7; background: #F7F5FF; border-radius: 12px; padding: 12px; }
.btn-ghost {
  border: 2px solid var(--primary); background: #fff; color: var(--primary-dark);
  font-weight: 700; padding: 12px; border-radius: 14px; cursor: pointer; font-size: 15px;
}
.btn-ghost:active { transform: scale(.98); }

/* ========== 记忆翻牌 ========== */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mem-card {
  aspect-ratio: 3 / 4;
  perspective: 600px;
  cursor: pointer;
}
.mem-face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 16px; font-weight: 800;
  backface-visibility: hidden;
  transition: transform .35s ease;
}
.mem-card { position: relative; }
.mem-front { background: linear-gradient(135deg,#A78BFA,#DDA0DD); color: #fff; font-size: 22px; }
.mem-back { background: #fff; color: var(--primary-dark); border: 2px solid #E9E2FB; transform: rotateY(180deg); }
.mem-card.open .mem-front { transform: rotateY(180deg); }
.mem-card.open .mem-back { transform: rotateY(0); }
.mem-card.matched .mem-back { background: #E8FBF0; border-color: #2ECC71; color: #1E8E4F; }
.mem-status { text-align: center; margin-top: 12px; color: var(--text-muted); font-size: 13px; }

/* ========== 英语字母乐园 ========== */
.letter-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:6px 0}
.letter-card{background:#fff7ee;border:1.5px solid #ffd9a8;border-radius:14px;padding:10px 6px;text-align:center}
.letter-big{font-size:30px;font-weight:800;color:#7A4A12;line-height:1.1}
.letter-small{font-size:13px;color:#bb8a4a;margin-top:2px}
.letter-word{font-size:13px;color:#555;margin:5px 0 6px}
.letter-zh{color:#999;font-size:11px}
.letter-btns{display:flex;flex-wrap:wrap;gap:5px;justify-content:center}
.letter-btns .en-spk{font-size:12px;padding:5px 7px}

/* ========== 猫咪互动动画 ========== */
.cat-eyes { animation: catBlink 5.5s infinite; transform-origin: center; }
@keyframes catBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(.1); }
  97% { transform: scaleY(1); }
}
.ch-cat { transition: transform .2s ease; display: inline-block; }
.cat-jump { animation: catJump .7s ease; }
@keyframes catJump {
  0% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-22px) rotate(-12deg); }
  60% { transform: translateY(0) rotate(12deg); }
  100% { transform: translateY(0) rotate(0); }
}

/* ========== 开心农场·种田守护 ========== */
.farm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.farm-seeds { font-size: 15px; color: var(--text); }
.farm-seeds b { color: var(--purple); }
.farm-tasks { font-size: 13px; color: var(--text-muted); }
.farm-palette { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px; margin-bottom: 8px; }
.fp { flex: 0 0 auto; min-width: 62px; text-align: center; background: var(--bg-soft); border: 2px solid transparent; border-radius: 12px; padding: 6px 4px; cursor: pointer; user-select: none; }
.fp.on { border-color: var(--purple); background: #f3ecff; }
.fp-ic { font-size: 22px; display: block; line-height: 1.1; }
.fp-nm { font-size: 11px; display: block; color: var(--text); }
.fp-cost { font-size: 11px; display: block; color: var(--purple); font-weight: 700; }
.farm-lawn { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; background: linear-gradient(180deg, #dff5d8, #cdeec0); border-radius: 14px; padding: 8px; overflow: hidden; }
.farm-cell { position: relative; aspect-ratio: 1 / 1; background: rgba(255, 255, 255, .55); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; border: 1px dashed rgba(80, 140, 60, .4); }
.farm-cell.empty:active { background: rgba(255, 255, 255, .85); }
.farm-cell.mature { background: #fff7d6; box-shadow: 0 0 0 2px #ffb454 inset; }
.farm-cell.def { background: rgba(220, 240, 255, .7); }
.farm-ic { font-size: 26px; }
.farm-bar { position: absolute; bottom: 4px; left: 12%; width: 76%; height: 4px; background: rgba(0, 0, 0, .12); border-radius: 3px; overflow: hidden; }
.farm-bar i { display: block; height: 100%; background: #4ade80; }
.farm-ok { position: absolute; top: 2px; right: 4px; font-size: 10px; color: #e08a00; }
.farm-actions { display: flex; gap: 10px; margin-top: 10px; }
.farm-actions .btn-primary, .farm-actions .btn-secondary { flex: 1; }
.farm-status { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.farm-battle { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.b-raider { position: absolute; right: 0; font-size: 30px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.b-pea { position: absolute; left: 6px; font-size: 18px; }
.farm-gold { font-size: 15px; color: var(--text); }
.farm-gold b { color: #d98a00; }
.farm-status.farm-night { background: linear-gradient(135deg,#3b2a5a,#5a3a6a); color:#fff; padding:8px 10px; border-radius:10px; box-shadow:0 2px 8px rgba(80,40,120,.3); margin-top:10px; }
.farm-status.farm-night b { color:#ffd54a; }
.b-raider.hp1 { filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.b-raider.hp2 { transform: scale(1.14); filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.b-raider.hp3 { transform: scale(1.3); filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.reward-sub { display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; font-size: 16px; color: var(--text); }
.reward-bal { font-size: 13px; background: #fff3d6; color: #c47f00; padding: 2px 10px; border-radius: 20px; font-weight: 600; }

