/* ============== 基础 & 主题 ============== */
:root {
  --primary: #ff7a45;
  --primary-dark: #e85d20;
  --primary-light: #ffd6c2;
  --bg: #fff8f3;
  --bg-card: #ffffff;
  --text: #2d2d2d;
  --text-sub: #6b6b6b;
  --text-mute: #9a9a9a;
  --border: #f0e6dd;
  --success: #34c759;
  --warning: #ffb020;
  --m1-color: #5BA9F6;
  --m1-soft: #e7f3ff;
  --m2-color: #FF8A65;
  --m2-soft: #fff0e8;
  --shadow-sm: 0 2px 8px rgba(255, 122, 69, 0.08);
  --shadow-md: 0 6px 18px rgba(255, 122, 69, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ============== 整体容器 ============== */
#app {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  padding-bottom: 72px; /* 给底部 nav 留位 */
}

/* ============== 顶部 Header ============== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--primary), #ff9966);
  color: #fff;
  padding: 18px 18px 16px;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-title .main {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.app-title .sub {
  font-size: 12px;
  opacity: 0.85;
}
.streak-badge {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ============== 通用区块 ============== */
.section {
  padding: 14px 16px;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 14px;
}

/* ============== 今日打卡卡 ============== */
.daily-card {
  background: linear-gradient(135deg, #ff9966, var(--primary));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 18px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.daily-info { display: flex; flex-direction: column; gap: 4px; }
.daily-info .label { font-size: 12px; opacity: 0.9; }
.daily-info .date { font-size: 18px; font-weight: 700; }
.daily-info .status { font-size: 12px; opacity: 0.95; margin-top: 4px; }
.daily-btn {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  transition: transform 0.15s, opacity 0.2s;
}
.daily-btn:active { transform: scale(0.96); }
.daily-btn.done {
  background: rgba(255,255,255,0.25);
  color: #fff;
  cursor: default;
}

/* ============== 模块 ============== */
.module {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.module-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px dashed var(--border);
}
.module-badge {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.module-badge.m1 { background: var(--m1-soft); color: var(--m1-color); }
.module-badge.m2 { background: var(--m2-soft); color: var(--m2-color); }
.module-titles { flex: 1; min-width: 0; }
.module-titles .en { font-weight: 700; font-size: 15px; }
.module-titles .cn { font-size: 12px; color: var(--text-sub); }
.module-progress {
  font-size: 12px;
  color: var(--text-sub);
  background: #fafafa;
  padding: 4px 9px;
  border-radius: 999px;
}

/* ============== Unit 列表 ============== */
.unit-list { padding: 6px 8px 10px; }
.unit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: background 0.15s;
}
.unit-item:active { background: #fafafa; }
.unit-num {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: #f5f5f5;
  color: var(--text-sub);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.unit-item.done .unit-num {
  background: var(--success);
  color: #fff;
}
.unit-item.partial .unit-num {
  background: var(--warning);
  color: #fff;
}
.unit-body { flex: 1; min-width: 0; }
.unit-body .title-en { font-weight: 600; font-size: 15px; }
.unit-body .title-cn { font-size: 12px; color: var(--text-sub); margin-top: 1px; }
.unit-body .progress-bar {
  margin-top: 6px;
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}
.unit-body .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff9966);
  transition: width 0.3s;
}
.unit-arrow {
  color: var(--text-mute);
  font-size: 20px;
  flex-shrink: 0;
}

/* ============== Unit 详情页 ============== */
.unit-page {
  padding: 14px 14px 24px;
}
.unit-page-header {
  background: linear-gradient(135deg, var(--primary), #ff9966);
  color: #fff;
  padding: 18px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  position: relative;
}
.unit-page-header .back {
  position: absolute;
  top: 14px; left: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid; place-items: center;
  font-size: 16px;
}
.unit-page-header .num {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.unit-page-header .title-en {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}
.unit-page-header .title-cn {
  font-size: 13px;
  opacity: 0.9;
}
.unit-page-header .bq {
  margin-top: 10px;
  font-size: 13px;
  background: rgba(255,255,255,0.18);
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.5;
}

.unit-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 8px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.unit-tabs::-webkit-scrollbar { display: none; }
.unit-tab {
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--text-sub);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.unit-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

.section-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.section-card .sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.section-card .sec-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.section-card .sec-title .tag {
  font-size: 10px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 4px;
  width: fit-content;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.section-card .sec-title .en {
  font-weight: 700;
  font-size: 15px;
}
.section-card .sec-title .cn {
  font-size: 12px;
  color: var(--text-sub);
}
.section-card .tts-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.section-card .tts-btn:active { transform: scale(0.92); }
.section-card .tts-btn.playing {
  background: var(--primary);
  color: #fff;
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 69, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255, 122, 69, 0); }
}

.section-card .body p {
  margin-bottom: 9px;
  line-height: 1.7;
  color: var(--text);
  font-size: 14.5px;
}
.section-card .body .frame {
  background: #faf6f2;
  padding: 9px 11px;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  margin-bottom: 7px;
  font-size: 14px;
}
.section-card .body .example {
  background: #fff8f0;
  padding: 9px 11px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 14px;
}
.section-card .body .tip {
  margin-top: 10px;
  padding: 9px 11px;
  background: #fff5e6;
  border-radius: 8px;
  font-size: 13px;
  color: #b86b00;
}
.section-card .body .question {
  margin-top: 10px;
  padding: 9px 11px;
  background: #f0f8ff;
  border-radius: 8px;
  font-size: 13px;
  color: #2a6cb8;
  font-weight: 500;
}
.section-card .body .rhyme {
  background: linear-gradient(135deg, #fff0e8, #fff8f3);
  padding: 12px;
  border-radius: 10px;
  white-space: pre-line;
  font-style: italic;
  font-size: 14px;
  color: var(--primary-dark);
  line-height: 1.7;
}

/* ============== 标记完成 ============== */
.check-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: flex-end;
}
.check-btn {
  background: var(--primary);
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, opacity 0.2s;
}
.check-btn:active { transform: scale(0.96); }
.check-btn.done {
  background: rgba(52, 199, 89, 0.12);
  color: var(--success);
}

/* ============== 关键词 ============== */
.kw-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.kw-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.kw-item .en { font-weight: 600; color: var(--text); font-size: 13.5px; }
.kw-item .cn { font-size: 11.5px; color: var(--text-sub); }

/* ============== 底部导航 ============== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  display: flex;
  border-top: 1px solid var(--border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 50;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 0;
  font-size: 11px;
  color: var(--text-mute);
  transition: color 0.15s;
}
.nav-item .nav-icon { font-size: 20px; line-height: 1; }
.nav-item.active { color: var(--primary); font-weight: 600; }

/* ============== 进度页 / 我的页 ============== */
.profile-card {
  background: linear-gradient(135deg, var(--primary), #ff9966);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 20px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 14px;
}
.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: grid; place-items: center;
  font-size: 26px;
  border: 2px solid rgba(255,255,255,0.4);
}
.profile-info .name { font-size: 17px; font-weight: 700; }
.profile-info .grade { font-size: 12px; opacity: 0.9; margin-top: 2px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card .num {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}
.stat-card .label {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 11px;
  border-radius: 6px;
  background: #f5f5f5;
  color: var(--text-mute);
  position: relative;
}
.cal-day.checked {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.cal-day.today {
  border: 1.5px solid var(--primary);
}
.cal-day.empty { background: transparent; }
.cal-header {
  text-align: center;
  font-size: 11px;
  color: var(--text-sub);
  padding: 4px 0;
  font-weight: 600;
}

.progress-list { display: flex; flex-direction: column; gap: 8px; }
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}
.progress-row .name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
}
.progress-row .pct {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}
.progress-row .bar {
  width: 80px;
  height: 5px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}
.progress-row .bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ff9966);
}

.empty-tip {
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  padding: 24px 0;
}

/* ============== Toast ============== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 999;
  animation: toastIn 0.25s ease-out;
  pointer-events: none;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* ============== 今日页 ============== */
.today-tips {
  background: linear-gradient(135deg, #fff8f3, #fff);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--primary-light);
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
}
.today-tips strong { color: var(--primary); }

.today-unit-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.today-unit-card .ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.today-unit-card .info { flex: 1; min-width: 0; }
.today-unit-card .info .t1 { font-weight: 600; font-size: 14.5px; }
.today-unit-card .info .t2 { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.today-unit-card .go {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  background: var(--primary-light);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ============== 中英逐句显示 ============== */
.lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  background: #faf6f2;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
}
.line-en { font-size: 14.5px; color: var(--text); line-height: 1.6; }
.line-cn { font-size: 12.5px; color: var(--text-sub); }

.section-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.recite-btn {
  background: linear-gradient(135deg, var(--primary), #ff9966);
  color: #fff;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}
.recite-btn:active { transform: scale(0.96); }

/* ============== 跟读 / 背诵视图 ============== */
.recite-page { padding: 0 0 30px; }
.recite-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(255,248,243,0));
}
.recite-top .back {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.recite-title { flex: 1; min-width: 0; }
.recite-title .t1 { font-weight: 700; font-size: 15px; }
.recite-title .t2 { font-size: 12px; color: var(--text-sub); margin-top: 1px; }

.mode-switch {
  display: flex;
  gap: 5px;
  background: #fff;
  margin: 4px 16px 0;
  padding: 4px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.mode-switch .m {
  flex: 1;
  text-align: center;
  padding: 8px 2px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-sub);
  transition: all 0.2s;
  white-space: nowrap;
}
.mode-switch .m.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.recite-progress {
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  margin: 10px 0 6px;
}
.recite-progress b { color: var(--primary); font-size: 14px; }

.recite-lines { padding: 4px 0; }

.rl {
  background: #fff;
  border-radius: 14px;
  padding: 12px 13px;
  margin: 8px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rl.current {
  border: 1.5px solid var(--primary);
  box-shadow: 0 4px 16px rgba(255, 122, 69, 0.2);
}
.rl-index {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #f3f3f3;
  color: var(--text-mute);
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.rl-text { flex: 1; min-width: 0; }
.rl-en { font-size: 15px; line-height: 1.6; color: var(--text); word-break: break-word; }
.rl-cn { font-size: 12.5px; color: var(--text-sub); margin-top: 3px; }
.rl .word { border-radius: 4px; padding: 0 1px; transition: background 0.12s, color 0.12s; }
.rl .word.hl { background: var(--primary-light); color: var(--primary-dark); }
.line-play {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.line-play:active { transform: scale(0.92); }

/* 背诵遮罩 */
.recite-card { cursor: pointer; }
.recite-card .rl-en.covered {
  filter: blur(5px);
  color: var(--text-mute);
  user-select: none;
}
.recite-card .rest.covered {
  filter: blur(5px);
  color: var(--text-mute);
  user-select: none;
}
.recite-card .prompt {
  font-weight: 600;
  color: var(--primary-dark);
}
.recite-hint {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 10.5px;
  color: var(--text-mute);
  background: rgba(0,0,0,0.03);
  padding: 1px 7px;
  border-radius: 999px;
}
.recite-card.revealed .recite-hint { background: rgba(52,199,89,0.12); color: var(--success); }

/* 控制区 */
.recite-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 6px 14px 0;
  flex-wrap: wrap;
}
.rc-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  min-width: 44px;
}
.rc-btn:active { transform: scale(0.96); }
.rc-btn.play {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  padding: 9px 20px;
}
.rc-btn.wide { flex: 1; max-width: 160px; }
.rc-btn:disabled { opacity: 0.4; }
.rc-done {
  display: block;
  width: calc(100% - 28px);
  margin: 12px 14px 0;
  background: linear-gradient(135deg, var(--success), #2bb24c);
  color: #fff;
  font-weight: 700;
  padding: 12px;
  border-radius: 14px;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(52,199,89,0.25);
}
.rc-done:active { transform: scale(0.98); }
.recite-footer { position: sticky; bottom: 0; background: linear-gradient(0deg, var(--bg) 75%, rgba(255,248,243,0)); padding-bottom: 8px; }

.empty-tip + .recite-top { margin-top: 20px; }

/* ===== 录音评测 ===== */
.rc-btn.rec { background: var(--primary); color: #fff; border-color: var(--primary); }
.rc-btn.recording {
  background: #ff4d4f;
  border-color: #ff4d4f;
  color: #fff;
  animation: recpulse 1s ease-in-out infinite;
}
@keyframes recpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,77,79,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255,77,79,0); }
}
.rc-gradeall {
  display: block;
  width: calc(100% - 28px);
  margin: 10px 14px 0;
  background: #fff;
  border: 1.5px dashed var(--primary);
  color: var(--primary);
  font-weight: 700;
  padding: 11px;
  border-radius: 14px;
  font-size: 14px;
}
.rc-gradeall:active { transform: scale(0.98); }

.recite-grade { padding: 4px 14px 0; }
.grade-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.grade-score {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  display: inline-block;
}
.grade-score span { font-size: 15px; font-weight: 600; margin-left: 3px; opacity: 0.7; }
.grade-score.good { color: var(--success); }
.grade-score.mid { color: #ff9f0a; }
.grade-score.low { color: #ff4d4f; }
.grade-label { font-size: 14px; font-weight: 700; margin: 6px 0 10px; color: var(--text); }
.grade-words { line-height: 1.9; font-size: 17px; }
.gw { padding: 1px 4px; border-radius: 6px; }
.gw.ok { background: rgba(52,199,89,0.16); color: #1a7a37; }
.gw.miss { background: rgba(255,77,79,0.14); color: #c0392b; text-decoration: line-through; }
.grade-rec { margin-top: 10px; font-size: 13px; color: var(--text-sub); line-height: 1.6; }
.grade-rec b { color: var(--text); }
.grade-loading, .grade-err { font-size: 14px; color: var(--text-sub); padding: 6px 2px; }
.grade-err { color: #ff4d4f; }