:root {
  --brand: #2578F6;
  --brand-dark: #1E40AF;
  --ice: #EAF2FF;
  --bg: #F4F8FF;
  --border: #DCE8FC;
  --navy: #1B2B48;
  --slate: #64748B;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #EBF3FF 0%, #F7FAFF 35%, #F4F8FF 100%);
  color: var(--navy);
  min-height: 100vh;
}

.mobile-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 14px 86px;
}

.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }

.hero-card {
  background: linear-gradient(135deg, #2578F6 0%, #1E40AF 100%);
  color: #fff;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 10px 26px rgba(37, 120, 246, 0.24);
}
.hero-card.center { text-align: center; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.hero-title { font-size: 18px; font-weight: 700; }
.hero-sub { font-size: 12px; opacity: 0.88; margin-top: 4px; }
.streak-badge { background: rgba(255,255,255,0.22); padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.big-days { font-size: 38px; font-weight: 800; margin: 8px 0; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
}
.stat-box strong { display: block; font-size: 20px; font-weight: 800; }
.stat-box span { font-size: 11px; opacity: 0.88; }

.stage-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stage-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--slate);
  border-radius: 999px;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.stage-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 14px rgba(37, 120, 246, 0.22);
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(37, 120, 246, 0.06);
}

.badge-blue {
  display: inline-block;
  background: var(--ice);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.unit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.unit-grade { font-size: 12px; color: var(--brand); font-weight: 600; }
.unit-name { font-size: 16px; font-weight: 700; margin-top: 3px; }
.unit-meta { font-size: 12px; color: var(--slate); margin: 8px 0 14px; }

.btn-row { display: flex; gap: 10px; }
.flex-1 { flex: 1; }
.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, #3B82F6, #2578F6); color: #fff; }
.btn-soft { background: var(--ice); color: var(--brand); }
.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; }

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.back-btn { border: none; background: #fff; border: 1px solid var(--border); color: var(--brand); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sub-title { font-size: 15px; font-weight: 700; }
.sub-progress { font-size: 13px; font-weight: 700; color: var(--brand); }

.word-hero { text-align: center; padding: 26px 16px; cursor: pointer; }
.tap-tip { font-size: 12px; color: var(--brand); margin-bottom: 10px; }
.word-big { font-size: 34px; font-weight: 800; color: var(--navy); }
.word-ph { font-size: 14px; color: var(--slate); margin-top: 6px; }
.word-cn { font-size: 17px; font-weight: 600; margin-top: 12px; }
.example-card { margin-top: 16px; padding: 12px; background: var(--bg); border-radius: 12px; text-align: left; }
.ex-en { font-size: 14px; font-weight: 600; }
.ex-cn { font-size: 12px; color: var(--slate); margin-top: 4px; }
.rec-hint { text-align: center; font-size: 12px; color: #DC2626; margin-top: 10px; font-weight: 600; }

.article-title { font-size: 18px; margin: 8px 0 6px; }
.sec-title { font-size: 16px; margin-bottom: 10px; }
.muted-text { font-size: 12px; color: var(--slate); line-height: 1.5; }

.sent-en { font-size: 16px; font-weight: 700; line-height: 1.5; cursor: pointer; }
.sent-cn { font-size: 13px; color: var(--slate); margin: 6px 0 12px; }

.score-pill { display: inline-block; font-size: 14px; font-weight: 800; padding: 4px 12px; border-radius: 8px; }
.score-good { background: #DCFCE7; color: #166534; }
.score-warn { background: #FEF3C7; color: #92400E; }
.score-bad  { background: #FEE2E2; color: #991B1B; }

.token-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.token-chip { font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-cell {
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--slate);
}
.cal-cell.checked { background: var(--brand); color: #fff; font-weight: 700; }
.cal-cell.today { border: 2px solid var(--brand-dark); }

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 0 10px;
  z-index: 99;
}
.tab-btn {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #8A9BB2;
  cursor: pointer;
}
.tab-btn.active { color: var(--brand); }
.tab-ico { font-size: 18px; }
