/* ============ 复习应用样式 ============ */
.rv-wrap { max-width: 860px; margin: 0 auto; padding: 26px 20px 90px; }
.rv-tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.rv-tabs button {
  border: none; background: transparent; color: var(--ink-soft); font-size: .8rem;
  padding: 5px 18px; border-radius: 999px; cursor: pointer; font-family: var(--sans);
}
.rv-tabs button.on { background: var(--surface); color: var(--accent-deep); font-weight: 500; box-shadow: 0 1px 4px rgba(60,40,15,.1); }
[data-theme="dark"] .rv-tabs button.on { color: var(--accent); }

/* ---- 闪卡 ---- */
.rv-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: .76rem; color: var(--ink-soft); }
.rv-progress .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.rv-progress .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.flash-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 34px 22px; cursor: pointer; min-height: 300px;
  display: flex; flex-direction: column;
  transition: border-color .2s;
}
.flash-card:hover { border-color: var(--amber-soft); }
.fc-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.chip-sm { font-size: .68rem; padding: 3px 10px; border-radius: 999px; background: var(--amber-bg); color: var(--accent-deep); }
[data-theme="dark"] .chip-sm { color: var(--accent); }
.fc-no { font-family: var(--serif); font-weight: 700; color: var(--amber); font-size: .82rem; }
.fc-hint { margin-left: auto; font-size: .68rem; color: var(--ink-faint); }
.fc-title { font-size: 1.3rem; font-weight: 700; line-height: 1.7; font-family: var(--serif); }
.fc-body { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: .88rem; line-height: 2.0; animation: fadein .25s; }
.fc-body p { margin: 0 0 .6em; }
.fc-body h4 { font-family: var(--serif); font-size: .95rem; margin: 1.1em 0 .4em; color: var(--accent-deep); }
[data-theme="dark"] .fc-body h4 { color: var(--accent); }
.fc-body ul, .fc-body ol { margin: 0 0 .7em; padding-left: 1.3em; }
.fc-body li { margin-bottom: .25em; }
.fc-body li::marker { color: var(--amber); }
.fc-body pre { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: .72rem; font-family: var(--mono); }
.fc-body pre.ascii { font-size: .64rem; color: var(--ink-soft); }
.fc-body table { width: 100%; border-collapse: collapse; font-size: .76rem; margin: .7em 0; }
.fc-body th, .fc-body td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.fc-body th { background: var(--amber-bg); color: var(--accent-deep); font-weight: 500; }
.fc-body figure { margin: .8em 0; }
.fc-body figure img { width: 100%; border-radius: 8px; border: 1px solid var(--line-soft); }
.fc-body figcaption { font-size: .7rem; color: var(--ink-faint); text-align: center; margin-top: 4px; }
.fc-body blockquote { margin: .7em 0; padding: 8px 14px; border-left: 3px solid var(--amber-soft); background: var(--surface-2); border-radius: 0 8px 8px 0; font-family: var(--serif); color: var(--ink-soft); line-height: 1.9; }
.fc-body .qlabel { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; color: var(--accent-deep); margin: 1em 0 .4em; }
.fc-body .qlabel::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--amber-soft); }
.fc-flip-hint { margin-top: auto; padding-top: 18px; text-align: center; font-size: .74rem; color: var(--ink-faint); }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.flash-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.grade {
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: var(--sans); transition: all .15s;
}
.grade b { font-size: .88rem; font-weight: 500; }
.grade small { font-size: .68rem; color: var(--ink-faint); }
.grade.g1 { border-color: #F0C4C4; color: var(--red); }
.grade.g1:hover { background: #FBEFEF; }
.grade.g2 { border-color: #F5D9A8; color: #854F0B; }
.grade.g2:hover { background: #FBF3E2; }
.grade.g3 { border-color: #C4DDB0; color: var(--green); }
.grade.g3:hover { background: #F0F5E8; }
[data-theme="dark"] .grade.g1:hover { background: #3A2422; }
[data-theme="dark"] .grade.g2:hover { background: #38301F; }
[data-theme="dark"] .grade.g3:hover { background: #26301F; }
.flash-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: .72rem; color: var(--ink-faint); flex-wrap: wrap; gap: 8px; }
.kbd-hint { font-family: var(--mono); font-size: .66rem; }
.rv-done { text-align: center; padding: 60px 0; }
.rv-done .serif { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.rv-done p { color: var(--ink-soft); font-size: .85rem; margin: 10px 0 20px; }

/* ---- 刷题 ---- */
.drill-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.drill-bar select {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 9px; padding: 7px 10px; font-size: .8rem; font-family: var(--sans);
}
.drill-stat { margin-left: auto; font-size: .74rem; color: var(--ink-faint); }
.drill-acts { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.rv-idle { text-align: center; color: var(--ink-faint); font-size: .84rem; padding: 60px 0; }

/* ---- 仪表盘 ---- */
.dash-head { display: flex; align-items: center; margin-bottom: 16px; }
.dash-head h2 { font-size: 1.2rem; margin: 0; }
.dash-actions { margin-left: auto; display: flex; gap: 8px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.dash-card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.dash-card-head h3 { font-size: .92rem; margin: 0; font-weight: 500; }
.dash-card-head .k { font-size: .7rem; color: var(--ink-faint); }
.heat-legend { margin-left: auto; font-size: .66rem; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 2px; }
.heat-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.heat-legend i:nth-of-type(1) { background: var(--line-soft); }
.heat-legend i:nth-of-type(2) { background: #F5D9A8; }
.heat-legend i:nth-of-type(3) { background: #EFC78A; }
.heat-legend i:nth-of-type(4) { background: var(--amber); }
.heat-legend i:nth-of-type(5) { background: var(--accent); }
.heatmap { display: flex; gap: 3px; }
.heatmap .col { display: grid; grid-template-rows: repeat(7, 10px); gap: 3px; }
.heatmap .col i { width: 10px; height: 10px; border-radius: 2px; background: var(--line-soft); }
.mastery-row { display: flex; align-items: center; gap: 10px; font-size: .76rem; margin-bottom: 10px; }
.mastery-row .name { width: 118px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.mastery-row .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.mastery-row .bar i { display: block; height: 100%; background: var(--amber); }
.mastery-row .pct { width: 34px; text-align: right; color: var(--ink-faint); font-size: .7rem; }
.star-list { display: flex; flex-direction: column; gap: 6px; }
.star-item { display: flex; align-items: center; gap: 10px; font-size: .8rem; padding: 7px 10px; background: var(--surface-2); border-radius: 8px; }
.star-item .t { flex: 1; }
.star-item a { font-size: .72rem; }
.star-empty { color: var(--ink-faint); font-size: .78rem; padding: 8px 0; }
.dash-note { font-size: .72rem; color: var(--ink-faint); margin-top: 14px; }
@media (max-width: 760px) { .dash-grid { grid-template-columns: 1fr; } .flash-card { padding: 22px 20px 18px; } }
