/* ════════════════════════════════════════════════
   pages.css —— 各页面专属样式(rpx → px,折半)
   ════════════════════════════════════════════════ */

/* ─── index 页 ─── */
.title-box {
  background: rgba(255,255,255,0.85);
  border-radius: 16px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.title-main {
  display: block; font-size: 18px; font-weight: bold;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.title-sub { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }

.archive-btn-wrap { width: 100%; }
.archive-btn {
  background: rgba(255,255,255,0.8);
  border-radius: 12px;
  padding: 8px 10px; text-align: center;
  font-size: 12px; color: #7c3aed;
  border: 1px solid #ddd6fe;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  cursor: pointer; user-select: none;
}
.status-bar {
  margin-top: 6px; padding: 7px 8px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b; border-radius: 10px;
  text-align: center; box-shadow: 0 1px 4px rgba(245,158,11,0.15);
  cursor: pointer;
}
.status-text { display: block; font-size: 11px; font-weight: bold; color: #78350f; line-height: 1.5; }
.status-action { display: block; font-size: 10px; color: #b45309; margin-top: 2px; text-decoration: underline; }

/* ─── mode 页 ─── */
.mode-page .label { display: block; font-size: 18px; font-weight: bold; color: #1e3a8a; }
.mode-page .label-sub { display: block; font-size: 12px; color: #64748b; }
.mode-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer; transition: transform 0.1s;
}
.mode-card:active { transform: scale(0.98); }
.mode-card.blue { background: linear-gradient(135deg, #bae6fd, #7dd3fc); border: 1.5px solid #38bdf8; }
.mode-card.pink { background: linear-gradient(135deg, #fbcfe8, #f9a8d4); border: 1.5px solid #f472b6; }
.mode-icon { font-size: 32px; }
.mode-info { flex: 1; }
.mode-title { display: block; font-size: 17px; font-weight: bold; color: #1e293b; margin-bottom: 4px; }
.mode-desc  { display: block; font-size: 12px; color: #475569; line-height: 1.5; }

/* ─── unit / topic ─── */
.unit-page .label, .topic-page .label { display: block; font-size: 16px; font-weight: bold; color: #1e3a8a; }
.unit-page .label-sub, .topic-page .label-sub { display: block; font-size: 12px; color: #64748b; }
.scroll-list { max-height: 60vh; overflow-y: auto; }
.unit-item, .topic-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; margin-bottom: 8px;
  background: white; border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  cursor: pointer;
}
.topic-item {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-color: #bae6fd;
}
.unit-name { font-size: 15px; color: #1e293b; font-weight: bold; }
.topic-name { font-size: 15px; color: #0c4a6e; font-weight: bold; }
.arrow { font-size: 20px; color: #94a3b8; }

/* ─── diagnostic ─── */
.diagnostic-page .progress-box { width: 100%; margin-bottom: 8px; }
.diagnostic-page .progress-text { display: block; text-align: center; font-size: 13px; color: #64748b; margin-bottom: 4px; }
.diagnostic-page .progress-bar-wrap { width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.diagnostic-page .progress-bar-fill { height: 100%; background: linear-gradient(to right, #38bdf8, #818cf8); border-radius: 3px; transition: width 0.4s; }

.diagnostic-page .msg-scroll { max-height: 150px; margin-bottom: 8px; overflow-y: auto; }
.msg-row { display: flex; margin-bottom: 8px; }
.msg-row.rabbit { justify-content: flex-start; }
.msg-row.user   { justify-content: flex-end; }
.bubble.rabbit {
  background: white; border: 2px solid #bae6fd;
  border-radius: 14px; border-bottom-left-radius: 3px;
  padding: 8px 10px; max-width: 80%;
}
.bubble.user {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  border-radius: 14px; border-bottom-right-radius: 3px;
  padding: 8px 10px; max-width: 80%;
}
.bubble.user .bubble-text { color: white; }

.question-card {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 14px; border: 1.5px solid #bae6fd;
  padding: 14px; margin-bottom: 10px;
}
.q-label { display: block; font-size: 11px; color: #0284c7; margin-bottom: 6px; font-weight: bold; }
.q-text  { display: block; font-size: 15px; color: #0c4a6e; line-height: 1.8; font-weight: bold; white-space: pre-wrap; }

.options-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.option-btn {
  flex: 1; min-width: 44%;
  display: flex; align-items: center; gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.1s;
}
.option-btn:hover { background: #f8fafc; }
.option-btn:active { transform: scale(0.98); }
.option-btn.status-correct { background: #d1fae5; border-color: #10b981; }
.option-btn.status-wrong   { background: #fee2e2; border-color: #ef4444; }
.opt-letter { font-size: 14px; font-weight: bold; color: #38bdf8; flex-shrink: 0; }
.opt-text   { font-size: 13px; color: #334155; line-height: 1.5; }

.loading-row {
  display: flex; align-items: center; gap: 4px;
  padding: 12px; color: #94a3b8; font-size: 14px;
}

/* hint 面板 */
.hint-panel { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.hint-step {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #fde68a; border-radius: 10px;
  padding: 9px 10px;
  box-shadow: 0 1px 4px rgba(245,158,11,0.12);
  animation: hint-slide-in 0.3s ease-out;
}
.hs-header { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.hs-icon   { font-size: 16px; }
.hs-title  { font-size: 13px; font-weight: bold; color: #7c2d12; }
.hs-text   { display: block; font-size: 12px; color: #334155; line-height: 1.7; white-space: pre-wrap; }
@keyframes hint-slide-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.action-stack { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.continue-btn {
  padding: 11px 16px; font-size: 14px; font-weight: bold;
  border-radius: 12px; text-align: center; cursor: pointer; user-select: none;
  transition: transform 0.1s;
}
.continue-btn:active { transform: scale(0.98); }
.continue-btn.primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: white;
  box-shadow: 0 3px 10px rgba(99,102,241,0.35);
}
.continue-btn.secondary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  box-shadow: 0 3px 10px rgba(245,158,11,0.35);
}
.continue-btn.tertiary {
  background: white; color: #64748b;
  border: 1px solid #e2e8f0;
  font-size: 12px;
}

/* ─── analysis ─── */
.analysis-page .history-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e; padding: 8px 12px; border-radius: 8px;
  font-size: 13px; font-weight: bold; text-align: center;
  margin-bottom: 8px; border-left: 4px solid #f59e0b;
}
.report-header {
  background: #1e293b; border-radius: 16px; padding: 16px; margin-bottom: 12px;
}
.report-title { display: block; font-size: 17px; font-weight: bold; color: #fde68a; margin-bottom: 6px; }
.report-meta  { display: block; font-size: 12px; color: rgba(255,255,255,0.7); }

.rank-card {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 16px; padding: 16px; margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.rank-gold   { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-silver { background: linear-gradient(135deg, #67e8f9, #3b82f6); }
.rank-bronze { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.rank-grey   { background: linear-gradient(135deg, #94a3b8, #64748b); }
.rank-title  { display: block; font-size: 18px; font-weight: bold; color: white; }
.rank-desc   { display: block; font-size: 12px; color: rgba(255,255,255,0.85); margin-top: 4px; }
.percentile  { display: block; font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.score-num   { display: block; font-size: 40px; font-weight: 900; color: white; line-height: 1; text-align: center; }
.score-label { display: block; font-size: 11px; color: rgba(255,255,255,0.8); text-align: center; }

.section-card {
  background: white; border-radius: 14px; padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}
.section-title { display: block; font-size: 15px; font-weight: bold; color: #1e293b; margin-bottom: 10px; }

.radar-item { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.radar-label { width: 40px; font-size: 12px; color: #64748b; }
.bar-wrap { flex: 1; height: 10px; background: #f1f5f9; border-radius: 5px; overflow: hidden; border: 1px solid #e2e8f0; }
.bar-fill { height: 100%; border-radius: 5px; transition: width 0.8s; }
.bar-fill.blue   { background: linear-gradient(to right, #38bdf8, #0284c7); }
.bar-fill.indigo { background: linear-gradient(to right, #818cf8, #4f46e5); }
.bar-fill.green  { background: linear-gradient(to right, #34d399, #059669); }
.radar-grade { width: 20px; font-size: 13px; font-weight: bold; text-align: center; }
.radar-grade.S { color: #f59e0b; } .radar-grade.A { color: #10b981; }
.radar-grade.B { color: #3b82f6; } .radar-grade.C { color: #ef4444; }
.radar-comment { display: block; font-size: 11px; color: #94a3b8; padding-left: 48px; margin-bottom: 8px; }

.module-item { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; }
.module-name    { display: block; font-size: 14px; font-weight: bold; color: #1e293b; }
.module-comment { display: block; font-size: 12px; color: #475569; margin-top: 3px; }

.fault-tree { padding-left: 8px; }
.tree-node { padding: 10px; border-radius: 8px; border-left: 4px solid #e2e8f0; margin-bottom: 2px; background: white; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.tree-node.broken    { border-color: #ef4444; background: #fff1f2; }
.tree-node.vulnerable{ border-color: #f59e0b; background: #fffbeb; }
.tree-node.mastered  { border-color: #10b981; background: #f0fdf4; }
.tree-node.root      { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.85} }
.node-level   { display: block; font-size: 11px; font-weight: bold; color: #64748b; margin-bottom: 2px; }
.node-concept { display: block; font-size: 14px; font-weight: bold; color: #1e293b; margin-bottom: 4px; }
.node-desc    { display: block; font-size: 12px; color: #475569; line-height: 1.6; }
.tree-arrow   { display: block; text-align: center; font-size: 18px; color: #94a3b8; margin: 4px 0; }

.diagnosis-block { padding: 10px; border-radius: 8px; background: #f8fafc; margin-bottom: 8px; }
.diagnosis-block.green-bg { background: #f0fdf4; border: 1px solid #bbf7d0; }
.diag-title { display: block; font-size: 13px; font-weight: bold; color: #1e293b; margin-bottom: 4px; }
.diag-text  { display: block; font-size: 12px; color: #475569; line-height: 1.8; white-space: pre-wrap; }

/* 错因分析 */
.err-top-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 10px;
  border-left: 5px solid #6b7280;
  background: #f1f5f9; margin-bottom: 12px;
}
.err-top-banner.err-careless    { background: #fef3c7; border-left-color: #f59e0b; }
.err-top-banner.err-concept     { background: #fee2e2; border-left-color: #ef4444; }
.err-top-banner.err-calculation { background: #dbeafe; border-left-color: #3b82f6; }
.err-top-banner.err-misreading  { background: #ede9fe; border-left-color: #8b5cf6; }
.err-top-banner.err-method      { background: #f1f5f9; border-left-color: #6b7280; }
.err-top-icon { font-size: 28px; line-height: 1; }
.err-top-text { flex: 1; }
.err-top-label   { display: block; font-size: 14px; font-weight: bold; color: #1e293b; margin-bottom: 4px; }
.err-top-pattern { display: block; font-size: 12px; color: #475569; line-height: 1.6; }

.err-dist-title { display: block; font-size: 13px; font-weight: bold; color: #1e293b; margin: 10px 0 6px; }
.err-dist-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.err-dist-label { width: 85px; font-size: 12px; color: #475569; flex-shrink: 0; }
.err-dist-bar-wrap { flex: 1; height: 9px; background: #f1f5f9; border-radius: 5px; overflow: hidden; border: 0.5px solid #e2e8f0; }
.err-dist-bar { height: 100%; border-radius: 5px; transition: width 0.6s; min-width: 2px; }
.err-dist-bar.err-dist-careless    { background: linear-gradient(to right, #fbbf24, #f59e0b); }
.err-dist-bar.err-dist-concept     { background: linear-gradient(to right, #f87171, #ef4444); }
.err-dist-bar.err-dist-calculation { background: linear-gradient(to right, #60a5fa, #3b82f6); }
.err-dist-bar.err-dist-misreading  { background: linear-gradient(to right, #a78bfa, #8b5cf6); }
.err-dist-bar.err-dist-method      { background: linear-gradient(to right, #9ca3af, #6b7280); }
.err-dist-count { width: 25px; text-align: right; font-size: 13px; font-weight: bold; color: #1e293b; }

.err-mistakes-title { display: block; font-size: 13px; font-weight: bold; color: #1e293b; margin: 14px 0 8px; }
.err-mistake-card {
  padding: 10px; border-radius: 8px;
  background: #ffffff; border-left: 4px solid #6b7280;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  margin-bottom: 8px;
}
.err-mistake-card.err-border-careless    { border-left-color: #f59e0b; }
.err-mistake-card.err-border-concept     { border-left-color: #ef4444; }
.err-mistake-card.err-border-calculation { border-left-color: #3b82f6; }
.err-mistake-card.err-border-misreading  { border-left-color: #8b5cf6; }
.err-mistake-card.err-border-method      { border-left-color: #6b7280; }
.err-mistake-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.err-mistake-tag { padding: 2px 7px; border-radius: 10px; font-size: 11px; font-weight: bold; color: white; }
.err-mistake-tag.err-bg-careless    { background: #f59e0b; }
.err-mistake-tag.err-bg-concept     { background: #ef4444; }
.err-mistake-tag.err-bg-calculation { background: #3b82f6; }
.err-mistake-tag.err-bg-misreading  { background: #8b5cf6; }
.err-mistake-tag.err-bg-method      { background: #6b7280; }
.err-mistake-topic { font-size: 12px; color: #64748b; }
.err-mistake-q { display: block; font-size: 13px; color: #1e293b; line-height: 1.6; padding: 5px 0; white-space: pre-wrap; }
.err-answers-row { display: flex; flex-direction: column; gap: 2px; padding: 5px 0; }
.err-answer-wrong { font-size: 12px; color: #ef4444; }
.err-answer-right { font-size: 12px; color: #10b981; }
.err-analysis-block, .err-advice-block {
  background: #f8fafc; border-radius: 6px; padding: 6px 8px; margin-top: 5px;
}
.err-advice-block { background: #f0fdf4; }
.err-analysis-title { display: block; font-size: 11px; font-weight: bold; color: #475569; margin-bottom: 2px; }
.err-analysis-text  { display: block; font-size: 12px; color: #1e293b; line-height: 1.6; white-space: pre-wrap; }

.action-row .action-btn,
.analysis-page .action-btn {
  text-align: center; padding: 14px; border-radius: 14px;
  font-size: 15px; font-weight: bold;
  cursor: pointer; user-select: none;
  border: none;
  transition: transform 0.1s;
}
.analysis-page .action-btn:active { transform: scale(0.98); }
.analysis-page .action-btn.primary   { background: linear-gradient(135deg, #38bdf8, #818cf8); color: white; box-shadow: 0 2px 8px rgba(56,189,248,0.4); }
.analysis-page .action-btn.secondary { background: linear-gradient(135deg, #a78bfa, #818cf8); color: white; }
.analysis-page .action-btn.share-btn { background: linear-gradient(135deg, #fb923c, #f97316); color: white; }
.analysis-page .action-btn.ghost     { background: white; color: #64748b; border: 1px solid #e2e8f0; }

/* ─── drill-summary ─── */
.summary-hero { text-align: center; padding: 16px 0 8px; }
.hero-title  { display: block; font-size: 24px; font-weight: bold; color: #1e293b; margin-bottom: 8px; }
.hero-topic  { display: block; font-size: 14px; color: #64748b; margin-bottom: 12px; }
.score-ring  {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  border-radius: 50%; width: 90px; height: 90px;
  justify-content: center; margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(56,189,248,0.4);
}
.score-big   { font-size: 40px; font-weight: 900; color: white; }
.score-sep   { font-size: 24px; color: rgba(255,255,255,0.7); }
.score-total { font-size: 20px; color: rgba(255,255,255,0.85); }
.earned-title { display: inline-block; background: #fef3c7; color: #92400e; font-size: 16px; font-weight: bold; padding: 6px 12px; border-radius: 12px; margin-top: 4px; }

.mastery-change-card {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd; border-radius: 12px;
  padding: 12px 10px; margin: 10px 0;
}
.mc-label { display: block; font-size: 13px; color: #0284c7; font-weight: bold; margin-bottom: 8px; text-align: center; }
.mc-row { display: flex; align-items: center; justify-content: space-between; }
.mc-side { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; }
.mc-stage { font-size: 11px; color: #64748b; }
.mc-stars { display: flex; gap: 2px; }
.mc-star { font-size: 16px; color: #e2e8f0; }
.mc-star.lit-start { color: #f59e0b; }
.mc-star.lit-end   { color: #10b981; text-shadow: 0 1px 2px rgba(16,185,129,0.3); }
.mc-val { font-size: 16px; font-weight: bold; color: #1e293b; }
.mc-arrow { font-size: 20px; margin: 0 6px; }
.mc-hint-line { display: block; font-size: 11px; color: #475569; text-align: center; margin-top: 7px; line-height: 1.6; }

.error-summary-card {
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px;
  padding: 11px; margin: 8px 0;
}
.es-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.es-icon { font-size: 22px; }
.es-title { font-size: 15px; font-weight: bold; color: #7c2d12; }
.es-pattern { display: block; font-size: 12px; color: #78350f; line-height: 1.8; margin-bottom: 7px; }
.es-breakdown { display: flex; flex-wrap: wrap; gap: 5px; }
.es-item { background: white; padding: 4px 7px; border-radius: 7px; font-size: 11px; color: #475569; border: 1px solid #fed7aa; }

.mistakes-list { margin: 8px 0; }
.ml-label { display: block; font-size: 12px; color: #64748b; font-weight: bold; margin-bottom: 6px; }
.mistake-card {
  background: white; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 8px 10px; margin-bottom: 6px;
  cursor: pointer;
}
.mistake-card.expanded { border-color: #f59e0b; box-shadow: 0 2px 8px rgba(245,158,11,0.15); }
.mc-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mh-num { font-size: 12px; font-weight: bold; color: #334155; flex-shrink: 0; }
.mh-tag { font-size: 11px; padding: 2px 6px; border-radius: 6px; font-weight: bold; flex: 1; text-align: center; }
.mh-chev { font-size: 10px; color: #94a3b8; }
.mh-body { margin-top: 8px; padding-top: 8px; border-top: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 6px; }
.mh-q { font-size: 13px; color: #1e293b; line-height: 1.6; font-weight: bold; white-space: pre-wrap; }
.mh-ans-row { display: flex; flex-direction: column; gap: 3px; }
.mh-wrong { font-size: 11px; color: #dc2626; }
.mh-right { font-size: 11px; color: #16a34a; }
.mh-hint { background: #f8fafc; padding: 5px 7px; border-radius: 6px; }
.mh-hint-label { display: block; font-size: 10px; color: #64748b; font-weight: bold; margin-bottom: 2px; }
.mh-hint-text { display: block; font-size: 11px; color: #334155; line-height: 1.6; white-space: pre-wrap; }

.remedial-cta { margin: 12px 0 6px; text-align: center; }
.big-cta { font-size: 16px !important; padding: 11px 16px !important; }
.remedial-hint { display: block; font-size: 11px; color: #64748b; margin-top: 5px; }

.all-correct-card {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 1px solid #6ee7b7; border-radius: 12px;
  padding: 16px; margin: 10px 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.ac-icon { font-size: 36px; }
.ac-text { font-size: 15px; font-weight: bold; color: #065f46; }

/* ─── remedial ─── */
.remedial-page .label { display: block; font-size: 15px; font-weight: bold; color: #1e3a8a; }
.remedial-page .label-sub { display: block; font-size: 11px; color: #64748b; margin-top: 2px; }

.emoji-burst {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none; z-index: 999;
  overflow: visible;
}
.burst-emoji {
  position: absolute;
  top: 50%; left: 50%;
  margin-left: -14px; margin-top: -14px;
  font-size: 28px;
  opacity: 0;
  animation: burst 0.9s ease-out forwards;
}
.burst-emoji.burst-1 { --dx: -100px; --dy: -120px; animation-delay: 0s; }
.burst-emoji.burst-2 { --dx:  100px; --dy: -120px; animation-delay: 0s; }
.burst-emoji.burst-3 { --dx: -130px; --dy:  -40px; animation-delay: 0s; }
.burst-emoji.burst-4 { --dx:  130px; --dy:  -40px; animation-delay: 0s; }
.burst-emoji.burst-5 { --dx:    0px; --dy: -140px; animation-delay: 0s; }
@keyframes burst {
  0%   { opacity: 0; transform: translate(0,0) scale(0.4); }
  20%  { opacity: 1; transform: translate(calc(var(--dx) * 0.25), calc(var(--dy) * 0.25)) scale(1.2); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.7); }
}

.encourage-bubble {
  position: fixed;
  top: 42%; left: 50%;
  width: 220px; margin-left: -110px;
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: white; font-size: 17px; font-weight: bold;
  padding: 11px 10px; border-radius: 12px;
  box-shadow: 0 4px 12px rgba(249,115,22,0.4);
  text-align: center;
  pointer-events: none; z-index: 999;
  animation: encourage 1.5s ease-out forwards;
}
@keyframes encourage {
  0%   { opacity: 0; transform: scale(0.5); }
  20%  { opacity: 1; transform: scale(1.1); }
  35%  { opacity: 1; transform: scale(1); }
  70%  { opacity: 1; transform: translateY(-12px) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(0.95); }
}

.rabbit-wrap { display: block; transform-origin: center; }
.rabbit-wrap.shake-correct { animation: shakeCorrect 0.6s ease-out; }
.rabbit-wrap.shake-wrong   { animation: shakeWrong 0.6s ease-in-out; }
@keyframes shakeCorrect {
  0%   { transform: scale(1) rotate(0); }
  25%  { transform: scale(1.18) rotate(-6deg); }
  50%  { transform: scale(1.08) rotate(6deg); }
  75%  { transform: scale(1.14) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes shakeWrong {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-6px) rotate(-4deg); }
  40% { transform: translateX( 6px) rotate( 4deg); }
  60% { transform: translateX(-4px) rotate(-3deg); }
  80% { transform: translateX( 4px) rotate( 3deg); }
}

.mastery-box {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  margin-top: 10px; padding: 0 4px; width: 100%;
}
.mastery-track {
  position: relative; width: 100%; height: 11px;
  background: #f1f5f9; border-radius: 6px; overflow: visible;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}
.mastery-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, #fb923c, #f97316);
  transition: width 0.45s ease-out, background 0.3s ease-out;
}
.mastery-fill.done { background: linear-gradient(90deg, #34d399, #10b981); }
.mastery-goal {
  position: absolute; top: -3px; width: 2px; height: 17px;
  background: #334155; border-radius: 1px; transform: translateX(-1px);
}
.mastery-label { font-size: 11px; color: #475569; font-weight: bold; }
.mastery-stars { display: flex; gap: 3px; margin-top: 2px; }
.mini-star { font-size: 14px; color: #e2e8f0; text-shadow: 0 0.5px 1px rgba(0,0,0,0.08); }
.mini-star.lit { color: #f59e0b; }

.finish-stars { display: flex; justify-content: center; gap: 6px; margin: 6px 0 10px; }
.finish-star { font-size: 28px; color: #e2e8f0; }
.finish-star.lit { color: #f59e0b; text-shadow: 0 1px 3px rgba(245,158,11,0.4); }

.intro-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 14px 12px; margin: 12px 0;
  box-shadow: 0 1px 5px rgba(15,23,42,0.06);
}
.intro-row { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 0; }
.intro-label { font-size: 12px; color: #64748b; font-weight: bold; }
.intro-stars { display: flex; gap: 4px; }
.intro-star { font-size: 22px; color: #e2e8f0; }
.intro-star.lit  { color: #f59e0b; text-shadow: 0 1px 2px rgba(245,158,11,0.3); }
.intro-star.goal { color: #10b981; text-shadow: 0 1px 2px rgba(16,185,129,0.3); }
.intro-val { font-size: 13px; color: #1e293b; font-weight: bold; }
.intro-divider { height: 1px; background: #e2e8f0; margin: 4px 12px; }
.intro-tip {
  font-size: 11px; color: #64748b;
  background: #fef3c7; padding: 7px 10px; border-radius: 8px;
  border-left: 3px solid #f59e0b; line-height: 1.6;
}

.finish-hero { text-align: center; padding: 24px 0; }
.finish-emoji { display: block; font-size: 50px; margin-bottom: 8px; }
.finish-title { display: block; font-size: 22px; font-weight: bold; color: #1e293b; margin-bottom: 8px; }
.finish-desc  { display: block; font-size: 14px; color: #475569; line-height: 1.8; white-space: pre-wrap; }

/* ─── archive ─── */
.archive-page .header { text-align: center; padding: 16px 0; }
.archive-page .header-title { display: block; font-size: 20px; font-weight: bold; color: #1e293b; }
.archive-page .header-sub   { display: block; font-size: 12px; color: #64748b; margin-top: 4px; }

.archive-page .empty-state { text-align: center; padding: 40px 0; }
.archive-page .empty-icon  { display: block; font-size: 50px; margin-bottom: 12px; }
.archive-page .empty-text  { display: block; font-size: 15px; color: #94a3b8; }
.archive-page .empty-sub   { display: block; font-size: 11px; color: #94a3b8; margin-top: 6px; padding: 0 24px; line-height: 1.6; }

.tab-bar {
  display: flex; gap: 6px; background: #f1f5f9;
  padding: 4px; border-radius: 14px; margin-bottom: 12px;
}
.tab {
  flex: 1; text-align: center; padding: 10px;
  font-size: 13px; font-weight: bold; color: #64748b;
  border-radius: 10px; transition: all 0.25s; cursor: pointer; user-select: none;
}
.tab.active { background: white; color: #1e293b; box-shadow: 0 1px 5px rgba(0,0,0,0.08); }
.tab-badge {
  display: inline-block; min-width: 16px; height: 16px;
  background: #ef4444; color: white; border-radius: 8px;
  font-size: 10px; line-height: 16px;
  padding: 0 4px; margin-left: 2px;
  vertical-align: middle;
}

.diag-card {
  background: white; border-radius: 12px; padding: 12px;
  margin-bottom: 8px; border-left: 5px solid #3b82f6;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  cursor: pointer;
}
.diag-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.diag-score-box {
  display: flex; align-items: baseline; gap: 2px;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: white; padding: 6px 10px; border-radius: 10px; min-width: 50px; justify-content: center;
}
.diag-score     { font-size: 22px; font-weight: bold; line-height: 1; }
.diag-score-lbl { font-size: 10px; opacity: 0.85; }
.diag-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.diag-rank { font-size: 14px; font-weight: bold; color: #1e293b; }
.diag-meta { font-size: 11px; color: #64748b; }
.diag-qs   { font-size: 11px; color: #94a3b8; }
.diag-delete {
  width: 28px; height: 28px; line-height: 28px; text-align: center;
  font-size: 14px; color: #94a3b8;
  border-radius: 50%; background: #f1f5f9;
  cursor: pointer;
}
.diag-weak {
  background: #fef3c7; padding: 6px 8px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
  border-left: 3px solid #f59e0b;
}
.diag-weak-perfect {
  background: #d1fae5; color: #065f46;
  border-left-color: #10b981;
  font-size: 12px; padding: 7px 10px; justify-content: center;
}
.weak-label { font-size: 11px; color: #92400e; font-weight: bold; white-space: nowrap; }
.weak-topic { font-size: 13px; color: #1e293b; font-weight: bold; }
.diag-err {
  background: #ede9fe; padding: 6px 8px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px;
  border-left: 3px solid #8b5cf6;
}
.err-lbl { font-size: 11px; color: #6d28d9; font-weight: bold; white-space: nowrap; }
.err-val { font-size: 12px; color: #1e293b; font-weight: bold; }
.diag-tap-hint {
  text-align: center; font-size: 10px; color: #94a3b8;
  margin-top: 6px; padding-top: 6px;
  border-top: 0.5px dashed #e2e8f0;
}

.record-card {
  display: flex; align-items: center; justify-content: space-between;
  background: white; border-radius: 12px; padding: 14px;
  margin-bottom: 8px; border-left: 5px solid #10b981;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.record-left { flex: 1; }
.record-topic { display: block; font-size: 16px; font-weight: bold; color: #1e293b; margin-bottom: 6px; }
.record-meta  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta-tag  { background: #d1fae5; color: #065f46; font-size: 11px; padding: 2px 6px; border-radius: 6px; font-weight: bold; }
.meta-date, .meta-time { font-size: 11px; color: #64748b; }
.record-attempts { display: block; font-size: 11px; color: #f97316; margin-top: 4px; }
.record-right { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.trophy-icon  { font-size: 24px; }
.trophy-label { font-size: 10px; color: #94a3b8; }
.record-score { font-size: 14px; font-weight: bold; color: #f59e0b; }

/* ─── 萝卜兔AI答疑 卡片 ─── */
.pickup-card {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 14px;
  padding-right: 44px;
  margin-bottom: 8px;
  border-left: 5px solid #1e3a8a;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  cursor: pointer;
}
.pickup-q {
  font-size: 15px; font-weight: 600; color: #1e293b;
  line-height: 1.5; margin-bottom: 6px; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pickup-card .pickup-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pickup-delete {
  position: absolute; top: 10px; right: 10px;
  font-size: 16px; color: #94a3b8;
  padding: 4px 6px; border-radius: 6px;
  cursor: pointer; user-select: none;
}
.pickup-delete:active { color: #dc2626; background: #fee2e2; }
.pickup-body {
  margin-top: 12px; padding: 12px;
  background: #f8fafc; border-radius: 8px;
  font-size: 14px; line-height: 1.8; color: #334155;
  word-break: break-word;
}
.pickup-body strong { color: #1e3a8a; font-weight: 700; }
.pickup-answer {
  display: inline-block; background: #fef3c7; color: #92400e;
  padding: 4px 10px; border-radius: 6px; font-weight: 600;
  margin-top: 8px;
}
.pickup-tap-hint {
  text-align: center; font-size: 11px; color: #94a3b8;
  margin-top: 8px; padding-top: 6px;
  border-top: 0.5px dashed #e2e8f0;
}

.footer-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; margin-bottom: 20px; }
.action-btn { text-align: center; padding: 12px; border-radius: 12px; font-size: 14px; font-weight: bold; cursor: pointer; user-select: none; }
.action-btn.ghost  { background: white; color: #64748b; border: 1px solid #e2e8f0; }
.action-btn.danger { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }

/* ─── activate ─── */
.act-container {
  min-height: calc(100vh - 44px);
  background: linear-gradient(180deg, #f0f9ff, #e0e7ff);
  padding: 30px 20px;
  display: flex; align-items: flex-start; justify-content: center;
}
.act-card {
  width: 100%; max-width: 340px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.12);
  padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.act-avatar { transform: scale(0.75); margin-bottom: -10px; }
.act-title { font-size: 20px; font-weight: bold; color: #1e293b; text-align: center; margin-top: 4px; }
.act-subtitle { font-size: 13px; color: #64748b; text-align: center; line-height: 1.7; white-space: pre-wrap; margin-bottom: 6px; }
.act-input-wrap { width: 100%; margin-top: 4px; }
.act-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px;
  font-size: 15px; font-family: Menlo, Monaco, Consolas, monospace;
  letter-spacing: 1px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc; color: #1e293b;
  text-align: center;
}
.act-msg {
  width: 100%; padding: 7px 10px;
  border-radius: 8px; font-size: 12px;
  text-align: center; line-height: 1.6; white-space: pre-wrap;
}
.act-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.act-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.act-btn {
  width: 100%; box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px; font-weight: bold; text-align: center;
  cursor: pointer; user-select: none;
  transition: transform 0.15s;
}
.act-btn:active { transform: scale(0.98); }
.act-btn-primary { background: linear-gradient(135deg, #10b981, #059669); color: white; box-shadow: 0 3px 10px rgba(16,185,129,0.4); }
.act-btn-trial   { background: linear-gradient(135deg, #38bdf8, #6366f1); color: white; box-shadow: 0 3px 10px rgba(99,102,241,0.35); }

/* ─── 加载状态 ─── */
.loading-full {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; gap: 4px; flex-direction: column;
}
.loading-text { font-size: 16px; color: #64748b; margin-bottom: 8px; }

/* ─── 分享卡预览模态框(A3) ─── */
.share-preview-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.78);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  overscroll-behavior: contain;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.share-preview-box {
  max-width: 92vw; max-height: 96vh;
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}

.share-preview-img {
  max-width: 100%;
  max-height: 78vh;
  width: auto; height: auto;
  border-radius: 18px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
  background: white;
  object-fit: contain;
}

.share-preview-tip {
  color: #fef3c7;
  font-size: 13px; text-align: center;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 14px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.share-preview-tip b { color: #fef08a; font-weight: 600; }

.share-preview-actions {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 4px;
}
.share-preview-btn {
  border: none; outline: none; cursor: pointer;
  padding: 12px 24px; border-radius: 12px;
  font-size: 15px; font-weight: 600;
  transition: transform 0.12s;
  min-width: 110px;
}
.share-preview-btn:active { transform: scale(0.96); }
.share-preview-btn.primary {
  background: linear-gradient(135deg, #1e40af, #6366f1);
  color: white;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}
.share-preview-btn.ghost {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  backdrop-filter: blur(6px);
}

/* ─── 小朋友名字胶囊(蓝色版) ─── */
.nickname-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: #1e3a8a;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; user-select: none;
  border: 1.5px dashed #93c5fd;
  transition: transform 0.12s;
  margin-bottom: 10px;
  white-space: nowrap;
  max-width: 100%;
}
.nickname-pill:hover { transform: translateY(-1px); }
.nickname-pill .nickname-text { color: #1e3a8a; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }

/* 让 modal 里的 input 有合理样式 */
.modal-box #nickname-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  color: #1e3a8a;
  margin-top: 8px;
  outline: none;
  transition: border-color 0.15s;
}
.modal-box #nickname-input:focus { border-color: #6366f1; }

/* ─── 我的兔子页面(D5) ─── */
.my-rabbit-page {
  padding: 16px 14px 32px;
  max-width: 600px;
  margin: 0 auto;
}

/* 大头像区 */
.rabbit-avatar-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  margin: 6px 0 18px;
}
.rabbit-avatar-big {
  width: min(56vw, 240px);
  height: min(56vw, 240px);
  border-radius: 36px;
  box-shadow: 0 14px 36px rgba(99, 102, 241, 0.18);
  background: white;
  display: block;
}
.rabbit-avatar-wrap.has-halo::before {
  content: ''; position: absolute;
  width: min(64vw, 280px); height: min(64vw, 280px);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(251, 191, 36, 0.45), transparent 60%);
  border-radius: 50%; pointer-events: none;
  animation: halo-pulse 2.4s ease-in-out infinite;
  z-index: -1;
}
@keyframes halo-pulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.08); }
}

/* 等级卡 */
.level-card {
  background: white;
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.level-name-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700;
  color: #1e3a8a;
  flex-wrap: wrap;
}
.lvl-nickname { background: linear-gradient(135deg, #fce7f3, #fef3c7); color: #be185d; padding: 3px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.lvl-icon { font-size: 22px; }
.lvl-text { flex: 1; }
.lvl-stars { color: #f59e0b; font-size: 15px; letter-spacing: 2px; }
.lvl-progress-wrap {
  position: relative;
  background: #f1f5f9;
  height: 18px;
  border-radius: 10px;
  margin: 12px 0 6px;
  overflow: hidden;
}
.lvl-progress-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  border-radius: 10px;
  transition: width 0.4s ease-out;
}
.lvl-progress-percent {
  position: absolute;
  width: 100%; text-align: center;
  font-size: 11px; font-weight: 700;
  color: #1e3a8a;
  line-height: 18px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}
.lvl-progress-text {
  font-size: 13px; color: #64748b;
  text-align: center;
}
.lvl-progress-text b { color: #1e3a8a; font-weight: 700; }

/* 三个状态卡 */
.stat-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.stat-card {
  flex: 1;
  background: white;
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.stat-value {
  font-size: 18px; font-weight: 700; color: #1e3a8a;
  margin-bottom: 4px;
}
.stat-fire { color: #f59e0b; }
.stat-label { font-size: 11px; color: #94a3b8; }

/* 皮肤陈列 */
.skin-gallery {
  background: white;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.gallery-title {
  font-size: 15px; color: #1e3a8a;
  font-weight: 700; margin-bottom: 12px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.skin-cell {
  border-radius: 14px;
  padding: 8px 6px;
  cursor: pointer;
  text-align: center;
  background: #f8fafc;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
}
.skin-cell:active { transform: scale(0.96); }
.skin-cell.is-current {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.skin-img-wrap {
  position: relative;
  width: 100%; aspect-ratio: 1/1;
  border-radius: 10px; overflow: hidden;
}
.skin-img-wrap img {
  width: 100%; height: 100%; display: block;
}
.skin-cell.locked .skin-img-wrap img {
  filter: grayscale(1) brightness(0.85);
  opacity: 0.55;
}
.skin-lock-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.skin-current-badge {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  background: rgba(217, 119, 6, 0.92);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  white-space: nowrap;
}
.skin-name {
  font-size: 12px; color: #1e3a8a;
  font-weight: 600;
  margin: 6px 0 4px;
}
.skin-meta { font-size: 10px; }
.skin-tag-current { color: #d97706; font-weight: 700; }
.skin-tag-equip { color: #6366f1; }
.skin-tag-locked { color: #94a3b8; background: rgba(148, 163, 184, 0.12); padding: 2px 6px; border-radius: 6px; }

/* XP 规则折叠 */
.xp-rules {
  margin-top: 14px;
  background: white;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  font-size: 13px; color: #64748b;
}
.xp-rules summary {
  cursor: pointer;
  color: #1e3a8a; font-weight: 600;
  list-style: none;
}
.xp-rules summary::before { content: '▶ '; font-size: 10px; transition: transform 0.2s; display: inline-block; }
.xp-rules[open] summary::before { transform: rotate(90deg); }
.xp-rules ul { margin: 8px 0 0 18px; padding: 0; }
.xp-rules li { margin: 4px 0; }
.xp-rules b { color: #1e3a8a; }

/* ─── 兔子成长 UI 模态(D6) ─── */
.gu-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.78);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: gu-fade-in 0.25s ease-out;
}
.gu-mask.gu-closing { animation: gu-fade-out 0.18s ease-in forwards; }
@keyframes gu-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes gu-fade-out { from { opacity: 1; } to { opacity: 0; } }

.gu-box {
  background: linear-gradient(135deg, #ffffff, #fef3c7);
  border-radius: 28px;
  padding: 32px 28px 24px;
  text-align: center;
  max-width: 84vw; width: 320px;
  box-shadow: 0 24px 80px rgba(99, 102, 241, 0.4);
  position: relative;
  animation: gu-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes gu-pop-in {
  0%   { transform: scale(0.4) rotate(-6deg); opacity: 0; }
  60%  { transform: scale(1.06) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.gu-icon-big {
  font-size: 64px;
  display: inline-block;
  animation: gu-bounce 1.2s ease-in-out infinite;
}
@keyframes gu-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-6px) scale(1.1); }
}

.gu-headline {
  font-size: 22px; font-weight: 800;
  color: #1e3a8a;
  margin: 6px 0 4px;
}

.gu-level-change {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 8px 0;
  font-size: 22px; font-weight: 800;
}
.gu-lv-old { color: #94a3b8; }
.gu-arrow  { color: #f59e0b; font-size: 20px; }
.gu-lv-new {
  color: #d97706;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.gu-rank-name {
  font-size: 17px; font-weight: 700;
  color: #6366f1;
  margin: 4px 0 14px;
}

.gu-skin-unlock {
  background: rgba(99, 102, 241, 0.08);
  border-radius: 16px;
  padding: 10px 14px;
  margin: 8px 0 14px;
}
.gu-skin-unlock-label {
  font-size: 13px; color: #6366f1; font-weight: 600;
  margin-bottom: 6px;
}
.gu-skin-img {
  width: 90px; height: 90px;
  border-radius: 14px;
  display: block; margin: 0 auto 4px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.18);
  animation: gu-skin-float 2.4s ease-in-out infinite;
}
.gu-skin-img.big { width: 140px; height: 140px; }
@keyframes gu-skin-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.gu-skin-name {
  font-size: 15px; font-weight: 700;
  color: #1e3a8a;
}

.gu-tip {
  font-size: 13px; color: #64748b;
  margin: 8px 0 14px;
}

.gu-xp-pill {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: white;
  font-size: 14px; font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  margin: 6px 0 16px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.gu-btn {
  background: linear-gradient(135deg, #1e40af, #6366f1);
  color: white;
  border: none; outline: none;
  padding: 12px 32px;
  border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  transition: transform 0.12s;
}
.gu-btn:active { transform: scale(0.96); }

/* 彩纸雨(顶部装饰) */
.gu-confetti {
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
  font-size: 22px;
  height: 80px;
}
.gu-confetti span {
  position: absolute;
  top: -30px;
  animation: gu-fall 2.8s linear infinite;
}
.gu-confetti span:nth-child(1) { left:  8%; animation-delay: 0s;   }
.gu-confetti span:nth-child(2) { left: 22%; animation-delay: 0.4s; }
.gu-confetti span:nth-child(3) { left: 38%; animation-delay: 0.9s; }
.gu-confetti span:nth-child(4) { left: 56%; animation-delay: 0.2s; }
.gu-confetti span:nth-child(5) { left: 72%; animation-delay: 1.1s; }
.gu-confetti span:nth-child(6) { left: 88%; animation-delay: 0.6s; }
@keyframes gu-fall {
  0%   { transform: translateY(0)    rotate(0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* ─── 首页"我的兔子"卡片(竖排,字大加粗) ─── */
.my-rabbit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fce7f3, #fef3c7);
  border: 2px solid #f9a8d4;
  border-radius: 16px;
  padding: 12px 8px 10px;
  margin-bottom: 10px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 12px rgba(244, 114, 182, 0.18);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  position: relative;
  overflow: hidden;
}
.my-rabbit-card::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255,255,255,0.4), transparent 50%);
  pointer-events: none;
  animation: rabbit-glow 4s ease-in-out infinite;
}
@keyframes rabbit-glow {
  0%, 100% { opacity: 0.3; transform: translate(0, 0); }
  50%      { opacity: 0.7; transform: translate(8%, 8%); }
}
.my-rabbit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(244, 114, 182, 0.32);
}
.my-rabbit-card:active { transform: scale(0.97); }
.my-rabbit-mini-avatar {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  position: relative; z-index: 1;
}
.my-rabbit-card-text {
  text-align: center;
  width: 100%;
  position: relative; z-index: 1;
}
.my-rabbit-card-title {
  font-size: 16px; font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.my-rabbit-card-level {
  font-size: 11px; color: #6366f1;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.my-rabbit-card-streak {
  font-size: 10px; color: #d97706;
  font-weight: 700;
  margin-top: 2px;
}

/* 把档案按钮也加粗一点保持视觉一致 */
.archive-btn { font-size: 13px; font-weight: 700; padding: 10px 10px; }

/* ─── 模式选择卡:琥珀色(EXAM)─── */
.mode-card.amber {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #fbbf24;
}
.mode-card.amber .mode-title { color: #92400e; }

/* ─── 考试 - 选档位页(E4) ─── */
.exam-pre-page {
  padding: 16px 14px 32px;
  max-width: 600px;
  margin: 0 auto;
}
.exam-hero {
  background: linear-gradient(135deg, #1e40af, #6366f1, #a855f7);
  color: white;
  border-radius: 22px;
  padding: 24px 18px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}
.exam-hero-icon { font-size: 48px; margin-bottom: 6px; }
.exam-hero-title { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.exam-hero-sub { font-size: 14px; opacity: 0.9; margin-top: 4px; }
.exam-hero-baseline {
  margin-top: 12px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.exam-tip-card {
  background: white;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.exam-tip-title { font-size: 14px; font-weight: 700; color: #1e3a8a; margin-bottom: 8px; }
.exam-tip-card ul { margin: 0; padding-left: 18px; font-size: 13px; color: #475569; line-height: 1.8; }

.exam-levels { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.exam-level-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.exam-level-card:hover {
  transform: translateY(-2px);
  border-color: #6366f1;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.18);
}
.exam-level-card:active { transform: scale(0.98); }
.exam-level-card.vip {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
}
.exam-level-icon { font-size: 32px; flex-shrink: 0; }
.exam-level-info { flex: 1; min-width: 0; }
.exam-level-name { font-size: 16px; font-weight: 700; color: #1e3a8a; margin-bottom: 3px; }
.vip-tag {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: white;
  font-size: 10px; font-weight: 800;
  padding: 1px 7px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.exam-level-desc { font-size: 12px; color: #64748b; }
.exam-level-arrow { font-size: 22px; color: #94a3b8; flex-shrink: 0; }

.exam-back-btn {
  width: 100%;
  background: white;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  border-radius: 12px;
  padding: 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

/* ─── 考试 - 答题页(E4) ─── */
.exam-active-page {
  padding: 12px 12px 24px;
  max-width: 600px;
  margin: 0 auto;
}
.exam-topbar {
  display: flex; align-items: center; gap: 8px;
  background: white;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky; top: 0; z-index: 10;
}
.exam-progress-pill {
  background: #1e3a8a; color: white;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.exam-timer {
  flex: 1; text-align: center;
  font-size: 22px; font-weight: 800;
  color: #1e3a8a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.exam-timer.urgent {
  color: #dc2626;
  animation: timer-pulse 1s ease-in-out infinite;
}
@keyframes timer-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
.exam-mark-btn {
  background: #f1f5f9; color: #64748b;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; user-select: none;
  white-space: nowrap;
}
.exam-mark-btn.on {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.exam-question-card {
  background: white;
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 14px;
}
.exam-q-meta { display: flex; gap: 6px; margin-bottom: 10px; }
.exam-q-unit, .exam-q-tag {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
}
.exam-q-unit { background: #e0e7ff; color: #4338ca; }
.exam-q-tag.tag-basic { background: #dbeafe; color: #1e40af; }
.exam-q-tag.tag-key { background: #fef3c7; color: #92400e; }
.exam-question-text {
  font-size: 16px; line-height: 1.6;
  color: #1e3a8a; font-weight: 600;
  margin-bottom: 14px;
}
.exam-options { display: flex; flex-direction: column; gap: 8px; }
.exam-option {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer; user-select: none;
  transition: all 0.12s;
}
.exam-option:active { transform: scale(0.98); }
.exam-option.selected {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18);
}
.exam-option-letter {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: white;
  border: 1.5px solid #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #475569;
  flex-shrink: 0;
  font-size: 14px;
}
.exam-option.selected .exam-option-letter {
  background: #6366f1; color: white; border-color: #6366f1;
}
.exam-option-text { flex: 1; color: #1e3a8a; font-size: 14px; line-height: 1.5; }

/* 题号面板 */
.exam-grid-card {
  background: white;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.exam-grid-title { font-size: 13px; font-weight: 700; color: #1e3a8a; margin-bottom: 10px; }
.exam-q-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.exam-q-cell {
  aspect-ratio: 1;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  color: #94a3b8;
  cursor: pointer; user-select: none;
  border: 2px solid transparent;
  transition: transform 0.1s;
}
.exam-q-cell:active { transform: scale(0.92); }
.exam-q-cell.answered {
  background: #dbeafe; color: #1e40af;
}
.exam-q-cell.marked {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}
.exam-q-cell.cur {
  border-color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.4);
}
.exam-grid-legend {
  display: flex; gap: 16px;
  margin-top: 10px;
  font-size: 11px; color: #64748b;
}
.leg-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
.leg-cur  { background: #1e3a8a; }
.leg-ans  { background: #dbeafe; }
.leg-mark { background: #fde68a; }

.exam-bottom-actions {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.exam-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 12px;
  border: none; outline: none;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s;
}
.exam-btn:active { transform: scale(0.97); }
.exam-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.exam-btn.primary {
  background: linear-gradient(135deg, #1e40af, #6366f1);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.exam-btn.ghost {
  background: white;
  color: #1e3a8a;
  border: 1.5px solid #cbd5e1;
}
.exam-status-bar {
  text-align: center;
  font-size: 12px; color: #64748b;
  background: rgba(255, 255, 255, 0.6);
  padding: 6px;
  border-radius: 8px;
}

/* ─── 考试报告页(E5) ─── */
.exam-report-page {
  padding: 16px 14px 32px;
  max-width: 600px;
  margin: 0 auto;
}
.exam-report-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}
.empty-emoji { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 16px; margin-bottom: 16px; }

.exam-report-hero {
  background: linear-gradient(135deg, #1e40af, #6366f1, #a855f7);
  color: white;
  border-radius: 24px;
  padding: 24px 18px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.32);
  position: relative;
  overflow: hidden;
}
.exam-report-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 60%);
  pointer-events: none;
}
.hero-rank-icon { font-size: 56px; margin-bottom: 4px; position: relative; z-index: 1; }
.hero-score { font-weight: 800; line-height: 1; position: relative; z-index: 1; }
.hero-score-num { font-size: 72px; }
.hero-score-unit { font-size: 28px; margin-left: 4px; }
.hero-rank-name { font-size: 22px; font-weight: 700; margin-top: 4px; position: relative; z-index: 1; letter-spacing: 4px; }
.hero-meta { font-size: 13px; opacity: 0.92; margin-top: 10px; position: relative; z-index: 1; }
.hero-grade-level { font-size: 12px; opacity: 0.78; margin-top: 6px; position: relative; z-index: 1; }

.exam-compare-card {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 13px; color: #92400e;
}
.exam-compare-card .compare-emoji { margin-right: 6px; font-size: 16px; }
.exam-compare-card .compare-text { display: block; line-height: 1.6; }
.exam-compare-card .compare-text b { color: #b45309; font-weight: 800; }
.exam-compare-card .compare-meta { display: block; font-size: 11px; color: #b45309; opacity: 0.8; margin-top: 4px; }

.exam-module-card,
.exam-detail-card {
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.card-title {
  font-size: 14px; font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 12px;
}
.detail-title-row { display: flex; justify-content: space-between; align-items: center; }
.detail-master-toggle {
  background: #e0e7ff; color: #4338ca;
  border: none; outline: none;
  padding: 4px 10px; border-radius: 8px;
  font-size: 11px; font-weight: 600;
  cursor: pointer;
}

.module-row { margin-bottom: 10px; }
.module-row:last-child { margin-bottom: 0; }
.module-row-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 4px;
}
.module-name { flex: 1; font-size: 13px; color: #475569; }
.module-rate { font-size: 16px; font-weight: 800; }
.module-rate.green { color: #10b981; }
.module-rate.blue  { color: #3b82f6; }
.module-rate.amber { color: #f59e0b; }
.module-rate.red   { color: #f43f5e; }
.module-frac { font-size: 11px; color: #94a3b8; }
.module-bar-wrap {
  background: #f1f5f9;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}
.module-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease-out;
}
.module-bar.green { background: linear-gradient(90deg, #34d399, #10b981); }
.module-bar.blue  { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.module-bar.amber { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.module-bar.red   { background: linear-gradient(90deg, #fb7185, #f43f5e); }

.exam-wrong-summary {
  background: white;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex; gap: 10px; align-items: flex-start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.exam-wrong-summary.perfect {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-left: 4px solid #10b981;
  color: #065f46; font-weight: 600;
  text-align: center; justify-content: center;
}
.wrong-summary-icon { font-size: 22px; }
.wrong-summary-text { flex: 1; }
.wrong-summary-line1 { font-size: 14px; font-weight: 700; color: #1e3a8a; }
.wrong-summary-line2 { font-size: 12px; color: #64748b; margin-top: 4px; line-height: 1.5; }

/* 每题展开 */
.exam-detail-item {
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 0;
}
.exam-detail-item:last-child { border-bottom: none; }
.exam-detail-toggle {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.detail-num {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: #f1f5f9; color: #475569;
  border-radius: 6px;
  font-size: 11px; font-weight: 700;
}
.exam-detail-item.ok    .detail-num { background: #d1fae5; color: #065f46; }
.exam-detail-item.wrong .detail-num { background: #fee2e2; color: #991b1b; }
.exam-detail-item.skip  .detail-num { background: #fef3c7; color: #92400e; }
.detail-icon { font-size: 14px; }
.detail-q-preview { flex: 1; font-size: 13px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-arrow { color: #94a3b8; font-size: 12px; transition: transform 0.2s; }
.exam-detail-toggle.open .detail-arrow { transform: rotate(180deg); }

.exam-detail-body {
  display: none;
  padding: 10px 0 4px 32px;
  font-size: 13px;
}
.exam-detail-body.open { display: block; }
.detail-q-full { color: #1e3a8a; font-weight: 600; line-height: 1.55; margin-bottom: 8px; }
.detail-row { margin: 4px 0; }
.detail-label { color: #94a3b8; }
.detail-val.right { color: #10b981; font-weight: 600; }
.detail-val.wrong { color: #f43f5e; }
.detail-val.skip  { color: #94a3b8; font-style: italic; }
.detail-explain {
  background: #fef3c7;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  color: #92400e;
  line-height: 1.55;
}
.detail-meta { color: #94a3b8; font-size: 11px; margin-top: 6px; }

.exam-report-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 16px;
}
.exam-report-actions-sub { display: flex; gap: 8px; }
.exam-report-actions-sub .exam-btn { flex: 1; }
