/* ============================================================
 * 沪学网 · 历史题库 quiz.css（书卷风）
 * 宣纸底 + 墨色 + 朱砂强调 + 竹青/黛蓝点缀
 * ============================================================ */
.quiz-proto-tag {
  display: inline-block;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #fff;
  background: var(--seal, #b3643a);
  border-radius: 4px;
  padding: 2px 10px;
  vertical-align: middle;
  margin-left: 8px;
  letter-spacing: 2px;
}

.quiz-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

/* ---------- 侧栏卡片 ---------- */
.quiz-side { display: flex; flex-direction: column; gap: 16px; }
.quiz-stat-card,
.quiz-filter-card {
  background: #fffdf8;
  border: 1px solid #e6dcc8;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(90, 70, 40, 0.05);
}
.quiz-stat-card h3,
.quiz-filter-card h3 {
  font-family: "Noto Serif SC", serif;
  font-size: 16px;
  color: #2f2a23;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #efe6d4;
}
.quiz-progress-wrap { margin-bottom: 16px; }
.quiz-progress-bar {
  height: 8px;
  background: #f0e8d8;
  border-radius: 4px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b3643a, #c97e4f);
  border-radius: 4px;
  transition: width 0.35s ease;
}
.quiz-progress-text {
  margin: 8px 0 0;
  font-size: 13px;
  color: #8a7f6a;
  font-family: "Noto Sans SC", sans-serif;
}
.quiz-score-row { display: flex; gap: 8px; }
.quiz-score-item {
  flex: 1;
  text-align: center;
  background: #faf4e8;
  border-radius: 6px;
  padding: 10px 4px;
}
.quiz-score-item span {
  display: block;
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  font-weight: 600;
  color: #3a342b;
  line-height: 1.2;
}
.quiz-score-item label {
  font-size: 12px;
  color: #9a8e78;
  font-family: "Noto Sans SC", sans-serif;
}
.quiz-score-item.ok span { color: #4a7c59; }
.quiz-score-item.no span { color: #b3643a; }
.quiz-score-item.rate span { color: #3d5a72; }

.quiz-filter-group { margin-bottom: 14px; }
.quiz-filter-group:last-child { margin-bottom: 0; }
.quiz-filter-label {
  display: block;
  font-size: 12px;
  color: #9a8e78;
  margin-bottom: 8px;
  font-family: "Noto Sans SC", sans-serif;
}
.quiz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.quiz-chip {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  color: #6b5f49;
  background: #f6efe1;
  border: 1px solid #e6dcc8;
  border-radius: 16px;
  padding: 4px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.quiz-chip:hover { border-color: #b3643a; color: #b3643a; }
.quiz-chip.on {
  background: #b3643a;
  border-color: #b3643a;
  color: #fff;
}

.quiz-wrong-tip {
  font-size: 13px;
  color: #6b5f49;
  margin: 0 0 12px;
  font-family: "Noto Sans SC", sans-serif;
}
.quiz-wrong-tip b { color: #b3643a; font-size: 16px; }

/* ---------- 按钮 ---------- */
.quiz-btn {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px;
  color: #4a4030;
  background: #fff;
  border: 1px solid #d8ccb4;
  border-radius: 6px;
  padding: 9px 20px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.quiz-btn:hover { border-color: #b3643a; color: #b3643a; }
.quiz-btn.primary {
  background: #b3643a;
  border-color: #b3643a;
  color: #fff;
}
.quiz-btn.primary:hover { background: #a0552e; border-color: #a0552e; }
.quiz-btn.ghost {
  background: #faf4e8;
}
.quiz-btn.small { padding: 6px 14px; font-size: 13px; }
.quiz-btn.link {
  background: none;
  border: none;
  color: #9a8e78;
  font-size: 12px;
  padding: 6px 4px;
  margin-left: 8px;
}
.quiz-btn.link:hover { color: #b3643a; text-decoration: underline; }
.quiz-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 主区 ---------- */
.quiz-main { min-width: 0; }
.quiz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.quiz-toolbar-left { display: flex; align-items: center; gap: 10px; }
.quiz-mode-name {
  font-family: "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 600;
  color: #2f2a23;
}
.quiz-count-pill {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  color: #8a7f6a;
  background: #f6efe1;
  border-radius: 12px;
  padding: 2px 10px;
}
.quiz-toolbar-right { display: flex; gap: 8px; }

/* ---------- 题目卡 ---------- */
.quiz-question {
  background: #fffdf8;
  border: 1px solid #e6dcc8;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(90, 70, 40, 0.06);
}
.qq-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.qq-index {
  font-family: "Noto Serif SC", serif;
  font-size: 14px;
  font-weight: 600;
  color: #b3643a;
}
.qq-badge {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  border-radius: 4px;
  padding: 2px 8px;
}
.qq-badge.single { background: #e8f0ec; color: #4a7c59; }
.qq-badge.multi { background: #e6ecf2; color: #3d5a72; }
.qq-theme {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  color: #9a8e78;
}
.qq-theme::before { content: "主题情景 · "; color: #bcae90; }

/* 主题情景 + 阅读材料 */
.qq-context { margin-bottom: 20px; }
.qq-theme-box {
  background: #f9f3e7;
  border: 1px solid #e8dcc6;
  border-radius: 8px;
  padding: 16px 18px;
}
.qq-intro {
  font-family: "Noto Serif SC", serif;
  font-size: 15px;
  line-height: 1.7;
  color: #3d372d;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #dccfae;
}
.qq-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
}
.qq-img {
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #e8dcc6;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(61, 55, 45, .08);
  cursor: zoom-in;
  max-width: 46%;
  flex: 1 1 46%;
}
.qq-img img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 4px;
}
.qq-img figcaption {
  margin-top: 6px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  color: #8a7d63;
  text-align: center;
}
@media (max-width: 720px) {
  .qq-img { max-width: 100%; flex: 1 1 100%; }
  .qq-img img { max-height: 240px; }
}
/* 图片大图浮层 */
.qq-imgview { position: fixed; inset: 0; z-index: 1200; display: none; }
.qq-imgview.open { display: block; }
.qq-imgview-mask { position: absolute; inset: 0; background: rgba(28, 22, 14, .78); }
.qq-imgview-body {
  position: absolute; inset: 24px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}
.qq-imgview-close {
  position: absolute; top: 10px; right: 16px; z-index: 2;
  font-size: 30px; line-height: 1; color: #fff; background: transparent;
  border: 0; cursor: pointer; opacity: .9;
}
.qq-imgview-close:hover { opacity: 1; }
.qq-imgview-img {
  max-width: 96%; max-height: 84vh; object-fit: contain;
  background: #fff; border-radius: 6px; box-shadow: 0 6px 30px rgba(0,0,0,.4);
}
.qq-imgview-cap { color: #f2ead8; font-size: 13px; font-family: "Noto Sans SC", sans-serif; }
.qq-material { margin-bottom: 12px; }
.qq-material:last-child { margin-bottom: 0; }
.qq-material.needed {
  background: #fdf7f1;
  border-left: 3px solid #b3643a;
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
}
.ql-label {
  display: inline-block;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #6b5f49;
  background: #efe6d2;
  border-radius: 4px;
  padding: 2px 10px;
  margin-bottom: 6px;
}
.qq-material.needed .ql-label { background: #b3643a; color: #fff; }
.ql-text {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #4a4030;
  margin: 0;
}
.qq-material.needed .ql-text { color: #3d2c1a; }
.qq-material.zz { border-left-color: #c9a86a; }
.qq-material.zz .ql-label { background: #c9a86a; }

.qq-stem {
  font-family: "Noto Serif SC", serif;
  font-size: 19px;
  line-height: 1.7;
  font-weight: 600;
  color: #2a251d;
  margin: 0 0 22px;
}

.qq-options { display: flex; flex-direction: column; gap: 12px; }
.qq-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1.5px solid #e6dcc8;
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.16s ease;
  background: #fff;
}
.qq-option:hover { border-color: #c9a86a; background: #fdfaf3; }
.qq-option .opt-key {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0e8d8;
  color: #6b5f49;
  font-family: "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 14px;
  margin-top: 1px;
}
.qq-option .opt-text {
  flex: 1;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #3d372d;
}
.qq-option.multi .opt-key { border-radius: 6px; }
.qq-option.selected { border-color: #b3643a; background: #fbf3ec; }
.qq-option.selected .opt-key { background: #b3643a; color: #fff; }

/* 判分后状态 */
.qq-option.locked { cursor: default; }
.qq-option.correct { border-color: #4a7c59; background: #f1f7f3; }
.qq-option.correct .opt-key { background: #4a7c59; color: #fff; }
.qq-option.wrong { border-color: #c0583f; background: #fbf0ed; }
.qq-option.wrong .opt-key { background: #c0583f; color: #fff; }

.qq-actions { margin-top: 22px; display: flex; gap: 12px; }

/* 结果区 */
.qq-result {
  margin-top: 22px;
  border-top: 1px dashed #e0d5bf;
  padding-top: 20px;
  animation: qqFade 0.3s ease;
}
@keyframes qqFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qq-result-head {
  font-family: "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}
.qq-result-head.right { color: #4a7c59; }
.qq-result-head.wrong { color: #c0583f; }
.qq-correct-ans {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px;
  color: #5a5040;
  margin: 0 0 14px;
}
.qq-correct-ans b { color: #b3643a; letter-spacing: 1px; }
.qq-analysis {
  background: #faf4e8;
  border-left: 3px solid #c9a86a;
  border-radius: 0 6px 6px 0;
  padding: 14px 16px;
}
.qq-analysis h4 {
  font-family: "Noto Serif SC", serif;
  font-size: 14px;
  color: #8a6d3b;
  margin: 0 0 6px;
}
.qq-analysis p {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #544a38;
  margin: 0;
}

/* ---------- 完成页 ---------- */
.quiz-finish {
  background: #fffdf8;
  border: 1px solid #e6dcc8;
  border-radius: 10px;
  padding: 48px 28px;
  text-align: center;
}
.quiz-finish-seal {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 10px;
  background: #b3643a;
  color: #fff;
  font-family: "Noto Serif SC", serif;
  font-size: 34px;
  line-height: 64px;
  box-shadow: 0 6px 18px rgba(179, 100, 58, 0.3);
}
.quiz-finish h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  color: #2f2a23;
  margin: 0 0 28px;
}
.quiz-finish-stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.quiz-finish-stats > div {
  min-width: 90px;
  background: #faf4e8;
  border-radius: 8px;
  padding: 16px 10px;
}
.quiz-finish-stats span {
  display: block;
  font-family: "Noto Serif SC", serif;
  font-size: 28px;
  font-weight: 600;
  color: #3a342b;
}
.quiz-finish-stats.ok span { color: #4a7c59; }
.quiz-finish-stats.no span { color: #c0583f; }
.quiz-finish-stats.rate span { color: #3d5a72; }
.quiz-finish-stats label {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  color: #9a8e78;
}
.quiz-finish-actions { display: flex; gap: 12px; justify-content: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .quiz-layout { grid-template-columns: 1fr; gap: 16px; }
  .quiz-side { order: 2; }
  .quiz-main { order: 1; }
  .quiz-score-row { max-width: 420px; }
}
@media (max-width: 560px) {
  .quiz-question { padding: 20px 16px; }
  .qq-stem { font-size: 17px; }
  .qq-option .opt-text { font-size: 14px; }
  .quiz-finish-stats > div { min-width: 42%; }
  .quiz-btn { padding: 9px 16px; }
}

/* ==================== 上海高校分数线 ==================== */
.cs-section { padding-bottom: 64px; }
.cs-tools {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 14px;
}
.cs-search {
  flex: 1 1 240px; min-width: 0;
  padding: 10px 14px; font-size: 14px; font-family: "Noto Sans SC", sans-serif;
  color: #2c2620; background: #fff;
  border: 1px solid #e2d8c6; border-radius: 8px;
}
.cs-search:focus { outline: none; border-color: #b3643a; box-shadow: 0 0 0 3px rgba(179,100,58,.12); }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-chip {
  padding: 7px 14px; font-size: 13px; color: #5c5347; cursor: pointer;
  background: #f3ecdd; border: 1px solid #e2d8c6; border-radius: 999px;
  transition: all .18s ease;
}
.cs-chip:hover { border-color: #c9b998; }
.cs-chip.active { color: #fff; background: #b3643a; border-color: #b3643a; }
.cs-meta { font-size: 13px; color: #8a7d68; margin-bottom: 16px; }
.cs-list { display: flex; flex-direction: column; gap: 16px; }
.cs-school {
  background: #fffdf8; border: 1px solid #e8ddc9; border-radius: 12px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(80,60,30,.05);
}
.cs-school-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; border-bottom: 1px dashed #ece0cb;
}
.cs-school-title h3 {
  margin: 0 0 6px; font-family: "Noto Serif SC", serif; font-size: 19px; font-weight: 600; color: #2c2620;
}
.cs-school-tags { display: flex; gap: 8px; align-items: center; }
.cs-tag {
  font-size: 11px; color: #b3643a; background: #f7ece2;
  border: 1px solid #e9d3c2; border-radius: 4px; padding: 1px 7px;
}
.cs-city { font-size: 12px; color: #9a8d78; }
.cs-school-score { text-align: right; flex: 0 0 auto; }
.cs-min-label { display: block; font-size: 11px; color: #9a8d78; margin-bottom: 2px; }
.cs-min-num {
  font-family: "Noto Serif SC", serif; font-size: 26px; font-weight: 700; color: #b3643a; line-height: 1;
}
.cs-groups { padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.cs-group { border: 1px solid #eee3d0; border-radius: 8px; overflow: hidden; }
.cs-group.open { border-color: #dcc7a3; }
.cs-group-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 11px 14px; background: #fbf6ec;
}
.cs-gbatch {
  font-size: 11px; color: #4f7a6a; background: #e9f1ec; border-radius: 4px; padding: 2px 8px;
}
.cs-gcode { font-size: 13px; color: #5c5347; font-weight: 500; }
.cs-gsubj { font-size: 12px; color: #7a6d57; }
.cs-gscore { margin-left: auto; font-size: 12px; color: #7a6d57; }
.cs-gscore b { color: #b3643a; font-size: 15px; font-family: "Noto Serif SC", serif; }
.cs-toggle {
  padding: 5px 12px; font-size: 12px; color: #b3643a; cursor: pointer;
  background: #fff; border: 1px solid #e0cbb4; border-radius: 6px;
}
.cs-toggle:hover { background: #faf2e8; }
.cs-group-body { display: none; padding: 12px 14px; border-top: 1px dashed #eee3d0; }
.cs-group.open .cs-group-body { display: block; }
.cs-group-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; font-size: 13px; color: #5c5347; }
.cs-group-stats b { color: #333; }
.cs-table-wrap { overflow-x: auto; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cs-table th, .cs-table td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid #f0e8d9; white-space: nowrap;
}
.cs-table th { color: #8a7d68; font-weight: 500; background: #faf5eb; }
.cs-table .cs-mname { white-space: normal; min-width: 160px; color: #2c2620; }
.cs-na { color: #b6ab97; }
.cs-empty { padding: 40px 0; text-align: center; color: #9a8d78; }
.cs-note { margin-top: 22px; font-size: 12px; color: #a3967f; }
@media (max-width: 640px) {
  .cs-school-head { padding: 15px 16px; }
  .cs-school-title h3 { font-size: 17px; }
  .cs-min-num { font-size: 22px; }
  .cs-groups { padding: 6px 12px 12px; }
  .cs-group-head { gap: 8px; padding: 10px; }
  .cs-gscore { margin-left: 0; width: 100%; }
}