/* Fumi 词汇量测试（中小学版）· vocab-v5.css
   设计语言：教材同步系统 C1 晨光橙（独立页，不依赖教材同步 preview.css） */
:root {
  --primary: #E8862E;
  --primary-strong: #D07B2A;
  --primary-soft: #FDEEE0;
  --bg: #FDFBF7;
  --surface: #FFFFFF;
  --ink: #2D2B2A;
  --muted: #6B6560;
  --subtle: #8F877E;
  --line: #EDE4D8;
  --line-strong: #D8C9B4;
  --success: #2F715D;
  --success-soft: #E9F5F0;
  --info: #416D8D;
  --info-soft: #EBF3F8;
  --warning: #B06A1E;
  --warning-soft: #FFF3DF;
  --danger: #A9473D;
  --danger-soft: #FAECE9;
  --radius-page: 18px;
  --radius-card: 18px;
  --radius-btn: 14px;
  --shadow-card: 0 2px 8px rgba(45, 43, 42, 0.08);
  --focus: 3px solid var(--primary);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 480px; margin: 0 auto; padding: 16px; min-height: 100vh; }
.page { display: none; }
.page.active { display: block; animation: fade-in 200ms ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
button { font: inherit; -webkit-tap-highlight-color: transparent; }

/* ── 欢迎页 ── */
.brand { text-align: center; padding: 26px 0 18px; }
.brand .fs-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.brand .fs-brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand .fs-brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.brand .fs-brand-text strong { font-size: 20px; font-weight: 800; color: var(--ink); }
.brand .fs-slogan { font-size: 11px; color: var(--subtle); letter-spacing: 2px; }
.brand h1 { font-size: 24px; font-weight: 800; color: var(--ink); }
.brand .ver { font-size: 12px; color: var(--muted); margin-top: 4px; }
.brand p { font-size: 14px; color: var(--muted); margin-top: 6px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.info-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 14px;
  text-align: center;
}
.info-item .num { font-size: 20px; font-weight: 800; color: var(--primary-strong); }
.info-item .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

.grade-select { margin: 16px 0; }
.grade-select label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.grade-select select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  font-size: 16px;
  background: var(--surface);
  color: var(--ink);
  appearance: auto;
}
.grade-select select:focus-visible { outline: var(--focus); outline-offset: 2px; }

.start-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin: 20px 0;
  text-align: center;
  transition: background-color 180ms ease-out, transform 180ms ease-out;
}
.start-btn:hover { background: var(--primary-strong); }
.start-btn:active { transform: translateY(1px); }
.start-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Y/N 答题页 ── */
.yn-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; }
.yn-progress-text { font-size: 13px; color: var(--muted); }
.yn-phase-tag {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.yn-word-area {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-page);
  box-shadow: var(--shadow-card);
  padding: 40px 20px;
  text-align: center;
  margin: 12px 0 20px;
}
.yn-word { font-size: 40px; font-weight: 800; color: var(--ink); letter-spacing: 1px; word-break: break-word; }
.yn-hint { font-size: 13px; color: var(--subtle); margin-top: 12px; }
.yn-actions { display: flex; gap: 12px; }
.yn-actions button {
  flex: 1;
  min-height: 56px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}
.yn-dunno { background: var(--surface); color: var(--muted); border: 1px solid var(--line-strong) !important; }
.yn-know { background: var(--primary); color: #FFFFFF; }
.yn-actions button:active { transform: translateY(1px); }

/* ── 深度 MCQ ── */
.quiz-header { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; }
.progress-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--primary); transition: width 220ms ease-out; }
.progress-text { font-size: 12px; color: var(--muted); }
.round-tag { font-size: 13px; color: var(--primary-strong); font-weight: 600; }
.deep-notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-btn);
  background: var(--info-soft);
  border-left: 4px solid var(--info);
  font-size: 13px;
  color: var(--info);
}
.quiz-word {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-page);
  box-shadow: var(--shadow-card);
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.quiz-word .label { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.quiz-word .en { font-size: 34px; font-weight: 800; color: var(--ink); }
.option-grid { display: flex; flex-direction: column; gap: 10px; }
.option-card {
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: var(--surface);
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}
.option-card:hover { border-color: var(--primary); }
.flash-correct { border-color: var(--success) !important; background: var(--success-soft) !important; }
.flash-wrong { border-color: var(--danger) !important; background: var(--danger-soft) !important; }

/* ── 报告 ── */
.report-header {
  background: linear-gradient(135deg, var(--ink), #3A3735);
  border-radius: var(--radius-page);
  box-shadow: var(--shadow-card);
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.report-header .score { font-size: 56px; font-weight: 800; color: var(--primary); line-height: 1.1; font-variant-numeric: tabular-nums; }
.report-header .range { font-size: 15px; color: rgba(253, 251, 247, 0.85); margin-top: 4px; }
.report-header .level { font-size: 14px; color: rgba(253, 251, 247, 0.65); margin-top: 2px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 12px;
  text-align: center;
}
.stat .val { font-size: 20px; font-weight: 800; color: var(--primary-strong); font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.section-title { font-size: 15px; font-weight: 700; margin: 18px 0 8px; color: var(--ink); }
.grade-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 12px 14px;
}
.grade-row .grade-name { font-size: 13px; font-weight: 600; width: 60px; flex-shrink: 0; }
.grade-row .grade-bar { flex: 1; height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.grade-row .grade-fill { height: 100%; border-radius: 5px; transition: width 500ms ease-out; }
.grade-row .grade-fill.strong { background: var(--success); }
.grade-row .grade-fill.moderate { background: var(--primary); }
.grade-row .grade-fill.weak { background: var(--danger); }
.grade-row .grade-stat { font-size: 12px; color: var(--muted); width: 70px; text-align: right; }

.peer-box {
  margin: 6px 0 4px;
  padding: 14px;
  border-radius: var(--radius-card);
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
}
.peer-box .peer-title { font-size: 15px; font-weight: 700; color: var(--primary-strong); }
.peer-box .peer-line { font-size: 14px; color: var(--ink); margin-top: 4px; }
.peer-box .peer-note { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

.quality-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 14px;
  font-size: 14px;
  color: var(--ink);
}
.method-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-btn);
  background: var(--info-soft);
  border-left: 4px solid var(--info);
  font-size: 13px;
  color: var(--info);
  line-height: 1.7;
}
.rec-box { margin-top: 14px; }

.game-cta {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.game-cta h4 { font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.game-cta p { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.game-cta .game-price { font-size: 14px; font-weight: 700; color: var(--primary-strong); margin: 8px 0; }
.btn-game {
  display: inline-block;
  margin: 8px 0;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 180ms ease-out;
}
.btn-game:hover { background: var(--primary-strong); }
.game-cta .game-note { font-size: 12px; color: var(--subtle); margin-top: 6px; }

.footer-note { text-align: center; font-size: 12px; color: var(--subtle); margin: 18px 0 30px; }

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 100;
  opacity: 0;
  transition: opacity 300ms ease-out;
}
.toast.show { opacity: 1; }

@media (max-width: 360px) {
  .yn-word { font-size: 32px; }
  .report-header .score { font-size: 48px; }
}
