:root {
  --blue: #2563eb; --blue-d: #1d4ed8; --bg: #f2f4f8; --card: #ffffff;
  --ink: #1e2430; --sub: #667085; --line: #e4e8ef;
  --green: #16a34a; --green-bg: #e8f7ee; --orange: #d97706; --orange-bg: #fdf3e3;
  --red: #dc2626; --red-bg: #fdeaea; --blue-bg: #e8effd;
  --radius: 14px; --shadow: 0 1px 3px rgba(16,24,40,.07);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.65;
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
}
a { color: var(--blue); text-decoration: none; }

/* ---- 顶栏 ---- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top)); box-shadow: var(--shadow);
}
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.logo {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  background: rgba(255,255,255,.2); border-radius: 8px; font-size: 14px;
}
.nav-desktop { display: none; gap: 4px; }
.nav-desktop a {
  color: #dbe6ff; padding: 6px 14px; border-radius: 999px; font-size: 15px;
}
.nav-desktop a.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }

/* ---- 底部导航（手机） ---- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex;
  background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 0 5px; color: var(--sub); font-size: 11px;
}
.bottomnav a i { font-style: normal; font-size: 20px; line-height: 1.2; }
.bottomnav a.on { color: var(--blue); font-weight: 600; }

/* ---- 布局 ---- */
main { max-width: 760px; margin: 0 auto; padding: 14px 14px 24px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
.loading { text-align: center; color: var(--sub); padding: 60px 0; }
h1.card-title { font-size: 19px; margin: 0 0 4px; }
.card-sub { color: var(--sub); font-size: 13px; margin-bottom: 10px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--sub); margin: 16px 0 8px; letter-spacing: .5px; }

/* ---- 标签 ---- */
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--blue-bg); color: var(--blue-d); margin-right: 6px; vertical-align: middle;
}
.chip.gray { background: #eef0f4; color: var(--sub); font-weight: 500; }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.orange { background: var(--orange-bg); color: var(--orange); }
.chip.red { background: var(--red-bg); color: var(--red); }

/* ---- 倒计时横幅 ---- */
.banner {
  background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.banner .big { font-size: 26px; font-weight: 800; }
.banner .sm { font-size: 13px; opacity: .92; margin-top: 2px; }

/* ---- 任务/文件列表 ---- */
ul.tasks { margin: 8px 0 4px; padding-left: 0; list-style: none; }
ul.tasks li {
  position: relative; padding: 5px 0 5px 26px; font-size: 14.5px;
}
ul.tasks li::before {
  content: "✓"; position: absolute; left: 2px; top: 5px; width: 16px; height: 16px;
  border-radius: 5px; background: var(--blue-bg); color: var(--blue-d);
  font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.file-chips a {
  background: #f0f5ff; border: 1px solid #cddcff; color: var(--blue-d);
  padding: 7px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
}
.goal-line {
  margin-top: 10px; padding: 8px 12px; background: var(--green-bg);
  border-radius: 10px; color: #14663a; font-size: 13.5px;
}

/* ---- 进度勾选 ---- */
.prog-row { display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.prog-item {
  flex: 1; min-width: 90px; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 10px 6px; text-align: center; cursor: pointer; user-select: none;
  font-size: 13.5px; color: var(--sub); background: #fff; transition: all .15s;
}
.prog-item.on {
  border-color: var(--green); background: var(--green-bg); color: var(--green); font-weight: 700;
}
.prog-item .tick { font-size: 17px; display: block; line-height: 1.3; }
.note-area {
  width: 100%; min-height: 84px; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px; font-size: 14px; font-family: inherit; resize: vertical; margin-top: 10px; background: #fcfdff;
}
.note-area:focus { outline: none; border-color: var(--blue); }
.save-hint { font-size: 12px; color: var(--sub); text-align: right; min-height: 18px; }

/* ---- 计划列表 ---- */
.plan-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar { flex: 1; height: 10px; background: #e8ebf1; border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: linear-gradient(90deg, #2563eb, #3b82f6); border-radius: 999px; transition: width .3s; }
.plan-summary .pct { font-weight: 700; font-size: 15px; color: var(--blue-d); white-space: nowrap; }
.day-row {
  display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px;
  padding: 11px 13px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer;
}
.day-row .dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; flex: none; }
.day-row.done .dot { background: var(--green); }
.day-row.partial .dot { background: var(--orange); }
.day-row.missed .dot { background: var(--red); }
.day-row.is-today { outline: 2px solid var(--blue); }
.day-row .d-num { color: var(--sub); font-size: 12px; width: 44px; flex: none; }
.day-row .d-main { flex: 1; min-width: 0; }
.day-row .d-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-row .d-meta { font-size: 12px; color: var(--sub); }
.day-row .arrow { color: #b6bfcc; font-size: 18px; }

/* ---- 登录 ---- */
.auth-wrap { max-width: 380px; margin: 8vh auto 0; }
.auth-tabs { display: flex; margin-bottom: 16px; background: #e9edf3; border-radius: 10px; padding: 4px; }
.auth-tabs button {
  flex: 1; border: none; background: transparent; padding: 9px; font-size: 15px; border-radius: 8px;
  color: var(--sub); cursor: pointer; font-family: inherit;
}
.auth-tabs button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff;
}
.field input:focus { outline: none; border-color: var(--blue); }
.btn {
  display: block; width: 100%; border: none; border-radius: 10px; padding: 12px;
  background: var(--blue); color: #fff; font-size: 15.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.btn:active { background: var(--blue-d); }
.btn.ghost { background: #eef0f4; color: var(--ink); font-weight: 600; }
.form-err { color: var(--red); font-size: 13px; min-height: 20px; margin: 4px 0; }
.auth-tip { font-size: 12.5px; color: var(--sub); margin-top: 10px; line-height: 1.6; }

/* ---- 我的 ---- */
.me-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.me-row:last-child { border-bottom: none; }
.me-row b { font-size: 17px; color: var(--blue-d); }

/* ---- 文档列表/阅读 ---- */
.doc-item {
  display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer;
}
.doc-item .doc-idx { font-size: 12px; color: var(--sub); flex: none; width: 40px; }
.doc-item .doc-name { font-size: 14.5px; font-weight: 600; }
.doc-view-head { margin-bottom: 10px; }
.doc-view-head .back { display: inline-block; margin-bottom: 8px; font-size: 14px; }
.doc-body {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px 22px;
  font-size: 15px; overflow-wrap: break-word;
}
.doc-body h1 { font-size: 20px; margin: 4px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--blue-bg); }
.doc-body h2 { font-size: 17px; margin: 22px 0 8px; color: var(--blue-d); }
.doc-body h3 { font-size: 15.5px; margin: 16px 0 6px; }
.doc-body h4 { font-size: 15px; margin: 12px 0 4px; }
.doc-body p { margin: 8px 0; }
.doc-body ul, .doc-body ol { padding-left: 22px; margin: 8px 0; }
.doc-body li { margin: 4px 0; }
.doc-body blockquote {
  margin: 10px 0; padding: 8px 14px; background: var(--blue-bg); border-left: 4px solid var(--blue);
  border-radius: 0 10px 10px 0; color: #243;
}
.doc-body code {
  background: #eef1f6; padding: 1px 6px; border-radius: 6px; font-size: 13.5px;
  font-family: Consolas, Menlo, monospace;
}
.doc-body pre {
  background: #0f172a; color: #dbe7ff; padding: 14px; border-radius: 10px; overflow-x: auto;
  font-size: 13px; line-height: 1.6;
}
.doc-body pre code { background: transparent; color: inherit; padding: 0; }
.doc-body hr { border: none; border-top: 1px dashed var(--line); margin: 16px 0; }
.doc-body a { word-break: break-all; }
.table-wrap { overflow-x: auto; margin: 10px 0; border-radius: 10px; border: 1px solid var(--line); }
.doc-body table { border-collapse: collapse; width: 100%; font-size: 13.8px; background: #fff; }
.doc-body th, .doc-body td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.doc-body th { background: #f5f7fb; font-weight: 700; white-space: nowrap; }
.doc-body tr:last-child td { border-bottom: none; }

/* ---- 上下天导航 ---- */
.pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.pager a {
  background: var(--card); border-radius: 10px; padding: 9px 14px; box-shadow: var(--shadow);
  font-size: 13.5px; color: var(--blue-d); font-weight: 600; max-width: 48%;
}

/* ---- 三色标记（红=必背必考 蓝=重点常考 绿=口诀技巧） ---- */
.color-legend {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  font-size: 12.5px; color: var(--sub); background: #fff; border-radius: 10px;
  padding: 9px 14px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.color-legend b { font-weight: 700; color: var(--ink); }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; font-style: normal; }
.lg-red { background: #dc2626; } .lg-blue { background: #1d4ed8; } .lg-green { background: #047857; }
.doc-body li.mk-red, .doc-body ul.sec-red li { color: #b91c1c; font-weight: 600; }
.doc-body li.mk-blue, .doc-body ul.sec-blue li { color: #1d4ed8; }
.doc-body li.mk-green, .doc-body ul.sec-green li { color: #047857; }
.doc-body ul.sec-red { border-left: 3px solid #f87171; padding-left: 18px; }
.doc-body ul.sec-blue { border-left: 3px solid #93b4f7; padding-left: 18px; }
.doc-body ul.sec-green { border-left: 3px solid #6ee7b7; padding-left: 18px; }
.doc-body ol.sec-red { border-left: 3px solid #f87171; padding-left: 20px; }
.doc-body ol.sec-blue { border-left: 3px solid #93b4f7; padding-left: 20px; }
.doc-body ol.sec-green { border-left: 3px solid #6ee7b7; padding-left: 20px; }
.doc-body .table-wrap.sec-red { border-left: 3px solid #f87171; }
.doc-body .table-wrap.sec-blue { border-left: 3px solid #93b4f7; }
.doc-body .table-wrap.sec-green { border-left: 3px solid #6ee7b7; }
.doc-body .table-wrap.sec-red th { color: #b91c1c; }

/* ---- 划词标注 / 笔记 ---- */
mark.hl-yellow { background: #fef08a; color: inherit; padding: 0 2px; border-radius: 3px; }
mark.hl-red { background: #fecaca; color: inherit; padding: 0 2px; border-radius: 3px; }
mark.hl-green { background: #bbf7d0; color: inherit; padding: 0 2px; border-radius: 3px; }
mark.has-note { border-bottom: 2.5px dotted rgba(0, 0, 0, .45); }
.mp-flag { font-size: 13px; margin-left: 2px; user-select: none; cursor: pointer; }
.note-tip {
  position: fixed; z-index: 65; display: none; max-width: 300px;
  background: #1e2430; color: #fff; border-radius: 10px; padding: 9px 13px;
  font-size: 13.5px; line-height: 1.55; box-shadow: 0 6px 18px rgba(0, 0, 0, .32);
  white-space: normal; word-break: break-word;
}
.note-tip.nt-yellow { border-left: 4px solid #eab308; }
.note-tip.nt-red { border-left: 4px solid #ef4444; }
.note-tip.nt-green { border-left: 4px solid #22c55e; }
.mark-note-bubble {
  margin-top: 7px; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; line-height: 1.55; color: #27303f; font-weight: 500;
  background: #f3f6fc; border-left: 4px solid #93b4f7; word-break: break-word;
}
.mark-note-bubble.nb-yellow { background: #fdf9e8; border-left-color: #eab308; }
.mark-note-bubble.nb-red { background: #fdf1f1; border-left-color: #ef4444; }
.mark-note-bubble.nb-green { background: #eefbf2; border-left-color: #22c55e; }
.mini-toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 70;
  display: none; background: rgba(22, 163, 74, .95); color: #fff;
  padding: 9px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}
.sel-pop {
  position: fixed; z-index: 60; display: none; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 330px;
  background: #1e2430; color: #fff; border-radius: 10px; padding: 7px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.28); font-size: 13px;
}
.sel-pop button {
  background: rgba(255,255,255,.14); color: #fff; border: none; border-radius: 7px;
  padding: 5px 10px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.sel-pop button.mp-del { background: rgba(239, 68, 68, .85); }
.sel-pop button.mp-save { background: #2563eb; }
.sel-note-row { display: flex; flex-basis: 100%; gap: 6px; margin-top: 6px; }
.sel-note-row input {
  flex: 1; min-width: 170px; border: none; border-radius: 6px; padding: 6px 9px;
  font-size: 13px; font-family: inherit; background: #fff; color: #1e2430;
}
.mp-label { opacity: .75; }
.mp-note-row { display: none; flex-basis: 100%; gap: 6px; margin-top: 6px; align-items: flex-start; }
.mp-note-row textarea {
  flex: 1; min-width: 150px; border: none; border-radius: 6px; padding: 6px 8px;
  font-size: 13px; font-family: inherit; resize: vertical;
}
/* 手机端标注弹条适配：按钮加大适配手指、输入16px防iOS聚焦缩放 */
@media (max-width: 768px) {
  .sel-pop { max-width: calc(100vw - 16px); padding: 9px 11px; gap: 5px; touch-action: manipulation; }
  .sel-pop button { padding: 10px 14px; font-size: 14.5px; }
  .sel-pop button.mp-del { flex-basis: 100%; text-align: center; }
  .sel-note-row input { font-size: 16px; min-width: 0; }
  .mp-note-row textarea { font-size: 16px; }
}
.sec-toggle {
  display: inline-block; margin-right: 8px; color: #c3ccd9; cursor: pointer;
  font-size: .85em; user-select: none;
}
.sec-toggle.on { color: #16a34a; }
.doc-body h2.sec-done, .doc-body h3.sec-done { color: #047857; }
.mark-item {
  display: flex; gap: 8px; align-items: flex-start; padding: 9px 0;
  border-bottom: 1px dashed var(--line); cursor: pointer; transition: background .15s;
}
.mark-item:hover { background: #f6f8fc; border-radius: 8px; }
.mark-item:hover .mark-text { color: var(--blue-d); }
mark.mark-flash { animation: markflash 1s ease-out 2; }
@keyframes markflash {
  0% { outline: 3px solid rgba(37, 99, 235, .55); outline-offset: 2px; background: #dbeafe; }
  100% { outline: 3px solid rgba(37, 99, 235, 0); outline-offset: 6px; }
}
.mark-item:last-child { border-bottom: none; }
.mark-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; }
.mark-dot.d-yellow { background: #eab308; }
.mark-dot.d-red { background: #ef4444; }
.mark-dot.d-green { background: #22c55e; }
.mark-text { font-size: 14px; line-height: 1.5; word-break: break-all; }
.mark-note { font-size: 12.5px; color: var(--sub); margin-top: 2px; }
.mark-meta { font-size: 12px; color: var(--sub); margin-top: 2px; }
.mark-del {
  border: none; background: #f0f2f6; color: var(--sub); border-radius: 7px;
  padding: 4px 10px; font-size: 12.5px; cursor: pointer; flex: none;
}

.jump-note {
  position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .4); cursor: pointer; text-decoration: none;
}
@media (min-width: 768px) { .jump-note { bottom: 28px; } }
.pos-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 45;
  display: none; align-items: center; gap: 12px;
  background: rgba(30, 36, 48, .92); color: #fff; padding: 9px 16px;
  border-radius: 999px; font-size: 13px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.pos-toast a { color: #93c5fd; font-weight: 600; }
@media (min-width: 768px) { .pos-toast { bottom: 30px; } }

.quick-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.quick-item:last-child { border-bottom: none; }
.q-time { font-size: 12px; color: var(--sub); white-space: nowrap; margin-top: 3px; }
.q-text { flex: 1; font-size: 14px; white-space: pre-wrap; word-break: break-word; }

/* ---- 桌面端 ---- */
@media (min-width: 768px) {
  body { padding-bottom: 30px; font-size: 15.5px; }
  .nav-desktop { display: flex; }
  .bottomnav { display: none; }
  main { padding: 20px 20px 40px; }
  .card, .doc-body { padding: 22px; }
}

/* ---- 宽屏：左侧固定导航 + 宽阅读区 ---- */
.sidebar { display: none; }
@media (min-width: 1024px) {
  .sidebar {
    display: flex; flex-direction: column; position: fixed; z-index: 30;
    left: 0; top: 0; bottom: 0; width: 224px;
    background: #fff; border-right: 1px solid var(--line); padding: 20px 14px 18px;
  }
  .sidebar .brand { margin: 0 8px 18px; color: var(--ink); }
  .topbar { display: none; }
  .bottomnav { display: none; }
  body { padding: 0; font-size: 15.5px; }
  main { margin-left: 224px; max-width: 920px; padding: 30px 36px 48px; }
  .banner .big { font-size: 30px; }
  .doc-body { padding: 30px 36px; font-size: 15.5px; }
  .doc-body table { font-size: 14.2px; }
  .doc-body th, .doc-body td { padding: 9px 13px; }
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 15px;
}
.side-nav a i { font-style: normal; font-size: 17px; }
.side-nav a.on { background: var(--blue-bg); color: var(--blue-d); }
.side-nav a:hover { background: #f2f5fa; }
.side-sec { font-size: 12px; font-weight: 700; color: var(--sub); letter-spacing: .5px; margin: 18px 10px 6px; }
.side-book {
  display: block; padding: 7px 12px; border-radius: 8px; color: var(--sub);
  font-size: 13.5px;
}
.side-book:hover { background: #f2f5fa; color: var(--ink); }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.side-foot .bar { height: 8px; margin-bottom: 6px; }
.side-foot #sideProg { font-size: 12.5px; color: var(--sub); font-weight: 600; }

/* ---- 刷题 ---- */
.qz-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.qz-stat { flex: 1; min-width: 72px; background: #f6f8fc; border-radius: 10px; padding: 9px 6px; text-align: center; }
.qz-stat b { display: block; font-size: 19px; color: var(--blue-d); }
.qz-stat span { font-size: 11.5px; color: var(--sub); }
.mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mode-btn {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; text-align: left;
  cursor: pointer; background: #fff; transition: border-color .15s;
}
.mode-btn:hover { border-color: var(--blue); }
.mode-btn.dis { opacity: .5; cursor: default; }
.mode-btn.dis:hover { border-color: var(--line); }
.mode-btn b { display: block; font-size: 15px; }
.mode-btn .m-sub { font-size: 12px; color: var(--sub); }
.qz-chaps { display: flex; flex-wrap: wrap; gap: 8px; }
.qz-chap {
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px;
  cursor: pointer; background: #fff; transition: border-color .15s;
}
.qz-chap:hover { border-color: var(--blue); color: var(--blue-d); }
.qz-chap em { font-style: normal; color: var(--sub); font-size: 12px; }
.qz-case-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.qz-case-item:last-of-type { border-bottom: none; }
.qz-case-item .qc-main { flex: 1; min-width: 0; }
.qz-case-item .qc-title { font-weight: 600; font-size: 14.5px; }
.qz-case-item.done .qc-title { color: var(--green); }
.qz-case-item .qc-meta { font-size: 12px; color: var(--sub); margin-top: 1px; }
.qz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--sub); }
.qz-top span:nth-child(2) { font-weight: 600; color: var(--ink); }
.qz-bar { height: 6px; background: #e8ebf1; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.qz-bar > div { height: 100%; background: linear-gradient(90deg, #2563eb, #3b82f6); transition: width .2s; }
.qz-stem { font-size: 15.5px; font-weight: 600; line-height: 1.7; margin: 6px 0 10px; white-space: pre-wrap; }
.qz-opt {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; margin: 8px 0;
  font-size: 14.5px; cursor: pointer; background: #fff; font-family: inherit; line-height: 1.55;
  transition: border-color .12s, background .12s;
}
.qz-opt:not(:disabled):hover { border-color: var(--blue); }
.qz-opt:not(:disabled):active { background: #f6f8fc; }
.qz-opt b {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px; background: #f0f3f9;
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--sub);
}
.qz-opt.ok { border-color: var(--green); background: var(--green-bg); }
.qz-opt.ok b { background: var(--green); color: #fff; }
.qz-opt.bad { border-color: var(--red); background: var(--red-bg); }
.qz-opt.bad b { background: var(--red); color: #fff; }
.qz-opt.dim { opacity: .55; }
.qz-exp {
  margin-top: 12px; padding: 10px 12px; background: #f6f8fc; border-left: 3px solid var(--blue);
  border-radius: 8px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap;
}
.qz-exp .lab { font-weight: 700; color: var(--blue-d); font-size: 12.5px; margin-bottom: 3px; }
.qz-fav {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 12px;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.qz-fav.on { border-color: #d97706; background: var(--orange-bg); color: var(--orange); }
.qz-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 2px; }
.qz-foot .btn { flex: 1; }
.qz-score { font-size: 46px; font-weight: 800; color: var(--blue-d); line-height: 1.1; }
.qz-score span { font-size: 22px; }
.qz-review {
  display: flex; align-items: center; gap: 8px; padding: 9px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.qz-review:last-of-type { border-bottom: none; }
.qz-review-stem { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-ans-btn { width: 100%; margin-top: 6px; }
.qz-ans { display: none; margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 4px; }
.qz-case-q { font-weight: 600; }

/* ---- 未完成练习恢复横幅 / 继续学习卡片 ---- */
.resume-banner {
  background: #fff; border: 1.5px solid var(--blue); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--shadow); font-size: 14px;
}
.cont-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 10px; margin: 2px -10px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.cont-row:hover { background: #f2f5fa; color: var(--blue-d); }
