/**
 * 米娅的小花园 | 三年级预习学习乐园
 * PvZ 植物大战僵尸主题样式 - 卡通左侧导航版
 * 适配 iPad Safari | 大字体宽松间距
 */

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

:root {
  --pvz-sky: #87CEEB;
  --pvz-sky-light: #B0E0E6;
  --pvz-grass: #7CB342;
  --pvz-grass-dark: #558B2F;
  --pvz-grass-light: #AED581;
  --pvz-soil: #8D6E63;
  --pvz-soil-dark: #6D4C41;
  --pvz-sun: #FFD93D;
  --pvz-sun-glow: #FFF176;
  --pvz-sun-dark: #FFA000;
  --pvz-wood: #A1887F;
  --pvz-wood-dark: #6D4C41;
  --pvz-wood-light: #D7CCC8;
  --pvz-green: #4CAF50;
  --pvz-red: #E53935;
  --pvz-blue: #42A5F5;
  --pvz-purple: #AB47BC;
  --pvz-orange: #FF7043;
  --pvz-pink: #EC407A;
  --pvz-teal: #26A69A;
  --pvz-pea: #66BB6A;
  --pvz-bg: #F1F8E9;
  --pvz-bg-warm: #FFFDE7;
  --pvz-card: #FFFFFF;
  --pvz-text: #2D3436;
  --pvz-text-light: #636E72;
  --pvz-shadow: rgba(0,0,0,0.10);
  --pvz-shadow-strong: rgba(0,0,0,0.18);
  --pvz-radius: 22px;
  --pvz-radius-sm: 14px;
  --pvz-radius-xs: 10px;
  --sidebar-w: 230px;
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-rounded: "PingFang SC", "Hiragino Sans GB", "SF Pro Rounded", "Microsoft YaHei", sans-serif;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--pvz-text);
  background: linear-gradient(180deg, #C8E6C9 0%, #E8F5E9 20%, var(--pvz-bg) 40%, #FFFDE7 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ===== Sky decoration (clouds) ===== */
.sky-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 160px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: rgba(255,255,255,0.9);
  border-radius: 100px;
  animation: drift 30s linear infinite;
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
}
.cloud-1 { width: 100px; height: 35px; top: 30px; left: -120px; }
.cloud-1::before { width: 50px; height: 50px; top: -20px; left: 15px; }
.cloud-1::after { width: 40px; height: 40px; top: -15px; left: 50px; }
.cloud-2 { width: 140px; height: 40px; top: 60px; left: -160px; animation-delay: -10s; animation-duration: 45s; }
.cloud-2::before { width: 60px; height: 60px; top: -25px; left: 20px; }
.cloud-2::after { width: 50px; height: 50px; top: -20px; left: 70px; }
.cloud-3 { width: 80px; height: 30px; top: 15px; left: -100px; animation-delay: -20s; animation-duration: 35s; }
.cloud-3::before { width: 40px; height: 40px; top: -15px; left: 10px; }
.cloud-3::after { width: 35px; height: 35px; top: -12px; left: 40px; }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 200px)); }
}

/* ===== Left Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #FFF9C4 0%, #FFF3E0 30%, #F1F8E9 100%);
  border-right: 4px solid var(--pvz-grass);
  box-shadow: 4px 0 20px rgba(0,0,0,0.08);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 200;
  padding-bottom: 40px;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--pvz-grass-light); border-radius: 4px; }

/* Sidebar Header */
.sidebar-header {
  text-align: center;
  padding: 20px 16px 14px;
  position: relative;
}

.sidebar-logo {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 6px;
  display: inline-block;
  animation: logoBounce 2s ease-in-out infinite;
}

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

.sidebar-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pvz-grass-dark);
  font-family: var(--font-rounded);
  text-shadow: 1px 1px 0 rgba(255,255,255,0.8);
}

.sidebar-subtitle {
  font-size: 0.78rem;
  color: var(--pvz-text-light);
  margin-top: 2px;
  font-weight: 600;
}

/* Sun Counter in Sidebar */
.sidebar .sun-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #FFE082, #FFB74D);
  border-radius: 30px;
  padding: 8px 16px;
  margin: 0 14px 14px;
  box-shadow: 0 3px 10px rgba(255,193,7,0.35), inset 0 2px 4px rgba(255,255,255,0.5);
  border: 3px solid #FFD54F;
}

.sidebar .sun-bar .sun-icon {
  font-size: 1.8rem;
  animation: spin 8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sidebar .sun-count {
  font-size: 1.4rem;
  font-weight: 800;
  color: #5D4037;
  font-family: var(--font-rounded);
  line-height: 1.1;
}

.sidebar .sun-label {
  font-size: 0.72rem;
  color: #6D4C41;
  font-weight: 600;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  border-radius: var(--pvz-radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--pvz-text);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-rounded);
  text-align: left;
  margin-bottom: 4px;
  position: relative;
}

.nav-item:hover {
  background: rgba(124,179,66,0.12);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--pvz-grass), var(--pvz-grass-dark));
  color: #fff;
  box-shadow: 0 3px 10px rgba(85,139,47,0.35);
}

.nav-item:active {
  transform: scale(0.97);
}

.nav-item .nav-icon {
  font-size: 1.3rem;
  min-width: 24px;
  text-align: center;
}

.nav-item.sub {
  padding-left: 22px;
  font-size: 0.85rem;
  font-weight: 600;
}

.nav-item.sub .nav-icon {
  font-size: 1.1rem;
}

/* Nav Groups (collapsible) */
.nav-group {
  margin-bottom: 4px;
}

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--pvz-radius-sm);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--pvz-grass-dark);
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
  font-family: var(--font-rounded);
}

.nav-group-header:hover {
  background: rgba(124,179,66,0.12);
}

.nav-group-header .nav-icon {
  font-size: 1.3rem;
  min-width: 24px;
}

.nav-group-header .nav-arrow {
  margin-left: auto;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
  color: var(--pvz-text-light);
}

.nav-group.collapsed .nav-arrow {
  transform: rotate(-90deg);
}

.nav-group-items {
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.4s ease;
}

.nav-group.collapsed .nav-group-items {
  max-height: 0;
}

/* ===== Sidebar Toggle (Mobile) ===== */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 210;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 3px solid var(--pvz-grass);
  background: linear-gradient(135deg, #FFF9C4, #FFF3E0);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 3px 10px var(--pvz-shadow);
  transition: all 0.2s;
}

.sidebar-toggle:active {
  transform: scale(0.92);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: 190;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ===== Main Content Area ===== */
.main-content {
  margin-left: var(--sidebar-w);
  padding: 20px 24px 60px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  max-width: 900px;
}

/* ===== Page Container ===== */
.page {
  display: none;
  animation: fadeIn 0.4s ease;
}
.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Hero Banner ===== */
.hero-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #FFF9C4 0%, #FFE082 40%, #FFCC80 100%);
  border-radius: var(--pvz-radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 4px solid #FFD54F;
  box-shadow: 0 6px 20px rgba(255,193,7,0.25);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 40%;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}

.hero-emoji {
  font-size: 3.5rem;
  min-width: 60px;
  animation: logoBounce 2.5s ease-in-out infinite;
  z-index: 1;
}

.hero-text {
  flex: 1;
  z-index: 1;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #5D4037;
  font-family: var(--font-rounded);
  text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.hero-subtitle {
  font-size: 1rem;
  color: #6D4C41;
  margin-top: 4px;
  font-weight: 600;
}

.hero-deco {
  font-size: 2.5rem;
  z-index: 1;
  animation: flyAround 4s ease-in-out infinite;
}

@keyframes flyAround {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(8px, -8px) rotate(10deg); }
  50% { transform: translate(0, -12px) rotate(-5deg); }
  75% { transform: translate(-8px, -6px) rotate(8deg); }
}

/* ===== Section Card ===== */
.section-card {
  background: var(--pvz-card);
  border-radius: var(--pvz-radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px var(--pvz-shadow);
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--pvz-grass), var(--pvz-sun), var(--pvz-grass));
}

.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pvz-grass-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-rounded);
}

.section-title .title-icon {
  font-size: 1.4rem;
}

.section-desc {
  font-size: 0.88rem;
  color: var(--pvz-text-light);
  margin-bottom: 12px;
  font-weight: 500;
}

/* ===== Daily Checklist ===== */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #F9FBE7;
  border-radius: var(--pvz-radius-sm);
  margin-bottom: 10px;
  border: 2px solid #E0E0E0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.checklist-item.completed {
  background: #E8F5E9;
  border-color: var(--pvz-grass);
}

.checklist-checkbox {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  border: 3px solid #BDBDBD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  background: #fff;
}

.checklist-item.completed .checklist-checkbox {
  background: var(--pvz-grass);
  border-color: var(--pvz-grass-dark);
  color: #fff;
}

.checklist-text {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pvz-text);
}

.checklist-item.completed .checklist-text {
  text-decoration: line-through;
  color: var(--pvz-text-light);
}

.checklist-reward {
  font-size: 1.3rem;
  white-space: nowrap;
}

/* ===== Progress Panel ===== */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.progress-item {
  text-align: center;
  padding: 16px 8px;
  border-radius: var(--pvz-radius-sm);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.progress-item.chinese { background: linear-gradient(135deg, #EF5350, #E53935); }
.progress-item.math { background: linear-gradient(135deg, #42A5F5, #1E88E5); }
.progress-item.english { background: linear-gradient(135deg, #AB47BC, #8E24AA); }

.progress-icon { font-size: 2rem; margin-bottom: 4px; }
.progress-label { font-size: 0.8rem; opacity: 0.9; }
.progress-value { font-size: 1.5rem; font-weight: 800; font-family: var(--font-rounded); }
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: #fff;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.overall-progress {
  background: linear-gradient(135deg, var(--pvz-sun), #FFA000);
  border-radius: var(--pvz-radius-sm);
  padding: 16px;
  text-align: center;
  color: #5D4037;
  font-weight: 700;
}
.overall-progress .big-num {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-rounded);
}

/* ===== Error Collection ===== */
.error-item {
  background: #FFF3E0;
  border: 2px solid #FFE0B2;
  border-radius: var(--pvz-radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  position: relative;
}

.error-item .error-subject {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.error-subject.chinese { background: var(--pvz-red); }
.error-subject.math { background: var(--pvz-blue); }
.error-subject.english { background: var(--pvz-purple); }

.error-question {
  font-size: 0.95rem;
  color: var(--pvz-text);
  margin-bottom: 6px;
  font-weight: 600;
}

.error-answer {
  font-size: 0.9rem;
  color: var(--pvz-green);
  font-weight: 600;
}

.error-note {
  font-size: 0.85rem;
  color: var(--pvz-text-light);
  margin-top: 4px;
}

.error-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(229,57,53,0.15);
  border-radius: 50%;
  color: var(--pvz-red);
  font-size: 1rem;
  cursor: pointer;
}

/* ===== PvZ Garden ===== */
.pvz-garden {
  background: linear-gradient(180deg, #81C784 0%, #66BB6A 50%, #43A047 100%);
  border-radius: var(--pvz-radius);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border: 4px solid var(--pvz-grass-dark);
}

.pvz-garden::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(180deg, var(--pvz-soil), var(--pvz-soil-dark));
}

.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}

.plant-card {
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  padding: 10px 6px;
  text-align: center;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.plant-card.locked {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.3);
}

.plant-card.locked .plant-emoji {
  filter: grayscale(1) brightness(0.4);
  opacity: 0.5;
}

.plant-card.unlocked {
  border-color: var(--pvz-sun);
  box-shadow: 0 0 12px rgba(255,217,61,0.5);
  animation: plantPop 0.5s ease;
}

@keyframes plantPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.plant-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 4px;
}

.plant-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--pvz-text);
  line-height: 1.3;
}

.plant-card.locked .plant-name {
  color: rgba(255,255,255,0.6);
}

.lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
}

/* ===== Mini-games ===== */
.minigame-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.minigame-card {
  background: linear-gradient(135deg, #FFE082, #FFB74D);
  border-radius: var(--pvz-radius-sm);
  padding: 16px;
  text-align: center;
  border: 3px solid #FFA000;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.minigame-card.locked {
  background: #E0E0E0;
  border-color: #BDBDBD;
  cursor: not-allowed;
  opacity: 0.6;
}

.minigame-card:active:not(.locked) {
  transform: scale(0.96);
}

.minigame-emoji { font-size: 2.5rem; margin-bottom: 6px; }
.minigame-name { font-size: 0.9rem; font-weight: 700; color: #5D4037; }
.minigame-desc { font-size: 0.75rem; color: #795548; margin-top: 4px; }
.minigame-cost { font-size: 0.75rem; color: #F57F17; font-weight: 700; margin-top: 6px; }

.minigame-card.locked .minigame-name,
.minigame-card.locked .minigame-desc,
.minigame-card.locked .minigame-cost {
  color: #9E9E9E;
}

/* ===== Unit Accordion ===== */
.unit-block {
  background: var(--pvz-card);
  border-radius: var(--pvz-radius);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 3px 12px var(--pvz-shadow);
  border: 2px solid #E0E0E0;
  transition: border-color 0.3s;
}

.unit-block.completed-unit {
  border-color: var(--pvz-grass);
  border-width: 3px;
}

.unit-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  background: linear-gradient(135deg, #F1F8E9, #E8F5E9);
  transition: background 0.3s;
  user-select: none;
}

.unit-header:active {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}

.unit-header .unit-icon {
  font-size: 1.6rem;
  min-width: 36px;
}

.unit-header .unit-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pvz-text);
  font-family: var(--font-rounded);
}

.unit-header .unit-arrow {
  font-size: 1.2rem;
  color: var(--pvz-text-light);
  transition: transform 0.3s ease;
}

.unit-block.open .unit-arrow {
  transform: rotate(90deg);
}

.unit-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.unit-block.open .unit-body {
  max-height: 6000px;
}

.unit-content {
  padding: 0 20px 20px;
}

/* ===== Sub-section (lesson parts) ===== */
.lesson-part {
  margin-bottom: 16px;
  border-left: 4px solid var(--pvz-grass);
  padding-left: 14px;
}

.lesson-part-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pvz-grass-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== Character table (生字) ===== */
.char-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 8px;
}

.char-table th {
  background: var(--pvz-grass);
  color: #fff;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.char-table th:first-child { border-radius: 8px 0 0 0; }
.char-table th:last-child { border-radius: 0 8px 0 0; }

.char-table td {
  padding: 8px;
  font-size: 0.95rem;
  border-bottom: 1px solid #E0E0E0;
  text-align: center;
}

.char-table tr:nth-child(even) td {
  background: #F9FBE7;
}

.char-table .char-word {
  font-size: 1.3rem;
  font-weight: 700;
}

.char-table .char-pinyin {
  color: var(--pvz-blue);
  font-weight: 600;
}

/* Polyphone list */
.polyphone-list { list-style: none; }

.polyphone-item {
  background: #FFF8E1;
  border-radius: var(--pvz-radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.polyphone-word {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pvz-orange);
}

.polyphone-readings {
  color: var(--pvz-text);
  font-weight: 600;
}

.polyphone-example {
  display: block;
  color: var(--pvz-text-light);
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Key points list */
.keypoint-list {
  list-style: none;
  counter-reset: kp;
}

.keypoint-item {
  counter-increment: kp;
  padding: 10px 14px 10px 40px;
  margin-bottom: 8px;
  background: #E3F2FD;
  border-radius: var(--pvz-radius-sm);
  font-size: 0.92rem;
  position: relative;
  line-height: 1.7;
}

.keypoint-item::before {
  content: counter(kp);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--pvz-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* English word table */
.word-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.word-table th {
  background: var(--pvz-purple);
  color: #fff;
  padding: 8px;
  font-size: 0.85rem;
}

.word-table th:first-child { border-radius: 8px 0 0 0; }
.word-table th:last-child { border-radius: 0 8px 0 0; }

.word-table td {
  padding: 8px;
  font-size: 0.92rem;
  border-bottom: 1px solid #E0E0E0;
  text-align: center;
}

.word-table tr:nth-child(even) td {
  background: #F3E5F5;
}

.word-en { font-weight: 700; color: var(--pvz-purple); }
.word-phonetic { color: var(--pvz-text-light); font-size: 0.8rem; }
.word-cn { font-weight: 600; }

/* English sentences */
.sentence-list { list-style: none; }

.sentence-item {
  background: #F3E5F5;
  border-radius: var(--pvz-radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
}

.sentence-en {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pvz-purple);
  margin-bottom: 2px;
}

.sentence-cn {
  font-size: 0.9rem;
  color: var(--pvz-text-light);
}

/* Math knowledge points */
.kp-item {
  background: #E3F2FD;
  border-radius: var(--pvz-radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.kp-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pvz-blue);
  margin-bottom: 4px;
}

.kp-detail {
  font-size: 0.9rem;
  color: var(--pvz-text);
  line-height: 1.7;
}

/* Math examples */
.example-item {
  background: #E8F5E9;
  border-radius: var(--pvz-radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  border-left: 4px solid var(--pvz-green);
}

.example-q {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pvz-text);
  margin-bottom: 6px;
}

.example-steps {
  font-size: 0.88rem;
  color: var(--pvz-text-light);
  white-space: pre-line;
  font-family: "SF Mono", "Courier New", monospace;
  line-height: 1.6;
}

.example-a {
  font-size: 1rem;
  font-weight: 800;
  color: var(--pvz-red);
  margin-top: 4px;
}

/* ===== Video Entry ===== */
.video-entry {
  background: linear-gradient(135deg, #1A237E, #283593);
  border-radius: var(--pvz-radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: transform 0.2s;
  border: 2px solid #3949AB;
}

.video-entry:active { transform: scale(0.97); }

.video-play-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background: #FF5252;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255,82,82,0.3);
}

.video-info { flex: 1; }

.video-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.video-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

.video-external {
  font-size: 1.2rem;
  color: #fff;
}

/* ===== Exercise Items ===== */
.exercise-item {
  background: #FAFAFA;
  border: 2px solid #E0E0E0;
  border-radius: var(--pvz-radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  position: relative;
}

.exercise-q {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--pvz-text);
  margin-bottom: 8px;
  white-space: pre-line;
  line-height: 1.7;
}

.exercise-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #BDBDBD;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.3s;
  background: #fff;
}

.exercise-input:focus { border-color: var(--pvz-blue); }
.exercise-input.correct { border-color: var(--pvz-green); background: #E8F5E9; }
.exercise-input.wrong { border-color: var(--pvz-red); background: #FFEBEE; }

/* Choice options */
.exercise-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.exercise-option {
  padding: 10px 14px;
  background: #fff;
  border: 2px solid #E0E0E0;
  border-radius: var(--pvz-radius-xs);
  font-size: 0.92rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-family: var(--font-main);
}

.exercise-option:active { transform: scale(0.98); }
.exercise-option.correct { background: #C8E6C9; border-color: var(--pvz-green); }
.exercise-option.wrong { background: #FFCDD2; border-color: var(--pvz-red); }

/* ===== Collapsible Answer ===== */
.answer-toggle {
  width: 100%;
  padding: 10px;
  border: none;
  background: linear-gradient(135deg, #FFE082, #FFB74D);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #5D4037;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.3s;
  font-family: var(--font-rounded);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.answer-toggle:active { transform: scale(0.97); }
.answer-toggle.open { background: linear-gradient(135deg, #FFB74D, #FF9800); }

.answer-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.answer-content.open { max-height: 600px; }

.answer-inner {
  padding: 12px;
  background: #FFF8E1;
  border-radius: 10px;
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--pvz-text);
  white-space: pre-line;
  line-height: 1.8;
  border: 2px dashed #FFB74D;
}

.answer-label {
  display: inline-block;
  padding: 2px 8px;
  background: var(--pvz-green);
  color: #fff;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ===== Resource Library ===== */
.resource-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #E3F2FD;
  border-radius: var(--pvz-radius-sm);
  margin-bottom: 8px;
  border: 2px solid #BBDEFB;
  text-decoration: none;
  transition: all 0.2s;
}

.resource-item:active { transform: scale(0.98); }

.resource-icon { font-size: 2rem; min-width: 36px; }
.resource-info { flex: 1; }
.resource-name { font-size: 0.95rem; font-weight: 700; color: var(--pvz-text); }
.resource-meta { font-size: 0.78rem; color: var(--pvz-text-light); }
.resource-arrow { font-size: 1.2rem; color: var(--pvz-blue); }

/* ===== Memo ===== */
.memo-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #BDBDBD;
  border-radius: var(--pvz-radius-sm);
  font-size: 1rem;
  font-family: var(--font-main);
  outline: none;
  margin-bottom: 10px;
  resize: vertical;
  min-height: 60px;
  background: #fff;
}

.memo-input:focus { border-color: var(--pvz-grass); }

.memo-list { list-style: none; }

.memo-item {
  background: #FFF3E0;
  border-radius: var(--pvz-radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  position: relative;
  border-left: 4px solid var(--pvz-orange);
}

.memo-text {
  font-size: 0.95rem;
  color: var(--pvz-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.memo-time {
  font-size: 0.72rem;
  color: var(--pvz-text-light);
  margin-top: 4px;
}

.memo-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(229,57,53,0.15);
  border-radius: 50%;
  color: var(--pvz-red);
  font-size: 0.9rem;
  cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--pvz-radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-rounded);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pvz-grass), var(--pvz-grass-dark));
  color: #fff;
  box-shadow: 0 3px 8px rgba(85,139,47,0.3);
}
.btn-primary:active { transform: scale(0.96); }

.btn-secondary {
  background: linear-gradient(135deg, var(--pvz-blue), #1976D2);
  color: #fff;
  box-shadow: 0 3px 8px rgba(25,118,210,0.3);
}
.btn-secondary:active { transform: scale(0.96); }

.btn-sun {
  background: linear-gradient(135deg, var(--pvz-sun), #FFA000);
  color: #5D4037;
  box-shadow: 0 3px 8px rgba(255,193,7,0.3);
}
.btn-sun:active { transform: scale(0.96); }

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ===== Form ===== */
.form-group { margin-bottom: 12px; }

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pvz-text);
  margin-bottom: 4px;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #BDBDBD;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-main);
  outline: none;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23757575' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-select:focus { border-color: var(--pvz-blue); }

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: #fff;
  border-radius: var(--pvz-radius);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pvz-text);
  margin-bottom: 16px;
  text-align: center;
  font-family: var(--font-rounded);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: #F5F5F5;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--pvz-text-light);
}

/* ===== Reward animation ===== */
.reward-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.reward-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.reward-card {
  background: linear-gradient(135deg, #FFF9C4, #FFF176);
  border-radius: 30px;
  padding: 32px 40px;
  text-align: center;
  border: 6px solid var(--pvz-sun);
  box-shadow: 0 0 40px rgba(255,217,61,0.6);
  animation: rewardBounce 0.6s ease;
}

@keyframes rewardBounce {
  0% { transform: scale(0) rotate(-180deg); }
  60% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.reward-emoji {
  font-size: 5rem;
  margin-bottom: 12px;
  animation: spin 3s linear infinite;
}

.reward-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #5D4037;
  margin-bottom: 8px;
  font-family: var(--font-rounded);
}

.reward-desc {
  font-size: 1rem;
  color: #6D4C41;
  margin-bottom: 16px;
}

.reward-sun {
  font-size: 1.8rem;
  font-weight: 800;
  color: #F57F17;
  margin-bottom: 16px;
}

/* ===== Sun particle ===== */
.sun-particle {
  position: fixed;
  font-size: 2rem;
  z-index: 9999;
  pointer-events: none;
  animation: sunFloat 1.5s ease-out forwards;
}

@keyframes sunFloat {
  0% { opacity: 1; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.5) translateY(-100px); }
  100% { opacity: 0; transform: scale(1) translateY(-200px); }
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--pvz-text-light);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  opacity: 0.4;
}

.empty-state .empty-text {
  font-size: 0.95rem;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-green { background: var(--pvz-green); color: #fff; }
.badge-orange { background: var(--pvz-orange); color: #fff; }
.badge-blue { background: var(--pvz-blue); color: #fff; }

/* ===== Lesson completion indicator ===== */
.lesson-complete-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: var(--pvz-grass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ===== Mini-game modal ===== */
.game-area {
  text-align: center;
  padding: 20px;
}

.game-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

.game-card {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s;
  background: #E8F5E9;
  border: 2px solid #C8E6C9;
}

.game-card.flipped {
  background: #fff;
  border-color: var(--pvz-blue);
}

.game-card.matched {
  background: var(--pvz-sun);
  border-color: var(--pvz-orange);
  animation: plantPop 0.4s ease;
}

.game-card.hidden-face {
  background: linear-gradient(135deg, var(--pvz-grass), var(--pvz-grass-dark));
  color: transparent;
}

.game-card:active { transform: scale(0.92); }

.game-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pvz-grass-dark);
  margin: 10px 0;
}

.game-timer {
  font-size: 1.2rem;
  color: var(--pvz-orange);
  font-weight: 700;
}

/* ===== Sun catch game ===== */
.sun-catch-area {
  position: relative;
  width: 100%;
  height: 360px;
  background: linear-gradient(180deg, #87CEEB, #B0E0E6);
  border-radius: var(--pvz-radius);
  overflow: hidden;
  border: 3px solid var(--pvz-grass);
}

.falling-sun {
  position: absolute;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
  animation: fall 3s linear forwards;
}

@keyframes fall {
  from { top: -40px; }
  to { top: 100%; }
}

/* ===== Quiz game ===== */
.quiz-question {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pvz-text);
  margin-bottom: 14px;
  padding: 14px;
  background: #E3F2FD;
  border-radius: var(--pvz-radius-sm);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option {
  padding: 12px 16px;
  background: #fff;
  border: 2px solid #E0E0E0;
  border-radius: var(--pvz-radius-sm);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-family: var(--font-main);
}

.quiz-option:active { transform: scale(0.98); }
.quiz-option.correct { background: #C8E6C9; border-color: var(--pvz-green); }
.quiz-option.wrong { background: #FFCDD2; border-color: var(--pvz-red); }

/* ===== PDF Viewer iframe ===== */
.pdf-viewer-frame {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: var(--pvz-radius-sm);
}

/* ===== 超级作文本 ===== */
.writing-part { border-left-color: #E91E63; }

.writing-type {
  display: inline-block;
  padding: 3px 12px;
  background: linear-gradient(135deg, #F8BBD0, #F48FB1);
  color: #880E4F;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.writing-section { margin-bottom: 14px; }

.writing-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #C2185B;
  margin-bottom: 6px;
}

.writing-content {
  background: #FCE4EC;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--pvz-text);
  line-height: 1.8;
  border-left: 4px solid #F48FB1;
}

.writing-method-list { list-style: none; padding-left: 0; }

.writing-method-list li {
  background: #F3E5F5;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--pvz-text);
  line-height: 1.7;
  border-left: 3px solid #AB47BC;
}

.sample-essay {
  background: linear-gradient(135deg, #FFF9C4, #FFF3E0);
  border-radius: 14px;
  padding: 16px;
  font-size: 0.95rem;
  color: var(--pvz-text);
  line-height: 2;
  border: 2px dashed #FFB74D;
  white-space: pre-wrap;
  position: relative;
}

.sample-essay::before {
  content: '📖 范文';
  position: absolute;
  top: -12px;
  left: 14px;
  background: #FF9800;
  color: #fff;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ===== 知识拓展 ===== */
.extension-part { border-left-color: #FF9800; }

.ext-section { margin-bottom: 14px; }

.ext-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #E65100;
  margin-bottom: 8px;
}

.good-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.good-word-tag {
  display: inline-block;
  padding: 5px 14px;
  background: linear-gradient(135deg, #FFE082, #FFCA28);
  color: #5D4037;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 2px solid #FFB300;
  box-shadow: 0 2px 4px rgba(255,179,0,0.2);
}

.good-sentence-list { list-style: none; padding-left: 0; }

.good-sentence {
  background: #E3F2FD;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--pvz-text);
  line-height: 1.8;
  border-left: 4px solid #42A5F5;
}

.reading-passage {
  background: #FFF8E1;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.92rem;
  color: var(--pvz-text);
  line-height: 2;
  margin-bottom: 10px;
  border: 2px solid #FFE082;
  white-space: pre-wrap;
}

.reading-question {
  background: #FAFAFA;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 2px solid #E0E0E0;
}

.rq-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pvz-text);
  margin-bottom: 6px;
}

/* ===== 记忆配对游戏 ===== */
.memory-game {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.memory-card {
  background: linear-gradient(135deg, var(--pvz-grass), var(--pvz-grass-dark));
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--pvz-grass-dark);
}

.memory-card.flipped {
  background: #fff;
  color: var(--pvz-text);
  border-color: var(--pvz-blue);
}

.memory-card.matched {
  background: linear-gradient(135deg, var(--pvz-sun), #FFA000);
  color: #5D4037;
  border-color: var(--pvz-orange);
  animation: plantPop 0.4s ease;
  pointer-events: none;
}

.memory-card:active { transform: scale(0.93); }

.memory-status {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pvz-text-light);
}

.memory-status .match-count {
  color: var(--pvz-orange);
  font-size: 1.1rem;
}

/* ===== 数学思维训练 ===== */
.thinking-part { border-left-color: #7B1FA2; }

.thinking-item {
  background: #F3E5F5;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-left: 4px solid #AB47BC;
}

.thinking-q {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pvz-text);
  line-height: 1.7;
}

/* ===== 每日口算练习 ===== */
.daily-practice-part { border-left-color: #00BCD4; }

.daily-practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.daily-practice-item {
  background: #E0F7FA;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  border: 2px solid #B2EBF2;
}

.dp-q {
  font-size: 0.9rem;
  font-weight: 700;
  color: #006064;
  margin-bottom: 6px;
}

.dp-input { border-color: #4DD0E1 !important; }
.dp-input.correct { border-color: var(--pvz-green) !important; background: #E8F5E9 !important; }
.dp-input.wrong { border-color: var(--pvz-red) !important; background: #FFEBEE !important; }

/* ===== 英语音标学习 ===== */
.phonics-part { border-left-color: #00897B; }

.phonics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.phonics-card {
  background: linear-gradient(135deg, #E0F2F1, #B2DFDB);
  border-radius: 14px;
  padding: 14px;
  border: 2px solid #80CBC4;
}

.phonics-sound {
  font-size: 1.8rem;
  font-weight: 800;
  color: #00695C;
  text-align: center;
  margin-bottom: 6px;
  font-family: "SF Mono", "Courier New", monospace;
}

.phonics-letter {
  font-size: 0.82rem;
  color: #004D40;
  font-weight: 600;
  margin-bottom: 6px;
}

.phonics-examples { margin-bottom: 8px; }

.phonetic-word {
  display: inline-block;
  padding: 2px 8px;
  background: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #00796B;
  margin: 2px;
  border: 1px solid #80CBC4;
}

.phonics-tip {
  font-size: 0.8rem;
  color: #004D40;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 6px 8px;
  line-height: 1.6;
}

/* ===== 英语开口练习打卡 ===== */
.speaking-part { border-left-color: #FF5722; }

.speaking-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #FBE9E7;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 2px solid #FFCCBC;
  cursor: pointer;
  transition: all 0.3s ease;
}

.speaking-item.done {
  background: #E8F5E9;
  border-color: var(--pvz-grass);
}

.speaking-checkbox {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 3px solid #FF7043;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: #fff;
  color: var(--pvz-grass);
  font-weight: 700;
  margin-top: 2px;
}

.speaking-item.done .speaking-checkbox {
  background: var(--pvz-grass);
  border-color: var(--pvz-grass-dark);
  color: #fff;
}

.speaking-content { flex: 1; }

.speaking-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pvz-text);
  line-height: 1.6;
}

.speaking-item.done .speaking-text {
  text-decoration: line-through;
  color: var(--pvz-text-light);
}

.speaking-tip {
  font-size: 0.8rem;
  color: var(--pvz-text-light);
  margin-top: 4px;
}

.speaking-reward {
  font-size: 1.1rem;
  white-space: nowrap;
  font-weight: 700;
  align-self: center;
}

/* ===== 英语语法讲解 ===== */
.grammar-part { border-left-color: #3F51B5; }

.grammar-level {
  display: inline-block;
  padding: 3px 12px;
  background: linear-gradient(135deg, #C5CAE9, #9FA8DA);
  color: #1A237E;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.grammar-explanation {
  background: #E8EAF6;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.92rem;
  color: var(--pvz-text);
  line-height: 2;
  border-left: 4px solid #3F51B5;
  white-space: pre-wrap;
  margin-bottom: 10px;
}

/* ===== 英语学习方案 ===== */
.study-plan-card { border: 3px solid #9FA8DA; }
.study-plan-card::before { background: linear-gradient(90deg, #3F51B5, #7986CB, #3F51B5); }

.study-plan-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.plan-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #E8EAF6;
  border-radius: 14px;
  padding: 12px 14px;
  border-left: 4px solid #3F51B5;
}

.step-num {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, #3F51B5, #303F9F);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-rounded);
}

.step-content { flex: 1; }

.step-phase {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1A237E;
  margin-bottom: 2px;
}

.step-detail {
  font-size: 0.88rem;
  color: var(--pvz-text);
  line-height: 1.6;
}

.step-time {
  font-size: 0.78rem;
  color: #5C6BC0;
  font-weight: 600;
  margin-top: 2px;
}

.study-tips {
  background: #FFF8E1;
  border-radius: 12px;
  padding: 14px;
  border: 2px dashed #FFB74D;
}

.tip-list { list-style: none; padding-left: 0; }

.tip-list li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--pvz-text);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
}

.tip-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--pvz-green);
  font-weight: 700;
}

/* ===== 口算大挑战游戏 ===== */
.sprint-problem {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--pvz-text);
  text-align: center;
  padding: 20px;
  background: #E3F2FD;
  border-radius: 16px;
  margin-bottom: 14px;
  font-family: var(--font-rounded);
}

.sprint-input {
  border: 3px solid #42A5F5 !important;
  border-radius: 14px !important;
}

.sprint-input:focus {
  border-color: #1565C0 !important;
  box-shadow: 0 0 0 3px rgba(66,165,245,0.2);
}

/* ===== Explore (课外拓展) Story Cards ===== */
.explore-intro {
  background: linear-gradient(135deg, #E0F7FA, #E8F5E9);
  border-radius: var(--pvz-radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  color: var(--pvz-text);
  line-height: 1.8;
  border: 2px dashed var(--pvz-teal);
}

.story-card {
  background: var(--pvz-card);
  border-radius: var(--pvz-radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px var(--pvz-shadow);
  border: 3px solid #E0E0E0;
  transition: border-color 0.3s;
}

.story-card.checked {
  border-color: var(--pvz-grass);
}

.story-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  background: linear-gradient(135deg, #E0F7FA, #E8F5E9);
  transition: background 0.3s;
  user-select: none;
}

.story-header:active {
  background: linear-gradient(135deg, #B2DFDB, #C8E6C9);
}

.story-header .story-emoji {
  font-size: 2rem;
  min-width: 36px;
}

.story-header .story-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pvz-text);
  font-family: var(--font-rounded);
}

.story-header .story-arrow {
  font-size: 1.2rem;
  color: var(--pvz-text-light);
  transition: transform 0.3s ease;
}

.story-card.open .story-arrow {
  transform: rotate(90deg);
}

.story-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.story-card.open .story-body {
  max-height: 2000px;
}

.story-content {
  padding: 0 20px 20px;
}

.story-text {
  font-size: 0.95rem;
  color: var(--pvz-text);
  line-height: 2;
  white-space: pre-wrap;
  background: #F9FBE7;
  border-radius: var(--pvz-radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.knowledge-box {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border-radius: var(--pvz-radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--pvz-blue);
}

.knowledge-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--pvz-blue);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.knowledge-text {
  font-size: 0.92rem;
  color: var(--pvz-text);
  line-height: 1.8;
}

.funfact-box {
  background: linear-gradient(135deg, #FFF9C4, #FFF3E0);
  border-radius: var(--pvz-radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--pvz-orange);
}

.funfact-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--pvz-orange);
  margin-bottom: 4px;
}

.funfact-text {
  font-size: 0.9rem;
  color: var(--pvz-text);
  line-height: 1.7;
}

.checkin-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--pvz-radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-rounded);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkin-btn.unchecked {
  background: linear-gradient(135deg, var(--pvz-grass), var(--pvz-grass-dark));
  color: #fff;
  box-shadow: 0 3px 8px rgba(85,139,47,0.3);
}

.checkin-btn.checked {
  background: linear-gradient(135deg, #81C784, #66BB6A);
  color: #fff;
  cursor: default;
}

.checkin-btn:active:not(.checked) {
  transform: scale(0.97);
}

/* ===== Subject color themes ===== */
.subject-chinese { --subject-color: var(--pvz-red); }
.subject-math { --subject-color: var(--pvz-blue); }
.subject-english { --subject-color: var(--pvz-purple); }
.subject-science { --subject-color: var(--pvz-teal); }
.subject-history { --subject-color: #8D6E63; }
.subject-geography { --subject-color: #26A69A; }
.subject-news { --subject-color: #5C6BC0; }

/* ===== Page Header (for non-home pages) ===== */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
  border-radius: var(--pvz-radius);
  background: linear-gradient(135deg, #FFF9C4, #FFE082);
  border: 3px solid #FFD54F;
}

.page-header .page-header-icon {
  font-size: 2rem;
}

.page-header .page-header-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #5D4037;
  font-family: var(--font-rounded);
}

.page-header .page-header-desc {
  font-size: 0.85rem;
  color: #6D4C41;
  margin-top: 2px;
}

/* ===== Specialized page tab sub-nav ===== */
.sub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sub-tab {
  padding: 8px 16px;
  border: 2px solid #E0E0E0;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pvz-text-light);
  cursor: pointer;
  transition: all 0.25s;
  background: #fff;
  font-family: var(--font-rounded);
}

.sub-tab.active {
  background: linear-gradient(135deg, var(--pvz-grass), var(--pvz-grass-dark));
  color: #fff;
  border-color: var(--pvz-grass-dark);
}

.sub-tab:active { transform: scale(0.96); }

.sub-tab-content { display: none; }
.sub-tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.hidden { display: none !important; }

/* ===== Responsive: iPad Portrait ===== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    box-shadow: 8px 0 30px rgba(0,0,0,0.15);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-content {
    margin-left: 0;
    padding: 64px 16px 60px;
  }

  .progress-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  html { font-size: 17px; }
  .progress-grid { grid-template-columns: 1fr; }
  .minigame-list { grid-template-columns: 1fr; }
  .memory-game { grid-template-columns: repeat(3, 1fr); }
  .phonics-grid { grid-template-columns: 1fr; }
  .daily-practice-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-banner { padding: 18px 16px; }
  .hero-emoji { font-size: 2.8rem; }
  .hero-title { font-size: 1.3rem; }
  .section-card { padding: 16px; }
  .plant-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  .memory-game { grid-template-columns: repeat(2, 1fr); }
  .daily-practice-grid { grid-template-columns: 1fr; }
  .sprint-problem { font-size: 2rem; }
  .main-content { padding: 60px 12px 50px; }
  .hero-banner { flex-direction: column; text-align: center; gap: 8px; }
  .hero-deco { display: none; }
}

/* ===== Landscape iPad ===== */
@media (orientation: landscape) and (min-width: 1025px) and (max-width: 1366px) {
  .main-content { max-width: 850px; }
}

/* ===== Standalone mode (added to home screen) ===== */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
  .sidebar { padding-top: env(safe-area-inset-top); }
  .sidebar-toggle { top: calc(14px + env(safe-area-inset-top)); }
}

/* ===== Number match game ===== */
.nummatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.nummatch-card {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border: 3px solid #64B5F6;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.2rem;
  font-weight: 800;
  color: #1565C0;
  font-family: var(--font-rounded);
}

.nummatch-card.matched {
  background: linear-gradient(135deg, #C8E6C9, #A5D6A7);
  border-color: var(--pvz-green);
  color: #2E7D32;
  animation: plantPop 0.4s ease;
  pointer-events: none;
}

.nummatch-card.wrong {
  background: #FFCDD2;
  border-color: var(--pvz-red);
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.nummatch-card:active { transform: scale(0.93); }

/* ===== Daily Login Check-in ===== */
.daily-login-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--pvz-radius);
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.daily-login-card.unclaimed {
  background: linear-gradient(135deg, #FFF9C4, #FFE082, #FFCA28);
  border: 3px solid #FFB300;
  box-shadow: 0 4px 14px rgba(255,193,7,0.3);
  animation: loginPulse 2s ease-in-out infinite;
}

.daily-login-card.unclaimed:active {
  transform: scale(0.97);
}

.daily-login-card.claimed {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border: 3px solid var(--pvz-grass);
  cursor: default;
}

@keyframes loginPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(255,193,7,0.3); }
  50% { box-shadow: 0 6px 20px rgba(255,193,7,0.5); }
}

.daily-login-icon {
  font-size: 2.5rem;
  min-width: 40px;
  text-align: center;
}

.daily-login-text { flex: 1; }

.daily-login-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #5D4037;
  font-family: var(--font-rounded);
}

.daily-login-sub {
  font-size: 0.85rem;
  color: #6D4C41;
  margin-top: 2px;
}

.daily-login-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: #E65100;
  font-family: var(--font-rounded);
  background: rgba(255,255,255,0.6);
  padding: 6px 14px;
  border-radius: 20px;
}

/* ===== Daily Bonus Banner ===== */
.daily-bonus-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-top: 12px;
  border-radius: var(--pvz-radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.daily-bonus-banner:not(.claimed) {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2, #FFCC80);
  border: 3px solid #FF9800;
  animation: bonusGlow 1.5s ease-in-out infinite;
}

.daily-bonus-banner:not(.claimed):active {
  transform: scale(0.97);
}

.daily-bonus-banner.claimed {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border: 2px solid var(--pvz-grass);
  cursor: default;
}

@keyframes bonusGlow {
  0%, 100% { box-shadow: 0 2px 8px rgba(255,152,0,0.2); }
  50% { box-shadow: 0 4px 16px rgba(255,152,0,0.4); }
}

.bonus-icon {
  font-size: 2rem;
  min-width: 32px;
}

.bonus-text { flex: 1; }

.bonus-title {
  font-size: 1rem;
  font-weight: 800;
  color: #5D4037;
  font-family: var(--font-rounded);
}

.bonus-sub {
  font-size: 0.82rem;
  color: #6D4C41;
  margin-top: 2px;
}

.bonus-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: #E65100;
  font-family: var(--font-rounded);
}

/* ===== Magic Garden Plot ===== */
.magic-garden-plot {
  position: relative;
  width: 100%;
  min-height: 280px;
  border-radius: var(--pvz-radius);
  overflow: hidden;
  border: 4px solid var(--pvz-grass-dark);
  box-shadow: 0 4px 14px var(--pvz-shadow);
}

.garden-sky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 65%;
  background: linear-gradient(180deg, #81D4FA 0%, #B3E5FC 60%, #E1F5FE 100%);
}

.garden-sun-deco {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 2.5rem;
  animation: spin 20s linear infinite;
  z-index: 1;
}

.garden-cloud-1 {
  position: absolute;
  top: 20px;
  left: 10%;
  font-size: 2rem;
  animation: cloudDrift1 15s linear infinite;
  z-index: 1;
}

.garden-cloud-2 {
  position: absolute;
  top: 40px;
  left: 50%;
  font-size: 1.5rem;
  animation: cloudDrift2 20s linear infinite;
  z-index: 1;
}

@keyframes cloudDrift1 {
  0% { transform: translateX(0); }
  50% { transform: translateX(30px); }
  100% { transform: translateX(0); }
}

@keyframes cloudDrift2 {
  0% { transform: translateX(0); }
  50% { transform: translateX(-25px); }
  100% { transform: translateX(0); }
}

.garden-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, #81C784 0%, #66BB6A 30%, #43A047 60%, #6D4C41 90%, #5D4037 100%);
}

.garden-placed-item {
  position: absolute;
  font-size: 2.2rem;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.2s ease;
  animation: itemAppear 0.5s ease;
  filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.2));
}

.garden-placed-item:active {
  transform: scale(1.2);
}

@keyframes itemAppear {
  0% { transform: scale(0) translateY(-20px); opacity: 0; }
  60% { transform: scale(1.3) translateY(0); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.garden-empty-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}

.garden-empty-emoji {
  font-size: 3.5rem;
  animation: bounce 1.5s ease-in-out infinite;
}

.garden-empty-text {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  margin-top: 8px;
  line-height: 1.6;
}

.garden-stats {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.85);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pvz-text);
  white-space: nowrap;
  z-index: 3;
}

/* ===== Garden Shop ===== */
.garden-shop-section {
  margin-top: 16px;
}

.garden-shop-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--pvz-text);
  font-family: var(--font-rounded);
  margin-bottom: 12px;
  text-align: center;
}

.garden-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #F1F8E9, #E8F5E9);
  border-radius: var(--pvz-radius-sm);
  border: 2px solid #C5E1A5;
  transition: all 0.3s ease;
}

.shop-item.cant-afford {
  opacity: 0.6;
  background: #F5F5F5;
  border-color: #E0E0E0;
}

.shop-item-emoji {
  font-size: 2.2rem;
  min-width: 40px;
  text-align: center;
}

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

.shop-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pvz-text);
  font-family: var(--font-rounded);
}

.shop-item-desc {
  font-size: 0.78rem;
  color: var(--pvz-text-light);
  margin-top: 2px;
  line-height: 1.4;
}

.shop-item-cat {
  display: inline-block;
  padding: 1px 8px;
  background: #E3F2FD;
  color: #1565C0;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 4px;
}

.shop-item-buy {
  text-align: center;
  min-width: 70px;
}

.shop-item-cost {
  font-size: 0.95rem;
  font-weight: 800;
  color: #E65100;
  margin-bottom: 6px;
}

.shop-item-owned {
  font-size: 0.72rem;
  color: var(--pvz-grass-dark);
  font-weight: 700;
  margin-top: 4px;
}

.btn-disabled {
  background: #E0E0E0 !important;
  color: #9E9E9E !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* ===== Error Correction Reward ===== */
.error-correction-area {
  margin-top: 16px;
}

.correction-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--pvz-radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.correction-card.unclaimed {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border: 3px solid #42A5F5;
}

.correction-card.unclaimed:active {
  transform: scale(0.97);
}

.correction-card.claimed {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border: 2px solid var(--pvz-grass);
  cursor: default;
}

.correction-icon {
  font-size: 2rem;
  min-width: 32px;
}

.correction-text { flex: 1; }

.correction-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1565C0;
  font-family: var(--font-rounded);
}

/* ===== Reward Rules Card ===== */
.reward-rules-card {
  border: 3px solid var(--pvz-sun) !important;
  background: linear-gradient(135deg, #FFFDE7, #FFF9C4);
}

.reward-rules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reward-rule-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.7);
  border-radius: 12px;
  font-size: 0.92rem;
  color: var(--pvz-text);
}

.reward-rule-item .rule-emoji {
  font-size: 1.5rem;
  min-width: 28px;
  text-align: center;
}

.reward-rule-item strong {
  color: #E65100;
  font-size: 1.1rem;
}

/* ===== Responsive for garden ===== */
@media (max-width: 768px) {
  .garden-shop-grid { grid-template-columns: 1fr; }
  .magic-garden-plot { min-height: 220px; }
  .garden-placed-item { font-size: 1.8rem; }
  .daily-login-amount { font-size: 1.3rem; }
  .shop-card-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
  .garden-shop-grid { grid-template-columns: 1fr; }
  .magic-garden-plot { min-height: 200px; }
  .garden-placed-item { font-size: 1.6rem; }
  .daily-login-card { flex-direction: column; text-align: center; gap: 8px; }
  .shop-card-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .shop-tabs { flex-direction: column; }
  .shop-tab { width: 100%; }
}

/* ===== 阳光商城页面 ===== */

/* Sun balance bar */
.shop-sun-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #FFF9C4, #FFF59D);
  border-radius: var(--pvz-radius);
  border: 3px solid #FFD54F;
  margin-bottom: 16px;
  box-shadow: 0 3px 10px rgba(255,193,7,0.2);
}

.shop-sun-icon {
  font-size: 1.8rem;
  animation: spin 8s linear infinite;
}

.shop-sun-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: #E65100;
  font-family: var(--font-rounded);
}

.shop-sun-label {
  font-size: 0.9rem;
  color: #795548;
  font-weight: 600;
}

/* Category tabs */
.shop-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.shop-tab {
  flex: 1;
  padding: 12px 16px;
  border: 3px solid #E0E0E0;
  background: #FAFAFA;
  border-radius: var(--pvz-radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: #757575;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-rounded);
  text-align: center;
}

.shop-tab.active {
  border-color: var(--pvz-grass);
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  color: var(--pvz-grass-dark);
  box-shadow: 0 3px 8px rgba(76,175,80,0.25);
  transform: translateY(-2px);
}

.shop-tab:active {
  transform: scale(0.97);
}

/* Subcategory group */
.shop-subcat-group {
  margin-bottom: 20px;
}

.shop-subcat-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--pvz-grass-dark);
  font-family: var(--font-rounded);
  margin-bottom: 10px;
  padding-left: 4px;
  border-left: 4px solid var(--pvz-grass);
  padding-left: 10px;
}

/* Compact card grid */
.shop-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

/* Individual shop card */
.shop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px 12px;
  background: linear-gradient(160deg, #FFFFFF, #F1F8E9);
  border-radius: var(--pvz-radius-sm);
  border: 2px solid #C5E1A5;
  transition: all 0.3s ease;
  position: relative;
}

.shop-card.cant-afford {
  opacity: 0.55;
  background: #F5F5F5;
  border-color: #E0E0E0;
}

.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.shop-card-emoji {
  font-size: 2.4rem;
  margin-bottom: 6px;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.1));
}

.shop-card-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--pvz-text);
  font-family: var(--font-rounded);
  margin-bottom: 2px;
}

.shop-card-desc {
  font-size: 0.72rem;
  color: var(--pvz-text-light);
  line-height: 1.4;
  margin-bottom: 8px;
  min-height: 2.4em;
}

.shop-card-cost {
  font-size: 1rem;
  font-weight: 900;
  color: #E65100;
  margin-bottom: 6px;
  font-family: var(--font-rounded);
}

.shop-card-btn {
  width: 100%;
  padding: 7px 10px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.shop-card-owned {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--pvz-grass);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Garden level badge */
.garden-level-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-rounded);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ===== 课文逐课详解 ===== */
.lesson-detail-part {
  background: linear-gradient(135deg, #FFF9C4, #FFFDE7);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  border: 2px solid #FFE082;
}
.lesson-detail-block {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid #E0E0E0;
  transition: border-color 0.3s;
}
.lesson-detail-block.done { border-color: var(--pvz-green); }
.lesson-detail-block.expanded { border-color: var(--pvz-orange); }
.lesson-detail-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.lesson-detail-header:hover { background: #FFF3E0; }
.lesson-detail-emoji { font-size: 1.3rem; }
.lesson-detail-title { flex: 1; font-weight: 700; font-size: 0.92rem; color: var(--pvz-text); }
.lesson-done-badge {
  background: var(--pvz-green);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.lesson-detail-arrow {
  font-size: 0.8rem;
  color: var(--pvz-text-light);
  transition: transform 0.3s;
}
.lesson-detail-block.expanded .lesson-detail-arrow { transform: rotate(90deg); }
.lesson-detail-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 12px;
}
.lesson-detail-block.expanded .lesson-detail-body { max-height: 2000px; padding: 0 12px 12px; }
.lesson-point { margin-bottom: 10px; }
.lesson-point-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--pvz-orange);
  margin-bottom: 4px;
}
.lesson-point-content {
  font-size: 0.85rem;
  color: var(--pvz-text);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ===== 数学思维难度等级 ===== */
.difficulty-legend {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.diff-tag { font-size: 0.78rem; font-weight: 700; }
.diff-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 6px;
}
.thinking-item.diff-level-1 { border-left: 3px solid var(--pvz-green); }
.thinking-item.diff-level-2 { border-left: 3px solid var(--pvz-orange); }
.thinking-item.diff-level-3 { border-left: 3px solid var(--pvz-red); }

/* ===== 快乐读书吧 ===== */
.happy-reading-card { border: 2px solid #FFB74D !important; }
.hr-books { display: flex; flex-direction: column; gap: 10px; }
.hr-book-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #E0E0E0;
}
.hr-book-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.hr-book-header:hover { background: #FFF8E1; }
.hr-book-emoji { font-size: 1.8rem; }
.hr-book-info { flex: 1; }
.hr-book-title { font-weight: 700; font-size: 0.95rem; }
.hr-book-author { font-size: 0.78rem; color: var(--pvz-text-light); }
.hr-book-arrow { font-size: 0.8rem; color: var(--pvz-text-light); transition: transform 0.3s; }
.hr-book-card.expanded .hr-book-arrow { transform: rotate(90deg); }
.hr-book-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 12px;
}
.hr-book-card.expanded .hr-book-body { max-height: 2000px; padding: 0 12px 12px; }
.hr-book-desc { font-size: 0.85rem; color: var(--pvz-text); margin-bottom: 8px; line-height: 1.5; }

/* ===== 零基础音标/语法 ===== */
.zero-basics-card { border: 2px solid var(--pvz-purple) !important; }
.zero-level-block {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid #E0E0E0;
}
.zero-level-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.zero-level-header:hover { background: #F3E5F5; }
.zero-level-emoji { font-size: 1.5rem; }
.zero-level-title { font-weight: 700; font-size: 0.92rem; }
.zero-level-desc { font-size: 0.78rem; color: var(--pvz-text-light); }
.zero-level-arrow { font-size: 0.8rem; color: var(--pvz-text-light); transition: transform 0.3s; }
.zero-level-block.expanded .zero-level-arrow { transform: rotate(90deg); }
.zero-level-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 12px;
}
.zero-level-block.expanded .zero-level-body { max-height: 3000px; padding: 0 12px 12px; }
.phonics-sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.sound-card {
  background: #F3E5F5;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid #CE93D8;
}
.sound-symbol { font-size: 1.4rem; font-weight: 800; color: var(--pvz-purple); }
.sound-word { font-size: 0.82rem; font-weight: 600; margin-top: 2px; }
.sound-mouth, .sound-sound { font-size: 0.78rem; color: var(--pvz-text-light); margin-top: 2px; }
.cheat-mode {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
}
.cheat-label {
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  margin-bottom: 2px;
}
.cheat-content {
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.5;
}
.cheat-mode-large { padding: 10px 14px; margin-top: 8px; }
.grammar-rule-box {
  background: #E8F5E9;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-left: 4px solid var(--pvz-green);
}
.grammar-rule-label { font-weight: 700; font-size: 0.82rem; color: var(--pvz-green); }
.grammar-rule-text { font-size: 0.88rem; font-weight: 600; margin-top: 2px; }
.grammar-detail-box {
  background: #E3F2FD;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-left: 4px solid var(--pvz-blue);
}
.grammar-detail-label { font-weight: 700; font-size: 0.82rem; color: var(--pvz-blue); }
.grammar-detail-text { font-size: 0.85rem; margin-top: 2px; line-height: 1.5; }

/* ===== 知识守护花园 ===== */
.challenge-levels { display: flex; flex-direction: column; gap: 12px; }
.challenge-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  border: 2px solid #E0E0E0;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.challenge-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.challenge-card.completed { border-color: var(--pvz-green); background: #F1F8E9; }
.challenge-card.locked { opacity: 0.6; }
.challenge-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.challenge-emoji { font-size: 1.8rem; }
.challenge-title { font-weight: 800; font-size: 1rem; }
.challenge-week { font-size: 0.78rem; color: var(--pvz-text-light); }
.challenge-done {
  margin-left: auto;
  background: var(--pvz-green);
  color: #fff;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}
.challenge-story {
  font-size: 0.85rem;
  color: var(--pvz-text);
  line-height: 1.5;
  margin-bottom: 8px;
  background: #FFF3E0;
  padding: 8px 10px;
  border-radius: 8px;
}
.challenge-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.challenge-locked {
  text-align: center;
  color: var(--pvz-text-light);
  font-size: 0.85rem;
  padding: 6px;
}
.challenge-rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.challenge-reward-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  border: 2px solid #E0E0E0;
}
.challenge-reward-card.earned { border-color: #FFD700; background: #FFFDE7; }
.challenge-reward-card.locked { opacity: 0.5; }
.reward-emoji { font-size: 2rem; display: block; }
.reward-name { font-weight: 700; font-size: 0.85rem; margin: 4px 0; }
.reward-desc { font-size: 0.72rem; color: var(--pvz-text-light); margin-bottom: 6px; }

/* Challenge game modal */
.challenge-game { padding: 16px; max-width: 600px; margin: 0 auto; }
.cg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.cg-level { font-weight: 800; font-size: 0.95rem; }
.cg-progress { font-size: 0.85rem; color: var(--pvz-text-light); }
.cg-stats { display: flex; gap: 6px; margin-bottom: 12px; }
.cg-question {
  background: #F5F5F5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.cg-q-text { font-size: 0.92rem; font-weight: 600; line-height: 1.6; margin-bottom: 10px; }
.cg-feedback { margin-bottom: 10px; }
.cg-correct {
  background: #E8F5E9;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: var(--pvz-green);
}
.cg-wrong {
  background: #FFEBEE;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: var(--pvz-red);
}
.cg-actions { text-align: center; }
.challenge-result {
  text-align: center;
  padding: 30px 20px;
  max-width: 400px;
  margin: 0 auto;
}
.challenge-result.victory { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); border-radius: 14px; }
.challenge-result.defeat { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border-radius: 14px; }
.result-emoji { font-size: 3.5rem; margin-bottom: 10px; }
.result-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.result-stats { font-size: 1rem; color: var(--pvz-text); margin-bottom: 10px; }
.result-reward { font-size: 0.92rem; color: var(--pvz-orange); font-weight: 700; margin-bottom: 16px; }
.result-encourage { font-size: 0.88rem; color: var(--pvz-text-light); margin-bottom: 16px; }

/* ===== 花园养护机制 ===== */
.garden-wilted-card { border: 2px solid #EF9A9A !important; background: #FFEBEE; }
.garden-healthy-card { border: 2px solid #A5D6A7 !important; }
.garden-wilt-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
}
.wilt-emoji { font-size: 2.5rem; }
.wilt-title { font-weight: 800; font-size: 1rem; color: #C62828; }
.wilt-desc { font-size: 0.85rem; color: var(--pvz-text); line-height: 1.5; margin-top: 2px; }
.garden-healthy-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
}
.healthy-emoji { font-size: 2.5rem; }
.healthy-title { font-weight: 800; font-size: 1rem; color: var(--pvz-green); }
.healthy-desc { font-size: 0.85rem; color: var(--pvz-text-light); margin-top: 2px; }
.plant-card.wilted { opacity: 0.6; }
.pvz-garden.wilted { background: linear-gradient(135deg, #6D4C41, #5D4037) !important; }

/* ===== Phase 7: 生活成长 + 家长后台 ===== */

/* ---- 小型横幅 ---- */
.hero-banner.small-hero {
  padding: 14px 18px;
  margin-bottom: 14px;
}
.hero-banner.small-hero .hero-emoji { font-size: 2rem; }
.hero-banner.small-hero .hero-title { font-size: 1.1rem; }
.hero-banner.small-hero .hero-subtitle { font-size: 0.82rem; }

/* ---- 按钮补充 ---- */
.btn-warn {
  background: linear-gradient(135deg, #FF7043, #F4511E);
  color: #fff;
  border: none;
  box-shadow: 0 3px 8px rgba(244,81,30,0.3);
}
.btn-warn:active { transform: scale(0.96); }
.btn-done {
  background: #E0E0E0;
  color: #9E9E9E;
  border: none;
  cursor: not-allowed;
}

/* ---- 家长入口卡片（首页）---- */
.parent-entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border: 2px solid #90CAF9;
  border-radius: var(--pvz-radius-sm);
  padding: 14px 18px;
  margin-top: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.parent-entry-card:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.parent-entry-icon { font-size: 1.8rem; }
.parent-entry-text {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1565C0;
}
.parent-entry-arrow {
  font-size: 0.85rem;
  color: #64B5F6;
  font-weight: 600;
}

/* ---- 家长登录弹窗 ---- */
.parent-login-box {
  max-width: 360px;
  text-align: center;
  padding: 28px 24px !important;
}
.parent-login-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--pvz-text);
  margin-bottom: 6px;
}
.parent-login-desc {
  font-size: 0.88rem;
  color: var(--pvz-text-light);
  margin-bottom: 16px;
}
.parent-login-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E0E0E0;
  border-radius: var(--pvz-radius-xs);
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.parent-login-input:focus { border-color: var(--pvz-blue); }
.parent-login-error {
  color: var(--pvz-red);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
  min-height: 20px;
}
.parent-login-btns {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.parent-login-btns .btn { flex: 1; }
.parent-login-hint {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--pvz-text-light);
}

/* ---- 劳务/运动/娱乐通用卡片网格 ---- */
.chore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.chore-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FAFAFA;
  border: 2px solid #E8F5E9;
  border-radius: var(--pvz-radius-sm);
  padding: 12px;
  transition: all 0.2s;
}
.chore-card.done {
  background: #F1F8E9;
  border-color: var(--pvz-grass-light);
}
.chore-card.sport-card {
  border-color: #E3F2FD;
}
.chore-card.sport-card.done {
  background: #E8F5E9;
}
.chore-card.entertainment-card {
  border-color: #FFF3E0;
}
.chore-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}
.chore-info {
  flex: 1;
  min-width: 0;
}
.chore-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--pvz-text);
  margin-bottom: 2px;
}
.chore-desc {
  font-size: 0.8rem;
  color: var(--pvz-text-light);
  margin-bottom: 4px;
}
.chore-target {
  font-size: 0.78rem;
  color: var(--pvz-blue);
  font-weight: 600;
  margin-bottom: 4px;
}
.chore-tip {
  font-size: 0.75rem;
  color: var(--pvz-orange);
  line-height: 1.4;
}
.chore-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.chore-reward {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--pvz-sun-dark);
  white-space: nowrap;
}
.chore-cost {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--pvz-red);
  white-space: nowrap;
}

/* ---- 每日汇总条 ---- */
.daily-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, #F1F8E9, #E8F5E9);
  border-radius: var(--pvz-radius-xs);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pvz-text);
}
.summary-sun {
  color: var(--pvz-sun-dark);
  font-weight: 800;
}

/* ---- 运动连续打卡条 ---- */
.sport-streak-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  border-radius: var(--pvz-radius-xs);
  font-size: 0.9rem;
  font-weight: 700;
  color: #E65100;
}
.streak-emoji { font-size: 1.4rem; }
.streak-info {
  margin-left: auto;
  font-size: 0.82rem;
  color: #BF360C;
}

/* ---- 娱乐消费 ---- */
.entertainment-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, #FFFDE7, #FFF9C4);
  border-radius: var(--pvz-radius-xs);
  font-size: 0.88rem;
  font-weight: 600;
}
.status-sun {
  color: var(--pvz-sun-dark);
  font-weight: 800;
}
.entertainment-disabled {
  text-align: center;
  padding: 30px 16px;
}
.disabled-emoji { font-size: 3rem; margin-bottom: 8px; }
.disabled-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pvz-text);
  margin-bottom: 4px;
}
.disabled-hint {
  font-size: 0.82rem;
  color: var(--pvz-text-light);
}
.log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #F5F5F5;
  font-size: 0.85rem;
}
.log-cost {
  color: var(--pvz-red);
  font-weight: 700;
}

/* ===== 家长管理后台 ===== */
.parent-hero {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB) !important;
  position: relative;
}
.parent-logout-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.8rem !important;
  padding: 4px 12px !important;
}

/* ---- 家长登录锁定页 ---- */
.parent-locked {
  text-align: center;
  padding: 40px 20px;
}
.locked-emoji { font-size: 3rem; margin-bottom: 10px; }
.locked-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pvz-text-light);
  margin-bottom: 16px;
}

/* ---- 家长 Tab 导航 ---- */
.parent-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.parent-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 2px solid #E0E0E0;
  background: #FAFAFA;
  border-radius: var(--pvz-radius-xs);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pvz-text-light);
  cursor: pointer;
  transition: all 0.2s;
}
.parent-tab.active {
  background: var(--pvz-blue);
  color: #fff;
  border-color: var(--pvz-blue);
}
.parent-tab:active { transform: scale(0.96); }

/* ---- 统计卡片网格 ---- */
.parent-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.stat-card {
  background: linear-gradient(135deg, #FAFAFA, #F5F5F5);
  border-radius: var(--pvz-radius-xs);
  padding: 14px 10px;
  text-align: center;
  border: 2px solid #E8F5E9;
}
.stat-emoji { font-size: 1.8rem; }
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pvz-text);
  margin: 2px 0;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--pvz-text-light);
}

/* ---- 进度行 ---- */
.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.progress-label {
  font-size: 0.85rem;
  font-weight: 600;
  width: 70px;
  flex-shrink: 0;
}
.progress-num {
  font-size: 0.82rem;
  color: var(--pvz-text-light);
  font-weight: 600;
  width: 50px;
  text-align: right;
  flex-shrink: 0;
}

/* ---- 阳光收支 ---- */
.sun-summary-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.sun-summary-item {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  border-radius: var(--pvz-radius-xs);
  font-size: 0.82rem;
  font-weight: 700;
}
.sun-summary-item.income {
  background: #E8F5E9;
  color: var(--pvz-green);
}
.sun-summary-item.expense {
  background: #FFEBEE;
  color: var(--pvz-red);
}
.sun-summary-item.net {
  background: #FFFDE7;
  color: var(--pvz-sun-dark);
}
.sun-log-list {
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sun-log-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #F5F5F5;
  font-size: 0.82rem;
}
.log-date {
  color: var(--pvz-text-light);
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.log-desc {
  flex: 1;
  color: var(--pvz-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-amount {
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.log-amount.income { color: var(--pvz-green); }
.log-amount.expense { color: var(--pvz-red); }

/* ---- 错题汇总列表 ---- */
.error-summary-list {
  max-height: 300px;
  overflow-y: auto;
}
.error-summary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #F5F5F5;
  font-size: 0.82rem;
}
.err-subject {
  background: #E3F2FD;
  color: #1565C0;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.err-question {
  flex: 1;
  color: var(--pvz-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 空状态提示 ---- */
.empty-hint {
  text-align: center;
  padding: 20px;
  color: var(--pvz-text-light);
  font-size: 0.88rem;
}

/* ---- 奖励编辑列表 ---- */
.reward-edit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reward-edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #FAFAFA;
  border-radius: var(--pvz-radius-xs);
}
.reward-edit-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pvz-text);
}
.reward-edit-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.reward-edit-input {
  width: 60px;
  padding: 6px 8px;
  border: 2px solid #E0E0E0;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
  outline: none;
}
.reward-edit-input:focus { border-color: var(--pvz-blue); }
.reward-edit-unit {
  font-size: 0.85rem;
  color: var(--pvz-text-light);
}

/* ---- 价格编辑列表 ---- */
.price-edit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #FAFAFA;
  border-radius: var(--pvz-radius-xs);
}
.price-edit-emoji { font-size: 1.2rem; }
.price-edit-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pvz-text);
}
.price-edit-default {
  font-size: 0.75rem;
  color: var(--pvz-text-light);
}
.price-edit-input {
  padding: 4px 6px;
  border: 2px solid #E0E0E0;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: center;
  outline: none;
}
.price-edit-input:focus { border-color: var(--pvz-blue); }

/* ---- 开关切换 ---- */
.task-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #FAFAFA;
  border-radius: var(--pvz-radius-xs);
}
.task-toggle-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pvz-text);
  flex: 1;
  padding-right: 10px;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #C0C0C0;
  border-radius: 24px;
  transition: 0.3s;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--pvz-green);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* ---- 游戏时间状态 ---- */
.game-time-status {
  margin-top: 8px;
  padding: 8px 12px;
  background: #FFF3E0;
  border-radius: var(--pvz-radius-xs);
  font-size: 0.82rem;
  color: #E65100;
  font-weight: 600;
  text-align: center;
}

/* ---- 安全设置 ---- */
.security-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.security-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.security-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pvz-text);
}
.security-row input {
  padding: 8px 12px;
  border: 2px solid #E0E0E0;
  border-radius: var(--pvz-radius-xs);
  font-size: 0.9rem;
  outline: none;
}
.security-row input:focus { border-color: var(--pvz-blue); }
.pw-change-msg {
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 20px;
  text-align: center;
}
.pw-change-msg.error { color: var(--pvz-red); }
.pw-change-msg.success { color: var(--pvz-green); }

/* ---- 保存提示 Toast ---- */
.save-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--pvz-green);
  color: #fff;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s;
}
.save-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---- iPad 适配 ---- */
@media (max-width: 768px) {
  .chore-grid {
    grid-template-columns: 1fr;
  }
  .parent-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .parent-tab {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}
.badge-blue { background: #42A5F5; color: #fff; }
